From 6c925d2c829b5f35d12409fa836679a39b521e26 Mon Sep 17 00:00:00 2001 From: lzk <124214523+lzk228@users.noreply.github.com> Date: Wed, 18 Dec 2024 12:26:19 +0100 Subject: [PATCH] Make safes craftable (#32694) * Made the Armory Gun Safe craftable with 10 steel, 10 plasteel, and 5 LV cables. * Changed gun safe price to 335, to match the cost of its material components. Changed gun safe to start with no accesses when constructed. * adress the review * yeah * wrah * test fail is not real --------- Co-authored-by: Ty Ashley <42426760+TyAshley@users.noreply.github.com> --- .../Catalog/Fills/Lockers/security.yml | 16 ++++---- .../Storage/Closets/Lockers/lockers.yml | 14 +++++++ .../Crafting/Graphs/storage/tallbox.yml | 41 +++++++++++++++++++ .../Prototypes/Recipes/Crafting/tallbox.yml | 11 +++++ 4 files changed, 74 insertions(+), 8 deletions(-) diff --git a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml index 0c4f04fa128f..4e5251c27e7c 100644 --- a/Resources/Prototypes/Catalog/Fills/Lockers/security.yml +++ b/Resources/Prototypes/Catalog/Fills/Lockers/security.yml @@ -154,7 +154,7 @@ prob: 0.5 - type: entity - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] id: GunSafeDisabler name: disabler safe components: @@ -164,7 +164,7 @@ amount: 5 - type: entity - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] id: GunSafePistolMk58 name: mk58 safe components: @@ -176,7 +176,7 @@ amount: 8 - type: entity - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] id: GunSafeRifleLecter name: lecter safe components: @@ -188,7 +188,7 @@ amount: 4 - type: entity - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] id: GunSafeSubMachineGunDrozd name: drozd safe components: @@ -200,7 +200,7 @@ amount: 4 - type: entity - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] id: GunSafeShotgunEnforcer name: enforcer safe components: @@ -212,7 +212,7 @@ amount: 4 - type: entity - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] id: GunSafeShotgunKammerer name: kammerer safe components: @@ -226,7 +226,7 @@ - type: entity id: GunSafeSubMachineGunWt550 suffix: Wt550 - parent: [GunSafe, BaseRestrictedContraband] + parent: [GunSafeBaseSecure, BaseRestrictedContraband] name: wt550 safe components: - type: StorageFill @@ -237,7 +237,7 @@ amount: 4 - type: entity - parent: GunSafe + parent: GunSafeBaseSecure id: GunSafeLaserCarbine name: laser safe components: diff --git a/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml b/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml index 244ccf2e30c4..0ab9e03fd165 100644 --- a/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml +++ b/Resources/Prototypes/Entities/Structures/Storage/Closets/Lockers/lockers.yml @@ -364,6 +364,20 @@ stateBaseClosed: shotguncase stateDoorOpen: shotguncase_open stateDoorClosed: shotguncase_door + - type: AccessReader + - type: Construction + graph: GunSafe + node: done + containers: + - entity_storage + - type: StaticPrice + price: 660 + +- type: entity + id: GunSafeBaseSecure + parent: GunSafe + suffix: Armory, Locked + components: - type: AccessReader access: [["Armory"]] diff --git a/Resources/Prototypes/Recipes/Crafting/Graphs/storage/tallbox.yml b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/tallbox.yml index 17696eaaff88..c465d74db7b7 100644 --- a/Resources/Prototypes/Recipes/Crafting/Graphs/storage/tallbox.yml +++ b/Resources/Prototypes/Recipes/Crafting/Graphs/storage/tallbox.yml @@ -104,6 +104,47 @@ - !type:EmptyAllContainers - !type:DeleteEntity +- type: constructionGraph + id: GunSafe + start: start + graph: + - node: start + edges: + - to: done + steps: + - material: Steel + amount: 10 + - material: Cable + amount: 5 + doAfter: 5 + - material: Plasteel + amount: 10 + doAfter: 10 + - node: done + entity: GunSafe + edges: + - to: start + steps: + - tool: Screwing + doAfter: 5 + conditions: + - !type:StorageWelded + welded: false + - !type:Locked + locked: false + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 10 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 5 + - !type:SpawnPrototype + prototype: SheetPlasteel1 + amount: 10 + - !type:EmptyAllContainers + - !type:DeleteEntity + - type: constructionGraph id: ClosetWall start: start diff --git a/Resources/Prototypes/Recipes/Crafting/tallbox.yml b/Resources/Prototypes/Recipes/Crafting/tallbox.yml index c90142de4454..7de80870afc0 100644 --- a/Resources/Prototypes/Recipes/Crafting/tallbox.yml +++ b/Resources/Prototypes/Recipes/Crafting/tallbox.yml @@ -31,6 +31,17 @@ icon: { sprite: Structures/Storage/closet.rsi, state: freezer_icon } objectType: Structure +- type: construction + id: GunSafe + name: gun safe + graph: GunSafe + startNode: start + targetNode: done + category: construction-category-storage + description: A durable gun safe that can be locked. + icon: { sprite: Structures/Storage/closet.rsi, state: shotguncase } + objectType: Structure + - type: construction id: ClosetWall name: wall closet