EA 23.301 Nightly โ
May 2, 2026
22 files modified.
Important Changes โ
None.
ActEffect โ
void AddCon<T>(int rate, int power) where T : Condition
});
Thing thing4 = ThingGen.Create(tc.id, -1, (int)((long)num6 * (long)power / 400));
thing4.genLv = num6;
thing4.idSkin = tc.idSkin;
if (tc.c_uidAttune != 0)
{
thing4.c_uidAttune = tc.c_uidAttune;ActMelee โ
int num = 1 + Mathf.Max(Act.CC.Evalue(666), (w != null) ? w.Evalue(666) : 0);
if (!UseWeaponDist || dist <= 1 || dist <= num || intercepted)
{
int num2 = GetWeaponEnc(606, addSelfEnc: false);
int scatter = GetWeaponEnc(607, addSelfEnc: false);
int num2 = GetWeaponEnc(606, addSelfEnc: true);
int scatter = GetWeaponEnc(607, addSelfEnc: true);
splash = GetWeaponEnc(608, addSelfEnc: true);
chaser = GetWeaponEnc(620, addSelfEnc: true);
flurry = GetWeaponEnc(621, addSelfEnc: true);
frustration = GetWeaponEnc(624, addSelfEnc: true);
int num3 = GetWeaponEnc(622, addSelfEnc: true);
feint = GetWeaponEnc(623, addSelfEnc: true);
knockback = Act.CC.Evalue(603);
knockback = Act.CC.Evalue(603, ignoreGlobalElement: true);
mod_talisman = GetWeaponEnc(609, addSelfEnc: true);
List<Point> list2 = EClass._map.ListPointsInLine(Act.CC.pos, Act.TC.pos, num2 / 10 + ((num2 % 10 > EClass.rnd(10)) ? 1 : 0) + 1);
if (w != null)AttackProcess โ
public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
num2 += weapon.Evalue(91, ignoreGlobalElement: true);
num3 += weapon.Evalue(603, ignoreGlobalElement: true);
}
foreach (Element value in CC.elements.dict.Values)
{
if (!value.IsGlobalElement && value.source.categorySub == "eleAttack")
{
list.Add(value);
}
}
if (!IsRanged && !isThrow && CC.HasElement(1426))
{
list.Add(Element.Create(6650, 100));public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
}
if (CC.IsPCFaction)
{
foreach (Element value in EClass.pc.faction.charaElements.dict.Values)
foreach (Element value2 in EClass.pc.faction.charaElements.dict.Values)
{
if (value.Value > 0)
if (value2.Value > 0)
{
list.Add(value);
list.Add(value2);
}
}
}public bool Perform(int count, bool hasHit, float dmgMulti = 1f, bool maxRoll =
ConWeapon conWeapon = null;
if (weapon != null)
{
foreach (Element value2 in weapon.elements.dict.Values)
foreach (Element value3 in weapon.elements.dict.Values)
{
if (value2.source.categorySub == "eleConvert")
if (value3.source.categorySub == "eleConvert")
{
num4 = EClass.sources.elements.alias[value2.source.aliasRef].id;
num5 = 50 + value2.Value * 2;
num6 = Mathf.Min(value2.Value, 100);
num4 = EClass.sources.elements.alias[value3.source.aliasRef].id;
num5 = 50 + value3.Value * 2;
num6 = Mathf.Min(value3.Value, 100);
break;
}
}BaseTileMap โ
public virtual void DrawTile()
fogged = true;
}
}
goto IL_7b1b;
IL_6f8a:
int num3;
if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
goto IL_7b6a;
IL_169b:
if (this.cell.isSlopeEdge)
{
param.tile = num3;
rendererFov.Draw(param);
float num3 = (float)height * _heightMod.y;
orgY = param.y;
orgZ = param.z;
param.dir = this.cell.blockDir;
if (snowed)
{
param.color = floorLight;
}
SourceBlock.Row defBlock;
if (sourceBlock.tileType.IsFullBlock)
{
defBlock = sourceBlock;
param.mat = matBlock;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
}
else
{
defBlock = sourceFloor._defBlock;
param.mat = matFloor;
param.tile = defBlock._tiles[this.cell.blockDir % defBlock._tiles.Length];
if (defBlock.id != 1)
{
param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
}
else
{
param.matColor = 104025f;
}
}
for (int j = 0; (float)j < num3 / heightBlockSize; j++)
{
param.y += ugFix.y;
param.z += ugFix.z + slopeFixZ * (float)j;
defBlock.renderData.Draw(param);
if (this.cell.pcSync && EMono.player.lightPower > 0f)
{
float num4 = param.tile;
param.tile = 0f;
rendererFov.Draw(param);
param.tile = num4;
}
}
param.y = orgY;
param.z = orgZ;
}
goto IL_6fea;
IL_7b1b:
if (detail.things.Count == 0 && detail.charas.Count == 0)
param.color = floorLight;
if (!isWater && (this.cell.Front.sourceFloor.tileType.IsWater || this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
{
return;
orgY = param.y;
orgZ = param.z;
int num5 = 0;
if (sourceBlock.tileType.IsFullBlock)
{
SourceBlock.Row row3 = sourceBlock;
num5 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
}
else
{
SourceBlock.Row row3 = sourceFloor._defBlock;
num5 = 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 = num5 + ((!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 = num5 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
rendererWaterBlock.Draw(param);
}
param.y = orgY;
param.z = orgZ;
}
int num4 = 0;
thingPos.x = 0f;
thingPos.y = 0f;
thingPos.z = 0f;
freePos.x = (freePos.y = (freePos.z = 0f));
if (this.cell.HasRamp)
if (showBorder && !this.cell.outOfBounds)
{
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.matColor = 104025f;
if (cx == EMono._map.bounds.x)
{
renderBorder.Draw(param, 12 + (EMono.world.date.IsNight ? 4 : 0));
}
else if (cx == EMono._map.bounds.maxX)
{
renderBorder.Draw(param, 13 + (EMono.world.date.IsNight ? 4 : 0));
}
if (cz == EMono._map.bounds.z)
{
renderBorder.Draw(param, 14 + (EMono.world.date.IsNight ? 4 : 0));
}
else if (cz == EMono._map.bounds.maxZ)
{
renderBorder.Draw(param, 15 + (EMono.world.date.IsNight ? 4 : 0));
}
}
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 (this.cell.isSkyFloor || (detail != null && detail.anime != null && detail.anime.drawBlock))
{
if (liquidLv > 10)
orgY = param.y;
orgZ = param.z;
SourceBlock.Row defBlock2 = sourceFloor._defBlock;
param.mat = matFloor;
param.tile = defBlock2._tiles[this.cell.blockDir % defBlock2._tiles.Length];
if (defBlock2.id != 1)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
param.y -= TileType.FloorWaterShallow.FloorHeight;
else
{
param.matColor = 104025f;
}
for (int k = 0; k < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); k++)
{
param.y += ugFix.y;
param.z += ugFix.z + slopeFixZ * (float)k;
defBlock2.renderData.Draw(param);
}
param.y = orgY;
param.z = orgZ;
}
Thing thing = null;
bool shadow = liquidLv == 0;
float num5 = 0f;
float num6 = 0f;
float num7 = 0f;
float num8 = 0f;
bool flag6 = false;
float num9 = 0f;
bool flag7 = false;
float num10 = 0f;
if (detail.things.Count > 0 && isSeen)
if (!sourceFloor.tileType.IsSkipFloor)
{
_ = zSetting.max1;
float num11 = 0f;
for (int j = 0; j < detail.things.Count; j++)
if ((hasBridge && sourceBridge.tileType.CastShadowSelf) || this.cell.castFloorShadow)
{
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 && !buildMode) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem))
floorLight2 = _lightMod * light * 0.2f + _baseBrightness + _shadowStrength * floorShadowStrength * (isWater ? 0.7f : (hasBridge ? 1f : (0.6f * (1f - nightRatio))));
if (snowed)
{
continue;
floorLight2 = (int)((double)floorLight2 * 0.85 * 50.0) * 262144 + snowColorToken;
}
TileType tileType = t.trait.tileType;
bool isInstalled = t.IsInstalled;
SourcePref pref = t.Pref;
if (!isInstalled && t.category.tileDummy != 0)
else
{
pref = rendererObjDummy.shadowPref;
floorLight2 = (int)(floorLight2 * 50f) * 262144 + ((this.cell.lightR >= 64) ? 63 : this.cell.lightR) * 4096 + ((this.cell.lightG >= 64) ? 63 : this.cell.lightG) * 64 + ((this.cell.lightB >= 64) ? 63 : this.cell.lightB);
}
float num12 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
if (t.ignoreStackHeight)
param.color = floorLight2;
if (this.cell.lotShade)
{
thingPos.y -= num5;
thingPos -= altitudeFix * num6;
floorLight = floorLight2;
}
shadow = thingPos.y < 0.16f && num10 < 0.16f;
_ = pref.bypassShadow;
param.shadowFix = 0f - thingPos.y;
param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);
if (t.isRoofItem)
}
floorMatColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
if (isWater && flag)
{
param.y -= 0.01f * floatY;
}
if (!sourceBlock.tileType.IsSkipFloor || sourceBlock.transparent || hasBridge || this.cell.hasDoor || this.cell.skipRender)
{
param.mat = matFloor;
param.tile = sourceFloor._tiles[floorDir % sourceFloor._tiles.Length];
param.matColor = floorMatColor;
param.snow = snowed;
if (sourceFloor.anime.Length != 0)
{
param.snow = isSnowCovered && !this.cell.isClearSnow;
SetRoofHeight(param, this.cell, cx, cz);
_actorPos.x = param.x;
_actorPos.y = param.y;
_actorPos.z = param.z + num11;
if (this.room != null)
int num6 = (int)(Time.realtimeSinceStartup * 1000f / (float)sourceFloor.anime[1] % (float)sourceFloor.anime[0]);
param.tile += num6;
}
if (this.cell.isDeck)
{
param.z += 1f;
if ((bool)sourceFloor.renderData.subData)
{
param.color = GetRoofLight(this.room.lot);
sourceFloor.renderData.subData.Draw(param);
}
shadow = false;
param.liquidLv = 0;
sourceFloor.renderData.Draw(param);
param.z -= 1f;
}
else
{
param.snow = snowed;
_actorPos.x = orgX + num8;
_actorPos.y = orgY;
_actorPos.z = orgZ + num11 + thingPos.z;
if (tileType.CanStack || !isInstalled)
if ((bool)sourceFloor.renderData.subData)
{
if (thing?.id != t.id)
sourceFloor.renderData.subData.Draw(param);
}
sourceFloor.renderData.Draw(param);
}
int num7 = 0;
if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
{
if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
{
num7++;
}
if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
{
num7 += 2;
}
if (num7 != 0)
{
param.tile = 448 + num7 + 12;
param.z -= 0.1f;
sourceFloor.renderData.Draw(param);
param.z += 0.1f;
}
}
if (this.cell.shadow != 0 && !hasBridge && !this.cell.skipRender)
{
if (snowed)
{
if (sourceFloor == FLOOR.sourceSnow)
{
_actorPos.x += thingPos.x;
param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
param.z -= 0.01f;
sourceFloor.renderData.Draw(param);
}
_actorPos.y += thingPos.y;
if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
}
else
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
batch.tiles[pass.idx] = 448 + this.cell.shadow;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = 104025f;
pass.idx++;
if (pass.idx == pass.batchSize)
{
thingPos.y -= num5;
if (thing != null)
{
_actorPos.z -= 0.2f;
thingPos.z -= 0.2f;
}
_actorPos.y -= num5;
pass.NextBatch();
}
_actorPos.z += renderSetting.thingZ + (float)j * -0.01f + zSetting.mod1 * thingPos.y;
}
if (isInstalled)
if (!sourceFloor.ignoreTransition && !snowed)
{
if (t.TileType.IsRamp)
Cell back = this.cell.Back;
if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
{
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)
{
num10 += rampFix2.y;
}
liquidLv -= (int)(rampFix2.y * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
else if (!flag7 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
{
orgY += num12 + (float)t.altitude * altitudeFix.y;
orgZ += (float)t.altitude * altitudeFix.z;
freePos.y += num12 + (float)t.altitude * altitudeFix.y;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num10 += num12 + (float)t.altitude * altitudeFix.y;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
liquidLv -= (int)(num12 * 150f);
if (liquidLv < 0)
pass = passFloor;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + transitionFix[0].x;
batch.matrices[pass.idx].m13 = param.y + transitionFix[0].y;
batch.matrices[pass.idx].m23 = param.z + transitionFix[0].z;
batch.tiles[pass.idx] = 480 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
pass.idx++;
if (pass.idx == pass.batchSize)
{
liquidLv = 0;
pass.NextBatch();
}
}
else
back = this.cell.Left;
if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
{
thingPos.y += num12;
if (tileType.UseMountHeight)
{
if ((tileType != TileType.Illumination || !this.cell.HasObj) && !tileType.AlwaysShow)
{
if (noRoofMode && currentRoom == null && t.altitude >= lowWallObjAltitude && tileType != TileType.ObjFloat)
{
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
{
thingPos.y += (float)t.altitude * altitudeFix.y;
thingPos.z += (float)t.altitude * altitudeFix.z;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
if (pref.height >= 0f)
pass = passFloor;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + transitionFix[1].x;
batch.matrices[pass.idx].m13 = param.y + transitionFix[1].y;
batch.matrices[pass.idx].m23 = param.z + transitionFix[1].z;
batch.tiles[pass.idx] = 512 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
pass.idx++;
if (pass.idx == pass.batchSize)
{
thingPos.z += pref.z;
pass.NextBatch();
}
}
if (!tileType.UseMountHeight && j > 10)
{
flag7 = true;
}
}
else
}
if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num7 == 0)
{
pass = (isWater ? passAutoTileWater : passAutoTile);
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + ((hasBridge || this.cell._block != 0) ? 0.8f : 0f);
batch.tiles[pass.idx] = (26 + sourceFloor.autotile / 2) * 32 + sourceFloor.autotile % 2 * 16 + this.cell.autotile;
batch.colors[pass.idx] = param.color + (float)((int)(sourceFloor.autotileBrightness * 100f) * 262144);
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
if (pass.idx == pass.batchSize)
{
thingPos.y += num12;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
pass.NextBatch();
}
if (t.isFloating && isWater && !hasBridge && !flag)
}
}
if (isWater)
{
int num8 = 12;
int num9 = this.cell.shore / num8;
int num10 = this.cell.shore % num8;
bool isShoreSand = this.cell.isShoreSand;
if (this.cell.shore != 0)
{
Cell cell = ((((uint)num9 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num9 & 2u) != 0) ? this.cell.Right : ((((uint)num9 & 4u) != 0) ? this.cell.Front : this.cell.Left)));
if (isShoreSand && !cell.sourceFloor.isBeach)
{
flag = true;
float num13 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num13;
if (!t.trait.IsChangeFloorHeight)
{
num9 = num12;
}
_actorPos.y += 0.01f * floatY - num13;
if (liquidLv > 10)
cell = ((((uint)num9 & 8u) != 0) ? this.cell.Left : ((((uint)num9 & 4u) != 0) ? this.cell.Front : ((((uint)num9 & 2u) != 0) ? this.cell.Right : this.cell.Back)));
}
if (!cell.IsSnowTile)
{
param.matColor = GetColorInt(ref cell.matFloor.matColor, cell.sourceFloor.colorMod);
if (isShoreSand)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
pass = passShore;
batch = pass.batches[pass.batchIdx];
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 / num8;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
num10 = 2;
}
liquidLv -= (int)(floatY * 0.5f);
if (liquidLv < 0)
else
{
liquidLv = 0;
num10 = cell.sourceFloor.edge;
}
param.liquidLv = liquidLv;
param.tile = (24 + num10 / 2) * 32 + num10 % 2 * 16 + num9;
rendererShore.Draw(param);
}
num5 = num12;
if (t.sourceCard.multisize && !t.trait.IsGround)
}
if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num8) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num8) & (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 / num8) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num8) & (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 / num8) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num8) & 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 / num8) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num8) & 4u) != 0)
{
param.tile = 788f;
param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);
passShore.Add(param);
Draw(52);
}
if (this.cell._bridge != 0 && this.cell.isBridgeEdge && this.cell.bridgePillar != byte.MaxValue)
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + waterEdgeBridgeFix.x;
batch.matrices[pass.idx].m13 = param.y + waterEdgeBridgeFix.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeBridgeFix.z;
batch.tiles[pass.idx] = 616 + waterAnimeIndex % 4;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = 104025f;
pass.idx++;
if (pass.idx == pass.batchSize)
{
num11 += zSetting.multiZ;
pass.NextBatch();
}
orgZ += t.renderer.data.stackZ;
if (param.liquidLv > 0)
}
bool flag6 = false;
if (isShoreSand)
{
if (((uint)num9 & (true ? 1u : 0u)) != 0)
{
param.liquidLv += pref.liquidMod;
if (param.liquidLv < 1)
if (((uint)num9 & 8u) != 0)
{
param.liquidLv = 1;
if ((num9 & 2) == 0 && (num9 & 4) == 0)
{
Draw(16);
}
flag6 = true;
}
else if (param.liquidLv > 99 + pref.liquidModMax)
if (((uint)num9 & 2u) != 0)
{
param.liquidLv = 99 + pref.liquidModMax;
if ((num9 & 8) == 0 && (num9 & 4) == 0)
{
Draw(20);
}
flag6 = true;
}
}
}
if (!isInstalled || !tileType.UseMountHeight)
{
if (t.altitude != 0)
if (((uint)num9 & 4u) != 0)
{
_actorPos += altitudeFix * t.altitude;
if (!t.isRoofItem)
if (((uint)num9 & 8u) != 0)
{
num7 += (float)t.altitude;
num6 = t.altitude;
if ((num9 & 2) == 0 && (num9 & 1) == 0)
{
Draw(24);
}
flag6 = true;
}
if (((uint)num9 & 2u) != 0)
{
if ((num9 & 8) == 0 && (num9 & 1) == 0)
{
Draw(28);
}
flag6 = true;
}
}
if (num7 >= 2f && ((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)
if (!flag6)
{
if (t.isRoofItem)
if (!this.cell.Front.sourceFloor.tileType.IsWater && !this.cell.Front.isDeck)
{
_actorPos.x += t.fx;
_actorPos.y += t.fy - (float)t.altitude * altitudeFix.y;
Draw(8);
}
else
if (!this.cell.Right.sourceFloor.tileType.IsWater && !this.cell.Right.isDeck)
{
_actorPos.x = orgX + t.fx - freePos.x;
_actorPos.y = orgY + t.fy - freePos.y;
Draw(12);
}
}
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 (!flag6)
{
if (iconMode != 0)
if (!this.cell.Back.sourceFloor.tileType.IsWater && !this.cell.Back.isDeck)
{
int num14 = 0;
switch (iconMode)
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
batch.matColors[pass.idx] = 104025f;
if (((uint)(this.cell.shore / num8) & (true ? 1u : 0u)) != 0)
{
case CardIconMode.Visibility:
if (t.isMasked)
{
num14 = 17;
}
break;
case CardIconMode.State:
if (t.placeState == PlaceState.installed)
if (isShoreSand)
{
num14 = 18;
param.matColor = GetColorInt(ref this.cell.Back.matFloor.matColor, this.cell.Back.sourceFloor.colorMod);
batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
batch.tiles[pass.idx] = 640 + seaAnimeIndexes[waterAnimeIndex % seaAnimeIndexes.Length];
batch.matColors[pass.idx] = param.matColor;
}
break;
case CardIconMode.Deconstruct:
if (t.isDeconstructing)
else
{
num14 = 14;
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
}
break;
}
if (t.isNPCProperty && !EMono.debug.godBuild)
else
{
num14 = 13;
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
batch.tiles[pass.idx] += 12f;
}
if (num14 != 0)
batch.colors[pass.idx] = param.color;
pass.idx++;
if (pass.idx == pass.batchSize)
{
passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num14);
pass.NextBatch();
}
}
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)
if (!this.cell.Left.sourceFloor.tileType.IsWater && !this.cell.Left.isDeck)
{
RenderParam _param = new RenderParam(param);
EMono.core.actionsLateUpdate.Add(delegate
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
batch.matColors[pass.idx] = 104025f;
if (((uint)(this.cell.shore / num8) & 8u) != 0)
{
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 (isShoreSand)
{
param.matColor = GetColorInt(ref this.cell.Left.matFloor.matColor, this.cell.Left.sourceFloor.colorMod);
batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
batch.tiles[pass.idx] = 644 + seaAnimeIndexes[waterAnimeIndex % seaAnimeIndexes.Length];
batch.matColors[pass.idx] = param.matColor;
}
else
{
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
}
}
else
{
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
batch.tiles[pass.idx] += 12f;
}
batch.colors[pass.idx] = param.color;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
}
}
if (isInstalled)
{
num8 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
}
param.x = orgX;
param.y = orgY;
param.z = orgZ;
param.color = floorLight;
thing = t;
if (pref.Float)
if (flag)
{
liquidLv = 0;
param.y += 0.01f * floatY;
}
}
if (flag)
{
param.z -= 1f;
}
}
orgY += num9;
if (detail.charas.Count <= 0)
if (this.cell.skipRender)
{
if (this.cell.pcSync)
{
param.tile = 0f;
rendererFov.Draw(param);
}
return;
}
param.shadowFix = 0f - num10;
param.color += 1310720f;
float max = zSetting.max2;
for (int k = 0; k < detail.charas.Count; k++)
if (hasBridge)
{
Chara chara = detail.charas[k];
if (chara.host != null)
param.y = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.bridgeHeight * _heightMod.y;
param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(int)this.cell.bridgeHeight * _heightMod.z;
if (flag)
{
continue;
param.y += 0.01f * floatY;
}
if (chara != EMono.pc && chara != LayerDrama.alwaysVisible)
param.color = floorLight;
param.mat = matBridge;
floorMatColor = ((sourceBridge.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, sourceBridge.colorMod));
param.dir = this.cell.floorDir;
param.tile = sourceBridge._tiles[this.cell.floorDir % sourceBridge._tiles.Length];
param.matColor = floorMatColor;
sourceBridge.renderData.Draw(param);
if (this.cell.autotileBridge != 0 && sourceBridge.autotile != 0)
{
if (chara.mimicry != null && chara.mimicry.IsThing)
{
if (flag3 || fogged || !this.cell.isSeen)
{
continue;
}
}
else if (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara)))
pass = passAutoTile;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + ((this.cell._block != 0) ? 0.8f : 0f);
batch.tiles[pass.idx] = (26 + sourceBridge.autotile / 2) * 32 + sourceBridge.autotile % 2 * 16 + this.cell.autotileBridge;
batch.colors[pass.idx] = param.color + (float)((int)(sourceBridge.autotileBrightness * 100f) * 262144);
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
if (pass.idx == pass.batchSize)
{
continue;
pass.NextBatch();
}
}
_actorPos.x = orgX;
_actorPos.y = orgY;
_actorPos.z = orgZ;
chara.SetRenderParam(param);
_ = chara.IsAliveInCurrentZone;
if (chara.isRestrained)
if (this.cell.shadow != 0)
{
TraitShackle restrainer = chara.GetRestrainer();
if (restrainer != null)
if (sourceBridge == FLOOR.sourceSnow)
{
Vector3 getRestrainPos = restrainer.GetRestrainPos;
if (getRestrainPos != default(Vector3))
param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
param.z -= 0.01f;
sourceBridge.renderData.Draw(param);
}
else
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
batch.tiles[pass.idx] = 448 + this.cell.shadow;
batch.colors[pass.idx] = blockLight;
batch.matColors[pass.idx] = 104025f;
pass.idx++;
if (pass.idx == pass.batchSize)
{
Vector3 position = restrainer.owner.renderer.position;
float defCharaHeight = EMono.setting.render.defCharaHeight;
float num15 = 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 + num15;
_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;
pass.NextBatch();
}
}
}
if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz))
if (this.cell.isBridgeEdge && this.cell.bridgeHeight - this.cell.height >= 3 && this.cell.bridgePillar != byte.MaxValue && !noSlopMode)
{
if (chara.IsDeadOrSleeping && chara.IsPCC)
orgY = param.y;
orgZ = param.z;
param.y += bridgeFix.y;
param.z += bridgeFix.z;
param.dir = 0;
SourceBlock.Row row4 = sourceBridge._bridgeBlock;
float num11 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y;
if (this.cell.sourceFloor.tileType == TileType.Sky)
{
float num16 = chara.renderer.data.size.y * 0.3f;
if (thingPos.y > max)
{
thingPos.y = max;
}
float num17 = thingPos.y + num16;
float num18 = (float)k * -0.01f;
if (num17 > zSetting.thresh1)
{
num18 = zSetting.mod1;
}
_actorPos.x += thingPos.x;
_actorPos.y += thingPos.y;
_actorPos.z += renderSetting.laydownZ + num18;
param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
thingPos.y += num16 * 0.8f;
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
num11 += (float)EMono._map.config.skyBlockHeight;
}
int num12 = (int)(num11 / heightBlockSize) + 2;
if (this.cell.bridgePillar != 0)
{
row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
param.tile = row4._tiles[0] + ((num12 == 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));
}
else
{
param.liquidLv = liquidLv;
if (isUnderwater)
{
if (chara.Pref.FloatUnderwater)
{
float num19 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
float num20 = floatYs[chara.uid % 10] + 10f + (float)(chara.uid % 30);
orgY += 0.01f * num20 - num19;
_actorPos.y += 0.01f * num20 - num19;
param.shadowFix -= 0.01f * num20 - num19;
}
}
else if (liquidLv > 0)
{
if (chara.Pref.Float && !flag && !hasBridge)
{
if (liquidLv > 20)
{
float num21 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num21;
_actorPos.y += 0.01f * floatY - num21;
int num22 = TileType.FloorWaterShallow.LiquidLV * 10;
num22 -= (int)(floatY * 0.5f);
param.liquidLv = num22;
}
else
{
param.liquidLv -= 20;
}
}
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))
param.mat = matBlock;
param.tile = row4._tiles[0] + 32;
param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, row4.colorMod));
}
param.y += ugFixBridgeTop.y;
param.z += ugFixBridgeTop.z;
for (int l = 0; l < num12; l++)
{
if (l == num12 - 1)
{
_actorPos += renderSetting.charaPos[1 + ((num4 < 4) ? num4 : 3)];
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;
}
_actorPos.z += 0.01f * (float)k + renderSetting.charaZ;
num4++;
if (flag6)
else
{
_actorPos.z += chara.renderer.data.hangedFixZ;
param.y += ugFixBridge.y;
param.z += ugFixBridge.z;
}
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
row4.renderData.Draw(param);
}
param.y = orgY;
param.z = orgZ;
}
param.x = orgX;
param.y = orgY;
param.z = orgZ;
}
return;
IL_6fea:
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;
}
if (this.cell.effect != null)
if (!buildMode && this.cell.highlight != 0)
{
if (this.cell.effect.IsLiquid)
if (this.cell._block != 0 && !this.cell.hasDoor)
{
SourceCellEffect.Row sourceEffect = this.cell.sourceEffect;
SourceMaterial.Row defaultMaterial = sourceEffect.DefaultMaterial;
tile = 4 + Rand.bytes[index % Rand.MaxBytes] % 4;
param.tile = tile + this.cell.sourceEffect._tiles[0];
param.mat = defaultMaterial;
param.matColor = ((this.cell.effect.color == 0) ? GetColorInt(ref defaultMaterial.matColor, sourceEffect.colorMod) : this.cell.effect.color);
sourceEffect.renderData.Draw(param);
screen.guide.DrawWall(this.cell.GetPoint(), EMono.Colors.blockColors.MapHighlight, useMarkerPass: true);
}
else
{
param.tile = this.cell.effect.source._tiles[0];
SourceCellEffect.Row sourceEffect2 = this.cell.sourceEffect;
if (sourceEffect2.anime.Length != 0)
passGuideFloor.Add(this.cell.GetPoint(), (int)this.cell.highlight);
}
}
param.color = blockLight;
if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && (snowed || this.cell.isClearSnow) && (this.cell.Front.HasRoof || this.cell.Right.HasRoof))
{
snowed = false;
}
int num13 = 0;
if (sourceBlock.id != 0)
{
this.tileType = sourceBlock.tileType;
roomHeight = 0f;
int blockDir = this.cell.blockDir;
bool flag7 = false;
switch (wallClipMode)
{
case WallClipMode.ByRoom:
if (!this.tileType.RepeatBlock)
{
if (sourceEffect2.anime.Length > 2)
break;
}
if (currentRoom == null || showFullWall)
{
this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
_lowblock = lowBlock;
}
else if (this.room != this.cell.Front.room && (this.cell.Front.room == currentRoom || (this.room?.lot != currentLot && this.cell.Front.room?.lot == currentLot)))
{
this.room = this.cell.Front.room;
_lowblock = !this.cell.Front.lotWall && !this.cell.Front.fullWall;
}
else if (this.room != this.cell.Right.room && (this.cell.Right.room == currentRoom || (this.room?.lot != currentLot && this.cell.Right.room?.lot == currentLot)))
{
this.room = this.cell.Right.room;
_lowblock = !this.cell.Right.lotWall && !this.cell.Right.fullWall;
}
else if (this.tileType.IsFullBlock && this.room != this.cell.FrontRight.room && (this.cell.FrontRight.room == currentRoom || (this.room?.lot != currentLot && this.cell.FrontRight.room?.lot == currentLot)))
{
this.room = this.cell.FrontRight.room;
_lowblock = !this.cell.FrontRight.lotWall && !this.cell.FrontRight.fullWall;
}
else
{
this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
_lowblock = true;
if (!this.tileType.IsFullBlock)
{
float num23 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
if (!(num23 >= (float)sourceEffect2.anime[0]))
if (this.cell.lotWall)
{
_lowblock = false;
}
else if (this.room == currentRoom)
{
param.tile += num23;
_lowblock = !this.cell.fullWall;
}
}
else
}
flag7 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium);
if (flag7)
{
_lowblock = false;
}
if (this.room == null && alwaysLowblock)
{
_lowblock = true;
roomHeight = 0f;
}
if (this.room != null)
{
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
if (showRoof)
{
roomHeight = this.room.lot.realHeight;
break;
}
if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
{
float num24 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
param.tile += num24;
roomHeight = 0f;
break;
}
int num14 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num14) ? this.room.lot.height : num14) + 0.01f * (float)this.room.lot.heightFix;
}
if (this.cell.effect.IsFire)
break;
case WallClipMode.ByLot:
if (defaultBlockHeight > 0f || isIndoor)
{
rendererEffect.Draw(param);
_lowblock = cx != 0 && cz != Size - 1 && ((!this.cell.Back.HasBlock && !this.cell.Back.isWallEdge) || (!this.cell.Left.HasBlock && !this.cell.Left.isWallEdge) || !this.cell.Back.Left.HasBlock);
if (!_lowblock)
{
roomHeight = defaultBlockHeight * EMono.setting.render.roomHeightMod;
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.TopHeight * _heightMod.y;
}
break;
}
if (showFullWall)
{
_lowblock = this.room != null;
if (_lowblock)
{
if (this.cell.Back.IsRoomEdge && this.cell.Right.IsRoomEdge && this.cell.Back.room == null && this.cell.Right.room == null && this.cell.Right.Front.room?.lot == this.room?.lot)
{
_lowblock = false;
}
}
else if (this.cell.Back.room != null && this.cell.Back.room.lot == (this.cell.Front.room ?? this.cell.Right.room)?.lot)
{
_lowblock = true;
}
}
else
{
this.cell.effect.source.renderData.Draw(param);
_lowblock = lowBlock;
}
if (this.tileType.RepeatBlock)
{
this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
if (this.room != null && (!noRoofMode || currentRoom != null) && (!showFullWall || currentRoom == null || this.room.lot == currentRoom.lot))
{
roomHeight = ((_lowblock && !this.tileType.ForceRpeatBlock) ? 0f : this.room.lot.realHeight);
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
}
}
break;
}
}
param.color = floorLight;
if (this.cell.critter != null)
{
Critter critter = this.cell.critter;
int snowTile = critter.tile;
if (snowed && critter.SnowTile != 0)
{
critter.x = 0.06f;
critter.y = -0.06f;
snowTile = critter.SnowTile;
}
else
if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
{
critter.Update();
num13 = 1;
}
pass = passObjSS;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + (float)(int)(critter.x * 100f) * 0.01f;
batch.matrices[pass.idx].m13 = param.y + (float)(int)(critter.y * 100f) * 0.01f;
batch.matrices[pass.idx].m23 = param.z;
batch.tiles[pass.idx] = snowTile * ((!critter.reverse) ? 1 : (-1));
batch.colors[pass.idx] = floorLight;
pass.idx++;
if (pass.idx == pass.batchSize)
else if (lowBlock)
{
pass.NextBatch();
num13 = 2;
}
}
if (detail != null)
{
TransAnime anime3 = detail.anime;
if (anime3 != null && !anime3.animeBlock)
param.mat = matBlock;
param.dir = this.cell.blockDir;
param.snow = snowed;
switch (this.tileType.blockRenderMode)
{
TransAnime anime4 = detail.anime;
param.x += anime4.v.x;
param.y += anime4.v.y;
param.z += anime4.v.z;
}
}
if (this.cell.obj != 0 && !this.cell.sourceObj.renderData.SkipOnMap)
{
SourceObj.Row sourceObj = this.cell.sourceObj;
if (!snowed || sourceObj.snowTile <= 0)
case BlockRenderMode.FullBlock:
{
param.snow = snowed;
param.mat = this.cell.matObj;
orgY = param.y;
if (param.liquidLv > 0)
bool invisible = sourceBlock.tileType.Invisible;
if (invisible && (!buildMode || ActionMode.Cinema.IsActive))
{
if (sourceObj.pref.Float)
break;
}
if (this.cell.isSurrounded)
{
switch (innerMode)
{
param.y += 0.01f * floatY;
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
case InnerMode.InnerBlock:
case InnerMode.BuildMode:
blockLight = _baseBrightness + fogBrightness;
param.color = (int)(50f * blockLight) * 262144;
param.matColor = 104025f;
param.tile = (buildMode ? 1 : 2) + ((_lowblock || defaultBlockHeight > 0f) ? 3000000 : 0);
rendererInnerBlock.Draw(param);
return;
case InnerMode.None:
case InnerMode.Height:
param.color = blockLight;
break;
}
if (sourceObj.tileType.IsWaterTop)
}
if (snowed)
{
param.color = floorLight;
}
param.color -= (int)(_shadowStrength * 0.8f * 50f) * 262144;
if (currentRoom != null && !showFullWall)
{
_lowblock = true;
roomHeight = 0f;
if (this.cell.room != currentRoom && (this.cell.Front.room == currentRoom || this.cell.Right.room == currentRoom || this.cell.FrontRight.room == currentRoom) && (this.cell.Back.room != currentRoom || this.cell.Right.room != currentRoom) && (this.cell.Front.room != currentRoom || this.cell.Left.room != currentRoom))
{
param.liquidLv = 0;
_lowblock = false;
}
else
if (!_lowblock)
{
param.liquidLv += sourceObj.pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquid = 1f;
}
else if (param.liquidLv > 99 + sourceObj.pref.liquidModMax)
{
param.liquidLv = 99 + sourceObj.pref.liquidModMax;
}
int num15 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num15) ? currentRoom.lot.height : num15) + 0.01f * (float)currentRoom.lot.heightFix;
}
}
if (sourceObj.useAltColor)
if (flag7)
{
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
_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)
{
roomHeight = 0f;
}
}
else
if (invisible)
{
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
roomHeight = 0f;
_lowblock = false;
}
if (sourceObj.HasGrowth)
if (this.cell.Things.Count > 0)
{
this.cell.growth.OnRenderTileMap(param);
_lowblock = false;
}
else
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + (_lowblock ? 3000000 : 0);
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
if (roomHeight == 0f)
{
if (this.cell.autotileObj != 0)
if (!this.cell.hasDoor)
{
param.tile = sourceObj._tiles[0] + this.cell.autotileObj;
sourceBlock.renderData.Draw(param);
}
else if (sourceObj.tileType.IsUseBlockDir)
}
else
{
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0, isBlock: true);
}
Room room = this.cell.Front.room ?? this.cell.room;
if (room == null && this.cell.Right.room != null)
{
room = this.cell.Right.room;
}
if (!invisible && room != null)
{
if (room.lot.idDeco != 0 && !this.cell.hasDoor)
{
param.tile = sourceObj._tiles[this.cell.blockDir % sourceObj._tiles.Length];
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco);
param.matColor = room.lot.colDeco;
float y = param.y;
param.y += (float)room.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = y;
}
else
if (room.lot.idDeco2 != 0 && roomHeight != 0f && (float)room.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
param.tile = sourceObj._tiles[this.cell.objDir % sourceObj._tiles.Length];
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2);
param.matColor = room.lot.colDeco2;
float y2 = param.y;
float num16 = 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 = num16;
}
if (_lowblock && sourceObj.tileType.IsSkipLowBlock)
{
param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
}
orgY = param.y;
orgZ = param.z;
param.y += sourceObj.pref.y;
param.z += sourceObj.pref.z;
sourceObj.renderData.Draw(param);
param.y = orgY;
param.z = orgZ;
int shadow3 = sourceObj.pref.shadow;
if (shadow3 > 1 && !this.cell.ignoreObjShadow)
{
passShadow.AddShadow(param.x + sourceObj.renderData.offsetShadow.x, param.y + sourceObj.renderData.offsetShadow.y, param.z + sourceObj.renderData.offsetShadow.z, ShadowData.Instance.items[shadow3], sourceObj.pref, 0, param.snow);
}
param.y = orgY;
}
}
}
if (this.cell.decal != 0 && sourceFloor.tileType.AllowBlood)
{
passDecal.Add(param, (int)this.cell.decal, floorLight);
}
if (highlightCells)
{
switch (ActionMode.FlagCell.mode)
{
case AM_FlagCell.Mode.flagWallPillar:
if (this.cell.isToggleWallPillar)
{
passArea.Add(param, 34f, 0f);
}
break;
case AM_FlagCell.Mode.flagSnow:
if (this.cell.isClearSnow)
{
passArea.Add(param, 34f, 0f);
}
break;
case AM_FlagCell.Mode.flagFloat:
if (this.cell.isForceFloat)
{
passArea.Add(param, 34f, 0f);
}
break;
case AM_FlagCell.Mode.flagClear:
if (this.cell.isClearArea)
{
passArea.Add(param, 34f, 0f);
}
break;
}
}
if (detail == null)
{
return;
}
if (highlightArea && detail.area != null)
{
passArea.Add(param, (int)detail.area.GetTile(index) - ((!subtleHighlightArea) ? 1 : 0), 0f);
}
if (detail.footmark != null && sourceFloor.id != 0)
{
param.tile = detail.footmark.tile;
param.mat = matFloor;
param.matColor = 104025f;
renderFootmark.Draw(param);
}
goto IL_7b1b;
IL_169b:
if (this.cell.isSlopeEdge)
{
float num25 = (float)height * _heightMod.y;
orgY = param.y;
orgZ = param.z;
param.dir = this.cell.blockDir;
if (snowed)
{
param.color = floorLight;
}
SourceBlock.Row defBlock;
if (sourceBlock.tileType.IsFullBlock)
{
defBlock = sourceBlock;
param.mat = matBlock;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
}
else
{
defBlock = sourceFloor._defBlock;
param.mat = matFloor;
param.tile = defBlock._tiles[this.cell.blockDir % defBlock._tiles.Length];
if (defBlock.id != 1)
{
param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
}
else
{
param.matColor = 104025f;
}
}
for (int l = 0; (float)l < num25 / heightBlockSize; l++)
{
param.y += ugFix.y;
param.z += ugFix.z + slopeFixZ * (float)l;
defBlock.renderData.Draw(param);
if (this.cell.pcSync && EMono.player.lightPower > 0f)
{
float num26 = param.tile;
param.tile = 0f;
rendererFov.Draw(param);
param.tile = num26;
}
}
param.y = orgY;
param.z = orgZ;
}
param.color = floorLight;
if (!isWater && (this.cell.Front.sourceFloor.tileType.IsWater || this.cell.Right.sourceFloor.tileType.IsWater) && this.cell.sourceBlock.tileType.RenderWaterBlock && !flag)
{
orgY = param.y;
orgZ = param.z;
int num27 = 0;
if (sourceBlock.tileType.IsFullBlock)
{
SourceBlock.Row row3 = sourceBlock;
num27 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length];
}
else
{
SourceBlock.Row row3 = sourceFloor._defBlock;
num27 = 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 = num27 + ((!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 = num27 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0);
rendererWaterBlock.Draw(param);
}
param.y = orgY;
param.z = orgZ;
}
if (showBorder && !this.cell.outOfBounds)
{
param.matColor = 104025f;
if (cx == EMono._map.bounds.x)
{
renderBorder.Draw(param, 12 + (EMono.world.date.IsNight ? 4 : 0));
}
else if (cx == EMono._map.bounds.maxX)
{
renderBorder.Draw(param, 13 + (EMono.world.date.IsNight ? 4 : 0));
}
if (cz == EMono._map.bounds.z)
{
renderBorder.Draw(param, 14 + (EMono.world.date.IsNight ? 4 : 0));
}
else if (cz == EMono._map.bounds.maxZ)
{
renderBorder.Draw(param, 15 + (EMono.world.date.IsNight ? 4 : 0));
}
}
if (this.cell.isSkyFloor || (detail != null && detail.anime != null && detail.anime.drawBlock))
{
orgY = param.y;
orgZ = param.z;
SourceBlock.Row defBlock2 = sourceFloor._defBlock;
param.mat = matFloor;
param.tile = defBlock2._tiles[this.cell.blockDir % defBlock2._tiles.Length];
if (defBlock2.id != 1)
{
param.matColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
}
else
{
param.matColor = 104025f;
}
for (int m = 0; m < ((!this.cell.isSkyFloor) ? 1 : EMono._map.config.skyBlockHeight); m++)
{
param.y += ugFix.y;
param.z += ugFix.z + slopeFixZ * (float)m;
defBlock2.renderData.Draw(param);
}
param.y = orgY;
param.z = orgZ;
}
if (!sourceFloor.tileType.IsSkipFloor)
{
if ((hasBridge && sourceBridge.tileType.CastShadowSelf) || this.cell.castFloorShadow)
{
floorLight2 = _lightMod * light * 0.2f + _baseBrightness + _shadowStrength * floorShadowStrength * (isWater ? 0.7f : (hasBridge ? 1f : (0.6f * (1f - nightRatio))));
if (snowed)
{
floorLight2 = (int)((double)floorLight2 * 0.85 * 50.0) * 262144 + snowColorToken;
}
else
{
floorLight2 = (int)(floorLight2 * 50f) * 262144 + ((this.cell.lightR >= 64) ? 63 : this.cell.lightR) * 4096 + ((this.cell.lightG >= 64) ? 63 : this.cell.lightG) * 64 + ((this.cell.lightB >= 64) ? 63 : this.cell.lightB);
}
param.color = floorLight2;
if (this.cell.lotShade)
{
floorLight = floorLight2;
}
}
floorMatColor = ((sourceFloor.colorMod == 0) ? 104025 : GetColorInt(ref matFloor.matColor, sourceFloor.colorMod));
if (isWater && flag)
{
param.y -= 0.01f * floatY;
}
if (!sourceBlock.tileType.IsSkipFloor || sourceBlock.transparent || hasBridge || this.cell.hasDoor || this.cell.skipRender)
{
param.mat = matFloor;
param.tile = sourceFloor._tiles[floorDir % sourceFloor._tiles.Length];
param.matColor = floorMatColor;
param.snow = snowed;
if (this.cell.isDeck)
{
param.z += 1f;
if ((bool)sourceFloor.renderData.subData)
{
sourceFloor.renderData.subData.Draw(param);
}
sourceFloor.renderData.Draw(param);
param.z -= 1f;
}
else
{
if ((bool)sourceFloor.renderData.subData)
{
sourceFloor.renderData.subData.Draw(param);
}
sourceFloor.renderData.Draw(param);
}
int num28 = 0;
if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
{
if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
{
num28++;
}
if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
{
num28 += 2;
}
if (num28 != 0)
{
param.tile = 448 + num28 + 12;
param.z -= 0.1f;
sourceFloor.renderData.Draw(param);
param.z += 0.1f;
}
}
if (this.cell.shadow != 0 && !hasBridge && !this.cell.skipRender)
{
if (snowed)
{
if (sourceFloor == FLOOR.sourceSnow)
{
param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
param.z -= 0.01f;
sourceFloor.renderData.Draw(param);
}
}
else
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
batch.tiles[pass.idx] = 448 + this.cell.shadow;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = 104025f;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
}
if (!sourceFloor.ignoreTransition && !snowed)
{
Cell back = this.cell.Back;
if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
{
pass = passFloor;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + transitionFix[0].x;
batch.matrices[pass.idx].m13 = param.y + transitionFix[0].y;
batch.matrices[pass.idx].m23 = param.z + transitionFix[0].z;
batch.tiles[pass.idx] = 480 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
}
back = this.cell.Left;
if (back.sourceBlock.transition[0] != -1 && back.isSeen && !back.hasDoor)
{
pass = passFloor;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + transitionFix[1].x;
batch.matrices[pass.idx].m13 = param.y + transitionFix[1].y;
batch.matrices[pass.idx].m23 = param.z + transitionFix[1].z;
batch.tiles[pass.idx] = 512 + back.sourceBlock.transition[0] + Rand.bytes[index % Rand.MaxBytes] % back.sourceBlock.transition[1];
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = GetColorInt(ref back.matBlock.matColor, back.sourceBlock.colorMod);
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
}
}
}
if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num28 == 0)
{
pass = (isWater ? passAutoTileWater : passAutoTile);
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + ((hasBridge || this.cell._block != 0) ? 0.8f : 0f);
batch.tiles[pass.idx] = (26 + sourceFloor.autotile / 2) * 32 + sourceFloor.autotile % 2 * 16 + this.cell.autotile;
batch.colors[pass.idx] = param.color + (float)((int)(sourceFloor.autotileBrightness * 100f) * 262144);
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
}
}
if (isWater)
{
int num29 = 12;
int num30 = this.cell.shore / num29;
int num31 = this.cell.shore % num29;
bool isShoreSand = this.cell.isShoreSand;
if (this.cell.shore != 0)
{
Cell cell = ((((uint)num30 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num30 & 2u) != 0) ? this.cell.Right : ((((uint)num30 & 4u) != 0) ? this.cell.Front : this.cell.Left)));
if (isShoreSand && !cell.sourceFloor.isBeach)
{
cell = ((((uint)num30 & 8u) != 0) ? this.cell.Left : ((((uint)num30 & 4u) != 0) ? this.cell.Front : ((((uint)num30 & 2u) != 0) ? this.cell.Right : this.cell.Back)));
}
if (!cell.IsSnowTile)
{
param.matColor = GetColorInt(ref cell.matFloor.matColor, cell.sourceFloor.colorMod);
if (isShoreSand)
{
pass = passShore;
batch = pass.batches[pass.batchIdx];
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 / num29;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
num31 = 2;
}
else
{
num31 = cell.sourceFloor.edge;
}
param.tile = (24 + num31 / 2) * 32 + num31 % 2 * 16 + num30;
rendererShore.Draw(param);
}
}
if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num29) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num29) & (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 / num29) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num29) & (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 / num29) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num29) & 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 / num29) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num29) & 4u) != 0)
room = this.cell.Right.room ?? this.cell.room;
if (room == null && this.cell.Front.room != null)
{
param.tile = 788f;
param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);
passShore.Add(param);
Draw(52);
room = this.cell.Front.room;
}
if (this.cell._bridge != 0 && this.cell.isBridgeEdge && this.cell.bridgePillar != byte.MaxValue)
if (!invisible && room != null)
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + waterEdgeBridgeFix.x;
batch.matrices[pass.idx].m13 = param.y + waterEdgeBridgeFix.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeBridgeFix.z;
batch.tiles[pass.idx] = 616 + waterAnimeIndex % 4;
batch.colors[pass.idx] = param.color;
batch.matColors[pass.idx] = 104025f;
pass.idx++;
if (pass.idx == pass.batchSize)
if (room.lot.idDeco != 0 && !this.cell.hasDoor)
{
pass.NextBatch();
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)room.lot.decoFix * 0.01f;
rendererWallDeco.Draw(param);
param.y = y3;
}
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 + room.lot.idDeco2) * -1;
param.matColor = room.lot.colDeco2;
float y4 = param.y;
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 = y4;
param.z = num17;
}
}
bool flag8 = false;
if (isShoreSand)
break;
}
case BlockRenderMode.WallOrFence:
{
if (map.config.fullWallHeight)
{
showFullWall = true;
_lowblock = false;
}
orgY = param.y;
orgZ = param.z;
param.color = (this.tileType.IsFence ? (floorLight - (float)((int)(_shadowStrength * 0.8f * 50f) * 262144)) : blockLight);
bool flag8 = blockDir == 1 || _lowblock || flag7;
bool flag9 = blockDir == 0 || _lowblock || flag7;
if (!showFullWall && currentRoom != null)
{
if (((uint)num30 & (true ? 1u : 0u)) != 0)
if (!flag8)
{
if (((uint)num30 & 8u) != 0)
if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Front.room != currentRoom))
{
if ((num30 & 2) == 0 && (num30 & 4) == 0)
if (!this.cell.IsRoomEdge || (this.cell.Front.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
{
Draw(16);
flag8 = true;
}
flag8 = true;
}
if (((uint)num30 & 2u) != 0)
else if ((!this.cell.Front.lotWall || this.cell.Front.room?.lot != currentLot) && this.cell.Front.room != currentRoom)
{
if ((num30 & 8) == 0 && (num30 & 4) == 0)
{
Draw(20);
}
flag8 = true;
}
}
if (((uint)num30 & 4u) != 0)
if (!flag9)
{
if (((uint)num30 & 8u) != 0)
if (currentRoom == this.cell.room || (this.cell.lotWall && this.cell.room?.lot == currentLot && this.cell.Right.room != currentRoom))
{
if ((num30 & 2) == 0 && (num30 & 1) == 0)
if (!this.cell.IsRoomEdge || (this.cell.Right.room != this.cell.room && this.cell.FrontRight.room != this.cell.room))
{
Draw(24);
flag9 = true;
}
flag8 = true;
}
if (((uint)num30 & 2u) != 0)
else if ((!this.cell.Right.lotWall || this.cell.Right.room?.lot != currentLot) && this.cell.Right.room != currentRoom)
{
if ((num30 & 8) == 0 && (num30 & 1) == 0)
{
Draw(28);
}
flag8 = true;
flag9 = true;
}
}
if (!flag8)
}
if (blockDir == 0 || blockDir == 2)
{
param.dir = 0;
Room room2 = this.cell.Front.room ?? this.cell.room;
if (room2 != null && this.tileType.IsWall)
{
if (!this.cell.Front.sourceFloor.tileType.IsWater && !this.cell.Front.isDeck)
if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
{
Draw(8);
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 (!this.cell.Right.sourceFloor.tileType.IsWater && !this.cell.Right.isDeck)
if (room2.lot.idDeco2 != 0 && roomHeight != 0f && !flag8 && (float)room2.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
Draw(12);
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;
}
}
}
if (!flag8)
{
if (!this.cell.Back.sourceFloor.tileType.IsWater && !this.cell.Back.isDeck)
Cell left = this.cell.Left;
if (blockDir == 2 && left.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
batch.matColors[pass.idx] = 104025f;
if (((uint)(this.cell.shore / num29) & (true ? 1u : 0u)) != 0)
_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.UseLowBlock) ? 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)
{
if (isShoreSand)
{
param.matColor = GetColorInt(ref this.cell.Back.matFloor.matColor, this.cell.Back.sourceFloor.colorMod);
batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
batch.tiles[pass.idx] = 640 + seaAnimeIndexes[waterAnimeIndex % seaAnimeIndexes.Length];
batch.matColors[pass.idx] = param.matColor;
}
else
{
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
}
_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.UseLowBlock && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag8 && flag9 && !flag7))
{
_sourceBlock.renderData.Draw(param);
}
else
{
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
batch.tiles[pass.idx] += 12f;
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
}
batch.colors[pass.idx] = param.color;
pass.idx++;
if (pass.idx == pass.batchSize)
}
if (!flag8 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.Left.isToggleWallPillar)
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag8 && this.tileType.UseLowBlock && !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))
{
pass.NextBatch();
_sourceBlock.renderData.Draw(param);
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
}
param.x = orgX;
}
if (!this.cell.Left.sourceFloor.tileType.IsWater && !this.cell.Left.isDeck)
else if (this.cell.FrontLeft.HasWallOrFence && this.cell.FrontLeft.blockDir != 0 && (!flag8 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar)
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
batch.matColors[pass.idx] = 104025f;
if (((uint)(this.cell.shore / num29) & 8u) != 0)
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag8 && this.tileType.UseLowBlock && !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))
{
if (isShoreSand)
{
param.matColor = GetColorInt(ref this.cell.Left.matFloor.matColor, this.cell.Left.sourceFloor.colorMod);
batch.matrices[pass.idx].m03 = param.x + waterEdgeFixShoreSand.x;
batch.matrices[pass.idx].m13 = param.y + waterEdgeFixShoreSand.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShoreSand.z;
batch.tiles[pass.idx] = 644 + seaAnimeIndexes[waterAnimeIndex % seaAnimeIndexes.Length];
batch.matColors[pass.idx] = param.matColor;
}
else
{
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFixShore.z;
}
_sourceBlock.renderData.Draw(param);
}
else
{
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + waterEdgeFix.z;
batch.tiles[pass.idx] += 12f;
_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.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 && !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.matColor = room3.lot.colDeco2;
param.y += (float)room3.lot.decoFix2 * 0.01f;
param.z += (float)room3.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = orgY;
param.z = orgZ;
}
}
if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null)
{
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 num18 = ((room4.data.maxHeight == 0) ? 2 : room4.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.lot.height < num18) ? room4.lot.height : num18) + 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
{
_sourceBlock = sourceBlock;
param.mat = matBlock;
}
this.tileType = _sourceBlock.tileType;
param.tile = (tile = -_sourceBlock._tiles[0] + ((flag9 && this.tileType.UseLowBlock) ? (-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));
}
param.color += _rightWallShade;
if (roomHeight == 0f || flag9 || !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);
}
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)
{
param.snow = true;
}
batch.colors[pass.idx] = param.color;
pass.idx++;
if (pass.idx == pass.batchSize)
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag9 && this.tileType.UseLowBlock && !flag7) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (!flag7 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag9))
{
pass.NextBatch();
_sourceBlock.renderData.Draw(param);
}
else
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
}
param.x = orgX;
}
}
if (flag)
{
param.y += 0.01f * floatY;
}
}
if (flag)
{
param.z -= 1f;
}
}
if (this.cell.skipRender)
{
if (this.cell.pcSync)
{
param.tile = 0f;
rendererFov.Draw(param);
}
return;
}
if (hasBridge)
{
param.y = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.bridgeHeight * _heightMod.y;
param.z = 1000f + param.x * screen.tileWeight.x + param.y * screen.tileWeight.z + (float)(int)this.cell.bridgeHeight * _heightMod.z;
if (flag)
{
param.y += 0.01f * floatY;
}
param.color = floorLight;
param.mat = matBridge;
floorMatColor = ((sourceBridge.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, sourceBridge.colorMod));
param.dir = this.cell.floorDir;
param.tile = sourceBridge._tiles[this.cell.floorDir % sourceBridge._tiles.Length];
param.matColor = floorMatColor;
sourceBridge.renderData.Draw(param);
if (this.cell.autotileBridge != 0 && sourceBridge.autotile != 0)
{
pass = passAutoTile;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x;
batch.matrices[pass.idx].m13 = param.y;
batch.matrices[pass.idx].m23 = param.z + ((this.cell._block != 0) ? 0.8f : 0f);
batch.tiles[pass.idx] = (26 + sourceBridge.autotile / 2) * 32 + sourceBridge.autotile % 2 * 16 + this.cell.autotileBridge;
batch.colors[pass.idx] = param.color + (float)((int)(sourceBridge.autotileBrightness * 100f) * 262144);
batch.matColors[pass.idx] = param.matColor;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
param.y = orgY;
param.z = orgZ;
break;
}
if (this.cell.shadow != 0)
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:
{
if (sourceBridge == FLOOR.sourceSnow)
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 num19 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1;
if (num19 == 0)
{
param.tile = 448 + this.cell.shadow + 8 + (this.cell.HasFence ? 4 : 0);
param.z -= 0.01f;
sourceBridge.renderData.Draw(param);
renderData2.Draw(param);
}
else
{
pass = passEdge;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + ambientShadowFix[this.cell.shadow].x;
batch.matrices[pass.idx].m13 = param.y + ambientShadowFix[this.cell.shadow].y;
batch.matrices[pass.idx].m23 = param.z + ambientShadowFix[this.cell.shadow].z;
batch.tiles[pass.idx] = 448 + this.cell.shadow;
batch.colors[pass.idx] = blockLight;
batch.matColors[pass.idx] = 104025f;
pass.idx++;
if (pass.idx == pass.batchSize)
{
pass.NextBatch();
}
renderData2.DrawRepeat(param, num19, sourceBlock.tileType.RepeatSize);
}
param.tile = renderData2.idShadow;
SourcePref shadowPref2 = renderData2.shadowPref;
int shadow3 = shadowPref2.shadow;
passShadow.AddShadow(param.x + renderData2.offsetShadow.x, param.y + renderData2.offsetShadow.y, param.z + renderData2.offsetShadow.z, ShadowData.Instance.items[shadow3], shadowPref2, 0, param.snow);
break;
}
if (this.cell.isBridgeEdge && this.cell.bridgeHeight - this.cell.height >= 3 && this.cell.bridgePillar != byte.MaxValue && !noSlopMode)
{
orgY = param.y;
orgZ = param.z;
param.y += bridgeFix.y;
param.z += bridgeFix.z;
param.dir = 0;
SourceBlock.Row row4 = sourceBridge._bridgeBlock;
float num32 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y;
if (this.cell.sourceFloor.tileType == TileType.Sky)
{
num32 += (float)EMono._map.config.skyBlockHeight;
}
int num33 = (int)(num32 / heightBlockSize) + 2;
if (this.cell.bridgePillar != 0)
default:
param.color = floorLight;
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + ((_lowblock && this.tileType.UseLowBlock) ? 3000000 : 0);
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
if (roomHeight == 0f)
{
row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
param.tile = row4._tiles[0] + ((num33 == 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));
sourceBlock.renderData.Draw(param);
}
else
{
param.mat = matBlock;
param.tile = row4._tiles[0] + 32;
param.matColor = ((row4.colorMod == 0) ? 104025 : GetColorInt(ref matBridge.matColor, row4.colorMod));
}
param.y += ugFixBridgeTop.y;
param.z += ugFixBridgeTop.z;
for (int n = 0; n < num33; n++)
{
if (n == num33 - 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;
}
else
{
param.y += ugFixBridge.y;
param.z += ugFixBridge.z;
}
row4.renderData.Draw(param);
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
}
param.y = orgY;
param.z = orgZ;
break;
}
}
if (!buildMode && this.cell.highlight != 0)
if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode)
{
if (this.cell._block != 0 && !this.cell.hasDoor)
if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
{
screen.guide.DrawWall(this.cell.GetPoint(), EMono.Colors.blockColors.MapHighlight, useMarkerPass: true);
goto IL_6fd9;
}
else
if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
{
passGuideFloor.Add(this.cell.GetPoint(), (int)this.cell.highlight);
Room obj = this.cell.FrontRight.room;
if (obj == null || !obj.HasRoof)
{
goto IL_6fd9;
}
}
}
param.color = blockLight;
if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && (snowed || this.cell.isClearSnow) && (this.cell.Front.HasRoof || this.cell.Right.HasRoof))
goto IL_7039;
IL_7039:
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 = false;
snowed = true;
}
num3 = 0;
if (sourceBlock.id != 0)
if (this.cell.effect != null)
{
this.tileType = sourceBlock.tileType;
roomHeight = 0f;
int blockDir = this.cell.blockDir;
bool flag9 = false;
switch (wallClipMode)
if (this.cell.effect.IsLiquid)
{
case WallClipMode.ByRoom:
if (!this.tileType.RepeatBlock)
{
break;
}
if (currentRoom == null || showFullWall)
{
this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
_lowblock = lowBlock;
}
else if (this.room != this.cell.Front.room && (this.cell.Front.room == currentRoom || (this.room?.lot != currentLot && this.cell.Front.room?.lot == currentLot)))
{
this.room = this.cell.Front.room;
_lowblock = !this.cell.Front.lotWall && !this.cell.Front.fullWall;
}
else if (this.room != this.cell.Right.room && (this.cell.Right.room == currentRoom || (this.room?.lot != currentLot && this.cell.Right.room?.lot == currentLot)))
{
this.room = this.cell.Right.room;
_lowblock = !this.cell.Right.lotWall && !this.cell.Right.fullWall;
}
else if (this.tileType.IsFullBlock && this.room != this.cell.FrontRight.room && (this.cell.FrontRight.room == currentRoom || (this.room?.lot != currentLot && this.cell.FrontRight.room?.lot == currentLot)))
{
this.room = this.cell.FrontRight.room;
_lowblock = !this.cell.FrontRight.lotWall && !this.cell.FrontRight.fullWall;
}
else
{
this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
_lowblock = true;
if (!this.tileType.IsFullBlock)
{
if (this.cell.lotWall)
{
_lowblock = false;
}
else if (this.room == currentRoom)
{
_lowblock = !this.cell.fullWall;
}
}
}
flag9 = (this.room != null && this.room.data.atrium) || (this.cell.room != null && this.cell.room.data.atrium);
if (flag9)
{
_lowblock = false;
}
if (this.room == null && alwaysLowblock)
{
_lowblock = true;
roomHeight = 0f;
}
if (this.room != null)
{
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
if (showRoof)
{
roomHeight = this.room.lot.realHeight;
break;
}
if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
{
roomHeight = 0f;
break;
}
int num34 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num34) ? this.room.lot.height : num34) + 0.01f * (float)this.room.lot.heightFix;
}
break;
case WallClipMode.ByLot:
if (defaultBlockHeight > 0f || isIndoor)
{
_lowblock = cx != 0 && cz != Size - 1 && ((!this.cell.Back.HasBlock && !this.cell.Back.isWallEdge) || (!this.cell.Left.HasBlock && !this.cell.Left.isWallEdge) || !this.cell.Back.Left.HasBlock);
if (!_lowblock)
{
roomHeight = defaultBlockHeight * EMono.setting.render.roomHeightMod;
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)(int)this.cell.TopHeight * _heightMod.y;
}
break;
}
if (showFullWall)
SourceCellEffect.Row sourceEffect = this.cell.sourceEffect;
SourceMaterial.Row defaultMaterial = sourceEffect.DefaultMaterial;
tile = 4 + Rand.bytes[index % Rand.MaxBytes] % 4;
param.tile = tile + this.cell.sourceEffect._tiles[0];
param.mat = defaultMaterial;
param.matColor = ((this.cell.effect.color == 0) ? GetColorInt(ref defaultMaterial.matColor, sourceEffect.colorMod) : this.cell.effect.color);
sourceEffect.renderData.Draw(param);
}
else
{
param.tile = this.cell.effect.source._tiles[0];
SourceCellEffect.Row sourceEffect2 = this.cell.sourceEffect;
if (sourceEffect2.anime.Length != 0)
{
_lowblock = this.room != null;
if (_lowblock)
if (sourceEffect2.anime.Length > 2)
{
if (this.cell.Back.IsRoomEdge && this.cell.Right.IsRoomEdge && this.cell.Back.room == null && this.cell.Right.room == null && this.cell.Right.Front.room?.lot == this.room?.lot)
float num20 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
if (!(num20 >= (float)sourceEffect2.anime[0]))
{
_lowblock = false;
param.tile += num20;
}
}
else if (this.cell.Back.room != null && this.cell.Back.room.lot == (this.cell.Front.room ?? this.cell.Right.room)?.lot)
else
{
_lowblock = true;
float num21 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
param.tile += num21;
}
}
else
if (this.cell.effect.IsFire)
{
_lowblock = lowBlock;
rendererEffect.Draw(param);
}
if (this.tileType.RepeatBlock)
else
{
this.room = this.room ?? this.cell.Front.room ?? this.cell.Right.room ?? this.cell.FrontRight.room;
if (this.room != null && (!noRoofMode || currentRoom != null) && (!showFullWall || currentRoom == null || this.room.lot == currentRoom.lot))
{
roomHeight = ((_lowblock && !this.tileType.ForceRpeatBlock) ? 0f : this.room.lot.realHeight);
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)this.room.lot.mh * _heightMod.y;
}
this.cell.effect.source.renderData.Draw(param);
}
break;
}
if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
}
param.color = floorLight;
if (this.cell.critter != null)
{
Critter critter = this.cell.critter;
int snowTile = critter.tile;
if (snowed && critter.SnowTile != 0)
{
num3 = 1;
critter.x = 0.06f;
critter.y = -0.06f;
snowTile = critter.SnowTile;
}
else if (lowBlock)
else
{
num3 = 2;
critter.Update();
}
param.mat = matBlock;
param.dir = this.cell.blockDir;
param.snow = snowed;
switch (this.tileType.blockRenderMode)
pass = passObjSS;
batch = pass.batches[pass.batchIdx];
batch.matrices[pass.idx].m03 = param.x + (float)(int)(critter.x * 100f) * 0.01f;
batch.matrices[pass.idx].m13 = param.y + (float)(int)(critter.y * 100f) * 0.01f;
batch.matrices[pass.idx].m23 = param.z;
batch.tiles[pass.idx] = snowTile * ((!critter.reverse) ? 1 : (-1));
batch.colors[pass.idx] = floorLight;
pass.idx++;
if (pass.idx == pass.batchSize)
{
case BlockRenderMode.FullBlock:
pass.NextBatch();
}
}
if (detail != null)
{
TransAnime anime3 = detail.anime;
if (anime3 != null && !anime3.animeBlock)
{
bool invisible = sourceBlock.tileType.Invisible;
if (invisible && (!buildMode || ActionMode.Cinema.IsActive))
{
break;
}
if (this.cell.isSurrounded)
TransAnime anime4 = detail.anime;
param.x += anime4.v.x;
param.y += anime4.v.y;
param.z += anime4.v.z;
}
}
if (this.cell.obj != 0 && !this.cell.sourceObj.renderData.SkipOnMap)
{
SourceObj.Row sourceObj = this.cell.sourceObj;
if (!snowed || sourceObj.snowTile <= 0)
{
param.snow = snowed;
param.mat = this.cell.matObj;
orgY = param.y;
if (param.liquidLv > 0)
{
switch (innerMode)
if (sourceObj.pref.Float)
{
case InnerMode.InnerBlock:
case InnerMode.BuildMode:
blockLight = _baseBrightness + fogBrightness;
param.color = (int)(50f * blockLight) * 262144;
param.matColor = 104025f;
param.tile = (buildMode ? 1 : 2) + ((_lowblock || defaultBlockHeight > 0f) ? 3000000 : 0);
rendererInnerBlock.Draw(param);
return;
case InnerMode.None:
case InnerMode.Height:
param.color = blockLight;
break;
param.y += 0.01f * floatY;
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
}
}
if (snowed)
{
param.color = floorLight;
}
param.color -= (int)(_shadowStrength * 0.8f * 50f) * 262144;
if (currentRoom != null && !showFullWall)
{
_lowblock = true;
roomHeight = 0f;
if (this.cell.room != currentRoom && (this.cell.Front.room == currentRoom || this.cell.Right.room == currentRoom || this.cell.FrontRight.room == currentRoom) && (this.cell.Back.room != currentRoom || this.cell.Right.room != currentRoom) && (this.cell.Front.room != currentRoom || this.cell.Left.room != currentRoom))
if (sourceObj.tileType.IsWaterTop)
{
_lowblock = false;
param.liquidLv = 0;
}
if (!_lowblock)
else
{
int num35 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num35) ? currentRoom.lot.height : num35) + 0.01f * (float)currentRoom.lot.heightFix;
param.liquidLv += sourceObj.pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquid = 1f;
}
else if (param.liquidLv > 99 + sourceObj.pref.liquidModMax)
{
param.liquidLv = 99 + sourceObj.pref.liquidModMax;
}
}
}
if (flag9)
if (sourceObj.useAltColor)
{
_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)
{
roomHeight = 0f;
}
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
}
if (invisible)
else
{
roomHeight = 0f;
_lowblock = false;
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
}
if (this.cell.Things.Count > 0)
if (sourceObj.HasGrowth)
{
_lowblock = false;
this.cell.growth.OnRenderTileMap(param);
}
param.tile = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length] + (_lowblock ? 3000000 : 0);
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
if (roomHeight == 0f)
else
{
if (!this.cell.hasDoor)
if (this.cell.autotileObj != 0)
{
sourceBlock.renderData.Draw(param);
param.tile = sourceObj._tiles[0] + this.cell.autotileObj;
}
else if (sourceObj.tileType.IsUseBlockDir)
{
param.tile = sourceObj._tiles[this.cell.blockDir % sourceObj._tiles.Length];
}
else
{
param.tile = sourceObj._tiles[this.cell.objDir % sourceObj._tiles.Length];
}
if (_lowblock && sourceObj.tileType.IsSkipLowBlock)
{
param.tile += ((param.tile > 0f) ? 1 : (-1)) * 3000000;
}
orgY = param.y;
orgZ = param.z;
param.y += sourceObj.pref.y;
param.z += sourceObj.pref.z;
sourceObj.renderData.Draw(param);
param.y = orgY;
param.z = orgZ;
int shadow4 = sourceObj.pref.shadow;
if (shadow4 > 1 && !this.cell.ignoreObjShadow)
{
passShadow.AddShadow(param.x + sourceObj.renderData.offsetShadow.x, param.y + sourceObj.renderData.offsetShadow.y, param.z + sourceObj.renderData.offsetShadow.z, ShadowData.Instance.items[shadow4], sourceObj.pref, 0, param.snow);
}
param.y = orgY;
}
else
}
}
if (this.cell.decal != 0 && sourceFloor.tileType.AllowBlood)
{
passDecal.Add(param, (int)this.cell.decal, floorLight);
}
if (highlightCells)
{
switch (ActionMode.FlagCell.mode)
{
case AM_FlagCell.Mode.flagWallPillar:
if (this.cell.isToggleWallPillar)
{
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0, isBlock: true);
passArea.Add(param, 34f, 0f);
}
Room room2 = this.cell.Front.room ?? this.cell.room;
if (room2 == null && this.cell.Right.room != null)
break;
case AM_FlagCell.Mode.flagSnow:
if (this.cell.isClearSnow)
{
room2 = this.cell.Right.room;
passArea.Add(param, 34f, 0f);
}
if (!invisible && room2 != null)
break;
case AM_FlagCell.Mode.flagFloat:
if (this.cell.isForceFloat)
{
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;
float y = param.y;
param.y += (float)room2.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)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2);
param.matColor = room2.lot.colDeco2;
float y2 = param.y;
float num36 = param.z;
param.y += (float)room2.lot.decoFix2 * 0.01f;
param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = y2;
param.z = num36;
}
passArea.Add(param, 34f, 0f);
}
room2 = this.cell.Right.room ?? this.cell.room;
if (room2 == null && this.cell.Front.room != null)
break;
case AM_FlagCell.Mode.flagClear:
if (this.cell.isClearArea)
{
passArea.Add(param, 34f, 0f);
}
break;
}
}
if (detail == null)
{
return;
}
if (highlightArea && detail.area != null)
{
passArea.Add(param, (int)detail.area.GetTile(index) - ((!subtleHighlightArea) ? 1 : 0), 0f);
}
if (detail.footmark != null && sourceFloor.id != 0)
{
param.tile = detail.footmark.tile;
param.mat = matFloor;
param.matColor = 104025f;
renderFootmark.Draw(param);
}
goto IL_7b6a;
IL_7b6a:
if (detail.things.Count == 0 && detail.charas.Count == 0)
{
return;
}
int num22 = 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 num23 = 0f;
float num24 = 0f;
float num25 = 0f;
float num26 = 0f;
bool flag10 = false;
float num27 = 0f;
bool flag11 = false;
float num28 = 0f;
if (detail.things.Count > 0 && isSeen)
{
_ = zSetting.max1;
float num29 = 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 && !buildMode) || (lowBlock && !showFullWall && this.room != null) || (noRoofMode && currentRoom == null))) || (flag3 && !t.isRoofItem))
{
room2 = this.cell.Front.room;
continue;
}
if (!invisible && room2 != null)
TileType tileType = t.trait.tileType;
bool isInstalled = t.IsInstalled;
SourcePref pref = t.Pref;
if (!isInstalled && t.category.tileDummy != 0)
{
if (room2.lot.idDeco != 0 && !this.cell.hasDoor)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco) * -1;
param.matColor = room2.lot.colDeco;
float y3 = param.y;
param.y += (float)room2.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)
{
param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room2.lot.idDeco2) * -1;
param.matColor = room2.lot.colDeco2;
float y4 = param.y;
float num37 = param.z;
param.y += (float)room2.lot.decoFix2 * 0.01f;
param.z += (float)room2.lot.decoFix2 * 0.01f * heightModDeco;
rendererWallDeco.Draw(param);
param.y = y4;
param.z = num37;
}
pref = rendererObjDummy.shadowPref;
}
break;
}
case BlockRenderMode.WallOrFence:
{
if (map.config.fullWallHeight)
float num30 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
if (t.ignoreStackHeight)
{
showFullWall = true;
_lowblock = false;
thingPos.y -= num23;
thingPos -= altitudeFix * num24;
}
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;
if (!showFullWall && currentRoom != null)
shadow = thingPos.y < 0.16f && num28 < 0.16f;
_ = pref.bypassShadow;
param.shadowFix = 0f - thingPos.y;
param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);
if (t.isRoofItem)
{
if (!flag10)
{
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;
}
}
else if ((!this.cell.Front.lotWall || this.cell.Front.room?.lot != currentLot) && this.cell.Front.room != currentRoom)
{
flag10 = true;
}
}
if (!flag11)
param.snow = isSnowCovered && !this.cell.isClearSnow;
SetRoofHeight(param, this.cell, cx, cz);
_actorPos.x = param.x;
_actorPos.y = param.y;
_actorPos.z = param.z + num29;
if (this.room != null)
{
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;
}
}
else if ((!this.cell.Right.lotWall || this.cell.Right.room?.lot != currentLot) && this.cell.Right.room != currentRoom)
{
flag11 = true;
}
param.color = GetRoofLight(this.room.lot);
}
shadow = false;
param.liquidLv = 0;
}
if (blockDir == 0 || blockDir == 2)
else
{
param.dir = 0;
Room room3 = this.cell.Front.room ?? this.cell.room;
if (room3 != null && this.tileType.IsWall)
param.snow = snowed;
_actorPos.x = orgX + num26;
_actorPos.y = orgY;
_actorPos.z = orgZ + num29 + thingPos.z;
if (tileType.CanStack || !isInstalled)
{
if (room3.lot.idDeco != 0 && !this.cell.hasDoor)
{
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 (thing?.id != t.id)
{
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;
rendererWallDeco.Draw(param);
param.y = orgY;
param.z = orgZ;
_actorPos.x += thingPos.x;
}
}
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] + ((flag10 && this.tileType.UseLowBlock) ? 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 || flag10 || !this.tileType.RepeatBlock)
{
if (!this.cell.hasDoor)
_actorPos.y += thingPos.y;
if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
{
_sourceBlock.renderData.Draw(param);
thingPos.y -= num23;
if (thing != null)
{
_actorPos.z -= 0.2f;
thingPos.z -= 0.2f;
}
_actorPos.y -= num23;
}
_actorPos.z += renderSetting.thingZ + (float)m * -0.01f + zSetting.mod1 * thingPos.y;
}
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 (isInstalled)
{
if (this.cell.Back.IsSnowTile && this.cell.Right.IsSnowTile)
{
param.snow = true;
}
param.tile = _sourceBlock._tiles[0] + ((flag10 && flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (roomHeight == 0f || !this.tileType.RepeatBlock || (flag10 && flag11 && !flag9))
{
_sourceBlock.renderData.Draw(param);
}
else
if (t.TileType.IsRamp)
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
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)
{
num28 += rampFix2.y;
}
liquidLv -= (int)(rampFix2.y * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
}
if (!flag10 && !showRoof && this.cell.Left.HasWallOrFence && this.cell.Left.blockDir != 0 && !this.cell.Left.isToggleWallPillar)
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !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))
else if (!flag11 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
{
_sourceBlock.renderData.Draw(param);
orgY += num30 + (float)t.altitude * altitudeFix.y;
orgZ += (float)t.altitude * altitudeFix.z;
freePos.y += num30 + (float)t.altitude * altitudeFix.y;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num28 += num30 + (float)t.altitude * altitudeFix.y;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
liquidLv -= (int)(num30 * 150f);
if (liquidLv < 0)
{
liquidLv = 0;
}
}
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 && (!flag10 || !this.cell.Left.HasWall) && !this.cell.isToggleWallPillar)
{
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag10 && this.tileType.UseLowBlock && !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))
{
_sourceBlock.renderData.Draw(param);
thingPos.y += num30;
if (tileType.UseMountHeight)
{
if ((tileType != TileType.Illumination || !this.cell.HasObj) && !tileType.AlwaysShow)
{
if (noRoofMode && currentRoom == null && t.altitude >= lowWallObjAltitude && tileType != TileType.ObjFloat)
{
continue;
}
if (hideHang && (this.cell.room?.lot != currentLot || (!this.cell.lotWall && this.cell.room != currentRoom)))
{
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 (tileType.UseHangZFix)
{
flag10 = 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
{
thingPos.y += (float)t.altitude * altitudeFix.y;
thingPos.z += (float)t.altitude * altitudeFix.z;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
if (pref.height >= 0f)
{
thingPos.z += pref.z;
}
}
else
if (!tileType.UseMountHeight && m > 10)
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight + cornerWallFix.y, ref renderSetting.peakFix);
flag11 = true;
}
param.x = orgX;
}
}
if (blockDir == 1 || blockDir == 2)
{
param.y = orgY;
param.z = orgZ;
param.dir = 1;
Room room4 = this.cell.Right.room ?? this.cell.room;
if (room4 != null && this.tileType.IsWall)
else
{
if (room4.lot.idDeco != 0 && !this.cell.hasDoor)
{
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;
}
if (room4.lot.idDeco2 != 0 && roomHeight != 0f && !flag11 && (float)room4.lot.decoFix2 * 0.01f + heightLimitDeco < roomHeight + maxHeight - param.y)
{
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;
}
thingPos.y += num30;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;
}
if (blockDir == 2 && this.cell.room == null && this.cell.Right.room != null)
if (t.isFloating && isWater && !hasBridge && !flag)
{
Room room5 = this.cell.Right.room;
maxHeight = (float)(cz - cx) * screen.tileAlign.y + (float)room5.lot.mh * _heightMod.y;
if (showRoof)
flag = true;
float num31 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num31;
if (!t.trait.IsChangeFloorHeight)
{
roomHeight = room5.lot.realHeight;
num27 = num30;
}
else if ((noRoofMode && currentRoom == null) || (_lowblock && !this.tileType.ForceRpeatBlock))
_actorPos.y += 0.01f * floatY - num31;
if (liquidLv > 10)
{
roomHeight = 0f;
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
else
liquidLv -= (int)(floatY * 0.5f);
if (liquidLv < 0)
{
int num38 = ((room5.data.maxHeight == 0) ? 2 : room5.data.maxHeight);
roomHeight = EMono.setting.render.roomHeightMod * (float)((room5.lot.height < num38) ? room5.lot.height : num38) + 0.01f * (float)room5.lot.heightFix;
liquidLv = 0;
}
param.liquidLv = liquidLv;
}
Cell back2 = this.cell.Back;
if (blockDir == 2 && back2.sourceBlock.tileType.IsWallOrFence && !this.cell.crossWall)
num23 = num30;
if (t.sourceCard.multisize && !t.trait.IsGround)
{
_sourceBlock = back2.sourceBlock;
param.mat = back2.matBlock;
num29 += zSetting.multiZ;
}
else
orgZ += t.renderer.data.stackZ;
if (param.liquidLv > 0)
{
_sourceBlock = sourceBlock;
param.mat = matBlock;
param.liquidLv += pref.liquidMod;
if (param.liquidLv < 1)
{
param.liquidLv = 1;
}
else if (param.liquidLv > 99 + pref.liquidModMax)
{
param.liquidLv = 99 + pref.liquidModMax;
}
}
this.tileType = _sourceBlock.tileType;
param.tile = (tile = -_sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock) ? (-32) : 0));
if (_sourceBlock.useAltColor)
}
if (!isInstalled || !tileType.UseMountHeight)
{
if (t.altitude != 0)
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, _sourceBlock.colorMod));
_actorPos += altitudeFix * t.altitude;
if (!t.isRoofItem)
{
num25 += (float)t.altitude;
num24 = t.altitude;
}
}
else
if (num25 >= 2f && ((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)))
{
param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
continue;
}
param.color += _rightWallShade;
if (roomHeight == 0f || flag11 || !this.tileType.RepeatBlock)
if (t.freePos)
{
if (!this.cell.hasDoor)
if (t.isRoofItem)
{
_sourceBlock.renderData.Draw(param);
_actorPos.x += t.fx;
_actorPos.y += t.fy - (float)t.altitude * altitudeFix.y;
}
else
{
_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())
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix, this.cell.hasDoor, this.cell.effect?.FireAmount ?? 0);
_actorPos.z += -0.5f;
}
if ((this.cell.Right.HasWallOrFence && this.cell.Right.blockDir != 1) != this.cell.isToggleWallPillar && (blockDir != 2 || !this.cell.isToggleWallPillar))
}
if (!t.sourceCard.multisize || (t.pos.x == cx && t.pos.z == cz))
{
if (iconMode != 0)
{
if (this.cell.Left.IsSnowTile && this.cell.Front.IsSnowTile)
int num32 = 0;
switch (iconMode)
{
param.snow = true;
case CardIconMode.Visibility:
if (t.isMasked)
{
num32 = 17;
}
break;
case CardIconMode.State:
if (t.placeState == PlaceState.installed)
{
num32 = 18;
}
break;
case CardIconMode.Deconstruct:
if (t.isDeconstructing)
{
num32 = 14;
}
break;
}
orgX = param.x;
param.tile = _sourceBlock._tiles[0] + ((flag11 && this.tileType.UseLowBlock && !flag9) ? 32 : 0) + (this.tileType.IsFence ? 32 : 64);
if (!flag9 && (roomHeight == 0f || !this.tileType.RepeatBlock || flag11))
if (t.isNPCProperty && !EMono.debug.godBuild)
{
_sourceBlock.renderData.Draw(param);
num32 = 13;
}
else
if (num32 != 0)
{
_sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFix);
passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num32);
}
param.x = orgX;
}
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)
{
num26 += 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 num39 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1;
if (num39 == 0)
{
renderData2.Draw(param);
}
else
thing = t;
if (pref.Float)
{
renderData2.DrawRepeat(param, num39, sourceBlock.tileType.RepeatSize);
liquidLv = 0;
}
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.UseLowBlock) ? 3000000 : 0);
param.matColor = ((sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref matBlock.matColor, sourceBlock.colorMod));
if (roomHeight == 0f)
}
orgY += num27;
if (detail.charas.Count <= 0)
{
return;
}
param.shadowFix = 0f - num28;
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)
{
continue;
}
if (chara != EMono.pc && chara != LayerDrama.alwaysVisible)
{
if (chara.mimicry != null && chara.mimicry.IsThing)
{
sourceBlock.renderData.Draw(param);
if (flag3 || fogged || !this.cell.isSeen)
{
continue;
}
}
else
else if (flag3 || fogged || (!showAllCards && !EMono.player.CanSee(chara)))
{
sourceBlock.renderData.DrawRepeatTo(param, maxHeight, roomHeight, ref renderSetting.peakFixBlock);
continue;
}
break;
}
}
if (this.cell.pcSync && EMono.player.lightPower > 0f && !cinemaMode)
{
if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
_actorPos.x = orgX;
_actorPos.y = orgY;
_actorPos.z = orgZ;
chara.SetRenderParam(param);
_ = chara.IsAliveInCurrentZone;
if (chara.isRestrained)
{
goto IL_6f8a;
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 num33 = 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 + num33;
_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 (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
if (!chara.sourceCard.multisize || (chara.pos.x == cx && chara.pos.z == cz))
{
Room obj = this.cell.FrontRight.room;
if (obj == null || !obj.HasRoof)
if (chara.IsDeadOrSleeping && chara.IsPCC)
{
float num34 = chara.renderer.data.size.y * 0.3f;
if (thingPos.y > max)
{
thingPos.y = max;
}
float num35 = thingPos.y + num34;
float num36 = (float)n * -0.01f;
if (num35 > zSetting.thresh1)
{
num36 = zSetting.mod1;
}
_actorPos.x += thingPos.x;
_actorPos.y += thingPos.y;
_actorPos.z += renderSetting.laydownZ + num36;
param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
thingPos.y += num34 * 0.8f;
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
}
else
{
goto IL_6f8a;
param.liquidLv = liquidLv;
if (isUnderwater)
{
if (chara.Pref.FloatUnderwater)
{
float num37 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
float num38 = floatYs[chara.uid % 10] + 10f + (float)(chara.uid % 30);
orgY += 0.01f * num38 - num37;
_actorPos.y += 0.01f * num38 - num37;
param.shadowFix -= 0.01f * num38 - num37;
}
}
else if (liquidLv > 0)
{
if (chara.Pref.Float && !flag && !hasBridge)
{
if (liquidLv > 20)
{
float num39 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num39;
_actorPos.y += 0.01f * floatY - num39;
int num40 = TileType.FloorWaterShallow.LiquidLV * 10;
num40 -= (int)(floatY * 0.5f);
param.liquidLv = num40;
}
else
{
param.liquidLv -= 20;
}
}
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 + ((num22 < 4) ? num22 : 3)];
}
_actorPos.z += 0.01f * (float)n + renderSetting.charaZ;
num22++;
if (flag10)
{
_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_6fd9:
if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
{
param.tile = num13;
rendererFov.Draw(param);
}
goto IL_6fea;
goto IL_7039;
void Draw(int tile)
{
pass = passEdge;Card โ
}
for (int i = 0; i < 1 + EClass.rnd(num + 1); i++)
{
EClass._zone.SpawnMob(array[num], point.GetNearestPoint(allowBlock: false, allowChara: false));
Chara chara = EClass._zone.SpawnMob(array[num], point.GetNearestPoint(allowBlock: false, allowChara: false));
if (chara != null && isChara)
{
chara.SetHostility(Chara.OriginalHostility);
}
}
}ConTransmute โ
}
public override void OnStart()
{
Change();
}
public void Change()
{
owner._CreateRenderer();
if (owner.IsPCParty)ConTransmuteHuman โ
using System.Collections.Generic;
using System.Collections.Generic;
using System.Linq;
using Newtonsoft.Json;
using UnityEngine;
public class ConTransmuteHuman : ConBaseTransmuteMimic
{
[JsonProperty]
public Chara chara;
[JsonProperty]
public int lastHP;
public override Card Card => chara;
public bool IsBaby => chara.HasElement(1232);
public bool IsNyaru => owner?.id == "nyaruruga";
public override bool HasDuration => false;
public override bool ShouldRevealOnContact => false;
public override bool ShouldRevealOnPush => false;
public override bool ShouldRevealOnDamage => (float)EClass.rnd(50) > (float)owner.hp / (float)owner.MaxHP * 100f;
public override bool ShouldRevealOnDamage
{
get
{
if (!IsNyaru)
{
return (float)EClass.rnd(50) > (float)owner.hp / (float)owner.MaxHP * 100f;
}
return false;
}
}
public override bool ShouldEndMimicry(Act act)
{public override void OnBeforeStart()
{
if (chara == null)
{
List<Thing> list = owner.things.List((Thing t) => t.trait is TraitFigure { source: not null } traitFigure && !traitFigure.source.multisize, onlyAccessible: true);
if (list.Count > 0)
if (IsNyaru)
{
chara = CharaGen.Create((list.RandomItem().trait as TraitFigure).source.id);
NyaruSpecial();
}
else
{
List<Chara> list2 = owner.pos.ListCharasInRadius(owner, 5, delegate(Chara c)
List<Thing> list = owner.things.List((Thing t) => t.trait is TraitFigure { source: not null } traitFigure && !traitFigure.source.multisize, onlyAccessible: true);
if (list.Count > 0)
{
if (!c.IsMultisize && c.IsHumanSpeak)
chara = CharaGen.Create((list.RandomItem().trait as TraitFigure).source.id);
}
else
{
List<Chara> list2 = owner.pos.ListCharasInRadius(owner, 5, delegate(Chara c)
{
CardRenderer renderer = c.renderer;
if (renderer != null && !renderer.hasActor)
if (!c.IsMultisize && c.IsHumanSpeak)
{
return !c.HasElement(1427);
CardRenderer renderer = c.renderer;
if (renderer != null && !renderer.hasActor)
{
return !c.HasElement(1427);
}
}
return false;
});
if (list2.Count > 0)
{
chara = list2.RandomItem().Duplicate();
}
else
{
chara = CharaGen.CreateFromFilter("c_guest");
}
return false;
});
if (list2.Count > 0)
{
chara = list2.RandomItem().Duplicate();
}
else
{
chara = CharaGen.CreateFromFilter("c_guest");
}
}
}
base.OnBeforeStart();
}
public void NyaruSpecial()
{
IEnumerable<SourceChara.Row> ie = EClass.sources.charas.rows.Where((SourceChara.Row a) => !a.multisize && !a.actCombat.IsEmpty() && !a.HasTag(CTAG.suicide) && !a.HasTag(CTAG.noRandomProduct));
chara = CharaGen.Create(ie.RandomItem().id);
lastHP = owner.hp;
}
public override void Tick()
{
if (IsNyaru && Mathf.Abs(owner.hp - lastHP) >= owner.MaxHP / 10)
{
NyaruSpecial();
Change();
}
base.Tick();
}
}CoreDebug โ
Tefra
}
public enum BodyCode
{
head = 30,
neck = 31,
torso = 32,
back = 33,
waist = 37,
arm = 34,
hand = 35,
finger = 36,
leg = 38,
foot = 39,
lightsource = 45
}
[Serializable]
public class MatColorTest
{ [ConsoleCommand("")]
public static string FlyMode()
{
if (!CheatEnabled())
{
return EnableCheat;
}
EClass.pc.AddCondition<ConLevitate>();
return "I can fly!";
}
[ConsoleCommand("")]
public static string AddBodyPart(BodyCode bodyCode)
{
if (!CheatEnabled())
{
return EnableCheat;
}
EClass.pc.body.AddBodyPart((int)bodyCode);
EClass.pc.body.RefreshBodyParts();
WidgetEquip.OnChangeBodyPart();
return "Done.";
}
[ConsoleCommand("")]
public static string RemoveBodyPart(BodyCode bodyCode)
{
if (!CheatEnabled())
{
return EnableCheat;
}
EClass.pc.body.RemoveBodyPart((int)bodyCode);
EClass.pc.body.RefreshBodyParts();
WidgetEquip.OnChangeBodyPart();
return "Done.";
}
[ConsoleCommand("")]
public static string ChangeRace(string id = "?")
{public static string ChangeRace(string id = "?")
EClass.pc.body.AddBodyPart(45);
EClass.pc.body.AddBodyPart(44);
EClass.pc.body.Equip(thing);
EClass.pc.body.RefreshBodyParts();
WidgetEquip.OnChangeBodyPart();
return "Done.";
}
string text = "";ENC โ
public const int absorbHP = 660;
public const int convertLightning = 852;
public const int convertCold = 851;
public const int absorbSP = 662;
public const int mod_feint = 623;
public const int convertCold = 851;
public const int convertLightning = 852;
public const int mod_flurry = 621;
public const int mod_cleave = 622;
public const int counter = 380;
public const int basher = 381;
public const int rusher = 382;
public const int sustain_MAG = 446;
public const int basher = 381;
public const int counter = 380;
public const int sustain_figure = 450;
public const int sustain_CHA = 447;
public const int mod_splash = 608;
public const int mod_scatter = 607;
public const int mod_drill = 606;
public const int nonLethal = 485;
public const int safetyMeasure = 486;
public const int creativeChef = 487;
public const int deathagony = 488;
public const int mod_ammo_knockback = 603;
public const int mod_talisman = 609;
public const int mod_ammo_recover = 604;
public const int mod_precision = 605;
public const int bane_fish = 467;
public const int mod_drill = 606;
public const int bane_dragon = 460;
public const int mod_scatter = 607;
public const int optimizeMana = 483;
public const int mod_splash = 608;
public const int bane_undead = 461;
public const int mod_talisman = 609;
public const int mod_chaser = 620;
public const int safetyMeasure = 486;
public const int bane_fairy = 462;
public const int nonLethal = 485;
public const int sustain_CHA = 447;
public const int force_weapon = 482;
public const int revealFaith = 481;
public const int bane_animal = 463;
public const int strongStomach = 480;
public const int bane_man = 464;
public const int bane_animal = 463;
public const int bane_machine = 465;
public const int bane_all = 468;
public const int bane_god = 466;
public const int slot_rune = 484;
public const int bane_man = 464;
public const int bane_undead = 461;
public const int bane_machine = 465;
public const int bane_fish = 467;
public const int bane_god = 466;
public const int bane_all = 468;
public const int strongStomach = 480;
public const int bane_dragon = 460;
public const int revealFaith = 481;
public const int mod_chaser = 620;
public const int optimizeMana = 483;
public const int bane_fairy = 462;
public static readonly int[] IDS = new int[108]
{
655, 654, 653, 652, 651, 641, 650, 656, 640, 660,
852, 662, 663, 664, 665, 666, 667, 850, 624, 865,
864, 661, 623, 851, 621, 422, 423, 424, 425, 426,
851, 662, 663, 664, 665, 666, 667, 850, 624, 865,
864, 661, 623, 852, 621, 422, 423, 424, 425, 426,
427, 428, 429, 430, 431, 432, 435, 436, 437, 438,
439, 440, 441, 442, 443, 444, 421, 445, 420, 418,
622, 380, 382, 383, 400, 401, 402, 403, 404, 405,
622, 381, 382, 383, 400, 401, 402, 403, 404, 405,
406, 407, 408, 409, 410, 411, 412, 414, 415, 416,
417, 419, 446, 381, 450, 447, 608, 607, 606, 485,
486, 487, 488, 489, 490, 491, 600, 601, 602, 603,
609, 604, 605, 467, 460, 483, 461, 620, 462, 482,
481, 480, 463, 468, 484, 464, 465, 466
417, 419, 446, 380, 450, 487, 488, 489, 490, 491,
600, 601, 602, 603, 604, 605, 606, 607, 608, 609,
486, 485, 447, 482, 463, 464, 465, 466, 484, 461,
467, 468, 480, 460, 481, 620, 483, 462
};
}FACTION โ
public class FACTION
{
public const int bfGum = 3803;
public const int bfMushroom = 3801;
public const int bfSilica = 3802;
public const int fRation = 2207;
public const int actBuildMine = 4001;
public const int bfStart = 3900;
public const int bfChitin = 3805;
public const int bfIce = 3804;
public const int bfGum = 3803;
public const int bfSilica = 3802;
public const int bfMushroom = 3801;
public const int bfCoal = 3800;
public const int bfChitin = 3805;
public const int fLoyal = 2117;
public const int fAttraction = 2206;
public const int fConstruction = 2003;
public const int fEducation = 2116;
public const int bfLandmark5 = 3784;
public const int fSafety = 2205;
public const int fLuck = 2118;
public const int fLoyal = 2117;
public const int fEducation = 2116;
public const int fAdmin = 2115;
public const int fConstruction = 2003;
public const int bfLandmark5 = 3784;
public const int bfLandmark4 = 3783;
public const int fRation = 2207;
public const int fAttraction = 2206;
public const int bfLandmark2 = 3781;
public const int bfCave = 3500;
public const int bfLandmark1 = 3780;
public const int actBuildInspect = 4006;
public const int bfLandmark1 = 3780;
public const int actBuildRecipe = 4005;
public const int actBuildCollect = 4004;
public static readonly int[] IDS = new int[53]
{
3803, 3801, 3802, 4001, 4000, 3900, 3804, 3800, 3805, 2206,
2205, 2204, 2203, 2202, 2201, 2200, 2120, 2119, 2118, 2117,
2116, 2115, 2003, 3784, 3783, 2207, 3781, 3782, 3705, 3704,
2207, 4001, 4000, 3900, 3805, 3804, 3803, 3802, 3801, 3800,
2117, 2003, 2116, 3784, 2205, 2204, 2203, 2202, 2201, 2200,
2120, 2119, 2118, 2115, 3783, 2206, 3781, 3782, 3705, 3704,
3703, 3706, 3702, 3701, 3700, 3606, 3604, 3603, 3602, 3601,
3605, 3500, 3780, 4006, 4005, 4004, 4003, 4002, 3707, 3708,
3605, 3500, 4006, 3780, 4005, 4004, 4003, 4002, 3707, 3708,
3709, 3600, 3710
};
}FEAT โ
public class FEAT
{
public const int featPER = 1623;
public const int featLER = 1624;
public const int featMAG = 1625;
public const int featWIL = 1626;
public const int featHardy = 1630;
public const int featDefense = 1631;
public const int featCHA = 1627;
public const int featLuck = 1628;
public const int featSPD = 1629;
public const int featHardy = 1630;
public const int featPER = 1623;
public const int featEND = 1622;
public const int featEvade = 1632;
public const int featDefense = 1631;
public const int featCHA = 1627;
public const int featWIL = 1626;
public const int featEND = 1622;
public const int featDEX = 1621;
public const int featManaMeat = 1421;
public const int featSTR = 1620;
public const int featStamina = 1612;
public const int featMana = 1611;
public const int featLife = 1610;
public const int featManyFace = 1429;
public const int featMurderer = 1428;
public const int featDisguise = 1427;
public const int featHealer = 1422;
public const int featSpotting = 1633;
public const int featEvade = 1632;
public const int featExecutioner = 1420;
public const int featDEX = 1621;
public const int featSTR = 1620;
public const int featNegotiate = 1634;
public const int featSpotting = 1633;
public const int featGourmet = 1650;
public const int featDefender = 1649;
public const int featFaith = 1636;
public const int featMartial = 1635;
public const int featMilitant = 1419;
public const int featModelBeliever = 1655;
public const int featMartial = 1635;
public const int featHeavyCasting = 1654;
public const int featDreamWaker = 1653;
public const int featRapidArrow = 1652;
public const int featMagicManner = 1651;
public const int featDefender = 1649;
public const int featGourmet = 1650;
public const int featRapidMagic = 1648;
public const int featAnimalLover = 1640;
public const int featDreamWaker = 1653;
public const int featFaith = 1636;
public const int featNegotiate = 1634;
public const int featSwordsage = 1418;
public const int featFoxMaid = 1415;
public static readonly int[] IDS = new int[149]
public static readonly int[] IDS = new int[150]
{
1624, 1625, 1626, 1631, 1628, 1629, 1630, 1623, 1632, 1627,
1622, 1421, 1620, 1612, 1611, 1610, 1428, 1427, 1426, 1425,
1424, 1423, 1422, 1633, 1420, 1621, 1634, 1650, 1636, 1419,
1623, 1624, 1625, 1630, 1627, 1628, 1629, 1622, 1631, 1626,
1621, 1421, 1612, 1611, 1610, 1429, 1428, 1427, 1426, 1425,
1424, 1423, 1422, 1632, 1420, 1620, 1633, 1649, 1635, 1419,
1750, 1664, 1663, 1662, 1661, 1660, 1659, 1658, 1657, 1656,
1655, 1635, 1654, 1652, 1651, 1649, 1648, 1647, 1646, 1645,
1644, 1643, 1642, 1641, 1640, 1653, 1418, 1345, 1416, 1233,
1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243,
1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1417,
1271, 1272, 1273, 1274, 1275, 1276, 1290, 1291, 1232, 1300,
1231, 1229, 1200, 1201, 1202, 1203, 1204, 1205, 1206, 1207,
1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217,
1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227,
1228, 1230, 1305, 1270, 1315, 1414, 1413, 1412, 1411, 1410,
1409, 1408, 1407, 1406, 1310, 1405, 1404, 1403, 1402, 1401,
1400, 1355, 1350, 1340, 1335, 1330, 1325, 1320, 1415
1655, 1654, 1653, 1652, 1651, 1650, 1648, 1647, 1646, 1645,
1644, 1643, 1642, 1641, 1640, 1636, 1634, 1418, 1345, 1416,
1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242,
1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252,
1417, 1271, 1272, 1273, 1274, 1275, 1276, 1290, 1291, 1232,
1300, 1231, 1229, 1200, 1201, 1202, 1203, 1204, 1205, 1206,
1207, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216,
1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226,
1227, 1228, 1230, 1305, 1270, 1315, 1414, 1413, 1412, 1411,
1410, 1409, 1408, 1407, 1406, 1310, 1405, 1404, 1403, 1402,
1401, 1400, 1355, 1350, 1340, 1335, 1330, 1325, 1320, 1415
};
}
public class Feat : Elementpublic List<string> Apply(int a, ElementContainer owner, bool hint = false)
_ = a;
_ = 0;
}
if (owner.Chara.IsPC && (bool)WidgetEquip.Instance)
if (owner.Chara.IsPC)
{
WidgetEquip.Instance.Rebuild();
WidgetEquip.OnChangeBodyPart();
}
}
ModBase(60, (A > 5) ? ((A - 5) * -3 * invert) : 0, hide: false);InvOwnerDeliver โ
public Mode mode;
public override bool ShowButtonDeliver => mode == Mode.Crop;
public override bool SingleTarget => mode == Mode.Tax;
public override string langTransferInvOwnerDraglet โ
public virtual bool AllowStockIngredients => false;
public virtual bool ShowButtonDeliver => false;
public override bool AllowTransfer => true;
public override bool AllowAutouse => false;LayerDragGrid โ
public UIButton buttonStock;
public UIButton buttonDeliver;
public InvOwnerDraglet owner;
public UICurrency uiCurrency;public LayerDragGrid SetInv(InvOwnerDraglet owner, bool refuelFromLayerDragGrid
buttonRefuel.SetActive(owner.ShowFuel);
buttonAutoRefuel.SetActive(owner.ShowFuel);
buttonStock.SetActive(owner.AllowStockIngredients);
buttonDeliver.SetActive(owner.ShowButtonDeliver);
if (owner.CanTargetAlly && ELayer.pc.party.members.Count > 1)
{
listAlly.callbacks = new UIList.Callback<Chara, UIButton>public LayerDragGrid SetInv(InvOwnerDraglet owner, bool refuelFromLayerDragGrid
uiIngredients.Refresh();
RefreshCost();
});
buttonDeliver.SetOnClick(delegate
{
InvOwnerDeliver deliver = owner as InvOwnerDeliver;
QuestHarvest questHarvest = ELayer.game.quests.Get<QuestHarvest>();
int num = 0;
if (questHarvest != null)
{
foreach (Thing item in ELayer.pc.things.List((Thing a) => deliver.ShouldShowGuide(a)))
{
Msg.Say("farm_chest", item, Lang._weight(item.SelfWeight * item.Num));
questHarvest.weightDelivered += item.SelfWeight * item.Num;
item.Destroy();
num++;
}
}
if (num > 0)
{
SE.Pick();
}
else
{
SE.BeepSmall();
}
Close();
});
if (owner is InvOwnerRefuel)
{
if (refuelFromLayerDragGrid)SKILL โ
public override bool CanLink(ElementContainer owner)
{
if (base.source.IsWeaponEnc)
{
if (base.owner != null && base.owner.Card != null)
if (base.owner != null && base.owner.Card != null && !base.owner.Card.IsWeapon)
{
return !base.owner.Card.IsWeapon;
return base.owner.Card.sourceCard.elementMap.ContainsKey(base.source.id);
}
return false;
}SourceBlock โ
public string idThing;
public int[] anime;
public int roof;
public string autoFloor;public override Row CreateRow()
_tileType = SourceData.GetString(8),
_idRenderData = SourceData.GetString(9),
tiles = SourceData.GetIntArray(10),
snowTile = SourceData.GetInt(11),
colorMod = SourceData.GetInt(12),
colorType = SourceData.GetString(13),
value = SourceData.GetInt(14),
LV = SourceData.GetInt(15),
recipeKey = SourceData.GetStringArray(16),
factory = SourceData.GetStringArray(17),
components = SourceData.GetStringArray(18),
defMat = SourceData.GetString(19),
category = SourceData.GetString(20),
roof = SourceData.GetInt(21),
autoFloor = SourceData.GetString(22),
concrete = SourceData.GetBool(23),
transparent = SourceData.GetBool(24),
transition = SourceData.GetIntArray(25),
tag = SourceData.GetStringArray(26),
soundFoot = SourceData.GetString(27),
detail_JP = SourceData.GetString(28),
detail = SourceData.GetString(29)
anime = SourceData.GetIntArray(11),
snowTile = SourceData.GetInt(12),
colorMod = SourceData.GetInt(13),
colorType = SourceData.GetString(14),
value = SourceData.GetInt(15),
LV = SourceData.GetInt(16),
recipeKey = SourceData.GetStringArray(17),
factory = SourceData.GetStringArray(18),
components = SourceData.GetStringArray(19),
defMat = SourceData.GetString(20),
category = SourceData.GetString(21),
roof = SourceData.GetInt(22),
autoFloor = SourceData.GetString(23),
concrete = SourceData.GetBool(24),
transparent = SourceData.GetBool(25),
transition = SourceData.GetIntArray(26),
tag = SourceData.GetStringArray(27),
soundFoot = SourceData.GetString(28),
detail_JP = SourceData.GetString(29),
detail = SourceData.GetString(30)
};
}SourceFloor โ
public string[] reqHarvest;
public int[] anime;
public string defBlock;
public string bridgeBlock;public override Row CreateRow()
_tileType = SourceData.GetString(8),
_idRenderData = SourceData.GetString(9),
tiles = SourceData.GetIntArray(10),
colorMod = SourceData.GetInt(11),
value = SourceData.GetInt(12),
LV = SourceData.GetInt(13),
recipeKey = SourceData.GetStringArray(14),
factory = SourceData.GetStringArray(15),
components = SourceData.GetStringArray(16),
defMat = SourceData.GetString(17),
defBlock = SourceData.GetString(18),
bridgeBlock = SourceData.GetString(19),
category = SourceData.GetString(20),
edge = SourceData.GetInt(21),
autotile = SourceData.GetInt(22),
autotilePriority = SourceData.GetInt(23),
autotileBrightness = SourceData.GetFloat(24),
soundFoot = SourceData.GetString(25),
tag = SourceData.GetStringArray(26),
detail_JP = SourceData.GetString(27),
detail = SourceData.GetString(28)
anime = SourceData.GetIntArray(11),
colorMod = SourceData.GetInt(12),
value = SourceData.GetInt(13),
LV = SourceData.GetInt(14),
recipeKey = SourceData.GetStringArray(15),
factory = SourceData.GetStringArray(16),
components = SourceData.GetStringArray(17),
defMat = SourceData.GetString(18),
defBlock = SourceData.GetString(19),
bridgeBlock = SourceData.GetString(20),
category = SourceData.GetString(21),
edge = SourceData.GetInt(22),
autotile = SourceData.GetInt(23),
autotilePriority = SourceData.GetInt(24),
autotileBrightness = SourceData.GetFloat(25),
soundFoot = SourceData.GetString(26),
tag = SourceData.GetStringArray(27),
detail_JP = SourceData.GetString(28),
detail = SourceData.GetString(29)
};
}SourceObj โ
public string valType;
public int[] anime;
public string matCategory;
public int idRoof;public override Row CreateRow()
valType = SourceData.GetString(13),
_idRenderData = SourceData.GetString(14),
tiles = SourceData.GetIntArray(15),
snowTile = SourceData.GetInt(16),
colorMod = SourceData.GetInt(17),
colorType = SourceData.GetString(18),
value = SourceData.GetInt(19),
LV = SourceData.GetInt(20),
chance = SourceData.GetInt(21),
recipeKey = SourceData.GetStringArray(22),
factory = SourceData.GetStringArray(23),
components = SourceData.GetStringArray(24),
defMat = SourceData.GetString(25),
matCategory = SourceData.GetString(26),
category = SourceData.GetString(27),
idRoof = SourceData.GetInt(28),
detail_JP = SourceData.GetString(29),
detail = SourceData.GetString(30)
anime = SourceData.GetIntArray(16),
snowTile = SourceData.GetInt(17),
colorMod = SourceData.GetInt(18),
colorType = SourceData.GetString(19),
value = SourceData.GetInt(20),
LV = SourceData.GetInt(21),
chance = SourceData.GetInt(22),
recipeKey = SourceData.GetStringArray(23),
factory = SourceData.GetStringArray(24),
components = SourceData.GetStringArray(25),
defMat = SourceData.GetString(26),
matCategory = SourceData.GetString(27),
category = SourceData.GetString(28),
idRoof = SourceData.GetInt(29),
detail_JP = SourceData.GetString(30),
detail = SourceData.GetString(31)
};
}SourceThingV โ
public override void OnAfterImportData()
break;
case "skin":
{
string[] array2 = array[1].Split('|');
row.skins = new int[array2.Length];
for (int j = 0; j < array2.Length; j++)
string[] array3 = array[1].Split('|');
row.skins = new int[array3.Length];
for (int k = 0; k < array3.Length; k++)
{
row.skins[j] = array2[j].ToInt();
row.skins[k] = array3[k].ToInt();
}
break;
}
case "alt":
row.altTiles = new int[1] { array[1].ToInt() };
{
string[] array2 = array[1].Split('|');
row.altTiles = new int[array2.Length];
for (int j = 0; j < array2.Length; j++)
{
row.altTiles[j] = array2[j].ToInt();
}
row.ignoreAltFix = true;
break;
}
case "naming":
row.naming = array[1];
break;Thing โ
public override void WriteNote(UINote n, Action<UINote> onWriteNote = null, IIns
}
if (!e.IsGlobalElement)
{
if (e.source.tag.Contains("weaponEnc") && !base.IsEquipmentOrRangedOrAmmo && !base.IsThrownWeapon && !(trait is TraitToolMusic))
bool flag3 = base.IsWeapon || base.IsRangedWeapon || base.IsAmmo || base.IsThrownWeapon || trait is TraitToolMusic;
if (base.IsEquipment && base.category.slot != 35 && source.elementMap.ContainsKey(e.id))
{
flag3 = true;
}
if (e.source.tag.Contains("weaponEnc") && !flag3)
{
return false;
}
if (e.source.IsWeaponEnc && !base.category.IsChildOf("shield") && !base.IsEquipmentOrRangedOrAmmo && !base.IsThrownWeapon && !(trait is TraitToolMusic))
if (e.source.IsWeaponEnc && !(base.category.IsChildOf("shield") || flag3))
{
return false;
}Trait โ
public virtual void OnBarter(bool reroll = false)
Add("sword_zephir", 1, 0).SetReplica(on: true);
Add("ribbon", 1, 0);
Add("helm_sage", 1, 0);
Add("wear_swim_danger", 1, 0);
Add("wear_swim_danger", 1, 1);
NoRestockId("wear_swim_danger", 1, 0);
NoRestockId("wear_swim_danger", 1, 1);
Add("diary_sister", 1, 0);
Add("diary_catsister", 1, 0);
Add("diary_lady", 1, 0);WidgetEquip โ
public override void OnActivate()
Rebuild();
}
public static void OnChangeBodyPart()
{
if ((bool)Instance)
{
Instance.Rebuild();
}
}
public void Rebuild()
{
RefreshEquipment(listMain);