Another fixes and features (#392)

* fix: doorlights supports emagging now + fix emergency light

* add todo to PointLightAirlockSystem.cs

* tweak: reduce captain armor size

* fix: fix wt550 magazine stored rotation

* add: new lobby songs

* fix: fix lobby music rotation
This commit is contained in:
ThereDrD0
2024-06-29 09:49:43 +03:00
committed by GitHub
parent ef4e2feba9
commit e9232e638c
42 changed files with 68 additions and 28 deletions

View File

@@ -4,6 +4,9 @@ using Robust.Client.GameObjects;
namespace Content.Client._White.Lighting.PointLight.Airlock;
// TODO: Перепилить емаггинг дверей, потому что ебучие двери вообще не в курсе, емагнуты они или нет.
// А сам емаг просто ставит стейты, а не поражает дверь
// А еще он ставит дверь на болты каким-то хуем не меняя DoorVisuals.BoltLights
public sealed class PointLightAirlockSystem : EntitySystem
{
[Dependency] private readonly SharedPointLightSystem _pointLightSystem = default!;
@@ -44,10 +47,16 @@ public sealed class PointLightAirlockSystem : EntitySystem
if (!args.AppearanceData.TryGetValue(DoorVisuals.State, out var state))
return;
HandleState(uid, component, (DoorState) state);
if (!component.IsEmagged)
HandleState(uid, component, (DoorState) state);
if (args.AppearanceData.TryGetValue(DoorVisuals.EmergencyLights, out var emergency))
ToggleLight(uid, component.YellowColor, component, (bool) emergency);
{
if ((bool) emergency)
ToggleLight(uid, component.YellowColor, component, (bool) emergency);
else if (!component.IsEmagged)
HandleState(uid, component, (DoorState) state);
}
if (!args.AppearanceData.TryGetValue(DoorVisuals.BoltLights, out var boltsDown))
return;
@@ -59,17 +68,25 @@ public sealed class PointLightAirlockSystem : EntitySystem
else if (args.AppearanceData.TryGetValue(DoorVisuals.EmergencyLights, out var emergencyLights) && (bool) emergencyLights)
ToggleLight(uid, component.YellowColor, component);
else
{
if (component.IsEmagged)
component.IsEmagged = false;
HandleState(uid, component, (DoorState) state);
}
}
component.LastBoltsState = (bool) boltsDown;
}
private void HandleState(EntityUid uid, PointLightAirlockComponent component, DoorState state)
{
switch (state)
{
case DoorState.Emagging:
ToggleLight(uid, component.RedColor, component);
component.IsEmagged = true;
break;
case DoorState.Open:
ToggleLight(uid, component.BlueColor, component);
break;