-
Notifications
You must be signed in to change notification settings - Fork 14
SnacksEvent
This class represents an "event" in Snacks. Events consist of one or more preconditions and one or more outcomes. Preconditions are things like random numbers, the pressence of specific conditions, and the like. All preconditions must be met before the event outcomes can be applied. The outcomes include all the Snacks penalties as well as other things such as setting conditions.
Event is processed after the resource process cycle completes.
The event is chosen at random once per process cycle.
The event is processed when a kerbal levels up.
The event's category
The type of kerbals affected by the event.
Number of seconds that must pass before the event can be checked.
The number of day that must pass before the event can be checked. Overrides secondsBetweenChecks.
Player-friendly message to display when outcomes are going to be applied.
Name of the event
Initializes a new instance of the class.
Initializes a new instance of the class.
node: A ConfigNode specifying the initialization parameters.
Applies outcomes to the supplied astronaut
astronaut: The ProtoCrewMember to apply outcomes to.
vessel: The Vessel to check
Applies outcomes to the supplied astronaut
astronaut: The ProtoCrewMember to apply outcomes to.
Checks all preconditions against the supplied astronaut
astronaut: The ProtoCrewMember to check
vessel: The Vessel to check
Checks all preconditions against the supplied astronaut
astronaut: The ProtoCrewMember to check
Determines if the event can be evaluated based on the supplied elapsed time.
elapsedTime: The number of seconds that have passed since the last inquiry.
true if it's time to evaluate the event, false if not.
Processes the event based on elapsed time, event type, and kerbals affected.
elapsedTime: The elapsed time since the last process cycle, ignored for event cards.
Loads the persistent data.
node: A ConfigNode with persistent data.
Saves the persistent data.
A ConfigNode with persistent data.