* upload all textures
finished easiest part - TeslaGenerator

* Added Tesla energy logic

* add lightning pulse priority

* work

* optimise lightning arc system

* now tesla moving to LightningTarget entity and consume it

* some audio work
add airlock and computers to the LightningTarget

* add nice visual and explosions
add crashing to game

* rsi meta fix

* disabling explosions (crashing server)
I'll get back to that problem later.

* adding important admin logging

* a little bit of cleaning and documentation

* Persistent attempts to fix the server crashing on explosions. Accidental cleaning of everything I see.

* now the tesla incinerates everything it touches except the containment field.

* colliders work

* fix falling tesla on ground after being exploded

* add consume sound, add spawn and collapses sound

* added TeslaGenerator to cargo trading console

* add all tesla part to cargo trading console

* Tesla coils: Turn on and off, get energy from lightning, give energy to the grid.

* tesla coil is ready

* tesla grounding rod is ready

* clean up

* clean up 2

* grounding rods now working without power

* add LightningResistance parameter for LightningTarget Component

* add chaotic teleport

* eletrocution remove?

* deltanedas fix pack

* more fixes

* FIXES

* FIIIXEEES

* The "Grounding Rod" component is removed, and replaced with "LightiningSparking", which is responsible for changing the visuals when hit by lightning. Duplicate code from the coil is removed.

* ops

* fix

* nah, is escaped anyway

* increase tesla collider size

* keron bb

* try fix test?

* fix

* bruh

* check turn off sus comp

* prototype cleaning

* FIIX

* return and fix sus component

* fix tesla eating lightnings, now mini tesla is electrocuted

* commented some issues

* remove linq sorting
fix jumping system
minor fixes

* fix second Linq

* fix tesla colliders! Yeah, it works

* fix componentregistration

* Just retests

* not fix

* FIX TESLA

* fixes

* store targets

* back

* make dictionary of hashsets

* some sloth fixes

* stump

* playtest balance energy generation, return to unpotimized (but working) lightning shoot

* parity

* work on

* some new fix, some new bug (chasingComponent not chasing)

* comment

* fix ChasingWalkSystem

* fix collider tesla problem

* revert old unoptimized shoot lightning

* new fix pack

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Ed
2023-12-28 16:11:50 +03:00
committed by GitHub
parent 06719a3232
commit 88d7cfb4c0
51 changed files with 1374 additions and 90 deletions

View File

@@ -89,3 +89,33 @@
cost: 500
category: Engineering
group: market
- type: cargoProduct
id: EngineTeslaGenerator
icon:
sprite: Structures/Power/Generation/Tesla/generator.rsi
state: icon
product: CrateEngineeringTeslaGenerator
cost: 4000
category: Engineering
group: market
- type: cargoProduct
id: EngineTeslaCoil
icon:
sprite: Structures/Power/Generation/Tesla/coil.rsi
state: coil
product: CrateEngineeringTeslaCoil
cost: 1200
category: Engineering
group: market
- type: cargoProduct
id: EngineTeslaGroundingRod
icon:
sprite: Structures/Power/Generation/Tesla/coil.rsi
state: grounding_rod
product: CrateEngineeringTeslaGroundingRod
cost: 400
category: Engineering
group: market

View File

@@ -116,3 +116,27 @@
- id: WallmountGeneratorAPUElectronics
- id: HandheldGPSBasic
- id: InflatableDoorStack1
- type: entity
id: CrateEngineeringTeslaGenerator
parent: CrateEngineeringSecure
components:
- type: StorageFill
contents:
- id: TeslaGenerator
- type: entity
id: CrateEngineeringTeslaCoil
parent: CrateEngineeringSecure
components:
- type: StorageFill
contents:
- id: TeslaCoil
- type: entity
id: CrateEngineeringTeslaGroundingRod
parent: CrateEngineeringSecure
components:
- type: StorageFill
contents:
- id: TeslaGroundingRod

View File

@@ -17,3 +17,28 @@
tags:
- HideContextMenu
- type: AnimationPlayer
- type: entity
id: EffectTeslaSparks
noSpawn: true
components:
- type: TimedDespawn
lifetime: 0.5
- type: Sprite
drawdepth: Effects
noRot: true
layers:
- shader: unshaded
map: ["enum.EffectLayers.Unshaded"]
sprite: Effects/atmospherics.rsi
state: frezon_old
- type: EffectVisuals
- type: Tag
tags:
- HideContextMenu
- type: AnimationPlayer
- type: EmitSoundOnSpawn
sound:
path: /Audio/Effects/tesla_consume.ogg
params:
variation: 0.3

View File

@@ -89,6 +89,9 @@
soundHit:
path: /Audio/Effects/hit_kick.ogg
- type: Pullable
- type: LightningTarget
priority: 2
lightningExplode: false
# Used for mobs that can enter combat mode and can attack.
- type: entity

View File

@@ -132,6 +132,8 @@
- type: AccessReader
- type: StaticPrice
price: 150
- type: LightningTarget
priority: 1
- type: Tag
tags:
- Airlock
@@ -140,3 +142,4 @@
placement:
mode: SnapgridCenter

View File

@@ -57,3 +57,5 @@
containers:
board: !type:Container
ents: []
- type: LightningTarget
priority: 1

View File

@@ -50,6 +50,8 @@
- type: ApcPowerReceiver
powerLoad: 1000
- type: ExtensionCableReceiver
- type: LightningTarget
priority: 1
- type: entity
abstract: true
@@ -66,3 +68,5 @@
containers:
- machine_parts
- machine_board
- type: LightningTarget
priority: 1

View File

@@ -0,0 +1,125 @@
- type: entity
id: TeslaCoil
name: tesla coil
description: A machine that converts lightning strikes into an electric current.
placement:
mode: SnapgridCenter
components:
- type: Transform
anchored: true
- type: Physics
bodyType: Static
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.45,0.45,0.45"
density: 190
mask:
- MachineMask
layer:
- MachineLayer
- type: Sprite
sprite: Structures/Power/Generation/Tesla/coil.rsi
snapCardinals: true
noRot: true
layers:
- state: coil
map: ["enabled"]
- state: coilhit
visible: false
map: ["hit"]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.TeslaCoilVisuals.Enabled:
enabled:
True: { state: coil_open }
False: { state: coil }
enum.TeslaCoilVisuals.Lightning:
hit:
True: { visible: true }
False: { visible: false }
- type: LightningSparking
- type: AnimationPlayer
- type: NodeContainer
examinable: true
nodes:
input:
!type:CableDeviceNode
nodeGroupID: HVPower
- type: Battery
maxCharge: 1000000
startingCharge: 0
- type: BatteryDischarger
activeSupplyRate: 15000
- type: TeslaCoil
chargeFromLightning: 1000000
- type: LightningTarget
priority: 4
lightningExplode: false
- type: PowerNetworkBattery
maxSupply: 1000000
supplyRampTolerance: 1000000
- type: Anchorable
- type: Rotatable
- type: Pullable
- type: Clickable
- type: InteractionOutline
#- type: GuideHelp # To Do - add Tesla Guide
- type: entity
id: TeslaGroundingRod
name: grounding rod
description: A machine that keeps lightning from striking too far away.
placement:
mode: SnapgridCenter
components:
- type: Transform
anchored: true
- type: Physics
bodyType: Static
- type: Fixtures
fixtures:
fix1:
shape:
!type:PhysShapeAabb
bounds: "-0.45,-0.45,0.45,0.45"
density: 110
mask:
- MachineMask
layer:
- MachineLayer
- type: Sprite
sprite: Structures/Power/Generation/Tesla/coil.rsi
noRot: true
snapCardinals: true
layers:
- state: grounding_rod
map: ["power"]
- state: grounding_rodhit
visible: false
map: ["hit"]
- type: Appearance
- type: GenericVisualizer
visuals:
enum.TeslaCoilVisuals.Lightning:
hit:
True: { visible: true }
False: { visible: false }
enum.TeslaCoilVisuals.Enabled:
power:
True: { state: grounding_rod }
False: { state: grounding_rod_open }
- type: LightningSparking
- type: LightningTarget
priority: 3
lightningResistance: 10
lightningExplode: false
- type: Anchorable
- type: Rotatable
- type: Pullable
- type: Clickable
- type: InteractionOutline
#- type: GuideHelp # To Do - add Tesla Guide

View File

@@ -0,0 +1,133 @@
- type: entity
id: BaseEnergyBall
abstract: true
components:
- type: Clickable
- type: Physics
bodyType: Dynamic
bodyStatus: InAir
sleepingAllowed: false
- type: CanMoveInAir
- type: ChasingWalk
minSpeed: 1
maxSpeed: 3
chasingComponent:
- type: LightningTarget
- type: AmbientSound
volume: 3
range: 15
sound:
path: /Audio/Effects/tesla.ogg
- type: PointLight
enabled: true
radius: 5
color: "#4080FF"
- type: Appearance
- type: LightningArcShooter
arcDepth: 2
maxLightningArc: 1
shootMinInterval: 4
shootMaxInterval: 10
shootRange: 3
lightningPrototype: Lightning
- type: entity
id: TeslaEnergyBall
parent: BaseEnergyBall
name: ball lightning
description: A giant ball of pure energy. The space around it is humming and melting.
components:
- type: Fixtures
fixtures:
EventHorizonCollider:
shape:
!type:PhysShapeCircle
radius: 0.55
hard: true
restitution: 0.8
density: 99999 # to do: remove the interaction with the explosions. Now the explosions can push the Tesla very far away from the station.
mask:
- Opaque
layer:
- GlassLayer
EventHorizonConsumer:
shape:
!type:PhysShapeCircle
radius: 0.65
hard: false
mask:
- Opaque
layer:
- GlassLayer
- type: EventHorizon
radius: 0.5
canBreachContainment: false
colliderFixtureId: EventHorizonCollider
consumerFixtureId: EventHorizonConsumer
consumeTiles: false
consumeEntities: false
- type: TeslaEnergyBall
spawnProto: TeslaMiniEnergyBall
- type: LightningArcShooter
arcDepth: 3
maxLightningArc: 4
shootMinInterval: 3
shootMaxInterval: 5
shootRange: 7
lightningPrototype: Lightning #To do: change to HyperchargedLightning, after fix beam system
- type: ChasingWalk
minSpeed: 1
maxSpeed: 3
- type: ChaoticJump
jumpMinInterval: 8
jumpMaxInterval: 15
offset: 1
- type: WarpPoint
follow: true
location: tesla ball
- type: Sprite
drawdepth: Effects
sprite: Structures/Power/Generation/Tesla/energy_ball.rsi
shader: unshaded
layers:
- state: energy_ball
- type: EmitSoundOnSpawn
sound:
path: /Audio/Effects/tesla_collapse.ogg
params:
variation: 0.3
- type: entity
id: TeslaMiniEnergyBall
parent: BaseEnergyBall
name: mini ball lightning
description: The cub of a destructive energy cage. Not as dangerous, but still not worth touching with bare hands.
components:
- type: ChasingWalk
minSpeed: 2
maxSpeed: 3
chasingComponent:
- type: TeslaEnergyBall
- type: Fixtures
fixtures:
TeslaCollider:
shape:
!type:PhysShapeCircle
radius: 0.35
hard: true
restitution: 0.8
density: 10
mask:
- None
layer:
- None
- type: TimedDespawn
lifetime: 120
- type: Sprite
drawdepth: Effects
sprite: Structures/Power/Generation/Tesla/energy_miniball.rsi
shader: unshaded
layers:
- state: tesla_projectile
- type: Electrified
requirePower: false

View File

@@ -0,0 +1,29 @@
- type: entity
id: TeslaGenerator
name: tesla generator
parent: BaseStructureDynamic
description: An Odd Device which produces a powerful Tesla ball when set up.
components:
- type: Sprite
noRot: true
sprite: Structures/Power/Generation/Tesla/generator.rsi
state: icon
- type: SingularityGenerator #To do: rename the generator
spawnId: TeslaEnergyBall
- type: InteractionOutline
- type: Fixtures
fixtures:
fix1:
shape:
# Using a circle here makes it a lot easier to pull it all the way from Cargo
!type:PhysShapeCircle
radius: 0.45
density: 190
# Keep an eye on ParticlesProjectile when adjusting these
mask:
- MachineMask
layer:
- Opaque
- type: Anchorable
#- type: GuideHelp # To Do - add Tesla Guide

View File

@@ -131,6 +131,8 @@
requirePower: true
mediumVoltageNode: input
lowVoltageNode: output
- type: LightningTarget
priority: 1
- type: StaticPrice
price: 500