From 4b76c4b3e37a3bdab7971a9e553a6453558572b4 Mon Sep 17 00:00:00 2001 From: deltanedas <39013340+deltanedas@users.noreply.github.com> Date: Wed, 6 Dec 2023 21:58:25 +0000 Subject: [PATCH] Make boots with storage use itemslot (#22186) Co-authored-by: deltanedas <@deltanedas:kde.org> --- Resources/Locale/en-US/clothing/boots.ftl | 1 + .../Prototypes/Catalog/Fills/Items/misc.yml | 14 +++++----- .../Clothing/Shoes/base_clothingshoes.yml | 26 +++++++++---------- .../Entities/Clothing/Shoes/boots.yml | 24 +++-------------- .../Entities/Clothing/base_clothing.yml | 11 ++++++++ 5 files changed, 35 insertions(+), 41 deletions(-) create mode 100644 Resources/Locale/en-US/clothing/boots.ftl diff --git a/Resources/Locale/en-US/clothing/boots.ftl b/Resources/Locale/en-US/clothing/boots.ftl new file mode 100644 index 0000000000..05322d612a --- /dev/null +++ b/Resources/Locale/en-US/clothing/boots.ftl @@ -0,0 +1 @@ +clothing-military-boots-sidearm = Sidearm diff --git a/Resources/Prototypes/Catalog/Fills/Items/misc.yml b/Resources/Prototypes/Catalog/Fills/Items/misc.yml index 8f58df7ce5..543cd604a2 100644 --- a/Resources/Prototypes/Catalog/Fills/Items/misc.yml +++ b/Resources/Prototypes/Catalog/Fills/Items/misc.yml @@ -3,16 +3,18 @@ parent: ClothingShoesBootsCombat suffix: Filled components: - - type: StorageFill - contents: - - id: CombatKnife + - type: ContainerFill + containers: + item: + - CombatKnife - type: entity id: ClothingShoesBootsMercFilled parent: ClothingShoesBootsMerc suffix: Filled components: - - type: StorageFill - contents: - - id: KukriKnife + - type: ContainerFill + containers: + item: + - KukriKnife diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml b/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml index 35c3d1393c..9b22495426 100644 --- a/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml +++ b/Resources/Prototypes/Entities/Clothing/Shoes/base_clothingshoes.yml @@ -35,20 +35,18 @@ - id: MaterialCloth1 amount: 1 +# stuff common to all military boots - type: entity abstract: true - parent: ClothingShoesBase - id: ClothingShoesStorageBase + parent: [ClothingShoesBase, ClothingSlotBase] + id: ClothingShoesMilitaryBase components: - - type: Storage - grid: - - 0,0,0,1 - maxItemSize: Normal - - type: ContainerContainer - containers: - storagebase: !type:Container - ents: [] - - type: UserInterface - interfaces: - - key: enum.StorageUiKey.Key - type: StorageBoundUserInterface + - type: Matchbox + - type: ItemSlots + slots: + item: + name: clothing-military-boots-sidearm + whitelist: + tags: + - Knife + - Sidearm diff --git a/Resources/Prototypes/Entities/Clothing/Shoes/boots.yml b/Resources/Prototypes/Entities/Clothing/Shoes/boots.yml index 94da672961..e2eb4d89e1 100644 --- a/Resources/Prototypes/Entities/Clothing/Shoes/boots.yml +++ b/Resources/Prototypes/Entities/Clothing/Shoes/boots.yml @@ -11,7 +11,7 @@ - type: Matchbox - type: entity - parent: ClothingShoesStorageBase + parent: ClothingShoesMilitaryBase id: ClothingShoesBootsJack name: jackboots description: Nanotrasen-issue Security combat boots for combat scenarios or combat situations. All combat, all the time. @@ -20,12 +20,6 @@ sprite: Clothing/Shoes/Boots/jackboots.rsi - type: Clothing sprite: Clothing/Shoes/Boots/jackboots.rsi - - type: Matchbox - - type: Storage - whitelist: - tags: - - Knife - - Sidearm - type: entity parent: ClothingShoesBaseButcherable @@ -51,7 +45,7 @@ sprite: Clothing/Shoes/Boots/performer.rsi - type: entity - parent: ClothingShoesStorageBase + parent: ClothingShoesMilitaryBase id: ClothingShoesBootsCombat name: combat boots description: Robust combat boots for combat scenarios or combat situations. All combat, all the time. @@ -60,15 +54,9 @@ sprite: Clothing/Shoes/Boots/combatboots.rsi - type: Clothing sprite: Clothing/Shoes/Boots/combatboots.rsi - - type: Matchbox - - type: Storage - whitelist: - tags: - - Knife - - Sidearm - type: entity - parent: ClothingShoesStorageBase + parent: ClothingShoesMilitaryBase id: ClothingShoesBootsMerc name: mercenary boots description: Boots that have gone through many conflicts and that have proven their combat reliability. @@ -77,12 +65,6 @@ sprite: Clothing/Shoes/Boots/mercboots.rsi - type: Clothing sprite: Clothing/Shoes/Boots/mercboots.rsi - - type: Matchbox - - type: Storage - whitelist: - tags: - - Knife - - Sidearm - type: entity parent: ClothingShoesBaseButcherable diff --git a/Resources/Prototypes/Entities/Clothing/base_clothing.yml b/Resources/Prototypes/Entities/Clothing/base_clothing.yml index 7e9d6e9568..df22b9b40d 100644 --- a/Resources/Prototypes/Entities/Clothing/base_clothing.yml +++ b/Resources/Prototypes/Entities/Clothing/base_clothing.yml @@ -18,3 +18,14 @@ components: - type: Geiger attachedToSuit: true + +# for clothing that has a single item slot to insert and alt click out. +# inheritors add a whitelisted slot named item +- type: entity + abstract: true + id: ClothingSlotBase + components: + - type: ItemSlots + - type: ContainerContainer + containers: + item: !type:ContainerSlot -- 2.51.2