diff --git a/.github/workflows/labeler-approved.yml b/.github/workflows/labeler-approved.yml new file mode 100644 index 0000000000..e05893ed8f --- /dev/null +++ b/.github/workflows/labeler-approved.yml @@ -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" diff --git a/Content.Shared/CartridgeLoader/CartridgeLoaderComponent.cs b/Content.Shared/CartridgeLoader/CartridgeLoaderComponent.cs index c9cd710c52..f47112c794 100644 --- a/Content.Shared/CartridgeLoader/CartridgeLoaderComponent.cs +++ b/Content.Shared/CartridgeLoader/CartridgeLoaderComponent.cs @@ -33,7 +33,7 @@ public sealed partial class CartridgeLoaderComponent : Component /// The maximum amount of programs that can be installed on the cartridge loader entity /// [DataField] - public int DiskSpace = 5; + public int DiskSpace = 8; /// /// Controls whether the cartridge loader will play notifications if it supports it at all diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index 1d5d91a9e3..f089dfaf23 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -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)) diff --git a/Resources/Changelog/Admin.yml b/Resources/Changelog/Admin.yml index 2c4db6e82b..4bb373ca1d 100644 --- a/Resources/Changelog/Admin.yml +++ b/Resources/Changelog/Admin.yml @@ -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 diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index b9b8422096..c3121dc7d0 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -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 diff --git a/Resources/Locale/en-US/_strings/inventory/components/inventory-component.ftl b/Resources/Locale/en-US/_strings/inventory/components/inventory-component.ftl index 79943d914e..1cde6b5943 100644 --- a/Resources/Locale/en-US/_strings/inventory/components/inventory-component.ftl +++ b/Resources/Locale/en-US/_strings/inventory/components/inventory-component.ftl @@ -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! +} diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml index 06c0d1005a..460d5ac7ad 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml @@ -22,6 +22,7 @@ BoxCandle: 2 BoxCandleSmall: 2 Urn: 5 + Bible: 1 emaggedInventory: ClothingOuterArmorCult: 1 ClothingHeadHelmetCult: 1 diff --git a/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index f792adf914..64b9f1ec61 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml index 3f2ac403ac..b717255d8f 100644 --- a/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml +++ b/Resources/Prototypes/Entities/Objects/Specific/chemistry.yml @@ -586,4 +586,7 @@ areaInsertRadius: 1 storageInsertSound: /Audio/Effects/pill_insert.ogg storageRemoveSound: /Audio/Effects/pill_remove.ogg + whitelist: + tags: + - Pill - type: Dumpable