-
Notifications
You must be signed in to change notification settings - Fork 14
SnacksScenario
The SnacksScenario class is the heart of Snacks. It runs all the processes.
Tells listeners that snapshots were created.
Tells listeners that a simulator was created. Gives mods a chance to add custom converters not covered by Snacks.
Tells listeners that background converters were created. Gives mods a chance to add custom converters not covered by Snacks.
Signifies that snacking has occurred.
Signifies that the roster resource has been updated
Instance of the scenario.
Flag indicating whether or not logging is enabled.
Map of sciecnce penalties sorted by vessel.
Map of astronaut data, keyed by astronaut name.
List of kerbals that are exempt from outcome effects.
Last time the processing cycle started.
Map of the background conveters list, keyed by vessel.
List of resource processors that handle life support consumption and waste production.
List of resources that will be added to parts as they are created or loaded.
List of resources that are added to kerbals when they go on EVA.
Map of snapshots, keyed by vessel, that give a status of each vessel's visible life support resources and crew status.
Helper that gives a count, by celestial body id, of how many vessels are on or around the celestial body.
Map of all roster resources to add to kerbals as they are created.
List of conditions that will cause a skill loss. These conditions are defined via SKILL_LOSS_CONDITION nodes.
List of converters to watch for when creating snapshot simulations.
How many simulated seconds pass per simulator cycle.
Maximum number of simulator cycles to run.
Max number of simulator threads to create.
Updates the resource snapshots for each vessel in the game that isn't Debris, a Flag, a SpaceObject, or Unknown.
Returns the crew capacity of the vessel
vessel: The Vessel to query.
The crew capacity.
FixedUpdate handles all the processing tasks related to life support resources and event processing.
Runs the snack cyle immediately.
secondsElapsed: Seconds elapsed.
Finds the vessel that the kerbal is residing in.
astronaut: The astronaut to check.
The Vessel where the kerbal resides.
Determines whether or not the kerbal's skills should be removed.
astronaut: the ProtoCrewMember to investigate.
true, if remove skills should be removed, false otherwise.
Removes the skills if needed. The supplied kerbal must have at least one condition registered in a SKILL_LOSS_CONDITION config node in order to remove the skills.
astronaut: The kerbal to check.
Restores the skills if needed. The kerbal in question must not have any conditions that would result in a loss of skill.
astronaut: The kerbal to query.
Removes skills from the desired kerbal. Does not check to see if they should be removed based on condition summary.
astronaut: The ProtoCrewMember to remove skills from.
Restores skills to the desired kerbal. Does not check to see if they can be restored based on condition summary.
astronaut:
Adds the name of the kerbal to the exemptions list.
exemptedCrew: The name of the kerbal to add to the list.
Registers crew into the astronaut database.
vessel: The vessel to search for crew.
Unregisters the crew from the astronaut database.
protoVessel: The vessel to search for crew to unregister.
Unregisters the crew from the astronaut database.
vessel: The vessel to search for crew to unregister.
Registers the astronaut into the astronaut database.
astronaut: The astronaut to register.
Unregisters the astronaut from the astronaut database.
astronaut: The astronaut to unregister.
Unregisters the astronaut data from the astronaut database.
data: The astronaut data to unregister.
Returns the number of crew that aren't exempt.
vessel: The vessel to query for crew.
The number of victims. Er, number of non-exempt crew.
Returns the non-exempt crew in the vessel.
vessel: The Vessel to query.
An array of ProtoCrewMember objects if there are non-exempt crew, or null if not.
Returns the astronaut data associated with the astronaut.
astronaut: The ProtoCrewMember to check for astronaut data.
The AstronautData associated with the kerbal.
Saves the astronaut data into the database.
data: The AstronautData to save.
Adds the stress to crew if Stress is enabled. This is primarily used by 3rd party mods like BARIS.
vessel: The Vessel to query for crew.
stressAmount: The amount of Stress to add.
Formats the supplied seconds into a string.
secondsToFormat: The number of seconds to format.
showCompact: A flag to indicate whether or not to show the compact form.
Gets the number of seconds per day on the homeworld.
The lenght of the solar day in seconds of the homeworld.
Gets the solar flux based on vessel location.
vessel: The vessel to query.
The level of solar flux at the vessel's location.
Creates a new precondition based on the config node data passed in.
node: The ConfigNode containing data to parse.
A BasePrecondition containing the precondition object, or null if the config node couldn't be parsed.
Creates a new outcome based on the config node data passed in.
node: The ConfigNode containing data to parse.
The outcome corresponding to the desired config.