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]
public enum ComputerVisuals : byte
{
// Bool
Powered,
// Bool
Broken
Powered
}
}

View File

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

View File

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

View File

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

View File

@@ -9,18 +9,10 @@
noRot: true
sprite: Structures/Machines/tech_disk_printer.rsi
layers:
- state: icon
map: ["enum.ComputerVisualizer+Layers.Body"]
- state: unshaded
shader: unshaded
map: ["enum.ComputerVisualizer+Layers.Screen"]
- type: Appearance
visuals:
- type: ComputerVisualizer
screen: unshaded
key: ""
body: icon
bodyBroken: icon
- map: ["computerLayerBody"]
state: icon
- map: ["computerLayerScreen"]
state: unshaded
- type: DiskConsole
- type: ResearchClient
- type: ActivatableUI
@@ -38,4 +30,4 @@
- type: PointLight
radius: 0.8
energy: 0.5
color: "#b53ca1"
color: "#b53ca1"

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