Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

substations, generators and smes replacement #144

Merged
merged 19 commits into from
Dec 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Resources/ConfigPresets/Build/development.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[game]
lobbyenabled = true
lobbyenabled = false
map = "Wave1"
map_rotation = false
defaultpreset = "Waves"
Expand Down
9 changes: 0 additions & 9 deletions Resources/Prototypes/Nuclear14/Entities/Objects/Misc/junk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,6 @@
- type: Sprite
state: lunchbox

- type: entity
parent: N14JunkItemBase
id: N14JunkPrewarMoney # TODO: Probably change this to a stack instead of a single entity.
name: pre-war money
description: A pre-war dollar bill.
components:
- type: Sprite
state: pre_war_money

- type: entity
parent: N14JunkItemBase
id: N14JunkTeapot
Expand Down
78 changes: 78 additions & 0 deletions Resources/Prototypes/Nuclear14/Entities/Objects/Misc/materials.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
# There may be some overlap with the Junk.yml so look there for other crafting components.
- type: entity
abstract: true
parent: BaseItem
id: N14MaterialBase
description: A raw material.
components:
- type: Sprite
sprite: Nuclear14/Objects/Misc/materials.rsi
- type: Item
sprite: Nuclear14/Objects/Misc/materials.rsi
size: 15
- type: ItemStatus
- type: Tag
tags:
- DroneUsable
- RawMaterial
- type: Damageable
damageContainer: Inorganic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]

- type: entity
parent: N14MaterialBase
id: N14MaterialCircuitry
name: circuitry
suffix: Full
components:
- type: Material
# - type: PhysicalComposition
# materialComposition:
# Circuitry: 100
- type: Stack
stackType: Circuitry
baseLayer: base
layerStates:
- circuits
- circuits_2
- circuits_3
count: 15
- type: Sprite
state: circuits_3
layers:
- state: circuits_3
map: ["base"]
- type: Appearance
- type: Item
size: 15

- type: entity
parent: N14MaterialCircuitry
id: N14MaterialCircuitry10
suffix: 10
components:
- type: Sprite
state: circuits_2
- type: Stack
count: 10
- type: Item
size: 10

- type: entity
parent: N14MaterialCircuitry
id: N14MaterialCircuitry1
suffix: Single
components:
- type: Sprite
state: circuits
- type: Stack
count: 1
- type: Item
size: 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,238 @@
# Frames
- type: entity
id: N14MachineFrameTall
name: tall machine frame
description: A metal frame for housing machinery and electronics
suffix: Frame
placement:
mode: SnapgridCenter
components:
- type: Sprite
sprite: Nuclear14/Structures/Power/32x48_machines.rsi
state: rackempty
offset: 0, 1
- type: Transform
anchored: true
noRot: true
- type: Physics
bodyType: Static
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,0.5,0.45,1.5"
density: 190
mask:
- MachineMask
layer:
- MachineLayer
- type: Clickable
- type: InteractionOutline
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: destroyedMachineFrame
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Construction
graph: N14TallMachineFrame
node: missingWires

- type: entity
parent: N14MachineFrameTall
id: N14MachineFrameTallDestroyed
name: destroyed machine
description: A destroyed frame that used to hold machinery and electronics
components:
- type: Sprite
sprite: Nuclear14/Structures/Power/32x48_machines.rsi
state: rackdestroyed
offset: 0, 1
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 3
- !type:DoActsBehavior
acts: ["Destruction"]
- type: Construction
graph: N14TallMachineFrame
node: destroyedMachineFrame

- type: entity
parent: N14MachineFrameTall
id: N14MachineFrameTallWired
description: A metal frame for housing machinery and electronics
suffix: Wired
components:
- type: Sprite
sprite: Nuclear14/Structures/Power/32x48_machines.rsi
state: rackparts
offset: 0, 1
- type: Construction
graph: N14TallMachineFrame
node: machineFrame

# Machine Base
- type: entity
abstract: true
parent: BaseStructure
id: N14BaseMachine
components: # Not Anchorable due to sprite offset needs
- type: InteractionOutline
- type: Physics
bodyType: Static
- type: Transform
noRot: true
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,0.5,0.45,1.5"
density: 190
mask:
- MachineMask
layer:
- MachineLayer
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 200
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- trigger:
!type:DamageTrigger
damage: 100
behaviors:
- !type:ChangeConstructionNodeBehavior
node: destroyedMachineFrame
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg

- type: entity
parent: N14BaseMachine
id: N14BaseMachinePowered
name: server rack
description: An old server rack filled with electronics.
abstract: true
components:
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,0.5,0.45,1.5"
density: 190
mask:
- MachineMask
layer:
- MachineLayer
- type: Sprite
sprite: Nuclear14/Structures/Power/32x48_machines.rsi
snapCardinals: true
offset: 0, 1
layers:
- state: serverrack
- state: serverrack_on
map: ["enum.PowerDeviceVisualLayers.Powered"]
- type: GenericVisualizer
visuals:
enum.PowerDeviceVisuals.Powered:
enum.PowerDeviceVisualLayers.Powered:
True: { visible: true }
False: { visible: false }
- type: Appearance

- type: entity
parent: N14BaseMachinePowered
id: N14MachineRackElectronics
name: electronics rack
description: An old rack filled with electronics.
components:
- type: Sprite
sprite: Nuclear14/Structures/Power/32x48_machines.rsi
snapCardinals: true
offset: 0, 1
layers:
- state: rack
- state: rack_on
map: ["enum.PowerDeviceVisualLayers.Powered"]
- type: Construction
graph: N14TallMachineFrame
node: ElectronicsRack

- type: entity
parent: N14BaseMachinePowered
id: N14MachineRackServer
name: server rack
description: An old server rack filled with electronics.
components:
- type: Construction
graph: N14TallMachineFrame
node: ServerRack

- type: entity
parent: N14BaseMachinePowered
id: N14MachineRackRecorder
name: electrical recorder
description: An old rack with a fault recorder in.
components:
- type: Sprite
sprite: Nuclear14/Structures/Power/32x48_machines.rsi
snapCardinals: true
offset: 0, 1
layers:
- state: recorder
- state: recorder_on
map: ["enum.PowerDeviceVisualLayers.Powered"]
- type: Construction
graph: N14TallMachineFrame
node: RecorderRack

- type: entity
parent: N14BaseMachine
id: N14MachineComputerMainframe # Probably a computer, move it there?
name: mainframe
description: Probably the biggest computer you've ever seen.
components:
- type: Sprite
sprite: Nuclear14/Structures/Machines/mainframe.rsi
snapCardinals: true
layers:
- state: mainframe
- state: mainframe_on
map: ["enum.PowerDeviceVisualLayers.Powered"]
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-1.1,-0.5,1.2,1"
density: 190
mask:
- MachineMask
layer:
- MachineLayer
Loading
Loading