Мягкий свет для всякого (#316)

* add: add small soft light to laser weapon + fix the bluest blue energy shield

* git commit

* boltlights done

* add: HuetaSystem

* add: Doorlights finally done

* add: small light to lockers

* add: small light to multitool

* fix: fix naming

* hui pizde

* fix: fix parasha

* add: small light to powercells

* zabil

* add: code light to welders

* tweak: better energy and radius

* add: better color parameters

* add: less radius and energy for guns

* add: better lights for vending machines

* add: better light to consoles

* add: better light for apc

* shut up

* fix: thank you neuro colleague
This commit is contained in:
ThereDrD0
2024-06-21 06:15:55 +03:00
committed by GitHub
parent 17eb97b3ac
commit 4419931172
27 changed files with 554 additions and 118 deletions

View File

@@ -1,3 +1,4 @@
using Content.Shared._White.Lighting;
using Content.Shared.Doors.Components;
using Content.Shared.Popups;
using Content.Shared.Prying.Components;
@@ -120,6 +121,7 @@ public abstract class SharedAirlockSystem : EntitySystem
public void UpdateEmergencyLightStatus(EntityUid uid, AirlockComponent component)
{
RaiseLocalEvent(uid, new DoorlightsChangedEvent(DoorVisuals.EmergencyLights, component.EmergencyAccess));
Appearance.SetData(uid, DoorVisuals.EmergencyLights, component.EmergencyAccess);
}

View File

@@ -1,3 +1,4 @@
using Content.Shared._White.Lighting;
using Content.Shared.Doors.Components;
using Content.Shared.Prying.Components;
@@ -55,7 +56,8 @@ public abstract partial class SharedDoorSystem
public void UpdateBoltLightStatus(Entity<DoorBoltComponent> ent)
{
AppearanceSystem.SetData(ent, DoorVisuals.BoltLights, GetBoltLightsVisible(ent));
var value = GetBoltLightsVisible(ent);
AppearanceSystem.SetData(ent, DoorVisuals.BoltLights, value);
}
public bool GetBoltLightsVisible(Entity<DoorBoltComponent> ent)
@@ -84,6 +86,8 @@ public abstract partial class SharedDoorSystem
Dirty(ent, ent.Comp);
UpdateBoltLightStatus(ent);
RaiseLocalEvent(ent, new DoorlightsChangedEvent(DoorVisuals.BoltLights, value), true);
var sound = value ? ent.Comp.BoltDownSound : ent.Comp.BoltUpSound;
if (predicted)
Audio.PlayPredicted(sound, ent, user: user);

View File

@@ -1,6 +1,7 @@
using System.Linq;
using Content.Shared._White.Cult.Structures;
using Content.Shared._White.Keyhole.Components;
using Content.Shared._White.Lighting;
using Content.Shared.Access.Components;
using Content.Shared.Access.Systems;
using Content.Shared.Administration.Logs;
@@ -116,6 +117,8 @@ public abstract partial class SharedDoorSystem : EntitySystem
|| door.State == DoorState.Opening && !door.Partial;
SetCollidable(ent, collidable, door);
RaiseLocalEvent(ent, new DoorlightsChangedEvent(door.State, true), true);
AppearanceSystem.SetData(ent, DoorVisuals.State, door.State);
}
@@ -164,6 +167,8 @@ public abstract partial class SharedDoorSystem : EntitySystem
_activeDoors.Add(ent);
RaiseLocalEvent(ent, new DoorStateChangedEvent(door.State));
RaiseLocalEvent(ent, new DoorlightsChangedEvent(door.State, true), true);
AppearanceSystem.SetData(ent, DoorVisuals.State, door.State);
}
@@ -212,7 +217,10 @@ public abstract partial class SharedDoorSystem : EntitySystem
door.State = state;
Dirty(uid, door);
RaiseLocalEvent(uid, new DoorStateChangedEvent(state));
RaiseLocalEvent(uid, new DoorlightsChangedEvent(door.State, true), true);
AppearanceSystem.SetData(uid, DoorVisuals.State, door.State);
return true;
}
@@ -516,6 +524,8 @@ public abstract partial class SharedDoorSystem : EntitySystem
{
door.NextStateChange = GameTiming.CurTime + door.OpenTimeTwo;
door.State = DoorState.Opening;
RaiseLocalEvent(uid, new DoorlightsChangedEvent(door.State, true), true);
AppearanceSystem.SetData(uid, DoorVisuals.State, DoorState.Opening);
return false;
}