EA 23.255 Nightly Patch 3
January 5, 2026
21 files modified. 4 new files created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
GrowSystem (1)
public virtual void OnRenderTileMap(RenderParam p)
public virtual void OnRenderTileMap(RenderParam p, bool drawShadow = true) TraitFakeBlock (3)
public override void OnCreate(int lv) public override void OnCrafted(Recipe recipe, List<Thing> ings) public override void TrySetHeldAct(ActPlan p) AM_MoveInstalled
public void SetTarget(Card _target)
{
moldCard = target.Duplicate(1);
moldCard.placeState = PlaceState.installed;
moldCard._CreateRenderer();
}
else
{BaseTileMap
public virtual void DrawTile()
fogged = true;
}
}
goto IL_7ba5;
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 (this.cell.effect.IsLiquid)
{
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)
{
if (sourceEffect2.anime.Length > 2)
{
float num3 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
if (!(num3 >= (float)sourceEffect2.anime[0]))
{
param.tile += num3;
}
}
else
{
float num4 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
param.tile += num4;
}
}
if (this.cell.effect.IsFire)
{
rendererEffect.Draw(param);
}
else
{
this.cell.effect.source.renderData.Draw(param);
}
}
}
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
{
critter.Update();
}
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)
{
pass.NextBatch();
}
}
if (detail != null)
{
TransAnime anime3 = detail.anime;
if (anime3 != null && !anime3.animeBlock)
{
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)
{
if (sourceObj.pref.Float)
{
param.y += 0.01f * floatY;
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
}
if (sourceObj.tileType.IsWaterTop)
{
param.liquidLv = 0;
}
else
{
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 (sourceObj.useAltColor)
{
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
}
else
{
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
}
if (sourceObj.HasGrowth)
{
this.cell.growth.OnRenderTileMap(param);
if (this.cell.obj == 118 && Core.fixedFrame % 10f == 0f && sourceObj.growth.IsMature)
{
EMono.scene.psFey.transform.position = new Vector3(param.x, param.y, param.z - 2f);
EMono.scene.psFey.Emit(1);
}
}
else
{
if (this.cell.autotileObj != 0)
{
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 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_7ba5;
goto IL_7b1b;
IL_6f8a:
int num5;
int num3;
if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null)
{
param.tile = num5;
param.tile = num3;
rendererFov.Draw(param);
}
goto IL_6fea;
IL_7ba5:
IL_7b1b:
if (detail.things.Count == 0 && detail.charas.Count == 0)
{
return;
}
int num6 = 0;
int num4 = 0;
thingPos.x = 0f;
thingPos.y = 0f;
thingPos.z = 0f;public virtual void DrawTile()
}
Thing thing = null;
bool shadow = liquidLv == 0;
float num5 = 0f;
float num6 = 0f;
float num7 = 0f;
float num8 = 0f;
float num9 = 0f;
float num10 = 0f;
bool flag6 = false;
float num11 = 0f;
float num9 = 0f;
bool flag7 = false;
float num12 = 0f;
float num10 = 0f;
if (detail.things.Count > 0 && isSeen)
{
_ = zSetting.max1;
float num13 = 0f;
float num11 = 0f;
for (int j = 0; j < detail.things.Count; j++)
{
Thing t = detail.things[j];public virtual void DrawTile()
{
pref = rendererObjDummy.shadowPref;
}
float num14 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
float num12 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height)));
if (t.ignoreStackHeight)
{
thingPos.y -= num7;
thingPos -= altitudeFix * num8;
thingPos.y -= num5;
thingPos -= altitudeFix * num6;
}
shadow = thingPos.y < 0.16f && num12 < 0.16f;
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);public virtual void DrawTile()
SetRoofHeight(param, this.cell, cx, cz);
_actorPos.x = param.x;
_actorPos.y = param.y;
_actorPos.z = param.z + num13;
_actorPos.z = param.z + num11;
if (this.room != null)
{
param.color = GetRoofLight(this.room.lot);public virtual void DrawTile()
else
{
param.snow = snowed;
_actorPos.x = orgX + num10;
_actorPos.x = orgX + num8;
_actorPos.y = orgY;
_actorPos.z = orgZ + num13 + thingPos.z;
_actorPos.z = orgZ + num11 + thingPos.z;
if (tileType.CanStack || !isInstalled)
{
if (thing?.id != t.id)public virtual void DrawTile()
_actorPos.y += thingPos.y;
if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
{
thingPos.y -= num7;
thingPos.y -= num5;
if (thing != null)
{
_actorPos.z -= 0.2f;
thingPos.z -= 0.2f;
}
_actorPos.y -= num7;
_actorPos.y -= num5;
}
_actorPos.z += renderSetting.thingZ + (float)j * -0.01f + zSetting.mod1 * thingPos.y;
}public virtual void DrawTile()
freePos.z += rampFix2.z;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num12 += rampFix2.y;
num10 += rampFix2.y;
}
liquidLv -= (int)(rampFix2.y * 150f);
if (liquidLv < 0)public virtual void DrawTile()
}
else if (!flag7 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
{
orgY += num14 + (float)t.altitude * altitudeFix.y;
orgY += num12 + (float)t.altitude * altitudeFix.y;
orgZ += (float)t.altitude * altitudeFix.z;
freePos.y += num14 + (float)t.altitude * altitudeFix.y;
freePos.y += num12 + (float)t.altitude * altitudeFix.y;
if (!this.cell.IsTopWater || t.altitude > 0)
{
num12 += num14 + (float)t.altitude * altitudeFix.y;
num10 += num12 + (float)t.altitude * altitudeFix.y;
}
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;public virtual void DrawTile()
}
else
{
thingPos.y += num14;
thingPos.y += num12;
if (tileType.UseMountHeight)
{
if (tileType != TileType.Illumination || !this.cell.HasObj)public virtual void DrawTile()
}
else
{
thingPos.y += num14;
thingPos.y += num12;
_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
_actorPos.z += pref.z;
thingPos.z += pref.z;public virtual void DrawTile()
if (t.isFloating && isWater && !hasBridge && !flag)
{
flag = true;
float num15 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num15;
float num13 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num13;
if (!t.trait.IsChangeFloorHeight)
{
num11 = num14;
num9 = num12;
}
_actorPos.y += 0.01f * floatY - num15;
_actorPos.y += 0.01f * floatY - num13;
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;public virtual void DrawTile()
}
param.liquidLv = liquidLv;
}
num7 = num14;
num5 = num12;
if (t.sourceCard.multisize && !t.trait.IsGround)
{
num13 += zSetting.multiZ;
num11 += zSetting.multiZ;
}
orgZ += t.renderer.data.stackZ;
if (param.liquidLv > 0)public virtual void DrawTile()
_actorPos += altitudeFix * t.altitude;
if (!t.isRoofItem)
{
num9 += (float)t.altitude;
num8 = t.altitude;
num7 += (float)t.altitude;
num6 = t.altitude;
}
}
if (num9 >= 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)))
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;
}public virtual void DrawTile()
{
if (iconMode != 0)
{
int num16 = 0;
int num14 = 0;
switch (iconMode)
{
case CardIconMode.Visibility:
if (t.isMasked)
{
num16 = 17;
num14 = 17;
}
break;
case CardIconMode.State:
if (t.placeState == PlaceState.installed)
{
num16 = 18;
num14 = 18;
}
break;
case CardIconMode.Deconstruct:
if (t.isDeconstructing)
{
num16 = 14;
num14 = 14;
}
break;
}
if (t.isNPCProperty && !EMono.debug.godBuild)
{
num16 = 13;
num14 = 13;
}
if (num16 != 0)
if (num14 != 0)
{
passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num16);
passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num14);
}
}
t.SetRenderParam(param);public virtual void DrawTile()
}
if (isInstalled)
{
num10 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
num8 += pref.stackX * (float)((!t.flipX) ? 1 : (-1));
}
param.x = orgX;
param.y = orgY;public virtual void DrawTile()
}
}
}
orgY += num11;
orgY += num9;
if (detail.charas.Count <= 0)
{
return;
}
param.shadowFix = 0f - num12;
param.shadowFix = 0f - num10;
param.color += 1310720f;
float max = zSetting.max2;
for (int k = 0; k < detail.charas.Count; k++)public virtual void DrawTile()
{
Vector3 position = restrainer.owner.renderer.position;
float defCharaHeight = EMono.setting.render.defCharaHeight;
float num17 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height);
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 + num17;
_actorPos.y = position.y + num15;
_actorPos.z = position.z + getRestrainPos.z;
param.liquidLv = 0;
param.shadowFix = orgY - _actorPos.y;public virtual void DrawTile()
{
if (chara.IsDeadOrSleeping && chara.IsPCC)
{
float num18 = chara.renderer.data.size.y * 0.3f;
float num16 = chara.renderer.data.size.y * 0.3f;
if (thingPos.y > max)
{
thingPos.y = max;
}
float num19 = thingPos.y + num18;
float num20 = (float)k * -0.01f;
if (num19 > zSetting.thresh1)
float num17 = thingPos.y + num16;
float num18 = (float)k * -0.01f;
if (num17 > zSetting.thresh1)
{
num20 = zSetting.mod1;
num18 = zSetting.mod1;
}
_actorPos.x += thingPos.x;
_actorPos.y += thingPos.y;
_actorPos.z += renderSetting.laydownZ + num20;
_actorPos.z += renderSetting.laydownZ + num18;
param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
thingPos.y += num18 * 0.8f;
thingPos.y += num16 * 0.8f;
chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
}
elsepublic virtual void DrawTile()
{
if (chara.Pref.FloatUnderwater)
{
float num21 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
float num22 = floatYs[chara.uid % 10] + 10f + (float)(chara.uid % 30);
orgY += 0.01f * num22 - num21;
_actorPos.y += 0.01f * num22 - num21;
param.shadowFix -= 0.01f * num22 - num21;
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)public virtual void DrawTile()
{
if (liquidLv > 20)
{
float num23 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight);
orgY += 0.01f * floatY - num23;
_actorPos.y += 0.01f * floatY - num23;
int num24 = TileType.FloorWaterShallow.LiquidLV * 10;
num24 -= (int)(floatY * 0.5f);
param.liquidLv = num24;
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
{public virtual void DrawTile()
}
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 + ((num6 < 4) ? num6 : 3)];
_actorPos += renderSetting.charaPos[1 + ((num4 < 4) ? num4 : 3)];
}
_actorPos.z += 0.01f * (float)k + renderSetting.charaZ;
num6++;
num4++;
if (flag6)
{
_actorPos.z += chara.renderer.data.hangedFixZ;public virtual void DrawTile()
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 (this.cell.effect.IsLiquid)
{
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)
{
if (sourceEffect2.anime.Length > 2)
{
float num23 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2];
if (!(num23 >= (float)sourceEffect2.anime[0]))
{
param.tile += num23;
}
}
else
{
float num24 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0];
param.tile += num24;
}
}
if (this.cell.effect.IsFire)
{
rendererEffect.Draw(param);
}
else
{
this.cell.effect.source.renderData.Draw(param);
}
}
}
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
{
critter.Update();
}
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)
{
pass.NextBatch();
}
}
if (detail != null)
{
TransAnime anime3 = detail.anime;
if (anime3 != null && !anime3.animeBlock)
{
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)
{
if (sourceObj.pref.Float)
{
param.y += 0.01f * floatY;
if (liquidLv > 10)
{
liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;
}
liquidLv -= (int)(floatY * 0.5f);
param.liquidLv = liquidLv;
}
if (sourceObj.tileType.IsWaterTop)
{
param.liquidLv = 0;
}
else
{
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 (sourceObj.useAltColor)
{
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.altColor, sourceObj.colorMod));
}
else
{
param.matColor = ((sourceObj.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, sourceObj.colorMod));
}
if (sourceObj.HasGrowth)
{
this.cell.growth.OnRenderTileMap(param);
}
else
{
if (this.cell.autotileObj != 0)
{
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 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)
{public virtual void DrawTile()
{
snowed = false;
}
num5 = 0;
num3 = 0;
if (sourceBlock.id != 0)
{
this.tileType = sourceBlock.tileType;public virtual void DrawTile()
}
if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
{
num5 = 1;
num3 = 1;
}
else if (lowBlock)
{
num5 = 2;
num3 = 2;
}
param.mat = matBlock;
param.dir = this.cell.blockDir;Card
public virtual CardRow sourceRenderCard => sourceCard;
public virtual RenderRow TileRow => sourceCard;
public TileType TileType => sourceCard.tileType;
public string Name => GetName(NameStyle.Full);public void SetPlaceState(PlaceState newState, bool byPlayer = false)
{
this.placeState = newState;
}
if (trait is TraitFakeBlock)
if (trait is TraitFakeTile)
{
_CreateRenderer();
} {
if (isDyed)
{
_colorInt = BaseTileMap.GetColorInt(ref DyeMat.matColor, sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref DyeMat.matColor, TileRow.colorMod);
}
else if (isElemental)
{
_colorInt = BaseTileMap.GetColorInt(ref EClass.setting.elements[Chara.MainElement.source.alias].colorSprite, sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref EClass.setting.elements[Chara.MainElement.source.alias].colorSprite, TileRow.colorMod);
}
else
{ }
else if (isDyed)
{
if (sourceRenderCard.useAltColor)
if (TileRow.useAltColor)
{
_colorInt = BaseTileMap.GetColorInt(ref DyeMat.altColor, sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref DyeMat.altColor, TileRow.colorMod);
}
else
{
_colorInt = BaseTileMap.GetColorInt(ref DyeMat.matColor, sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref DyeMat.matColor, TileRow.colorMod);
}
}
else if (sourceRenderCard.useRandomColor)
{
_colorInt = BaseTileMap.GetColorInt(ref GetRandomColor(), sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref GetRandomColor(), TileRow.colorMod);
}
else if (sourceRenderCard.useAltColor)
{
_colorInt = BaseTileMap.GetColorInt(ref material.altColor, sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref material.altColor, TileRow.colorMod);
}
else
{
_colorInt = BaseTileMap.GetColorInt(ref material.matColor, sourceRenderCard.colorMod);
_colorInt = BaseTileMap.GetColorInt(ref material.matColor, TileRow.colorMod);
}
}public ref Color GetRandomColor()
public virtual Sprite GetSprite(int dir = 0)
{
if (trait is TraitFakeTile)
{
if (trait is TraitFakeBlock)
{
return EClass.sources.blocks.map[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
}
return EClass.sources.objs.map[refVal].GetSprite(dir, trait.IdSkin, (IsInstalled && pos != null && pos.IsValid && pos.cell.IsSnowTile) ? true : false);
}
if (trait is TraitAbility)
{
return (trait as TraitAbility).CreateAct()?.GetSprite() ?? EClass.core.refs.icons.defaultAbility;public virtual void Rotate(bool reverse = false)
{
num = 2;
}
if (trait is TraitFakeObj)
{
num = (trait as TraitFakeObj).GetMaxDir();
}
if (reverse)
{
dir--;CardRenderer
public Vector3 PositionCenter()
public virtual void SetOwner(Card c)
{
owner = c;
if (owner.trait is TraitFakeBlock)
if (data == null)
{
data = EClass.sources.blocks.map[owner.refVal].renderData;
}
else if (data == null)
{
data = owner.sourceCard.renderData;
data = owner.trait.GetRenderData() ?? owner.sourceCard.renderData;
}
isChara = c.isChara;
usePass = data.pass != null;public override void Draw(RenderParam p, ref Vector3 v, bool drawShadow)
{
anime.Update();
}
if (owner.trait is TraitFakeObj)
{
TraitFakeObj traitFakeObj = owner.trait as TraitFakeObj;
if (traitFakeObj.growth != null)
{
traitFakeObj.growth?.OnRenderTileMap(p, owner.IsInstalled && owner.altitude == 0 && owner.pos.FirstThing == owner);
return;
}
}
if (!isChara && !owner.IsInstalled && owner.category.tileDummy != 0 && !owner.isRoofItem && owner.ExistsOnMap && owner.trait.UseDummyTile)
{
SubPassData.Current = SubPassData.Default;Chara
public void Cure(CureType type, int p = 100, BlessedState state = BlessedState.N
}
CureCondition<ConWait>();
CureCondition<ConDisease>((EClass.rnd(20) + 10) * p / 100);
bool flag3 = HasCondition<ConAnorexia>();
base.c_vomit -= (flag3 ? 3 : 2) * p / 100;
bool flag2 = HasCondition<ConAnorexia>();
base.c_vomit -= (flag2 ? 3 : 2) * p / 100;
if (base.c_vomit < 0)
{
base.c_vomit = 0;
if (flag3)
if (flag2)
{
RemoveCondition<ConAnorexia>();
}public void Cure(CureType type, int p = 100, BlessedState state = BlessedState.N
case CureType.Death:
case CureType.Jure:
case CureType.Boss:
case CureType.Unicorn:
{
bool flag2 = type == CureType.Death;
CureTempElements(p * 100, body: true, mind: true);
for (int num = conditions.Count - 1; num >= 0; num--)
{
Condition condition = conditions[num];
if (condition is ConAnorexia && !flag2)
if (condition is ConAnorexia && type != CureType.Death && type != CureType.Unicorn && type != CureType.Jure)
{
continue;
}public void Cure(CureType type, int p = 100, BlessedState state = BlessedState.N
condition.Kill();
continue;
case ConditionType.Stance:
if (flag2)
if (type == CureType.Death)
{
condition.Kill();
continue;
}
break;
}
if (flag2 && condition.isPerfume)
if (type == CureType.Death && condition.isPerfume)
{
condition.Kill();
}
}
CureCondition<ConWait>();
CureCondition<ConSleep>();
if (flag2 || type == CureType.Boss)
switch (type)
{
case CureType.Death:
case CureType.Boss:
case CureType.Unicorn:
SAN.Mod(-20);
RemoveCondition<ConBrightnessOfLife>();
}
if (type == CureType.Jure)
{
break;
case CureType.Jure:
SAN.Mod(-999);
if (HasElement(1206))
{
SetFeat(1206, 0, msg: true);
}
break;
case CureType.CureBody:
case CureType.CureMind:
case CureType.Prayer:
break;
}
break;
}public bool MutateRandom(int vec = 0, int tries = 100, bool ether = false, Bless
SourceElement.Row row = ie.RandomItem();
if (i == 0 && vec < 0 && ether && base.c_corruptionHistory != null && base.c_corruptionHistory.Count > 0)
{
row = EClass.sources.elements.map[base.c_corruptionHistory.LastItem()];
if (EClass.sources.elements.map.ContainsKey(base.c_corruptionHistory.LastItem()))
{
row = EClass.sources.elements.map[base.c_corruptionHistory.LastItem()];
}
base.c_corruptionHistory.RemoveAt(base.c_corruptionHistory.Count - 1);
if (base.c_corruptionHistory.Count == 0)
{CureType
CureMind,
Jure,
Prayer,
Boss
Boss,
Unicorn
}Game
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using Newtonsoft.Json;
using UnityEngine; global2.phase = 0;
}
}
foreach (KeyValuePair<int, Spatial> item7 in EClass.game.spatials.map.ToList())
{
if (item7.Value == null)
{
EClass.game.spatials.map.Remove(item7.Key);
}
}
void TryAddQuest(string idQuest, string idReqQuest)
{
if (quests.completedIDs.Contains(idReqQuest) && !quests.completedIDs.Contains(idQuest) && quests.GetGlobal(idQuest) == null && quests.Get(idQuest) == null)GrowSystem
public virtual int GetShadow(int index)
return -1;
}
public virtual void OnRenderTileMap(RenderParam p)
public virtual void OnRenderTileMap(RenderParam p, bool drawShadow = true)
{
int num = cell.objVal / 30;
currentStage = stages[num];public virtual void OnRenderTileMap(RenderParam p)
}
p.y = y;
p.z = z;
if (num >= ShadowStage)
if (cell.obj == 118 && Core.fixedFrame % 10f == 0f && IsMature)
{
EClass.scene.psFey.transform.position = new Vector3(p.x, p.y, p.z - 2f);
EClass.scene.psFey.Emit(1);
}
if (drawShadow && num >= ShadowStage)
{
int shadow = GetShadow(num);
if (shadow == -1)RankedZoneManager
public List<RankedZone> GetList()
List<RankedZone> list = new List<RankedZone>();
foreach (Spatial z in EClass.game.spatials.map.Values)
{
if ((z.source.value <= 0 || z.lv != 0) && !z.IsPlayerFaction)
if ((z == null || z.source.value <= 0 || z.lv != 0) && !z.IsPlayerFaction)
{
continue;
}RecipeCard
_mold.dir = _dir;
_mold.altitude = ActionMode.Build.altitude;
_mold.idSkin = idSkin;
_mold._CreateRenderer();
return _mold;
}SerializedCards
public void Restore(Map map, Map orgMap, bool addToZone, PartialMap partial = nu
card2.Chara.ScaleByPrincipal();
}
}
if (card2.trait is TraitFakeBlock)
if (card2.trait is TraitFakeTile)
{
card2._CreateRenderer();
}TaskHarvest
public string GetIdDismantled()
public bool ShouldGenerateDismantled(string dest)
{
if (target.trait is TraitFakeBlock)
if (target.trait is TraitFakeTile)
{
return false;
}Thing
public override SourcePref Pref
{
get
{
if (trait is TraitFakeBlock)
SourcePref pref = trait.GetPref();
if (pref == null)
{
TileType tileType = EClass.sources.blocks.map[base.refVal].tileType;
if (tileType is TileTypePillar)
if (source.origin == null || source.pref.UsePref)
{
return EClass.core.refs.prefs.blockPillar;
return source.pref;
}
if (tileType is TileTypeFence)
{
return EClass.core.refs.prefs.blockFence;
}
if (tileType is TileTypeStairs)
{
return EClass.core.refs.prefs.blockStairs;
}
if (tileType is TileTypeWall)
{
return EClass.core.refs.prefs.blockWall;
}
if (tileType is TileTypeSlope)
{
return EClass.core.refs.prefs.blockStairs;
}
}
if (source.origin == null || source.pref.UsePref)
{
return source.pref;
pref = source.origin.pref;
}
return source.origin.pref;
return pref;
}
}public override int SelfWeight
}
}
public override int[] Tiles => sourceCard._tiles;
public override int[] Tiles => TileRow._tiles;
public override RenderRow TileRow
{
get
{
if (trait is TraitFakeTile)
{
if (trait is TraitFakeBlock)
{
return EClass.sources.blocks.map[base.refVal];
}
return EClass.sources.objs.map[base.refVal];
}
return base.TileRow;
}
}
public bool CanSearchContents
{public override void SetRenderParam(RenderParam p)
break;
case Trait.TileMode.FakeBlock:
{
p.color += 1572864f;
SourceBlock.Row row = EClass.sources.blocks.map[base.refVal];
SourceBlock.Row row2 = EClass.sources.blocks.map[base.refVal];
p.tile = row2._tiles[base.dir % row2._tiles.Length];
if (row2.tileType.IsFullBlock)
{
p.color += 1572864f;
}
break;
}
case Trait.TileMode.FakeObj:
{
SourceObj.Row row = EClass.sources.objs.map[base.refVal];
p.tile = row._tiles[base.dir % row._tiles.Length];
break;
}Trait
Illumination,
DefaultNoAnime,
SignalAnime,
FakeBlock
FakeBlock,
FakeObj
}
public enum CopyShopTypepublic int GetParamInt(int i, int def)
return def;
}
public virtual SourcePref GetPref()
{
return null;
}
public virtual RenderData GetRenderData()
{
return null;
}
public virtual bool Contains(RecipeSource r)
{
return r.idFactory == ((owner.sourceCard.origin != null) ? owner.sourceCard.origin.id : owner.id);TraitFakeBlock
using System.Collections.Generic;
using System.Collections.Generic;
public class TraitFakeBlock : Trait
public class TraitFakeBlock : TraitFakeTile
{
public override TileMode tileMode => TileMode.FakeBlock;
public override void OnCreate(int lv)
{
if (owner.refVal == 0)
{
owner.refVal = 1;
}
}
public override void OnCrafted(Recipe recipe, List<Thing> ings)
{
if (ings == null || ings.Count == 0)
{
owner.refVal = 1;
return;
}
TraitBlock traitBlock = ings[0].trait as TraitBlock;
owner.refVal = traitBlock.source.id;
}
public override void TrySetHeldAct(ActPlan p)
{
if (p.pos.cell._block != 0 && !p.pos.sourceBlock.ContainsTag("noFake"))
{
p.TrySetAct("actCopyBlock", delegate
{
owner.Dye(p.pos.matBlock);
owner.refVal = p.pos.sourceBlock.id;
SE.Play("offering");
owner._CreateRenderer();
HotItemHeld.recipe = GetRecipe();
return false;
});
}
}
}+TraitFakeObj
File Created
public class TraitFakeObj : TraitFakeTile
{
public Cell cell = new Cell();
public GrowSystem growth
{
get
{
if (!obj.HasGrowth)
{
return null;
}
GrowSystem.cell = cell;
cell.objVal = (byte)(owner.dir % obj.growth.StageLength * 30);
cell.objDir = owner.dir;
cell.obj = (byte)owner.refVal;
return obj.growth;
}
}
public SourceObj.Row obj => EClass.sources.objs.map[owner.refVal];
public override TileMode tileMode => TileMode.FakeObj;
public override RenderData GetRenderData()
{
return obj.renderData;
}
public override SourcePref GetPref()
{
return obj.pref;
}
public int GetMaxDir()
{
if (growth != null && !(growth is GrowSystemTreeCoralwood))
{
return growth.StageLength;
}
return obj._tiles.Length;
}
}+TraitFakeTile
File Created
using System.Collections.Generic;
public class TraitFakeTile : Trait
{
public override TileMode tileMode => TileMode.FakeBlock;
public override RenderData GetRenderData()
{
return EClass.sources.blocks.map[owner.refVal].renderData;
}
public override SourcePref GetPref()
{
TileType tileType = EClass.sources.blocks.map[owner.refVal].tileType;
if (!(tileType is TileTypePillar))
{
if (!(tileType is TileTypeFence))
{
if (!(tileType is TileTypeStairs))
{
if (!(tileType is TileTypeWall))
{
if (tileType is TileTypeSlope)
{
return EClass.core.refs.prefs.blockStairs;
}
return null;
}
return EClass.core.refs.prefs.blockWall;
}
return EClass.core.refs.prefs.blockStairs;
}
return EClass.core.refs.prefs.blockFence;
}
return EClass.core.refs.prefs.blockPillar;
}
public override void OnCrafted(Recipe recipe, List<Thing> ings)
{
owner.refVal = 0;
if (this is TraitFakeBlock && ings != null && ings.Count > 0)
{
TraitBlock traitBlock = ings[0].trait as TraitBlock;
owner.refVal = traitBlock.source.id;
}
}
public override void TrySetHeldAct(ActPlan p)
{
if (this is TraitFakeBlock)
{
if (p.pos.cell._block == 0)
{
return;
}
}
else if (p.pos.cell.obj == 0)
{
return;
}
TileRow source = ((this is TraitFakeBlock) ? ((TileRow)p.pos.sourceBlock) : ((TileRow)p.pos.sourceObj));
SourceMaterial.Row mat = ((this is TraitFakeBlock) ? p.pos.matBlock : p.pos.cell.matObj);
if (!source.ContainsTag("noFake"))
{
p.TrySetAct("actCopyBlock", delegate
{
owner.Dye(mat);
owner.refVal = source.id;
SE.Play("offering");
owner._CreateRenderer();
HotItemHeld.recipe = GetRecipe();
LayerInventory.SetDirty(owner.Thing);
return false;
});
}
}
}TraitHouseBoard
public override void TrySetAct(ActPlan p)
{
if (!EClass.debug.enable && !EClass._zone.IsPCFaction)
if (!EClass.debug.enable && !EClass._zone.IsPCFactionOrTent)
{
return;
}TraitRoomPlate
public override void TrySetAct(ActPlan p)
{
if ((!EClass.debug.enable && !EClass._zone.IsPCFaction) || !owner.IsInstalled || owner.pos.cell.room == null)
if ((!EClass.debug.enable && !EClass._zone.IsPCFactionOrTent) || !owner.IsInstalled || owner.pos.cell.room == null)
{
return;
}+TraitSyringe
File Created
public class TraitSyringe : Trait
{
public override bool CanChangeHeight => false;
public void EffectInject(Chara cc, Chara tc)
{
cc.PlaySound("syringe");
cc.Say("syringe", cc, tc, owner.NameOne);
tc.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[tc.material.alias].main).Emit(20);
tc.AddBlood(2 + EClass.rnd(2));
}
}TraitSyringeBlood
public class TraitSyringeBlood : TraitTicketChampagne.TraitSyringe
public class TraitSyringeBlood : TraitTicketChampagne.TraitSyringe
public class TraitSyringeBlood : TraitSyringe
{
public override void TrySetHeldAct(ActPlan p)
{public override void TrySetHeldAct(ActPlan p)
{
p.TrySetAct("actInject".lang("", c.Name), delegate
{
EClass.pc.PlaySound("syringe");
EClass.pc.Say("syringe", EClass.pc, c, owner.NameOne);
c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[c.material.alias].main).Emit(20);
c.AddBlood(2 + EClass.rnd(2));
EffectInject(EClass.pc, c);
EClass.pc.PickOrDrop(EClass.pc.pos, CraftUtil.MakeBloodSample(EClass.pc, c));
owner.ModNum(-1);
return false;
return true;
}, c);
});
}TraitSyringeGene
public class TraitSyringeGene : TraitTicketChampagne.TraitSyringe
public class TraitSyringeGene : TraitTicketChampagne.TraitSyringe
public class TraitSyringeGene : TraitSyringe
{
public override void TrySetHeldAct(ActPlan p)
{public override void TrySetHeldAct(ActPlan p)
{
p.TrySetAct("actInject".lang("", c.Name), delegate
{
EClass.pc.PlaySound("syringe");
EClass.pc.Say("syringe", EClass.pc, c, owner.NameOne);
c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[c.material.alias].main).Emit(20);
c.AddBlood(2 + EClass.rnd(2));
EffectInject(EClass.pc, c);
c.AddCondition<ConHallucination>(50);
TraitGeneMachine traitGeneMachine = c.pos.FindThing<TraitGeneMachine>();
if (traitGeneMachine != null && traitGeneMachine.GetTarget() == c)public override void TrySetHeldAct(ActPlan p)
c.ModCorruption(-50);
}
owner.ModNum(-1);
return false;
return true;
}, c);
});
}TraitSyringeHeaven
public class TraitSyringeHeaven : TraitTicketChampagne.TraitSyringe
public class TraitSyringeHeaven : TraitTicketChampagne.TraitSyringe
public class TraitSyringeHeaven : TraitSyringe
{
public override void TrySetHeldAct(ActPlan p)
{public override void TrySetHeldAct(ActPlan p)
{
p.TrySetAct("actInject".lang("", c.Name), delegate
{
EClass.pc.PlaySound("syringe");
EClass.pc.Say("syringe", EClass.pc, c, owner.NameOne);
c.PlayEffect("blood").SetParticleColor(EClass.Colors.matColors[c.material.alias].main).Emit(20);
c.AddBlood(2 + EClass.rnd(2));
EffectInject(EClass.pc, c);
c.AddCondition<ConHallucination>(50);
if ((c.trait is TraitLittleOne) & !c.HasCondition<ConDeathSentense>())
{public override void TrySetHeldAct(ActPlan p)
c.AddCondition<ConDeathSentense>(100, force: true);
}
owner.ModNum(-1);
return false;
return true;
}, c);
});
}+TraitSyringeUnicorn
File Created
public class TraitSyringeUnicorn : TraitSyringe
{
public override void TrySetHeldAct(ActPlan p)
{
p.pos.Charas.ForEach(delegate(Chara c)
{
p.TrySetAct("actInject".lang("", c.Name), delegate
{
EffectInject(EClass.pc, c);
c.PlayEffect("heal");
c.PlaySound("heal_tick");
c.CureHost(CureType.Unicorn, 100, owner.blessedState);
owner.ModNum(-1);
return true;
}, c);
});
}
}TraitTicketChampagne
public class TraitTicketChampagne : TraitTicketMassage
public class TraitTicketChampagne : TraitTicketMassage
{
public class TraitSyringe : Trait
{
public override bool CanChangeHeight => false;
}
}