9 public override int SubMenuModeIndex
13 return (
int)this.mode;
18 public override void OnClickSubMenu(
int a)
24 public override string OnSetSubMenuButton(
int a, UIButton b)
28 return "populate" + a.ToEnum<
AM_Populate.Mode>().ToString();
34 public override void OnProcessTiles(
Point point,
int dir)
36 if (this.timer < 0.1f)
41 Cell cell = point.cell;
42 EClass._map.ForeachSphere(point.x, point.z, (
float)
this.brushRadius, delegate(
Point p)
48 if (this.mode !=
AM_Populate.Mode.Delete && !p.HasBlock && !p.HasObj)
50 for (
int i = 0; i < 200; i++)
52 if (
EClass.rnd(Mathf.Clamp(
this.brushRadius *
this.brushRadius - 3, 1, 10)) == 0)
54 if (EInput.isShiftDown)
57 for (
int j = 0; j < 10000; j++)
59 p.cell.biome.Populate(p,
false);
60 if (p.growth !=
null && p.growth.IsTree)
73 p.cell.biome.Populate(p,
false);
76 if (this.brushRadius > 1 || p.HasObj)
86 public AM_Populate.Mode mode;