Skip to content

EA 23.73 Nightly

January 3, 2025

18 files modified. 2 new files created.

Important Changes

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

GameIO (1)

cs
public static bool TryLoadSteamCloud() 
public static bool TryLoadSteamCloud(string pathSave) 

AI_Fuck

@@ -135,7 +135,7 @@ public override IEnumerable<Status> Run()

cs
			{
				tc.PlaySound("brushing");
				int num2 = cc.CHA / 2 + cc.Evalue(237) - tc.CHA * 2;
				int num3 = ((EClass.rnd(cc.CHA / 2 + cc.Evalue(237)) <= EClass.rnd(tc.CHA * num / 100)) ? (-5 + Mathf.Clamp(num2 / 10, -30, 0)) : (5 + Mathf.Clamp(num2 / 20, 0, 20))); 
				int num3 = ((EClass.rnd(cc.CHA / 2 + cc.Evalue(237)) <= EClass.rnd(tc.CHA * num / 100)) ? (-5 + ((!tc.IsPCFaction) ? Mathf.Clamp(num2 / 10, -30, 0) : 0)) : (5 + Mathf.Clamp(num2 / 20, 0, 20))); 
				int a = 20;
				if (tc.IsPCFactionOrMinion && tc.affinity.CurrentStage >= Affinity.Stage.Love)
				{

ActEffect

@@ -586,6 +586,7 @@ public static bool DamageEle(Card CC, EffectId id, int power, Element e, List<Po

cs
		chara.SetMainElement(element.source.alias, element.Value, elemental: true);
		chara.SetSummon(20 + power / 20 + EClass.rnd(10));
		chara.SetLv(power / 15);
		chara.interest = 0; 
		EClass._zone.AddCard(chara, tp.GetNearestPoint(allowBlock: false, allowChara: false));
		chara.PlayEffect("teleport");
		chara.MakeMinion(CC);

BaseTileMap

@@ -1254,7 +1254,7 @@ public virtual void DrawTile()

cs
			fogged = true;
		}
	}
	goto IL_7a73; 
	goto IL_7aa2; 
	IL_1668:
	if (this.cell.isSlopeEdge)
	{

@@ -1869,19 +1869,9 @@ public virtual void DrawTile()

cs
		}
	}
	param.color = blockLight;
	if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor)) 
	if (isSnowCovered && (sourceBlock.id != 0 || this.cell.hasDoor) && (snowed || this.cell.isClearSnow) && (this.cell.Front.HasRoof || this.cell.Right.HasRoof)) 
	{
		if (snowed || this.cell.isClearSnow) 
		{ 
			if (this.cell.Front.HasRoof || this.cell.Right.HasRoof) 
			{ 
				snowed = false; 
			} 
		} 
		else if ((!this.cell.Front.HasRoof && !this.cell.Front.HasBlock) || (!this.cell.Right.HasRoof && !this.cell.Right.HasBlock)) 
		{ 
			snowed = true; 
		} 
		snowed = false; 
	}
	int num12 = 0;
	if (sourceBlock.id != 0)

@@ -2449,31 +2439,250 @@ public virtual void DrawTile()

cs
	{
		if (this.cell.room != null || !this.cell.IsRoomEdge || !showRoof)
		{
			goto IL_6f69; 
			goto IL_6f12; 
		}
		if (this.cell._block == 0 || !this.cell.sourceBlock.tileType.RepeatBlock)
		{
			Room obj = this.cell.FrontRight.room;
			if (obj == null || !obj.HasRoof)
			{
				goto IL_6f69; 
				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; 
			} 
		} 
	} 
	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; 
		}
	}
	goto IL_6fc9; 
	IL_6f69: 
	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_6fc9; 
	IL_7a73: 
	goto IL_6f72; 
	IL_7aa2: 
	if (detail.things.Count == 0 && detail.charas.Count == 0)
	{
		return;
	}
	int num19 = 0; 
	int num21 = 0; 
	thingPos.x = 0f;
	thingPos.y = 0f;
	thingPos.z = 0f;

@@ -2504,16 +2713,16 @@ public virtual void DrawTile()

cs
	}
	Thing thing = null;
	bool shadow = liquidLv == 0;
	float num20 = 0f; 
	float num21 = 0f; 
	bool flag10 = false; 
	float num22 = 0f;
	bool flag11 = false; 
	float num23 = 0f;
	bool flag10 = false; 
	float num24 = 0f; 
	bool flag11 = false; 
	float num25 = 0f; 
	if (detail.things.Count > 0 && isSeen)
	{
		_ = zSetting.max1;
		float num24 = 0f; 
		float num26 = 0f; 
		for (int m = 0; m < detail.things.Count; m++)
		{
			Thing t = detail.things[m];

@@ -2528,12 +2737,12 @@ public virtual void DrawTile()

cs
			{
				pref = rendererObjDummy.shadowPref;
			}
			float num25 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height))); 
			float num27 = ((tileType.UseMountHeight && isInstalled) ? 0f : ((pref.height < 0f) ? 0f : ((pref.height == 0f) ? 0.1f : pref.height))); 
			if (t.ignoreStackHeight)
			{
				thingPos.y -= num20; 
				thingPos.y -= num22; 
			}
			shadow = thingPos.y < 0.16f && num23 < 0.16f; 
			shadow = thingPos.y < 0.16f && num25 < 0.16f; 
			_ = pref.bypassShadow;
			param.shadowFix = 0f - thingPos.y;
			param.liquidLv = ((thingPos.y + (float)t.altitude < 0.1f) ? liquidLv : 0);

@@ -2543,7 +2752,7 @@ public virtual void DrawTile()

cs
				SetRoofHeight(param, this.cell, cx, cz);
				_actorPos.x = param.x;
				_actorPos.y = param.y;
				_actorPos.z = param.z + num24; 
				_actorPos.z = param.z + num26; 
				if (this.room != null)
				{
					param.color = GetRoofLight(this.room.lot);

@@ -2554,9 +2763,9 @@ public virtual void DrawTile()

cs
			else
			{
				param.snow = snowed;
				_actorPos.x = orgX + num21; 
				_actorPos.x = orgX + num23; 
				_actorPos.y = orgY;
				_actorPos.z = orgZ + num24 + thingPos.z; 
				_actorPos.z = orgZ + num26 + thingPos.z; 
				if (tileType.CanStack || !isInstalled)
				{
					if (thing?.id != t.id)

@@ -2566,13 +2775,13 @@ public virtual void DrawTile()

cs
					_actorPos.y += thingPos.y;
					if (t.trait.IgnoreLastStackHeight && (thing == null || !thing.trait.IgnoreLastStackHeight))
					{
						thingPos.y -= num20; 
						thingPos.y -= num22; 
						if (thing != null)
						{
							_actorPos.z -= 0.2f;
							thingPos.z -= 0.2f;
						}
						_actorPos.y -= num20; 
						_actorPos.y -= num22; 
					}
					_actorPos.z += renderSetting.thingZ + (float)m * -0.01f + zSetting.mod1 * thingPos.y;
				}

@@ -2589,7 +2798,7 @@ public virtual void DrawTile()

cs
						freePos.z += rampFix2.z;
						if (!this.cell.IsTopWater || t.altitude > 0)
						{
							num23 += rampFix2.y; 
							num25 += rampFix2.y; 
						}
						liquidLv -= (int)(rampFix2.y * 150f);
						if (liquidLv < 0)

@@ -2599,17 +2808,17 @@ public virtual void DrawTile()

cs
					}
					else if (!flag11 && t.trait.IsChangeFloorHeight && !t.ignoreStackHeight)
					{
						orgY += num25 + (float)t.altitude * altitudeFix.y; 
						orgY += num27 + (float)t.altitude * altitudeFix.y; 
						orgZ += (float)t.altitude * altitudeFix.z;
						freePos.y += num25 + (float)t.altitude * altitudeFix.y; 
						freePos.y += num27 + (float)t.altitude * altitudeFix.y; 
						if (!this.cell.IsTopWater || t.altitude > 0)
						{
							num23 += num25 + (float)t.altitude * altitudeFix.y; 
							num25 += num27 + (float)t.altitude * altitudeFix.y; 
						}
						_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
						_actorPos.z += pref.z;
						thingPos.z += pref.z;
						liquidLv -= (int)(num25 * 150f); 
						liquidLv -= (int)(num27 * 150f); 
						if (liquidLv < 0)
						{
							liquidLv = 0;

@@ -2617,7 +2826,7 @@ public virtual void DrawTile()

cs
					}
					else
					{
						thingPos.y += num25; 
						thingPos.y += num27; 
						_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
						_actorPos.z += pref.z;
						if (pref.height >= 0f)

@@ -2632,7 +2841,7 @@ public virtual void DrawTile()

cs
				}
				else
				{
					thingPos.y += num25; 
					thingPos.y += num27; 
					_actorPos.x += pref.x * (float)((!t.flipX) ? 1 : (-1));
					_actorPos.z += pref.z;
					thingPos.z += pref.z;

@@ -2640,10 +2849,10 @@ public virtual void DrawTile()

cs
				if (t.isFloating && isWater && !hasBridge && !flag)
				{
					flag = true;
					float num26 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight); 
					orgY += 0.01f * floatY - num26; 
					num22 = num25; 
					_actorPos.y += 0.01f * floatY - num26; 
					float num28 = ((this.cell._bridge != 0) ? sourceBridge.tileType.FloorHeight : sourceFloor.tileType.FloorHeight); 
					orgY += 0.01f * floatY - num28; 
					num24 = num27; 
					_actorPos.y += 0.01f * floatY - num28; 
					if (liquidLv > 10)
					{
						liquidLv = TileType.FloorWaterShallow.LiquidLV * 10;

@@ -2655,10 +2864,10 @@ public virtual void DrawTile()

cs
					}
					param.liquidLv = liquidLv;
				}
				num20 = num25; 
				num22 = num27; 
				if (t.sourceCard.multisize && !t.trait.IsGround)
				{
					num24 += zSetting.multiZ; 
					num26 += zSetting.multiZ; 
				}
				orgZ += t.renderer.data.stackZ;
				if (param.liquidLv > 0)

@@ -2735,35 +2944,35 @@ public virtual void DrawTile()

cs
			{
				if (iconMode != 0)
				{
					int num27 = 0; 
					int num29 = 0; 
					switch (iconMode)
					{
					case CardIconMode.Visibility:
						if (t.isMasked)
						{
							num27 = 17; 
							num29 = 17; 
						}
						break;
					case CardIconMode.State:
						if (t.placeState == PlaceState.installed)
						{
							num27 = 18; 
							num29 = 18; 
						}
						break;
					case CardIconMode.Deconstruct:
						if (t.isDeconstructing)
						{
							num27 = 14; 
							num29 = 14; 
						}
						break;
					}
					if (t.isNPCProperty && !EMono.debug.godBuild)
					{
						num27 = 13; 
						num29 = 13; 
					}
					if (num27 != 0) 
					if (num29 != 0) 
					{
						passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num27); 
						passGuideBlock.Add(_actorPos.x, _actorPos.y, _actorPos.z - 10f, num29); 
					}
				}
				t.SetRenderParam(param);

@@ -2790,7 +2999,7 @@ public virtual void DrawTile()

cs
			}
			if (isInstalled)
			{
				num21 += pref.stackX * (float)((!t.flipX) ? 1 : (-1)); 
				num23 += pref.stackX * (float)((!t.flipX) ? 1 : (-1)); 
			}
			param.x = orgX;
			param.y = orgY;

@@ -2803,12 +3012,12 @@ public virtual void DrawTile()

cs
			}
		}
	}
	orgY += num22; 
	orgY += num24; 
	if (detail.charas.Count <= 0)
	{
		return;
	}
	param.shadowFix = 0f - num23; 
	param.shadowFix = 0f - num25; 
	param.color += 1310720f;
	float max = zSetting.max2;
	for (int n = 0; n < detail.charas.Count; n++)

@@ -2833,9 +3042,9 @@ public virtual void DrawTile()

cs
				{
					Vector3 position = restrainer.owner.renderer.position;
					float defCharaHeight = EMono.setting.render.defCharaHeight;
					float num28 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height); 
					float num30 = getRestrainPos.y + defCharaHeight - ((chara.Pref.height == 0f) ? defCharaHeight : chara.source.pref.height); 
					_actorPos.x = position.x + getRestrainPos.x * (float)((restrainer.owner.dir % 2 == 0) ? 1 : (-1));
					_actorPos.y = position.y + num28; 
					_actorPos.y = position.y + num30; 
					_actorPos.z = position.z + getRestrainPos.z;
					param.liquidLv = 0;
					param.shadowFix = orgY - _actorPos.y;

@@ -2850,22 +3059,22 @@ public virtual void DrawTile()

cs
		{
			if (chara.IsDeadOrSleeping && chara.IsPCC)
			{
				float num29 = chara.renderer.data.size.y * 0.3f; 
				float num31 = chara.renderer.data.size.y * 0.3f; 
				if (thingPos.y > max)
				{
					thingPos.y = max;
				}
				float num30 = thingPos.y + num29; 
				float num31 = (float)n * -0.01f; 
				if (num30 > zSetting.thresh1) 
				float num32 = thingPos.y + num31; 
				float num33 = (float)n * -0.01f; 
				if (num32 > zSetting.thresh1) 
				{
					num31 = zSetting.mod1; 
					num33 = zSetting.mod1; 
				}
				_actorPos.x += thingPos.x;
				_actorPos.y += thingPos.y;
				_actorPos.z += renderSetting.laydownZ + num31; 
				_actorPos.z += renderSetting.laydownZ + num33; 
				param.liquidLv = ((thingPos.y == 0f && liquidLv > 0) ? 90 : 0);
				thingPos.y += num29 * 0.8f; 
				thingPos.y += num31 * 0.8f; 
				chara.renderer.Draw(param, ref _actorPos, liquidLv == 0);
			}
			else

@@ -2885,10 +3094,10 @@ public virtual void DrawTile()

cs
				}
				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 + ((num19 < 4) ? num19 : 3)]; 
					_actorPos += renderSetting.charaPos[1 + ((num21 < 4) ? num21 : 3)]; 
				}
				_actorPos.z += 0.01f * (float)n + renderSetting.charaZ;
				num19++; 
				num21++; 
				if (flag10)
				{
					_actorPos.z += chara.renderer.data.hangedFixZ;

@@ -2900,222 +3109,6 @@ public virtual void DrawTile()

cs
		param.y = orgY;
		param.z = orgZ;
	}
	return; 
	IL_6fc9: 
	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 num32 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[2]; 
					if (!(num32 >= (float)sourceEffect2.anime[0])) 
					{ 
						param.tile += num32; 
					} 
				} 
				else
				{ 
					float num33 = Time.realtimeSinceStartup * 1000f / (float)sourceEffect2.anime[1] % (float)sourceEffect2.anime[0]; 
					param.tile += num33; 
				} 
			} 
			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; 
			} 
		} 
	} 
	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_7a73; 
	void Draw(int tile)
	{
		pass = passEdge;

@@ -3462,13 +3455,13 @@ public void DrawRoof(Lot lot)

cs
				}
				num13 = 0;
			}
			if (room == null && !roofStyle.coverLot && !flag2) 
			bool flag3 = isSnowCovered && !cell.isClearSnow; 
			if (room == null && !roofStyle.coverLot && !flag2 && !(cell.HasFullBlock && cell.IsRoomEdge && flag3)) 
			{
				continue;
			}
			index = cx + cz * Size;
			height = cell.TopHeight;
			bool flag3 = isSnowCovered && !cell.isClearSnow; 
			float num18 = (float)num17 * screen.tileAlign.y + (float)lot.mh * _heightMod.y + lot.realHeight + roofFix.y + vector.y;
			float num19 = 1000f + param.x * screen.tileWeight.x + (float)lot.mh * _heightMod.z + lot.realHeight * roofFix3.z + roofFix.z + vector.z;
			if (lot.height == 1 && lot.heightFix < 20)

@@ -3488,7 +3481,7 @@ public void DrawRoof(Lot lot)

cs
				RenderRow renderRow;
				if (roofStyle.type == RoofStyle.Type.FlatFloor)
				{
					if (cell.HasFullBlock && cell.IsRoomEdge) 
					if (cell.HasFullBlock && cell.IsRoomEdge && !flag3) 
					{
						continue;
					}

Chara

@@ -7122,9 +7122,9 @@ public Thing MakeMilk(bool effect = true, int num = 1, bool addToZone = true)

cs
	Thing thing = ThingGen.Create("milk").SetNum(num);
	thing.MakeRefFrom(this);
	int num2 = base.LV - source.LV;
	if (EClass._zone.IsUserZone && !base.IsPCFactionOrMinion) 
	if (!IsPCFaction) 
	{
		num2 = 0; 
		num2 = ((!EClass._zone.IsUserZone) ? (num2 / 10) : 0); 
	}
	if (num2 >= 10)
	{

GameIO

@@ -151,12 +151,16 @@ public static Game LoadGame(string id, string root, bool cloud)

cs
	{
		Game.id = id;
		GameIndex gameIndex = IO.LoadFile<GameIndex>(root + "/index.txt");
		string path = root + "/game.txt"; 
		if (cloud)
		{
			gameIndex.cloud = true;
			Debug.Log(TryLoadSteamCloud()); 
			Debug.Log(TryLoadSteamCloud(root)); 
		} 
		else if (!File.Exists(path)) 
		{ 
			Debug.Log(TryLoadSteamCloud(root)); 
		}
		string path = root + "/game.txt"; 
		return JsonConvert.DeserializeObject<Game>(IO.IsCompressed(path) ? IO.Decompress(path) : File.ReadAllText(path), jsReadGame);
	}

@@ -192,34 +196,33 @@ public static void PrepareSteamCloud(string id, string path = "")

cs
		}
	}

	public static bool TryLoadSteamCloud() 
	public static bool TryLoadSteamCloud(string pathSave) 
	{
		Debug.Log("LoadGame using cloud save");
		string text = CorePath.RootSaveCloud + Game.id; 
		string text2 = text + "/cloud.zip"; 
		string text3 = CorePath.RootSaveCloud + "/cloud.zip"; 
		string text = pathSave + "/cloud.zip"; 
		string text2 = CorePath.RootSaveCloud + "/cloud.zip"; 
		bool flag = false;
		try
		{
			if (!File.Exists(text2)) 
			if (!File.Exists(text)) 
			{
				EClass.ui.Say("Steam Cloud save not found:" + text2); 
				EClass.ui.Say("Steam Cloud save not found:" + text); 
				return true;
			}
			if (File.Exists(text3)) 
			if (File.Exists(text2)) 
			{
				File.Delete(text3); 
				File.Delete(text2); 
			}
			File.Move(text2, text3); 
			IO.DeleteDirectory(text); 
			File.Move(text, text2); 
			IO.DeleteDirectory(pathSave); 
			flag = true;
			Directory.CreateDirectory(text); 
			ZipFile.ExtractToDirectory(text3, text); 
			if (File.Exists(text2)) 
			Directory.CreateDirectory(pathSave); 
			ZipFile.ExtractToDirectory(text2, pathSave); 
			if (File.Exists(text)) 
			{
				File.Delete(text2); 
				File.Delete(text); 
			}
			File.Move(text3, text2); 
			File.Move(text2, text); 
		}
		catch (Exception ex)
		{

@@ -227,11 +230,11 @@ public static bool TryLoadSteamCloud()

cs
		if (flag)
		{
			Debug.Log("Try restore backup:");
			if (Directory.Exists(text)) 
			if (Directory.Exists(pathSave)) 
			{
				Directory.Delete(text); 
				Directory.Delete(pathSave); 
			}
			File.Move(text3, text2); 
			File.Move(text2, text); 
			return true;
		}
		return false;

GameSerializationBinder

@@ -15,6 +15,11 @@ public override Type BindToType(string assemblyName, string typeName)

cs
	catch (Exception ex)
	{
		Debug.LogError(ex.Message);
		Debug.LogError(assemblyName + "/" + typeName); 
		if (typeName.Contains("Quest")) 
		{ 
			return typeof(QuestDummy); 
		} 
		return typeof(object);
	}
}

LayerLoadGame

@@ -208,11 +208,7 @@ public void RefreshInfo(GameIndex i)

cs
						foreach (GameIndex game in GameIO.GetGameList(((!cloud) ? CorePath.PathBackupCloud : CorePath.PathBackup) + i.id + "/"))
						{
							Debug.Log("Processing:" + game.id + ": " + game.path);
							if (cloud) 
							{ 
								IO.DeleteFile(game.path + "/cloud.zip"); 
							} 
							else
							if (!cloud) 
							{
								GameIO.PrepareSteamCloud(game.id, game.path);
							}

@@ -227,10 +223,6 @@ public void RefreshInfo(GameIndex i)

cs
					{
						GameIO.PrepareSteamCloud(i.id);
					}
					else
					{ 
						IO.DeleteFile(i.path + "/cloud.zip"); 
					} 
				}
				catch (Exception ex)
				{

Quest

@@ -104,7 +104,7 @@ public Zone ClientZone

cs

	public Chara chara => person.chara;

	public SourceQuest.Row source => EClass.sources.quests.map[idSource]; 
	public virtual SourceQuest.Row source => EClass.sources.quests.map[idSource]; 

	public bool Confetti => false;

QuestCraft

@@ -154,7 +154,7 @@ public override string GetTextProgress()

cs

	public override string GetDetailText(bool onJournal = false)
	{
		return base.source.GetDetail().Split('|')[progress]; 
		return source.GetDetail().Split('|')[progress]; 
	}

	public override string GetTalkProgress()

@@ -166,7 +166,7 @@ public override string GetTalkComplete()

cs
{
	if (progress != 1 || !hasSecondReq)
	{
		return Parse(base.source.GetText("talkComplete")); 
		return Parse(source.GetText("talkComplete")); 
	}
	return GetDetailText();
}

QuestDialog

@@ -17,7 +17,7 @@ public override void ShowCompleteText()

cs

	public override bool CanStartQuest()
	{
		if (base.source.id == "farris_tulip") 
		if (source.id == "farris_tulip") 
		{
			return EClass.pc.faction.HasMember("farris");
		}

@@ -26,7 +26,7 @@ public override bool CanStartQuest()

cs

	public override void OnDropReward()
	{
		switch (base.source.id) 
		switch (source.id) 
		{
		case "pre_debt":
		{

+QuestDummy

File Created
cs
public class QuestDummy : Quest
{
	public override SourceQuest.Row source => EClass.sources.quests.map["dummy"];

	public override bool CanAbandon => true;
}

QuestProgression

@@ -4,7 +4,7 @@ public class QuestProgression : QuestSequence

cs

	public override string GetDetail(bool onJournal = false)
	{
		string text = base.source.GetDetail().Split('|').TryGet(onJournal ? 1 : 0); 
		string text = source.GetDetail().Split('|').TryGet(onJournal ? 1 : 0); 
		string text2 = GetTextProgress();
		if (!text2.IsEmpty())
		{

QuestSequence

@@ -6,7 +6,7 @@ public class QuestSequence : Quest

cs

	public override string GetTitle()
	{
		string text = base.source.GetText("name", returnNull: true); 
		string text = source.GetText("name", returnNull: true); 
		if (!text.IsEmpty())
		{
			return text;

QuestSubdue

@@ -4,7 +4,7 @@ public class QuestSubdue : QuestInstance

cs

	public override bool FameContent => true;

	public override int BaseMoney => base.source.money + EClass.curve(DangerLv, 20, 15) * 10; 
	public override int BaseMoney => source.money + EClass.curve(DangerLv, 20, 15) * 10; 

	public override ZoneEventQuest CreateEvent()
	{

Steam

@@ -38,11 +38,12 @@ public void CheckDLC()

cs

	public static bool HasDLC(ID_DLC id)
	{
		if (id != ID_DLC.BackerReward) 
		return id switch
		{
			_ = 2504360; 
		} 
		return EClass.core.config.HasBackerRewardCode(); 
			ID_DLC.CursedManor => true,  
			ID_DLC.BackerReward => EClass.core.config.HasBackerRewardCode(),  
			_ => EClass.core.config.HasBackerRewardCode(),  
		}; 
	}

	public static void GetAchievement(ID_Achievement id)

TaskBuild

@@ -148,7 +148,7 @@ public override HitResult GetHitResult()

cs
		{
			return HitResult.Invalid;
		}
		if (EClass.pc.held.TileType.IsBlockPass && pos.HasChara) 
		if (EClass.pc.held.TileType.IsBlockPass && pos.HasChara && pos.FirstChara.IsHostile(EClass.pc)) 
		{
			return HitResult.Invalid;
		}

TileType

@@ -79,6 +79,8 @@ public enum RampType

cs

	public static TileTypeIllumination Illumination = new TileTypeIllumination();

	public static TileTypeTent Tent = new TileTypeTent(); 

	public static TileTypeSeed Seed = new TileTypeSeed();

	public static TileTypeTree Tree = new TileTypeTree();

+TileTypeTent

File Created
cs
public class TileTypeTent : TileTypeObjBig
{
}

TraitBoat

@@ -6,6 +6,8 @@ public class TraitBoat : Trait

cs

	public override bool IsGround => true;

	public override bool CanExtendBuild => true; 

	public override void OnChangePlaceState(PlaceState state)
	{
		if (state == PlaceState.installed)

TraitTent

@@ -6,6 +6,8 @@ public class TraitTent : TraitNewZone

cs

	public override bool CreateExternalZone => true;

	public override bool CanExtendBuild => true; 

	public override bool CanBeHeld => true;

	public override int UseDist => 1;