Space Ninjas auto-toggle internals after spawning (#25083)

* fix engine version

* actually fix engine version

* Automatically activated breathing masks

* weh

* who needed that component anyway

* check if internals are already running

* Update Content.Server/Atmos/Components/BreathToolComponent.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* Update Content.Server/Body/Systems/InternalsSystem.cs

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>

* prediction

* record struct event

* remove delayed activation, instead ensure that masks spawn last

* leftover

* engine version

* re-implement

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Errant
2024-05-03 03:24:21 +02:00
committed by GitHub
parent 192de3d9cb
commit f64dd5f45f
7 changed files with 65 additions and 20 deletions

View File

@@ -59,6 +59,7 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();
Subs.CVar(_configurationManager, CCVars.ICRandomCharacters, e => _randomizeCharacters = e, true);
_spawnerCallbacks = new Dictionary<SpawnPriorityPreference, Action<PlayerSpawningEvent>>()
@@ -181,7 +182,7 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
if (prototype?.StartingGear != null)
{
var startingGear = _prototypeManager.Index<StartingGearPrototype>(prototype.StartingGear);
EquipStartingGear(entity.Value, startingGear);
EquipStartingGear(entity.Value, startingGear, raiseEvent: false);
}
// Run loadouts after so stuff like storage loadouts can get
@@ -217,11 +218,14 @@ public sealed class StationSpawningSystem : SharedStationSpawningSystem
}
// Handle any extra data here.
EquipStartingGear(entity.Value, startingGear);
EquipStartingGear(entity.Value, startingGear, raiseEvent: false);
}
}
}
var gearEquippedEv = new StartingGearEquippedEvent(entity.Value);
RaiseLocalEvent(entity.Value, ref gearEquippedEv, true);
if (profile != null)
{
if (prototype != null)