EA 23.97 Nightly
March 2, 2025
25 files modified.
Important Changes
None.
AI_Fuck
@@ -68,7 +68,7 @@ public override IEnumerable<Status> Run()
{
cc.SetTempHand(1104, -1);
}
maxProgress = 25;
maxProgress = (ntr ? 15 : 25);
if (succubus)
{
cc.Talk("seduce");
@@ -80,6 +80,10 @@ public override IEnumerable<Status> Run()
switch (Type)
{
case FuckType.fuck:
if (ntr)
{
cc.Say("ntr", cc, tc);
}
cc.LookAt(tc);
tc.LookAt(cc);
switch (i % 4)
@@ -275,6 +279,10 @@ public void Finish()
SuccubusExp(chara, chara2);
SuccubusExp(chara2, chara);
chara2.ModAffinity(chara, flag ? 10 : (-5));
if (ntr && chara.HasElement(1239) && chara2.ExistsOnMap)
{
chara2.stamina.Mod(-1000000);
}
break;
}
case FuckType.tame:
AI_Idle
@@ -135,7 +135,7 @@ public override IEnumerable<Status> Run()
}
}
}
if (actRevive != null && EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList().Count > 0 && owner.UseAbility(actRevive.source.alias, owner))
if (actRevive != null && owner.IsPCFaction && EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList().Count > 0 && owner.UseAbility(actRevive.source.alias, owner))
{
yield return KeepRunning();
}
ActNTR
@@ -4,7 +4,11 @@ public override bool CanPerform()
{
if (Act.TC.isChara)
{
return Act.TC.Chara.conSleep != null;
if (Act.TC.Chara.conSleep == null)
{
return Act.CC.HasElement(1239);
}
return true;
}
return false;
}
BaseListPeople
@@ -198,6 +198,15 @@ void AddText(Hobby h, string lang, bool fix)
int num = Mathf.Max(1, h.source.things[i + 1].ToInt() * efficiency * a.homeBranch.GetProductBonus(a) / 100 / 1000);
string text3 = h.source.things[i];
string s = (text3.StartsWith("#") ? EClass.sources.categories.map[text3.Replace("#", "")].GetName() : EClass.sources.cards.map[h.source.things[i]].GetName());
if (h.source.alias == "Breeding")
{
num = a.race.breeder * 100 / 2500;
num = num * ((!(text3 == "_egg")) ? 1 : 2) / 3;
if (a.race.breeder > 0 && num <= 0)
{
num = 1;
}
}
t.note.AddText("NoteText_small", "・ " + "work_produce".lang(s.ToTitleCase(), num.ToString() ?? ""));
}
if (!h.source.elements.IsEmpty())
@@ -235,8 +244,8 @@ public virtual void SetSubText(Chara a, ItemGeneral b)
break;
case LayerPeople.ShowMode.Work:
{
string lang = a.GetTextWork(simple: true) + "," + a.GetTextHobby(simple: true);
b.SetSubText(lang, 300);
string text = a.GetTextWork(simple: true) + "," + a.GetTextHobby(simple: true);
b.SetSubText(text.TrimEnd(','), 300);
break;
}
}
BaseTileMap
@@ -1254,449 +1254,8 @@ public virtual void DrawTile()
fogged = true;
}
}
goto IL_7b3a;
IL_7b3a:
if (detail.things.Count == 0 && detail.charas.Count == 0)
{
return;
}
int num3 = 0;
thingPos.x = 0f;
thingPos.y = 0f;
thingPos.z = 0f;
freePos.x = (freePos.y = (freePos.z = 0f));
if (this.cell.HasRamp)
{
Vector3 rampFix = sourceBlock.tileType.GetRampFix(this.cell.blockDir);
param.x += rampFix.x;
param.y += rampFix.y;
param.z += rampFix.z;
freePos.x += rampFix.x;
freePos.y += rampFix.y;
freePos.z += rampFix.z;
}
param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight));
orgPos.x = (orgX = param.x);
orgPos.y = (orgY = param.y);
orgPos.z = (orgZ = param.z);
if (flag && liquidLv > 0)
{
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
param.y -= TileType.FloorWaterShallow.FloorHeight;
}
Thing thing = null;
bool shadow = liquidLv == 0;
float num4 = 0f;
float num5 = 0f;
bool flag6 = false;
float num6 = 0f;
bool flag7 = false;
float num7 = 0f;
if (detail.things.Count > 0 && isSeen)
{
_ = zSetting.max1;
float num8 = 0f;
for (int j = 0; j < detail.things.Count; j++)
{
Thing t = detail.things[j];
if ((fogged && !t.isRoofItem) || ((t.isHidden || t.trait.HideInAdv || t.isMasked) && !EMono.scene.actionMode.ShowMaskedThings) || (t.isRoofItem && ((this.room == null && !sourceBlock.tileType.IsFullBlock && !EMono._zone.IsPCFaction) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem))
{
continue;
}
TileType tileType = t.trait.tileType;
bool isInstalled = t.IsInstalled;
SourcePref pref = t.Pref;
if (!isInstalled && t.category.tileDummy != 0)
{
pref = rendererObjDummy.shadowPref;
}
float num9 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
if (t.ignoreStackHeight)
{
thingPos.y -= num4;
}
shadow = thingPos.y < 0.16f && num7 < 0.16f;
_ = pref.bypassShadow;
param.shadowFix = 0f - thingPos.y;
param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);
if (t.isRoofItem)
{
param.snow = isSnowCovered && !this.cell.isClearSnow;
SetRoofHeight(param, this.cell, cx, cz);
_actorPos.x = param.x;
_actorPos.y = param.y;
_actorPos.z = param.z + num8;
if (this.room != null)
{
param.color = GetRoofLight(this.room.lot);
}
shadow = false;
param.liquidLv = 0;
}
else
{
param.snow = snowed;
_actorPos.x = orgX + num5;
_actorPos.y = orgY;
_actorPos.z = orgZ + num8 + thingPos.z;
if (tileType.CanStack || !isInstalled)
{
if (thing?.id != t.id)
{
_actorPos.x += thingPos.x;
}
_actorPos.y += thingPos.y;
if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
{
thingPos.y -= num4;
if (thing != null)
{
_actorPos.z -= 0.2f;
thingPos.z -= 0.2f;
}
_actorPos.y -= num4;
}
_actorPos.z += renderSetting.thingZ + (float)j * -0.01f + zSetting.mod1 * thingPos.y;
}
if (isInstalled)
{
if (t.TileType.IsRamp)
{
Vector3 rampFix2 = t.TileType.GetRampFix(t.dir, pref);
orgX += rampFix2.x;
orgY += rampFix2.y;
orgZ += rampFix2.z;
freePos.x += rampFix2.x;
freePos.y += rampFix2.y;
freePos.z += rampFix2.z;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num7 += rampFix2.y;
}
liquidLv -= (int)(rampFix2.y * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
else if (!flag7 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
{
orgY += num9 + (float)t.altitude * altitudeFix.y;
orgZ += (float)t.altitude * altitudeFix.z;
freePos.y += num9 + (float)t.altitude * altitudeFix.y;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num7 += num9 + (float)t.altitude * altitudeFix.y;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
liquidLv -= (int)(num9 * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
else
{
thingPos.y += num9;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
if (pref.height >= 0f)
{
thingPos.z += pref.z;
}
}
if (!tileType.UseMountHeight && j > 10)
{
flag7 = true;
}
}
else
{
thingPos.y += num9;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
}
if (t.isFloating && isWater && !hasBridge && !flag)
{
flag = true;
float num10 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num10;
num6 = num9;
_actorPos.y += 0.01f * floatY - num10;
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
if (liquidLv < 0)
{
liquidLv = 0;
}
param.liquidLv = liquidLv;
}
num4 = num9;
if (t.sourceCard.multisize && !t.trait.IsGround)
{
num8 += zSetting.multiZ;
}
orgZ += t.renderer.data.stackZ;
if (param.liquidLv > 0)
{
param.liquidLv += pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquidLv = 1;
}
else if (param.liquidLv > 99 + pref.liquidModMax)
{
param.liquidLv = 99 + pref.liquidModMax;
}
}
}
if (isInstalled && tileType.UseMountHeight)
{
if (tileType != TileType.Illumination || !this.cell.HasObj)
{
if (noRoofMode && currentRoom == null && t.altitude >= lowWallObjAltitude)
{
continue;
}
if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
{
Room room = ((t.dir == 0) ? this.cell.Back.room : this.cell.Left.room);
if (t.trait.AlwaysHideOnLowWall)
{
if (room == null || !room.data.showWallItem)
{
continue;
}
}
else if (t.altitude >= lowWallObjAltitude)
{
continue;
}
}
}
if (tileType.UseHangZFix)
{
flag6 = true;
}
tileType.GetMountHeight(ref _actorPos, Point.shared.Set(index), t.dir, t);
shadow = false;
param.liquidLv = 0;
if (t.freePos)
{
_actorPos.x += t.fx;
_actorPos.y += t.fy;
}
}
else
{
if (t.altitude != 0)
{
_actorPos += altitudeFix * t.altitude;
if (t.altitude > 2 && ((this.cell.Back.room != null && this.cell.Back.IsRoomEdge) || (this.cell.Left.room != null && this.cell.Left.IsRoomEdge)) && hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
{
continue;
}
}
if (t.freePos)
{
_actorPos.x = orgX + t.fx - freePos.x;
_actorPos.y = orgY + t.fy - freePos.y;
}
if (t.trait is TraitDoor && (t.trait as TraitDoor).IsOpen())
{
_actorPos.z += -0.5f;
}
}
if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz))
{
if (iconMode != 0)
{
int num11 = 0;
switch (iconMode)
{
case CardIconMode.Visibility:
if (t.isMasked)
{
num11 = 17;
}
break;
case CardIconMode.State:
if (t.placeState == PlaceState.installed)
{
num11 = 18;
}
break;
case CardIconMode.Deconstruct:
if (t.isDeconstructing)
{
num11 = 14;
}
break;
}
if (t.isNPCProperty && !EMono.debug.godBuild)
{
num11 = 13;
}
if (num11 != 0)
{
passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num11);
}
}
t.SetRenderParam(param);
if (_lowblock && t.trait.UseLowblock && !this.cell.HasFullBlock)
{
param.tile += ((param.tile < 0f) ? (-64) : 64);
}
if (t.trait is TraitTrolley && EMono.pc.ai is AI_Trolley aI_Trolley && aI_Trolley.trolley.owner == t)
{
RenderParam _param = new RenderParam(param);
EMono.core.actionsLateUpdate.Add(delegate
{
t.SetRenderParam(_param);
_actorPos.x = EMono.pc.renderer.position.x;
_actorPos.y = EMono.pc.renderer.position.y - pref.height;
_actorPos.z = EMono.pc.renderer.position.z + 0.02f;
t.renderer.Draw(_param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
});
}
else
{
t.renderer.Draw(param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
}
}
if (isInstalled)
{
num5 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
}
param.x = orgX;
param.y = orgY;
param.z = orgZ;
param.color = floorLight;
thing = t;
if (pref.Float)
{
liquidLv = 0;
}
}
}
orgY += num6;
if (detail.charas.Count <= 0)
{
return;
}
param.shadowFix = 0f - num7;
param.color += 1310720f;
float max = zSetting.max2;
for (int k = 0; k < detail.charas.Count; k++)
{
Chara chara = detail.charas[k];
if (chara.host != null || (chara != EMono.pc && chara != LayerDrama.alwaysVisible && (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara)))))
{
continue;
}
_actorPos.x = orgX;
_actorPos.y = orgY;
_actorPos.z = orgZ;
chara.SetRenderParam(param);
_ = chara.IsAliveInCurrentZone;
if (chara.isRestrained)
{
TraitShackle restrainer = chara.GetRestrainer();
if (restrainer != null)
{
Vector3 getRestrainPos = restrainer.GetRestrainPos;
if (getRestrainPos != default(Vector3))
{
Vector3 position = restrainer.owner.renderer.position;
float defCharaHeight = EMono.setting.render.defCharaHeight;
float num12 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height);
_actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1));
_actorPos.y = position.y + num12;
_actorPos.z = position.z + getRestrainPos.z;
param.liquidLv = 0;
param.shadowFix = orgY - _actorPos.y;
chara.renderer.SetFirst(first: true);
chara.renderer.Draw(param, ref _actorPos, drawShadow: true);
param.shadowFix = 0f;
continue;
}
}
}
if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz))
{
if (chara.IsDeadOrSleeping && chara.IsPCC)
{
float num13 = chara.renderer.data.size.y * 0.3f;
if (thingPos.y > max)
{
thingPos.y = max;
}
float num14 = thingPos.y + num13;
float num15 = (float)k * -0.01f;
if (num14 > zSetting.thresh1)
{
num15 = zSetting.mod1;
}
_actorPos.x += thingPos.x;
_actorPos.y += thingPos.y;
_actorPos.z += renderSetting.laydownZ + num15;
param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
thingPos.y += num13 * 0.8f;
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
}
else
{
param.liquidLv = liquidLv;
if (param.liquidLv > 0)
{
param.liquidLv += chara.Pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquidLv = 1;
}
else if (param.liquidLv > 99 + chara.Pref.liquidModMax)
{
param.liquidLv = 99 + chara.Pref.liquidModMax;
}
}
if (!chara.IsPC && !chara.renderer.IsMoving && detail.charas.Count > 1 && (detail.charas.Count != 2 || !detail.charas[0].IsDeadOrSleeping || !detail.charas[0].IsPCC))
{
_actorPos += renderSetting.charaPos[1 + ((num3 < 4) ? num3 : 3)];
}
_actorPos.z += 0.01f * (float)k + renderSetting.charaZ;
num3++;
if (flag6)
{
_actorPos.z += chara.renderer.data.hangedFixZ;
}
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
}
}
param.x = orgX;
param.y = orgY;
param.z = orgZ;
}
return;
IL_6f1f:
int num16;
if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
{
param.tile = num16;
rendererFov.Draw(param);
}
goto IL_6f7f;
IL_6f7f:
goto IL_7b6a;
IL_6faf:
if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && !snowed && !this.cell.isClearSnow && ((!this.cell.Front.HasRoof && !this.cell.Front.HasBlock) || (!this.cell.Right.HasRoof && !this.cell.Right.HasBlock)))
{
snowed = true;
@@ -1721,16 +1280,16 @@ public virtual void DrawTile()
{
if (sourceEffect2.anime.Length > 2)
{
float num17 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
if (!(num17 >= (float)sourceEffect2.anime[0]))
float num3 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
if (!(num3 >= (float)sourceEffect2.anime[0]))
{
param.tile += num17;
param.tile += num3;
}
}
else
{
float num18 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
param.tile += num18;
float num4 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
param.tile += num4;
}
}
if (this.cell.effect.IsFire)
@@ -1919,11 +1478,11 @@ public virtual void DrawTile()
param.matColor = 104025f;
renderFootmark.Draw(param);
}
goto IL_7b3a;
goto IL_7b6a;
IL_1668:
if (this.cell.isSlopeEdge)
{
float num19 = (float)height * _heightMod.y;
float num5 = (float)height * _heightMod.y;
orgY = param.y;
orgZ = param.z;
param.dir = this.cell.blockDir;
@@ -1953,17 +1512,17 @@ public virtual void DrawTile()
param.matColor = 104025f;
}
}
for (int l = 0; (float)l < num19 / heightBlockSize; l++)
for (int j = 0; (float)j < num5 / heightBlockSize; j++)
{
param.y += ugFix.y;
param.z += ugFix.z + slopeFixZ * (float)l;
param.z += ugFix.z + slopeFixZ * (float)j;
defBlock.renderData.Draw(param);
if (this.cell.pcSync && EMono.player.lightPower > 0f)
{
float num20 = param.tile;
float num6 = param.tile;
param.tile = 0f;
rendererFov.Draw(param);
param.tile = num20;
param.tile = num6;
}
}
param.y = orgY;
@@ -1974,29 +1533,29 @@ public virtual void DrawTile()
{
orgY = param.y;
orgZ = param.z;
int num21 = 0;
int num7 = 0;
if (sourceBlock.tileType.IsFullBlock)
{
SourceBlock.Row row3 = sourceBlock;
num21 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
num7 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
}
else
{
SourceBlock.Row row3 = sourceFloor._defBlock;
num21 = row3._tiles[this.cell.blockDir % row3._tiles.Length];
num7 = row3._tiles[this.cell.blockDir % row3._tiles.Length];
}
if (((this.cell.Front.shore / 12) & 1) == 0 && this.cell.Front.sourceFloor.tileType.IsWater && this.cell.Front.height <= height && this.cell.Front.sourceBlock.tileType.RenderWaterBlock)
{
param.y = (float)(cz - cx) * screen.tileAlign.y - (this.cell.Front.sourceFloor.tileType.IsDeepWater ? 0.6f : 0.4f) + (float)(int)this.cell.Front.height * _heightMod.y;
param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
param.tile = num21 + ((!this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
param.tile = num7 + ((!this.cell.Front.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
rendererWaterBlock.Draw(param);
}
if (((this.cell.Right.shore / 12) & 8) == 0 && this.cell.Right.sourceFloor.tileType.IsWater && this.cell.Right.height <= height && this.cell.Right.sourceBlock.tileType.RenderWaterBlock)
{
param.y = (float)(cz - cx) * screen.tileAlign.y - (this.cell.Right.sourceFloor.tileType.IsDeepWater ? 0.6f : 0.4f) + (float)(int)this.cell.Right.height * _heightMod.y;
param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z;
param.tile = num21 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
param.tile = num7 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
rendererWaterBlock.Draw(param);
}
param.y = orgY;
@@ -2037,10 +1596,10 @@ public virtual void DrawTile()
{
param.matColor = 104025f;
}
for (int m = 0; m < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); m++)
for (int k = 0; k < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); k++)
{
param.y += ugFix.y;
param.z += ugFix.z + slopeFixZ * (float)m;
param.z += ugFix.z + slopeFixZ * (float)k;
defBlock2.renderData.Draw(param);
}
param.y = orgY;
@@ -2094,20 +1653,20 @@ public virtual void DrawTile()
}
sourceFloor.renderData.Draw(param);
}
int num22 = 0;
int num8 = 0;
if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
{
if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
{
num22++;
num8++;
}
if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
{
num22 += 2;
num8 += 2;
}
if (num22 != 0)
if (num8 != 0)
{
param.tile = 448 + num22 + 12;
param.tile = 448 + num8 + 12;
param.z -= 0.1f;
sourceFloor.renderData.Draw(param);
param.z += 0.1f;
@@ -2178,7 +1737,7 @@ public virtual void DrawTile()
}
}
}
if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num22 == 0)
if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num8 == 0)
{
pass = (isWater ? passAutoTileWater : passAutoTile);
batch = pass.batches[pass.batchIdx];
@@ -2197,16 +1756,16 @@ public virtual void DrawTile()
}
if (isWater)
{
int num23 = 12;
int num24 = this.cell.shore / num23;
int num25 = this.cell.shore % num23;
int num9 = 12;
int num10 = this.cell.shore / num9;
int num11 = this.cell.shore % num9;
bool isShoreSand = this.cell.isShoreSand;
if (this.cell.shore != 0)
{
Cell cell = ((((uint)num24 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num24 & 2u) != 0) ? this.cell.Right : ((((uint)num24 & 4u) != 0) ? this.cell.Front : this.cell.Left)));
Cell cell = ((((uint)num10 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num10 & 2u) != 0) ? this.cell.Right : ((((uint)num10 & 4u) != 0) ? this.cell.Front : this.cell.Left)));
if (isShoreSand && !cell.sourceFloor.isBeach)
{
cell = ((((uint)num24 & 8u) != 0) ? this.cell.Left : ((((uint)num24 & 4u) != 0) ? this.cell.Front : ((((uint)num24 & 2u) != 0) ? this.cell.Right : this.cell.Back)));
cell = ((((uint)num10 & 8u) != 0) ? this.cell.Left : ((((uint)num10 & 4u) != 0) ? this.cell.Front : ((((uint)num10 & 2u) != 0) ? this.cell.Right : this.cell.Back)));
}
if (!cell.IsSnowTile)
{
@@ -2218,7 +1777,7 @@ public virtual void DrawTile()
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z;
batch.tiles[pass.idx] = 768 + this.cell.shore / num23;
batch.tiles[pass.idx] = 768 + this.cell.shore / num9;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
@@ -2226,38 +1785,38 @@ public virtual void DrawTile()
{
pass.NextBatch();
}
num25 = 2;
num11 = 2;
}
else
{
num25 = cell.sourceFloor.edge;
num11 = cell.sourceFloor.edge;
}
param.tile = (24 + num25 / 2) * 32 + num25 % 2 * 16 + num24;
param.tile = (24 + num11 / 2) * 32 + num11 % 2 * 16 + num10;
rendererShore.Draw(param);
}
}
if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num23) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num23) & (true ? 1u : 0u)) != 0)
if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num9) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num9) & (true ? 1u : 0u)) != 0)
{
param.tile = 785f;
param.matColor = GetColorInt(ref this.cell.BackLeft.matFloor.matColor, this.cell.BackLeft.sourceFloor.colorMod);
passShore.Add(param);
Draw(60);
}
if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num23) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num23) & (true ? 1u : 0u)) != 0)
if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num9) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num9) & (true ? 1u : 0u)) != 0)
{
param.tile = 786f;
param.matColor = GetColorInt(ref this.cell.BackRight.matFloor.matColor, this.cell.BackRight.sourceFloor.colorMod);
passShore.Add(param);
Draw(56);
}
if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num23) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num23) & 4u) != 0)
if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num9) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num9) & 4u) != 0)
{
param.tile = 787f;
param.matColor = GetColorInt(ref this.cell.FrontRight.matFloor.matColor, this.cell.FrontRight.sourceFloor.colorMod);
passShore.Add(param);
Draw(48);
}
if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num23) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num23) & 4u) != 0)
if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num9) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num9) & 4u) != 0)
{
param.tile = 788f;
param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);
@@ -2280,36 +1839,48 @@ public virtual void DrawTile()
pass.NextBatch();
}
}
bool flag8 = false;
bool flag6 = false;
if (isShoreSand)
{
if (((uint)num24 & (true ? 1u : 0u)) != 0)
if (((uint)num10 & (true ? 1u : 0u)) != 0)
{
if (((uint)num24 & 8u) != 0)
if (((uint)num10 & 8u) != 0)
{
Draw(16);
flag8 = true;
if ((num10 & 2) == 0 && (num10 & 4) == 0)
{
Draw(16);
}
flag6 = true;
}
if (((uint)num24 & 2u) != 0)
if (((uint)num10 & 2u) != 0)
{
Draw(20);
flag8 = true;
if ((num10 & 8) == 0 && (num10 & 4) == 0)
{
Draw(20);
}
flag6 = true;
}
}
if (((uint)num24 & 4u) != 0)
if (((uint)num10 & 4u) != 0)
{
if (((uint)num24 & 8u) != 0)
if (((uint)num10 & 8u) != 0)
{
Draw(24);
flag8 = true;
if ((num10 & 2) == 0 && (num10 & 1) == 0)
{
Draw(24);
}
flag6 = true;
}
if (((uint)num24 & 2u) != 0)
if (((uint)num10 & 2u) != 0)
{
Draw(28);
flag8 = true;
if ((num10 & 8) == 0 && (num10 & 1) == 0)
{
Draw(28);
}
flag6 = true;
}
}
if (!flag8)
if (!flag6)
{
if (!this.cell.Front.sourceFloor.tileType.IsWater && !this.cell.Front.isDeck)
{
@@ -2321,7 +1892,7 @@ public virtual void DrawTile()
}
}
}
if (!flag8)
if (!flag6)
{
if (!this.cell.Back.sourceFloor.tileType.IsWater && !this.cell.Back.isDeck)
{
@@ -2329,7 +1900,7 @@ public virtual void DrawTile()
batch = pass.batches[pass.batchIdx];
batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
batch.matColors[pass.idx] = 104025f;
if (((uint)(this.cell.shore / num23) & (true ? 1u : 0u)) != 0)
if (((uint)(this.cell.shore / num9) & (true ? 1u : 0u)) != 0)
{
if (isShoreSand)
{
@@ -2367,7 +1938,7 @@ public virtual void DrawTile()
batch = pass.batches[pass.batchIdx];
batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
batch.matColors[pass.idx] = 104025f;
if (((uint)(this.cell.shore / num23) & 8u) != 0)
if (((uint)(this.cell.shore / num9) & 8u) != 0)
{
if (isShoreSand)
{
@@ -2483,16 +2054,16 @@ public virtual void DrawTile()
param.z += bridgeFix.z;
param.dir = 0;
SourceBlock.Row row4 = sourceBridge._bridgeBlock;
float num26 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y;
float num12 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y;
if (this.cell.sourceFloor.tileType == TileType.Sky)
{
num26 += (float)EMono._map.config.skyBlockHeight;
num12 += (float)EMono._map.config.skyBlockHeight;
}
int num27 = (int)(num26 / heightBlockSize) + 2;
int num13 = (int)(num12 / heightBlockSize) + 2;
if (this.cell.bridgePillar != 0)
{
row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
param.tile = row4._tiles[0] + ((num27 == 2) ? 32 : 0);
param.tile = row4._tiles[0] + ((num13 == 2) ? 32 : 0);
param.mat = ((sourceBridge.DefaultMaterial == row4.DefaultMaterial) ? sourceBridge.DefaultMaterial : row4.DefaultMaterial);
param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, row4.colorMod));
}
@@ -2504,9 +2075,9 @@ public virtual void DrawTile()
}
param.y += ugFixBridgeTop.y;
param.z += ugFixBridgeTop.z;
for (int n = 0; n < num27; n++)
for (int l = 0; l < num13; l++)
{
if (n == num27 - 1)
if (l == num13 - 1)
{
param.y = (float)(cz - cx) * screen.tileAlign.y + (float)height * _heightMod.y + ugFixBridgeBottom.y;
param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)height * _heightMod.z + ugFixBridgeBottom.z;
@@ -2538,13 +2109,13 @@ public virtual void DrawTile()
{
snowed = false;
}
num16 = 0;
int num14 = 0;
if (sourceBlock.id != 0)
{
this.tileType = sourceBlock.tileType;
roomHeight = 0f;
int blockDir = this.cell.blockDir;
bool flag9 = false;
bool flag7 = false;
switch (wallClipMode)
{
case WallClipMode.ByRoom:
@@ -2588,8 +2159,8 @@ public virtual void DrawTile()
}
}
}
flag9 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium);
if (flag9)
flag7 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium);
if (flag7)
{
_lowblock = false;
}
@@ -2611,8 +2182,8 @@ public virtual void DrawTile()
roomHeight = 0f;
break;
}
int num28 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num28) ? this.room.lot.height : num28) + 0.01f * (float)this.room.lot.heightFix;
int num15 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num15) ? this.room.lot.height : num15) + 0.01f * (float)this.room.lot.heightFix;
}
break;
case WallClipMode.ByLot:
@@ -2658,11 +2229,11 @@ public virtual void DrawTile()
}
if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
{
num16 = 1;
num14 = 1;
}
else if (lowBlock)
{
num16 = 2;
num14 = 2;
}
param.mat = matBlock;
param.dir = this.cell.blockDir;
@@ -2709,11 +2280,11 @@ public virtual void DrawTile()
}
if (!_lowblock)
{
int num29 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num29) ? currentRoom.lot.height : num29) + 0.01f * (float)currentRoom.lot.heightFix;
int num16 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num16) ? currentRoom.lot.height : num16) + 0.01f * (float)currentRoom.lot.heightFix;
}
}
if (flag9)
if (flag7)
{
_lowblock = (!this.cell.Front.HasFullBlock || !this.cell.Right.HasFullBlock) && (!this.cell.Front.HasFullBlock || !this.cell.Left.HasFullBlock) && (!this.cell.Back.HasFullBlock || !this.cell.Right.HasFullBlock) && (!this.cell.Back.HasFullBlock || !this.cell.Left.HasFullBlock);
if (_lowblock)
@@ -2743,62 +2314,62 @@ public virtual void DrawTile()
{
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0, isBlock: true);
}
Room room2 = this.cell.Front.room ?? this.cell.room;
if (room2 == null && this.cell.Right.room != null)
Room room = this.cell.Front.room ?? this.cell.room;
if (room == null && this.cell.Right.room != null)
{
room2 = this.cell.Right.room;
room = this.cell.Right.room;
}
if (!invisible && room2 != null)
if (!invisible && room != null)
{
if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
if (room.lot.idDeco != 0 && !this.cell.hasDoor)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco);
param.matColor = room2.lot.colDeco;
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco);
param.matColor = room.lot.colDeco;
float y = param.y;
param.y += (float)room2.lot.decoFix * 0.01f;
param.y += (float)room.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = y;
}
if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
if (room.lot.idDeco2 != 0 && roomHeight != 0f && (float)room.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2);
param.matColor = room2.lot.colDeco2;
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2);
param.matColor = room.lot.colDeco2;
float y2 = param.y;
float num30 = param.z;
param.y += (float)room2.lot.decoFix2 * 0.01f;
param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
float num17 = param.z;
param.y += (float)room.lot.decoFix2 * 0.01f;
param.z += (float)room.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = y2;
param.z = num30;
param.z = num17;
}
}
room2 = this.cell.Right.room ?? this.cell.room;
if (room2 == null && this.cell.Front.room != null)
room = this.cell.Right.room ?? this.cell.room;
if (room == null && this.cell.Front.room != null)
{
room2 = this.cell.Front.room;
room = this.cell.Front.room;
}
if (!invisible && room2 != null)
if (!invisible && room != null)
{
if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
if (room.lot.idDeco != 0 && !this.cell.hasDoor)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco) * -1;
param.matColor = room2.lot.colDeco;
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco) * -1;
param.matColor = room.lot.colDeco;
float y3 = param.y;
param.y += (float)room2.lot.decoFix * 0.01f;
param.y += (float)room.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = y3;
}
if (room2.lot.idDeco2 != 0 && roomHeight != 0f && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
if (room.lot.idDeco2 != 0 && roomHeight != 0f && (float)room.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2) * -1;
param.matColor = room2.lot.colDeco2;
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2) * -1;
param.matColor = room.lot.colDeco2;
float y4 = param.y;
float num31 = param.z;
param.y += (float)room2.lot.decoFix2 * 0.01f;
param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
float num18 = param.z;
param.y += (float)room.lot.decoFix2 * 0.01f;
param.z += (float)room.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = y4;
param.z = num31;
param.z = num18;
}
}
break;
@@ -2813,56 +2384,167 @@ public virtual void DrawTile()
orgY = param.y;
orgZ = param.z;
param.color = (this.tileType.IsFence ? (floorLight - (float)((int)(_shadowStrength * 0.8f * 50f) * 262144)) : blockLight);
bool flag10 = blockDir == 1 || _lowblock || flag9;
bool flag11 = blockDir == 0 || _lowblock || flag9;
bool flag8 = blockDir == 1 || _lowblock || flag7;
bool flag9 = blockDir == 0 || _lowblock || flag7;
if (!showFullWall && currentRoom != null)
{
if (!flag10)
if (!flag8)
{
if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Front.room != currentRoom))
{
if (!this.cell.IsRoomEdge || (this.cell.Front.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
{
flag10 = true;
flag8 = true;
}
}
else if ((!this.cell.Front.lotWall || this.cell.Front.room?.lot != currentLot) && this.cell.Front.room != currentRoom)
{
flag10 = true;
flag8 = true;
}
}
if (!flag11)
if (!flag9)
{
if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Right.room != currentRoom))
{
if (!this.cell.IsRoomEdge || (this.cell.Right.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
{
flag11 = true;
flag9 = true;
}
}
else if ((!this.cell.Right.lotWall || this.cell.Right.room?.lot != currentLot) && this.cell.Right.room != currentRoom)
{
flag11 = true;
flag9 = true;
}
}
}
if (blockDir == 0 || blockDir == 2)
{
param.dir = 0;
Room room3 = this.cell.Front.room ?? this.cell.room;
Room room2 = this.cell.Front.room ?? this.cell.room;
if (room2 != null && this.tileType.IsWall)
{
if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco);
param.matColor = room2.lot.colDeco;
param.y += (float)room2.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = orgY;
}
if (room2.lot.idDeco2 != 0 && roomHeight != 0f && !flag8 && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2);
param.matColor = room2.lot.colDeco2;
param.y += (float)room2.lot.decoFix2 * 0.01f;
param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = orgY;
param.z = orgZ;
}
}
Cell left = this.cell.Left;
if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
{
_sourceBlock = left.sourceBlock;
param.mat = left.matBlock;
}
else
{
_sourceBlock = sourceBlock;
param.mat = matBlock;
}
this.tileType = _sourceBlock.tileType;
param.tile = (tile = _sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence) ? 32 : 0));
if (_sourceBlock.useAltColor)
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
}
else
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
}
if (roomHeight == 0f || flag8 || !this.tileType.RepeatBlock)
{
if (!this.cell.hasDoor)
{
_sourceBlock.renderData.Draw(param);
}
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
}
param.z += cornerWallFix2.z;
if ((blockDir == 2 || (this.cell.Front.HasWallOrFence && this.cell.Front.blockDir != 0)) != this.cell.isToggleWallPillar)
{
if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile)
{
param.snow = true;
}
param.tile = _sourceBlock._tiles[0] + ((flag8 && flag9 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag8 && flag9 && !flag7))
{
_sourceBlock.renderData.Draw(param);
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
}
}
if (!flag8 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.isToggleWallPillar)
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
param.x += cornerWallFix3.x;
param.y += cornerWallFix3.y;
param.z += cornerWallFix3.z;
if (!flag7 && (roomHeight == 0f || flag8))
{
_sourceBlock.renderData.Draw(param);
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
}
param.x = orgX;
}
else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag8 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar)
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag8 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
param.x += cornerWallFix.x;
param.y += cornerWallFix.y;
param.z += cornerWallFix.z;
if (!flag7 && (roomHeight == 0f || flag8))
{
_sourceBlock.renderData.Draw(param);
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
}
param.x = orgX;
}
}
if (blockDir == 1 || blockDir == 2)
{
param.y = orgY;
param.z = orgZ;
param.dir = 1;
Room room3 = this.cell.Right.room ?? this.cell.room;
if (room3 != null && this.tileType.IsWall)
{
if (room3.lot.idDeco != 0 && !this.cell.hasDoor)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco);
param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco);
param.matColor = room3.lot.colDeco;
param.y += (float)room3.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = orgY;
}
if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag10 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
if (room3.lot.idDeco2 != 0 && roomHeight != 0f && !flag9 && (float)room3.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco2);
param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room3.lot.idDeco2);
param.matColor = room3.lot.colDeco2;
param.y += (float)room3.lot.decoFix2 * 0.01f;
param.z += (float)room3.lot.decoFix2 * 0.01f * heightModDeco;
@@ -2871,11 +2553,29 @@ public virtual void DrawTile()
param.z = orgZ;
}
}
Cell left = this.cell.Left;
if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null)
{
_sourceBlock = left.sourceBlock;
param.mat = left.matBlock;
Room room4 = this.cell.Right.room;
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room4.lot.mh * _heightMod.y;
if (showRoof)
{
roomHeight = room4.lot.realHeight;
}
else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
{
roomHeight = 0f;
}
else
{
int num19 = ((room4.data.maxHeight == 0) ? 2 : room4.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.lot.height < num19) ? room4.lot.height : num19) + 0.01f * (float)room4.lot.heightFix;
}
}
Cell back2 = this.cell.Back;
if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
{
_sourceBlock = back2.sourceBlock;
param.mat = back2.matBlock;
}
else
{
@@ -2883,7 +2583,7 @@ public virtual void DrawTile()
param.mat = matBlock;
}
this.tileType = _sourceBlock.tileType;
param.tile = (tile = _sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence) ? 32 : 0));
param.tile = (tile = -_sourceBlock._tiles[0] + ((flag9 && !this.tileType.IsFence) ? (-32) : 0));
if (_sourceBlock.useAltColor)
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
@@ -2892,7 +2592,8 @@ public virtual void DrawTile()
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
}
if (roomHeight == 0f || flag10 || !this.tileType.RepeatBlock)
param.color += _rightWallShade;
if (roomHeight == 0f || flag9 || !this.tileType.RepeatBlock)
{
if (!this.cell.hasDoor)
{
@@ -2903,15 +2604,15 @@ public virtual void DrawTile()
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
}
param.z += cornerWallFix2.z;
if ((blockDir == 2 || (this.cell.Front.HasWallOrFence && this.cell.Front.blockDir != 0)) != this.cell.isToggleWallPillar)
if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar))
{
if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile)
if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile)
{
param.snow = true;
}
param.tile = _sourceBlock._tiles[0] + ((flag10 && flag11 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag10 && flag11 && !flag9))
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag9 && !this.tileType.IsFence && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (!flag7 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag9))
{
_sourceBlock.renderData.Draw(param);
}
@@ -2919,203 +2620,513 @@ public virtual void DrawTile()
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
}
param.x = orgX;
}
}
param.y = orgY;
param.z = orgZ;
break;
}
case BlockRenderMode.HalfBlock:
param.color = floorLight;
_sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock);
param.tile = _sourceBlock._tiles[0];
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod));
param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0];
param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod));
sourceBlock.renderData.Draw(param);
break;
case BlockRenderMode.Pillar:
{
RenderData renderData2 = sourceBlock.renderData;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
int num20 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1;
if (num20 == 0)
{
renderData2.Draw(param);
}
else
{
renderData2.DrawRepeat(param, num20, sourceBlock.tileType.RepeatSize);
}
param.tile = renderData2.idShadow;
SourcePref shadowPref2 = renderData2.shadowPref;
int shadow4 = shadowPref2.shadow;
passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow4], shadowPref2, 0, param.snow);
break;
}
default:
param.color = floorLight;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowWallTiles) ? 3000000 : 0);
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
if (roomHeight == 0f)
{
sourceBlock.renderData.Draw(param);
}
else
{
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
}
break;
}
}
if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode)
{
if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
{
goto IL_6f4f;
}
if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
{
Room obj = this.cell.FrontRight.room;
if (obj == null || !obj.HasRoof)
{
goto IL_6f4f;
}
}
}
goto IL_6faf;
IL_7b6a:
if (detail.things.Count == 0 && detail.charas.Count == 0)
{
return;
}
int num21 = 0;
thingPos.x = 0f;
thingPos.y = 0f;
thingPos.z = 0f;
freePos.x = (freePos.y = (freePos.z = 0f));
if (this.cell.HasRamp)
{
Vector3 rampFix = sourceBlock.tileType.GetRampFix(this.cell.blockDir);
param.x += rampFix.x;
param.y += rampFix.y;
param.z += rampFix.z;
freePos.x += rampFix.x;
freePos.y += rampFix.y;
freePos.z += rampFix.z;
}
param.y += (flag ? 0f : ((this.cell._bridge != 0) ? this.cell.sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight));
orgPos.x = (orgX = param.x);
orgPos.y = (orgY = param.y);
orgPos.z = (orgZ = param.z);
if (flag && liquidLv > 0)
{
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
param.y -= TileType.FloorWaterShallow.FloorHeight;
}
Thing thing = null;
bool shadow = liquidLv == 0;
float num22 = 0f;
float num23 = 0f;
bool flag10 = false;
float num24 = 0f;
bool flag11 = false;
float num25 = 0f;
if (detail.things.Count > 0 && isSeen)
{
_ = zSetting.max1;
float num26 = 0f;
for (int m = 0; m < detail.things.Count; m++)
{
Thing t = detail.things[m];
if ((fogged && !t.isRoofItem) || ((t.isHidden || t.trait.HideInAdv || t.isMasked) && !EMono.scene.actionMode.ShowMaskedThings) || (t.isRoofItem && ((this.room == null && !sourceBlock.tileType.IsFullBlock && !EMono._zone.IsPCFaction) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem))
{
continue;
}
TileType tileType = t.trait.tileType;
bool isInstalled = t.IsInstalled;
SourcePref pref = t.Pref;
if (!isInstalled && t.category.tileDummy != 0)
{
pref = rendererObjDummy.shadowPref;
}
float num27 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
if (t.ignoreStackHeight)
{
thingPos.y -= num22;
}
shadow = thingPos.y < 0.16f && num25 < 0.16f;
_ = pref.bypassShadow;
param.shadowFix = 0f - thingPos.y;
param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);
if (t.isRoofItem)
{
param.snow = isSnowCovered && !this.cell.isClearSnow;
SetRoofHeight(param, this.cell, cx, cz);
_actorPos.x = param.x;
_actorPos.y = param.y;
_actorPos.z = param.z + num26;
if (this.room != null)
{
param.color = GetRoofLight(this.room.lot);
}
shadow = false;
param.liquidLv = 0;
}
else
{
param.snow = snowed;
_actorPos.x = orgX + num23;
_actorPos.y = orgY;
_actorPos.z = orgZ + num26 + thingPos.z;
if (tileType.CanStack || !isInstalled)
{
if (thing?.id != t.id)
{
_actorPos.x += thingPos.x;
}
_actorPos.y += thingPos.y;
if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
{
thingPos.y -= num22;
if (thing != null)
{
_actorPos.z -= 0.2f;
thingPos.z -= 0.2f;
}
_actorPos.y -= num22;
}
_actorPos.z += renderSetting.thingZ + (float)m * -0.01f + zSetting.mod1 * thingPos.y;
}
if (!flag10 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.isToggleWallPillar)
if (isInstalled)
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
param.x += cornerWallFix3.x;
param.y += cornerWallFix3.y;
param.z += cornerWallFix3.z;
if (!flag9 && (roomHeight == 0f || flag10))
if (t.TileType.IsRamp)
{
_sourceBlock.renderData.Draw(param);
Vector3 rampFix2 = t.TileType.GetRampFix(t.dir, pref);
orgX += rampFix2.x;
orgY += rampFix2.y;
orgZ += rampFix2.z;
freePos.x += rampFix2.x;
freePos.y += rampFix2.y;
freePos.z += rampFix2.z;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num25 += rampFix2.y;
}
liquidLv -= (int)(rampFix2.y * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
else if (!flag11 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
{
orgY += num27 + (float)t.altitude * altitudeFix.y;
orgZ += (float)t.altitude * altitudeFix.z;
freePos.y += num27 + (float)t.altitude * altitudeFix.y;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num25 += num27 + (float)t.altitude * altitudeFix.y;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
liquidLv -= (int)(num27 * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
thingPos.y += num27;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
if (pref.height >= 0f)
{
thingPos.z += pref.z;
}
}
if (!tileType.UseMountHeight && m > 10)
{
flag11 = true;
}
param.x = orgX;
}
else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag10 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar)
else
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag10 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
param.x += cornerWallFix.x;
param.y += cornerWallFix.y;
param.z += cornerWallFix.z;
if (!flag9 && (roomHeight == 0f || flag10))
thingPos.y += num27;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
}
if (t.isFloating && isWater && !hasBridge && !flag)
{
flag = true;
float num28 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num28;
num24 = num27;
_actorPos.y += 0.01f * floatY - num28;
if (liquidLv > 10)
{
_sourceBlock.renderData.Draw(param);
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
if (liquidLv < 0)
{
liquidLv = 0;
}
param.liquidLv = liquidLv;
}
num22 = num27;
if (t.sourceCard.multisize && !t.trait.IsGround)
{
num26 += zSetting.multiZ;
}
orgZ += t.renderer.data.stackZ;
if (param.liquidLv > 0)
{
param.liquidLv += pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquidLv = 1;
}
else
else if (param.liquidLv > 99 + pref.liquidModMax)
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
param.liquidLv = 99 + pref.liquidModMax;
}
param.x = orgX;
}
}
if (blockDir == 1 || blockDir == 2)
if (isInstalled && tileType.UseMountHeight)
{
param.y = orgY;
param.z = orgZ;
param.dir = 1;
Room room4 = this.cell.Right.room ?? this.cell.room;
if (room4 != null && this.tileType.IsWall)
if (tileType != TileType.Illumination || !this.cell.HasObj)
{
if (room4.lot.idDeco != 0 && !this.cell.hasDoor)
if (noRoofMode && currentRoom == null && t.altitude >= lowWallObjAltitude)
{
param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco);
param.matColor = room4.lot.colDeco;
param.y += (float)room4.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = orgY;
continue;
}
if (room4.lot.idDeco2 != 0 && roomHeight != 0f && !flag11 && (float)room4.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
{
param.tile = -EMono.sources.blocks.rows[0].ConvertTile(1000 + room4.lot.idDeco2);
param.matColor = room4.lot.colDeco2;
param.y += (float)room4.lot.decoFix2 * 0.01f;
param.z += (float)room4.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = orgY;
param.z = orgZ;
Room room5 = ((t.dir == 0) ? this.cell.Back.room : this.cell.Left.room);
if (t.trait.AlwaysHideOnLowWall)
{
if (room5 == null || !room5.data.showWallItem)
{
continue;
}
}
else if (t.altitude >= lowWallObjAltitude)
{
continue;
}
}
}
if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null)
if (tileType.UseHangZFix)
{
Room room5 = this.cell.Right.room;
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room5.lot.mh * _heightMod.y;
if (showRoof)
{
roomHeight = room5.lot.realHeight;
}
else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
{
roomHeight = 0f;
}
else
{
int num32 = ((room5.data.maxHeight == 0) ? 2 : room5.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.lot.height < num32) ? room5.lot.height : num32) + 0.01f * (float)room5.lot.heightFix;
}
flag10 = true;
}
Cell back2 = this.cell.Back;
if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
tileType.GetMountHeight(ref _actorPos, Point.shared.Set(index), t.dir, t);
shadow = false;
param.liquidLv = 0;
if (t.freePos)
{
_sourceBlock = back2.sourceBlock;
param.mat = back2.matBlock;
_actorPos.x += t.fx;
_actorPos.y += t.fy;
}
else
}
else
{
if (t.altitude != 0)
{
_sourceBlock = sourceBlock;
param.mat = matBlock;
_actorPos += altitudeFix * t.altitude;
if (t.altitude > 2 && ((this.cell.Back.room != null && this.cell.Back.IsRoomEdge) || (this.cell.Left.room != null && this.cell.Left.IsRoomEdge)) && hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
{
continue;
}
}
this.tileType = _sourceBlock.tileType;
param.tile = (tile = -_sourceBlock._tiles[0] + ((flag11 && !this.tileType.IsFence) ? (-32) : 0));
if (_sourceBlock.useAltColor)
if (t.freePos)
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
_actorPos.x = orgX + t.fx - freePos.x;
_actorPos.y = orgY + t.fy - freePos.y;
}
else
if (t.trait is TraitDoor && (t.trait as TraitDoor).IsOpen())
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
_actorPos.z += -0.5f;
}
param.color += _rightWallShade;
if (roomHeight == 0f || flag11 || !this.tileType.RepeatBlock)
}
if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz))
{
if (iconMode != 0)
{
if (!this.cell.hasDoor)
int num29 = 0;
switch (iconMode)
{
_sourceBlock.renderData.Draw(param);
case CardIconMode.Visibility:
if (t.isMasked)
{
num29 = 17;
}
break;
case CardIconMode.State:
if (t.placeState == PlaceState.installed)
{
num29 = 18;
}
break;
case CardIconMode.Deconstruct:
if (t.isDeconstructing)
{
num29 = 14;
}
break;
}
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
}
if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar))
{
if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile)
if (t.isNPCProperty && !EMono.debug.godBuild)
{
param.snow = true;
num29 = 13;
}
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag11 && !this.tileType.IsFence && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (!flag9 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag11))
if (num29 != 0)
{
_sourceBlock.renderData.Draw(param);
passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num29);
}
else
}
t.SetRenderParam(param);
if (_lowblock && t.trait.UseLowblock && !this.cell.HasFullBlock)
{
param.tile += ((param.tile < 0f) ? (-64) : 64);
}
if (t.trait is TraitTrolley && EMono.pc.ai is AI_Trolley aI_Trolley && aI_Trolley.trolley.owner == t)
{
RenderParam _param = new RenderParam(param);
EMono.core.actionsLateUpdate.Add(delegate
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
}
param.x = orgX;
t.SetRenderParam(_param);
_actorPos.x = EMono.pc.renderer.position.x;
_actorPos.y = EMono.pc.renderer.position.y - pref.height;
_actorPos.z = EMono.pc.renderer.position.z + 0.02f;
t.renderer.Draw(_param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
});
}
else
{
t.renderer.Draw(param, ref _actorPos, !t.noShadow && (shadow || tileType.AlwaysShowShadow));
}
}
if (isInstalled)
{
num23 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
}
param.x = orgX;
param.y = orgY;
param.z = orgZ;
break;
}
case BlockRenderMode.HalfBlock:
param.color = floorLight;
_sourceBlock = ((sourceBlock.id == 5) ? EMono.sources.blocks.rows[matBlock.defBlock] : sourceBlock);
param.tile = _sourceBlock._tiles[0];
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.colorMod));
param.tile2 = _sourceBlock.sourceAutoFloor._tiles[0];
param.halfBlockColor = ((_sourceBlock.sourceAutoFloor.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, _sourceBlock.sourceAutoFloor.colorMod));
sourceBlock.renderData.Draw(param);
break;
case BlockRenderMode.Pillar:
{
RenderData renderData2 = sourceBlock.renderData;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
int num33 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1;
if (num33 == 0)
thing = t;
if (pref.Float)
{
renderData2.Draw(param);
liquidLv = 0;
}
else
}
}
orgY += num24;
if (detail.charas.Count <= 0)
{
return;
}
param.shadowFix = 0f - num25;
param.color += 1310720f;
float max = zSetting.max2;
for (int n = 0; n < detail.charas.Count; n++)
{
Chara chara = detail.charas[n];
if (chara.host != null || (chara != EMono.pc && chara != LayerDrama.alwaysVisible && (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara)))))
{
continue;
}
_actorPos.x = orgX;
_actorPos.y = orgY;
_actorPos.z = orgZ;
chara.SetRenderParam(param);
_ = chara.IsAliveInCurrentZone;
if (chara.isRestrained)
{
TraitShackle restrainer = chara.GetRestrainer();
if (restrainer != null)
{
renderData2.DrawRepeat(param, num33, sourceBlock.tileType.RepeatSize);
Vector3 getRestrainPos = restrainer.GetRestrainPos;
if (getRestrainPos != default(Vector3))
{
Vector3 position = restrainer.owner.renderer.position;
float defCharaHeight = EMono.setting.render.defCharaHeight;
float num30 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height);
_actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1));
_actorPos.y = position.y + num30;
_actorPos.z = position.z + getRestrainPos.z;
param.liquidLv = 0;
param.shadowFix = orgY - _actorPos.y;
chara.renderer.SetFirst(first: true);
chara.renderer.Draw(param, ref _actorPos, drawShadow: true);
param.shadowFix = 0f;
continue;
}
}
param.tile = renderData2.idShadow;
SourcePref shadowPref2 = renderData2.shadowPref;
int shadow4 = shadowPref2.shadow;
passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow4], shadowPref2, 0, param.snow);
break;
}
default:
param.color = floorLight;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowWallTiles) ? 3000000 : 0);
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
if (roomHeight == 0f)
if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz))
{
if (chara.IsDeadOrSleeping && chara.IsPCC)
{
sourceBlock.renderData.Draw(param);
float num31 = chara.renderer.data.size.y * 0.3f;
if (thingPos.y > max)
{
thingPos.y = max;
}
float num32 = thingPos.y + num31;
float num33 = (float)n * -0.01f;
if (num32 > zSetting.thresh1)
{
num33 = zSetting.mod1;
}
_actorPos.x += thingPos.x;
_actorPos.y += thingPos.y;
_actorPos.z += renderSetting.laydownZ + num33;
param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
thingPos.y += num31 * 0.8f;
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
}
else
{
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
param.liquidLv = liquidLv;
if (param.liquidLv > 0)
{
param.liquidLv += chara.Pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquidLv = 1;
}
else if (param.liquidLv > 99 + chara.Pref.liquidModMax)
{
param.liquidLv = 99 + chara.Pref.liquidModMax;
}
}
if (!chara.IsPC && !chara.renderer.IsMoving && detail.charas.Count > 1 && (detail.charas.Count != 2 || !detail.charas[0].IsDeadOrSleeping || !detail.charas[0].IsPCC))
{
_actorPos += renderSetting.charaPos[1 + ((num21 < 4) ? num21 : 3)];
}
_actorPos.z += 0.01f * (float)n + renderSetting.charaZ;
num21++;
if (flag10)
{
_actorPos.z += chara.renderer.data.hangedFixZ;
}
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
}
break;
}
param.x = orgX;
param.y = orgY;
param.z = orgZ;
}
if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode)
return;
IL_6f4f:
if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
{
if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
{
goto IL_6f1f;
}
if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
{
Room obj = this.cell.FrontRight.room;
if (obj == null || !obj.HasRoof)
{
goto IL_6f1f;
}
}
param.tile = num14;
rendererFov.Draw(param);
}
goto IL_6f7f;
goto IL_6faf;
void Draw(int tile)
{
pass = passEdge;
CharaBody
@@ -130,6 +130,10 @@ public bool IsEquippable(Thing thing, BodySlot slot, bool text = true)
}
break;
}
if (slot.thing != null && slot.thing.blessedState <= BlessedState.Cursed)
{
return CannotEquip();
}
if (IsTooHeavyToEquip(thing))
{
if (EClass.core.IsGameStarted && owner.IsPC && text)
ENC
@@ -54,7 +54,7 @@ public class ENC
public const int mod_scatter = 607;
public const int encSpell = 411;
public const int bane_animal = 463;
public const int mod_precision = 605;
@@ -68,7 +68,7 @@ public class ENC
public const int negateConfusion = 425;
public const int negateSleep = 424;
public const int mod_drill = 606;
public const int negateFear = 423;
@@ -82,9 +82,11 @@ public class ENC
public const int invisibility = 415;
public const int sustain_STR = 440;
public const int encHit = 414;
public const int slowCorruption = 412;
public const int encSpell = 411;
public const int throwReturn = 410;
@@ -92,7 +94,7 @@ public class ENC
public const int resWeather = 408;
public const int mod_drill = 606;
public const int travelSpeed = 407;
public const int resMutation = 406;
@@ -108,13 +110,13 @@ public class ENC
public const int negateTeleport = 400;
public const int sustain_STR = 440;
public const int slowCorruption = 412;
public const int sustain_END = 441;
public const int travelSpeed = 407;
public const int negateSleep = 424;
public const int optimizeMana = 483;
public const int slot_rune = 484;
public const int mod_ammo_recover = 604;
@@ -126,7 +128,7 @@ public class ENC
public const int mod_ammo = 600;
public const int slot_rune = 484;
public const int optimizeMana = 483;
public const int force_weapon = 482;
@@ -150,30 +152,28 @@ public class ENC
public const int sustain_PER = 443;
public const int sustain_LER = 444;
public const int bane_animal = 463;
public const int sustain_WIL = 445;
public const int sustain_MAG = 446;
public const int sustain_WIL = 445;
public const int sustain_CHA = 447;
public const int sustain_LER = 444;
public const int bane_dragon = 460;
public const int bane_undead = 461;
public const int sustain_CHA = 447;
public static readonly int[] IDS = new int[82]
{
652, 651, 650, 641, 640, 621, 620, 623, 622, 653,
624, 654, 851, 656, 660, 661, 662, 663, 664, 665,
666, 850, 608, 865, 852, 655, 607, 411, 605, 429,
428, 427, 426, 425, 424, 423, 422, 421, 420, 416,
415, 414, 412, 410, 409, 408, 606, 406, 405, 404,
403, 402, 401, 400, 440, 441, 407, 483, 604, 603,
602, 601, 600, 484, 482, 481, 480, 468, 467, 465,
464, 466, 462, 442, 443, 444, 463, 446, 445, 447,
460, 461
666, 850, 608, 865, 852, 655, 607, 463, 605, 429,
428, 427, 426, 425, 606, 423, 422, 421, 420, 416,
415, 440, 414, 411, 410, 409, 408, 407, 406, 405,
404, 403, 402, 401, 400, 412, 441, 424, 484, 604,
603, 602, 601, 600, 483, 482, 481, 480, 468, 467,
465, 464, 466, 462, 442, 443, 445, 446, 444, 460,
461, 447
};
}
FACTION
public class FACTION
{
public const int bfSea = 3605;
public const int bfFertile = 3700;
public const int bfHill = 3603;
public const int bfBeach = 3604;
public const int bfCave = 3500;
public const int fRation = 2207;
public const int bfGeyser = 3701;
@@ -22,13 +24,11 @@ public class FACTION
public const int bfPlain = 3600;
public const int bfSea = 3605;
public const int fRation = 2207;
public const int bfCave = 3500;
public const int actBuildAnywhere = 4003;
public const int fAttraction = 2206;
public const int fSafety = 2205;
public const int fLoyal = 2117;
public const int fFood = 2204;
@@ -38,37 +38,41 @@ public class FACTION
public const int fElec = 2201;
public const int bfTranquil = 3703;
public const int fSoil = 2200;
public const int fLuck = 2118;
public const int fConstruction = 2003;
public const int fHeirloom = 2120;
public const int fTaxEvasion = 2119;
public const int fLuck = 2118;
public const int fAdmin = 2115;
public const int fLoyal = 2117;
public const int fEducation = 2116;
public const int fAttraction = 2206;
public const int fSafety = 2205;
public const int bfVolcano = 3704;
public const int bfTranquil = 3703;
public const int bfMushroom = 3801;
public const int bfHunt = 3705;
public const int bfFish = 3706;
public const int actBuildInspect = 4006;
public const int actBuildRecipe = 4005;
public const int actBuildInspect = 4006;
public const int actBuildCollect = 4004;
public const int actBuildAnywhere = 4003;
public const int actBuildTerrain = 4002;
public const int actBuildMine = 4001;
public const int fEducation = 2116;
public const int actBuildCut = 4000;
public const int bfVolcano = 3704;
public const int bfStart = 3900;
@@ -78,44 +82,40 @@ public class FACTION
public const int bfGum = 3803;
public const int bfHunt = 3705;
public const int bfSilica = 3802;
public const int actBuildCut = 4000;
public const int bfCoal = 3800;
public const int bfMushroom = 3801;
public const int bfLandmark5 = 3784;
public const int bfSilica = 3802;
public const int bfLandmark4 = 3783;
public const int bfFreshAir = 3708;
public const int bfLandmark3 = 3782;
public const int bfBasin = 3709;
public const int bfLandmark2 = 3781;
public const int bfBreed = 3710;
public const int bfLandmark1 = 3780;
public const int bfBreed = 3710;
public const int bfBasin = 3709;
public const int bfMonster = 3707;
public const int bfFreshAir = 3708;
public const int bfLandmark3 = 3782;
public const int bfMonster = 3707;
public const int bfLandmark4 = 3783;
public const int actBuildCollect = 4004;
public const int bfLandmark5 = 3784;
public const int fAdmin = 2115;
public const int bfCoal = 3800;
public const int fConstruction = 2003;
public const int bfLandmark2 = 3781;
public static readonly int[] IDS = new int[52]
{
3700, 3603, 3604, 3500, 3701, 3702, 3602, 3601, 3600, 3605,
2207, 4003, 2205, 2204, 2203, 2202, 2201, 3703, 2200, 2120,
2119, 2118, 2117, 2206, 3704, 3801, 3706, 4005, 4006, 4002,
4001, 2116, 4000, 3900, 3805, 3804, 3803, 3705, 3802, 3800,
3784, 3783, 3782, 3781, 3780, 3710, 3709, 3708, 3707, 4004,
2115, 2003
3605, 3700, 3603, 3604, 2207, 3701, 3702, 3602, 3601, 3600,
3500, 2206, 2117, 2204, 2203, 2202, 2201, 2200, 2118, 2003,
2120, 2119, 2115, 2116, 2205, 3703, 3705, 3706, 4006, 4005,
4004, 4003, 4002, 4001, 3704, 3900, 3805, 3804, 3803, 4000,
3801, 3802, 3708, 3709, 3710, 3780, 3707, 3782, 3783, 3784,
3800, 3781
};
}
public class Faction : EClass
FEAT
public class FEAT
{
public const int featUndead = 1210;
public const int featMartial = 1635;
public const int featNegotiate = 1634;
public const int featSpotting = 1633;
public const int featEvade = 1632;
public const int featDefense = 1631;
public const int featHardy = 1630;
public const int featSPD = 1629;
public const int featLuck = 1628;
public const int featCHA = 1627;
public const int featWIL = 1626;
public const int featMAG = 1625;
public const int featFaith = 1636;
public const int featLER = 1624;
public const int featPER = 1623;
public const int featEND = 1622;
public const int featDEX = 1621;
@@ -41,7 +23,7 @@ public class FEAT
public const int featMana = 1611;
public const int featLife = 1610;
public const int featEarthStrength = 1411;
public const int featManaMeat = 1421;
@@ -53,38 +35,32 @@ public class FEAT
public const int featWitch = 1417;
public const int featPER = 1623;
public const int featAnimalLover = 1640;
public const int featResCurse = 1641;
public const int featSleeper = 1642;
public const int featFluffyTail = 1209;
public const int featInquisitor = 1416;
public const int featSlowFood = 1200;
public const int featFoxMaid = 1415;
public const int featManaBond = 1201;
public const int featWhiteVixen = 1414;
public const int featFastLearner = 1202;
public const int featFairysan = 1413;
public const int featGrowParts = 1203;
public const int featLuckyCat = 1412;
public const int featFairyWeak = 1204;
public const int featLuck = 1628;
public const int featCannibalism = 1205;
public const int featLife = 1610;
public const int featMelilithCurse = 1206;
public const int featSPD = 1629;
public const int featFoxBless = 1207;
public const int featParty = 1645;
public const int featFoxLearn = 1208;
public const int featDefense = 1631;
public const int featChef = 1658;
public const int featReboot = 1410;
public const int featManaCost = 1657;
public const int featScavenger = 1656;
public const int featModelBeliever = 1655;
public const int featHeavyCasting = 1654;
@@ -105,19 +81,51 @@ public class FEAT
public const int featLonelySoul = 1646;
public const int featParty = 1645;
public const int featBodyParts = 1644;
public const int featSorter = 1643;
public const int featInquisitor = 1416;
public const int featSleeper = 1642;
public const int featFoxMaid = 1415;
public const int featResCurse = 1641;
public const int featScavenger = 1656;
public const int featAnimalLover = 1640;
public const int featFairysan = 1413;
public const int featFaith = 1636;
public const int featMartial = 1635;
public const int featNegotiate = 1634;
public const int featSpotting = 1633;
public const int featEvade = 1632;
public const int featHardy = 1630;
public const int featBoost = 1409;
public const int featChef = 1658;
public const int featPaladin = 1407;
public const int featShiva = 1224;
public const int featLoyal = 1225;
public const int featUnderground = 1226;
public const int featServant = 1227;
public const int featDemigod = 1228;
public const int featLittleOne = 1229;
public const int featAdam = 1230;
public const int featNirvana = 1231;
public const int featCosmicHorror = 1233;
public const int featHeavyEater = 1234;
@@ -129,8 +137,12 @@ public class FEAT
public const int featElder = 1238;
public const int featDemon = 1239;
public const int featGod_element1 = 1300;
public const int featGod_earth1 = 1305;
public const int featGod_wind1 = 1310;
public const int featGod_machine1 = 1315;
@@ -139,33 +151,39 @@ public class FEAT
public const int featGod_harvest1 = 1325;
public const int featAcidBody = 1223;
public const int featGod_luck1 = 1330;
public const int featGod_harmony1 = 1335;
public const int featSplit = 1222;
public const int featGod_oblivion1 = 1340;
public const int featFate = 1220;
public const int featGod_trickery1 = 1345;
public const int featPaladin2 = 1408;
public const int featGod_moonshadow1 = 1350;
public const int featSlowFood = 1200;
public const int featGod_strife1 = 1355;
public const int featManaBond = 1201;
public const int featWarrior = 1400;
public const int featFastLearner = 1202;
public const int featThief = 1401;
public const int featGrowParts = 1203;
public const int featWizard = 1402;
public const int featFairyWeak = 1204;
public const int featCosmicHorror = 1233;
public const int featCannibalism = 1205;
public const int featBaby = 1232;
public const int featMelilithCurse = 1206;
public const int featNirvana = 1231;
public const int featFoxBless = 1207;
public const int featAdam = 1230;
public const int featFoxLearn = 1208;
public const int featWhiteVixen = 1414;
public const int featFluffyTail = 1209;
public const int featUndead = 1210;
public const int featSnail = 1211;
public const int featFairyResist = 1212;
@@ -183,64 +201,48 @@ public class FEAT
public const int featElderCrab = 1219;
public const int featFarmer = 1403;
public const int featFate = 1220;
public const int featSplit = 1222;
public const int featSpike = 1221;
public const int featSnail = 1211;
public const int featGod_harmony1 = 1335;
public const int featAcidBody = 1223;
public const int featBaby = 1232;
public const int featShiva = 1224;
public const int featGod_trickery1 = 1345;
public const int featLoyal = 1225;
public const int featGod_oblivion1 = 1340;
public const int featUnderground = 1226;
public const int featGod_moonshadow1 = 1350;
public const int featServant = 1227;
public const int featGod_strife1 = 1355;
public const int featDemigod = 1228;
public const int featWarrior = 1400;
public const int featLittleOne = 1229;
public const int featWizard = 1402;
public const int featSpike = 1221;
public const int featFarmer = 1403;
public const int featArcher = 1404;
public const int featGod_earth1 = 1305;
public const int featTourist = 1406;
public const int featPianist = 1405;
public const int featPaladin2 = 1408;
public const int featReboot = 1410;
public const int featEarthStrength = 1411;
public const int featBoost = 1409;
public const int featLuckyCat = 1412;
public const int featThief = 1401;
public const int featPaladin = 1407;
public const int featTourist = 1406;
public static readonly int[] IDS = new int[112]
public static readonly int[] IDS = new int[113]
{
1210, 1635, 1634, 1633, 1632, 1631, 1630, 1629, 1628, 1627,
1626, 1625, 1636, 1624, 1622, 1621, 1620, 1612, 1611, 1610,
1421, 1420, 1419, 1418, 1417, 1623, 1640, 1641, 1642, 1209,
1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1658,
1657, 1655, 1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647,
1646, 1645, 1644, 1643, 1416, 1415, 1656, 1413, 1234, 1235,
1236, 1237, 1238, 1300, 1310, 1315, 1320, 1325, 1330, 1335,
1340, 1345, 1350, 1355, 1400, 1401, 1402, 1233, 1232, 1231,
1230, 1414, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219,
1403, 1220, 1222, 1211, 1223, 1224, 1225, 1226, 1227, 1228,
1229, 1221, 1404, 1305, 1406, 1405, 1408, 1410, 1411, 1409,
1412, 1407
1627, 1626, 1625, 1624, 1623, 1622, 1621, 1620, 1612, 1611,
1411, 1421, 1420, 1419, 1418, 1417, 1416, 1415, 1414, 1413,
1412, 1628, 1610, 1629, 1645, 1631, 1410, 1657, 1656, 1655,
1654, 1653, 1652, 1651, 1650, 1649, 1648, 1647, 1646, 1644,
1643, 1642, 1641, 1640, 1636, 1635, 1634, 1633, 1632, 1630,
1409, 1658, 1407, 1224, 1225, 1226, 1227, 1228, 1229, 1230,
1231, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1300, 1305,
1310, 1315, 1320, 1325, 1223, 1330, 1222, 1220, 1408, 1200,
1201, 1202, 1203, 1204, 1205, 1206, 1207, 1208, 1209, 1210,
1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1221,
1335, 1232, 1345, 1340, 1350, 1355, 1400, 1402, 1403, 1404,
1405, 1401, 1406
};
}
public class Feat : Element
@@ -472,6 +474,13 @@ public List<string> Apply(int a, ElementContainer owner, bool hint = false)
ModBase(956, a * 10, hide: false);
ModBase(950, a * -5, hide: false);
break;
case 1239:
ModBase(956, a * 5, hide: false);
ModBase(959, a * 5, hide: false);
ModBase(423, a, hide: false);
ModBase(424, a, hide: false);
ModBase(421, a, hide: false);
break;
case 1233:
ModBase(954, a * 10, hide: false);
ModBase(423, a, hide: false);
FOOD
public class FOOD
{
public const int gainWeight = 705;
public const int food_CHA = 700;
public const int food_bug = 704;
public const int food_cat = 701;
public const int food_love = 703;
public const int food_god = 758;
public const int justcooked = 757;
public const int food_poison = 702;
public const int food_cat = 701;
public const int gainWeight = 705;
public const int justcooked = 757;
public const int food_bug = 704;
public const int food_god = 758;
public const int food_love = 703;
public const int loseWeight = 706;
public const int food_CHA = 700;
public static readonly int[] IDS = new int[9] { 705, 704, 703, 702, 701, 757, 758, 706, 700 };
public static readonly int[] IDS = new int[9] { 700, 701, 758, 757, 702, 705, 704, 703, 706 };
}
Game
@@ -466,6 +466,9 @@ public void OnLoad()
{
EClass.game.principal = IO.DeepCopy(EClass.setting.start.principals[0]);
player.resetPrincipal = true;
}
if (player.resetPrincipal)
{
GameDifficultySetting gameDifficultySetting = EClass.setting.start.difficulties[idDifficulty];
EClass.game.principal.id = -1;
EClass.game.principal.permadeath = gameDifficultySetting.deleteGameOnDeath;
GrowSystem
@@ -506,8 +506,11 @@ public void OnProgressComplete(Chara c)
public void PopMineObj(Chara c = null)
{
OnMineObj(c);
TryPopSeed(c);
if (!EClass._zone.IsUserZone || !EClass.game.principal.disableUsermapBenefit)
{
OnMineObj(c);
TryPopSeed(c);
}
}
public virtual void OnMineObj(Chara c = null)
GrowSystemTree
@@ -170,7 +170,7 @@ public override void OnMineObj(Chara c = null)
TryPick(GrowSystem.cell, IsPalulu ? "leaf_palulu" : "bark", -1, 1 + PlantBonus() / 2);
TryPick(GrowSystem.cell, "log", id, 1 + EClass.rnd(3) + PlantBonus(), applySeed: true);
TryPick(GrowSystem.cell, "resin", -1, 1 + PlantBonus() / 2);
if ((!EClass._zone.IsUserZone || !EClass.game.principal.disableUsermapBenefit) && !EClass.player.isAutoFarming)
if (!EClass.player.isAutoFarming)
{
if (EClass.rnd(500) == 0)
{
@@ -185,7 +185,7 @@ public override void OnMineObj(Chara c = null)
}
TryPick(GrowSystem.cell, "bark", -1, EClass.rnd(3) + PlantBonus());
TryPick(GrowSystem.cell, "resin", -1, 1 + PlantBonus() / 2);
if ((!EClass._zone.IsUserZone || !EClass.game.principal.disableUsermapBenefit) && !EClass.player.isAutoFarming)
if (!EClass.player.isAutoFarming)
{
TryPick(GrowSystem.cell, TraitSeed.MakeSeed(GrowSystem.cell.sourceObj, plant).SetNum(1 + EClass.rnd(3)), c);
if (EClass.rnd(100) == 0)
Hobby
@@ -35,6 +35,10 @@ public int GetEfficiency(Chara c)
{
return 0;
}
if (source.alias == "Breeding")
{
return c.race.breeder;
}
if (c.currentZone == null || c.currentZone == EClass._zone)
{
if ((!source.destTrait.IsEmpty() || !source.workTag.IsEmpty()) && !GetAI(c).SetDestination())
@@ -54,10 +58,6 @@ public int GetEfficiency(Chara c)
}
}
}
if (source.alias == "Breeding")
{
num = num * c.race.breeder / 100;
}
num += GetLv(c);
if (c.affinity.value < 0)
{
HotItemHeld
@@ -374,13 +374,6 @@ public bool TrySetToolAct(ActPlan p)
{
return true;
}
if (thing.HasElement(286) && p.TrySetAct(new TaskPlow
{
pos = pos.Copy()
}))
{
return true;
}
if (thing.HasElement(230) && p.TrySetAct(new TaskDig
{
pos = pos.Copy(),
@@ -389,14 +382,7 @@ public bool TrySetToolAct(ActPlan p)
{
return true;
}
if (TaskMine.CanMine(pos, thing) && p.TrySetAct(new TaskMine
{
pos = pos.Copy()
}))
{
return true;
}
if (thing.HasElement(225) && p.TrySetAct(new TaskChopWood
if (thing.HasElement(286) && p.TrySetAct(new TaskPlow
{
pos = pos.Copy()
}))
@@ -404,6 +390,20 @@ public bool TrySetToolAct(ActPlan p)
return true;
}
}
if (TaskMine.CanMine(pos, thing) && p.TrySetAct(new TaskMine
{
pos = pos.Copy()
}))
{
return true;
}
if (thing.HasElement(225) && p.TrySetAct(new TaskChopWood
{
pos = pos.Copy()
}))
{
return true;
}
if (pos.HasChara)
{
_ = pos.FirstChara;
MUTATION
public class MUTATION
{
public const int mutationSpeedN = 1519;
public const int mutationSpeed = 1518;
public const int mutationRegen = 1516;
public const int mutationRegenN = 1517;
public const int etherPoisonHand = 1565;
public const int mutationRegen = 1516;
public const int mutationSkin = 1510;
public const int mutationSkinN = 1511;
public const int mutationDex = 1514;
public const int mutationEye = 1512;
public const int mutationSkin = 1510;
public const int mutationEyeN = 1513;
public const int mutationStr = 1520;
public const int mutationDex = 1514;
public const int mutationDexN = 1515;
public const int mutationStrN = 1521;
public const int mutationEyeN = 1513;
public const int mutationChaN = 1523;
public const int mutationRegenN = 1517;
public const int etherPoisonHand = 1565;
public const int etherManaBattery = 1564;
public const int mutationCha = 1522;
public const int mutationSpeedN = 1519;
public const int etherProvoke = 1563;
public const int etherArmor = 1562;
public const int etherStupid = 1561;
public const int mutationSpeed = 1518;
public const int etherWeak = 1560;
@@ -50,38 +42,46 @@ public class MUTATION
public const int etherWing = 1554;
public const int etherManaBattery = 1564;
public const int etherEye = 1553;
public const int etherFeet = 1552;
public const int etherUgly = 1551;
public const int etherGravity = 1550;
public const int etherStupid = 1561;
public const int mutationBodyN = 1531;
public const int mutationStrN = 1521;
public const int mutationBody = 1530;
public const int mutationStr = 1520;
public const int mutationLightningN = 1529;
public const int mutationCha = 1522;
public const int mutationLightning = 1528;
public const int mutationChaN = 1523;
public const int mutationColdN = 1527;
public const int mutationBrainN = 1525;
public const int mutationCold = 1526;
public const int mutationBrainN = 1525;
public const int mutationBrain = 1524;
public const int etherEye = 1553;
public const int mutationLightning = 1528;
public const int mutationLightningN = 1529;
public const int mutationBody = 1530;
public const int mutationBodyN = 1531;
public const int mutationColdN = 1527;
public const int etherGravity = 1550;
public static readonly int[] IDS = new int[38]
{
1519, 1518, 1517, 1516, 1511, 1514, 1512, 1510, 1520, 1515,
1521, 1513, 1523, 1565, 1522, 1563, 1562, 1561, 1560, 1559,
1558, 1557, 1556, 1555, 1554, 1564, 1552, 1551, 1550, 1531,
1530, 1529, 1528, 1527, 1526, 1525, 1524, 1553
1516, 1565, 1510, 1511, 1512, 1513, 1514, 1515, 1517, 1564,
1519, 1563, 1562, 1518, 1560, 1559, 1558, 1557, 1556, 1555,
1554, 1553, 1552, 1551, 1561, 1521, 1520, 1522, 1523, 1525,
1526, 1524, 1528, 1529, 1530, 1531, 1527, 1550
};
}
public class Mutation : Feat
Map
@@ -1612,6 +1612,10 @@ public void ApplyBackerObj(Point p, int id = -1)
public void DropBlockComponent(Point point, TileRow r, SourceMaterial.Row mat, bool recoverBlock, bool isPlatform = false, Chara c = null)
{
if (EClass._zone.IsUserZone && EClass.game.principal.disableUsermapBenefit)
{
return;
}
Thing thing = null;
if (r.components.Length == 0)
{
point.PlaySound(row.GetSoundDead(row2));
row.AddBlood(point, 8);
bool flag2 = c == null || c.IsAgent || c.IsPCFactionOrMinion;
if (EClass._zone.IsUserZone && EClass.game.principal.disableUsermapBenefit)
{
flag2 = false;
}
if (flag)
{
point.cell._roofBlock = 0;
@@ -1889,13 +1897,16 @@ public void MineObj(Point point, Task task = null, Chara c = null)
cell.gatherCount = 0;
void Pop(Thing t)
{
if (EClass.scene.actionMode.IsBuildMode && EClass.debug.godBuild)
if (!EClass._zone.IsUserZone || !EClass.game.principal.disableUsermapBenefit)
{
EClass._map.PutAway(t);
}
else
{
TrySmoothPick(point, t, c);
if (EClass.scene.actionMode.IsBuildMode && EClass.debug.godBuild)
{
EClass._map.PutAway(t);
}
else
{
TrySmoothPick(point, t, c);
}
}
}
}
@@ -1961,7 +1972,7 @@ public void _ValidateInstalled(int x, int y)
HitResult hitResult = item.TileType._HitTest(point, item.Thing, canIgnore: false);
if (item.Thing.stackOrder != detail.things.IndexOf(item.Thing) || (hitResult != HitResult.Valid && hitResult != HitResult.Warning))
{
if (EClass._zone.IsPCFaction || !item.isNPCProperty)
if (EClass._zone.IsPCFaction || (!item.isNPCProperty && !(item.trait is TraitHarvest)))
{
item.SetPlaceState(PlaceState.roaming);
}
POLICY
public class POLICY
{
public const int forcePanty = 2712;
public const int bed_quality = 2812;
public const int platinum_ticket = 2815;
@@ -11,21 +11,21 @@ public class POLICY
public const int suite_room = 2813;
public const int livestock_priv = 2715;
public const int tourist_safety = 2811;
public const int forcePanty = 2712;
public const int open_business = 2810;
public const int home_discount = 2800;
public const int livestock_priv = 2715;
public const int store_ripoff = 2816;
public const int bed_quality = 2812;
public const int tourist_safety = 2811;
public const int store_premium = 2817;
public const int celeb = 2822;
public const int license_stolen = 2824;
public const int license_furniture = 2819;
@@ -33,9 +33,9 @@ public class POLICY
public const int legendary_heirloom = 2821;
public const int legendary_exhibition = 2823;
public const int celeb = 2822;
public const int license_stolen = 2824;
public const int legendary_exhibition = 2823;
public const int milk_fan = 2825;
@@ -49,47 +49,47 @@ public class POLICY
public const int incomeTransfer = 2711;
public const int self_sufficient = 2511;
public const int nocturnal_life = 2508;
public const int noAnimal = 2709;
public const int prohibition = 2503;
public const int noMother = 2710;
public const int food_for_people = 2502;
public const int faith_tax = 2501;
public const int wealth_tax = 2500;
public const int prohibition = 2503;
public const int impressment = 2504;
public const int legal_drug = 2505;
public const int inquisition = 2507;
public const int human_right = 2506;
public const int nocturnal_life = 2508;
public const int wealth_tax = 2500;
public const int vaccination = 2509;
public const int ban_radio = 2510;
public const int self_sufficient = 2511;
public const int resident_tax = 2512;
public const int human_right = 2506;
public const int inquisition = 2507;
public const int taxfree = 2514;
public const int resident_wanted = 2513;
public const int noDM = 2708;
public const int auto_farm = 2707;
public const int resident_wanted = 2513;
public const int demon_invocation = 2706;
public const int taxTransfer = 2705;
public const int noDM = 2708;
public const int auto_farm = 2707;
public const int weed_no = 2703;
@@ -107,11 +107,11 @@ public class POLICY
public static readonly int[] IDS = new int[51]
{
2712, 2815, 2814, 2813, 2715, 2811, 2810, 2800, 2816, 2812,
2817, 2822, 2819, 2820, 2821, 2823, 2824, 2825, 2826, 2827,
2828, 2818, 2711, 2511, 2709, 2710, 2502, 2501, 2500, 2503,
2504, 2505, 2507, 2508, 2509, 2510, 2512, 2506, 2514, 2513,
2707, 2706, 2705, 2708, 2703, 2704, 2701, 2700, 2516, 2515,
2812, 2815, 2814, 2813, 2712, 2810, 2800, 2715, 2816, 2811,
2817, 2824, 2819, 2820, 2821, 2822, 2823, 2825, 2826, 2827,
2828, 2818, 2711, 2508, 2709, 2503, 2710, 2502, 2501, 2504,
2505, 2506, 2500, 2509, 2510, 2511, 2512, 2507, 2514, 2708,
2513, 2706, 2705, 2707, 2703, 2704, 2701, 2700, 2516, 2515,
2702
};
}
Point
@@ -1088,7 +1088,7 @@ public Chara FindChara(Func<Chara, bool> func)
public T FindThing<T>() where T : Trait
{
if (detail != null)
if (IsValid && detail != null)
{
foreach (Thing thing in detail.things)
{
RenderRow
@@ -354,7 +354,7 @@ public void SetImage(Image image, Sprite sprite = null, int matCol = 0, bool set
RectTransform rectTransform = image.Rect();
SourcePref sourcePref = GetPref();
rectTransform.pivot = renderData.imagePivot - new Vector2(0.01f * (float)sourcePref.pivotX, 0.01f * (float)sourcePref.pivotY);
float x = Mathf.Abs(image.transform.localScale.x) * (float)(((bool)sprite || _tiles.Length == 0 || _tiles[dir % _tiles.Length] >= 0) ? 1 : (-1));
float x = Mathf.Abs(image.transform.localScale.x) * (float)((_tiles == null || _tiles.Length == 0 || _tiles[dir % _tiles.Length] >= 0) ? 1 : (-1));
float y = image.transform.localScale.y;
image.transform.localScale = new Vector3(x, y, image.transform.localScale.z);
sourcePref.Validate();
SKILL
public class SKILL
{
public const int tactics = 132;
public const int twowield = 131;
public const int twohand = 130;
@@ -10,7 +8,7 @@ public class SKILL
public const int armorHeavy = 122;
public const int acidproof = 51;
public const int fireproof = 50;
public const int weaponBlunt = 111;
@@ -18,17 +16,17 @@ public class SKILL
public const int weaponCrossbow = 109;
public const int fireproof = 50;
public const int acidproof = 51;
public const int marksman = 133;
public const int tactics = 132;
public const int armorLight = 120;
public const int eyeofmind = 134;
public const int marksman = 133;
public const int parasite = 227;
public const int riding = 226;
public const int evasion = 150;
public const int strategy = 135;
public const int climbing = 242;
@@ -42,15 +40,15 @@ public class SKILL
public const int digging = 230;
public const int PDR = 55;
public const int parasite = 227;
public const int riding = 226;
public const int eyeofmind = 134;
public const int lumberjack = 225;
public const int PDR = 55;
public const int mining = 220;
public const int fishing = 245;
public const int spotting = 210;
public const int weightlifting = 207;
@@ -60,7 +58,9 @@ public class SKILL
public const int evasionPlus = 151;
public const int strategy = 135;
public const int evasion = 150;
public const int lumberjack = 225;
public const int EDR = 56;
@@ -68,6 +68,8 @@ public class SKILL
public const int life = 60;
public const int fishing = 245;
public const int mana = 61;
public const int vigor = 62;
@@ -94,11 +96,11 @@ public class SKILL
public const int WIL = 75;
public const int MAG = 76;
public const int evasionPerfect = 57;
public const int CHA = 77;
public const int MAG = 76;
public const int LUC = 78;
public const int SPD = 79;
@@ -112,8 +114,6 @@ public class SKILL
public const int antiMagic = 93;
public const int martial = 100;
public const int weaponAxe = 102;
public const int weaponStaff = 103;
@@ -128,11 +128,11 @@ public class SKILL
public const int throwing = 108;
public const int LUC = 78;
public const int CHA = 77;
public const int gathering = 250;
public const int spotting = 210;
public const int martial = 100;
public const int blacksmith = 256;
@@ -268,13 +268,13 @@ public class SKILL
public static readonly int[] IDS = new int[133]
{
132, 131, 130, 123, 122, 51, 111, 110, 109, 50,
133, 120, 134, 227, 150, 242, 241, 240, 237, 235,
230, 55, 226, 225, 220, 245, 207, 200, 152, 151,
135, 56, 101, 60, 61, 62, 64, 65, 66, 67,
68, 70, 71, 72, 73, 74, 75, 76, 57, 77,
79, 80, 90, 91, 92, 93, 100, 102, 103, 104,
105, 106, 107, 108, 78, 250, 210, 256, 916, 917,
131, 130, 123, 122, 50, 111, 110, 109, 51, 132,
120, 133, 226, 135, 242, 241, 240, 237, 235, 230,
227, 134, 55, 220, 210, 207, 200, 152, 151, 150,
225, 56, 101, 60, 245, 61, 62, 64, 65, 66,
67, 68, 70, 71, 72, 73, 74, 75, 57, 76,
78, 79, 80, 90, 91, 92, 93, 102, 103, 104,
105, 106, 107, 108, 77, 250, 100, 256, 916, 917,
918, 919, 920, 921, 922, 923, 924, 925, 926, 950,
951, 952, 915, 953, 955, 956, 957, 958, 959, 960,
961, 962, 963, 964, 965, 970, 972, 255, 954, 914,
StatsMana
@@ -49,9 +49,10 @@ public override void Mod(int a)
}
BaseStats.CC.Say("mana_overflow", BaseStats.CC);
BaseStats.CC.DamageHP(num, 921, 100, AttackSource.ManaBackfire);
if (BaseStats.CC.IsAliveInCurrentZone)
Chara cC = BaseStats.CC;
if (cC.IsAliveInCurrentZone)
{
BaseStats.CC.elements.ModExp(303, Mathf.Clamp(-a * 10, 10, 200));
cC.elements.ModExp(303, Mathf.Clamp(-a * 10, 10, 200));
}
}
}
TaskHarvest
@@ -255,7 +255,11 @@ public override void OnCreateProgress(Progress_Custom p)
p.interval = 1;
p.onProgressBegin = delegate
{
if (base.IsTooHard)
if (TryGetAct(owner, pos) == null)
{
p.Cancel();
}
else if (base.IsTooHard)
{
owner.Say((mode == HarvestType.Disassemble) ? "tooHardToDisassemble" : "tooHardToHarvest", owner, i);
p.Cancel();
@@ -371,7 +375,10 @@ public override void OnCreateProgress(Progress_Custom p)
{
exp = target.Num * 5;
num2 = target.Num / 3 + EClass.rnd(target.Num / 3 + 2);
HarvestThing();
if (!EClass._zone.IsUserZone || !EClass.game.principal.disableUsermapBenefit || !target.isNPCProperty)
{
HarvestThing();
}
}
if (EClass._zone.IsCrime(owner, this) && EClass.rnd(3) != 0)
{
Thing
@@ -997,7 +997,7 @@ public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns
{
int key = base.category.skill;
int key2 = 132;
if (base.IsRangedWeapon)
if (base.IsRangedWeapon && !base.IsMeleeWeapon)
{
key2 = 133;
}
TraitCobWeb
public class TraitCobWeb : Trait
public class TraitCobWeb : TraitHarvest
{
public override string ReqHarvest => "gathering,1";
}