8 public override bool CanProgress()
10 return base.CanProgress() && this.pos.cell.IsTopWater && this.pot.owner.c_charges < this.pot.MaxCharge;
15 public override int destDist
24 public override bool CanManualCancel()
31 public override bool CanPressRepeat
41 public override bool Loop
45 return this.CanProgress();
51 public override CursorInfo CursorIcon
55 return CursorSystem.Hand;
62 p.textHint = this.Name;
64 p.onProgressBegin = delegate()
66 if (this.owner.Tool !=
null)
68 this.owner.Say(
"drawWater_start", this.owner, this.owner.Tool,
null,
null);
73 SourceMaterial.Row row = this.pos.cell.HasBridge ? this.pos.cell.matBridge : this.pos.cell.matFloor;
74 row.PlayHitEffect(this.pos);
75 this.owner.PlaySound(row.GetSoundImpact(
null), 1f,
true);
77 p.onProgressComplete = delegate()
79 Effect.Get(
"mine").Play(this.pos, 0f,
null,
null).SetParticleColor(this.pos.cell.HasBridge ?
this.pos.matBridge.GetColor() :
this.pos.matFloor.GetColor()).Emit(10 +
EClass.rnd(10));
80 this.pos.Animate(AnimeID.Dig,
true);
81 this.owner.PlaySound(
"water", 1f,
true);
82 this.pot.owner.Dye(this.pos.HasBridge ?
this.pos.matBridge :
this.pos.matFloor);
83 string alias = (this.pos.HasBridge ? this.pos.sourceBridge : this.pos.sourceFloor).alias;
84 if (!(alias ==
"floor_water_shallow"))
86 if (!(alias ==
"floor_water"))
88 if (!(alias ==
"floor_water_deep"))
90 this.<OnCreateProgress>g__ChangeFloor|11_3(
"floor_raw3");
94 this.<OnCreateProgress>g__ChangeFloor|11_3(
"floor_water");
99 this.<OnCreateProgress>g__ChangeFloor|11_3(
"floor_water_shallow");
104 this.<OnCreateProgress>g__ChangeFloor|11_3(
"floor_water_shallow2");
106 this.pot.owner.ModCharge(1,
false);
107 this.owner.elements.ModExp(286, 5,
false);
110 this.owner.stamina.Mod(-1);
116 public override HitResult GetHitResult()
118 if (!this.pos.cell.IsTopWater ||
this.pos.HasObj ||
this.pos.cell.blocked)
120 return HitResult.Invalid;
122 return HitResult.Valid;
127 private void <OnCreateProgress>g__ChangeFloor|11_3(
string id)
130 if (this.pos.HasBridge)
132 this.pos.cell._bridge = (byte)row.id;
133 if (
id ==
"floor_raw3")
135 this.pos.cell._bridgeMat = 45;
140 this.pos.cell._floor = (byte)row.id;
141 if (
id ==
"floor_raw3")
143 this.pos.cell._floorMat = 45;
146 EClass._map.SetLiquid(this.pos.x,
this.pos.z,
null);
147 this.pos.RefreshNeighborTiles();