Merge remote-tracking branch 'refs/remotes/wizards/master'

This commit is contained in:
Vigers Ray 2024-10-31 19:27:54 +03:00
commit b9a24ac10e
9 changed files with 146 additions and 68 deletions

14
.github/workflows/labeler-approved.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: "Labels: Approved"
on:
pull_request_review:
types: [submitted]
jobs:
add_label:
if: github.event.review.state == 'APPROVED'
runs-on: ubuntu-latest
steps:
- uses: actions-ecosystem/action-add-labels@v1
with:
labels: "PR: Approved"

View file

@ -33,7 +33,7 @@ public sealed partial class CartridgeLoaderComponent : Component
/// The maximum amount of programs that can be installed on the cartridge loader entity
/// </summary>
[DataField]
public int DiskSpace = 5;
public int DiskSpace = 8;
/// <summary>
/// Controls whether the cartridge loader will play notifications if it supports it at all

View file

@ -47,7 +47,7 @@ public abstract partial class InventorySystem
private void OnEntRemoved(EntityUid uid, InventoryComponent component, EntRemovedFromContainerMessage args)
{
if(!TryGetSlot(uid, args.Container.ID, out var slotDef, inventory: component))
if (!TryGetSlot(uid, args.Container.ID, out var slotDef, inventory: component))
return;
var unequippedEvent = new DidUnequipEvent(uid, args.Entity, slotDef);
@ -59,8 +59,8 @@ public abstract partial class InventorySystem
private void OnEntInserted(EntityUid uid, InventoryComponent component, EntInsertedIntoContainerMessage args)
{
if(!TryGetSlot(uid, args.Container.ID, out var slotDef, inventory: component))
return;
if (!TryGetSlot(uid, args.Container.ID, out var slotDef, inventory: component))
return;
var equippedEvent = new DidEquipEvent(uid, args.Entity, slotDef);
RaiseLocalEvent(uid, equippedEvent, true);
@ -118,7 +118,7 @@ public abstract partial class InventorySystem
RaiseLocalEvent(held.Value, new HandDeselectedEvent(actor));
TryEquip(actor, actor, held.Value, ev.Slot, predicted: true, inventory: inventory, force: true, checkDoafter:true);
TryEquip(actor, actor, held.Value, ev.Slot, predicted: true, inventory: inventory, force: true, checkDoafter: true);
}
public bool TryEquip(EntityUid uid, EntityUid itemUid, string slot, bool silent = false, bool force = false, bool predicted = false,
@ -365,6 +365,25 @@ public abstract partial class InventorySystem
ClothingComponent? clothing = null,
bool reparent = true,
bool checkDoafter = false)
{
var itemsDropped = 0;
return TryUnequip(actor, target, slot, out removedItem, ref itemsDropped,
silent, force, predicted, inventory, clothing, reparent, checkDoafter);
}
private bool TryUnequip(
EntityUid actor,
EntityUid target,
string slot,
[NotNullWhen(true)] out EntityUid? removedItem,
ref int itemsDropped,
bool silent = false,
bool force = false,
bool predicted = false,
InventoryComponent? inventory = null,
ClothingComponent? clothing = null,
bool reparent = true,
bool checkDoafter = false)
{
removedItem = null;
@ -423,17 +442,27 @@ public abstract partial class InventorySystem
return false;
}
if (!_containerSystem.Remove(removedItem.Value, slotContainer, force: force, reparent: reparent))
return false;
// this is in order to keep track of whether this is the first instance of a recursion call
var firstRun = itemsDropped == 0;
++itemsDropped;
foreach (var slotDef in inventory.Slots)
{
if (slotDef != slotDefinition && slotDef.DependsOn == slotDefinition.Name)
{
//this recursive call might be risky
TryUnequip(actor, target, slotDef.Name, true, true, predicted, inventory, reparent: reparent);
TryUnequip(actor, target, slotDef.Name, out _, ref itemsDropped, true, true, predicted, inventory, reparent: reparent);
}
}
if (!_containerSystem.Remove(removedItem.Value, slotContainer, force: force, reparent: reparent))
return false;
// we check if any items were dropped, and make a popup if they were.
// the reason we check for > 1 is because the first item is always the one we are trying to unequip,
// whereas we only want to notify for extra dropped items.
if (!silent && _gameTiming.IsFirstTimePredicted && firstRun && itemsDropped > 1)
_popup.PopupClient(Loc.GetString("inventory-component-dropped-from-unequip", ("items", itemsDropped - 1)), target, target);
// TODO: Inventory needs a hot cleanup hoo boy
// Check if something else (AKA toggleable) dumped it into a container.
@ -466,7 +495,7 @@ public abstract partial class InventorySystem
if ((containerSlot == null || slotDefinition == null) && !TryGetSlotContainer(target, slot, out containerSlot, out slotDefinition, inventory))
return false;
if (containerSlot.ContainedEntity is not {} itemUid)
if (containerSlot.ContainedEntity is not { } itemUid)
return false;
if (!_containerSystem.CanRemove(itemUid, containerSlot))

View file

@ -567,5 +567,13 @@ Entries:
id: 70
time: '2024-10-16T22:24:31.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32844
- author: BramvanZijp
changes:
- message: CC, ERT, Admin, and Deathsquad PDA's now have all departmental programs
pre-installed.
type: Tweak
id: 71
time: '2024-10-31T14:53:38.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32601
Name: Admin
Order: 1

View file

@ -1,39 +1,4 @@
Entries:
- author: themias
changes:
- message: Butter can be sliced, cookie and toast recipes now use butter slices.
type: Tweak
- message: Chefvend butter reduced from 4 to 3.
type: Tweak
id: 7065
time: '2024-08-08T23:32:42.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30789
- author: EmoGarbage404
changes:
- message: You should have significantly less friction when moving in space.
type: Tweak
id: 7066
time: '2024-08-09T04:52:25.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29383
- author: Plykiya
changes:
- message: Hardsuits and EVA suits now count as protection for unscrewing lightbulbs.
type: Add
- message: More gloves were given the ability to unscrew light bulbs.
type: Add
- message: Behonkers no longer hurt you when melee attacking them or interacting
with them.
type: Remove
id: 7067
time: '2024-08-09T05:32:41.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30244
- author: Ian321
changes:
- message: The warden is now an important job.
type: Tweak
id: 7068
time: '2024-08-09T05:45:51.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/30745
- author: slarticodefast
changes:
- message: Added tooltips to the agent ID job icons
@ -3945,3 +3910,36 @@
id: 7564
time: '2024-10-30T09:15:30.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32720
- author: Boaz1111
changes:
- message: Pill bottles can now only store pills.
type: Tweak
id: 7565
time: '2024-10-31T10:56:07.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33074
- author: Jarmer123
changes:
- message: You can now find a spare bible in the PietyVend
type: Add
id: 7566
time: '2024-10-31T13:26:46.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32363
- author: justinbrick
changes:
- message: Added a pop-up notification when extra items are dropped while unequipping
something.
type: Tweak
id: 7567
time: '2024-10-31T14:12:26.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/33078
- author: BramvanZijp
changes:
- message: The maximum amount of programs that can be installed on a PDA has been
increased from 5 to 8
type: Tweak
- message: The Detective and Head of Security now get the logprobe program pre-installed
on their PDA.
type: Tweak
id: 7568
time: '2024-10-31T14:53:38.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/32601

View file

@ -2,3 +2,9 @@ inventory-component-can-equip-cannot = You can't equip this!
inventory-component-can-equip-does-not-fit = This doesn't fit!
inventory-component-can-unequip-cannot = You can't unequip this!
inventory-component-dropped-from-unequip =
You dropped {$items ->
[1] an item!
*[other] some items!
}

View file

@ -22,6 +22,7 @@
BoxCandle: 2
BoxCandleSmall: 2
Urn: 5
Bible: 1
emaggedInventory:
ClothingOuterArmorCult: 1
ClothingHeadHelmetCult: 1

View file

@ -720,6 +720,13 @@
accentHColor: "#447987"
- type: Icon
state: pda-hos
- type: CartridgeLoader
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NewsReaderCartridge
- WantedListCartridge
- LogProbeCartridge
- type: entity
parent: BaseSecurityPDA
@ -768,6 +775,16 @@
borderColor: "#00842e"
- type: Icon
state: pda-centcom
- type: CartridgeLoader
uiKey: enum.PdaUiKey.Key
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NewsReaderCartridge
- MedTekCartridge
- WantedListCartridge
- LogProbeCartridge
- AstroNavCartridge
- type: entity
parent: CentcomPDA
@ -790,6 +807,8 @@
- NewsReaderCartridge
- LogProbeCartridge
- WantedListCartridge
- MedTekCartridge
- AstroNavCartridge
- type: entity
parent: CentcomPDA
@ -881,14 +900,6 @@
uiKey: enum.PdaUiKey.Key
preinstalled:
- NotekeeperCartridge
cartridgeSlot:
priority: -1
name: Cartridge
ejectSound: /Audio/Machines/id_swipe.ogg
insertSound: /Audio/Machines/id_insert.ogg
whitelist:
components:
- Cartridge
- type: entity
parent: BaseSecurityPDA
@ -906,6 +917,16 @@
accentVColor: "#447987"
- type: Icon
state: pda-ert
- type: CartridgeLoader
uiKey: enum.PdaUiKey.Key
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NewsReaderCartridge
- MedTekCartridge
- WantedListCartridge
- LogProbeCartridge
- AstroNavCartridge
- type: entity
parent: ERTLeaderPDA
@ -946,14 +967,6 @@
components:
- type: Pda
id: ERTMedicIDCard
- type: CartridgeLoader
uiKey: enum.PdaUiKey.Key
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NewsReaderCartridge
- MedTekCartridge
- WantedListCartridge
- type: entity
parent: ERTLeaderPDA
@ -1055,6 +1068,13 @@
borderColor: "#774705"
- type: Icon
state: pda-detective
- type: CartridgeLoader
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NewsReaderCartridge
- WantedListCartridge
- LogProbeCartridge
- type: entity
parent: BaseMedicalPDA
@ -1071,6 +1091,13 @@
accentVColor: "#d7d7d0"
- type: Icon
state: pda-brigmedic
- type: CartridgeLoader
preinstalled:
- CrewManifestCartridge
- NotekeeperCartridge
- NewsReaderCartridge
- WantedListCartridge
- MedTekCartridge
- type: entity
parent: ClownPDA
@ -1187,11 +1214,3 @@
preinstalled:
- NotekeeperCartridge
- MedTekCartridge
cartridgeSlot:
priority: -1
name: Cartridge
ejectSound: /Audio/Machines/id_swipe.ogg
insertSound: /Audio/Machines/id_insert.ogg
whitelist:
components:
- Cartridge

View file

@ -586,4 +586,7 @@
areaInsertRadius: 1
storageInsertSound: /Audio/Effects/pill_insert.ogg
storageRemoveSound: /Audio/Effects/pill_remove.ogg
whitelist:
tags:
- Pill
- type: Dumpable