From ef6c53bd98deef41d93e4136d131c55b050f02eb Mon Sep 17 00:00:00 2001 From: Field Command <159087063+FieldCommand@users.noreply.github.com> Date: Sun, 29 Dec 2024 00:32:18 +0100 Subject: [PATCH] Secure cabinets (#2544) * Initial "Secure Cabinet" PR * Fixed problems with constitution * Fixed structure in code and other issues. * More code optimization --- .../Storage/SecureCabinet/secure_cabinets.yml | 313 ++++++++++++++++++ .../DeltaV/Recipes/Construction/storage.yml | 17 + .../Graphs/SecureCabinet/secure_cabinet.yml | 34 ++ .../Storage/secure_cabinet.rsi/locked.png | Bin 0 -> 122 bytes .../Storage/secure_cabinet.rsi/meta.json | 23 ++ .../secure-cabinet-open.png | Bin 0 -> 258 bytes .../secure_cabinet.rsi/secure-cabinet.png | Bin 0 -> 533 bytes .../Storage/secure_cabinet.rsi/unlocked.png | Bin 0 -> 116 bytes 8 files changed, 387 insertions(+) create mode 100644 Resources/Prototypes/DeltaV/Entities/Structures/Storage/SecureCabinet/secure_cabinets.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Construction/storage.yml create mode 100644 Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/SecureCabinet/secure_cabinet.yml create mode 100644 Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/locked.png create mode 100644 Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/meta.json create mode 100644 Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/secure-cabinet-open.png create mode 100644 Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/secure-cabinet.png create mode 100644 Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/unlocked.png diff --git a/Resources/Prototypes/DeltaV/Entities/Structures/Storage/SecureCabinet/secure_cabinets.yml b/Resources/Prototypes/DeltaV/Entities/Structures/Storage/SecureCabinet/secure_cabinets.yml new file mode 100644 index 0000000000..44de672ed9 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Structures/Storage/SecureCabinet/secure_cabinets.yml @@ -0,0 +1,313 @@ +#Parent +- type: entity + abstract: true + parent: [ BaseStructureDynamic, BaseBagOpenClose ] + id: BaseSecureCabinet + suffix: Empty + description: A secure cabinet to keep all your confidential files or items away from prying hands. + components: + - type: Storage + grid: + - 0,0,2,1 + - 0,3,2,4 + - 0,6,2,7 + maxItemSize: Normal + - type: Sprite + sprite: DeltaV/Structures/Storage/secure_cabinet.rsi + noRot: true + - type: Appearance + - type: UserInterface + interfaces: + enum.StorageUiKey.Key: + type: StorageBoundUserInterface + - type: Transform + noRot: true + - type: Fixtures + fixtures: + fix1: + shape: + !type:PhysShapeAabb + bounds: "-0.22,-0.40,0.22,0.40" + density: 200 + mask: + - MachineMask + layer: + - MachineLayer + - type: InteractionOutline + - type: ContainerContainer + containers: + storagebase: !type:Container + - type: Damageable + damageContainer: StructuralInorganic + damageModifierSet: Metallic + - type: Destructible + thresholds: + - trigger: + !type:DamageTrigger + damage: 50 + behaviors: + - !type:DoActsBehavior + acts: ["Destruction"] + - !type:PlaySoundBehavior + sound: + collection: MetalBreak + - !type:SpawnEntitiesBehavior + spawn: + SheetSteel1: + min: 1 + max: 2 + - type: StaticPrice + price: 80 + - type: Construction + graph: SecureCabinet + node: securecabinet + +#Empty Secure Cabinet +- type: entity + parent: BaseSecureCabinet + id: SecureCabinet + name: Secure Cabinet + suffix: Empty + components: + - type: Lock + - type: LockVisuals + - type: AccessReader + - type: Sprite + layers: + - state: secure-cabinet + - state: secure-cabinet-open + map: ["openLayer"] + - state: unlocked + shader: unshaded + - state: locked + map: ["enum.LockVisualLayers.Lock"] + shader: unshaded + +#Filled Secure Cabinet +- type: entity + parent: SecureCabinet + id: FilledSecureCabinet + suffix: Filled + categories: [ HideSpawnMenu ] + components: + - type: EntityTableContainerFill + containers: + storagebase: !type:AllSelector + children: + - id: Pen + prob: 0.5 + - id: PaperOffice + amount: !type:RangeNumberSelector + range: 1, 2 + - id: Paper + amount: !type:RangeNumberSelector + range: 1, 2 + - !type:GroupSelector + children: + - id: BoxFolderBlue + - id: BoxFolderRed + - id: BoxFolderYellow + - id: BoxFolderWhite + - id: BoxFolderGrey + - id: BoxFolderBlack + +#Role Secure Cabinets +#Captain +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetCaptain + suffix: Captain + components: + - type: AccessReader + access: [["Captain"]] + +#HeadOfSecurity +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetHoS + suffix: Head Of Security + components: + - type: AccessReader + access: [["HeadOfSecurity"]] + +#HeadOfPersonnel +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetHoP + suffix: Head Of Personnel + components: + - type: AccessReader + access: [["HeadOfPersonnel"]] + +#Logistics Officer (Quartermaster) +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetLO + suffix: Logistics Officer + components: + - type: AccessReader + access: [["Quartermaster"]] + +#ChiefMedicalOfficer +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetCMO + suffix: Chief Medical Officer + components: + - type: AccessReader + access: [["ChiefMedicalOfficer"]] + +#ChiefJustice +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetCJ + suffix: Chief Justice + components: + - type: AccessReader + access: [["ChiefJustice"]] + +#Mystagogue (ResearchDirector) +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetMG + suffix: Mystagogue + components: + - type: AccessReader + access: [["ResearchDirector"]] + +#ChiefEngineer +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetCE + suffix: Chief Engineer + components: + - type: AccessReader + access: [["ChiefEngineer"]] + +#Warden (Armory) +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetWarden + suffix: Warden + components: + - type: AccessReader + access: [["Armory"]] + +#Detective +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetDetective + suffix: Detective + components: + - type: AccessReader + access: [["Detective"]] + +#Reporter +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetReporter + suffix: Reporter + components: + - type: AccessReader + access: [["Reporter"]] + +#Clerk +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetClerk + suffix: Clerk + components: + - type: AccessReader + access: [["Clerk"]] + +#Prosecutor +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetProsecutor + suffix: Prosecutor + components: + - type: AccessReader + access: [["Prosecutor"]] + +#Attorney (Lawyer) +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetAttorney + suffix: Attorney + components: + - type: AccessReader + access: [["Lawyer"]] + + +#Department Secure Cabinets +#Command +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetCommand + suffix: Dept Command + components: + - type: AccessReader + access: [["Command"]] + +#Security +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetSecurity + suffix: Dept Security + components: + - type: AccessReader + access: [["Security"]] + +#Engineering +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetEngineering + suffix: Dept Engineering + components: + - type: AccessReader + access: [["Engineering"]] + +#Medical +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetMedical + suffix: Dept Medical + components: + - type: AccessReader + access: [["Medical"]] + +#Service +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetService + suffix: Dept Service + components: + - type: AccessReader + access: [["Service"]] + +#Logistics (Cargo) +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetLogistics + suffix: Dept Logistics + components: + - type: AccessReader + access: [["Cargo"]] + +#Epistemics (Research) +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetEpistemics + suffix: Dept Epistemics + components: + - type: AccessReader + access: [["Research"]] + +#Justice +- type: entity + parent: FilledSecureCabinet + id: SecureCabinetJustice + suffix: Dept Justice + components: + - type: AccessReader + access: [["Justice"]] diff --git a/Resources/Prototypes/DeltaV/Recipes/Construction/storage.yml b/Resources/Prototypes/DeltaV/Recipes/Construction/storage.yml new file mode 100644 index 0000000000..9592cdc1a9 --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Construction/storage.yml @@ -0,0 +1,17 @@ +#bureaucracy +- type: construction + id: SecureCabinet + name: secure cabinet + description: A secure cabinet to keep all your confidential files. + graph: SecureCabinet + startNode: start + targetNode: securecabinet + category: construction-category-storage + icon: + sprite: DeltaV/Structures/Storage/secure_cabinet.rsi + state: secure-cabinet + objectType: Structure + placementMode: SnapgridCenter + canBuildInImpassable: false + conditions: + - !type:TileNotBlocked diff --git a/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/SecureCabinet/secure_cabinet.yml b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/SecureCabinet/secure_cabinet.yml new file mode 100644 index 0000000000..2f4fcbce8e --- /dev/null +++ b/Resources/Prototypes/DeltaV/Recipes/Crafting/Graphs/SecureCabinet/secure_cabinet.yml @@ -0,0 +1,34 @@ +- type: constructionGraph + id: SecureCabinet + start: start + graph: + - node: start + edges: + - to: securecabinet + steps: + - material: Steel + amount: 5 + - material: Cable + amount: 2 + doAfter: 5 + - node: securecabinet + entity: SecureCabinet + edges: + - to: start + steps: + - tool: Screwing + doAfter: 5 + conditions: + - !type:StorageWelded + welded: false + - !type:Locked + locked: false + completed: + - !type:SpawnPrototype + prototype: SheetSteel1 + amount: 5 + - !type:SpawnPrototype + prototype: CableApcStack1 + amount: 2 + - !type:EmptyAllContainers + - !type:DeleteEntity diff --git a/Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/locked.png b/Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/locked.png new file mode 100644 index 0000000000000000000000000000000000000000..658726b3da18ba7d0606653a45dc1ecbcc340495 GIT binary patch literal 122 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE1|*BCs=fdzM^6{Wkch)?FK!eBN;qH4$UiT) z<3GzTc3bWnI~dB#{#{?HxYL=5VS&O~o3nqOo($?)2_gx6#A8o2twsv)&Y5)KL07*qo IM6N<$g8Hs*;Q#;t literal 0 HcmV?d00001 diff --git a/Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/secure-cabinet.png b/Resources/Textures/DeltaV/Structures/Storage/secure_cabinet.rsi/secure-cabinet.png new file mode 100644 index 0000000000000000000000000000000000000000..de8306e0b8a49232099665ba374613f9fba6204a GIT binary patch literal 533 zcmV+w0_y#VP)Bd8b1id3-)Qg*Dmn@ey4HoXCd;0zq4;t+V(6_pT3tPqk#vT%jss-=rI zQ9v!RAuVl3vi!-|Z#;f8c7QXBSM`EK!~nbic$HFa@h_y;>v^_%wz^J7Kt#v7(w9=2 zLkcw;@J^=#V~i6rV+@nYBrV(I#kr67+YKP1>$4glrF=Sx0{~!*0b|Sw*p@S;1_&WA zo6U~ey%6Gb1J>&`q9{U=Bu?PXW)t)I{B#2VAW0G!W1zJL0C3L17~2^u3g_I~;F|4@ zwAPR}54gKe@kj(A1hm%ZcDqnYAqaxJ9*ss;?yn>Y_Q91>PV=ojz&Qu4Zt+O(?QCp3 z9)GIql!yj{!Q~f8q*hF=LI?;U@{lZ!6^l#AdKQ^%+iJD2TrQnlo6V6@dPg4t5nUDg zQ50db*&GC}*Xvf{XGKCO<#Vy0frnv;Mx(J)!Z6&?sg#6in(ovYGb5wss;dM;J)wYY1#TI^f9NhJa85g?#qvpkcj*rA>n~A zOo{0GNqE2m7yEC6s-?^WubBs2E|_2QV^VexScl1;Y))-GS?i7dTmIr`r N22WQ%mvv4FO#oJxC1n5r literal 0 HcmV?d00001