Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
About the PR
Adds a new psionic power: Seer. Seers can tap into the nosphere to predict the future giving mysterious omens of things to come. When used you will get a message corresponding to the next station event within 5 minutes. There may be a chance that the result will be random to simulate unreliable readings.
Why / Balance
Psionics are part of DeltaV's unique identity but can sometimes feel stale and ancillary. Psionic powers could use some more variety and give supporting systems more uses, and this ability could open the door to more roleplay and gameplay possibilities. People could play as oracles predicting the future and warning of ill tides and give fun interactions with reporters and chaplains. Telepathic chat can be a hub of rumors both current and future. A local seer may be consulted to warn the station of harm.
Technical details
Having an ability be able to predict the next event requires the next event to be pregenerated so that the seer ability can access it. To hold this data a new component EventManagerComponent (Need help with a proper name) will be attached to EventManagerSystem and will contain two fields, NextEventId and nextEventTime. RunRandomEvent(EntityTableSelector limitedEventsTable) will be modified to instead of running the event it generates, to use the EventManagerComponent.NextEventId and to store the new random event in NextEventId. The seer ability will also need to know when the next event is going to happen so that if there is a considerable gap ~5 minutes it will report no upcoming events. A new overloaded class RunRandomEvent(EntityTableSelector limitedEventsTable, int nextEventTime) will be made and the relevant callers will be updated to use that. The EventManagerComponent.NextEventId will first be compared to the current round time to ensure that events that should have already run don't take priority. If The EventManagerComponent.NextEventTime is before the current time then the passed nextEventTime will be stored. If not then the sooner of passed nextEventTime and The EventManagerComponent.NextEventTime will be stored. Callers using the non overloaded version will simply not update the nextEventTime.
Media
Requirements
Breaking changes
Hopefully, if all the logic is handled on the EventManagerSystem itself, systems using it will behave as expected but it is something to look out for.
Changelog