]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Lockable Buttons & Button Frames (#25631)
authorrosieposie <52761126+rosieposieeee@users.noreply.github.com>
Tue, 27 Feb 2024 07:57:17 +0000 (02:57 -0500)
committerGitHub <noreply@github.com>
Tue, 27 Feb 2024 07:57:17 +0000 (00:57 -0700)
initial commit

Resources/Prototypes/Entities/Structures/Wallmounts/switch.yml
Resources/Textures/Structures/Wallmounts/locked_switch.rsi/base.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/locked_switch.rsi/locked.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/locked_switch.rsi/meta.json [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/locked_switch.rsi/unlocked.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution_security.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/switch_frame.rsi/exit.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/switch_frame.rsi/grey.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/switch_frame.rsi/janitor.png [new file with mode: 0644]
Resources/Textures/Structures/Wallmounts/switch_frame.rsi/meta.json [new file with mode: 0644]

index f08a229ff7998dd679a36324e5fed16ea6314dea..8d80e9d5a9a3428abee9d7c265c58a626c5e49be 100644 (file)
   - type: Construction
     graph: LightSwitchDirectionalGraph
     node: LightSwitchDirectionalNode
+
+# lockable buttons
+
+- type: entity
+  id: LockableButton
+  name: lockable button
+  parent: SignalButtonDirectional
+  noSpawn: true
+  components:
+  - type: Appearance
+  - type: Lock
+  - type: LockVisuals
+  - type: AccessReader
+  - type: Sprite
+    drawdepth: WallMountedItems
+    sprite: Structures/Wallmounts/locked_switch.rsi
+    layers:
+    - state: base
+    - state: locked
+      map: ["enum.LockVisualLayers.Lock"]
+      shader: unshaded
+
+- type: entity
+  id: LockableButtonCaptain
+  name: lockable button
+  suffix: Captain
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Captain"]]
+
+- type: entity
+  id: LockableButtonHeadOfPersonnel
+  name: lockable button
+  suffix: HeadOfPersonnel
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["HeadOfPersonnel"]]
+
+- type: entity
+  id: LockableButtonChiefEngineer
+  name: lockable button
+  suffix: ChiefEngineer
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["ChiefEngineer"]]
+
+- type: entity
+  id: LockableButtonChiefMedicalOfficer
+  name: lockable button
+  suffix: ChiefMedicalOfficer
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["ChiefMedicalOfficer"]]
+
+- type: entity
+  id: LockableButtonHeadOfSecurity
+  name: lockable button
+  suffix: HeadOfSecurity
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["HeadOfSecurity"]]
+
+- type: entity
+  id: LockableButtonResearchDirector
+  name: lockable button
+  suffix: ResearchDirector
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["ResearchDirector"]]
+
+- type: entity
+  id: LockableButtonCommand
+  name: lockable button
+  suffix: Command
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Command"]]
+
+- type: entity
+  id: LockableButtonCryogenics
+  name: lockable button
+  suffix: Cryogenics
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Cryogenics"]]
+
+- type: entity
+  id: LockableButtonSecurity
+  name: lockable button
+  suffix: Security
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Security"]]
+
+- type: entity
+  id: LockableButtonDetective
+  name: lockable button
+  suffix: Detective
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Detective"]]
+
+- type: entity
+  id: LockableButtonArmory
+  name: lockable button
+  suffix: Armory
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Armory"]]
+
+- type: entity
+  id: LockableButtonBrig
+  name: lockable button
+  suffix: Brig
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Brig"]]
+
+- type: entity
+  id: LockableButtonLawyer
+  name: lockable button
+  suffix: Lawyer
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Lawyer"]]
+
+- type: entity
+  id: LockableButtonEngineering
+  name: lockable button
+  suffix: Engineering
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Engineering"]]
+
+- type: entity
+  id: LockableButtonMedical
+  name: lockable button
+  suffix: Medical
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Medical"]]
+
+- type: entity
+  id: LockableButtonQuartermaster
+  name: lockable button
+  suffix: Quartermaster
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Quartermaster"]]
+
+- type: entity
+  id: LockableButtonSalvage
+  name: lockable button
+  suffix: Salvage
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Salvage"]]
+
+- type: entity
+  id: LockableButtonCargo
+  name: lockable button
+  suffix: Cargo
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Cargo"]]
+
+- type: entity
+  id: LockableButtonResearch
+  name: lockable button
+  suffix: Research
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Research"]]
+
+- type: entity
+  id: LockableButtonService
+  name: lockable button
+  suffix: Service
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Service"]]
+
+- type: entity
+  id: LockableButtonMaintenance
+  name: lockable button
+  suffix: Maintenance
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Maintenance"]]
+
+- type: entity
+  id: LockableButtonExternal
+  name: lockable button
+  suffix: External
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["External"]]
+
+- type: entity
+  id: LockableButtonJanitor
+  name: lockable button
+  suffix: Janitor
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Janitor"]]
+
+- type: entity
+  id: LockableButtonTheatre
+  name: lockable button
+  suffix: Theatre
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Theatre"]]
+
+- type: entity
+  id: LockableButtonBar
+  name: lockable button
+  suffix: Bar
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Bar"]]
+
+- type: entity
+  id: LockableButtonChemistry
+  name: lockable button
+  suffix: Chemistry
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Chemistry"]]
+
+- type: entity
+  id: LockableButtonKitchen
+  name: lockable button
+  suffix: Kitchen
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Kitchen"]]
+
+- type: entity
+  id: LockableButtonChapel
+  name: lockable button
+  suffix: Chapel
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Chapel"]]
+
+- type: entity
+  id: LockableButtonHydroponics
+  name: lockable button
+  suffix: Hydroponics
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Hydroponics"]]
+
+- type: entity
+  id: LockableButtonAtmospherics
+  name: lockable button
+  suffix: Atmospherics
+  parent: LockableButton
+  components:
+  - type: AccessReader
+    access: [["Atmospherics"]]
+
+# button frames
+
+- type: entity
+  id: ButtonFrame
+  name: button frame
+  noSpawn: true
+  description: It's a frame to help distinguish switches visually.
+  placement:
+    mode: SnapgridCenter
+    snap:
+    - Wallmount
+  components:
+  - type: Clickable
+  - type: WallMount
+    arc: 360
+  - type: Physics
+    canCollide: false
+  - type: Sprite
+    drawdepth: SmallObjects
+    sprite: Structures/Wallmounts/switch_frame.rsi
+    state: grey
+  - type: Rotatable
+  - type: Fixtures
+
+- type: entity
+  id: ButtonFrameGrey
+  parent: ButtonFrame
+  suffix: grey
+  components:
+  - type: Sprite
+    drawdepth: SmallObjects
+    sprite: Structures/Wallmounts/switch_frame.rsi
+    state: grey
+
+- type: entity
+  id: ButtonFrameCaution
+  parent: ButtonFrame
+  suffix: caution
+  components:
+  - type: Sprite
+    drawdepth: SmallObjects
+    sprite: Structures/Wallmounts/switch_frame.rsi
+    state: caution
+
+- type: entity
+  id: ButtonFrameCautionSecurity
+  parent: ButtonFrame
+  suffix: caution
+  components:
+  - type: Sprite
+    drawdepth: SmallObjects
+    sprite: Structures/Wallmounts/switch_frame.rsi
+    state: caution_security
+
+- type: entity
+  id: ButtonFrameExit
+  parent: ButtonFrame
+  suffix: exit
+  components:
+  - type: Sprite
+    drawdepth: SmallObjects
+    sprite: Structures/Wallmounts/switch_frame.rsi
+    state: exit
+
+- type: entity
+  id: ButtonFrameJanitor
+  parent: ButtonFrame
+  suffix: janitor
+  components:
+  - type: Sprite
+    drawdepth: SmallObjects
+    sprite: Structures/Wallmounts/switch_frame.rsi
+    state: janitor
diff --git a/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/base.png b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/base.png
new file mode 100644 (file)
index 0000000..cdee551
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/base.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/locked.png b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/locked.png
new file mode 100644 (file)
index 0000000..ae53cbd
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/locked.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/meta.json b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/meta.json
new file mode 100644 (file)
index 0000000..2279c5b
--- /dev/null
@@ -0,0 +1,65 @@
+{
+  "version": 1,
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Taken from CEV-Eris at commit 15748b71a1e6d2c547588c653d7c42f18011f7c5, modified by ThunderBear2006 (github) for Space Station 14, modified further by rosieposieeee (github)",
+  "states": [
+    {
+      "name": "base",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    },
+    {
+      "name": "locked",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    },
+    {
+      "name": "unlocked",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    }
+  ]
+}
diff --git a/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/unlocked.png b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/unlocked.png
new file mode 100644 (file)
index 0000000..a20016c
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/locked_switch.rsi/unlocked.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution.png b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution.png
new file mode 100644 (file)
index 0000000..56793d7
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution_security.png b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution_security.png
new file mode 100644 (file)
index 0000000..cfcb8b4
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/caution_security.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/exit.png b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/exit.png
new file mode 100644 (file)
index 0000000..faec1fc
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/exit.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/grey.png b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/grey.png
new file mode 100644 (file)
index 0000000..e35e9db
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/grey.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/janitor.png b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/janitor.png
new file mode 100644 (file)
index 0000000..f24cf20
Binary files /dev/null and b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/janitor.png differ
diff --git a/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/meta.json b/Resources/Textures/Structures/Wallmounts/switch_frame.rsi/meta.json
new file mode 100644 (file)
index 0000000..55198fa
--- /dev/null
@@ -0,0 +1,100 @@
+{
+  "version": 1,
+  "size": {
+    "x": 32,
+    "y": 32
+  },
+  "license": "CC-BY-SA-3.0",
+  "copyright": "Made by rosieposieeee (github)",
+  "states": [
+    {
+      "name": "grey",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    },{
+        "name": "exit",
+        "directions": 4,
+        "delays": [
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
+            1
+          ],
+          [
+            1
+          ]
+        ]
+      },
+    {
+      "name": "caution",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    },
+    {
+      "name": "caution_security",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    },
+    {
+      "name": "janitor",
+      "directions": 4,
+      "delays": [
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ],
+        [
+          1
+        ]
+      ]
+    }
+  ]
+}