EA 23.152 Stable
June 10, 2025
11 files modified.
Important Changes
None.
AM_Adv
@@ -291,26 +291,16 @@ public override void OnRenderTile(Point point, HitResult result, int dir)
{
point.Installed.trait.OnRenderTile(point, result, dir);
}
if (!EClass.core.config.game.highlightEnemy)
if (!EClass.core.config.game.highlightEnemy || !point.HasChara)
{
return;
}
foreach (Chara item in point.ListCharas())
foreach (Chara chara in EClass._map.charas)
{
if (!item.IsHostile(EClass.pc))
if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize && EClass.pc.CanSee(chara))
{
continue;
}
{
foreach (Chara chara in EClass._map.charas)
{
if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize)
{
Vector3 vector = chara.pos.Position();
EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);
}
}
break;
Vector3 vector = chara.pos.Position();
EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);
}
}
}
Chara
@@ -9063,7 +9063,7 @@ public void ModCorruption(int a)
if (num != 0)
{
float num2 = (float)a * 100f / (float)Mathf.Max(100 + num * 2, 10);
a = (int)num2 + ((EClass.rndf(1f) > num2 % 1f) ? 1 : 0);
a = (int)num2 + ((EClass.rndf(1f) < num2 % 1f) ? 1 : 0);
}
}
if (a == 0)
ContentConfigGame
@@ -49,6 +49,8 @@ public class ContentConfigGame : ContentConfig
public UIButton toggleSortEach;
public UIButton toggleHighlightEnemy;
public UISelectableGroup groupBackerFilter;
public UISelectableGroup groupBorder;
@@ -145,6 +147,10 @@ public override void OnInstantiate()
{
base.config.game.showShippingResult = on;
});
toggleHighlightEnemy.SetToggle(base.config.game.highlightEnemy, delegate(bool on)
{
base.config.game.highlightEnemy = on;
});
toggleAdvanceMenu.SetToggle(base.config.game.advancedMenu, delegate(bool on)
{
base.config.game.advancedMenu = on;
ContentFaction
using System.Collections.Generic;
using UnityEngine;
public class ContentFaction : EContent
@@ -86,33 +87,46 @@ public void RefreshZones()
{
UIList uIList = listFaction;
uIList.Clear();
uIList.callbacks = new UIList.Callback<Spatial, ItemGeneral>
uIList.callbacks = new UIList.Callback<Zone, ItemGeneral>
{
onClick = delegate(Spatial a, ItemGeneral b)
onClick = delegate(Zone a, ItemGeneral b)
{
if (a is Zone)
{
info.SetZone(a as Zone);
}
info.SetZone(a);
},
onInstantiate = delegate(Spatial a, ItemGeneral b)
onInstantiate = delegate(Zone a, ItemGeneral b)
{
b.SetSound();
b.SetMainText(a.Name);
b.SetMainText(((!a.IsPCFaction) ? "" : ((a == EClass.pc.homeZone) ? "★" : "☆")) + a.Name + ((a.influence == 0) ? "" : (" (" + a.influence + ")")));
b.Build();
}
};
List<Zone> list = new List<Zone>();
foreach (Spatial value in EClass.game.spatials.map.Values)
{
if (value is Zone && value.parent == EClass.pc.currentZone.Region && value.mainFaction == EClass.pc.faction)
if (value is Zone && value.parent == EClass.pc.currentZone.Region && (value.mainFaction == EClass.pc.faction || (value.visitCount != 0 && value is Zone_Town)))
{
uIList.Add(value);
list.Add(value as Zone);
}
}
EClass.game.spatials.ranks.GetList();
list.Sort((Zone a, Zone b) => GetSortVal(b) - GetSortVal(a));
foreach (Zone item in list)
{
uIList.Add(item);
}
uIList.Refresh();
if (uIList.items.Count == 0)
{
info.Clear();
}
static int GetSortVal(Zone z)
{
if (!z.IsPCFaction)
{
return -10000000 + z.source.dev;
}
return 10000000 - z.uid;
}
}
}
FoodEffect
@@ -13,7 +13,7 @@ public static void Proc(Chara c, Thing food)
{
num2 = 0.1f;
}
int num3 = food.Evalue(10);
int num3 = Mathf.Clamp(food.Evalue(10), 0, 10000);
float num4 = 25f;
float num5 = 1f;
string idTaste = "";
Point
public void CallGuard(Chara criminal, Chara caller)
{
if (caller.HasCondition<ConSleep>())
{
caller.RemoveCondition<ConSleep>();
}
caller.Talk("callGuards");
List<Chara> list = EClass._map.charas.Where((Chara c) => c.trait is TraitGuard && !c.IsInCombat).ToList();
if (list.Count > 0)
TraitDiary
@@ -9,6 +9,7 @@ public override void OnRead(Chara c)
}
Msg.Say("diary_" + GetParam(1));
Chara chara = CharaGen.Create(GetParam(1));
chara.c_daysWithPC = EClass.player.stats.days + 365 + EClass.rnd(365);
EClass._zone.AddCard(chara, EClass.pc.pos.GetNearestPoint(allowBlock: false, allowChara: false));
chara.MakeAlly(msg: false);
chara.PlaySound("identify");
TraitTeleporter
@@ -130,4 +130,13 @@ public override void SetName(ref string s)
s = "_engraved".lang(id, s);
}
}
public override bool CanStackTo(Thing to)
{
if (id != to.GetStr(31))
{
return false;
}
return base.CanStackTo(to);
}
}
TraitViewMap
public class TraitViewMap : TraitItem
{
public override bool CanUseInUserZone => true;
public override bool OnUse(Chara c)
{
ActionMode.ViewMap.Activate();
UIFactionInfo
using System.Collections.Generic;
using System.Linq;
using DG.Tweening;
using UnityEngine;
using UnityEngine.UI;
@@ -122,48 +123,62 @@ public void SetZone(Zone _zone)
{
zone = _zone;
FactionBranch branch = zone.branch;
bool isPCFaction = zone.IsPCFaction;
RankedZone rankedZone = (from a in EMono.game.spatials.ranks.GetList()
where a.z == zone
select a).First();
gx = zone.x;
gy = zone.y;
note.Clear();
note.AddHeader("HeaderNoteFaction", zone.Name);
note.AddTopic("mainFaction", zone.mainFaction.Name ?? "");
note.AddTopic("branchLv", branch.TextLv);
note.AddTopic("wealth", branch.resources.worth.value.ToFormat() ?? "");
note.AddTopic("influence", zone.influence.ToString() ?? "");
if (isPCFaction)
{
note.AddTopic("branchLv", branch.TextLv);
}
note.AddTopic("wealth", (isPCFaction ? branch.resources.worth.value : rankedZone.value).ToFormat() ?? "");
note.AddTopic("ranking", EMono.game.spatials.ranks.GetRankText(zone) ?? "");
note.AddTopic("rank_income", "rank_income2".lang(EMono.game.spatials.ranks.GetIncome(zone).ToFormat()));
note.Space();
note.AddHeaderTopic("landfeat".lang());
List<Element> list = _zone.ListLandFeats();
for (int i = 0; i < list.Count; i++)
if (isPCFaction)
{
note.AddText(list[i].Name + (((i == 1 && branch.lv < 4) || (i == 2 && branch.lv < 7)) ? "landfeat_locked".lang() : ""));
note.AddTopic("rank_income", "rank_income2".lang(EMono.game.spatials.ranks.GetIncome(zone).ToFormat()));
}
note.Space();
note.AddHeaderTopic("listRoamers".lang());
int num = 0;
foreach (Chara value in EMono.game.cards.globalCharas.Values)
if (isPCFaction)
{
if (value.homeBranch == branch)
note.Space();
note.AddHeaderTopic("landfeat".lang());
List<Element> list = _zone.ListLandFeats();
for (int i = 0; i < list.Count; i++)
{
note.AddText(list[i].Name + (((i == 1 && branch.lv < 4) || (i == 2 && branch.lv < 7)) ? "landfeat_locked".lang() : ""));
}
note.Space();
note.AddHeaderTopic("listRoamers".lang());
int num = 0;
foreach (Chara value in EMono.game.cards.globalCharas.Values)
{
note.AddText(value.Name);
num++;
if (num > 5)
if (value.homeBranch == branch)
{
break;
note.AddText(value.Name);
num++;
if (num > 5)
{
break;
}
}
}
}
if (num == 0)
{
note.AddText("????????");
}
note.Space();
note.AddHeaderTopic("listPolicies".lang());
foreach (Element value2 in branch.elements.dict.Values)
{
if (value2.source.category == "policy")
if (num == 0)
{
note.AddText("????????");
}
note.Space();
note.AddHeaderTopic("listPolicies".lang());
foreach (Element value2 in branch.elements.dict.Values)
{
note.AddText(value2.Name);
if (value2.source.category == "policy")
{
note.AddText(value2.Name);
}
}
}
note.Build();
Zone
@@ -1188,6 +1188,7 @@ public void Simulate()
VirtualDate virtualDate = new VirtualDate(HourSinceLastActive);
List<Chara> list = EClass._map.charas.ToList();
int num2 = HourSinceLastActive / 24;
int num3 = 0;
if (num2 > 0)
{
foreach (Chara item in list)
@@ -1210,21 +1211,25 @@ public void Simulate()
}
}
}
EClass._map.things.ForeachReverse(delegate(Thing t)
{
t.DecayNatural(HourSinceLastActive);
});
VirtualDate.current = virtualDate;
for (int i = 0; i < HourSinceLastActive; i++)
{
virtualDate.SimulateHour();
if (!virtualDate.IsWinter)
{
num3++;
}
}
EClass._map.things.ForeachReverse(delegate(Thing t)
{
t.DecayNatural(HourSinceLastActive);
});
VirtualDate.current = null;
if (!IsPCFaction)
{
return;
}
int num3 = 0;
int num4 = 0;
foreach (Chara item2 in list)
{
if (item2.IsPCParty)
@@ -1235,7 +1240,7 @@ public void Simulate()
{
if (item2.id == "bee")
{
num3++;
num4++;
}
if (num2 > 0 && item2.IsGuest())
{
@@ -1275,11 +1280,11 @@ public void Simulate()
list2.Add(thing);
}
}
if (num3 >= list2.Count)
if (num4 >= list2.Count)
{
return;
}
for (int j = num3; j < list2.Count; j++)
for (int j = num4; j < list2.Count; j++)
{
if (EClass.rnd(200) <= HourSinceLastActive)
{