internal void Awake() { //get this SlotExtenderZero instance Instance = gameObject.GetComponent <SlotExtenderZero>(); 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 { Logger.Log("Unknown Vehicle type error! Instance destroyed!"); Destroy(Instance); } }
private void Awake() { // set this SlotExtenderZero instance Instance = this; if (gameObject.GetComponent <Exosuit>()) { // this Vehicle type is Exosuit ThisVehicle = Instance.GetComponent <Exosuit>(); } else if (gameObject.GetComponent <SeaTruckUpgrades>() != null) { // this Vehicle type is Seatruck //helper = new SeaTruckHelper(gameObject, false, false, false); helper = SeatruckServices.Main.GetSeaTruckHelper(gameObject); } }