public override void Action(CommandCaller caller, string input, string[] args) { PrimalZergPlayer modPlayer = caller.Player.GetModPlayer <PrimalZergPlayer>(); caller.Reply("spawn rate boost of the concoction : " + modPlayer.zergMucusSpawnRate.ToString(), Color.Purple); caller.Reply("spawn cap boost of the concoction : " + modPlayer.zergMucusMaxSpawns.ToString(), Color.Purple); PrimalZerg.showSpawnInfo = true; }
public override void EditSpawnRate(Player player, ref int spawnRate, ref int maxSpawns) { PrimalZergPlayer modPlayer = player.GetModPlayer <PrimalZergPlayer>(); if (modPlayer.zergMucus == true) { maxSpawns = (int)(maxSpawns * modPlayer.zergMucusMaxSpawns); spawnRate = (int)(spawnRate / modPlayer.zergMucusSpawnRate); } if (PrimalZerg.showSpawnInfo) { Main.NewText("Actual spawn rate : " + spawnRate, Color.Purple); Main.NewText("Actual spawn cap : " + maxSpawns, Color.Purple); PrimalZerg.showSpawnInfo = false; } }
public override void Action(CommandCaller caller, string input, string[] args) { double value; bool isParsed = double.TryParse(args[0], out value); if (isParsed) { PrimalZergPlayer modPlayer = caller.Player.GetModPlayer <PrimalZergPlayer>(); modPlayer.zergMucusMaxSpawns = value; caller.Reply("The spawn cap boost of the concoction is now : " + modPlayer.zergMucusMaxSpawns.ToString(), Color.Purple); if (Main.netMode != NetmodeID.SinglePlayer) { ModPacket packet = mod.GetPacket(); packet.Write((byte)PrimalZergMessageType.ChangeZergMucusMaxSpawns); packet.Write((byte)caller.Player.whoAmI); packet.Write(value); packet.Send(); } } else { throw new UsageException("spawn cap value must be an number!"); } }
public override void Update(Player player, ref int buffIndex) { PrimalZergPlayer modPlayer = player.GetModPlayer <PrimalZergPlayer>(); modPlayer.zergMucus = true; }