Fixes Torch (#3270)

* Updates RSI

* Done

* Finish

* SoulSloth you give me conniptions

* Nvm it was Nuke who made this, sorry soulsloth.

* E

* I am retar
This commit is contained in:
Swept
2021-02-27 09:23:14 +00:00
committed by GitHub
parent 9b94d5c195
commit 1056b9005f
22 changed files with 219 additions and 166 deletions

View File

@@ -74,32 +74,6 @@
visuals:
- type: FlashLightVisualizer
- type: entity
name: torch
id: Torch
parent: BaseLamp
description: A torch fashioned from some leaves and a log.
components:
- type: Sprite
sprite: Objects/Misc/torch.rsi
layers:
- state: torch
- state: torch_on
shader: unshaded
visible: false
- type: Item
sprite: Objects/Misc/torch.rsi
HeldPrefix: off
- type: PointLight
enabled: false
radius: 1
energy: 4
color: "#FFC458"
- type: LoopingSound
- type: Appearance
visuals:
- type: LanternVisualizer
- type: entity
name: floodlight
id: Floodlight

View File

@@ -0,0 +1,77 @@
- type: entity
name: torch # todo: we need some sort of IgnitionSourceComponent we can add to this, so when it's lit it will cause fires when touching fuel
parent: BaseItem
id: Torch
description: A torch fashioned from some wood.
components:
- type: ExpendableLight
spentName: burnt torch
spentDesc: It looks like this torch has burnt out. What a bummer.
glowDuration: 100
fadeOutDuration: 4
iconStateSpent: torch_spent
turnOnBehaviourID: turn_on
fadeOutBehaviourID: fade_out
# Sounds legit nuff
litSound: /Audio/Items/Flare/flare_on.ogg
loopedSound: /Audio/Items/Flare/flare_burn.ogg
- type: Sprite
sprite: Objects/Misc/torch.rsi
layers:
- state: torch_unlit
- state: lit_overlay
color: "#FFFFFF"
visible: false
shader: unshaded
- type: Icon
sprite: Objects/Misc/torch.rsi
state: icon
- type: Item
sprite: Objects/Misc/torch.rsi
HeldPrefix: unlit
- type: LoopingSound
- type: Construction
graph: lightTorch
node: torch
- type: Appearance
visuals:
- type: ExpendableLightVisualizer
- type: PointLight
enabled: false
color: "#E25822"
radius: 1.0
energy: 5.0
- type: LightBehaviour
behaviours:
- !type:RandomizeBehaviour # immediately make it bright and flickery
id: turn_on
interpolate: Nearest
minDuration: 0.02
maxDuration: 0.06
startValue: 6.0
endValue: 9.0
property: Energy
isLooped: true
- !type:FadeBehaviour # have the radius start small and get larger as it starts to burn
id: turn_on
interpolate: Linear
maxDuration: 8.0
startValue: 1.0
endValue: 6.0
property: Radius
- !type:RandomizeBehaviour # weaker flicker as it fades out
id: fade_out
interpolate: Nearest
minDuration: 0.02
maxDuration: 0.06
startValue: 4.0
endValue: 8.0
property: Energy
isLooped: true
- !type:FadeBehaviour # fade out radius as it burns out
id: fade_out
interpolate: Linear
maxDuration: 4.0
startValue: 6.0
endValue: 1.0
property: Radius

View File

@@ -7,7 +7,7 @@
- type: ExpendableLight
spentName: spent flare
spentDesc: It looks like this flare has burnt out. What a bummer.
glowDuration: 400
glowDuration: 150
fadeOutDuration: 4
iconStateOn: flare_unlit
iconStateSpent: flare_spent
@@ -31,7 +31,7 @@
- type: Item
sprite: Objects/Misc/flare.rsi
color: "#FF0000"
HeldPrefix: off
HeldPrefix: unlit
- type: LoopingSound
- type: Appearance
visuals:

View File

@@ -0,0 +1,13 @@
- type: constructionGraph
id: lightTorch
start: start
graph:
- node: start
edges:
- to: torch
steps:
- material: Wood
amount: 2
doAfter: 2
- node: torch
entity: Torch

View File

@@ -0,0 +1,10 @@
- type: construction
name: torch
id: LightTorch
graph: lightTorch
startNode: start
targetNode: torch
category: Tools
description: A torch fashioned from some wood.
icon: Objects/Misc/torch.rsi/icon.png
objectType: Item