8 public override bool CanProgress()
10 return base.CanProgress() && !this.pos.HasBridge && this.pos.cell.sourceSurface.alias !=
"floor_water_deep" && this.pot.owner.c_charges > 0;
15 public override int destDist
24 public override bool CanManualCancel()
31 public override bool CanPressRepeat
41 public override bool Loop
45 return this.CanProgress();
52 p.textHint = this.Name;
54 p.onProgressBegin = delegate()
56 if (this.owner.Tool !=
null)
58 this.owner.Say(
"pourWater_start", this.owner, this.owner.Tool,
null,
null);
63 (this.pos.cell.HasBridge ? this.pos.cell.matBridge : this.pos.cell.matFloor).PlayHitEffect(this.pos);
64 this.owner.PlaySound(
MATERIAL.sourceWaterSea.GetSoundImpact(
null), 1f,
true);
66 p.onProgressComplete = delegate()
68 if (this.pot.owner.DyeMat ==
null)
70 this.pot.owner.Dye(
MATERIAL.sourceWaterSea);
72 string alias = (this.pos.HasBridge ? this.pos.sourceBridge : this.pos.sourceFloor).alias;
73 if (!(alias ==
"floor_water_shallow2"))
75 if (!(alias ==
"floor_water_shallow"))
77 if (!(alias ==
"floor_water"))
79 this.<OnCreateProgress>g__ChangeFloor|9_3(
"floor_water_shallow2");
83 this.<OnCreateProgress>g__ChangeFloor|9_3(
"floor_water_deep");
88 this.<OnCreateProgress>g__ChangeFloor|9_3(
"floor_water");
93 this.<OnCreateProgress>g__ChangeFloor|9_3(
"floor_water_shallow");
95 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));
96 this.pos.Animate(AnimeID.Dig,
true);
97 this.owner.PlaySound(
"water_farm", 1f,
true);
98 this.pot.owner.ModCharge(-1,
false);
99 if (this.pot.owner.c_charges <= 0)
101 this.pot.owner.Dye(
EClass.sources.materials.alias[
"void"]);
103 this.owner.elements.ModExp(286, 5,
false);
106 this.owner.stamina.Mod(-1);
112 public override HitResult GetHitResult()
114 if (this.pos.HasBridge ||
this.pos.HasObj ||
this.pos.cell.blocked)
116 return HitResult.Invalid;
118 return HitResult.Valid;
123 private void <OnCreateProgress>g__ChangeFloor|9_3(
string id)
126 if (this.pos.HasBridge)
128 this.pos.cell._bridge = (byte)row.id;
129 this.pos.cell._bridgeMat = (byte)this.pot.owner.DyeMat.id;
133 this.pos.cell._floor = (byte)row.id;
134 this.pos.cell._floorMat = (byte)this.pot.owner.DyeMat.id;
136 EClass._map.SetLiquid(this.pos.x,
this.pos.z,
null);
137 this.pos.RefreshNeighborTiles();