Content/Light: make lights actually require power after changing the lightbulb (#4953)
This commit is contained in:
@@ -219,11 +219,11 @@ namespace Content.Server.Light.Components
|
||||
public void UpdateLight()
|
||||
{
|
||||
var powerReceiver = Owner.GetComponent<ApcPowerReceiverComponent>();
|
||||
powerReceiver.Load = (LightBulb != null && _on && LightBulb.State == LightBulbState.Normal) ? LightBulb.PowerUse : 0;
|
||||
|
||||
if (LightBulb == null) // No light bulb.
|
||||
{
|
||||
SetLight(false);
|
||||
powerReceiver.Load = 0;
|
||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.Empty);
|
||||
return;
|
||||
}
|
||||
@@ -234,7 +234,6 @@ namespace Content.Server.Light.Components
|
||||
if (powerReceiver.Powered && _on)
|
||||
{
|
||||
SetLight(true, LightBulb.Color);
|
||||
powerReceiver.Load = LightBulb.PowerUse;
|
||||
_appearance?.SetData(PoweredLightVisuals.BulbState, PoweredLightState.On);
|
||||
var time = _gameTiming.CurTime;
|
||||
if (time > _lastThunk + _thunkDelay)
|
||||
|
||||
Reference in New Issue
Block a user