Make ItemCabinet use ItemSlots (#4771)

* pda slot names

* cabinets use item slots

* fix yaml

* fix tests
This commit is contained in:
Leon Friedrich
2021-10-06 08:55:45 +11:00
committed by GitHub
parent d2748d1e59
commit 6f50dd2f7b
14 changed files with 164 additions and 277 deletions

View File

@@ -35,12 +35,13 @@
type: UplinkBoundUserInterface
- type: ItemSlots
slots:
pda_pen_slot:
pdaPenSlot:
item: "Pen"
whitelist:
tags:
- Write
pda_id_slot:
pdaIdSlot:
name: ID Card
insertSound:
path: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
ejectSound:

View File

@@ -20,14 +20,17 @@
- type: ItemCabinet
doorSound:
path: /Audio/Machines/machine_switch.ogg
whitelist:
components:
- FireExtinguisher
- type: Appearance
visuals:
- type: ItemCabinetVisualizer
openState: open
closedState: closed
- type: ItemSlots
slots:
cabinetSlot:
whitelist:
components:
- FireExtinguisher
placement:
mode: SnapgridCenter
@@ -44,8 +47,15 @@
parent: ExtinguisherCabinet
suffix: Filled
components:
- type: ItemCabinet
spawnPrototype: FireExtinguisher
- type: ItemCabinet
spawnPrototype: FireExtinguisher
- type: ItemSlots
slots:
cabinetSlot:
item: FireExtinguisher
whitelist:
components:
- FireExtinguisher
- type: entity
id: ExtinguisherCabinetFilledOpen

View File

@@ -18,14 +18,17 @@
- type: ItemCabinet
doorSound:
path: /Audio/Machines/machine_switch.ogg
whitelist:
tags:
- FireAxe
- type: Appearance
visuals:
- type: ItemCabinetVisualizer
closedState: glass
openState: glass-up
- type: ItemSlots
slots:
cabinetSlot:
whitelist:
tags:
- FireAxe
placement:
mode: SnapgridCenter
@@ -42,8 +45,14 @@
parent: FireAxeCabinet
suffix: Filled
components:
- type: ItemCabinet
spawnPrototype: FireAxe
- type: ItemCabinet
- type: ItemSlots
slots:
cabinetSlot:
item: FireAxe
whitelist:
tags:
- FireAxe
- type: entity
id: FireAxeCabinetFilledOpen