Skip to content

Commit

Permalink
Different fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Mnemotechnician committed Aug 2, 2024
1 parent d97f904 commit 78c2ac2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Content.Server/StationEvents/EventManagerSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public string RunRandomEvent()
return errStr;
}

GameTicker.StartGameRule(randomEvent, out var ent);
var ent = GameTicker.AddGameRule(randomEvent);
var str = Loc.GetString("station-event-system-run-event",("eventName", ToPrettyString(ent)));
Log.Info(str);
return str;
Expand Down Expand Up @@ -162,7 +162,7 @@ public TimeSpan TimeSinceLastEvent(EntityPrototype stationEvent)

private bool CanRun(EntityPrototype prototype, StationEventComponent stationEvent, int playerCount, TimeSpan currentTime)
{
if (GameTicker.IsGameRuleActive(prototype.ID))
if (GameTicker.IsGameRuleAdded(prototype.ID))
return false;

if (stationEvent.MaxOccurrences.HasValue && GetOccurrences(prototype) >= stationEvent.MaxOccurrences.Value)
Expand Down

0 comments on commit 78c2ac2

Please sign in to comment.