Skip to content

EA 23.357 Nightly ​

October 31, 2026

20 files modified. 1 new file created.

Important Changes ​

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

LayerMod (1) ​

cs
private static string FitTitle(UIText text, string title, string suffix = "")

LayerSkinDeco (1) ​

cs
public static List<Sprite> GetCustomSprites()
public static List<Sprite> GetCustomSprites(bool rescan = false)

ActEffect ​

void AddCon<T>(int rate, int p2) where T : Condition

cs
{
	foreach (Card item2 in list)
	{
		if (item2.ExistsOnMap)
		if (item2.ExistsOnMap && !item2.GetBool(137))
		{
			RapidCount += 2;
			ProcAt(id, power, BlessedState.Normal, item2, null, item2.pos, isNeg: true, actref);

void AddCon<T>(int rate, int p2) where T : Condition

cs
{
case EffectId.Earthquake:
{
	List<Point> list3 = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
	if (list3.Count == 0)
	List<Point> list5 = EClass._map.ListPointsInCircle(CC.pos, 12f, mustBeWalkable: false);
	if (list5.Count == 0)
	{
		list3.Add(CC.pos.Copy());
		list5.Add(CC.pos.Copy());
	}
	CC.Say("spell_earthquake", CC, element.Name.ToLower());
	TryDelay(delegate

void AddCon<T>(int rate, int p2) where T : Condition

cs
		Shaker.ShakeCam("ball");
	}
	EClass.Wait(1f, CC);
	DamageEle(CC, id, power, element, list3, actRef, "spell_earthquake");
	DamageEle(CC, id, power, element, list5, actRef, "spell_earthquake");
	break;
}
case EffectId.Meteor:

void AddCon<T>(int rate, int p2) where T : Condition

cs
EffectMeteor.Create(cc.pos, 10, 10, delegate
{
});
List<Point> list10 = EClass._map.ListPointsInCircle(CC.pos, 10f);
if (list10.Count == 0)
List<Point> list3 = EClass._map.ListPointsInCircle(CC.pos, 10f);
if (list3.Count == 0)
{
	list10.Add(CC.pos.Copy());
	list3.Add(CC.pos.Copy());
}
CC.Say("spell_ball", CC, element.Name.ToLower());
TryDelay(delegate

void AddCon<T>(int rate, int p2) where T : Condition

cs
		Shaker.ShakeCam("ball");
	}
	EClass.Wait(1f, CC);
	DamageEle(CC, id, power, element, list10, actRef, "spell_ball");
	DamageEle(CC, id, power, element, list3, actRef, "spell_ball");
	return;
}
case EffectId.Comet:

void AddCon<T>(int rate, int p2) where T : Condition

cs
EffectMeteor.CreateComet(tp, delegate
{
}, matColor * 2f);
List<Point> list2 = EClass._map.ListPointsInCircle(tp, 7f);
if (list2.Count == 0)
List<Point> list9 = EClass._map.ListPointsInCircle(tp, 7f);
if (list9.Count == 0)
{
	list2.Add(tp.Copy());
	list9.Add(tp.Copy());
}
CC.Say("spell_ball", CC, element.Name.ToLower());
TryDelay(delegate

void AddCon<T>(int rate, int p2) where T : Condition

cs
		Shaker.ShakeCam("ball");
	}
	EClass.Wait(1f, CC);
	DamageEle(CC, id, power, element, list2, actRef, "spell_ball", tp);
	DamageEle(CC, id, power, element, list9, actRef, "spell_ball", tp);
	return;
}
case EffectId.Hand:

void AddCon<T>(int rate, int p2) where T : Condition

cs
case EffectId.MoonSpear:
case EffectId.MoonArrow:
{
	List<Point> list = new List<Point>();
	list.Add(tp.Copy());
	List<Point> list7 = new List<Point>();
	list7.Add(tp.Copy());
	CC.Say((id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow", CC, element.Name.ToLower());
	EClass.Wait(0.5f, CC);
	TryDelay(delegate
	{
		CC.PlaySound((id == EffectId.MoonSpear) ? "spell_moonspear" : "spell_arrow");
	});
	DamageEle(CC, id, power, element, list, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
	DamageEle(CC, id, power, element, list7, actRef, (id == EffectId.MoonSpear) ? "spell_spear" : "spell_arrow");
	return;
}
case EffectId.Missile:
{
	List<Point> list7 = new List<Point>();
	List<Point> list8 = new List<Point> { tp.Copy() };
	List<Point> list = new List<Point>();
	List<Point> list2 = new List<Point> { tp.Copy() };
	foreach (Point item in EClass._map.ListPointsInCircle(tp, 6f, mustBeWalkable: false))
	{
		if (item.Equals(tp) || !Los.IsVisible(CC.pos, item))

void AddCon<T>(int rate, int p2) where T : Condition

cs
{
	if ((item2.isChara && CC.IsHostile(item2.Chara)) || item2.trait.CanBeAttacked)
	{
		list8.Add(item);
		list2.Add(item);
		break;
	}
}

void AddCon<T>(int rate, int p2) where T : Condition

cs
	{
		CC.PlaySound("spell_missile");
	});
	for (int num9 = 0; num9 < 6 + EClass.rnd(7); num9++)
	for (int num3 = 0; num3 < 6 + EClass.rnd(7); num3++)
	{
		list7.Clear();
		list7.Add(list8.RandomItem());
		DamageEle(CC, id, power, element, list7, actRef, "spell_missile");
		list.Clear();
		list.Add(list2.RandomItem());
		DamageEle(CC, id, power, element, list, actRef, "spell_missile");
	}
	return;
}

void AddCon<T>(int rate, int p2) where T : Condition

cs
	return;
}
string id3 = actRef.n1;
int num3 = 1;
int num4 = -1;
int radius = 3;
bool flag3 = false;
bool flag4 = actRef.n1 == "special";
int num4 = 1;
int num5 = -1;
int radius2 = 3;
bool flag4 = false;
bool flag5 = actRef.n1 == "special";
int num6 = -1;
string text = "";
bool notMeAgain = CC.HasTag(CTAG.notMeAgain);
switch (actRef.n1)
{
case "shadow":
case "tsunami":
	num3 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ? EClass.rnd(2) : 0);
	num4 = Mathf.Clamp(power / 100, 1, 5) + ((power >= 100) ? EClass.rnd(2) : 0);
	break;
case "monster":
case "fire":
case "animal":
	num3 = 1 + EClass.rnd(2);
	num4 = 1 + EClass.rnd(2);
	break;
case "special_force":
	id3 = "army_palmia";
	num3 = 4 + EClass.rnd(2);
	num5 = EClass._zone.DangerLv;
	num4 = 4 + EClass.rnd(2);
	num6 = EClass._zone.DangerLv;
	break;
case "tentacle":
	num4 = 20 + EClass.rnd(10);
	radius = 1;
	num5 = 20 + EClass.rnd(10);
	radius2 = 1;
	break;
case "special":
	CC.SetInt(70, EClass.world.date.GetRaw() + 1440);
	num3 = Mathf.Clamp(7 + CC.LV / 100, 4, 20);
	num5 = CC.LV;
	num4 = Mathf.Clamp(7 + CC.LV / 100, 4, 20);
	num6 = CC.LV;
	break;
case "special2":
	num3 = 30;
	num5 = CC.LV;
	num4 = 30;
	num6 = CC.LV;
	break;
}
num3 += CC.Evalue(1240);
for (int num6 = 0; num6 < num3; num6++)
num4 += CC.Evalue(1240);
for (int num7 = 0; num7 < num4; num7++)
{
	if (EClass._zone.CountMinions(CC) >= CC.MaxSummon)
	{
		break;
	}
	Point point = null;
	point = ((!(actRef.n1 == "special2")) ? tp.GetRandomPoint(radius)?.GetNearestPoint(allowBlock: false, allowChara: false) : EClass._map.GetRandomSurface(centered: false, walkable: true, allowWater: true)?.GetNearestPoint(allowBlock: false, allowChara: false));
	point = ((!(actRef.n1 == "special2")) ? tp.GetRandomPoint(radius2)?.GetNearestPoint(allowBlock: false, allowChara: false) : EClass._map.GetRandomSurface(centered: false, walkable: true, allowWater: true)?.GetNearestPoint(allowBlock: false, allowChara: false));
	if (point == null || !point.IsValid)
	{
		continue;
	}
	Chara chara2 = null;
	CardBlueprint.Set(new CardBlueprint());
	if (num5 != -1)
	if (num6 != -1)
	{
		CardBlueprint.current.lv = num5;
		CardBlueprint.current.lv = num6;
	}
	if (!text.IsEmpty())
	{

void AddCon<T>(int rate, int p2) where T : Condition

cs
switch (actRef.n1)
{
case "special":
	if (num6 == 0 && !CC.HasMinion("imolonac") && !CC.HasMinion("ygolonac"))
	if (num7 == 0 && !CC.HasMinion("imolonac") && !CC.HasMinion("ygolonac"))
	{
		chara2 = CharaGen.Create((EClass.rnd(20) == 0) ? "imolonac" : "ygolonac");
		break;

void AddCon<T>(int rate, int p2) where T : Condition

cs
{
	continue;
}
if (chara2.rarity >= Rarity.Legendary && !flag4)
if (chara2.rarity >= Rarity.Legendary && !flag5)
{
	num6--;
	num7--;
	continue;
}
long num7 = -1L;
long num8 = -1L;
n = actRef.n1;
if (!(n == "shadow"))
{

void AddCon<T>(int rate, int p2) where T : Condition

cs
	}
	else
	{
		int num8 = 1;
		int num9 = 1;
		if (!CC.IsPC)
		{
			num8 = (CC.IsPCFactionOrMinion ? (CC.LV / 2) : (CC.LV / 3 * 2));
			num9 = (CC.IsPCFactionOrMinion ? (CC.LV / 2) : (CC.LV / 3 * 2));
		}
		if (num5 == -1)
		if (num6 == -1)
		{
			num7 = chara2.LV * (100 + power / 10) / 100 + power / 30;
			num8 = chara2.LV * (100 + power / 10) / 100 + power / 30;
		}
		if (num7 < num8)
		if (num8 < num9)
		{
			num7 = num8;
			num8 = num9;
		}
		if (num7 > 99999999)
		if (num8 > 99999999)
		{
			num7 = 99999999L;
			num8 = 99999999L;
		}
	}
}
else
{
	num7 = power / 10 + 1;
	num8 = power / 10 + 1;
}
if (chara2.LV < num7)
if (chara2.LV < num8)
{
	chara2.SetLv((int)num7);
	chara2.SetLv((int)num8);
}
chara2.interest = 0;
if (chara2.HaveFur())

void AddCon<T>(int rate, int p2) where T : Condition

cs
	{
		chara2.MakeMinion(CC);
	}
	if (num4 != -1)
	if (num5 != -1)
	{
		chara2.SetSummon(num4);
		chara2.SetSummon(num5);
	}
	flag3 = true;
	flag4 = true;
}
if (!flag3)
if (!flag4)
{
	CC.Say("summon_ally_fail", CC);
}

void AddCon<T>(int rate, int p2) where T : Condition

cs
}
case EffectId.Breathe:
{
	List<Point> list5 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
	if (list5.Count == 0)
	List<Point> list6 = EClass._map.ListPointsInArc(CC.pos, tp, 7, 35f);
	if (list6.Count == 0)
	{
		list5.Add(CC.pos.Copy());
		list6.Add(CC.pos.Copy());
	}
	CC.Say("spell_breathe", CC, element.Name.ToLower());
	EClass.Wait(0.8f, CC);

void AddCon<T>(int rate, int p2) where T : Condition

cs
	{
		Shaker.ShakeCam("breathe");
	}
	DamageEle(CC, id, power, element, list5, actRef, "spell_breathe");
	DamageEle(CC, id, power, element, list6, actRef, "spell_breathe");
	return;
}
case EffectId.Scream:

void AddCon<T>(int rate, int p2) where T : Condition

cs
case EffectId.Flare:
case EffectId.GravityGun:
{
	float radius2 = ((id == EffectId.GravityGun) ? 4f : ((id == EffectId.Rocket) ? 2.8f : ((id == EffectId.Suicide) ? 3.5f : ((id == EffectId.Flare) ? 2.1f : ((float)((id == EffectId.BallBubble) ? 2 : 5))))));
	float radius = ((id == EffectId.GravityGun) ? 4f : ((id == EffectId.Rocket) ? 2.8f : ((id == EffectId.Suicide) ? 3.5f : ((id == EffectId.Flare) ? 2.1f : ((float)((id == EffectId.BallBubble) ? 2 : 5))))));
	if ((id == EffectId.Explosive || id == EffectId.Rocket) && actRef.refThing != null)
	{
		radius2 = 2 + actRef.refThing.Evalue(666);
		radius = 2 + actRef.refThing.Evalue(666);
	}
	if (id == EffectId.Suicide)
	{

void AddCon<T>(int rate, int p2) where T : Condition

cs
	}
	if (CC.HasTag(CTAG.kamikaze))
	{
		radius2 = 1.5f;
		radius = 1.5f;
	}
	CC.SetBool(137, enable: true);
}
bool flag5 = id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket;
List<Point> list9 = EClass._map.ListPointsInCircle((id == EffectId.GravityGun || id == EffectId.Rocket || id == EffectId.Flare) ? tp : cc.pos, radius2, !flag5, !flag5);
if (list9.Count == 0)
bool flag3 = id == EffectId.Explosive || id == EffectId.Suicide || id == EffectId.Rocket;
List<Point> list10 = EClass._map.ListPointsInCircle((id == EffectId.GravityGun || id == EffectId.Rocket || id == EffectId.Flare) ? tp : cc.pos, radius, !flag3, !flag3);
if (list10.Count == 0)
{
	list9.Add(cc.pos.Copy());
	list10.Add(cc.pos.Copy());
}
cc.Say((id == EffectId.Suicide) ? "abSuicide" : "spell_ball", cc, element.Name.ToLower());
EClass.Wait(0.8f, cc);

void AddCon<T>(int rate, int p2) where T : Condition

cs
{
	Shaker.ShakeCam("ball");
}
DamageEle(actRef.origin ?? cc, id, power, element, list9, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
DamageEle(actRef.origin ?? cc, id, power, element, list10, actRef, (id == EffectId.Suicide) ? "suicide" : "spell_ball");
CC.SetBool(137, enable: false);
if (id == EffectId.Suicide && CC.IsAliveInCurrentZone)
{
	CC.Die();

void AddCon<T>(int rate, int p2) where T : Condition

cs
}
case EffectId.Bolt:
{
	List<Point> list6 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
	if (list6.Count == 0)
	List<Point> list8 = EClass._map.ListPointsInLine(CC.pos, tp, 10);
	if (list8.Count == 0)
	{
		list6.Add(CC.pos.Copy());
		list8.Add(CC.pos.Copy());
	}
	CC.Say("spell_bolt", CC, element.Name.ToLower());
	EClass.Wait(0.8f, CC);

void AddCon<T>(int rate, int p2) where T : Condition

cs
	{
		Shaker.ShakeCam("bolt");
	}
	DamageEle(CC, id, power, element, list6, actRef, "spell_bolt");
	DamageEle(CC, id, power, element, list8, actRef, "spell_bolt");
	return;
}
case EffectId.Bubble:

CINT ​

public class CINT

cs
	public const int isSleepLock = 135;

	public const int isSummonDropCorpse = 136;
	public const int isAlreadyCommitedSuicide = 137;
}

Chara ​

public bool IsHostile(Chara c)

cs
}
if (base.IsPCFactionOrMinion)
{
	if ((c == EClass.pc.enemy && !c.IsPCFactionOrMinion) || c.hostility <= Hostility.Enemy)
	if (((c == EClass.pc.enemy || c == enemy) && !c.IsPCFactionOrMinion) || c.hostility <= Hostility.Enemy)
	{
		return true;
	}

CoreDebug ​

public void UpdateInput()

cs
}
if (Input.GetKeyDown(KeyCode.F4))
{
	for (int j = 0; j < 1000; j++)
	{
		EClass.pc.ModExp(241, 1000);
	}
	string text2 = new string[4] { "エã‚ŋãƒŧナãƒĢフりãƒŧ゚ブãƒĒã‚ļãƒŧド", "Eternal Force Blizzard", "ãŦるãŊ", "Null Pointer" }.RandomItem();
	EClass.pc.renderer.Say("| " + text2 + " ");
	LayerDrama.Activate("sorin", "sorin", "quest_nevernight1");
	return;
}
if (Input.GetKeyDown(KeyCode.F5))
{
	string text3 = (Input.GetKey(KeyCode.LeftControl) ? "quick3" : (Input.GetKey(KeyCode.LeftShift) ? "quick2" : "quick"));
	if (text3 != Game.id)
	string text2 = (Input.GetKey(KeyCode.LeftControl) ? "quick3" : (Input.GetKey(KeyCode.LeftShift) ? "quick2" : "quick"));
	if (text2 != Game.id)
	{
		IO.DeleteDirectory(CorePath.RootSave + text3);
		IO.CopyAll(CorePath.RootSave + Game.id, CorePath.RootSave + text3);
		Game.id = text3;
		IO.DeleteDirectory(CorePath.RootSave + text2);
		IO.CopyAll(CorePath.RootSave + Game.id, CorePath.RootSave + text2);
		Game.id = text2;
	}
	EClass.game.isCloud = false;
	EClass.game.Save();

Dialog ​

public override void OnUpdateInput()

cs
}
foreach (EInput.KeyMap item in ELayer.core.config.input.keys.List())
{
	if (item.key == value && item.GetGroup() == keymap.GetGroup())
	if (keymap.action != EAction.None && item.key == value && item.GetGroup() == keymap.GetGroup())
	{
		item.key = keymap.key;
	}

DramaEventTalk ​

public class DramaEventTalk : DramaEvent

cs
public bool unknown;

public bool ignoreClickSound;
public float timer;

public Func<string> funcText;

public override bool Play()

cs
{
	sequence.tempEvents.Clear();
}
EClass.Sound.Play("click_chat");
if (!ignoreClickSound)
{
	EClass.Sound.Play("click_chat");
}
if (idCancelJump == "back")
{
	return true;

public override bool Play()

cs
	return false;
}
base.actor.gameObject.SetActive(value: false);
EClass.Sound.Play("click_chat");
if (!ignoreClickSound)
{
	EClass.Sound.Play("click_chat");
}
if (temp)
{
	sequence.tempEvents.Clear();

DramaManager ​

public void ParseLine(Dictionary<string, string> item)

cs
		}
		return text2;
	})) as DramaEventTalk;
	lastTalk.ignoreClickSound = action == "ignoreClickSound";
	lastTalk.center = p2 == "center";
	break;
case "new":

EVENT ​

public class ElinDramaParseActionEventArgs : ElinEventArgs<string>

cs
public const string ModsActivated = "elin.mods.activated";

public const string WidgetMetasBuilding = "elin.widget.metas_building";
public const string SourceImporting = "elin.source.importing";

public const string SourceImported = "elin.source.imported";

GameDate ​

public void AdvanceDay()

cs
{
	EClass.game.quests.Add("stone_dream", "loytel");
}
if (EClass.game.quests.IsCompleted("stone_dream") && !EClass.game.quests.IsAdded("nevernight"))
{
	EClass.game.quests.Add("nevernight", "sorin");
}
if (EClass.game.quests.IsCompleted("exploration"))
{
	EClass.player.flags.daysAfterQuestExploration++;

GameIO ​

public static void ClearTemp()

cs
public static GameIndex SaveGame()
{
	string text = JsonConvert.SerializeObject(EClass.core.game, formatting, jsWriteGame);
	string path = pathCurrentSave + "game.txt";
	GameIndex gameIndex = new GameIndex().Create(EClass.core.game);
	gameIndex.id = Game.id;
	gameIndex.cloud = EClass.game.isCloud;
	IO.SaveFile(pathCurrentSave + "index.txt", gameIndex);
	if (compressSave)
	{
		IO.Compress(path, text);
	}
	else
	{
		File.WriteAllText(path, text);
	}
	GameIndex gameIndex = WriteGame(pathCurrentSave);
	DirectoryInfo[] directories = new DirectoryInfo(pathCurrentSave).GetDirectories();
	foreach (DirectoryInfo directoryInfo in directories)
	{

public static GameIndex SaveGame()

cs
	return gameIndex;
}

public static void SaveGameCopy(string path)
{
	IO.CopyDir(pathCurrentSave, path, (string s) => s == "Temp");
	IO.DeleteFile(path + "cloud.zip");
	foreach (Zone zone in EClass.game.spatials.Zones)
	{
		if (zone.map != null)
		{
			zone.map.Save(path + zone.uid + "/");
		}
	}
	EClass.game.version = EClass.core.version;
	WriteGame(path);
}
public static GameIndex WriteGame(string root)
{
	string text = JsonConvert.SerializeObject(EClass.core.game, formatting, jsWriteGame);
	string path = root + "game.txt";
	GameIndex gameIndex = new GameIndex().Create(EClass.core.game);
	gameIndex.id = Game.id;
	gameIndex.cloud = EClass.game.isCloud;
	IO.SaveFile(root + "index.txt", gameIndex);
	if (compressSave)
	{
		IO.Compress(path, text);
	}
	else
	{
		File.WriteAllText(path, text);
	}
	return gameIndex;
}
public static void MakeBackup(GameIndex index, string suffix = "")
{
	Debug.Log("Start backup:" + index.id);

LayerConfig ​

public override void OnInit()

cs
		ELayer.ui.AddLayer<LayerConfig>();
	});
});
windows[0].AddBottomButton("LayerMod", delegate
{
	ELayer.ui.AddLayer<LayerMod>();
});
List<PostEffectProfile> list = (from p in Resources.LoadAll<PostEffectProfile>("Scene/Profile/PostEffect/")
	where !p.disable
	select p).ToList();

LayerFeedback ​

void Append(string text)

cs
};
category.Init((string s) => ("form_" + s).lang());
List<GameIndex> gameList = GameIO.GetGameList((ELayer.core.config.cloud || (ELayer.core.IsGameStarted && ELayer.game.isCloud)) ? CorePath.RootSaveCloud : CorePath.RootSave);
if (ELayer.core.IsGameStarted)
{
	gameList.Insert(0, null);
}
if (gameList.Count > 0)
{
	int index = 0;
	saveIndex = gameList[0];
	for (int num = 0; num < gameList.Count; num++)
	{
		if (ELayer.core.IsGameStarted && gameList[num].id == Game.id)
		{
			index = num;
			saveIndex = gameList[num];
		}
	}
	ddSave.SetList(index, gameList, (GameIndex a, int b) => ((ELayer.core.IsGameStarted && a.id == Game.id) ? "currentSave".lang() : "") + a.FormTitle, delegate(int a, GameIndex b)
	ddSave.SetList(0, gameList, (GameIndex a, int b) => (a != null) ? a.FormTitle : "feedbackCurrentSave".lang(), delegate(int a, GameIndex b)
	{
		saveIndex = b;
	});

public void Validate()

cs
public void CollectFiles()
{
	byte[] array = (toggleSave.isOn ? ZipSave() : null);
	ReportTitle.ignore = false;
	ReportTitle.strAdd = "";
	TextField.strAddText = "";

public void CollectFiles()

cs
}
string text4 = inputDetail.text;
int num = 0;
string[] array = new string[23]
string[] array2 = new string[23]
{
	"ã‚ˇãƒŧナã‚Ģãƒŗã‚š", "ナãƒŧフ", "つぞらãĒい", "éĸį™ŊくãĒい", "ä¸åˆį†", "やめãĻ", "į„Ąé§„", "åŧąäŊ“化", "不čĻĒ切", "クã‚Ŋ",
	"įŗž", "バã‚Ģ", "éĻŦéšŋ", "coelacanth", "nerf", "boring", "please don't", "waste", "fuck", "suck",
	"tbh", "shit", "stupid"
};
foreach (string c in array)
foreach (string c in array2)
{
	num += CountString(text4, c);
}

public void CollectFiles()

cs
	zipFile.Save(text3);
}
form.CurrentReport.AttachFile("log.zip", File.ReadAllBytes(text3));
if (toggleSave.isOn)
if (array != null)
{
	bool flag = ELayer.core.config.cloud || (ELayer.core.IsGameStarted && ELayer.game.isCloud);
	string text5 = text2 + "/save.zip";
	using (ZipFile zipFile2 = new ZipFile())
	{
		zipFile2.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
		zipFile2.AddDirectory((flag ? CorePath.RootSaveCloud : CorePath.RootSave) + saveIndex.id);
		zipFile2.Save(text5);
	}
	form.CurrentReport.AttachFile(saveIndex.id + ".zip", File.ReadAllBytes(text5));
	form.CurrentReport.AttachFile((saveIndex?.id ?? Game.id) + ".zip", array);
}
IO.DeleteDirectory(text2);
static int CountString(string s, string text6)
static int CountString(string s, string text5)
{
	string newValue = text6.Substring(0, text6.Length - 1);
	return s.Length - s.Replace(text6, newValue).Length;
	string newValue = text5.Substring(0, text5.Length - 1);
	return s.Length - s.Replace(text5, newValue).Length;
}
void ParseLog(string path)
{
	if (File.Exists(path))
	{
		string[] array2 = IO.LoadTextArray(path);
		foreach (string text6 in array2)
		string[] array3 = IO.LoadTextArray(path);
		foreach (string text5 in array3)
		{
			switch (text6)
			switch (text5)
			{
			case "InvalidOperationException: Collection was modified; enumeration operation may not execute.":
			case "NullReferenceException: Object reference not set to an instance of an object":
				errors++;
				break;
			default:
				if (text6.Contains("exception"))
				if (text5.Contains("exception"))
				{
					errors++;
				}
				else if (text6.Contains("Exception"))
				else if (text5.Contains("Exception"))
				{
					errors++;
				}

void ParseLog(string path)

cs
	}
}

private byte[] ZipSave()
{
	bool flag = ELayer.core.config.cloud || (ELayer.core.IsGameStarted && ELayer.game.isCloud);
	string text = ((saveIndex == null) ? (Application.persistentDataPath + "/_temp_save") : ((flag ? CorePath.RootSaveCloud : CorePath.RootSave) + saveIndex.id));
	try
	{
		if (saveIndex == null)
		{
			IO.DeleteDirectory(text);
			GameIO.SaveGameCopy(text + "/");
		}
		using ZipFile zipFile = new ZipFile();
		using MemoryStream memoryStream = new MemoryStream();
		zipFile.AddDirectory(text);
		zipFile.Save(memoryStream);
		return memoryStream.ToArray();
	}
	catch (Exception exception)
	{
		Debug.LogException(exception);
		return null;
	}
	finally
	{
		if (saveIndex == null)
		{
			IO.DeleteDirectory(text);
		}
	}
}
public void OnCancel()
{
	lastDetail = inputDetail.text;

LayerMod ​

private UIList.Callback<object, ItemMod> CreateCallbacks(UIList target, bool buiâ€Ļ)

cs
private void SetModRow(ModPackage a, ItemMod b)
{
	b.package = a;
	string title = ((a.group != null && !HasFilter) ? "   " : "") + (ELayer.core.mods.packages.IndexOf(a) + 1) + ". " + (a.isInPackages ? "[Local] " : "") + a.title.IsEmpty(a.dirInfo.Name);
	b.buttonActivate.mainText.SetText(FitTitle(b.buttonActivate.mainText, title), (!a.IsValidVersion() || a.blockedBy != null || !a.langDepError.IsEmpty()) ? FontColor.Bad : (a.activated ? FontColor.ButtonGeneral : FontColor.Passive));
	string s = ((a.group != null && !HasFilter) ? "   " : "") + (ELayer.core.mods.packages.IndexOf(a) + 1) + ". " + (a.isInPackages ? "[Local] " : "") + a.title.IsEmpty(a.dirInfo.Name);
	b.buttonActivate.mainText.SetText(b.buttonActivate.mainText.Fit(s), (!a.IsValidVersion() || a.blockedBy != null || !a.langDepError.IsEmpty()) ? FontColor.Bad : (a.activated ? FontColor.ButtonGeneral : FontColor.Passive));
	b.buttonActivate.subText.text = a.version;
	b.buttonLock.mainText.text = a.author;
	ItemMod itemMod = ((a.group != null && !HasFilter) ? list.GetPair<ItemMod>(a.group) : null);

private void SetGroupRow(ModGroup g, ItemMod b)

cs
{
	List<BaseModPackage> members = Members(g);
	int on = members.Count((BaseModPackage p) => p.willActivate);
	string title = ((members.Count == 0) ? "" : (g.collapsed ? "[+] " : "[-] ")) + g.name;
	string s = ((members.Count == 0) ? "" : (g.collapsed ? "[+] " : "[-] ")) + g.name;
	UIText mainText = b.buttonActivate.mainText;
	mainText.fontStyle = FontStyle.Bold;
	mainText.SetText(FitTitle(mainText, title, (members.Count > 0) ? (" (" + on + "/" + members.Count + ")") : ""), FontColor.Topic);
	mainText.SetText(mainText.Fit(s, (members.Count > 0) ? (" (" + on + "/" + members.Count + ")") : ""), FontColor.Topic);
	Color topic = mainText.color;
	Color? color = g.color;
	if (color.HasValue)

private void InputGroupName(string text, Action<string> onInput)

cs
	});
}

private static string FitTitle(UIText text, string title, string suffix = "")
{
	TextGenerationSettings generationSettings = text.GetGenerationSettings(Vector2.zero);
	TextGenerator cachedTextGeneratorForLayout = text.cachedTextGeneratorForLayout;
	float num = text.rectTransform.rect.width * text.pixelsPerUnit;
	if (cachedTextGeneratorForLayout.GetPreferredWidth(title + suffix, generationSettings) <= num)
	{
		return title + suffix;
	}
	int num2 = title.Length;
	while (num2 > 1 && cachedTextGeneratorForLayout.GetPreferredWidth(title[..num2].TrimEnd() + ".." + suffix, generationSettings) > num)
	{
		num2--;
	}
	return title[..num2].TrimEnd() + ".." + suffix;
}
private bool Match(BaseModPackage p)
{
	if (!searchCache.TryGetValue(p, out var value))

LayerModConfig ​

using System;

cs
using System;
using UnityEngine;

public class LayerModConfig : ELayer
{

public class LayerModConfig : ELayer

cs
public UIButton buttonFile;

public Transform moldLine;
public ModPackage current;

public static void Open(ModPackage p)

public void Show(ModPackage p)

cs
		{
			ModUtil.LogModError(ex.ToString(), p);
		}
		Transform transform = note.transform;
		for (int num = transform.childCount - 1; num >= 0; num--)
		{
			if (transform.GetChild(num).name == "HeaderNote(Clone)")
			{
				Util.Instantiate(moldLine, transform).SetSiblingIndex(num + 1);
			}
		}
		note.Build();
	}
}

LayerSkinDeco ​

public class LayerSkinDeco : ELayer

cs
public SkinConfig cfg => widget.config.skin;

public static List<Sprite> GetCustomSprites()
public static List<Sprite> GetCustomSprites(bool rescan = false)
{
	if (customSprites == null)
	if (customSprites == null || rescan)
	{
		customSprites = new List<Sprite>();
		string[] files = Directory.GetFiles(CorePath.custom + "Deco");
		foreach (string text in files)
		List<DirectoryInfo> list = new List<DirectoryInfo>
		{
			FileInfo fileInfo = new FileInfo(text); 
			if (fileInfo.Extension == ".png")
			new DirectoryInfo(CorePath.custom + "Deco")
		};
		if (customSprites == null)
		{
			list.AddRange(PackageIterator.GetDirectories("Deco"));
		}
		if (customSprites == null)
		{
			customSprites = new List<Sprite>();
		}
		Dictionary<string, FileInfo> dictionary = new Dictionary<string, FileInfo>();
		foreach (FileInfo item in list.SelectMany((DirectoryInfo d) => d.GetFiles("*.png")))
		{
			dictionary["_" + item.Name] = item;
		}
		foreach (Sprite customSprite in customSprites)
		{
			dictionary.Remove(customSprite.name);
		}
		foreach (KeyValuePair<string, FileInfo> item2 in dictionary)
		{
			item2.Deconstruct(out var key, out var value);
			string text = key;
			Texture2D texture2D = IO.LoadPNG(value.FullName, FilterMode.Bilinear);
			if ((bool)texture2D)
			{
				Texture2D texture2D = IO.LoadPNG(text, FilterMode.Bilinear);
				Sprite sprite = Sprite.Create(texture2D, new Rect(0f, 0f, texture2D.width, texture2D.height), new Vector2(0.5f, 0.5f));
				sprite.name = "_" + fileInfo.Name;
				sprite.name = text;
				customSprites.Add(sprite);
			}
		}

public override void OnUpdateInput()

cs
		m.Hide();
	}
};
foreach (Sprite item in Resources.LoadAll<Sprite>("Media/Graphics/Deco/").Concat(GetCustomSprites()))
foreach (Sprite item in Resources.LoadAll<Sprite>("Media/Graphics/Deco/").Concat(GetCustomSprites(rescan: true)))
{
	uIList.Add(item);
}

Map ​

public void Save(string path, ZoneExportData export = null, PartialMap partial =â€Ļ)

cs
			serializedCharas.Add(chara);
		}
	}
	GameIO.SaveFile(path + "map", this);
	try
	{
		GameIO.SaveFile(path + "map", this);
	}
	finally
	{
		serializedCharas.Clear();
	}
}
else
{

Player ​

public void OnEnterZone()

cs
		PlayStory(availableStories[0]);
		availableStories.RemoveAt(0);
	}
	if (!LayerDrama.Instance && !EClass.game.isLoading && EClass._zone.IsPCFaction)
	if ((bool)LayerDrama.Instance || EClass.game.isLoading || !EClass._zone.IsPCFaction)
	{
		if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 0 && EClass.game.quests.GetPhase<QuestNegotiationDarkness>() == 5)
		{
			EClass.game.quests.Get<QuestNegotiationDarkness>().Complete();
			EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
		}
		else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 1)
		{
			EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
		}
		else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 2)
		{
			EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
		}
		else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 3)
		return;
	}
	if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 0 && EClass.game.quests.GetPhase<QuestNegotiationDarkness>() == 5)
	{
		EClass.game.quests.Get<QuestNegotiationDarkness>().Complete();
		EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
	}
	else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 1)
	{
		EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
	}
	else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 2)
	{
		EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
	}
	else if (EClass.game.quests.GetPhase<QuestIntoDarkness>() == 3)
	{
		EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
	}
	if (EClass.game.quests.GetPhase<QuestNevernight>() == 0)
	{
		QuestNevernight questNevernight = EClass.game.quests.Get<QuestNevernight>();
		if (EClass.world.date.GetElapsedHour(questNevernight.dateStarted) >= 24)
		{
			EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
			questNevernight.UpdateOnTalk();
		}
	}
}

QuestEscort ​

public void ReleaseEscort()

cs
		}
		else
		{
			target.SetSummon(60, dropCorpse: true);
			target.SetSummon(60);
		}
	}
}

+QuestNevernight ​

File Created
cs
using Newtonsoft.Json;

public class QuestNevernight : QuestProgression
{
	[JsonProperty]
	public int dateStarted;

	public override string TitlePrefix => "★";

	public override void OnStart()
	{
		dateStarted = EClass.world.date.GetRaw();
	}

	public override bool CanUpdateOnTalk(Chara c)
	{
		if (phase == 6)
		{
			return EClass._zone.IsPCFaction;
		}
		return false;
	}

	public override void OnComplete()
	{
	}
}

Steam ​

public static void QueryAllMyPublished(Action<List<WorkshopItem>> onComplete, Acâ€Ļ)

cs
void ExecutePage()
{
	query.SetReturnKeyValueTags(tags: true);
	query.SetReturnMetadata(metadata: true);
	if (!query.Execute(HandleResults))
	{
		ReportError("UgcQuery.Execute failed at page " + page);

void HandleResults(UgcQuery q)

cs
		else
		{
			query.SetPage(++page);
			ExecutePage();
			EClass.core.actionsNextFrame.Add(ExecutePage);
		}
	}
}

WidgetManager ​

public class SaveData

cs
	public Dictionary<string, Widget.Config> dict;
}

public static readonly List<Func<string, WidgetManager, Widget>> widgetLoaders = new List<Func<string, WidgetManager, Widget>>();
public Dictionary<string, Widget.Meta> metaMap = new Dictionary<string, Widget.Meta>();

public string currentPath;

public void OnGameInstantiated()

cs
		}
	}
}
if (metaMap.Count == 0)
BaseModManager.PublishEvent("elin.widget.metas_building", this);
foreach (Widget.Meta meta in metas)
{
	foreach (Widget.Meta meta in metas)
	{
		metaMap.Add(meta.id, meta);
	}
	metaMap[meta.id] = meta;
}
foreach (Widget.Meta meta2 in metas)
{
	if (!configs.ContainsKey(meta2.id))
	{
		Widget.Config config = new Widget.Config
		{
			meta = meta2,
			valid = true,
			id = meta2.id,
			state = ((!meta2.enabled) ? Widget.State.Inactive : Widget.State.Active),
			locked = meta2.locked 
		};
		config.skin.SetID(0);
		configs.Add(meta2.id, config);
	}
	else
	{
		Widget.Config config2 = configs[meta2.id];
		config2.valid = true;
		config2.meta = meta2;
		configs.Add(meta2.id, CreateConfig(meta2));
		continue;
	}
	Widget.Config config = configs[meta2.id];
	config.valid = true;
	config.meta = meta2;
}
foreach (Widget.Config item2 in configs.Values.ToList())
{

public void OnGameInstantiated()

cs
	}
}

public void RegisterMeta(Widget.Meta meta)
{
	if (meta == null || meta.id.IsEmpty())
	{
		return;
	}
	int num = metas.FindIndex((Widget.Meta m) => m.id == meta.id);
	if (num >= 0)
	{
		metas[num] = meta;
	}
	else
	{
		metas.Add(meta);
	}
	metaMap[meta.id] = meta;
	if (EMono.player?.widgets != null)
	{
		if (configs.TryGetValue(meta.id, out var value))
		{
			value.valid = true;
			value.meta = meta;
		}
		else
		{
			configs.Add(meta.id, CreateConfig(meta));
		}
	}
}
private Widget.Config CreateConfig(Widget.Meta m)
{
	Widget.Config config = new Widget.Config();
	config.meta = m;
	config.valid = true;
	config.id = m.id;
	config.state = ((!m.enabled) ? Widget.State.Inactive : Widget.State.Active);
	config.locked = m.locked;
	config.skin.SetID(0);
	return config;
}
public void OnKillGame()
{
	KillWidgets();

public Widget ActivateWidget(Widget.Config c)

cs
public Widget ActivateWidget(string id)
{
	string text = "Widget" + id;
	Widget widget = Util.Instantiate<Widget>("UI/Widget/" + text, this) ?? Util.Instantiate<Widget>("UI/Widget/" + text + "/" + text, this);
	Widget widget = LoadCustomWidget(id);
	if (!widget)
	{
		widget = Util.Instantiate<Widget>("UI/Widget/" + text, this) ?? Util.Instantiate<Widget>("UI/Widget/" + text + "/" + text, this);
	}
	if (!widget)
	{
		Debug.LogError("Widget:" + id + " not found.");

public Widget ActivateWidget(string id)

cs
	return widget;
}

private Widget LoadCustomWidget(string id)
{
	foreach (Func<string, WidgetManager, Widget> widgetLoader in widgetLoaders)
	{
		try
		{
			Widget widget = widgetLoader(id, this);
			if ((bool)widget)
			{
				return widget;
			}
		}
		catch (Exception exception)
		{
			Debug.LogException(exception);
		}
	}
	return null;
}
public void RefreshWidget(Widget.Config c)
{
	RefreshWidget(GetWidget(c.id));