public static void LogEffect(ZBEffect effect, ref string data) { data = Printer.Cat(data, "\n", "--- EFFECT ---"); data = Printer.Cat(data, "\n", "effect=", effect); data = Printer.Cat(data, "\n", "seed=", effect.seed); Printer.Log(35, "Zone.Log EFFECT"); data = Printer.Cat(data, "\n", "Cycler=", effect.Cycler); Printer.Log(35, "Zone.Log Cycler"); data = Printer.Cat(data, "\n", "Repeater=", effect.Repeater); Printer.Log(35, "Zone.Log Repeater"); data = Printer.Cat(data, "\n"); data = Printer.Cat(data, "\n", "options=", effect.opt); Printer.Log(35, "Zone.Log options"); // firestorm:last ok // Printer.Print("Zone.Log OptionBlock=", effect.opt.OptionBlock); if (effect.opt.OptionBlock == null) { data = Printer.Cat(data, "\n", "Block", "OptionBlock is null !"); } else { data = Printer.Cat(data, "\n", "Block", effect.opt.OptionBlock.block); } Printer.Log(35, "Zone.Log Block"); data = Printer.Cat(data, "\n", "pace", effect.opt.OptionShape.pace, "shape", effect.opt.OptionShape.shape); data = Printer.Cat(data, "\n", " setter (avB/avE,elastic):", effect.opt.OptionBlock.avoidBlock, effect.opt.OptionBlock.avoidEntity, effect.opt.OptionBlock.elastic); Printer.Log(35, "Zone.Log Repeater"); }
public Zone(int xi, int zi) { /** Zone generated with reproducible randomness from: seed, size and (x,z)-position * - x,z are NW corner of the zone * - biome arg should be null (force it in debug mode) **/ this.seed = String.Format("Zone{0}_{1}_{2}_{3}", Zombiome.worldSeed, Zombiome.worldSize, xi, zi); // receives center /* Geometry */ this.x = Hashes.Rand(xi * ZoneSize, (xi + 1) * ZoneSize, seed, "xcenter"); this.z = Hashes.Rand(zi * ZoneSize, (zi + 1) * ZoneSize, seed, "zcenter"); this.radius = CSutils.Hashes.Rand(20, ZoneSize / 2, seed, "radius"); /* Biome (TODO:robustify: get at a few other points) */ biomeFromPlayer = false; if (true) // (biome == null) { { this.biomeDef = GetBiomeProvider(this.x, this.z); if (this.biomeDef == null) { Printer.Write("Error NULL BiomeDefinition at", this.x, this.z, " ", xi, zi); Printer.Print("Error NULL BiomeDefinition at", this.x, this.z, " ", xi, zi); Printer.Print("player at ", GameManager.Instance.World.GetLocalPlayers()[0].GetPosition()); } else { Printer.Print("GetBiomeProvider", this.x, this.z, this.biomeDef, this.biomeDef == null); } } this.biome = ZBiomeInfo.Get(this.biomeDef.ToString()); effect = ZombiomeActivitySelector.Random(this); Printer.Log(64, "Zone instantiated:", this.x, this.z, biome, "seed:", seed, "effect:", effect, " dif/int:", difficulty, intensity); this.Log(); }