Skip to content

EA 23.74 Hotfix 4

January 7, 2025

35 files modified.

Important Changes

Possible breaking changes. Click the filename to view the chunk.

Game (1)

cs
public void Save(bool isAutoSave = false, Action onComplete = null, bool silent = false) 
public bool Save(bool isAutoSave = false, bool silent = false) 

ACT

@@ -45,6 +45,10 @@ public static Act Create(string id)

cs

	public static Act Create(SourceElement.Row row)
	{
		if (row == null) 
		{ 
			row = EClass.sources.elements.alias["AI_SelfHarm"]; 
		} 
		Act act = ClassCache.Create<Act>(row.type.IsEmpty(row.alias), "Elin") ?? new Act();
		if (act != null)
		{

AM_MoveInstalled

@@ -305,6 +305,19 @@ public override void OnProcessTiles(Point point, int dir)

cs
			{
				target.SetPlaceState(PlaceState.roaming);
			}
			if (!target.isRoofItem) 
			{ 
				target.ForeachPoint(delegate(Point p, bool center) 
				{ 
					if (p.IsBlocked && p.HasChara) 
					{ 
						foreach (Chara item in p.ListCharas()) 
						{ 
							EClass.pc.Kick(item, ignoreSelf: true, karmaLoss: false, show: false); 
						} 
					} 
				}); 
			} 
		}
		SE.Click();
		if (target.renderer.hasActor)

ActEffect

@@ -307,10 +307,14 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
			}
			num4 = num4 * Act.powerMod / 100;
			c.DamageHP(num4, e.id, power * num / 100, AttackSource.None, chara ?? CC);
			if (c.IsAliveInCurrentZone && CC.IsAliveInCurrentZone && id == EffectId.DrainMana && c.isChara && CC.isChara) 
			if (c.IsAliveInCurrentZone && CC.IsAliveInCurrentZone && id == EffectId.DrainMana && c.isChara && CC.isChara && c.Chara.mana.value > 0) 
			{
				int num6 = num4 * power * num / 10000; 
				int num6 = num4 * num / 100; 
				Debug.Log(num4 + " v:" + num6 + " evalue:" + e.Value + " power:" + power + " elepMod:" + num);
				if (num6 > c.Chara.mana.value) 
				{ 
					num6 = c.Chara.mana.value; 
				} 
				c.Chara.mana.Mod(-num6);
				CC.Chara.mana.Mod(num6);
			}

ActMelee

@@ -153,11 +153,7 @@ public bool Attack(float dmgMulti = 1f, bool maxRoll = false)

cs
			{
				if (!item.Equals(obj))
				{
					Chara firstChara = item.FirstChara; 
					if (firstChara != null && firstChara.IsHostile(Act.CC)) 
					{ 
						Attack(item.FirstChara, item); 
					} 
					item.FirstChara?.IsHostile(Act.CC); 
				}
			}
		}

@@ -183,7 +179,6 @@ void Attack(Card _tc, Point _tp)

cs
					{
						Act act = Act.CC.elements.GetElement(traitAmmoTalisman.owner.refVal)?.act ?? ACT.Create(traitAmmoTalisman.owner.refVal);
						Act.powerMod = traitAmmo.owner.encLV;
						Card tC = Act.TC; 
						if (act.Perform(Act.CC, Act.TC, Act.TP))
						{
							usedTalisman = true;

@@ -191,7 +186,6 @@ void Attack(Card _tc, Point _tp)

cs
							int spellExp = Act.CC.elements.GetSpellExp(Act.CC, act, 200);
							Act.CC.ModExp(act.id, spellExp);
						}
						Act.TC = tC; 
						Act.powerMod = 100;
					}
				}

@@ -210,6 +204,7 @@ void Attack(Card _tc, Point _tp)

cs
					LayerInventory.SetDirty(w);
				}
			}
			Act.TC = _tc; 
			Act.CC.DoHostileAction(Act.TC);
		}
	}

ActionMode

@@ -704,7 +704,7 @@ public void UpdateInput()

cs
	if (EClass.ui.currentDrag != null)
	{
		EClass.ui.OnDrag();
		if (EInput.leftMouse.down || EInput.rightMouse.down) 
		if (EInput.leftMouse.down || EInput.rightMouse.down || EInput.isCancel) 
		{
			if (Input.GetMouseButton(0) && EInput.rightMouse.down)
			{

@@ -712,7 +712,7 @@ public void UpdateInput()

cs
			}
			else
			{
				EClass.ui.EndDrag(EInput.rightMouse.down); 
				EClass.ui.EndDrag(EInput.rightMouse.down || EInput.isCancel); 
			}
		}
	}

BaseListPeople

@@ -196,7 +196,8 @@ void AddText(Hobby h, string lang)

cs
				{
					SourceElement.Row row = EClass.sources.elements.map[h.source.elements[j]];
					int num2 = h.source.elements[j + 1];
					P_2.t.note.AddText("NoteText_small", "・ " + "workBonus_skill".lang(row.GetName().ToTitleCase(), ((num2 > 0) ? "+" : "") + ((num2 < 0) ? (num2 / 10) : Mathf.Max(1, num2 * h.GetEfficiency(a) / 1000))) + ((row.id == 2115 || row.id == 2207) ? (" " + "fixedFactionSkill".lang()) : ""), (num2 >= 0) ? FontColor.Default : FontColor.Bad); 
					int num3 = ((num2 < 0 || row.id == 2115 || row.id == 2207) ? (num2 / 10) : Mathf.Max(0, num2 * h.GetEfficiency(a) * a.homeBranch.efficiency / 100 / 1000)); 
					P_2.t.note.AddText("NoteText_small", "・ " + "workBonus_skill".lang(row.GetName().ToTitleCase(), ((num2 > 0) ? "+" : "") + num3) + ((row.id == 2115 || row.id == 2207) ? (" " + "fixedFactionSkill".lang()) : ""), (num2 >= 0) ? FontColor.Default : FontColor.Bad); 
				}
			}
			string[] array2 = h.source.GetDetail().SplitNewline();

BaseTileMap

@@ -1254,11 +1254,238 @@ public virtual void DrawTile()

cs
			fogged = true;
		}
	}
	goto IL_7aa2; 
	goto IL_7aaf; 
	IL_6f7f: 
	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); 
			} 
			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_7aaf; 
	IL_6f1f: 
	int num5; 
	if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null) 
	{ 
		param.tile = num5; 
		rendererFov.Draw(param); 
	} 
	goto IL_6f7f; 
	IL_1668:
	if (this.cell.isSlopeEdge)
	{
		float num3 = (float)height * _heightMod.y; 
		float num6 = (float)height * _heightMod.y; 
		orgY = param.y;
		orgZ = param.z;
		param.dir = this.cell.blockDir;

@@ -1288,17 +1515,17 @@ public virtual void DrawTile()

cs
				param.matColor = 104025f;
			}
		}
		for (int j = 0; (float)j < num3 / heightBlockSize; j++) 
		for (int j = 0; (float)j < num6 / 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; 
				float num7 = param.tile; 
				param.tile = 0f;
				rendererFov.Draw(param);
				param.tile = num4; 
				param.tile = num7; 
			}
		}
		param.y = orgY;

@@ -1309,29 +1536,29 @@ public virtual void DrawTile()

cs
	{
		orgY = param.y;
		orgZ = param.z;
		int num5 = 0; 
		int num8 = 0; 
		if (sourceBlock.tileType.IsFullBlock)
		{
			SourceBlock.Row row3 = sourceBlock;
			num5 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
			num8 = sourceBlock._tiles[this.cell.blockDir % sourceBlock._tiles.Length]; 
		}
		else
		{
			SourceBlock.Row row3 = sourceFloor._defBlock;
			num5 = row3._tiles[this.cell.blockDir % row3._tiles.Length]; 
			num8 = 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); 
			param.tile = num8 + ((!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); 
			param.tile = num8 + ((!this.cell.Right.sourceFloor.tileType.IsDeepWater) ? 3000000 : 0); 
			rendererWaterBlock.Draw(param);
		}
		param.y = orgY;

@@ -1429,20 +1656,20 @@ public virtual void DrawTile()

cs
				}
				sourceFloor.renderData.Draw(param);
			}
			int num6 = 0; 
			int num9 = 0; 
			if (isSnowCovered && sourceFloor == FLOOR.sourceSnow && !this.cell.hasDoor)
			{
				if (!this.cell.Right.IsSnowTile && this.cell.Right.topHeight == this.cell.topHeight)
				{
					num6++; 
					num9++; 
				}
				if (!this.cell.Front.IsSnowTile && this.cell.Front.topHeight == this.cell.topHeight)
				{
					num6 += 2; 
					num9 += 2; 
				}
				if (num6 != 0) 
				if (num9 != 0) 
				{
					param.tile = 448 + num6 + 12; 
					param.tile = 448 + num9 + 12; 
					param.z -= 0.1f;
					sourceFloor.renderData.Draw(param);
					param.z += 0.1f;

@@ -1513,7 +1740,7 @@ public virtual void DrawTile()

cs
					}
				}
			}
			if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num6 == 0) 
			if (this.cell.autotile != 0 && sourceFloor.autotile != 0 && (!hasBridge || this.cell.bridgeHeight - this.cell.height > 3) && !this.cell.skipRender && num9 == 0) 
			{
				pass = (isWater ? passAutoTileWater : passAutoTile);
				batch = pass.batches[pass.batchIdx];

@@ -1532,16 +1759,16 @@ public virtual void DrawTile()

cs
		}
		if (isWater)
		{
			int num7 = 12; 
			int num8 = this.cell.shore / num7; 
			int num9 = this.cell.shore % num7; 
			int num10 = 12; 
			int num11 = this.cell.shore / num10; 
			int num12 = this.cell.shore % num10; 
			bool isShoreSand = this.cell.isShoreSand;
			if (this.cell.shore != 0)
			{
				Cell cell = ((((uint)num8 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num8 & 2u) != 0) ? this.cell.Right : ((((uint)num8 & 4u) != 0) ? this.cell.Front : this.cell.Left))); 
				Cell cell = ((((uint)num11 & (true ? 1u : 0u)) != 0) ? this.cell.Back : ((((uint)num11 & 2u) != 0) ? this.cell.Right : ((((uint)num11 & 4u) != 0) ? this.cell.Front : this.cell.Left))); 
				if (isShoreSand && !cell.sourceFloor.isBeach)
				{
					cell = ((((uint)num8 & 8u) != 0) ? this.cell.Left : ((((uint)num8 & 4u) != 0) ? this.cell.Front : ((((uint)num8 & 2u) != 0) ? this.cell.Right : this.cell.Back))); 
					cell = ((((uint)num11 & 8u) != 0) ? this.cell.Left : ((((uint)num11 & 4u) != 0) ? this.cell.Front : ((((uint)num11 & 2u) != 0) ? this.cell.Right : this.cell.Back))); 
				}
				if (!cell.IsSnowTile)
				{

@@ -1553,7 +1780,7 @@ public virtual void DrawTile()

cs
						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 / num7; 
						batch.tiles[pass.idx] = 768 + this.cell.shore / num10; 
						batch.colors[pass.idx] = param.color;
						batch.matColors[pass.idx] = param.matColor;
						pass.idx++;

@@ -1561,38 +1788,38 @@ public virtual void DrawTile()

cs
						{
							pass.NextBatch();
						}
						num9 = 2; 
						num12 = 2; 
					}
					else
					{
						num9 = cell.sourceFloor.edge; 
						num12 = cell.sourceFloor.edge; 
					}
					param.tile = (24 + num9 / 2) * 32 + num9 % 2 * 16 + num8; 
					param.tile = (24 + num12 / 2) * 32 + num12 % 2 * 16 + num11; 
					rendererShore.Draw(param);
				}
			}
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num7) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num7) & (true ? 1u : 0u)) != 0) 
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num10) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num10) & (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 / num7) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num7) & (true ? 1u : 0u)) != 0) 
			if (this.cell.Back.isShoreSand && ((uint)(this.cell.Back.shore / num10) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num10) & (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 / num7) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num7) & 4u) != 0) 
			if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num10) & 2u) != 0 && this.cell.Right.isShoreSand && ((uint)(this.cell.Right.shore / num10) & 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 / num7) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num7) & 4u) != 0) 
			if (this.cell.Front.isShoreSand && ((uint)(this.cell.Front.shore / num10) & 8u) != 0 && this.cell.Left.isShoreSand && ((uint)(this.cell.Left.shore / num10) & 4u) != 0) 
			{
				param.tile = 788f;
				param.matColor = GetColorInt(ref this.cell.FrontLeft.matFloor.matColor, this.cell.FrontLeft.sourceFloor.colorMod);

@@ -1618,27 +1845,27 @@ public virtual void DrawTile()

cs
			bool flag6 = false;
			if (isShoreSand)
			{
				if (((uint)num8 & (true ? 1u : 0u)) != 0) 
				if (((uint)num11 & (true ? 1u : 0u)) != 0) 
				{
					if (((uint)num8 & 8u) != 0) 
					if (((uint)num11 & 8u) != 0) 
					{
						Draw(16);
						flag6 = true;
					}
					if (((uint)num8 & 2u) != 0) 
					if (((uint)num11 & 2u) != 0) 
					{
						Draw(20);
						flag6 = true;
					}
				}
				if (((uint)num8 & 4u) != 0) 
				if (((uint)num11 & 4u) != 0) 
				{
					if (((uint)num8 & 8u) != 0) 
					if (((uint)num11 & 8u) != 0) 
					{
						Draw(24);
						flag6 = true;
					}
					if (((uint)num8 & 2u) != 0) 
					if (((uint)num11 & 2u) != 0) 
					{
						Draw(28);
						flag6 = true;

@@ -1664,7 +1891,7 @@ public virtual void DrawTile()

cs
					batch = pass.batches[pass.batchIdx];
					batch.tiles[pass.idx] = 608 + waterAnimeIndex % 4;
					batch.matColors[pass.idx] = 104025f;
					if (((uint)(this.cell.shore / num7) & (true ? 1u : 0u)) != 0) 
					if (((uint)(this.cell.shore / num10) & (true ? 1u : 0u)) != 0) 
					{
						if (isShoreSand)
						{

@@ -1702,7 +1929,7 @@ public virtual void DrawTile()

cs
					batch = pass.batches[pass.batchIdx];
					batch.tiles[pass.idx] = 612 + waterAnimeIndex % 4;
					batch.matColors[pass.idx] = 104025f;
					if (((uint)(this.cell.shore / num7) & 8u) != 0) 
					if (((uint)(this.cell.shore / num10) & 8u) != 0) 
					{
						if (isShoreSand)
						{

@@ -1818,16 +2045,16 @@ public virtual void DrawTile()

cs
			param.z += bridgeFix.z;
			param.dir = 0;
			SourceBlock.Row row4 = sourceBridge._bridgeBlock;
			float num10 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y; 
			float num13 = (float)(this.cell.bridgeHeight - this.cell.height) * _heightMod.y; 
			if (this.cell.sourceFloor.tileType == TileType.Sky)
			{
				num10 += (float)EMono._map.config.skyBlockHeight; 
				num13 += (float)EMono._map.config.skyBlockHeight; 
			}
			int num11 = (int)(num10 / heightBlockSize) + 2; 
			int num14 = (int)(num13 / heightBlockSize) + 2; 
			if (this.cell.bridgePillar != 0)
			{
				row4 = EMono.sources.blocks.rows[this.cell.bridgePillar];
				param.tile = row4._tiles[0] + ((num11 == 2) ? 32 : 0); 
				param.tile = row4._tiles[0] + ((num14 == 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));
			}

@@ -1839,9 +2066,9 @@ public virtual void DrawTile()

cs
			}
			param.y += ugFixBridgeTop.y;
			param.z += ugFixBridgeTop.z;
			for (int l = 0; l < num11; l++) 
			for (int l = 0; l < num14; l++) 
			{
				if (l == num11 - 1) 
				if (l == num14 - 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;

@@ -1873,7 +2100,7 @@ public virtual void DrawTile()

cs
	{
		snowed = false;
	}
	int num12 = 0; 
	num5 = 0; 
	if (sourceBlock.id != 0)
	{
		this.tileType = sourceBlock.tileType;

@@ -1946,8 +2173,8 @@ public virtual void DrawTile()

cs
					roomHeight = 0f;
					break;
				}
				int num13 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight); 
				roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num13) ? this.room.lot.height : num13) + 0.01f * (float)this.room.lot.heightFix; 
				int num15 = ((this.room.data.maxHeight == 0) ? 2 : this.room.data.maxHeight); 
				roomHeight = EMono.setting.render.roomHeightMod * (float)((this.room.lot.height < num15) ? this.room.lot.height : num15) + 0.01f * (float)this.room.lot.heightFix; 
			}
			break;
		case WallClipMode.ByLot:

@@ -1993,11 +2220,11 @@ public virtual void DrawTile()

cs
		}
		if (!_lowblock && (double)roomHeight > 1.2 && this.tileType.RepeatBlock)
		{
			num12 = 1; 
			num5 = 1; 
		}
		else if (lowBlock)
		{
			num12 = 2; 
			num5 = 2; 
		}
		param.mat = matBlock;
		param.dir = this.cell.blockDir;

@@ -2044,8 +2271,8 @@ public virtual void DrawTile()

cs
				}
				if (!_lowblock)
				{
					int num14 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight); 
					roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num14) ? currentRoom.lot.height : num14) + 0.01f * (float)currentRoom.lot.heightFix; 
					int num16 = ((currentRoom.data.maxHeight == 0) ? 2 : currentRoom.data.maxHeight); 
					roomHeight = EMono.setting.render.roomHeightMod * (float)((currentRoom.lot.height < num16) ? currentRoom.lot.height : num16) + 0.01f * (float)currentRoom.lot.heightFix; 
				}
			}
			if (flag7)

@@ -2099,12 +2326,12 @@ public virtual void DrawTile()

cs
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2);
					param.matColor = room.lot.colDeco2;
					float y2 = param.y;
					float num15 = param.z; 
					float num17 = param.z; 
					param.y += (float)room.lot.decoFix2 * 0.01f;
					param.z += (float)room.lot.decoFix2 * 0.01f * heightModDeco;
					rendererWallDeco.Draw(param);
					param.y = y2;
					param.z = num15; 
					param.z = num17; 
				}
			}
			room = this.cell.Right.room ?? this.cell.room;

@@ -2128,12 +2355,12 @@ public virtual void DrawTile()

cs
					param.tile = EMono.sources.blocks.rows[0].ConvertTile(1000 + room.lot.idDeco2) * -1;
					param.matColor = room.lot.colDeco2;
					float y4 = param.y;
					float num16 = param.z; 
					float num18 = param.z; 
					param.y += (float)room.lot.decoFix2 * 0.01f;
					param.z += (float)room.lot.decoFix2 * 0.01f * heightModDeco;
					rendererWallDeco.Draw(param);
					param.y = y4;
					param.z = num16; 
					param.z = num18; 
				}
			}
			break;

@@ -2227,7 +2454,7 @@ public virtual void DrawTile()

cs
				{
					param.matColor = ((_sourceBlock.colorMod == 0) ? 104025 : GetColorInt(ref param.mat.matColor, _sourceBlock.colorMod));
				}
				if (roomHeight == 0f || flag8) 
				if (roomHeight == 0f || flag8 || !this.tileType.RepeatBlock) 
				{
					if (!this.cell.hasDoor)
					{

@@ -2331,8 +2558,8 @@ public virtual void DrawTile()

cs
					}
					else
					{
						int num17 = ((room4.data.maxHeight == 0) ? 2 : room4.data.maxHeight); 
						roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.lot.height < num17) ? room4.lot.height : num17) + 0.01f * (float)room4.lot.heightFix; 
						int num19 = ((room4.data.maxHeight == 0) ? 2 : room4.data.maxHeight); 
						roomHeight = EMono.setting.render.roomHeightMod * (float)((room4.lot.height < num19) ? room4.lot.height : num19) + 0.01f * (float)room4.lot.heightFix; 
					}
				}
				Cell back2 = this.cell.Back;

@@ -2405,19 +2632,19 @@ public virtual void DrawTile()

cs
			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 num18 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1; 
			if (num18 == 0) 
			int num20 = this.cell.objDir + ((this.cell.objDir >= 7) ? this.cell.objDir : 0) + 1; 
			if (num20 == 0) 
			{
				renderData2.Draw(param);
			}
			else
			{
				renderData2.DrawRepeat(param, num18, sourceBlock.tileType.RepeatSize); 
				renderData2.DrawRepeat(param, num20, 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); 
			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:

@@ -2439,245 +2666,19 @@ public virtual void DrawTile()

cs
	{
		if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
		{
			goto IL_6f12; 
			goto IL_6f1f; 
		}
		if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
		{
			Room obj = this.cell.FrontRight.room;
			if (obj == null || !obj.HasRoof)
			{
				goto IL_6f12; 
			} 
		} 
	} 
	goto IL_6f72; 
	IL_6f72: 
	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 num19 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2]; 
					if (!(num19 >= (float)sourceEffect2.anime[0])) 
					{ 
						param.tile += num19; 
					} 
				} 
				else
				{ 
					float num20 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0]; 
					param.tile += num20; 
				} 
			} 
			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 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; 
				goto IL_6f1f; 
			}
		}
	}
	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_7aa2; 
	IL_6f12: 
	if (!showRoof || !roof || this.cell.room == null || this.cell.Front.room == null || this.cell.Right.room == null) 
	{ 
		param.tile = num12; 
		rendererFov.Draw(param); 
	} 
	goto IL_6f72; 
	IL_7aa2: 
	goto IL_6f7f; 
	IL_7aaf: 
	if (detail.things.Count == 0 && detail.charas.Count == 0)
	{
		return;

Card

@@ -2575,6 +2575,10 @@ public void Create(string _id, int _idMat = -1, int genLv = -1)

cs
	{
		LV = bp.lv;
	}
	if (id == "microchip") 
	{ 
		Debug.Log(id + "/" + _idMat + "/" + sourceCard.fixedMaterial); 
	} 
	if (sourceCard.fixedMaterial)
	{
		_material = EClass.sources.materials.alias[AliasMaterialOnCreate];

@@ -6687,6 +6691,10 @@ public virtual int SecondaryCompare(UIList.SortMode m, Card c)

cs
		num = encLV - c.encLV;
	}
	if (num == 0)
	{ 
		num = Num - c.Num; 
	} 
	if (num == 0) 
	{
		num = uid - c.uid;
	}

Chara

@@ -1856,6 +1856,43 @@ public void AddRandomBodyPart(bool msg = false)

cs
		}
	}

	public void RemoveLastBodyPart(bool msg = false) 
	{ 
		if (body.slots.Count != 0) 
		{ 
			BodySlot bodySlot = body.slots.LastItem(); 
			body.RemoveBodyPartAt(body.slots.Count - 1); 
			if (msg) 
			{ 
				Say("lose_bodyparts", this, Element.Get(bodySlot.elementId).GetName().ToLower()); 
				PlaySound("offering"); 
			} 
		} 
	} 

	public void ResetBody() 
	{ 
		for (int num = body.slots.Count - 1; num >= 0; num--) 
		{ 
			BodySlot bodySlot = body.slots[num]; 
			if (bodySlot.elementId == 45 || bodySlot.elementId == 40) 
			{ 
				return; 
			} 
			body.RemoveBodyPart(num); 
		} 
		string[] array = race.figure.Split('|'); 
		foreach (string s in array) 
		{ 
			int num2 = ParseBodySlot(s); 
			if (num2 != -1) 
			{ 
				body.AddBodyPart(num2); 
			} 
		} 
		body.RefreshBodyParts(); 
	} 

	public void ApplyRace(bool remove = false)
	{
		string[] array = race.figure.Split('|');

@@ -5595,6 +5632,7 @@ public void DoHostileAction(Card _tg, bool immediate = false)

cs
			{
				Thing t = ThingGen.Create("49");
				ActThrow.Throw(chara, pos, t);
				Act.TC = chara; 
			}
		}
	}

@@ -5990,9 +6028,9 @@ public override string GetHoverText2()

cs
	IEnumerable<BaseStats> enumerable = conditions.Concat((!IsPCFaction) ? new BaseStats[0] : new BaseStats[2] { hunger, stamina });
	if (enumerable.Count() > 0)
	{
		text = ""; 
		text3 += Environment.NewLine;
		text3 += "<size=14>";
		int num = 0; 
		foreach (BaseStats item in enumerable)
		{
			string text4 = item.GetPhaseStr();

@@ -6020,9 +6058,18 @@ public override string GetHoverText2()

cs
					text4 = text4 + "{" + resistCon[item.id] + "}";
				}
			}
			num++; 
			text3 = text3 + text4.TagColor(c) + ", ";
		}
		text3 = text3.TrimEnd(", ".ToCharArray()) + "</size>"; 
		if (num == 0) 
		{ 
			text3 = ""; 
		} 
		else
		{ 
			text = ""; 
			text3 = text3.TrimEnd(", ".ToCharArray()) + "</size>"; 
		} 
	}
	return text + text2 + text3;
}

CharaBody

@@ -305,10 +305,15 @@ public void RefreshBodyParts()

cs

	public void RemoveBodyPart(int ele)
	{
		int num = slots.FindIndex((BodySlot a) => a.elementId == ele); 
		if (num != -1) 
		int idx = slots.FindIndex((BodySlot a) => a.elementId == ele); 
		RemoveBodyPartAt(idx); 
	} 

	public void RemoveBodyPartAt(int idx) 
	{ 
		if (idx != -1) 
		{
			BodySlot bodySlot = slots[num]; 
			BodySlot bodySlot = slots[idx]; 
			if (bodySlot.thing != null)
			{
				Unequip(bodySlot);

@@ -325,7 +330,7 @@ public void RemoveBodyPart(int ele)

cs
			{
				slotRange = null;
			}
			slots.RemoveAt(num); 
			slots.RemoveAt(idx); 
		}
	}

CoreDebug

@@ -905,16 +905,14 @@ public void UpdateInput()

cs
	}
	if (Input.GetKeyDown(KeyCode.F2))
	{
		EClass.pc.SetFeat(1355); 
		foreach (Chara chara in EClass._map.charas) 
		Chara targetChara = EClass.scene.mouseTarget.TargetChara; 
		if (targetChara != null) 
		{
			chara.ModAffinity(EClass.pc, -100 + EScriptable.rnd(200)); 
			chara.hygiene.Mod(-50 + EScriptable.rnd(100)); 
			EClass.pc.Pick(targetChara.MakeMilk()); 
			EClass.pc.Pick(targetChara.MakeGene()); 
			EClass.pc.Pick(targetChara.MakeBraineCell()); 
			EClass.pc.Pick(targetChara.MakeEgg(effect: true, 10)); 
		}
		Thing to = ThingGen.Create("gene"); 
		to = DNA.CopyDNA(DNA.GenerateRandomGene(), to); 
		EClass.pc.Pick(to); 
		EClass.pc.Pick(ThingGen.Create("rune")); 
		return;
	}
	if (Input.GetKeyDown(KeyCode.F3))

@@ -942,9 +940,9 @@ public void UpdateInput()

cs
		{
			EClass.Branch.ModExp(EClass.Branch.GetNextExp());
		}
		foreach (Chara member in EClass.pc.party.members) 
		foreach (Chara chara in EClass._map.charas) 
		{
			member.AddExp(member.ExpToNext); 
			chara.AddExp(chara.ExpToNext); 
		}
		EClass.pc.PlayEffect("boost");
		EClass.pc.PlaySound("boost");

@@ -1857,6 +1855,21 @@ public static string SetElement(string alias, int value, int potential = 100)

cs
		return "Done.";
	}

	[ConsoleCommand("")] 
	public static string SpawnBoss(string id) 
	{ 
		if (!CheatEnabled()) 
		{ 
			return EnableCheat; 
		} 
		if (EClass.sources.charas.map.ContainsKey(id)) 
		{ 
			Chara chara = EClass._zone.SpawnMob(EClass.pc.pos.GetNearestPoint(), SpawnSetting.Boss(id)); 
			return "Spawned " + chara.Name; 
		} 
		return "'" + id + "' does not exist in the database."; 
	} 

	[ConsoleCommand("")]
	public static string Spawn(string id, int num = 1, string aliasMat = "", int objLv = -1)
	{

CoreExtension

@@ -1,4 +1,5 @@

cs
using System;
using System.Collections.Generic; 
using UnityEngine;

public static class CoreExtension

@@ -54,4 +55,28 @@ public static string TagColor(this string text, Func<bool> funcGood, Func<bool>

cs
		SkinColorProfile skinColorProfile = colors ?? SkinManager.CurrentColors;
		return text.TagColor(funcGood() ? skinColorProfile.textGood : ((funcBad != null && funcBad()) ? skinColorProfile.textBad : skinColorProfile.textDefault));
	}

	public static void Sort(this List<Thing> things, UIList.SortMode m, bool ascending = false) 
	{ 
		foreach (Thing thing in things) 
		{ 
			thing.SetSortVal(m); 
		} 
		things.Sort(delegate(Thing a, Thing b) 
		{ 
			if (m == UIList.SortMode.ByName) 
			{ 
				if (ascending) 
				{ 
					return string.Compare(a.GetName(NameStyle.FullNoArticle, 1), b.GetName(NameStyle.FullNoArticle, 1)); 
				} 
				return string.Compare(b.GetName(NameStyle.FullNoArticle, 1), a.GetName(NameStyle.FullNoArticle, 1)); 
			} 
			if (a.sortVal == b.sortVal) 
			{ 
				return b.SecondaryCompare(m, a); 
			} 
			return (!ascending) ? (a.sortVal - b.sortVal) : (b.sortVal - a.sortVal); 
		}); 
	} 
}

DramaManager

@@ -894,7 +894,7 @@ public void ParseLine(Dictionary<string, string> item)

cs
	case "save":
		AddEvent(delegate
		{
			EMono.game.Save(isAutoSave: false, null, silent: true); 
			EMono.game.Save(isAutoSave: false, silent: true); 
		});
		break;
	case "setHour":

@@ -100,6 +100,7 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
	{
		onInstantiate = delegate(Recipe.Ingredient ingredient, ButtonGrid b)
		{
			List<Thing> things; 
			if (ingredient.id.IsEmpty())
			{
				b.SetIngredient(recipe, ingredient);

@@ -124,19 +125,19 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
				}
				if (!flag)
				{
					List<Thing> list2 = ListIngredients(ingredient, searchMode); 
					if (list2.Count == 0) 
					things = ListIngredients(ingredient, searchMode); 
					if (things.Count == 0) 
					{
						if (EMono.debug.godBuild && ingredient.thing == null)
						{
							Thing thing2 = ThingGen.Create(ingredient.IdThing, recipe.DefaultMaterial.alias).SetNum(99);
							list2.Add(thing2); 
							things.Add(thing2); 
							ingredient.SetThing(thing2);
						}
						else
						{
							ingredient.SetThing();
							list2.Insert(0, null); 
							things.Insert(0, null); 
						}
					}
					else if (!ingredient.optional)

@@ -146,7 +147,7 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
							int num2 = lastMats.TryGetValue(recipe.id, -1);
							if (num2 != -1)
							{
								foreach (Thing item in list2) 
								foreach (Thing item in things) 
								{
									if (item.material.id == num2 && item.Num >= ingredient.req)
									{

@@ -158,7 +159,7 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
							if (ingredient.thing == null)
							{
								SourceMaterial.Row defaultMaterial = recipe.DefaultMaterial;
								foreach (Thing item2 in list2) 
								foreach (Thing item2 in things) 
								{
									if (item2.material.id == defaultMaterial.id && item2.Num >= ingredient.req)
									{

@@ -169,19 +170,19 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
								if (EMono.debug.godBuild && ingredient.thing == null)
								{
									Thing thing3 = (ingredient.useCat ? ThingGen.CreateFromCategory(ingredient.id) : ThingGen.Create(ingredient.id, defaultMaterial.alias)).SetNum(99);
									list2.Add(thing3); 
									things.Add(thing3); 
									ingredient.SetThing(thing3);
								}
							}
							if (ingredient.thing == null)
							{
								ingredient.SetThing(list2[0]); 
								ingredient.SetThing(FindMax()); 
							}
						}
						else
						{
							bool flag2 = true;
							foreach (Thing item3 in list2) 
							foreach (Thing item3 in things) 
							{
								if (ingredient.thing == item3)
								{

@@ -189,9 +190,9 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
									break;
								}
							}
							if (flag2) 
							if (flag2 && ingredient.thing == null) 
							{
								ingredient.SetThing(list2[0]); 
								ingredient.SetThing(FindMax()); 
							}
						}
					}

@@ -200,10 +201,10 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
				b.onClick.RemoveAllListeners();
				b.onClick.AddListener(delegate
				{
					List<Thing> list3 = ListIngredients(ingredient, searchMode); 
					List<Thing> list2 = ListIngredients(ingredient, searchMode); 
					if (ingredient.optional)
					{
						if (list3.Count == 0 || list3[0] == null) 
						if (list2.Count == 0 || list2[0] == null) 
						{
							SE.Beep();
							return;

@@ -216,10 +217,28 @@ public void BuildIngredients(Recipe _recipe, Image _icon, Action _onValueChange,

cs
					}
					if ((bool)rectDrop)
					{
						Activate(ingredient, list3); 
						Activate(ingredient, list2); 
					}
				});
			}
			Thing FindMax() 
			{ 
				if (things.Count == 0) 
				{ 
					return null; 
				} 
				int num3 = 0; 
				Thing result = null; 
				foreach (Thing item4 in things) 
				{ 
					if (item4.Num > num3) 
					{ 
						num3 = item4.Num; 
						result = item4; 
					} 
				} 
				return result; 
			} 
		},
		onRedraw = delegate(Recipe.Ingredient a, ButtonGrid b, int i)
		{

Effect

@@ -240,6 +240,7 @@ public void Kill()

cs
	TweenUtil.KillTween(ref killTimer);
	TweenUtil.KillTween(ref moveTween);
	killed = true;
	OnKill(); 
	manager.Remove(this);
	if (pool && manager.effects.usePool)
	{

@@ -251,6 +252,10 @@ public void Kill()

cs
		}
	}

	public virtual void OnKill() 
	{ 
	} 

	public void OnDisable()
	{
		if ((bool)base.transform.parent && !test)

EffectIRenderer

@@ -122,4 +122,12 @@ public override void OnUpdate()

cs
			card.renderer.isSynced = false;
		}
	}

	public override void OnKill() 
	{ 
		if (card != null && card.renderer.hasActor) 
		{ 
			card.renderer.KillActor(); 
		} 
	} 
}

FEAT

@@ -432,9 +432,17 @@ public List<string> Apply(int a, ElementContainer owner, bool hint = false)

cs
		break;
	case 1644:
		featRef[0] = a.ToString() ?? "";
		if (!hint && a > 0) 
		if (!hint) 
		{
			owner.Chara.AddRandomBodyPart(owner.Chara.IsPC); 
			if (a > 0) 
			{ 
				owner.Chara.AddRandomBodyPart(owner.Chara.IsPC); 
			} 
			else
			{ 
				_ = a; 
				_ = 0; 
			} 
			if (owner.Chara.IsPC && (bool)WidgetEquip.Instance)
			{
				WidgetEquip.Instance.Rebuild();

FactionBranch

@@ -192,14 +192,10 @@ public void RefreshEfficiency()

cs
	int ration = 0;
	foreach (Chara member in members)
	{
		if (member.memberType != 0) 
		if (member.memberType != 0 || member.IsPCParty || member.homeBranch == null || member.homeBranch.owner == null) 
		{
			continue;
		}
		if (member.IsPCParty || member.homeBranch == null || member.homeBranch.owner == null) 
		{ 
			return; 
		} 
		foreach (Hobby item in member.ListHobbies())
		{
			TryAdd(item);

@@ -213,6 +209,10 @@ public void RefreshEfficiency()

cs
	{
		num -= (num2 - MaxPopulation) * 20 * 100 / (100 + 20 * (int)Mathf.Sqrt(ration));
	}
	if (efficiency < 0) 
	{ 
		efficiency = 0; 
	} 
	efficiency = num;
	void TryAdd(Hobby h)
	{

Game

@@ -859,10 +859,10 @@ public void GotoTitle(bool showDialog = true)

cs
	{
		Dialog.YesNo("dialog_gotoTitle", delegate
		{
			EClass.game.Save(isAutoSave: true, delegate
			if (EClass.game.Save(isAutoSave: true)) 
			{
				EClass.scene.Init(Scene.Mode.Title);
			}); 
			} 
		});
	}
	else

@@ -875,40 +875,27 @@ public void Quit()

cs
	{
		Dialog.YesNo("dialog_quit", delegate
		{
			EClass.game.Save(isAutoSave: true, delegate
			if (EClass.game.Save()) 
			{
				EClass.core.Quit();
			}); 
			} 
		});
	}

	public void Save(bool isAutoSave = false, Action onComplete = null, bool silent = false) 
	public bool Save(bool isAutoSave = false, bool silent = false) 
	{
		if (EClass.ui.IsDragging)
		{
			EClass.ui.EndDrag(canceled: true);
		}
		if (!isAutoSave && !silent) 
		{ 
			SE.WriteJournal(); 
		} 
		if (isAutoSave && EClass.debug.ignoreAutoSave)
		{
			onComplete?.Invoke(); 
			return; 
		} 
		int num; 
		if (EClass.core.config.game.autoBackup) 
		{ 
			num = ((backupTime >= (double)(EClass.core.config.game.backupInterval * 60 * 30)) ? 1 : 0); 
			if (num != 0) 
			{ 
				backupTime = 0.0; 
			} 
			return true; 
		}
		else
		bool flag = EClass.core.config.game.autoBackup && backupTime >= (double)(EClass.core.config.game.backupInterval * 60 * 30); 
		if (flag) 
		{
			num = 0; 
			backupTime = 0.0; 
		}
		EClass.core.config.TryUpdatePlayedHour();
		countLoadedMaps = 0;

@@ -921,19 +908,34 @@ public void Save(bool isAutoSave = false, Action onComplete = null, bool silent

cs
		player.angle = EClass.pc.angle;
		version = EClass.core.version;
		EClass.ui.widgets.UpdateConfigs();
		OnBeforeSave(); 
		GameIndex index = GameIO.SaveGame(); 
		if (num != 0) 
		GameIndex gameIndex = null; 
		try
		{
			GameIO.MakeBackup(index); 
			OnBeforeSave(); 
			gameIndex = GameIO.SaveGame(); 
		} 
		catch (Exception ex) 
		{ 
			EClass.ui.Say(ex.Message); 
			SE.Beep(); 
			Msg.Say("error_save"); 
			return false; 
		} 
		if (flag) 
		{ 
			GameIO.MakeBackup(gameIndex); 
			EClass.ui.Say("backupDone");
		}
		if (!silent)
		{
			if (!isAutoSave) 
			{ 
				SE.WriteJournal(); 
			} 
			Msg.Say("saved");
		}
		saveCount++;
		onComplete?.Invoke(); 
		return true; 
	}

	public void OnBeforeSave()

HitSummary

@@ -55,7 +55,7 @@ public bool CanExecute()

cs
	{
		return true;
	}
	if (recipe != null) 
	if (recipe != null && !recipe.UseStock) 
	{
		foreach (Recipe.Ingredient ingredient in recipe.ingredients)
		{

Map

@@ -1149,7 +1149,7 @@ public void SetBlockDir(int x, int z, int dir)

cs
public void ModFire(int x, int z, int amount)
{
	Cell cell = cells[x, z];
	if (!cell.IsTopWaterAndNoSnow && !cell.IsSnowTile) 
	if (amount <= 0 || (!cell.IsTopWaterAndNoSnow && !cell.IsSnowTile)) 
	{
		if (cell.effect == null && amount > 0)
		{

Party

@@ -95,8 +95,8 @@ public void RemoveMember(Chara c)

cs
		if (c.homeBranch != null)
		{
			c.homeBranch.RefreshEfficiency();
			c.RefreshWorkElements(c.homeBranch.elements); 
		}
		c.RefreshWorkElements(); 
		WidgetRoster.SetDirty();
	}

Props

@@ -214,7 +214,7 @@ public ThingStack ListThingStack(Recipe.Ingredient ing, StockSearchMode searchMo

cs
		{
			FindCat(item);
		}
		stack.list.Sort((Thing a, Thing b) => b.Num - a.Num); 
		stack.list.Sort(UIList.SortMode.ByCategory); 
		return stack;
	}
	Find(id2);

@@ -222,7 +222,7 @@ public ThingStack ListThingStack(Recipe.Ingredient ing, StockSearchMode searchMo

cs
	{
		Find(item2);
	}
	stack.list.Sort((Thing a, Thing b) => b.Num - a.Num); 
	stack.list.Sort(UIList.SortMode.ByCategory); 
	return stack;
	void Find(string id)
	{

Recipe

@@ -857,14 +857,24 @@ public bool IsCraftable()

cs
{
	foreach (Ingredient ingredient in ingredients)
	{
		if (!ingredient.optional) 
		if (ingredient.optional) 
		{
			ThingStack thingStack = EClass._map.Stocked.ListThingStack(ingredient, StockSearchMode.AroundPC); 
			if (thingStack.list.Count == 0 || thingStack.list[0].Num < ingredient.req) 
			continue; 
		} 
		ThingStack thingStack = EClass._map.Stocked.ListThingStack(ingredient, StockSearchMode.AroundPC); 
		bool flag = false; 
		foreach (Thing item in thingStack.list) 
		{ 
			if (item.Num >= ingredient.req) 
			{
				return false; 
				flag = true; 
				break; 
			}
		}
		if (!flag) 
		{ 
			return false; 
		} 
	}
	return true;
}

RenderRow

@@ -63,6 +63,8 @@ public class RenderRow : SourceData.BaseRow, IRenderSource

cs

	public bool multisize;

	public bool fixedMaterial; 

	public SourcePref pref;

	[NonSerialized]

@@ -80,9 +82,6 @@ public class RenderRow : SourceData.BaseRow, IRenderSource

cs
	[NonSerialized]
	public bool useRandomColor;

	[NonSerialized] 
	public bool fixedMaterial; 

	[NonSerialized]
	public SourceMaterial.Row DefaultMaterial;

@@ -156,6 +155,15 @@ public override void OnImportData(SourceData data)

cs
		base.OnImportData(data);
		_tiles = new int[0];
		SetTiles();
		if (defMat.Length > 0 && defMat[0] == '!') 
		{ 
			fixedMaterial = true; 
			defMat = defMat.Substring(1, defMat.Length - 1); 
		} 
		else
		{ 
			fixedMaterial = false; 
		} 
	}

	public void SetRenderData()

@@ -230,19 +238,6 @@ public void SetRenderData()

cs
		{
			useAltColor = true;
		}
		if (defMat[0] == '!') 
		{ 
			fixedMaterial = true; 
			defMat = defMat.Substring(1, defMat.Length - 1); 
		} 
		else
		{ 
			fixedMaterial = false; 
		} 
		if (!sources.materials.alias.ContainsKey(defMat)) 
		{ 
			Debug.Log(defMat); 
		} 
		DefaultMaterial = sources.materials.alias[defMat];
	}

SpawnSetting

@@ -56,6 +56,19 @@ public static SpawnSetting Boss(int filterLv, int fixedLv = -1)

cs
		};
	}

	public static SpawnSetting Boss(string id, string idEle = null, int fixedLv = -1) 
	{ 
		return new SpawnSetting
		{ 
			id = id, 
			idEle = idEle, 
			fixedLv = fixedLv, 
			rarity = Rarity.Legendary, 
			isBoss = true, 
			tries = 10000
		}; 
	} 

	public static SpawnSetting Encounter(int lv)
	{
		return new SpawnSetting

TCExtra

@@ -81,7 +81,13 @@ public override void OnDraw(ref Vector3 pos)

cs
		flag4 = !flag4;
	}
	bool flag5 = useOffsetBack && data.useOffsetBack && flag;
	if (dirPos.Length == 0) 
	if (base.owner.renderer.hasActor) 
	{ 
		v.x = base.owner.renderer.position.x + (flag5 ? data.offsetBack.x : data.offset.x); 
		v.y = base.owner.renderer.position.y + (flag5 ? data.offsetBack.y : data.offset.y); 
		v.z = base.owner.renderer.position.z + (flag5 ? data.offsetBack.z : data.offset.z) + FixPos.z + (flag2 ? (-0.5f) : 0f) + ((!flag2) ? 0f : (flag3 ? heldPosFlip.z : heldPos.z)); 
	} 
	else if (dirPos.Length == 0) 
	{
		v.x = base.owner.renderer.position.x + (flag5 ? data.offsetBack.x : data.offset.x) * (float)((!flag4) ? 1 : (-1)) + FixPos.x + flipFixX * (float)((!flag4) ? 1 : (-1)) + ((!flag2) ? 0f : (flag3 ? heldPosFlip.x : heldPos.x));
		v.y = base.owner.renderer.position.y + (flag5 ? data.offsetBack.y : data.offset.y) + FixPos.y + ((!flag2) ? 0f : (flag3 ? heldPosFlip.y : heldPos.y));

TaskBuild

@@ -353,14 +353,20 @@ public override void OnProgressComplete()

cs
				_ = (item.trait as TraitNewZone).IsDownstairs;
			}
		}
		if (!pos.IsBlocked || !pos.HasChara) 
		if (ActionMode.Build.IsActive && ActionMode.Build.IsRoofEditMode()) 
		{
			return;
		}
		foreach (Chara item2 in pos.ListCharas()) 
		pos.ForeachMultiSize(recipe.W, recipe.H, delegate(Point p, bool center) 
		{
			EClass.pc.Kick(item2, ignoreSelf: true, karmaLoss: false, show: false); 
		} 
			if (p.IsBlocked && p.HasChara) 
			{ 
				foreach (Chara item2 in p.ListCharas()) 
				{ 
					EClass.pc.Kick(item2, ignoreSelf: true, karmaLoss: false, show: false); 
				} 
			} 
		}); 
	}

	public override void OnDestroy()

TaskHarvest

@@ -491,6 +491,11 @@ public void HarvestThing()

cs
	{
		num2 = 2.1999998f;
	}
	string text2 = target.id; 
	if (text2 == "glass" || text2 == "brick") 
	{ 
		num2 = 2.1999998f; 
	} 
	if (target.trait is TraitAmmo)
	{
		num2 = 50f;

TraitBinocular

@@ -3,4 +3,6 @@ public class TraitBinocular : TraitViewMap

cs
	public override bool IsTool => true;

	public override bool ShowAsTool => true;

	public override bool CanUseInUserZone => true; 
}

TraitFoodEggFertilized

@@ -1,3 +1,5 @@

cs
using UnityEngine; 

public class TraitFoodEggFertilized : TraitFoodEgg
{
	public override int DecaySpeed => 1;

@@ -25,6 +27,15 @@ public static Chara Incubate(Thing egg, Point pos, Card incubator = null)

cs
	chara.SetMainElement(egg.c_idMainElement, 10, elemental: true);
	chara.SetFeat(1232, (incubator != null) ? 3 : 2, msg: true);
	chara.things.DestroyAll();
	if (chara.Evalue(1644) > 0) 
	{ 
		for (int i = 0; i < chara.Evalue(1644); i++) 
		{ 
			chara.RemoveLastBodyPart(); 
			Debug.Log(i + "/" + chara.body.slots.Count); 
		} 
		chara.elements.SetBase(1644, 0); 
	} 
	foreach (Element value in chara.elements.dict.Values)
	{
		if ((!(value.source.category != "attribute") || !(value.source.category != "skill")) && (!(value.source.category == "attribute") || value.source.tag.Contains("primary")) && value.ValueWithoutLink != 0)

UIDragGridIngredients

@@ -55,11 +55,10 @@ public void Refresh()

cs
				if (windowSaveData == null || !windowSaveData.excludeCraft)
				{
					list.Add(thing);
					thing.SetSortVal(UIList.SortMode.ByCategory); 
				}
			}
		}
		list.Sort((Thing a, Thing b) => b.sortVal - a.sortVal); 
		list.Sort(UIList.SortMode.ByCategory); 
	}
	this.list.callbacks = new UIList.Callback<Thing, ButtonGrid>
	{

UIHomeInfo

@@ -410,7 +410,8 @@ public void RefreshReport()

cs
	});
	if (EMono.debug.showExtra)
	{
		AddReport("efficiency:" + branch.efficiency); 
		branch.RefreshEfficiency(); 
		AddReport("Efficiency:" + branch.efficiency); 
	}
	reports.Sort((ReportData a, ReportData b) => b.type - a.type);
	listReport.Clear();

UIInventory

@@ -1007,7 +1007,7 @@ public Transform ShowAdvDistribution(UIContextMenu dis, Window.SaveData data)

cs

	public void Sort(bool redraw = true)
	{
		UIList.SortMode i = (IsShop ? EMono.player.pref.sortInvShop : (IsAdvSort ? window.saveData.sortMode : EMono.player.pref.sortInv)); 
		UIList.SortMode m = (IsShop ? EMono.player.pref.sortInvShop : (IsAdvSort ? window.saveData.sortMode : EMono.player.pref.sortInv)); 
		bool flag = true;
		while (flag)
		{

@@ -1040,26 +1040,9 @@ public void Sort(bool redraw = true)

cs
			thing3.invY = 0;
			thing3.invX = -1;
		}
		thing3.SetSortVal(i, owner.currency); 
		num++;
	}
	owner.Container.things.Sort(delegate(Thing a, Thing b) 
	{ 
		bool flag2 = (IsShop ? EMono.player.pref.sort_ascending_shop : (IsAdvSort ? window.saveData.sort_ascending : EMono.player.pref.sort_ascending)); 
		if (i == UIList.SortMode.ByName) 
		{ 
			if (flag2) 
			{ 
				return string.Compare(a.GetName(NameStyle.FullNoArticle, 1), b.GetName(NameStyle.FullNoArticle, 1)); 
			} 
			return string.Compare(b.GetName(NameStyle.FullNoArticle, 1), a.GetName(NameStyle.FullNoArticle, 1)); 
		} 
		if (a.sortVal == b.sortVal) 
		{ 
			return b.SecondaryCompare(i, a); 
		} 
		return (!flag2) ? (a.sortVal - b.sortVal) : (b.sortVal - a.sortVal); 
	}); 
	owner.Container.things.Sort(m, IsShop ? EMono.player.pref.sort_ascending_shop : (IsAdvSort ? window.saveData.sort_ascending : EMono.player.pref.sort_ascending)); 
	if (!UseGrid)
	{
		int num2 = 0;

WidgetStatsBar

@@ -191,9 +191,9 @@ public void Build()

cs
		Add(null, "fertility", iconFertility, delegate
		{
			object obj;
			if (EMono.Branch != null) 
			if (EMono.Branch != null || EMono._zone is Zone_Tent) 
			{
				obj = (EMono.Branch.MaxSoil - EMono._zone.GetSoilCost()).ToString(); 
				obj = (EMono._zone.MaxSoil - EMono._zone.GetSoilCost()).ToString(); 
				if (obj == null)
				{
					return "";

@@ -204,7 +204,7 @@ public void Build()

cs
				obj = "";
			}
			return (string)obj;
		}, () => (EMono.Branch == null || EMono.Branch.MaxSoil - EMono._zone.GetSoilCost() >= 0) ? FontColor.Default : FontColor.Bad, () => EMono._zone.IsPCFaction); 
		}, () => ((EMono.Branch == null && !(EMono._zone is Zone_Tent)) || EMono._zone.MaxSoil - EMono._zone.GetSoilCost() >= 0) ? FontColor.Default : FontColor.Bad, () => EMono._zone.IsPCFaction || EMono._zone is Zone_Tent); 
	}
	if (extra.weight)
	{