FlashLightVisualizer refactor + low power handheld light light radius fix (#11768)
* refactor: Removes FlashLightVisualizer (based on obsolete code) in favor or merging its functionality with HandheldLightComponent fix: Low power lighting radius animations for lanterns, floodlights and flashlights now properly restore the original light radius when going back to full power * refactor: Use the LightBehaviour component to animate HandheldLights refactor: Remove unneeded HandheldLight definitions in some yaml files (already inherited by parents) fix: Properly change the server side PointLightComponent Enabled property when turning HandheldLights on/off feat: ReverseWhenFinished property on Fade light behaviours * Empty commit to rerun CI with the new engine PR * fix: Restore the correct HandheldLight addPrefix property, whoops * refactor: blinkingBehaviourID -> blinkingBehaviourId, radiatingBehaviourID -> radiatingBehaviourId
This commit is contained in:
@@ -54,10 +54,31 @@
|
||||
mask: /Textures/Effects/LightMasks/cone.png
|
||||
autoRot: true
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
- type: HandheldLight
|
||||
addPrefix: true
|
||||
blinkingBehaviourId: blinking
|
||||
radiatingBehaviourId: radiating
|
||||
- type: LightBehaviour
|
||||
behaviours:
|
||||
- !type:FadeBehaviour
|
||||
id: radiating
|
||||
interpolate: Linear
|
||||
maxDuration: 2.0
|
||||
startValue: 3.0
|
||||
endValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
reverseWhenFinished: true
|
||||
- !type:PulseBehaviour
|
||||
id: blinking
|
||||
interpolate: Nearest
|
||||
maxDuration: 1.0
|
||||
minValue: 0.1
|
||||
maxValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
- type: PowerCellSlot
|
||||
cellSlotId: cell_slot
|
||||
- type: ItemSlots
|
||||
@@ -155,10 +176,31 @@
|
||||
mask: /Textures/Effects/LightMasks/cone.png
|
||||
autoRot: true
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
- type: HandheldLight
|
||||
addPrefix: true
|
||||
blinkingBehaviourId: blinking
|
||||
radiatingBehaviourId: radiating
|
||||
- type: LightBehaviour
|
||||
behaviours:
|
||||
- !type:FadeBehaviour
|
||||
id: radiating
|
||||
interpolate: Linear
|
||||
maxDuration: 2.0
|
||||
startValue: 3.0
|
||||
endValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
reverseWhenFinished: true
|
||||
- !type:PulseBehaviour
|
||||
id: blinking
|
||||
interpolate: Nearest
|
||||
maxDuration: 1.0
|
||||
minValue: 0.1
|
||||
maxValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
- type: Battery
|
||||
maxCharge: 600 #lights drain 3/s but recharge of 2 makes this 1/s. Therefore 600 is 10 minutes of light.
|
||||
startingCharge: 600
|
||||
|
||||
@@ -20,10 +20,31 @@
|
||||
autoRot: true
|
||||
radius: 3
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
- type: HandheldLight
|
||||
addPrefix: false
|
||||
blinkingBehaviourId: blinking
|
||||
radiatingBehaviourId: radiating
|
||||
- type: LightBehaviour
|
||||
behaviours:
|
||||
- !type:FadeBehaviour
|
||||
id: radiating
|
||||
interpolate: Linear
|
||||
maxDuration: 2.0
|
||||
startValue: 3.0
|
||||
endValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
reverseWhenFinished: true
|
||||
- !type:PulseBehaviour
|
||||
id: blinking
|
||||
interpolate: Nearest
|
||||
maxDuration: 1.0
|
||||
minValue: 0.1
|
||||
maxValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
- type: ToggleableLightVisuals
|
||||
spriteLayer: light
|
||||
inhandVisuals:
|
||||
|
||||
@@ -6,6 +6,29 @@
|
||||
components:
|
||||
- type: HandheldLight
|
||||
addPrefix: true
|
||||
blinkingBehaviourId: blinking
|
||||
radiatingBehaviourId: radiating
|
||||
- type: LightBehaviour
|
||||
behaviours:
|
||||
- !type:FadeBehaviour
|
||||
id: radiating
|
||||
interpolate: Linear
|
||||
maxDuration: 2.0
|
||||
startValue: 3.0
|
||||
endValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
reverseWhenFinished: true
|
||||
- !type:PulseBehaviour
|
||||
id: blinking
|
||||
interpolate: Nearest
|
||||
maxDuration: 1.0
|
||||
minValue: 0.1
|
||||
maxValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
- type: PowerCellSlot
|
||||
cellSlotId: cell_slot
|
||||
- type: ItemSlots
|
||||
@@ -29,8 +52,6 @@
|
||||
energy: 2
|
||||
- type: ToggleableLightVisuals
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer # todo move to light visuals component.
|
||||
|
||||
- type: entity
|
||||
name: lamp
|
||||
|
||||
@@ -10,6 +10,29 @@
|
||||
- DroneUsable
|
||||
- type: HandheldLight
|
||||
addPrefix: false
|
||||
blinkingBehaviourId: blinking
|
||||
radiatingBehaviourId: radiating
|
||||
- type: LightBehaviour
|
||||
behaviours:
|
||||
- !type:FadeBehaviour
|
||||
id: radiating
|
||||
interpolate: Linear
|
||||
maxDuration: 2.0
|
||||
startValue: 3.0
|
||||
endValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
reverseWhenFinished: true
|
||||
- !type:PulseBehaviour
|
||||
id: blinking
|
||||
interpolate: Nearest
|
||||
maxDuration: 1.0
|
||||
minValue: 0.1
|
||||
maxValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
toggleAction:
|
||||
name: action-name-toggle-light
|
||||
description: action-description-toggle-light
|
||||
@@ -53,8 +76,6 @@
|
||||
autoRot: true
|
||||
radius: 4.5
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: FlashLightVisualizer
|
||||
- type: StaticPrice
|
||||
price: 40
|
||||
|
||||
|
||||
@@ -6,6 +6,29 @@
|
||||
components:
|
||||
- type: HandheldLight
|
||||
addPrefix: true
|
||||
blinkingBehaviourId: blinking
|
||||
radiatingBehaviourId: radiating
|
||||
- type: LightBehaviour
|
||||
behaviours:
|
||||
- !type:FadeBehaviour
|
||||
id: radiating
|
||||
interpolate: Linear
|
||||
maxDuration: 2.0
|
||||
startValue: 3.0
|
||||
endValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
reverseWhenFinished: true
|
||||
- !type:PulseBehaviour
|
||||
id: blinking
|
||||
interpolate: Nearest
|
||||
maxDuration: 1.0
|
||||
minValue: 0.1
|
||||
maxValue: 2.0
|
||||
isLooped: true
|
||||
property: Radius
|
||||
enabled: false
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/lantern.rsi
|
||||
layers:
|
||||
@@ -24,8 +47,6 @@
|
||||
energy: 2.5
|
||||
color: "#FFC458"
|
||||
- type: Appearance
|
||||
visuals:
|
||||
- type: LanternVisualizer
|
||||
- type: ToggleableLightVisuals
|
||||
- type: PowerCellSlot
|
||||
cellSlotId: cell_slot
|
||||
|
||||
Reference in New Issue
Block a user