From a3dc0eb75a2d0cdcdedd149384c23422b74e8ea8 Mon Sep 17 00:00:00 2001 From: Boaz1111 <149967078+Boaz1111@users.noreply.github.com> Date: Thu, 31 Oct 2024 11:56:07 +0100 Subject: [PATCH 01/10] Pill Bottles can only store pills now (#33074) * no longer absurd * Update Resources/Prototypes/Entities/Objects/Specific/chemistry.yml --------- Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com> --- Resources/Prototypes/Entities/Objects/Specific/chemistry.yml | 3 +++ 1 file changed, 3 insertions(+) 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 From 826bd1ab45c0e4958785eb9dc653fb7d3527a5b3 Mon Sep 17 00:00:00 2001 From: PJBot Date: Thu, 31 Oct 2024 10:57:15 +0000 Subject: [PATCH 02/10] Automatic changelog update --- Resources/Changelog/Changelog.yml | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index b9b8422096..3645a63f1e 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,13 +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. @@ -3945,3 +3936,10 @@ 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 From f5e564640077097f719f7d242277f965577c901c Mon Sep 17 00:00:00 2001 From: AJCM-git <60196617+AJCM-git@users.noreply.github.com> Date: Thu, 31 Oct 2024 07:22:13 -0400 Subject: [PATCH 03/10] New workflow to apply the pr approved label (#28358) * New workflow to apply the pr approved label * Maybe fix permissions --- .github/workflows/labeler-approved.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/labeler-approved.yml diff --git a/.github/workflows/labeler-approved.yml b/.github/workflows/labeler-approved.yml new file mode 100644 index 0000000000..f583500c87 --- /dev/null +++ b/.github/workflows/labeler-approved.yml @@ -0,0 +1,17 @@ +name: "Labels: Approved" + +on: + pull_request_review: + types: [submitted] + +jobs: + add_label: + if: github.event.review.state == 'APPROVED' + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions-ecosystem/action-add-labels@v1 + with: + labels: "PR: Approved" From 426169837100eaa1e0fccc62dbd7aedc0b0d5dd5 Mon Sep 17 00:00:00 2001 From: Jarmer123 <148848017+Jarmer123@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:26:45 +0100 Subject: [PATCH 04/10] Add a spare bible to PietyVend (#32363) Update chapel.yml --- .../Prototypes/Catalog/VendingMachines/Inventories/chapel.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml index 33a13dab0a..cb9e06932f 100644 --- a/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml +++ b/Resources/Prototypes/Catalog/VendingMachines/Inventories/chapel.yml @@ -20,6 +20,7 @@ BoxCandle: 2 BoxCandleSmall: 2 Urn: 5 + Bible: 1 emaggedInventory: ClothingOuterArmorCult: 1 ClothingHeadHelmetCult: 1 From a875bf3c64f0c9021382764714229e852c449be7 Mon Sep 17 00:00:00 2001 From: PJBot Date: Thu, 31 Oct 2024 13:27:53 +0000 Subject: [PATCH 05/10] Automatic changelog update --- Resources/Changelog/Changelog.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 3645a63f1e..7c22ba77f9 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,11 +1,4 @@ Entries: -- 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. @@ -3943,3 +3936,10 @@ 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 From 55861b4fcfb525113d4c194fd1eac0486ac9fc1a Mon Sep 17 00:00:00 2001 From: SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:12:26 +0100 Subject: [PATCH 06/10] [#28722 fix] Add notification for dependent wearables being dropped (#33078) * add notification for dependent wearables being dropped * fix dropped item popup redundancy - did a check to see if any item was dropped, instead of making a notification for each item being dropped. * change popup to client-only variant * fix redundant messages, add plural locale string * fix conventions, fix locale input to be more intuitive --------- Co-authored-by: Justin --- .../Inventory/InventorySystem.Equip.cs | 45 +++++++++++++++---- .../components/inventory-component.ftl | 6 +++ 2 files changed, 43 insertions(+), 8 deletions(-) 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/Locale/en-US/inventory/components/inventory-component.ftl b/Resources/Locale/en-US/inventory/components/inventory-component.ftl index 79943d914e..1cde6b5943 100644 --- a/Resources/Locale/en-US/inventory/components/inventory-component.ftl +++ b/Resources/Locale/en-US/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! +} From 872adb5c93fc4272ed668ba8599781e353425316 Mon Sep 17 00:00:00 2001 From: PJBot Date: Thu, 31 Oct 2024 14:13:33 +0000 Subject: [PATCH 07/10] Automatic changelog update --- Resources/Changelog/Changelog.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml index 7c22ba77f9..ad3d938200 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,16 +1,4 @@ Entries: -- 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. @@ -3943,3 +3931,11 @@ 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 From a08da9d31f1f1c63f5124edff5a23d5443659bfc Mon Sep 17 00:00:00 2001 From: BramvanZijp <56019239+BramvanZijp@users.noreply.github.com> Date: Thu, 31 Oct 2024 15:53:38 +0100 Subject: [PATCH 08/10] More pda space (#32601) * Rebalance the max programs that a PDA can hold * Give Caps PDA more programs too. * Make the max programs a static 8 * I forgor sec and med * CaseCase * Empty commit to re-run checks * The final change, I hope. --- .../CartridgeLoaderComponent.cs | 2 +- .../Entities/Objects/Devices/pda.yml | 67 ++++++++++++------- 2 files changed, 44 insertions(+), 25 deletions(-) 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/Resources/Prototypes/Entities/Objects/Devices/pda.yml b/Resources/Prototypes/Entities/Objects/Devices/pda.yml index dfc1c6fa5b..673b0ba52f 100644 --- a/Resources/Prototypes/Entities/Objects/Devices/pda.yml +++ b/Resources/Prototypes/Entities/Objects/Devices/pda.yml @@ -684,6 +684,13 @@ accentHColor: "#447987" - type: Icon state: pda-hos + - type: CartridgeLoader + preinstalled: + - CrewManifestCartridge + - NotekeeperCartridge + - NewsReaderCartridge + - WantedListCartridge + - LogProbeCartridge - type: entity parent: BaseSecurityPDA @@ -732,6 +739,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 @@ -754,6 +771,8 @@ - NewsReaderCartridge - LogProbeCartridge - WantedListCartridge + - MedTekCartridge + - AstroNavCartridge - type: entity parent: CentcomPDA @@ -845,14 +864,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 @@ -870,6 +881,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 @@ -910,14 +931,6 @@ components: - type: Pda id: ERTMedicIDCard - - type: CartridgeLoader - uiKey: enum.PdaUiKey.Key - preinstalled: - - CrewManifestCartridge - - NotekeeperCartridge - - NewsReaderCartridge - - MedTekCartridge - - WantedListCartridge - type: entity parent: ERTLeaderPDA @@ -1019,6 +1032,13 @@ borderColor: "#774705" - type: Icon state: pda-detective + - type: CartridgeLoader + preinstalled: + - CrewManifestCartridge + - NotekeeperCartridge + - NewsReaderCartridge + - WantedListCartridge + - LogProbeCartridge - type: entity parent: BaseMedicalPDA @@ -1035,6 +1055,13 @@ accentVColor: "#d7d7d0" - type: Icon state: pda-brigmedic + - type: CartridgeLoader + preinstalled: + - CrewManifestCartridge + - NotekeeperCartridge + - NewsReaderCartridge + - WantedListCartridge + - MedTekCartridge - type: entity parent: ClownPDA @@ -1151,11 +1178,3 @@ preinstalled: - NotekeeperCartridge - MedTekCartridge - cartridgeSlot: - priority: -1 - name: Cartridge - ejectSound: /Audio/Machines/id_swipe.ogg - insertSound: /Audio/Machines/id_insert.ogg - whitelist: - components: - - Cartridge From bca8d95191cb09e97fad50f0b35e0f1730c81644 Mon Sep 17 00:00:00 2001 From: PJBot Date: Thu, 31 Oct 2024 14:54:44 +0000 Subject: [PATCH 09/10] Automatic changelog update --- Resources/Changelog/Admin.yml | 8 ++++++++ Resources/Changelog/Changelog.yml | 18 +++++++++++------- 2 files changed, 19 insertions(+), 7 deletions(-) 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 ad3d938200..c3121dc7d0 100644 --- a/Resources/Changelog/Changelog.yml +++ b/Resources/Changelog/Changelog.yml @@ -1,11 +1,4 @@ Entries: -- 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 @@ -3939,3 +3932,14 @@ 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 From d446a3e8e90f41c3d0a6413116148edef5274513 Mon Sep 17 00:00:00 2001 From: Vasilis Date: Thu, 31 Oct 2024 16:05:42 +0100 Subject: [PATCH 10/10] Potencially fix approved labeler (#33083) --- .github/workflows/labeler-approved.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/labeler-approved.yml b/.github/workflows/labeler-approved.yml index f583500c87..e05893ed8f 100644 --- a/.github/workflows/labeler-approved.yml +++ b/.github/workflows/labeler-approved.yml @@ -7,9 +7,6 @@ on: jobs: add_label: if: github.event.review.state == 'APPROVED' - permissions: - contents: read - pull-requests: write runs-on: ubuntu-latest steps: - uses: actions-ecosystem/action-add-labels@v1