You can use lights to commit sudoku again.
This commit is contained in:
@@ -49,6 +49,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
private bool _hasLampOnSpawn;
|
private bool _hasLampOnSpawn;
|
||||||
|
|
||||||
[ViewVariables] private bool _on;
|
[ViewVariables] private bool _on;
|
||||||
|
[ViewVariables] private bool _currentLit;
|
||||||
[ViewVariables] private bool _isBlinking;
|
[ViewVariables] private bool _isBlinking;
|
||||||
[ViewVariables] private bool _ignoreGhostsBoo;
|
[ViewVariables] private bool _ignoreGhostsBoo;
|
||||||
|
|
||||||
@@ -98,7 +99,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
if (LightBulb == null)
|
if (LightBulb == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return _lightState && heatResistance < LightBulb.BurningTemperature;
|
return _currentLit && heatResistance < LightBulb.BurningTemperature;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Burn()
|
void Burn()
|
||||||
@@ -171,8 +172,6 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
UpdateLight();
|
UpdateLight();
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool _lightState => Owner.GetComponent<PointLightComponent>().Enabled;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Updates the light's power drain, sprite and actual light state.
|
/// Updates the light's power drain, sprite and actual light state.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -182,6 +181,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
|
|
||||||
if (LightBulb == null) // No light bulb.
|
if (LightBulb == null) // No light bulb.
|
||||||
{
|
{
|
||||||
|
_currentLit = false;
|
||||||
powerReceiver.Load = 0;
|
powerReceiver.Load = 0;
|
||||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Empty);
|
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Empty);
|
||||||
return;
|
return;
|
||||||
@@ -192,6 +192,7 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
case LightBulbState.Normal:
|
case LightBulbState.Normal:
|
||||||
if (powerReceiver.Powered && _on)
|
if (powerReceiver.Powered && _on)
|
||||||
{
|
{
|
||||||
|
_currentLit = true;
|
||||||
powerReceiver.Load = LightBulb.PowerUse;
|
powerReceiver.Load = LightBulb.PowerUse;
|
||||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.On);
|
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.On);
|
||||||
_appearance?.SetData(PoweredLightVisuals.BulbColor, LightBulb.Color);
|
_appearance?.SetData(PoweredLightVisuals.BulbColor, LightBulb.Color);
|
||||||
@@ -204,13 +205,16 @@ namespace Content.Server.GameObjects.Components.Power.ApcNetComponents.PowerRece
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
_currentLit = false;
|
||||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Off);
|
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Off);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case LightBulbState.Broken:
|
case LightBulbState.Broken:
|
||||||
|
_currentLit = false;
|
||||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Broken);
|
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Broken);
|
||||||
break;
|
break;
|
||||||
case LightBulbState.Burned:
|
case LightBulbState.Burned:
|
||||||
|
_currentLit = false;
|
||||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Burned);
|
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Burned);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
4
Resources/Changelog/Parts/light_burn.yml
Normal file
4
Resources/Changelog/Parts/light_burn.yml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
author: PJB
|
||||||
|
changes:
|
||||||
|
message: You can burn yourself on wall lights again.
|
||||||
|
type: Fix
|
||||||
Reference in New Issue
Block a user