Add conditional spawning component (#1069)

* Add conditional spawning component

* Remove null checks

* Remove leftover return

* Properly spawn items when game rule gets added

* Fix duplicate uids in saltern

* GameRules returns IEnumerable using yield.
This commit is contained in:
Víctor Aguilera Puerto
2020-06-05 19:42:43 +02:00
committed by GitHub
parent 470f81fca1
commit e1df008bce
11 changed files with 429 additions and 1 deletions

View File

@@ -15,6 +15,7 @@ namespace Content.Server.Interfaces.GameTicking
GameRunLevel RunLevel { get; }
event Action<GameRunLevelChangedEventArgs> OnRunLevelChanged;
event Action<GameRuleAddedEventArgs> OnRuleAdded;
void Initialize();
void Update(FrameEventArgs frameEventArgs);
@@ -34,6 +35,7 @@ namespace Content.Server.Interfaces.GameTicking
// GameRule system.
T AddGameRule<T>() where T : GameRule, new();
bool HasGameRule(Type type);
void RemoveGameRule(GameRule rule);
IEnumerable<GameRule> ActiveGameRules { get; }