EA 23.71 Nightly
January 1, 2025
27 files modified. 1 new file created.
Important Changes
Possible breaking changes. Click the filename to view the chunk.
Party (1)
public void AddMemeber(Chara c)
public void AddMemeber(Chara c, bool showMsg = false)
AI_Bladder
@@ -34,8 +34,13 @@ public override IEnumerable<Status> Run()
{
if (toilet == null || !toilet.ExistsOnMap || !toilet.owner.pos.Equals(owner.pos))
{
owner.hygiene.Mod(-30);
EClass._map.SetLiquid(owner.pos.x, owner.pos.z, 1, 3);
}
else
{
owner.hygiene.Mod(10);
}
owner.ShowEmo(Emo.happy);
}
}.SetDuration(15, 5);
AI_Fuck
@@ -118,16 +118,25 @@ public override IEnumerable<Status> Run()
{
num += 100;
}
if (tc.affinity.CurrentStage < Affinity.Stage.Intimate && EClass.rnd(6 * num / 100) == 0)
if (tc == cc)
{
num = 50;
}
else if (tc.affinity.CurrentStage < Affinity.Stage.Intimate && EClass.rnd(6 * num / 100) == 0)
{
tc.AddCondition<ConFear>(60);
}
tc.interest -= (tc.IsPCFaction ? 20 : (2 * num / 100));
if (i == 0 || i == 10)
{
cc.Talk("goodBoy");
}
if (i % 5 == 0)
{
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 / 15, 0, 20)));
int a = 15;
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 a = 20;
if (tc.IsPCFactionOrMinion && tc.affinity.CurrentStage >= Affinity.Stage.Fond)
{
num3 = ((EClass.rnd(3) == 0) ? 4 : 0);
@@ -136,12 +145,10 @@ public override IEnumerable<Status> Run()
totalAffinity += num3;
tc.ModAffinity(EClass.pc, num3, show: true, showOnlyEmo: true);
cc.elements.ModExp(237, a);
Debug.Log(num3 + "/" + tc._affinity);
}
tc.interest -= (tc.IsPCFaction ? 20 : (2 * num / 100));
if (i == 0 || i == 10)
{
cc.Talk("goodBoy");
if (EClass.rnd(4) == 0)
{
cc.stamina.Mod(-1);
}
}
break;
}
@@ -272,6 +279,14 @@ public void Finish()
case FuckType.tame:
{
int num = ((!chara2.IsPCFaction) ? (chara2.IsHuman ? 10 : 5) : (chara2.IsHuman ? 5 : 0));
Msg.Say("tame_end", target);
target.PlaySound("groomed");
target.PlayEffect("heal_tick");
target.hygiene.Mod(15);
if (target == owner)
{
break;
}
if (totalAffinity > 0)
{
chara.Say("brush_success", target, owner);
AI_Idle
@@ -135,7 +135,7 @@ public override IEnumerable<Status> Run()
}
}
}
if (actRevive != null && EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.GetInt(103) != 0).ToList().Count > 0 && owner.UseAbility(actRevive.source.alias, owner))
if (actRevive != null && EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList().Count > 0 && owner.UseAbility(actRevive.source.alias, owner))
{
yield return KeepRunning();
}
@@ -592,7 +592,7 @@ public override IEnumerable<Status> Run()
});
yield return Restart();
}
if (!owner.IsPCFactionOrMinion && EClass.rnd(owner.isSynced ? 50 : 2000) == 0 && owner.hostility == Hostility.Neutral && EClass.pc.party.HasElement(1563) && !owner.race.tag.Contains("animal") && EClass._zone.IsTown && !EClass._zone.IsPCFaction)
if (!owner.IsPCFactionOrMinion && EClass.rnd(owner.isSynced ? 50 : 2000) == 0 && owner.hostility == Hostility.Neutral && EClass.pc.party.HasElement(1563) && !owner.race.tag.Contains("animal") && EClass._zone.IsTown && !EClass._zone.IsPCFaction && !owner.HasCondition<ConIncognito>())
{
EClass.pc.DoHostileAction(owner);
}
AI_Slaughter
@@ -73,6 +73,7 @@ public override IEnumerable<Status> Run()
EClass._zone.AddCard(fur, target.pos);
}
slaughtering = true;
target.SetSale(sale: false);
target.Die();
Msg.Say("goto_heaven", target);
slaughtering = false;
ActEffect
{
chara2.SetLv(num6);
}
chara2.interest = 0;
if (chara2.HaveFur())
{
chara2.c_fur = -1;
}
string n = actRef.n1;
if (!(n == "shadow"))
{
break;
case EffectId.Revive:
{
List<KeyValuePair<int, Chara>> list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.GetInt(103) != 0).ToList();
List<KeyValuePair<int, Chara>> list3 = EClass.game.cards.globalCharas.Where((KeyValuePair<int, Chara> a) => a.Value.isDead && a.Value.faction == EClass.pc.faction && !a.Value.isSummon && a.Value.c_wasInPcParty).ToList();
if (TC.IsPCFaction || TC.IsPCFactionMinion)
{
if (TC.IsPC && list3.Count == 0)
BaseWidgetNotice
@@ -16,6 +16,8 @@ public class BaseWidgetNotice : Widget
private bool activating = true;
protected bool dirty;
public sealed override void OnActivate()
{
if (!mold)
@@ -50,7 +52,6 @@ private void OnDisable()
public void _RefreshAll()
{
OnRefresh();
bool rebuild = false;
foreach (BaseNotification i in list)
{
i.Refresh();
@@ -60,16 +61,17 @@ public void _RefreshAll()
{
i.item.button.RebuildLayout(recursive: true);
}
rebuild = true;
dirty = true;
});
}
if (rebuild)
if (dirty)
{
layout.RebuildLayout();
if ((bool)layout2)
{
layout2.RebuildLayout(recursive: true);
}
dirty = false;
}
}
BuildMenu
@@ -570,7 +570,7 @@ public void RefreshCategory(string cat)
}
foreach (RecipeSource item in RecipeManager.list)
{
if (EMono.debug.godBuild || (!item.noListing && !item.row.tileType.EditorTile && EMono.player.recipes.IsKnown(item.id) && (item.row.factory.Length == 0 || !(item.row.factory[0] == "none"))))
if (EMono.debug.godBuild || !(item.row.GetAlias != "block_invisi") || (!item.noListing && !item.row.tileType.EditorTile && EMono.player.recipes.IsKnown(item.id) && (item.row.factory.Length == 0 || !(item.row.factory[0] == "none"))))
{
counts[item.recipeCat]++;
if (!(item.recipeCat != cat))
Card
@@ -956,6 +956,18 @@ public int c_vomit
}
}
public bool c_wasInPcParty
{
get
{
return GetInt(103) != 0;
}
set
{
SetInt(103, value ? 1 : 0);
}
}
public bool c_isImportant
{
get
Chara
@@ -3274,6 +3274,17 @@ public void TickConditions()
ModExp(226, (EClass._zone.IsRegion ? 5 : 40) * 100 / Mathf.Max(100, 100 + (elements.Base(226) - ride.LV) * 25));
}
break;
case 3:
{
int phase = hygiene.GetPhase();
int num = 0;
num = ((!IsPC) ? ((phase > 3) ? 50 : 0) : ((phase > 3) ? 50 : 10));
if (num > EClass.rnd(100))
{
hygiene.Mod(-1);
}
break;
}
}
if (turn % 500 == 0)
{
@@ -3285,13 +3296,13 @@ public void TickConditions()
{
CalcBurden();
}
int phase = burden.GetPhase();
int phase2 = hunger.GetPhase();
if (phase2 >= 4)
int phase2 = burden.GetPhase();
int phase3 = hunger.GetPhase();
if (phase3 >= 4)
{
preventRegen = true;
}
if (EClass.rnd(EClass._zone.IsRegion ? 100 : 30) == 0 && phase >= 3)
if (EClass.rnd(EClass._zone.IsRegion ? 100 : 30) == 0 && phase2 >= 3)
{
Say("dmgBurden", this);
DamageHP(MaxHP * (base.ChildrenWeight * 100 / WeightLimit) / 1000 + 1, AttackSource.Burden);
@@ -3304,9 +3315,9 @@ public void TickConditions()
{
if (IsPC)
{
if (phase > 0)
if (phase2 > 0)
{
ModExp(207, 1 + phase * phase);
ModExp(207, 1 + phase2 * phase2);
}
}
else
@@ -3316,7 +3327,7 @@ public void TickConditions()
}
if (IsPC)
{
if (phase2 >= 5)
if (phase3 >= 5)
{
if (!(ai is AI_Eat) && EClass.rnd(5) == 0)
{
@@ -3331,8 +3342,8 @@ public void TickConditions()
{
return;
}
phase2 = stamina.GetPhase();
if (phase2 <= 0)
phase3 = stamina.GetPhase();
if (phase3 <= 0)
{
preventRegen = true;
}
@@ -3357,17 +3368,17 @@ public void TickConditions()
}
if (!IsPC)
{
int num = Evalue(409);
if (num > 0 && turn % 2000 * (100 + Evalue(412) * 2) / (100 + num * 10) == 0)
int num2 = Evalue(409);
if (num2 > 0 && turn % 2000 * (100 + Evalue(412) * 2) / (100 + num2 * 10) == 0)
{
ModCorruption(1);
}
}
for (int num2 = conditions.Count - 1; num2 >= 0; num2--)
for (int num3 = conditions.Count - 1; num3 >= 0; num3--)
{
if (num2 < conditions.Count)
if (num3 < conditions.Count)
{
Condition condition = conditions[num2];
Condition condition = conditions[num3];
if (!condition.TimeBased)
{
condition.Tick();
@@ -3653,6 +3664,10 @@ public override void Tick()
if (cell.IsTopWaterAndNoSnow && !cell.isFloating)
{
AddCondition<ConWet>(50);
if (pos.IsHotSpring)
{
hygiene.Mod(2);
}
}
if (IsPC && !EClass._zone.IsRegion && cell.CanSuffocate())
{
@@ -4487,9 +4502,9 @@ public void GetRevived()
MoveZone(homeZone);
}
}
else if (!EClass._zone.IsPCFaction || homeBranch != EClass.Branch || GetInt(103) != 0)
else if (!EClass._zone.IsPCFaction || homeBranch != EClass.Branch || base.c_wasInPcParty)
{
EClass.pc.party.AddMemeber(this);
EClass.pc.party.AddMemeber(this, showMsg: true);
}
}
{
EClass.player.doneBackers.Add(base.sourceBacker.id);
}
SetInt(103, IsPCParty ? 1 : 0);
if (IsPCParty)
{
if (!IsPC)
{
EClass.pc.party.RemoveMember(this);
base.c_wasInPcParty = true;
EClass.pc.Say("allyDead");
if (EClass.game.config.autoCombat.abortOnAllyDead && EClass.player.TryAbortAutoCombat())
{
{
a = affinity.Mod(a);
}
int num = StatsHygiene.GetAffinityMod(EClass.pc.hygiene.GetPhase());
if (IsPCFaction && homeBranch != null)
{
num += (int)Mathf.Sqrt(homeBranch.Evalue(2117)) * 5;
}
bool flag = a > 0;
if (flag)
{
a = a * num / 100;
}
if (!show)
{
return;
@@ -8549,7 +8573,10 @@ public void OnSleep(int power, int days = 1)
hunger.Mod(20);
}
sleepiness.Set(0);
interest = 100;
if (!IsMinion)
{
interest = 100;
}
Cure(CureType.Sleep, power);
}
CharaBody
@@ -86,9 +86,9 @@ public void Unequip(BodySlot slot, bool refresh = true)
{
LayerChara.Refresh();
}
LayerInventory.SetDirty(thing);
WidgetEquip.SetDirty();
}
LayerInventory.SetDirty(thing);
if (slot.elementId == 45 && EClass.core.IsGameStarted)
{
owner.RecalculateFOV();
CoreDebug
@@ -907,7 +907,8 @@ public void UpdateInput()
{
foreach (Chara chara in EClass._map.charas)
{
chara.ModAffinity(EClass.pc, EScriptable.rnd(300));
chara.ModAffinity(EClass.pc, -100 + EScriptable.rnd(200));
chara.hygiene.Mod(-50 + EScriptable.rnd(100));
}
Thing to = ThingGen.Create("gene");
to = DNA.CopyDNA(DNA.GenerateRandomGene(), to);
DramaCustomSequence
@@ -368,7 +368,7 @@ public void Build(Chara c)
}
else
{
EClass.pc.party.AddMemeber(c);
EClass.pc.party.AddMemeber(c, showMsg: true);
}
});
Talk("hired", StepEnd);
FactionBranch
@@ -54,6 +54,9 @@ public class Statistics : EClass
[JsonProperty]
public int incomeShop;
[JsonProperty]
public bool luckyDay;
[JsonProperty]
public GStability stability = new GStability
{
@@ -287,9 +290,16 @@ public void OnAfterSimulate()
}
foreach (Chara chara in EClass._map.charas)
{
if (!chara.IsPCParty && !chara.noMove && (chara.pos.cell.HasBlock || chara.pos.cell.hasDoor) && !chara.isRestrained && !chara.HasCondition<ConSuspend>())
if (!chara.IsPCParty && !chara.noMove)
{
chara.MoveImmediate(chara.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? chara.pos);
if ((chara.pos.cell.HasBlock || chara.pos.cell.hasDoor) && !chara.isRestrained && !chara.HasCondition<ConSuspend>())
{
chara.MoveImmediate(chara.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? chara.pos);
}
if (!EClass.player.simulatingZone && chara.c_wasInPcParty)
{
EClass.pc.party.AddMemeber(chara, showMsg: true);
}
}
}
}
@@ -521,6 +531,17 @@ public void OnSimulateDay(VirtualDate date)
member2.c_isPrayed = false;
member2.c_isTrained = false;
}
luckyDay = (float)((EClass.pc.faith == EClass.game.religions.Luck) ? 50 : 10) + Mathf.Sqrt(Evalue(2118)) * 5f > (float)EClass.rnd(2000);
if (EClass.debug.enable)
{
luckyDay = true;
}
Log("lucky_day", EClass._zone.Name);
if (luckyDay && date.IsRealTime)
{
Msg.Say("lucky_day", EClass._zone.Name);
SE.Play("godbless");
}
}
public void OnAdvanceDay()
@@ -832,6 +853,10 @@ void GetOutcome(Hobby h)
{
Log("bNurse", i, member2);
member2.Revive(member2.pos, msg: true);
if (date.IsRealTime && member2.c_wasInPcParty)
{
EClass.pc.party.AddMemeber(member2, showMsg: true);
}
break;
}
if (EClass.rnd(num3) > EClass.rnd(100))
FoodEffect
@@ -90,7 +90,7 @@ public static void Proc(Chara c, Thing food)
num2 = 0.1f;
}
int num3 = food.Evalue(10);
float num4 = 40f;
float num4 = 25f;
float num5 = 1f;
string idTaste = "";
bool flag2 = IsHumanFlesh(food);
@@ -318,7 +318,7 @@ public static void Proc(Chara c, Thing food)
num4 += (float)food.Evalue(440);
num4 += (float)(food.Evalue(445) / 2);
num4 -= (float)food.Evalue(71);
num4 -= (float)(num3 / 2);
num4 += (float)(num3 / 2);
num4 *= num5;
if (idTaste.IsEmpty())
{
NotificationStats
@@ -24,7 +24,7 @@ public override void OnClick()
public override void OnRefresh()
{
BaseStats baseStats = stats();
text = baseStats.GetText();
text = baseStats.GetText() + ((EClass.debug.showExtra && !baseStats.GetText().IsEmpty()) ? ("(" + baseStats.GetValue() + ")") : "");
item.button.mainText.color = baseStats.GetColor(item.button.skinRoot.GetButton().colorProf);
}
}
Party
@@ -48,7 +48,7 @@ public List<Chara> SetMembers()
return _members;
}
public void AddMemeber(Chara c)
public void AddMemeber(Chara c, bool showMsg = false)
{
if (c.party == this)
{
@@ -73,6 +73,11 @@ public void AddMemeber(Chara c)
c.homeBranch.owner.map.props.sales.Remove(c);
}
}
if (showMsg)
{
Msg.Say("party_join", c.Name);
SE.Play("party_join");
}
WidgetRoster.SetDirty();
}
@@ -85,6 +90,7 @@ public void RemoveMember(Chara c)
members.Remove(c);
uidMembers.Remove(c.uid);
c.party = null;
c.c_wasInPcParty = false;
c.SetDirtySpeed();
if (c.homeBranch != null)
{
SerializedCards
@@ -368,6 +368,18 @@ public bool isDead
_bits1[0] = value;
}
}
public bool isEmpty
{
get
{
return _bits1[1];
}
set
{
_bits1[1] = value;
}
}
}
[JsonProperty]
@@ -404,7 +416,8 @@ public void Add(Card c)
idRender = c.sourceCard.idRenderData,
refVal = c.refVal,
idSkin = c.idSkin,
idDeity = c.c_idDeity
idDeity = c.c_idDeity,
isEmpty = (c.things.Count == 0)
};
if (c.c_idBacker != 0)
{
Debug.LogWarning("Could not convert editor tag:" + card2.Name + "/" + card4.tags);
}
}
if (isUserZone && card2.IsContainer && card4.isEmpty)
{
card2.things.DestroyAll();
}
if (card2.isChara)
{
card2.Chara.homeZone = EClass._zone;
Stats
@@ -33,7 +33,7 @@ public class Stats : BaseStats
id = 6
};
public static Stats Hygiene = new Stats
public static StatsHygiene Hygiene = new StatsHygiene
{
id = 7
};
+StatsHygiene
File Created
public class StatsHygiene : Stats
{
public const int VeryClean = 5;
public const int Clean = 4;
public const int Normal = 3;
public const int Dirty = 2;
public const int Filthy = 1;
public const int Garbage = 0;
public static int[] listMod = new int[6] { 125, 110, 100, 80, 50, 10 };
public override int max => 100;
public static int GetAffinityMod(int phase)
{
return listMod.TryGet(phase);
}
}
StatsMana
@@ -14,6 +14,10 @@ public override void Mod(int a)
}
if (a < 0 && BaseStats.CC.HasElement(1330))
{
if (a == -1 && EClass.rnd(4) == 0)
{
return;
}
a = -EClass.rnd(-a * 130 / 100 + 2);
}
base.Mod(a);
StatsStamina
@@ -22,11 +22,19 @@ public override void Mod(int a)
}
if (a < 0 && BaseStats.CC.HasElement(1330))
{
if (a == -1 && EClass.rnd(4) == 0)
{
return;
}
a = -EClass.rnd(-a * 130 / 100 + 2);
}
int num = BaseStats.CC.Evalue(1403);
if (a < 0 && num > 0)
{
if (a == -1 && num > EClass.rnd(3))
{
return;
}
a = a * 100 / (100 + EClass.rnd(num + 1) * 20);
if (a == 0)
{
TaskHarvest
@@ -6,6 +6,8 @@ public class TaskHarvest : BaseTaskHarvest
public bool wasCrime;
public bool harvestingCrop;
public HarvestType mode = HarvestType.Obj;
public bool IsObj => mode == HarvestType.Obj;
@@ -205,6 +207,10 @@ public override bool CanProgress()
public override HitResult GetHitResult()
{
if (harvestingCrop && !base.IsHarvest)
{
return HitResult.Default;
}
if (IsObj)
{
if (base.IsHarvest)
@@ -324,6 +330,10 @@ public override void OnCreateProgress(Progress_Custom p)
{
if (base.IsHarvest && !IsReapSeed)
{
if (pos.growth.CanHarvest())
{
harvestingCrop = true;
}
pos.growth.Harvest(owner);
}
else if (growth != null && !IsReapSeed)
TraitBuildBoard
@@ -4,7 +4,7 @@ public class TraitBuildBoard : TraitBoard
public override void TrySetAct(ActPlan p)
{
if (EClass.debug.godBuild || EClass._zone.IsPCFaction)
if (EClass.debug.godBuild || EClass._zone.IsPCFaction || EClass._zone is Zone_Tent)
{
p.TrySetAct("actBuildMode", delegate
{
TraitDeliveryChest
using System.Linq;
public class TraitDeliveryChest : TraitContainer
{
public override int GuidePriotiy => 2;
public override bool IsSpecialContainer => false;
public override bool IsSpecialContainer => true;
public override bool ShowOpenActAsCrime => false;
@@ -31,4 +33,21 @@ public override bool CanOpenContainer
public override void Prespawn(int lv)
{
}
public override void TrySetAct(ActPlan p)
{
base.TrySetAct(p);
if (owner.things.Count <= 0)
{
return;
}
p.TrySetAct("Eject", delegate
{
foreach (Thing item in owner.things.ToList())
{
EClass.pc.PickOrDrop(EClass.pc.pos, item);
}
return false;
});
}
}
TraitMapBoard
@@ -9,7 +9,7 @@ public class TraitMapBoard : TraitBoard
public override void TrySetAct(ActPlan p)
{
if (!EClass.debug.enable && !EClass._zone.IsPCFaction)
if (!EClass.debug.enable && !EClass._zone.IsPCFaction && !(EClass._zone is Zone_Tent))
{
return;
}
WidgetDate
@@ -117,6 +117,10 @@ public void _Refresh()
{
text += item2.TextWidgetDate;
}
if (EMono.Branch != null && EMono.Branch.luckyDay)
{
text = text + " " + "lucky_day".lang().TagColor(Msg.colors.colors["save"]);
}
if (EMono.debug.enable)
{
text += " *DEBUG MODE*";
WidgetStats
@@ -60,6 +60,7 @@ public override void OnRefresh()
{
conditions.Remove(a);
Remove(a);
dirty = true;
}
});
foreach (Condition condition in EMono.pc.conditions)
Zone
@@ -491,6 +491,16 @@ public bool CanInspect
public Vector3 InspectPosition => default(Vector3);
public int Evalue(int ele)
{
return elements.Value(ele);
}
public int Evalue(string alias)
{
return elements.Value(EClass.sources.elements.alias[alias].id);
}
public virtual string GetDungenID()
{
return null;
{
foreach (Card item2 in item.ListCards())
{
if (item2.IsContainer)
if (item2.IsContainer && !item2.trait.IsSpecialContainer)
{
list.Add(item2.Thing);
}
@@ -2020,77 +2030,58 @@ Thing SearchDest()
{
thing = EClass.game.cards.container_shipping;
}
if ((!sharedOnly || thing.IsSharedContainer) && thing.c_lockLv <= 0)
if ((!sharedOnly || thing.IsSharedContainer) && thing.c_lockLv <= 0 && (thing.things.Count < thing.things.MaxCapacity || thing.things.CanStack(t) != null))
{
if (add)
Window.SaveData windowSaveData = thing.GetWindowSaveData();
if (windowSaveData != null)
{
Thing thing2 = thing.things.TryStack(t.Thing);
if (thing2 != t)
if (windowSaveData.priority <= priority || (windowSaveData.noRotten && t.IsDecayed) || (windowSaveData.onlyRottable && t.trait.Decay == 0))
{
if (msg)
{
chara.Say("putSharedItem", chara, thing, thing2.GetName(NameStyle.Full));
}
return thing2;
continue;
}
}
else if (thing.things.CanStack(t) != t)
{
return thing;
}
if (thing.things.Count < thing.things.MaxCapacity)
{
Window.SaveData windowSaveData = thing.GetWindowSaveData();
if (windowSaveData != null)
Window.SaveData.FilterResult filterResult = Window.SaveData.FilterResult.Pass;
if (windowSaveData.userFilter)
{
if (windowSaveData.priority <= priority || (windowSaveData.noRotten && t.IsDecayed) || (windowSaveData.onlyRottable && t.trait.Decay == 0))
filterResult = windowSaveData.IsFilterPass(t.GetName(NameStyle.Full, 1));
if (filterResult == Window.SaveData.FilterResult.Block)
{
continue;
}
Window.SaveData.FilterResult filterResult = Window.SaveData.FilterResult.Pass;
if (windowSaveData.userFilter)
{
filterResult = windowSaveData.IsFilterPass(t.GetName(NameStyle.Full, 1));
if (filterResult == Window.SaveData.FilterResult.Block)
{
continue;
}
}
if (filterResult != Window.SaveData.FilterResult.PassWithoutFurtherTest)
}
if (filterResult != Window.SaveData.FilterResult.PassWithoutFurtherTest)
{
if (windowSaveData.advDistribution)
{
if (windowSaveData.advDistribution)
bool flag2 = false;
foreach (int cat in windowSaveData.cats)
{
bool flag2 = false;
foreach (int cat in windowSaveData.cats)
{
if (t.category.uid == cat)
{
flag2 = true;
break;
}
}
if (!flag2)
if (t.category.uid == cat)
{
continue;
flag2 = true;
break;
}
}
else if (windowSaveData.flag.HasFlag(flag))
if (!flag2)
{
continue;
}
}
priority = windowSaveData.priority;
}
else
{
if (priority != -1)
else if (windowSaveData.flag.HasFlag(flag))
{
continue;
}
priority = 0;
}
dest = thing;
priority = windowSaveData.priority;
}
else
{
if (priority != -1)
{
continue;
}
priority = 0;
}
dest = thing;
}
}
return null;