public static void Postfix(ConstructorInput __instance) { foreach (GameObject bot in __instance.constructor.buildBots) { LineRenderer rend = bot.GetComponent <ConstructorBuildBot>().lineRenderer; rend.startColor = Color.cyan; rend.endColor = Color.red; } }
public static void Postfix(ConstructorInput __instance, TechType techType) { Color col = new Color(0.4f, 1f, 0.4f); if (techType != MainPatch.sharkTech) { return; } foreach (GameObject bot in __instance.constructor.buildBots) { LineRenderer rend = bot.GetComponent <ConstructorBuildBot>().lineRenderer; rend.startColor = col; rend.endColor = col; } }
public static void Prefix(ConstructorInput __instance) { for (int i = 0; i < __instance.constructor.spawnPoints.Count; i++) { if (__instance.constructor.spawnPoints[i].techType == MainPatch.sharkTech) { return; } } __instance.constructor.spawnPoints.Add(new Constructor.SpawnPoint() { techType = MainPatch.sharkTech, transform = __instance.constructor.GetItemSpawnPoint(TechType.Seamoth) }); }
public static void ConstructorCraft(ConstructorInput input, TechType tech) { if (!CrafterLogic.ConsumeResources(tech)) { return; } uGUI.main.craftingMenu.Close(input); input.cinematicController.DisengageConstructor(); Transform spawn = input.constructor.GetItemSpawnPoint(tech); var position = spawn.position; var rotation = spawn.rotation; GameObject gameObject; if (tech == TechType.Cyclops) { SubConsoleCommand.main.SpawnSub("cyclops", position, rotation); gameObject = SubConsoleCommand.main.GetLastCreatedSub(); } else { gameObject = CraftData.InstantiateFromPrefab(tech, false); Transform component = gameObject.GetComponent <Transform>(); component.position = position; component.rotation = rotation; } LargeWorldEntity.Register(gameObject); gameObject.SendMessage("StartConstruction", SendMessageOptions.DontRequireReceiver); CrafterLogic.NotifyCraftEnd(gameObject, CraftData.GetTechType(gameObject)); Story.ItemGoalTracker.OnConstruct(tech); Commands.SendSpawn(gameObject, tech); }
public static void Postfix(ConstructorInput __instance, TechType techType, float duration) { NitroxServiceLocator.LocateService <MobileVehicleBay>().BeginCrafting(__instance.constructor.gameObject, techType, duration); }
public static void Postfix(ConstructorInput __instance, TechType techType, float duration) { Multiplayer.PacketSender.ConstructorBeginCrafting(__instance.constructor.gameObject, techType, duration); }
public static void Postfix(ConstructorInput __instance, TechType techType, float duration) { Multiplayer.Logic.MobileVehicleBay.BeginCrafting(__instance.constructor.gameObject, techType, duration); }