nuke lights code change (#19315)

Co-authored-by: deltanedas <@deltanedas:kde.org>
This commit is contained in:
deltanedas
2023-09-04 15:14:10 +01:00
committed by GitHub
parent ecd43bccfc
commit 04cd014179
3 changed files with 15 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ public sealed class NukeSystem : EntitySystem
[Dependency] private readonly IRobustRandom _random = default!;
[Dependency] private readonly ITileDefinitionManager _tileDefManager = default!;
[Dependency] private readonly ItemSlotsSystem _itemSlots = default!;
[Dependency] private readonly PointLightSystem _pointLight = default!;
[Dependency] private readonly PopupSystem _popups = default!;
[Dependency] private readonly ServerGlobalSoundSystem _sound = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
@@ -455,6 +456,9 @@ public sealed class NukeSystem : EntitySystem
_sound.PlayGlobalOnStation(uid, _audio.GetSound(component.ArmSound));
// turn on the spinny light
_pointLight.SetEnabled(uid, true);
_itemSlots.SetLock(uid, component.DiskSlot, true);
if (!nukeXform.Anchored)
{
@@ -494,6 +498,9 @@ public sealed class NukeSystem : EntitySystem
component.PlayedAlertSound = false;
component.AlertAudioStream?.Stop();
// turn off the spinny light
_pointLight.SetEnabled(uid, false);
// start bomb cooldown
_itemSlots.SetLock(uid, component.DiskSlot, false);
component.Status = NukeStatus.COOLDOWN;

View File

@@ -23,6 +23,14 @@
- MachineMask
layer:
- HalfWallLayer
- type: PointLight
enabled: false
radius: 4
energy: 2.0
color: "#FF4020"
mask: /Textures/Effects/LightMasks/double_cone.png
- type: RotatingLight
speed: 120
- type: NukeLabel
- type: Nuke
explosionType: Default

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB