ECS ComputerVisualizer (#13289)

This commit is contained in:
AJCM-git
2023-01-15 00:01:47 -04:00
committed by GitHub
parent 0875865d6d
commit 6211ea7064
11 changed files with 523 additions and 591 deletions

View File

@@ -1,79 +0,0 @@
using Content.Shared.Computer;
using JetBrains.Annotations;
using Robust.Client.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Client.Computer
{
[UsedImplicitly]
public sealed class ComputerVisualizer : AppearanceVisualizer
{
[DataField("key")]
private string KeyboardState = "generic_key";
[DataField("screen")]
private string ScreenState = "generic";
[DataField("body")]
private string BodyState = "computer";
[DataField("bodyBroken")]
private string BodyBrokenState = "broken";
private string ScreenBroken = "computer_broken";
[Obsolete("Subscribe to your component being initialised instead.")]
public override void InitializeEntity(EntityUid entity)
{
base.InitializeEntity(entity);
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<SpriteComponent>(entity, out var sprite)) return;
sprite.LayerSetState(Layers.Screen, ScreenState);
if (!string.IsNullOrEmpty(KeyboardState))
{
sprite.LayerSetState(Layers.Keyboard, $"{KeyboardState}_off");
sprite.LayerSetState(Layers.KeyboardOn, KeyboardState);
}
}
[Obsolete("Subscribe to AppearanceChangeEvent instead.")]
public override void OnChangeData(AppearanceComponent component)
{
base.OnChangeData(component);
if (!IoCManager.Resolve<IEntityManager>().TryGetComponent<SpriteComponent>(component.Owner, out var sprite)) return;
if (!component.TryGetData(ComputerVisuals.Powered, out bool powered))
{
powered = true;
}
component.TryGetData(ComputerVisuals.Broken, out bool broken);
if (broken)
{
sprite.LayerSetState(Layers.Body, BodyBrokenState);
sprite.LayerSetState(Layers.Screen, ScreenBroken);
}
else
{
sprite.LayerSetState(Layers.Body, BodyState);
sprite.LayerSetState(Layers.Screen, ScreenState);
}
sprite.LayerSetVisible(Layers.Screen, powered);
if (sprite.LayerMapTryGet(Layers.KeyboardOn, out _))
{
sprite.LayerSetVisible(Layers.KeyboardOn, powered);
}
}
public enum Layers : byte
{
Body,
Screen,
Keyboard,
KeyboardOn
}
}
}

View File

@@ -5,10 +5,6 @@ namespace Content.Shared.Computer
[Serializable, NetSerializable] [Serializable, NetSerializable]
public enum ComputerVisuals : byte public enum ComputerVisuals : byte
{ {
// Bool Powered
Powered,
// Bool
Broken
} }
} }

View File

@@ -16,21 +16,13 @@
- type: Sprite - type: Sprite
sprite: Structures/Machines/arcade.rsi sprite: Structures/Machines/arcade.rsi
layers: layers:
- state: arcade - map: ["computerLayerBody"]
map: ["enum.ComputerVisualizer+Layers.Body"] state: arcade
- state: invaders - map: ["computerLayerScreen"]
shader: unshaded state: invaders
map: ["enum.ComputerVisualizer+Layers.Screen"]
- type: Icon - type: Icon
sprite: Structures/Machines/arcade.rsi sprite: Structures/Machines/arcade.rsi
state: arcade state: arcade
- type: Appearance
visuals:
- type: ComputerVisualizer
screen: invaders
key: ""
body: arcade
bodyBroken: arcade
- type: Anchorable - type: Anchorable
- type: Pullable - type: Pullable
- type: StaticPrice - type: StaticPrice
@@ -38,6 +30,7 @@
- type: entity - type: entity
id: SpaceVillainArcade id: SpaceVillainArcade
name: space villain arcade
parent: ArcadeBase parent: ArcadeBase
components: components:
- type: SpaceVillainArcade - type: SpaceVillainArcade
@@ -72,6 +65,13 @@
name: NT block game name: NT block game
parent: ArcadeBase parent: ArcadeBase
components: components:
- type: Sprite
sprite: Structures/Machines/arcade.rsi
layers:
- map: ["computerLayerBody"]
state: arcade
- map: ["computerLayerScreen"]
state: blockgame
- type: BlockGameArcade - type: BlockGameArcade
- type: ActivatableUI - type: ActivatableUI
key: enum.BlockGameUiKey.Key key: enum.BlockGameUiKey.Key
@@ -87,10 +87,3 @@
type: WiresBoundUserInterface type: WiresBoundUserInterface
- type: Computer - type: Computer
board: BlockGameArcadeComputerCircuitboard board: BlockGameArcadeComputerCircuitboard
- type: Appearance
visuals:
- type: ComputerVisualizer
screen: blockgame
key: ""
body: arcade
bodyBroken: arcade

View File

@@ -1,5 +1,4 @@
- type: entity - type: entity
abstract: true
parent: ComputerFrame parent: ComputerFrame
id: BaseComputer id: BaseComputer
name: computer name: computer
@@ -23,21 +22,24 @@
sprite: Structures/Machines/computers.rsi sprite: Structures/Machines/computers.rsi
netsync: false netsync: false
layers: layers:
- state: computer - map: ["computerLayerBody"]
map: ["enum.ComputerVisualizer+Layers.Body"] state: computer
- state: generic_key_off - map: ["computerLayerKeyboard"]
map: ["enum.ComputerVisualizer+Layers.Keyboard"] state: generic_keyboard
- state: generic - map: ["computerLayerScreen"]
shader: unshaded state: generic
map: ["enum.ComputerVisualizer+Layers.Screen"] - map: ["computerLayerKeys"]
- state: generic_key state: generic_keys
shader: unshaded
map: ["enum.ComputerVisualizer+Layers.KeyboardOn"]
- type: Appearance - type: Appearance
- type: GenericVisualizer
visuals: visuals:
- type: ComputerVisualizer enum.ComputerVisuals.Powered:
key: generic_key computerLayerScreen:
screen: generic True: { visible: true, shader: unshaded }
False: { visible: false }
computerLayerKeys:
True: { visible: true, shader: unshaded }
False: { visible: true, shader: shaded }
- type: LitOnPowered - type: LitOnPowered
- type: PointLight - type: PointLight
radius: 1.5 radius: 1.5

View File

@@ -4,14 +4,18 @@
name: alerts computer name: alerts computer
description: Used to access the station's automated alert system. description: Used to access the station's automated alert system.
components: components:
- type: Appearance
visuals:
- type: ComputerVisualizer
key: atmos_key
screen: "alert-2"
- type: Computer - type: Computer
board: AlertsComputerCircuitboard board: AlertsComputerCircuitboard
- type: Sprite - type: Sprite
layers:
- map: ["computerLayerBody"]
state: computer
- map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: alert-2
- map: ["computerLayerKeys"]
state: atmos_key
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
@@ -43,22 +47,20 @@
description: Used to pilot a shuttle. description: Used to pilot a shuttle.
abstract: true abstract: true
components: components:
- type: ShuttleConsole - type: ShuttleConsole
- type: ActivatableUI - type: ActivatableUI
key: enum.ShuttleConsoleUiKey.Key key: enum.ShuttleConsoleUiKey.Key
- type: ActivatableUIRequiresPower - type: UserInterface
- type: UserInterface interfaces:
interfaces: - key: enum.ShuttleConsoleUiKey.Key
- key: enum.ShuttleConsoleUiKey.Key type: ShuttleConsoleBoundUserInterface
type: ShuttleConsoleBoundUserInterface - type: RadarConsole
- type: RadarConsole - type: PointLight
- type: ExtensionCableReceiver radius: 1.5
- type: PointLight energy: 1.6
radius: 1.5 color: "#43ccb5"
energy: 1.6 - type: Rotatable
color: "#43ccb5" rotateWhileAnchored: true
- type: Rotatable
rotateWhileAnchored: true
- type: entity - type: entity
parent: BaseComputerShuttle parent: BaseComputerShuttle
@@ -66,13 +68,18 @@
name: shuttle console name: shuttle console
description: Used to pilot a shuttle. description: Used to pilot a shuttle.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: generic_key state: computer
screen: shuttle - map: ["computerLayerKeyboard"]
- type: Computer state: generic_keyboard
board: ShuttleConsoleCircuitboard - map: ["computerLayerScreen"]
state: shuttle
- map: ["computerLayerKeys"]
state: generic_keys
- type: Computer
board: ShuttleConsoleCircuitboard
- type: entity - type: entity
parent: BaseComputerShuttle parent: BaseComputerShuttle
@@ -80,22 +87,27 @@
name: syndicate shuttle console name: syndicate shuttle console
description: Used to pilot a syndicate shuttle. description: Used to pilot a syndicate shuttle.
components: components:
- type: Tag - type: Sprite
tags: layers:
- Syndicate - map: ["computerLayerBody"]
- type: Appearance state: computer
visuals: - map: ["computerLayerKeyboard"]
- type: ComputerVisualizer state: generic_keyboard
key: syndie_key - map: ["computerLayerScreen"]
screen: syndishuttle state: syndishuttle
- type: RadarConsole - map: ["computerLayerKeys"]
maxRange: 1536 state: syndie_key
- type: PointLight - type: Tag
radius: 1.5 tags:
energy: 1.6 - Syndicate
color: "#c94242" - type: RadarConsole
- type: Computer maxRange: 1536
board: SyndicateShuttleConsoleCircuitboard - type: PointLight
radius: 1.5
energy: 1.6
color: "#c94242"
- type: Computer
board: SyndicateShuttleConsoleCircuitboard
- type: entity - type: entity
parent: BaseComputerShuttle parent: BaseComputerShuttle
@@ -103,20 +115,25 @@
name: cargo shuttle console name: cargo shuttle console
description: Used to pilot the cargo shuttle. description: Used to pilot the cargo shuttle.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: generic_key state: computer
screen: shuttle - map: ["computerLayerKeyboard"]
- type: CargoPilotConsole state: generic_keyboard
- type: RadarConsole - map: ["computerLayerScreen"]
maxRange: 256 state: shuttle
- type: PointLight - map: ["computerLayerKeys"]
radius: 1.5 state: generic_keys
energy: 1.6 - type: CargoPilotConsole
color: "#c94242" - type: RadarConsole
- type: Computer maxRange: 256
board: CargoShuttleConsoleCircuitboard - type: PointLight
radius: 1.5
energy: 1.6
color: "#c94242"
- type: Computer
board: CargoShuttleConsoleCircuitboard
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
@@ -124,29 +141,24 @@
name: IFF computer name: IFF computer
description: Allows you to control the IFF characteristics of this vessel. description: Allows you to control the IFF characteristics of this vessel.
components: components:
- type: IFFConsole - type: IFFConsole
- type: Sprite - type: Sprite
layers: layers:
- map: [ "enum.ComputerVisualizer+Layers.KeyboardOn" ] - map: ["computerLayerBody"]
visible: false state: computer
- map: [ "enum.ComputerVisualizer+Layers.Keyboard" ] - map: ["computerLayerKeyboard"]
visible: false state: generic_keyboard
- map: [ "enum.ComputerVisualizer+Layers.Body" ] - map: ["computerLayerScreen"]
state: computer sprite: Structures/Shuttles/iff.rsi
- map: [ "enum.ComputerVisualizer+Layers.Screen" ] state: helm
sprite: Structures/Shuttles/iff.rsi - map: ["computerLayerKeys"]
state: helm state: generic_keys
shader: unshaded - type: ActivatableUI
- type: Appearance key: enum.IFFConsoleUiKey.Key
visuals: - type: UserInterface
- type: ComputerVisualizer interfaces:
screen: helm - key: enum.IFFConsoleUiKey.Key
- type: ActivatableUI type: IFFConsoleBoundUserInterface
key: enum.IFFConsoleUiKey.Key
- type: UserInterface
interfaces:
- key: enum.IFFConsoleUiKey.Key
type: IFFConsoleBoundUserInterface
- type: entity - type: entity
parent: ComputerIFF parent: ComputerIFF
@@ -155,32 +167,16 @@
suffix: Syndicate suffix: Syndicate
description: Allows you to control the IFF and stealth characteristics of this vessel. description: Allows you to control the IFF and stealth characteristics of this vessel.
components: components:
- type: IFFConsole - type: IFFConsole
allowedFlags: allowedFlags:
- Hide - Hide
- HideLabel - HideLabel
- type: Sprite - type: ActivatableUI
layers: key: enum.IFFConsoleUiKey.Key
- map: [ "enum.ComputerVisualizer+Layers.KeyboardOn" ] - type: UserInterface
visible: false interfaces:
- map: [ "enum.ComputerVisualizer+Layers.Keyboard" ] - key: enum.IFFConsoleUiKey.Key
visible: false type: IFFConsoleBoundUserInterface
- map: [ "enum.ComputerVisualizer+Layers.Body" ]
state: computer
- map: [ "enum.ComputerVisualizer+Layers.Screen" ]
sprite: Structures/Shuttles/iff.rsi
state: helm
shader: unshaded
- type: Appearance
visuals:
- type: ComputerVisualizer
screen: helm
- type: ActivatableUI
key: enum.IFFConsoleUiKey.Key
- type: UserInterface
interfaces:
- key: enum.IFFConsoleUiKey.Key
type: IFFConsoleBoundUserInterface
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
@@ -188,11 +184,16 @@
name: power monitoring computer name: power monitoring computer
description: It monitors power levels across the station. description: It monitors power levels across the station.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: power_key state: computer
screen: power_monitor - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: power_monitor
- map: ["computerLayerKeys"]
state: power_key
- type: PointLight - type: PointLight
radius: 1.5 radius: 1.5
energy: 1.6 energy: 1.6
@@ -219,11 +220,16 @@
name: medical records computer name: medical records computer
description: This can be used to check medical records. description: This can be used to check medical records.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: med_key state: computer
screen: medcomp - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: medcomp
- map: ["computerLayerKeys"]
state: med_key
- type: PointLight - type: PointLight
radius: 1.5 radius: 1.5
energy: 1.6 energy: 1.6
@@ -237,11 +243,16 @@
name: criminal records computer name: criminal records computer
description: This can be used to check criminal records. description: This can be used to check criminal records.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: security_key state: computer
screen: explosive - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: explosive
- map: ["computerLayerKeys"]
state: security_key
- type: PointLight - type: PointLight
radius: 1.5 radius: 1.5
energy: 1.6 energy: 1.6
@@ -255,19 +266,19 @@
name: station records computer name: station records computer
description: This can be used to check station records. description: This can be used to check station records.
components: components:
- type: GeneralStationRecordConsole - type: GeneralStationRecordConsole
- type: UserInterface - type: UserInterface
interfaces: interfaces:
- key: enum.GeneralStationRecordConsoleKey.Key - key: enum.GeneralStationRecordConsoleKey.Key
type: GeneralStationRecordConsoleBoundUserInterface type: GeneralStationRecordConsoleBoundUserInterface
- type: ActivatableUI - type: ActivatableUI
key: enum.GeneralStationRecordConsoleKey.Key key: enum.GeneralStationRecordConsoleKey.Key
- type: PointLight - type: PointLight
radius: 1.5 radius: 1.5
energy: 1.6 energy: 1.6
color: "#1f8c28" color: "#1f8c28"
- type: Computer - type: Computer
board: CriminalRecordsComputerCircuitboard board: CriminalRecordsComputerCircuitboard
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
@@ -275,29 +286,34 @@
name: crew monitoring console name: crew monitoring console
description: Used to monitor active health sensors built into most of the crew's uniforms. description: Used to monitor active health sensors built into most of the crew's uniforms.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: med_key state: computer
screen: crew - map: ["computerLayerKeyboard"]
- type: PointLight state: generic_keyboard
radius: 1.5 - map: ["computerLayerScreen"]
energy: 1.6 state: crew
color: "#006400" - map: ["computerLayerKeys"]
- type: Computer state: med_key
board: CrewMonitoringComputerCircuitboard - type: PointLight
- type: ActivatableUI radius: 1.5
key: enum.CrewMonitoringUIKey.Key energy: 1.6
- type: UserInterface color: "#006400"
interfaces: - type: Computer
board: CrewMonitoringComputerCircuitboard
- type: ActivatableUI
key: enum.CrewMonitoringUIKey.Key
- type: UserInterface
interfaces:
- key: enum.CrewMonitoringUIKey.Key - key: enum.CrewMonitoringUIKey.Key
type: CrewMonitoringBoundUserInterface type: CrewMonitoringBoundUserInterface
- type: CrewMonitoringConsole - type: CrewMonitoringConsole
- type: DeviceNetwork - type: DeviceNetwork
deviceNetId: Wireless deviceNetId: Wireless
receiveFrequencyId: SuitSensor receiveFrequencyId: SuitSensor
- type: WirelessNetworkConnection - type: WirelessNetworkConnection
range: 500 range: 500
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
@@ -305,11 +321,16 @@
name: R&D computer name: R&D computer
description: A computer used to interface with R&D tools. description: A computer used to interface with R&D tools.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: rd_key state: computer
screen: rdcomp - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: rdcomp
- map: ["computerLayerKeys"]
state: rd_key
- type: ResearchClient - type: ResearchClient
- type: ResearchConsole - type: ResearchConsole
- type: TechnologyDatabase - type: TechnologyDatabase
@@ -337,11 +358,16 @@
name: analysis console name: analysis console
description: A computer used to interface with the artifact analyzer. description: A computer used to interface with the artifact analyzer.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: tech_key state: computer
screen: artifact - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: artifact
- map: ["computerLayerKeys"]
state: tech_key
- type: ResearchClient - type: ResearchClient
- type: AnalysisConsole - type: AnalysisConsole
- type: DeviceList - type: DeviceList
@@ -403,11 +429,16 @@
- key: enum.IdCardConsoleUiKey.Key - key: enum.IdCardConsoleUiKey.Key
type: IdCardConsoleBoundUserInterface type: IdCardConsoleBoundUserInterface
- type: CrewManifestViewer - type: CrewManifestViewer
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: id_key state: computer
screen: id - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: id
- map: ["computerLayerKeys"]
state: id_key
- type: Computer - type: Computer
board: IDComputerCircuitboard board: IDComputerCircuitboard
- type: PointLight - type: PointLight
@@ -437,11 +468,6 @@
interfaces: interfaces:
- key: enum.BodyScannerUiKey.Key - key: enum.BodyScannerUiKey.Key
type: BodyScannerBoundUserInterface type: BodyScannerBoundUserInterface
- type: Appearance
visuals:
- type: ComputerVisualizer
key: generic_key
screen: generic
- type: ApcPowerReceiver - type: ApcPowerReceiver
powerLoad: 500 powerLoad: 500
- type: Computer - type: Computer
@@ -457,11 +483,16 @@
name: communications computer name: communications computer
description: This can be used for various important functions. Still under development. description: This can be used for various important functions. Still under development.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: generic_key state: computer
screen: comm - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: comm
- map: ["computerLayerKeys"]
state: generic_keys
- type: AccessReader - type: AccessReader
access: [[ "Command" ]] access: [[ "Command" ]]
- type: CommunicationsConsole - type: CommunicationsConsole
@@ -485,11 +516,16 @@
name: syndicate communications computer name: syndicate communications computer
description: This can be used for various important functions. Still under development. description: This can be used for various important functions. Still under development.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: syndie_key state: computer
screen: comm_syndie - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: comm_syndie
- map: ["computerLayerKeys"]
state: syndie_key
- type: AccessReader - type: AccessReader
access: [[ "NuclearOperative" ]] access: [[ "NuclearOperative" ]]
- type: CommunicationsConsole - type: CommunicationsConsole
@@ -511,11 +547,16 @@
name: solar control computer name: solar control computer
description: A controller for solar panel arrays. description: A controller for solar panel arrays.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: generic_key state: computer
screen: solar_screen - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: solar_screen
- map: ["computerLayerKeys"]
state: generic_keys
- type: SolarControlConsole - type: SolarControlConsole
- type: ActivatableUI - type: ActivatableUI
key: enum.SolarControlConsoleUiKey.Key key: enum.SolarControlConsoleUiKey.Key
@@ -533,31 +574,35 @@
tags: tags:
- DroneUsable - DroneUsable
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
id: ComputerRadar id: ComputerRadar
name: mass scanner computer name: mass scanner computer
description: A computer for detecting nearby bodies, displaying them by position and mass. description: A computer for detecting nearby bodies, displaying them by position and mass.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: generic_key state: computer
screen: solar_screen - map: ["computerLayerKeyboard"]
- type: RadarConsole state: generic_keyboard
- type: ActivatableUI - map: ["computerLayerScreen"]
key: enum.RadarConsoleUiKey.Key state: solar_screen
- type: UserInterface - map: ["computerLayerKeys"]
interfaces: state: generic_keys
- key: enum.RadarConsoleUiKey.Key - type: RadarConsole
type: RadarConsoleBoundUserInterface - type: ActivatableUI
- type: Computer key: enum.RadarConsoleUiKey.Key
board: RadarConsoleCircuitboard - type: UserInterface
- type: PointLight interfaces:
radius: 1.5 - key: enum.RadarConsoleUiKey.Key
energy: 1.6 type: RadarConsoleBoundUserInterface
color: "#e6e227" - type: Computer
board: RadarConsoleCircuitboard
- type: PointLight
radius: 1.5
energy: 1.6
color: "#e6e227"
- type: entity - type: entity
id: ComputerCargoShuttle id: ComputerCargoShuttle
@@ -565,11 +610,16 @@
name: cargo shuttle computer name: cargo shuttle computer
description: Used to order the shuttle. description: Used to order the shuttle.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: tech_key state: computer
screen: supply - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: supply
- map: ["computerLayerKeys"]
state: tech_key
- type: CargoShuttleConsole - type: CargoShuttleConsole
- type: ActivatableUI - type: ActivatableUI
key: enum.CargoConsoleUiKey.Shuttle key: enum.CargoConsoleUiKey.Shuttle
@@ -592,11 +642,16 @@
name: cargo request computer name: cargo request computer
description: Used to order supplies and approve requests. description: Used to order supplies and approve requests.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: tech_key state: computer
screen: request - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: request
- map: ["computerLayerKeys"]
state: tech_key
- type: CargoOrderConsole - type: CargoOrderConsole
- type: ActivatableUI - type: ActivatableUI
key: enum.CargoConsoleUiKey.Orders key: enum.CargoConsoleUiKey.Orders
@@ -623,11 +678,16 @@
- type: DeviceList - type: DeviceList
- type: DeviceNetwork - type: DeviceNetwork
deviceNetId: Wired deviceNetId: Wired
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: generic_key state: computer
screen: dna - map: ["computerLayerKeyboard"]
state: generic_keyboard
- map: ["computerLayerScreen"]
state: dna
- map: ["computerLayerKeys"]
state: generic_keys
- type: ApcPowerReceiver - type: ApcPowerReceiver
powerLoad: 3100 #We want this to fail first so I transferred most of the scanner and pod's power here. (3500 in total) powerLoad: 3100 #We want this to fail first so I transferred most of the scanner and pod's power here. (3500 in total)
- type: Computer - type: Computer
@@ -656,29 +716,34 @@
name: camera monitor name: camera monitor
description: A surveillance camera monitor. You're watching them. Maybe. description: A surveillance camera monitor. You're watching them. Maybe.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: tech_key state: computer
screen: cameras - map: ["computerLayerKeyboard"]
- type: Computer state: generic_keyboard
board: SurveillanceCameraMonitorCircuitboard - map: ["computerLayerScreen"]
- type: DeviceNetwork state: cameras
deviceNetId: Wired - map: ["computerLayerKeys"]
receiveFrequencyId: SurveillanceCamera state: tech_key
transmitFrequencyId: SurveillanceCamera - type: Computer
- type: WiredNetworkConnection board: SurveillanceCameraMonitorCircuitboard
- type: DeviceNetworkRequiresPower - type: DeviceNetwork
- type: SurveillanceCameraMonitor deviceNetId: Wired
- type: ActivatableUI receiveFrequencyId: SurveillanceCamera
key: enum.SurveillanceCameraMonitorUiKey.Key transmitFrequencyId: SurveillanceCamera
- type: ActivatableUIRequiresVision - type: WiredNetworkConnection
- type: Transform - type: DeviceNetworkRequiresPower
anchored: true - type: SurveillanceCameraMonitor
- type: UserInterface - type: ActivatableUI
interfaces: key: enum.SurveillanceCameraMonitorUiKey.Key
- key: enum.SurveillanceCameraMonitorUiKey.Key - type: ActivatableUIRequiresVision
type: SurveillanceCameraMonitorBoundUserInterface - type: Transform
anchored: true
- type: UserInterface
interfaces:
- key: enum.SurveillanceCameraMonitorUiKey.Key
type: SurveillanceCameraMonitorBoundUserInterface
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
@@ -686,69 +751,33 @@
name: wireless camera monitor name: wireless camera monitor
description: A wireless surveillance camera monitor. You're watching them. Maybe. description: A wireless surveillance camera monitor. You're watching them. Maybe.
components: components:
- type: Appearance - type: Sprite
visuals: layers:
- type: ComputerVisualizer - map: ["computerLayerBody"]
key: tech_key state: computer
screen: cameras - map: ["computerLayerKeyboard"]
- type: Computer state: generic_keyboard
board: SurveillanceWirelessCameraMonitorCircuitboard - map: ["computerLayerScreen"]
- type: DeviceNetwork state: cameras
deviceNetId: Wireless - map: ["computerLayerKeys"]
receiveFrequencyId: SurveillanceCamera state: tech_key
transmitFrequencyId: SurveillanceCamera - type: Computer
- type: WirelessNetworkConnection board: SurveillanceWirelessCameraMonitorCircuitboard
range: 200 - type: DeviceNetwork
- type: DeviceNetworkRequiresPower deviceNetId: Wireless
- type: Speech receiveFrequencyId: SurveillanceCamera
- type: SurveillanceCameraSpeaker transmitFrequencyId: SurveillanceCamera
- type: SurveillanceCameraMonitor - type: WirelessNetworkConnection
speechEnabled: true range: 200
- type: ActivatableUI - type: DeviceNetworkRequiresPower
key: enum.SurveillanceCameraMonitorUiKey.Key - type: Speech
- type: ActivatableUIRequiresVision - type: SurveillanceCameraSpeaker
- type: UserInterface - type: SurveillanceCameraMonitor
interfaces: speechEnabled: true
- key: enum.SurveillanceCameraMonitorUiKey.Key - type: ActivatableUI
type: SurveillanceCameraMonitorBoundUserInterface key: enum.SurveillanceCameraMonitorUiKey.Key
- type: ActivatableUIRequiresVision
- type: entity - type: UserInterface
parent: ComputerSurveillanceWirelessCameraMonitor interfaces:
id: ComputerTelevision - key: enum.SurveillanceCameraMonitorUiKey.Key
name: wooden television type: SurveillanceCameraMonitorBoundUserInterface
description: Finally, some decent reception around here...
components:
- type: Appearance
visuals:
- type: ComputerVisualizer
body: television
bodyBroken: television_broken
screen: detective_television
- type: Computer
board: ComputerTelevisionCircuitboard
- type: Sprite
sprite: Structures/Machines/computers.rsi
layers:
- map: [ "enum.ComputerVisualizer+Layers.KeyboardOn" ]
visible: false
- map: [ "enum.ComputerVisualizer+Layers.Keyboard" ]
visible: false
- map: [ "enum.ComputerVisualizer+Layers.Body"]
state: television
- map: [ "enum.ComputerVisualizer+Layers.Screen" ]
state: detective_television
shader: unshaded
- type: PointLight
radius: 1.5
energy: 1.6
color: "#b89f25"
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
density: 200
mask:
- TabletopMachineMask
layer:
- TabletopMachineLayer

View File

@@ -9,18 +9,10 @@
noRot: true noRot: true
sprite: Structures/Machines/tech_disk_printer.rsi sprite: Structures/Machines/tech_disk_printer.rsi
layers: layers:
- state: icon - map: ["computerLayerBody"]
map: ["enum.ComputerVisualizer+Layers.Body"] state: icon
- state: unshaded - map: ["computerLayerScreen"]
shader: unshaded state: unshaded
map: ["enum.ComputerVisualizer+Layers.Screen"]
- type: Appearance
visuals:
- type: ComputerVisualizer
screen: unshaded
key: ""
body: icon
bodyBroken: icon
- type: DiskConsole - type: DiskConsole
- type: ResearchClient - type: ResearchClient
- type: ActivatableUI - type: ActivatableUI

View File

@@ -1,67 +1,85 @@
- type: entity
parent: ComputerSurveillanceWirelessCameraMonitor
id: ComputerTelevision
name: wooden television
description: Finally, some decent reception around here...
components:
- type: Sprite
layers:
- map: ["computerLayerBody"]
state: television
- map: ["computerLayerScreen"]
state: detective_television
- type: Computer
board: ComputerTelevisionCircuitboard
- type: PointLight
radius: 1.5
energy: 1.6
color: "#b89f25"
- type: Fixtures
fixtures:
- shape:
!type:PhysShapeAabb
bounds: "-0.25,-0.25,0.25,0.25"
density: 200
mask:
- TabletopMachineMask
layer:
- TabletopMachineLayer
- type: entity - type: entity
parent: BaseComputer parent: BaseComputer
id: WallmountTelescreenFrame id: WallmountTelescreenFrame
name: telescreen frame name: telescreen frame
description: Finally, some decent reception around here... description: Finally, some decent reception around here...
components: components:
- type: Appearance - type: Construction
visuals: graph: WallmountTelescreen
- type: ComputerVisualizer node: TelescreenFrame
body: telescreen - type: Sprite
bodyBroken: telescreen_broken drawdepth: WallMountedItems
screen: telescreen netsync: false
- type: Construction sprite: Structures/Machines/computers.rsi
graph: WallmountTelescreen layers:
node: TelescreenFrame - map: ["computerLayerBody"]
- type: Sprite state: television
drawdepth: WallMountedItems - map: ["computerLayerScreen"]
netsync: false state: telescreen
sprite: Structures/Machines/computers.rsi - type: Fixtures
layers: fixtures:
- map: [ "enum.ComputerVisualizer+Layers.KeyboardOn" ] - shape:
visible: false !type:PhysShapeAabb
- map: [ "enum.ComputerVisualizer+Layers.Keyboard" ] bounds: "-0.20,-0.10,0.25,0.35"
visible: false density: 250
- map: [ "enum.ComputerVisualizer+Layers.Body"] mask:
state: television - FullTileMask
- map: [ "enum.ComputerVisualizer+Layers.Screen" ] layer:
state: telescreen - WallLayer
shader: shaded - type: WallMount
- type: Fixtures - type: Damageable
fixtures: damageContainer: Inorganic
- shape: damageModifierSet: Metallic
!type:PhysShapeAabb - type: Destructible
bounds: "-0.20,-0.10,0.25,0.35" thresholds:
density: 250 - trigger:
mask: !type:DamageTrigger
- FullTileMask damage: 200
layer: behaviors: #excess damage, don't spawn entities.
- WallLayer - !type:DoActsBehavior
- type: WallMount acts: [ "Destruction" ]
- type: Damageable - trigger:
damageContainer: Inorganic !type:DamageTrigger
damageModifierSet: Metallic damage: 50
- type: Destructible behaviors:
thresholds: - !type:SpawnEntitiesBehavior
- trigger: spawn:
!type:DamageTrigger SheetSteel1:
damage: 200 min: 1
behaviors: #excess damage, don't spawn entities. max: 1
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- trigger: - type: Transform
!type:DamageTrigger anchored: true
damage: 50
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Transform
anchored: true
- type: entity - type: entity
parent: WallmountTelescreenFrame parent: WallmountTelescreenFrame
@@ -70,27 +88,27 @@
name: telescreen name: telescreen
description: Finally, some decent reception around here... description: Finally, some decent reception around here...
components: components:
- type: Construction - type: Construction
graph: WallmountTelescreen graph: WallmountTelescreen
node: Telescreen node: Telescreen
- type: PointLight - type: PointLight
radius: 1.5 radius: 1.5
energy: 1.6 energy: 1.6
color: "#b89f25" color: "#b89f25"
- type: DeviceNetwork - type: DeviceNetwork
deviceNetId: Wired deviceNetId: Wired
receiveFrequencyId: SurveillanceCamera receiveFrequencyId: SurveillanceCamera
transmitFrequencyId: SurveillanceCamera transmitFrequencyId: SurveillanceCamera
- type: WiredNetworkConnection - type: WiredNetworkConnection
- type: DeviceNetworkRequiresPower - type: DeviceNetworkRequiresPower
- type: SurveillanceCameraMonitor - type: SurveillanceCameraMonitor
- type: ActivatableUI - type: ActivatableUI
key: enum.SurveillanceCameraMonitorUiKey.Key key: enum.SurveillanceCameraMonitorUiKey.Key
- type: ActivatableUIRequiresPower - type: ActivatableUIRequiresPower
- type: UserInterface - type: UserInterface
interfaces: interfaces:
- key: enum.SurveillanceCameraMonitorUiKey.Key - key: enum.SurveillanceCameraMonitorUiKey.Key
type: SurveillanceCameraMonitorBoundUserInterface type: SurveillanceCameraMonitorBoundUserInterface
# Wall Televisions # Wall Televisions
@@ -100,40 +118,28 @@
name: television frame name: television frame
description: Finally, some decent reception around here... description: Finally, some decent reception around here...
components: components:
- type: Appearance - type: Fixtures
visuals: fixtures:
- type: ComputerVisualizer - shape:
key: television_wall !type:PhysShapeAabb
body: television_wall bounds: "-0.75,-0.10,0.75,0.35"
bodyBroken: television_wallbroken density: 75
screen: television_wall mask:
- type: Fixtures - FullTileMask
fixtures: layer:
- shape: - WallLayer
!type:PhysShapeAabb - type: Construction
bounds: "-0.75,-0.10,0.75,0.35" graph: WallmountTelevision
density: 75 node: TelevisionFrame
mask: - type: Sprite
- FullTileMask drawdepth: WallMountedItems
layer: netsync: false
- WallLayer sprite: Structures/Wallmounts/flatscreentv.rsi
- type: Construction layers:
graph: WallmountTelevision - map: ["computerLayerBody"]
node: TelevisionFrame state: television_wall
- type: Sprite - map: ["computerLayerScreen"]
drawdepth: WallMountedItems state: television_wallscreen
netsync: false
sprite: Structures/Wallmounts/flatscreentv.rsi
layers:
- map: [ "enum.ComputerVisualizer+Layers.KeyboardOn" ]
visible: false
- map: [ "enum.ComputerVisualizer+Layers.Keyboard" ]
visible: false
- map: [ "enum.ComputerVisualizer+Layers.Body"]
state: television_wall
- map: [ "enum.ComputerVisualizer+Layers.Screen" ]
state: television_wall
shader: shaded
- type: entity - type: entity
parent: WallmountTelevisionFrame parent: WallmountTelevisionFrame
@@ -142,34 +148,27 @@
name: television name: television
description: Finally, some decent reception around here... description: Finally, some decent reception around here...
components: components:
- type: Appearance - type: Construction
visuals: graph: WallmountTelevision
- type: ComputerVisualizer node: Television
key: television_wall - type: DeviceNetwork
body: television_wall deviceNetId: Wireless
bodyBroken: television_wallbroken receiveFrequencyId: SurveillanceCamera
screen: television_wallscreen transmitFrequencyId: SurveillanceCamera
- type: Construction - type: WirelessNetworkConnection
graph: WallmountTelevision range: 200
node: Television - type: DeviceNetworkRequiresPower
- type: DeviceNetwork - type: Speech
deviceNetId: Wireless - type: SurveillanceCameraSpeaker
receiveFrequencyId: SurveillanceCamera - type: SurveillanceCameraMonitor
transmitFrequencyId: SurveillanceCamera - type: ActivatableUI
- type: WirelessNetworkConnection key: enum.SurveillanceCameraMonitorUiKey.Key
range: 200 - type: ActivatableUIRequiresPower
- type: DeviceNetworkRequiresPower - type: UserInterface
- type: Speech interfaces:
- type: SurveillanceCameraSpeaker - key: enum.SurveillanceCameraMonitorUiKey.Key
- type: SurveillanceCameraMonitor type: SurveillanceCameraMonitorBoundUserInterface
- type: ActivatableUI - type: PointLight
key: enum.SurveillanceCameraMonitorUiKey.Key radius: 1.5
- type: ActivatableUIRequiresPower energy: 1.6
- type: UserInterface color: "#b89f25"
interfaces:
- key: enum.SurveillanceCameraMonitorUiKey.Key
type: SurveillanceCameraMonitorBoundUserInterface
- type: PointLight
radius: 1.5
energy: 1.6
color: "#b89f25"

View File

@@ -396,7 +396,7 @@
"directions": 4 "directions": 4
}, },
{ {
"name": "computer_broken", "name": "screen_broken",
"directions": 4 "directions": 4
}, },
{ {
@@ -972,11 +972,11 @@
] ]
}, },
{ {
"name": "generic_key", "name": "generic_keys",
"directions": 4 "directions": 4
}, },
{ {
"name": "generic_key_off", "name": "generic_keyboard",
"directions": 4 "directions": 4
}, },
{ {