Use ECS prototype-reload events (#22613)

* Use ECS prototype-reload events

* better constructors

* Maybe this fixes tests?
This commit is contained in:
Leon Friedrich
2023-12-22 09:13:45 -05:00
committed by GitHub
parent 053c1e877f
commit b6bd82caa6
23 changed files with 135 additions and 242 deletions

View File

@@ -85,14 +85,13 @@ public sealed partial class BiomeSystem : SharedBiomeSystem
SubscribeLocalEvent<ShuttleFlattenEvent>(OnShuttleFlatten);
_configManager.OnValueChanged(CVars.NetMaxUpdateRange, SetLoadRange, true);
InitializeCommands();
ProtoManager.PrototypesReloaded += ProtoReload;
SubscribeLocalEvent<PrototypesReloadedEventArgs>(ProtoReload);
}
public override void Shutdown()
{
base.Shutdown();
_configManager.UnsubValueChanged(CVars.NetMaxUpdateRange, SetLoadRange);
ProtoManager.PrototypesReloaded -= ProtoReload;
}
private void ProtoReload(PrototypesReloadedEventArgs obj)