Added the ability to refuel torches (and other expendable lights) (#36209)

* Added expendable light source refueling. Also fixed it to use the name modifier system so attributes like glue show up.

* Removed a duplicate line of code.

* Replaced TryGetComponent with TryComp, changed a variable name to be a little more clear.

* Removed the removed field "spentDesc" in flares and glowsticks

* Fixed to comply with slarticodefast's review. Name modifiers don't work yet (fixing that tmr)

* Fixed the localization!!!! :DDDD
This commit is contained in:
mjarduk
2025-04-18 04:59:41 +03:00
committed by GitHub
parent 2c60d6b27f
commit fb912b3d5c
6 changed files with 73 additions and 46 deletions

View File

@@ -5,9 +5,9 @@
description: A torch fashioned from some wood.
components:
- type: ExpendableLight
spentName: expendable-light-burnt-torch-name
spentDesc: expendable-light-burnt-torch-desc
refuelMaterialID: WoodPlank
glowDuration: 100
refuelMaximumDuration: 205
fadeOutDuration: 4
iconStateSpent: torch_spent
turnOnBehaviourID: turn_on

View File

@@ -10,8 +10,6 @@
- Trash
- type: SpaceGarbage
- type: ExpendableLight
spentName: expendable-light-spent-flare-name
spentDesc: expendable-light-spent-flare-desc
glowDuration: 225
fadeOutDuration: 15
iconStateOn: flare_unlit

View File

@@ -6,8 +6,6 @@
components:
- type: SpaceGarbage
- type: ExpendableLight
spentName: expendable-light-spent-green-glowstick-name
spentDesc: expendable-light-spent-glowstick-desc
glowDuration: 900 # time in seconds
glowColorLit: "#00FF00"
fadeOutDuration: 300