Portable Generator Rework (#19302)
This commit is contained in:
committed by
GitHub
parent
50828363fe
commit
bf16698efa
@@ -599,14 +599,14 @@
|
||||
ExamineName: Woodwind Instrument
|
||||
|
||||
- type: entity
|
||||
id: GeneratorPlasmaMachineCircuitboard
|
||||
id: PortableGeneratorPacmanMachineCircuitboard
|
||||
parent: BaseMachineCircuitboard
|
||||
name: generator (plasma) machine board
|
||||
name: P.A.C.M.A.N.-type portable generator machine board
|
||||
components:
|
||||
- type: Sprite
|
||||
state: engineering
|
||||
- type: MachineBoard
|
||||
prototype: GeneratorPlasma
|
||||
prototype: PortableGeneratorPacman
|
||||
requirements:
|
||||
Capacitor: 1
|
||||
materialRequirements:
|
||||
@@ -643,14 +643,14 @@
|
||||
Glass: 2
|
||||
|
||||
- type: entity
|
||||
id: GeneratorUraniumMachineCircuitboard
|
||||
id: PortableGeneratorSuperPacmanMachineCircuitboard
|
||||
parent: BaseMachineCircuitboard
|
||||
name: generator (uranium) machine board
|
||||
name: S.U.P.E.R.P.A.C.M.A.N.-type portable generator machine board
|
||||
components:
|
||||
- type: Sprite
|
||||
state: engineering
|
||||
- type: MachineBoard
|
||||
prototype: GeneratorUranium
|
||||
prototype: PortableGeneratorSuperPacman
|
||||
requirements:
|
||||
Capacitor: 2
|
||||
materialRequirements:
|
||||
@@ -661,6 +661,25 @@
|
||||
chemicalComposition:
|
||||
Silicon: 20
|
||||
|
||||
- type: entity
|
||||
id: PortableGeneratorJrPacmanMachineCircuitboard
|
||||
parent: BaseMachineCircuitboard
|
||||
name: J.R.P.A.C.M.A.N.-type portable generator machine board
|
||||
components:
|
||||
- type: Sprite
|
||||
state: engineering
|
||||
- type: MachineBoard
|
||||
prototype: PortableGeneratorJrPacman
|
||||
requirements:
|
||||
Capacitor: 1
|
||||
materialRequirements:
|
||||
Cable: 10
|
||||
- type: PhysicalComposition
|
||||
materialComposition:
|
||||
Glass: 200
|
||||
chemicalComposition:
|
||||
Silicon: 20
|
||||
|
||||
- type: entity
|
||||
id: ReagentGrinderMachineCircuitboard
|
||||
parent: BaseMachineCircuitboard
|
||||
|
||||
@@ -340,8 +340,9 @@
|
||||
- HonkerTargetingElectronics
|
||||
- HamtrCentralElectronics
|
||||
- HamtrPeripheralsElectronics
|
||||
- GeneratorPlasmaMachineCircuitboard
|
||||
- GeneratorUraniumMachineCircuitboard
|
||||
- PortableGeneratorPacmanMachineCircuitboard
|
||||
- PortableGeneratorSuperPacmanMachineCircuitboard
|
||||
- PortableGeneratorJrPacmanMachineCircuitboard
|
||||
- WallmountGeneratorElectronics
|
||||
- WallmountGeneratorAPUElectronics
|
||||
- WallmountSubstationElectronics
|
||||
|
||||
@@ -175,67 +175,6 @@
|
||||
- type: PowerSupplier
|
||||
supplyRate: 15000
|
||||
|
||||
- type: entity
|
||||
parent: [ BaseGenerator, ConstructibleMachine ]
|
||||
id: GeneratorPlasma
|
||||
suffix: Plasma, 20kW
|
||||
components:
|
||||
- type: PowerSupplier
|
||||
- type: Sprite
|
||||
sprite: Structures/Power/Generation/portable_generator.rsi
|
||||
state: portgen0_1
|
||||
- type: WiresPanel
|
||||
- type: Wires
|
||||
BoardName: "GeneratorPlasma"
|
||||
LayoutId: GeneratorPlasma
|
||||
- type: Machine
|
||||
board: GeneratorPlasmaMachineCircuitboard
|
||||
- type: UpgradePowerSupplier
|
||||
powerSupplyMultiplier: 1.25
|
||||
scaling: Exponential
|
||||
- type: FuelGenerator
|
||||
targetPower: 20000
|
||||
optimalPower: 20000
|
||||
- type: SolidFuelGeneratorAdapter
|
||||
fuelMaterial: Plasma
|
||||
- type: ActivatableUI
|
||||
key: enum.GeneratorComponentUiKey.Key
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
- key: enum.GeneratorComponentUiKey.Key
|
||||
type: SolidFuelGeneratorBoundUserInterface
|
||||
|
||||
- type: entity
|
||||
parent: [ BaseGenerator, ConstructibleMachine ]
|
||||
id: GeneratorUranium
|
||||
suffix: Uranium, 30kW
|
||||
components:
|
||||
- type: PowerSupplier
|
||||
- type: Sprite
|
||||
sprite: Structures/Power/Generation/portable_generator.rsi
|
||||
state: portgen1_1
|
||||
- type: WiresPanel
|
||||
- type: Wires
|
||||
BoardName: "GeneratorUranium"
|
||||
LayoutId: GeneratorUranium
|
||||
- type: Machine
|
||||
board: GeneratorUraniumMachineCircuitboard
|
||||
- type: UpgradePowerSupplier
|
||||
powerSupplyMultiplier: 1.25
|
||||
scaling: Exponential
|
||||
- type: FuelGenerator
|
||||
targetPower: 30000
|
||||
optimalPower: 30000
|
||||
optimalBurnRate: 0.00416666666
|
||||
- type: SolidFuelGeneratorAdapter
|
||||
fuelMaterial: Uranium
|
||||
- type: ActivatableUI
|
||||
key: enum.GeneratorComponentUiKey.Key
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
- key: enum.GeneratorComponentUiKey.Key
|
||||
type: SolidFuelGeneratorBoundUserInterface
|
||||
|
||||
- type: entity
|
||||
parent: BaseGeneratorWallmount
|
||||
id: GeneratorWallmountBasic
|
||||
|
||||
@@ -0,0 +1,327 @@
|
||||
#
|
||||
# You can use this Desmos sheet to calculate fuel burn rate values:
|
||||
# https://www.desmos.com/calculator/qcektq5dqs
|
||||
#
|
||||
|
||||
- type: entity
|
||||
abstract: true
|
||||
id: PortableGeneratorBase
|
||||
parent: [ BaseMachine, ConstructibleMachine ]
|
||||
components:
|
||||
# Basic properties
|
||||
- type: Transform
|
||||
anchored: False
|
||||
- type: Physics
|
||||
bodyType: Dynamic
|
||||
- type: StaticPrice
|
||||
price: 500
|
||||
- type: AmbientSound
|
||||
range: 5
|
||||
volume: -5
|
||||
sound:
|
||||
path: /Audio/Ambience/Objects/engine_hum.ogg
|
||||
enabled: false
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
fix1:
|
||||
shape:
|
||||
!type:PhysShapeAabb
|
||||
bounds: "-0.40,-0.40,0.40,0.40"
|
||||
# It has wheels
|
||||
density: 45
|
||||
mask:
|
||||
- MachineMask
|
||||
layer:
|
||||
- MachineLayer
|
||||
|
||||
# Visuals
|
||||
- type: Appearance
|
||||
- type: Sprite
|
||||
sprite: Structures/Power/Generation/portable_generator.rsi
|
||||
|
||||
# Construction, interaction
|
||||
- type: WiresPanel
|
||||
- type: Wires
|
||||
BoardName: "Generator"
|
||||
LayoutId: Generator
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
- key: enum.GeneratorComponentUiKey.Key
|
||||
type: PortableGeneratorBoundUserInterface
|
||||
- type: ActivatableUI
|
||||
key: enum.GeneratorComponentUiKey.Key
|
||||
- type: Electrified
|
||||
onHandInteract: false
|
||||
onInteractUsing: false
|
||||
onBump: false
|
||||
requirePower: true
|
||||
highVoltageNode: output
|
||||
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 200
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 100
|
||||
behaviors:
|
||||
- !type:PlaySoundBehavior
|
||||
sound:
|
||||
path: /Audio/Effects/metalbreak.ogg
|
||||
- !type:ChangeConstructionNodeBehavior
|
||||
node: machineFrame
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
- type: GuideHelp
|
||||
guides: [ PortableGenerator, Power ]
|
||||
|
||||
# Core functionality
|
||||
- type: PortableGenerator
|
||||
startSoundEmpty: { collection: GeneratorTugEmpty }
|
||||
startSound: { collection: GeneratorTug }
|
||||
- type: FuelGenerator
|
||||
- type: PowerSupplier
|
||||
supplyRate: 3000
|
||||
supplyRampRate: 500
|
||||
supplyRampTolerance: 500
|
||||
enabled: false
|
||||
|
||||
- type: entity
|
||||
abstract: true
|
||||
parent: PortableGeneratorBase
|
||||
id: PortableGeneratorSwitchableBase
|
||||
components:
|
||||
- type: PowerSwitchableGenerator
|
||||
switchSound:
|
||||
path: /Audio/Machines/button.ogg
|
||||
- type: NodeContainer
|
||||
examinable: true
|
||||
nodes:
|
||||
output_hv:
|
||||
!type:CableDeviceNode
|
||||
nodeGroupID: HVPower
|
||||
output_mv:
|
||||
!type:CableDeviceNode
|
||||
nodeGroupID: MVPower
|
||||
enabled: false
|
||||
|
||||
- type: entity
|
||||
name: P.A.C.M.A.N.-type portable generator
|
||||
description: |-
|
||||
A flexible backup generator for powering a variety of equipment.
|
||||
Runs off solid plasma sheets and is rated for up to 30 kW.
|
||||
parent: PortableGeneratorSwitchableBase
|
||||
id: PortableGeneratorPacman
|
||||
suffix: Plasma, 30 kW
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: portgen0
|
||||
map: [ "enum.GeneratorVisualLayers.Body" ]
|
||||
- state: portgen_on_unlit
|
||||
map: [ "enum.GeneratorVisualLayers.Unlit" ]
|
||||
shader: unshaded
|
||||
visible: false
|
||||
- type: GenericVisualizer
|
||||
visuals:
|
||||
enum.GeneratorVisuals.Running:
|
||||
enum.GeneratorVisualLayers.Body:
|
||||
True: { state: portgen0on }
|
||||
False: { state: portgen0 }
|
||||
enum.GeneratorVisualLayers.Unlit:
|
||||
True: { visible: true }
|
||||
False: { visible: false }
|
||||
|
||||
- type: Machine
|
||||
board: PortableGeneratorPacmanMachineCircuitboard
|
||||
- type: FuelGenerator
|
||||
minTargetPower: 5000
|
||||
maxTargetPower: 30000
|
||||
targetPower: 30000
|
||||
optimalPower: 30000
|
||||
# 15 minutes at max output
|
||||
optimalBurnRate: 0.0333333
|
||||
# a decent curve that goes up to about an hour at 5 kW.
|
||||
fuelEfficiencyConstant: 0.75
|
||||
- type: SolidFuelGeneratorAdapter
|
||||
fuelMaterial: Plasma
|
||||
multiplier: 0.01
|
||||
- type: MaterialStorage
|
||||
storageLimit: 3000
|
||||
materialWhiteList: [Plasma]
|
||||
- type: PortableGenerator
|
||||
startChance: 0.8
|
||||
- type: UpgradePowerSupplier
|
||||
powerSupplyMultiplier: 1.25
|
||||
scaling: Exponential
|
||||
- type: GeneratorExhaustGas
|
||||
gasType: CarbonDioxide
|
||||
# 2 moles of gas for every sheet of plasma.
|
||||
moleRatio: 2
|
||||
|
||||
- type: entity
|
||||
name: S.U.P.E.R.P.A.C.M.A.N.-type portable generator
|
||||
description: |-
|
||||
An advanced generator for powering departments.
|
||||
Runs off uranium sheets and is rated for up to 50 kW.
|
||||
parent: PortableGeneratorSwitchableBase
|
||||
id: PortableGeneratorSuperPacman
|
||||
suffix: Uranium, 50 kW
|
||||
components:
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: portgen1
|
||||
map: [ "enum.GeneratorVisualLayers.Body" ]
|
||||
- state: portgen_on_unlit
|
||||
map: [ "enum.GeneratorVisualLayers.Unlit" ]
|
||||
shader: unshaded
|
||||
visible: false
|
||||
- type: GenericVisualizer
|
||||
visuals:
|
||||
enum.GeneratorVisuals.Running:
|
||||
enum.GeneratorVisualLayers.Body:
|
||||
True: { state: portgen1on }
|
||||
False: { state: portgen1 }
|
||||
enum.GeneratorVisualLayers.Unlit:
|
||||
True: { visible: true }
|
||||
False: { visible: false }
|
||||
|
||||
- type: Machine
|
||||
board: PortableGeneratorSuperPacmanMachineCircuitboard
|
||||
- type: FuelGenerator
|
||||
minTargetPower: 10000
|
||||
maxTargetPower: 50000
|
||||
targetPower: 50000
|
||||
optimalPower: 50000
|
||||
# 30 minutes at full power
|
||||
optimalBurnRate: 0.016666666
|
||||
# Barely save any fuel from reducing power output
|
||||
fuelEfficiencyConstant: 0.1
|
||||
- type: SolidFuelGeneratorAdapter
|
||||
fuelMaterial: Uranium
|
||||
multiplier: 0.01
|
||||
- type: MaterialStorage
|
||||
storageLimit: 3000
|
||||
materialWhiteList: [Uranium]
|
||||
- type: PortableGenerator
|
||||
- type: UpgradePowerSupplier
|
||||
powerSupplyMultiplier: 1.25
|
||||
scaling: Exponential
|
||||
|
||||
- type: entity
|
||||
name: J.R.P.A.C.M.A.N.-type portable generator
|
||||
description: |-
|
||||
A small generator capable of powering individual rooms, in case of emergencies.
|
||||
Runs off welding fuel and is rated for up to 5 kW.
|
||||
Rated ages 3 and up.
|
||||
parent: PortableGeneratorBase
|
||||
id: PortableGeneratorJrPacman
|
||||
suffix: Welding Fuel, 5 kW
|
||||
components:
|
||||
- type: AmbientSound
|
||||
range: 4
|
||||
volume: -8
|
||||
|
||||
- type: Fixtures
|
||||
fixtures:
|
||||
fix1:
|
||||
shape:
|
||||
!type:PhysShapeAabb
|
||||
bounds: "-0.30,-0.30,0.30,0.30"
|
||||
# It has wheels
|
||||
density: 30
|
||||
mask:
|
||||
- MachineMask
|
||||
layer:
|
||||
- MachineLayer
|
||||
|
||||
- type: Sprite
|
||||
layers:
|
||||
- state: portgen3
|
||||
map: [ "enum.GeneratorVisualLayers.Body" ]
|
||||
- state: portgen3on_unlit
|
||||
map: [ "enum.GeneratorVisualLayers.Unlit" ]
|
||||
shader: unshaded
|
||||
visible: false
|
||||
- type: GenericVisualizer
|
||||
visuals:
|
||||
enum.GeneratorVisuals.Running:
|
||||
enum.GeneratorVisualLayers.Body:
|
||||
True: { state: portgen3on }
|
||||
False: { state: portgen3 }
|
||||
enum.GeneratorVisualLayers.Unlit:
|
||||
True: { visible: true }
|
||||
False: { visible: false }
|
||||
|
||||
- type: Machine
|
||||
board: PortableGeneratorJrPacmanMachineCircuitboard
|
||||
- type: FuelGenerator
|
||||
targetPower: 2000
|
||||
minTargetPower: 1000
|
||||
optimalPower: 5000
|
||||
maxTargetPower: 5000
|
||||
# 7.5 minutes at full tank.
|
||||
optimalBurnRate: 0.11111111
|
||||
# Shallow curve that allows you to just barely eek out 12 minutes at lowest.
|
||||
fuelEfficiencyConstant: 0.3
|
||||
- type: ChemicalFuelGeneratorAdapter
|
||||
solution: tank
|
||||
reagent: WeldingFuel
|
||||
- type: SolutionContainerManager
|
||||
solutions:
|
||||
tank:
|
||||
maxVol: 50
|
||||
- type: RefillableSolution
|
||||
solution: tank
|
||||
- type: PortableGenerator
|
||||
# Unreliable bugger
|
||||
startChance: 0.5
|
||||
- type: NodeContainer
|
||||
examinable: true
|
||||
nodes:
|
||||
output:
|
||||
!type:CableDeviceNode
|
||||
nodeGroupID: Apc
|
||||
- type: PowerSupplier
|
||||
# No ramping needed on this bugger.
|
||||
voltage: Apc
|
||||
supplyRampTolerance: 2000
|
||||
- type: GeneratorExhaustGas
|
||||
gasType: CarbonDioxide
|
||||
# Full tank is 25 moles of gas
|
||||
moleRatio: 0.5
|
||||
- type: Explosive
|
||||
explosionType: Default
|
||||
tileBreakScale: 0
|
||||
- type: Destructible
|
||||
thresholds:
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 200
|
||||
behaviors:
|
||||
- !type:DoActsBehavior
|
||||
acts: [ "Destruction" ]
|
||||
- trigger:
|
||||
!type:DamageTrigger
|
||||
damage: 100
|
||||
behaviors:
|
||||
- !type:SpillBehavior
|
||||
solution: tank
|
||||
- !type:PlaySoundBehavior
|
||||
sound:
|
||||
path: /Audio/Effects/metalbreak.ogg
|
||||
- !type:ChangeConstructionNodeBehavior
|
||||
node: machineFrame
|
||||
- !type:DoActsBehavior
|
||||
acts: ["Destruction"]
|
||||
- trigger:
|
||||
!type:DamageTypeTrigger
|
||||
damageType: Piercing
|
||||
damage: 75
|
||||
behaviors:
|
||||
- !type:SolutionExplosionBehavior
|
||||
solution: tank
|
||||
@@ -61,6 +61,7 @@
|
||||
name: guide-entry-power
|
||||
text: "/ServerInfo/Guidebook/Engineering/Power.xml"
|
||||
children:
|
||||
- PortableGenerator
|
||||
- AME
|
||||
- Singularity
|
||||
- TEG
|
||||
@@ -79,3 +80,8 @@
|
||||
id: TEG
|
||||
name: guide-entry-teg
|
||||
text: "/ServerInfo/Guidebook/Engineering/TEG.xml"
|
||||
|
||||
- type: guideEntry
|
||||
id: PortableGenerator
|
||||
name: guide-entry-portable-generator
|
||||
text: "/ServerInfo/Guidebook/Engineering/PortableGenerator.xml"
|
||||
|
||||
@@ -438,21 +438,29 @@
|
||||
Glass: 900
|
||||
|
||||
- type: latheRecipe
|
||||
id: GeneratorPlasmaMachineCircuitboard
|
||||
result: GeneratorPlasmaMachineCircuitboard
|
||||
id: PortableGeneratorPacmanMachineCircuitboard
|
||||
result: PortableGeneratorPacmanMachineCircuitboard
|
||||
completetime: 4
|
||||
materials:
|
||||
Steel: 50
|
||||
Glass: 350
|
||||
|
||||
- type: latheRecipe
|
||||
id: GeneratorUraniumMachineCircuitboard
|
||||
result: GeneratorUraniumMachineCircuitboard
|
||||
id: PortableGeneratorSuperPacmanMachineCircuitboard
|
||||
result: PortableGeneratorSuperPacmanMachineCircuitboard
|
||||
completetime: 4
|
||||
materials:
|
||||
Steel: 50
|
||||
Glass: 350
|
||||
|
||||
- type: latheRecipe
|
||||
id: PortableGeneratorJrPacmanMachineCircuitboard
|
||||
result: PortableGeneratorJrPacmanMachineCircuitboard
|
||||
completetime: 4
|
||||
materials:
|
||||
Steel: 50
|
||||
Glass: 350
|
||||
|
||||
- type: latheRecipe
|
||||
id: WallmountGeneratorElectronics
|
||||
result: WallmountGeneratorElectronics
|
||||
|
||||
@@ -60,13 +60,14 @@
|
||||
name: research-technology-power-generation
|
||||
icon:
|
||||
sprite: Structures/Power/Generation/portable_generator.rsi
|
||||
state: portgen0_1
|
||||
state: portgen0
|
||||
discipline: Industrial
|
||||
tier: 1
|
||||
cost: 7500
|
||||
recipeUnlocks:
|
||||
- GeneratorPlasmaMachineCircuitboard
|
||||
- GeneratorUraniumMachineCircuitboard
|
||||
- PortableGeneratorPacmanMachineCircuitboard
|
||||
- PortableGeneratorSuperPacmanMachineCircuitboard
|
||||
- PortableGeneratorJrPacmanMachineCircuitboard
|
||||
- PowerComputerCircuitboard #the actual solar panel itself should be in here
|
||||
- SolarControlComputerCircuitboard
|
||||
- SolarTrackerElectronics
|
||||
|
||||
15
Resources/Prototypes/SoundCollections/generator.yml
Normal file
15
Resources/Prototypes/SoundCollections/generator.yml
Normal file
@@ -0,0 +1,15 @@
|
||||
- type: soundCollection
|
||||
# Plays when you try to start a generator.
|
||||
# You know, lawnmower cord pull sound.
|
||||
id: GeneratorTug
|
||||
files:
|
||||
- /Audio/Machines/generator-tug-1.ogg
|
||||
- /Audio/Machines/generator-tug-2.ogg
|
||||
- /Audio/Machines/generator-tug-3.ogg
|
||||
|
||||
- type: soundCollection
|
||||
id: GeneratorTugEmpty
|
||||
files:
|
||||
- /Audio/Machines/generator-tug-1-empty.ogg
|
||||
- /Audio/Machines/generator-tug-2-empty.ogg
|
||||
- /Audio/Machines/generator-tug-3-empty.ogg
|
||||
Reference in New Issue
Block a user