Skip to content

Commit

Permalink
Make safes craftable (space-wizards#32694)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
lzk228 and TyAshley authored Dec 18, 2024
1 parent 1c0db47 commit 6c925d2
Show file tree
Hide file tree
Showing 4 changed files with 74 additions and 8 deletions.
16 changes: 8 additions & 8 deletions Resources/Prototypes/Catalog/Fills/Lockers/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
prob: 0.5

- type: entity
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
id: GunSafeDisabler
name: disabler safe
components:
Expand All @@ -164,7 +164,7 @@
amount: 5

- type: entity
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
id: GunSafePistolMk58
name: mk58 safe
components:
Expand All @@ -176,7 +176,7 @@
amount: 8

- type: entity
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
id: GunSafeRifleLecter
name: lecter safe
components:
Expand All @@ -188,7 +188,7 @@
amount: 4

- type: entity
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
id: GunSafeSubMachineGunDrozd
name: drozd safe
components:
Expand All @@ -200,7 +200,7 @@
amount: 4

- type: entity
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
id: GunSafeShotgunEnforcer
name: enforcer safe
components:
Expand All @@ -212,7 +212,7 @@
amount: 4

- type: entity
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
id: GunSafeShotgunKammerer
name: kammerer safe
components:
Expand All @@ -226,7 +226,7 @@
- type: entity
id: GunSafeSubMachineGunWt550
suffix: Wt550
parent: [GunSafe, BaseRestrictedContraband]
parent: [GunSafeBaseSecure, BaseRestrictedContraband]
name: wt550 safe
components:
- type: StorageFill
Expand All @@ -237,7 +237,7 @@
amount: 4

- type: entity
parent: GunSafe
parent: GunSafeBaseSecure
id: GunSafeLaserCarbine
name: laser safe
components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]]

Expand Down
41 changes: 41 additions & 0 deletions Resources/Prototypes/Recipes/Crafting/Graphs/storage/tallbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 11 additions & 0 deletions Resources/Prototypes/Recipes/Crafting/tallbox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c925d2

Please sign in to comment.