Remove atmos method events (#26402)
* Remove HasAtmosphereMethodEvent * Remove GetTileMixturesMethodEvent * Remove GetTileMixtureMethodEvent * Remove GetAdjacentTilesMethodEvent * Add TileMixtureEnumerator * Remove GetAdjacentTileMixturesMethodEvent * Remove IsTileSpaceMethodEvent * Remove HotspotExposeMethodEvent * Remove pipe net method events * Remove device method events * Use Entity<T> * Misc fixes * A * Theres probably a few more of these * Fix other resolve errors
This commit is contained in:
@@ -12,9 +12,6 @@ public partial class AtmosphereSystem
|
||||
{
|
||||
SubscribeLocalEvent<MapAtmosphereComponent, ComponentInit>(OnMapStartup);
|
||||
SubscribeLocalEvent<MapAtmosphereComponent, ComponentRemove>(OnMapRemove);
|
||||
SubscribeLocalEvent<MapAtmosphereComponent, IsTileSpaceMethodEvent>(MapIsTileSpace);
|
||||
SubscribeLocalEvent<MapAtmosphereComponent, GetTileMixtureMethodEvent>(MapGetTileMixture);
|
||||
SubscribeLocalEvent<MapAtmosphereComponent, GetTileMixturesMethodEvent>(MapGetTileMixtures);
|
||||
SubscribeLocalEvent<MapAtmosphereComponent, ComponentGetState>(OnMapGetState);
|
||||
SubscribeLocalEvent<GridAtmosphereComponent, EntParentChangedMessage>(OnGridParentChanged);
|
||||
}
|
||||
@@ -31,37 +28,6 @@ public partial class AtmosphereSystem
|
||||
RefreshAllGridMapAtmospheres(uid);
|
||||
}
|
||||
|
||||
private void MapIsTileSpace(EntityUid uid, MapAtmosphereComponent component, ref IsTileSpaceMethodEvent args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
args.Result = component.Space;
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void MapGetTileMixture(EntityUid uid, MapAtmosphereComponent component, ref GetTileMixtureMethodEvent args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
args.Mixture = component.Mixture;
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
private void MapGetTileMixtures(EntityUid uid, MapAtmosphereComponent component, ref GetTileMixturesMethodEvent args)
|
||||
{
|
||||
if (args.Handled)
|
||||
return;
|
||||
args.Handled = true;
|
||||
args.Mixtures ??= new GasMixture?[args.Tiles.Count];
|
||||
|
||||
for (var i = 0; i < args.Tiles.Count; i++)
|
||||
{
|
||||
args.Mixtures[i] ??= component.Mixture;
|
||||
}
|
||||
}
|
||||
|
||||
private void OnMapGetState(EntityUid uid, MapAtmosphereComponent component, ref ComponentGetState args)
|
||||
{
|
||||
args.State = new MapAtmosphereComponentState(component.Overlay);
|
||||
|
||||
Reference in New Issue
Block a user