Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using UnityEngine;
- namespace SimulateKerbl
- {
- public class SimulateKerbalSeat : PartModule, IPartMassModifier
- {
- public bool kerbalInSeat = false;
- public float GetModuleMass(float defaultMass, ModifierStagingSituation sit)
- {
- return kerbalInSeat ? 0.09375f : 0f;
- }
- public ModifierChangeWhen GetModuleMassChangeWhen()
- {
- return ModifierChangeWhen.FIXED;
- }
- [KSPEvent(active = true, advancedTweakable = true, guiActive = false, guiActiveEditor = true, guiName = "Kerbal in Seat: False")]
- public void ToggleWeight()
- {
- kerbalInSeat = !kerbalInSeat;
- Events["ToggleWeight"].guiName = "Kerbal in Seat: " + (kerbalInSeat ? "True" : "False");
- }
- }
- }
Add Comment
Please, Sign In to add comment