Extended rework & ramping event scheduler (#11362)

This commit is contained in:
Kara
2022-10-18 19:51:47 -07:00
committed by GitHub
parent 095a4a7136
commit 3fd226d9f0
19 changed files with 403 additions and 212 deletions

View File

@@ -179,6 +179,26 @@ namespace Content.Server.StationEvents.Events
.Where(p => p.Configuration is StationEventRuleConfiguration).ToArray());
}
public float GetSeverityModifier()
{
var ev = new GetSeverityModifierEvent();
RaiseLocalEvent(ev);
return ev.Modifier;
}
#endregion
}
/// <summary>
/// Raised broadcast to determine what the severity modifier should be for an event, some positive number that can be multiplied with various things.
/// Handled by usually other game rules (like the ramping scheduler).
/// Most events should try and make use of this if possible.
/// </summary>
public sealed class GetSeverityModifierEvent : EntityEventArgs
{
/// <summary>
/// Should be multiplied/added to rather than set, for commutativity.
/// </summary>
public float Modifier = 1.0f;
}
}