internal void Awake() { //get this SlotExtender instance Instance = GetComponent <SlotExtender>(); if (Instance.GetComponent <SeaMoth>()) { //this Vehicle type is SeaMoth ThisVehicle = Instance.GetComponent <SeaMoth>(); //add extra slots foreach (string slotID in SlotHelper.NewSeamothSlotIDs) { ThisVehicle.modules.AddSlot(slotID); } } else if (Instance.GetComponent <Exosuit>()) { //this Vehicle type is Exosuit ThisVehicle = Instance.GetComponent <Exosuit>(); //add extra slots foreach (string slotID in SlotHelper.NewExosuitSlotIDs) { ThisVehicle.modules.AddSlot(slotID); } } else { SNLogger.Log($"[{SEConfig.PROGRAM_NAME}] Unknown Vehicle type error! Instance destroyed!"); Destroy(Instance); } }
internal void Awake() { // set this SlotExtender instance Instance = this; if (gameObject.GetComponent <SeaMoth>()) { // set this Vehicle to SeaMoth ThisVehicle = GetComponent <SeaMoth>(); } else if (gameObject.GetComponent <Exosuit>()) { // set this Vehicle to Exosuit ThisVehicle = Instance.GetComponent <Exosuit>(); } }