Elin Decompiled Documentation EA 23.355 Stable
Loading...
Searching...
No Matches
FactionBranch Class Reference
Inheritance diagram for FactionBranch:
EClass

Classes

class  Statistics
 

Public Member Functions

int GetNextExp (int _lv=-1)
 
int Evalue (int ele)
 
int GetProductBonus (Chara c)
 
void RefreshEfficiency ()
 
void Abandon ()
 
void OnCreate (Zone zone)
 
void SetOwner (Zone zone)
 
void OnActivateZone ()
 
void OnAfterSimulate ()
 
void OnUnloadMap ()
 
void OnSimulateHour (VirtualDate date)
 
void AutoClean ()
 
void OnSimulateDay (VirtualDate date)
 
void OnAdvanceDay ()
 
void OnSimulateMonth (VirtualDate date)
 
void GenerateGarbage (VirtualDate date)
 
bool TryTrash (Thing t)
 
void ReceivePackages (VirtualDate date)
 
void DailyOutcome (VirtualDate date)
 
void PutInMailBox (Thing t, bool outside=false, bool install=true)
 
Thing GetMailBox ()
 
Point GetMailBoxPos ()
 
int GetResidentTax ()
 
void CalcInnIncome ()
 
void CalcTourismIncome ()
 
void GetDailyIncome ()
 
Thing GetMeal (Chara c)
 
void OnClaimZone ()
 
void OnUnclaimZone ()
 
void ValidateUpgradePolicies ()
 
void Upgrade ()
 
bool CanUpgrade ()
 
int GetUpgradeCost ()
 
void ModExp (int a)
 
string GetHearthHint (int a)
 
void AddFeat (int ele, int v)
 
void AddMemeber (Chara c)
 
void ChangeMemberType (Chara c, FactionMemberType type)
 
void BanishMember (Chara c, bool skipMsg=false)
 
void RemoveMemeber (Chara c)
 
int GetHappiness (FactionMemberType type)
 
bool IsAllDead ()
 
void Recruit (Chara c)
 
Chara GetMaid ()
 
string GetRandomName ()
 
int CountMembers (FactionMemberType type, bool onlyAlive=false)
 
int CountGuests ()
 
int CountWealthyGuests ()
 
void UpdateReqruits (bool clear=false)
 
void AddRecruit (Chara c)
 
void RemoveRecruit (Chara c)
 
int CountNewRecruits ()
 
void ClearNewRecruits ()
 
bool IsRecruit (Chara c)
 
int CountPasture ()
 
int GetPastureCost ()
 
int GetCivility ()
 
float GetHearthIncome ()
 
float GetHearthIncome (string id)
 
int GetTechUpgradeCost (Element e)
 
string Log (string idLang, string ref1=null, string ref2=null, string ref3=null, string ref4=null)
 
string Log (string idLang, Card c1, Card c2, string ref1=null, string ref2=null)
 
string Log (string idLang, Card c1, string ref1=null, string ref2=null, string ref3=null)
 
string LogRaw (string text, string col=null)
 

Public Attributes

int lv = 1
 
int rank
 
int exp
 
int seedPlan
 
int temper
 
int uidMaid
 
int lastUpdateReqruit
 
int incomeShop
 
bool luckyMonth
 
bool luckyMonthDone
 
GStability stability
 
HomeResourceManager resources = new HomeResourceManager()
 
ResearchManager researches = new ResearchManager()
 
PolicyManager policies = new PolicyManager()
 
HappinessManager happiness = new HappinessManager()
 
MeetingManager meetings = new MeetingManager()
 
Thing stash
 
MsgLog log
 
Religion faith
 
ExpeditionManager expeditions = new ExpeditionManager()
 
List< HireInfo > listRecruit = new List<HireInfo>()
 
int dateFound
 
int tourism
 
Statistics statistics = new Statistics()
 
Statistics lastStatistics = new Statistics()
 
Zone owner
 
int incomeInn
 
int incomeTourism
 
int efficiency = 100
 
List< Chara > members = new List<Chara>()
 

Properties

int Money [get]
 
int Worth [get]
 
int NumHeirloom [get]
 
int MaxAP [get]
 
int MaxPopulation [get]
 
int MaxSoil [get]
 
int ContentLV [get]
 
int DangerLV [get]
 
bool HasItemProtection [get]
 
bool HasNetwork [get]
 
bool IsTaxFree [get]
 
string RankText [get]
 
string TextLv [get]
 
bool IsStartBranch [get]
 
ElementContainerZone elements [get]
 
int MaxLv [get]
 
- Properties inherited from EClass
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static FactionBranch Branch [get]
 
static FactionBranch BranchOrHomeBranch [get]
 
static Faction Home [get]
 
static Faction Wilds [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 

Additional Inherited Members

- Static Public Member Functions inherited from EClass
static int rndSeed (int a, int seed)
 
static int rnd (long a)
 
static int rnd (int a)
 
static int curve (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
static int rndHalf (int a)
 
static float rndf (float a)
 
static int rndSqrt (int a)
 
static void Wait (float a, Card c)
 
static void Wait (float a, Point p)
 
static int Bigger (int a, int b)
 
static int Smaller (int a, int b)
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 7 of file FactionBranch.cs.

Member Function Documentation

◆ Abandon()

void FactionBranch.Abandon ( )
inline

Definition at line 236 of file FactionBranch.cs.

237 {
238 }

◆ AddFeat()

void FactionBranch.AddFeat ( int  ele,
int  v 
)
inline

Definition at line 1507 of file FactionBranch.cs.

1508 {
1509 elements.ModBase(ele, v);
1510 WidgetPopText.Say("rewardElement".lang(EClass.sources.elements.map[ele].GetName()));
1511 }
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:43
Element ModBase(int ele, int v)
ElementContainerZone elements
SourceElement elements
static void Say(string text, FontColor fontColor=FontColor.Default, Sprite sprite=null)

References SourceManager.elements, WidgetPopText.Say(), and EClass.sources.

Referenced by ResearchPlan.ParseReward().

◆ AddMemeber()

void FactionBranch.AddMemeber ( Chara  c)
inline

Definition at line 1513 of file FactionBranch.cs.

1514 {
1515 if (members.Contains(c))
1516 {
1517 return;
1518 }
1521 c.SetGlobal();
1523 c.SetHomeZone(owner);
1524 foreach (Thing item in c.things.List((Thing a) => a.HasTag(CTAG.godArtifact)).Copy())
1525 {
1527 }
1528 if (c.OriginalHostility <= Hostility.Ally)
1529 {
1530 c.c_originalHostility = Hostility.Ally;
1531 }
1532 c.hostility = Hostility.Ally;
1533 c.enemy = null;
1534 c.orgPos = null;
1535 if (c.memberType != FactionMemberType.Default && c.memberType != FactionMemberType.Livestock)
1536 {
1537 c.memberType = FactionMemberType.Default;
1538 }
1539 if (c.hp > c.MaxHP)
1540 {
1541 c.hp = c.MaxHP;
1542 }
1543 if (c.mana.value > c.mana.max)
1544 {
1545 c.mana.value = c.mana.max;
1546 }
1547 if (c.stamina.value > c.stamina.max)
1548 {
1549 c.stamina.value = c.stamina.max;
1550 }
1551 members.Add(c);
1555 if (uidMaid == 0 && c.id == "maid")
1556 {
1557 uidMaid = c.uid;
1558 }
1559 switch (c.id)
1560 {
1561 case "lomias":
1563 break;
1564 case "larnneire":
1566 break;
1567 case "melilith":
1569 break;
1570 case "priest":
1571 case "priest2":
1573 break;
1574 }
1575 }
CTAG
Definition: CTAG.cs:2
FactionMemberType
Hostility
Definition: Hostility.cs:2
ID_Achievement
void PurgeDuplicateArtifact(Thing af)
Definition: Card.cs:3398
string id
Definition: Card.cs:36
int hp
Definition: Card.cs:245
bool HasTag(CTAG tag)
Definition: Card.cs:2728
int uid
Definition: Card.cs:125
ThingContainer things
Definition: Card.cs:39
Hostility OriginalHostility
Definition: Chara.cs:477
void RefreshWorkElements(ElementContainer parent=null)
Definition: Chara.cs:9626
Faction faction
Definition: Chara.cs:433
Chara SetHomeZone(Zone zone)
Definition: Chara.cs:1500
Chara SetFaction(Faction f)
Definition: Chara.cs:1492
Chara SetGlobal(Zone _home, int x, int z)
Definition: Chara.cs:1546
override int MaxHP
Definition: Chara.cs:728
Stats mana
Definition: Chara.cs:1215
FactionMemberType memberType
Definition: Chara.cs:48
Stats stamina
Definition: Chara.cs:1207
static Faction Home
Definition: EClass.cs:27
static Chara pc
Definition: EClass.cs:15
void RefreshEfficiency()
List< Chara > members
void RemoveMemeber(Chara c)
FactionBranch FindBranch(Chara c)
Definition: FACTION.cs:436
ElementContainerFaction charaElements
Definition: FACTION.cs:146
void RemoveReserve(Chara c)
Definition: FACTION.cs:368
virtual int value
Definition: Stats.cs:56
virtual int max
Definition: Stats.cs:68
Definition: Steam.cs:12
static void GetAchievement(ID_Achievement id)
Definition: Steam.cs:53
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
Definition: Thing.cs:8

References Faction.charaElements, Chara.faction, Faction.FindBranch(), Steam.GetAchievement(), Card.HasTag(), EClass.Home, Card.hp, Card.id, item, ThingContainer.List(), Chara.mana, Stats.max, Chara.MaxHP, Chara.memberType, ElementContainerFaction.OnAddMemeber(), Chara.OriginalHostility, EClass.pc, Card.PurgeDuplicateArtifact(), Chara.RefreshWorkElements(), RemoveMemeber(), Faction.RemoveReserve(), Chara.SetFaction(), Chara.SetGlobal(), Chara.SetHomeZone(), Chara.stamina, Card.things, Card.uid, and Stats.value.

Referenced by Chara._MakeAlly(), Zone.AbandonZone(), Quest.AddResident(), Zone.ClaimZone(), TraitFoodEggFertilized.Incubate(), QuestVernis.OnChangePhase(), QuestDialog.OnDropReward(), SurvivalManager.OnExpandFloor(), Game.OnLoad(), QuestDebt.OnStart(), and CoreDebug.QuickStart().

◆ AddRecruit()

void FactionBranch.AddRecruit ( Chara  c)
inline

Definition at line 1792 of file FactionBranch.cs.

1793 {
1794 HireInfo hireInfo = new HireInfo
1795 {
1796 chara = c,
1797 isNew = true
1798 };
1799 hireInfo.deadline = EClass.world.date.GetRaw() + (EClass.rnd(5) + 1) * 1440 + EClass.rnd(24) * 60;
1800 listRecruit.Add(hireInfo);
1801 }
int GetRaw(int offsetHours=0)
Definition: Date.cs:328
static World world
Definition: EClass.cs:41
static int rnd(long a)
Definition: EClass.cs:59
List< HireInfo > listRecruit
GameDate date
Definition: World.cs:6

References World.date, Date.GetRaw(), EClass.rnd(), and EClass.world.

Referenced by SurvivalManager.OnUpdateRecruit().

◆ AutoClean()

void FactionBranch.AutoClean ( )
inline

Definition at line 504 of file FactionBranch.cs.

505 {
506 List<Thing> list = AI_Haul.ListThingsToClean(new List<Thing>());
507 if (list.Count == 0)
508 {
509 return;
510 }
511 Dictionary<string, Thing> dictionary = new Dictionary<string, Thing>();
512 HashSet<string> hashSet = new HashSet<string>();
513 List<Thing> list2 = new List<Thing>(1);
514 bool flag = false;
515 foreach (Thing container in EClass._map.props.installed.containers)
516 {
517 Window.SaveData windowSaveData = container.GetWindowSaveData();
518 if (windowSaveData != null && windowSaveData.userFilter)
519 {
520 flag = true;
521 break;
522 }
523 }
524 foreach (Chara member in members)
525 {
526 if (member.IsPCParty || !member.ExistsOnMap || member.memberType != FactionMemberType.Default)
527 {
528 continue;
529 }
530 Hobby hobby = member.GetWork("Clean") ?? member.GetWork("Chore");
531 if (hobby == null)
532 {
533 continue;
534 }
535 int num = (5 + EClass.rnd(5)) * hobby.GetEfficiency(member) / 100;
536 if (num <= 0)
537 {
538 continue;
539 }
540 Point origin = member.pos;
541 list.Sort((Thing a, Thing b) => origin.Distance(a.pos) - origin.Distance(b.pos));
542 int num2 = 0;
543 int num3 = 0;
544 int num4 = num * 10;
545 for (; num3 < list.Count; num3++)
546 {
547 if (num2 >= num)
548 {
549 break;
550 }
551 if (num3 >= num4)
552 {
553 break;
554 }
555 Thing thing = list[num3];
556 if (thing.isDestroyed || thing.placeState != PlaceState.roaming)
557 {
558 continue;
559 }
560 string text = (flag ? (thing.id + "|" + thing.IsDecayed + "|" + thing.GetName(NameStyle.Full, 1)) : (thing.id + "|" + thing.IsDecayed));
561 if (hashSet.Contains(text))
562 {
563 continue;
564 }
565 Thing thing2 = null;
566 if (dictionary.TryGetValue(text, out var value) && !value.isDestroyed)
567 {
568 list2.Clear();
569 list2.Add(value);
570 thing2 = EClass._zone.FindSharedContainer(thing, list2);
571 }
572 if (thing2 == null)
573 {
574 thing2 = EClass._zone.FindSharedContainer(thing);
575 if (thing2 != null)
576 {
577 dictionary[text] = thing2;
578 }
579 else
580 {
581 hashSet.Add(text);
582 }
583 }
584 if (thing2 != null)
585 {
586 thing2.AddThing(thing);
587 num2++;
588 }
589 }
590 list.RemoveRange(0, num3);
591 if (list.Count == 0)
592 {
593 break;
594 }
595 }
596 }
NameStyle
Definition: NameStyle.cs:2
PlaceState
Definition: PlaceState.cs:2
static List< Thing > ListThingsToClean(List< Thing > result)
Definition: AI_Haul.cs:69
bool isDestroyed
Definition: Card.cs:78
bool IsDecayed
Definition: Card.cs:2357
Thing AddThing(string id, int lv=-1)
Definition: Card.cs:3280
bool ExistsOnMap
Definition: Card.cs:2137
PlaceState placeState
Definition: Card.cs:86
Point pos
Definition: Card.cs:60
Window.SaveData GetWindowSaveData()
Definition: Card.cs:2649
Thing Add(string id, int num=1, int lv=1)
Definition: Card.cs:3257
Definition: Chara.cs:10
override bool IsPCParty
Definition: Chara.cs:635
Hobby GetWork(string id)
Definition: Chara.cs:9607
static Zone _zone
Definition: EClass.cs:21
static Map _map
Definition: EClass.cs:19
Definition: Hobby.cs:5
int GetEfficiency(Chara c)
Definition: Hobby.cs:31
PropsManager props
Definition: Map.cs:94
Definition: Point.cs:9
int Distance(Point p)
Definition: Point.cs:995
PropsInstalled installed
Definition: PropsManager.cs:8
List< Thing > containers
Definition: Props.cs:22
override string GetName(NameStyle style, int _num=-1)
Definition: Thing.cs:536
bool userFilter
Definition: Window.cs:132
Thing FindSharedContainer(Thing t, List< Thing > containers=null, bool sharedOnly=true)
Definition: Zone.cs:2334

References EClass._map, EClass._zone, Card.Add(), Card.AddThing(), Props.containers, Point.Distance(), Card.ExistsOnMap, Zone.FindSharedContainer(), Hobby.GetEfficiency(), Thing.GetName(), Card.GetWindowSaveData(), Chara.GetWork(), Card.id, PropsManager.installed, Card.IsDecayed, Card.isDestroyed, Chara.IsPCParty, AI_Haul.ListThingsToClean(), Chara.memberType, Card.placeState, Card.pos, Map.props, EClass.rnd(), and Window.SaveData.userFilter.

◆ BanishMember()

void FactionBranch.BanishMember ( Chara  c,
bool  skipMsg = false 
)
inline

Definition at line 1587 of file FactionBranch.cs.

1588 {
1589 RemoveMemeber(c);
1590 if (!skipMsg)
1591 {
1592 Msg.Say("banish", c, EClass._zone.Name);
1593 }
1595 {
1596 c.RemoveGlobal();
1597 }
1598 if (c.IsGlobal)
1599 {
1600 c.OnBanish();
1601 }
1602 else
1603 {
1604 c.Destroy();
1605 }
1606 }
void Destroy()
Definition: Card.cs:5314
new TraitChara trait
Definition: Chara.cs:511
void RemoveGlobal()
Definition: Chara.cs:1574
override bool IsGlobal
Definition: Chara.cs:630
void OnBanish()
Definition: Chara.cs:1514
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
virtual string Name
Definition: Spatial.cs:509
virtual bool RemoveGlobalOnBanish
Definition: Trait.cs:583

References EClass._zone, Card.Destroy(), Chara.IsGlobal, Spatial.Name, Chara.OnBanish(), Chara.RemoveGlobal(), Trait.RemoveGlobalOnBanish, Msg.Say(), and Chara.trait.

Referenced by CharaExtension.DestroyImmediate(), CoreDebug.Fix_RemoveAshland(), CoreDebug.Fix_RemoveDemitas(), QuestNasu.OnComplete(), AI_Slaughter.Run(), and AI_Shopping.SellChara().

◆ CalcInnIncome()

void FactionBranch.CalcInnIncome ( )
inline

Definition at line 1168 of file FactionBranch.cs.

1169 {
1170 int num = CountGuests();
1171 if (num == 0)
1172 {
1173 return;
1174 }
1175 int num2 = 0;
1176 int num3 = 0;
1177 foreach (Thing thing in EClass._map.things)
1178 {
1179 if (thing.IsInstalled && thing.trait is TraitBed traitBed && traitBed.owner.c_bedType == BedType.guest)
1180 {
1181 int maxHolders = traitBed.MaxHolders;
1182 num2 += maxHolders;
1183 num3 += traitBed.owner.LV * (100 + traitBed.owner.Quality / 2 + traitBed.owner.Evalue(750) / 2) / 100 * maxHolders;
1184 }
1185 }
1186 num = Mathf.Min(num, num2);
1187 if (num != 0)
1188 {
1189 num3 /= num2;
1190 num3 = num3 * (100 + 5 * (int)Mathf.Sqrt(Evalue(2812))) / 100;
1191 float num4 = 10f + Mathf.Sqrt(num) * 10f;
1192 if (policies.IsActive(2813))
1193 {
1194 num4 += Mathf.Sqrt(CountWealthyGuests()) * 50f * (80f + 5f * Mathf.Sqrt(Evalue(2813))) / 100f;
1195 }
1196 if (policies.IsActive(2812))
1197 {
1198 num4 = num4 * (float)(100 + num3) / 100f;
1199 }
1200 num4 = Mathf.Min(num4, Mathf.Sqrt(Worth) / 15f + 5f);
1201 incomeInn += EClass.rndHalf((int)num4) + EClass.rndHalf((int)num4);
1202 }
1203 }
BedType
Definition: BedType.cs:2
Trait trait
Definition: Card.cs:54
bool IsInstalled
Definition: Card.cs:2451
BedType c_bedType
Definition: Card.cs:967
static int rndHalf(int a)
Definition: EClass.cs:97
int Evalue(int ele)
int CountWealthyGuests()
PolicyManager policies
List< Thing > things
Definition: Map.cs:52
bool IsActive(int id, int days=-1)
Card owner
Definition: Trait.cs:28

References EClass._map, Card.c_bedType, PolicyManager.IsActive(), Card.IsInstalled, Trait.owner, EClass.rndHalf(), Map.things, and Card.trait.

◆ CalcTourismIncome()

void FactionBranch.CalcTourismIncome ( )
inline

Definition at line 1205 of file FactionBranch.cs.

1206 {
1207 int num = CountGuests();
1208 if (num != 0)
1209 {
1210 float num2 = 10f + Mathf.Sqrt(num) * 10f;
1211 if (policies.IsActive(2815))
1212 {
1213 num2 += Mathf.Sqrt(CountWealthyGuests()) * 50f * (80f + 5f * Mathf.Sqrt(Evalue(2815))) / 100f;
1214 }
1215 num2 = Mathf.Min(num2, Mathf.Sqrt(tourism) / 5f);
1216 incomeTourism += EClass.rndHalf((int)num2) + EClass.rndHalf((int)num2);
1217 }
1218 }

References PolicyManager.IsActive(), EClass.rndHalf(), and tourism.

◆ CanUpgrade()

bool FactionBranch.CanUpgrade ( )
inline

Definition at line 1446 of file FactionBranch.cs.

1447 {
1448 if (lv < MaxLv)
1449 {
1450 if (exp < GetNextExp())
1451 {
1452 return EClass.debug.enable;
1453 }
1454 return true;
1455 }
1456 return false;
1457 }
bool enable
Definition: CoreDebug.cs:302
static CoreDebug debug
Definition: EClass.cs:49
int GetNextExp(int _lv=-1)

References EClass.debug, and CoreDebug.enable.

◆ ChangeMemberType()

void FactionBranch.ChangeMemberType ( Chara  c,
FactionMemberType  type 
)
inline

Definition at line 1577 of file FactionBranch.cs.

1578 {
1579 c.ClearBed();
1580 c.memberType = type;
1581 c.c_wasInPcParty = false;
1585 }
void ClearBed(Map map=null)
Definition: Chara.cs:7802

References Chara.ClearBed(), Chara.RefreshWorkElements(), and PolicyManager.Validate().

Referenced by TraitFoodEggFertilized.Incubate(), and BaseListPeople.OnClick().

◆ ClearNewRecruits()

void FactionBranch.ClearNewRecruits ( )
inline

Definition at line 1827 of file FactionBranch.cs.

1828 {
1829 foreach (HireInfo item in listRecruit)
1830 {
1831 item.isNew = false;
1832 }
1833 }

References item.

Referenced by LayerHire.OnKill(), and LayerQuestBoard.OnKill().

◆ CountGuests()

int FactionBranch.CountGuests ( )
inline

Definition at line 1703 of file FactionBranch.cs.

1704 {
1705 int num = 0;
1706 foreach (Chara chara in EClass._map.charas)
1707 {
1708 if (chara.memberType == FactionMemberType.Guest)
1709 {
1710 num++;
1711 }
1712 }
1713 return num;
1714 }
List< Chara > charas
Definition: Map.cs:84

References EClass._map, Map.charas, and Chara.memberType.

◆ CountMembers()

int FactionBranch.CountMembers ( FactionMemberType  type,
bool  onlyAlive = false 
)
inline

Definition at line 1690 of file FactionBranch.cs.

1691 {
1692 int num = 0;
1693 foreach (Chara member in members)
1694 {
1695 if (member.memberType == type && (!onlyAlive || !member.isDead) && (type != FactionMemberType.Default || member.trait.IsCountAsResident))
1696 {
1697 num++;
1698 }
1699 }
1700 return num;
1701 }
bool isDead
Definition: Chara.cs:395
virtual bool IsCountAsResident
Definition: TraitChara.cs:70

References TraitChara.IsCountAsResident, Chara.isDead, Chara.memberType, and Chara.trait.

Referenced by OnSimulateHour(), RefreshEfficiency(), ContentHomeReport.RefreshInfo(), and UIHomeInfo.RefreshInfo().

◆ CountNewRecruits()

int FactionBranch.CountNewRecruits ( )
inline

Definition at line 1814 of file FactionBranch.cs.

1815 {
1816 int num = 0;
1817 foreach (HireInfo item in listRecruit)
1818 {
1819 if (item.isNew)
1820 {
1821 num++;
1822 }
1823 }
1824 return num;
1825 }

References item.

◆ CountPasture()

int FactionBranch.CountPasture ( )
inline

Definition at line 1847 of file FactionBranch.cs.

1848 {
1849 return EClass._map.Stocked.GetNum("pasture", onlyShared: true) + EClass._map.Installed.GetNum("pasture");
1850 }
PropsInstalled Installed
Definition: Map.cs:128
PropsStocked Stocked
Definition: Map.cs:126
int GetNum(string id, bool onlyShared=false)
Definition: Props.cs:433

References EClass._map, Props.GetNum(), Map.Installed, and Map.Stocked.

Referenced by UIHomeInfo.RefreshInfo().

◆ CountWealthyGuests()

int FactionBranch.CountWealthyGuests ( )
inline

Definition at line 1716 of file FactionBranch.cs.

1717 {
1718 int num = 0;
1719 foreach (Chara chara in EClass._map.charas)
1720 {
1721 if (chara.memberType == FactionMemberType.Guest && chara.IsWealthy)
1722 {
1723 num++;
1724 }
1725 }
1726 return num;
1727 }
bool IsWealthy
Definition: Chara.cs:1104

References EClass._map, Map.charas, Chara.IsWealthy, and Chara.memberType.

◆ DailyOutcome()

void FactionBranch.DailyOutcome ( VirtualDate  date)
inline

Definition at line 819 of file FactionBranch.cs.

820 {
821 Thing thing = null;
822 foreach (Chara member in members)
823 {
824 Chara m = member;
825 if (EClass.rnd(EClass.debug.enable ? 2 : (360 * members.Count)) == 0 && !m.IsPC && EClass.pc.faction.IsGlobalPolicyActive(2712) && m.things.Find((Thing thing4) => thing4.id == "panty" && thing4.c_idRefCard == m.id) == null && !m.things.IsFull())
826 {
827 Thing thing2 = ThingGen.Create("panty");
828 thing2.c_idRefCard = m.id;
829 m.AddThing(thing2);
830 }
831 if (m.IsPCParty || !m.ExistsOnMap)
832 {
833 continue;
834 }
836 if (m.memberType == FactionMemberType.Livestock)
837 {
838 if (thing == null)
839 {
840 thing = EClass._map.Stocked.Find("pasture", -1, -1, shared: true) ?? EClass._map.Installed.Find("pasture");
841 }
842 if (thing == null)
843 {
844 continue;
845 }
846 if (m.race.breeder >= EClass.rnd(2500 - (int)Mathf.Sqrt(Evalue(2827) * 100)))
847 {
848 if (EClass.rnd(3) != 0)
849 {
850 Thing t = m.MakeEgg(date.IsRealTime, 1, date.IsRealTime);
851 if (!date.IsRealTime)
852 {
853 m.TryPutShared(t);
854 }
855 }
856 else
857 {
858 Thing t2 = m.MakeMilk(date.IsRealTime, 1, date.IsRealTime);
859 if (!date.IsRealTime)
860 {
861 m.TryPutShared(t2);
862 }
863 }
864 }
865 if (m.HaveFur())
866 {
867 if (m.HasElement(1533))
868 {
869 m.c_fur = 0;
870 }
871 else
872 {
873 m.c_fur++;
874 if (EClass.rnd(4) == 0 && m.HasElement(1532))
875 {
876 m.c_fur++;
877 }
878 }
879 }
880 thing.ModNum(-1);
881 if (thing.isDestroyed || thing.Num == 0)
882 {
883 thing = null;
884 }
885 continue;
886 }
887 foreach (Hobby item in m.ListHobbies().ToList())
888 {
889 GetOutcome(item);
890 }
891 foreach (Hobby item2 in m.ListWorks().ToList())
892 {
893 GetOutcome(item2);
894 }
895 void GetOutcome(Hobby h)
896 {
897 int num3 = h.GetEfficiency(m) * GetProductBonus(m) / 100;
898 int num4 = h.GetLv(m);
899 int id = EClass.sources.elements.alias[h.source.skill].id;
900 if (!m.elements.HasBase(id))
901 {
902 m.elements.SetBase(id, 1);
903 }
904 m.ModExp(id, 100);
905 for (int i = 0; i < h.source.things.Length; i += 2)
906 {
907 string text = h.source.things[i];
908 int num5 = Mathf.Max(1, h.source.things[i + 1].ToInt() * num3 / 1000);
909 int num6 = num5 / 1000;
910 if (num5 % 1000 > EClass.rnd(1000))
911 {
912 num6++;
913 }
914 if (num6 != 0)
915 {
916 if (!(text == "_egg"))
917 {
918 if (text == "_milk")
919 {
920 m.MakeMilk(date.IsRealTime, num6);
921 }
922 else
923 {
924 Thing thing4 = ((!text.StartsWith("#")) ? ThingGen.Create(h.source.things[i], -1, num4) : ThingGen.CreateFromCategory(text.Replace("#", ""), num4));
925 if (thing4 != null)
926 {
927 num6 *= thing4.trait.CraftNum;
928 if (thing4.category.id == "fish" && EClass.rnd(EClass.debug.enable ? 1 : 5) == 0)
929 {
930 int num7 = Mathf.Min(EClass.rnd(EClass.rnd(EClass.rnd(EClass.curve(num4, 100, 50, 70) + 50))) / 50, 3);
931 if (num7 > 0)
932 {
933 thing4.SetTier(num7);
934 num6 /= num7 + 1;
935 }
936 }
937 if (num6 < 1)
938 {
939 num6 = 1;
940 }
941 if (!thing4.trait.CanStack)
942 {
943 num6 = 1;
944 }
945 thing4.SetNum(num6);
946 thing4.SetBlessedState(BlessedState.Normal);
947 thing4.TryMakeRandomItem(num4);
948 if (thing4.IsAmmo)
949 {
950 thing4.ChangeMaterial("iron");
951 thing4.c_IDTState = 0;
952 }
953 bool flag = thing4.category.id == "garbage";
954 if (thing4.trait is TraitFoodMeal)
955 {
956 if (thing4.HasTag(CTAG.dish_fail))
957 {
958 flag = true;
959 }
960 else
961 {
962 CraftUtil.MakeDish(thing4, num4 + 10, m);
963 if (thing4.id == "lunch_dystopia")
964 {
965 flag = true;
966 }
967 }
968 }
969 if (flag)
970 {
971 TryTrash(thing4);
972 }
973 else
974 {
975 m.TryPutShared(thing4);
976 }
977 }
978 }
979 }
980 else
981 {
982 m.MakeEgg(date.IsRealTime, num6);
983 }
984 }
985 }
986 switch (h.source.alias)
987 {
988 case "Nurse":
989 {
990 foreach (Chara member2 in members)
991 {
992 if (!member2.IsPCParty)
993 {
994 if (member2.isDead && member2.CanRevive() && EClass.rnd(num3) > EClass.rnd(100))
995 {
996 Log("bNurse", m, member2);
997 member2.Revive(member2.pos, msg: true);
998 if (date.IsRealTime && member2.c_wasInPcParty)
999 {
1000 EClass.pc.party.AddMemeber(member2, showMsg: true);
1001 }
1002 break;
1003 }
1004 if (EClass.rnd(num3) > EClass.rnd(100))
1005 {
1006 member2.CureHost(CureType.HealComplete);
1007 }
1008 }
1009 }
1010 break;
1011 }
1012 case "Chore":
1013 case "Clean":
1014 {
1015 for (int num8 = 0; num8 < num3 / 2; num8++)
1016 {
1017 Point randomPoint = EClass._map.bounds.GetRandomPoint();
1018 if (randomPoint.HasDecal)
1019 {
1020 EClass._map.SetDecal(randomPoint.x, randomPoint.z);
1021 }
1022 }
1023 break;
1024 }
1025 case "TreasureHunt":
1026 if (EClass.rnd(num3) > EClass.rnd(EClass.debug.enable ? 100 : 5000))
1027 {
1029 if (thing5 != null)
1030 {
1031 Thing thing6 = ThingGen.CreateTreasure("chest_treasure", thing5.LV);
1032 m.TryPutShared(thing6);
1033 thing5.Destroy();
1034 WidgetPopText.Say("foundTreasure".lang(thing6.Name));
1035 }
1036 }
1037 break;
1038 }
1039 }
1040 }
1041 int soilCost = EClass._zone.GetSoilCost();
1042 int num = Mathf.Min(100, 70 + (MaxSoil - soilCost));
1043 int flower = 5;
1044 int lv = 1;
1045 EClass._map.bounds.ForeachCell(delegate(Cell cell)
1046 {
1047 if (cell.obj != 0 && cell.sourceObj.tag.Contains("flower"))
1048 {
1049 PlantData plantData = cell.TryGetPlant();
1050 if (plantData != null && plantData.seed != null)
1051 {
1052 lv += plantData.seed.encLV + 1;
1053 }
1054 else
1055 {
1056 lv++;
1057 }
1058 flower++;
1059 }
1060 });
1061 lv /= flower;
1062 int num2 = 0;
1063 foreach (Thing thing7 in EClass._map.things)
1064 {
1065 if (thing7.IsInstalled && thing7.trait is TraitBeekeep && !thing7.things.IsFull())
1066 {
1067 flower -= 3 + EClass.rnd(5 + num2 * 4);
1068 num2++;
1069 if (flower < 0)
1070 {
1071 break;
1072 }
1073 if (EClass.rnd(100) <= num)
1074 {
1075 Thing thing3 = ThingGen.Create("honey");
1076 thing3.SetEncLv(lv / 10);
1077 thing3.elements.SetBase(2, EClass.curve(lv, 50, 10, 80));
1078 thing7.AddThing(thing3);
1079 }
1080 }
1081 }
1082 }
BlessedState
Definition: BlessedState.cs:2
CureType
Definition: CureType.cs:2
void SetTier(int a, bool setTraits=true)
Definition: Card.cs:4050
Thing TryMakeRandomItem(int lv=-1, TryMakeRandomItemSource itemSource=TryMakeRandomItemSource.Default, Chara crafter=null)
Definition: Card.cs:5758
bool IsAmmo
Definition: Card.cs:2301
ElementContainerCard elements
Definition: Card.cs:42
bool c_wasInPcParty
Definition: Card.cs:1039
Card ChangeMaterial(int idNew, bool ignoreFixedMaterial=false)
Definition: Card.cs:3217
string Name
Definition: Card.cs:2191
Thing SetNum(int a)
Definition: Card.cs:3676
virtual void SetBlessedState(BlessedState s)
Definition: Card.cs:4076
Thing MakeMilk(bool effect=true, int num=1, bool addToZone=true, BlessedState? state=null)
Definition: Card.cs:6068
void SetEncLv(int a)
Definition: Card.cs:4045
bool HaveFur()
Definition: Card.cs:8451
void ModExp(string alias, int a)
Definition: Card.cs:2781
int Num
Definition: Card.cs:161
SourceCategory.Row category
Definition: Card.cs:2101
void ModNum(int a, bool notify=true)
Definition: Card.cs:3696
int c_fur
Definition: Card.cs:1369
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
int LV
Definition: Card.cs:389
string c_idRefCard
Definition: Card.cs:1777
Thing MakeEgg(bool effect=true, int num=1, bool addToZone=true, int fertChance=20, BlessedState? state=null)
Definition: Card.cs:6045
Definition: Cell.cs:7
int obj
Definition: Cell.cs:50
SourceObj.Row sourceObj
Definition: Cell.cs:1112
bool CanRevive()
Definition: Chara.cs:5477
void TryPutShared(Thing t, List< Thing > containers=null, bool dropIfFail=true)
Definition: Chara.cs:4746
void CureHost(CureType type, int p=100, BlessedState state=BlessedState.Normal)
Definition: Chara.cs:10145
override bool IsPC
Definition: Chara.cs:632
Party party
Definition: Chara.cs:45
List< Hobby > ListHobbies(bool useMemberType=true)
Definition: Chara.cs:9587
List< Hobby > ListWorks(bool useMemberType=true)
Definition: Chara.cs:9560
void Revive(Point p=null, bool msg=false)
Definition: Chara.cs:5503
SourceRace.Row race
Definition: Chara.cs:470
static void MakeDish(Thing food, int lv, Chara crafter=null, int seed=-1)
Definition: CraftUtil.cs:62
static int curve(long _a, int start, int step, int rate=75)
Definition: EClass.cs:69
Element SetBase(string alias, int v, int potential=0)
bool HasBase(int ele)
int GetProductBonus(Chara c)
bool TryTrash(Thing t)
bool IsGlobalPolicyActive(int id)
Definition: FACTION.cs:478
SourceHobby.Row source
Definition: Hobby.cs:8
int GetLv(Chara c)
Definition: Hobby.cs:22
Definition: Log.cs:4
void ForeachCell(Action< Cell > action)
Definition: MapBounds.cs:279
Point GetRandomPoint()
Definition: MapBounds.cs:97
void SetDecal(int x, int z, int id=0, int amount=1, bool refresh=true)
Definition: Map.cs:2191
MapBounds bounds
Definition: Map.cs:55
void AddMemeber(Chara c, bool showMsg=false)
Definition: Party.cs:71
bool HasDecal
Definition: Point.cs:139
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
Thing Find(int uid)
Definition: Props.cs:395
Thing Find(int uid)
bool IsFull(int y=0)
static Thing CreateTreasure(string id, int lv, TreasureType type=TreasureType.Map)
Definition: ThingGen.cs:264
static Thing CreateFromCategory(string idCat, int lv=-1)
Definition: ThingGen.cs:75
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
virtual int CraftNum
Definition: Trait.cs:135
virtual bool CanStack
Definition: Trait.cs:163
bool IsRealTime
Definition: VirtualDate.cs:7
Thing TryGetThingFromSharedContainer(Func< Thing, bool > func)
Definition: Zone.cs:2442
int GetSoilCost()
Definition: Zone.cs:4049

References EClass._map, EClass._zone, Party.AddMemeber(), Card.AddThing(), Map.bounds, Card.c_fur, Card.c_idRefCard, Card.c_wasInPcParty, Chara.CanRevive(), Trait.CanStack, Card.category, Card.ChangeMaterial(), Trait.CraftNum, ThingGen.Create(), ThingGen.CreateFromCategory(), ThingGen.CreateTreasure(), Chara.CureHost(), EClass.curve(), EClass.debug, Card.Destroy(), SourceManager.elements, CoreDebug.enable, Card.ExistsOnMap, Chara.faction, Props.Find(), ThingContainer.Find(), MapBounds.ForeachCell(), Hobby.GetEfficiency(), Hobby.GetLv(), MapBounds.GetRandomPoint(), Zone.GetSoilCost(), Point.HasDecal, Card.HasElement(), Card.HasTag(), Card.HaveFur(), Card.id, Map.Installed, Card.IsAmmo, Chara.isDead, Card.isDestroyed, ThingContainer.IsFull(), Faction.IsGlobalPolicyActive(), Chara.IsPC, Chara.IsPCParty, item, Chara.ListWorks(), Card.LV, CraftUtil.MakeDish(), Card.MakeEgg(), Card.MakeMilk(), Chara.memberType, Card.ModNum(), Card.Name, Card.Num, Cell.obj, Chara.party, EClass.pc, Card.pos, Chara.race, Chara.RefreshWorkElements(), Chara.Revive(), EClass.rnd(), WidgetPopText.Say(), Card.SetBlessedState(), Map.SetDecal(), Card.SetNum(), Card.SetTier(), Hobby.source, Cell.sourceObj, EClass.sources, Map.Stocked, Card.things, Card.trait, Zone.TryGetThingFromSharedContainer(), Card.TryMakeRandomItem(), Chara.TryPutShared(), Point.x, and Point.z.

◆ Evalue()

◆ GenerateGarbage()

void FactionBranch.GenerateGarbage ( VirtualDate  date)
inline

Definition at line 686 of file FactionBranch.cs.

687 {
688 int sortChance = 40 + GetCivility();
689 int unsortedCount = 0;
690 foreach (Chara member in members)
691 {
692 if (!member.IsPCParty && member.ExistsOnMap)
693 {
694 Hobby hobby = member.GetWork("Clean") ?? member.GetWork("Chore");
695 if (hobby != null)
696 {
697 sortChance += 20 * hobby.GetEfficiency(member) / 100;
698 }
699 }
700 }
701 int num = Evalue(2702);
702 int num2 = EClass.rnd(2);
703 for (int i = 0; i < num2; i++)
704 {
705 if (num == 0 || EClass.rnd(num + (EClass.debug.enable ? 100000 : 10)) == 0)
706 {
707 Generate(null);
708 }
709 }
710 foreach (Chara member2 in members)
711 {
712 if (!member2.IsPCParty && member2.ExistsOnMap && (num == 0 || EClass.rnd(num + (EClass.debug.enable ? 100000 : 10)) == 0))
713 {
714 Generate(member2);
715 }
716 }
717 void Generate(Chara c)
718 {
719 if (c == null || EClass.rnd(5) == 0)
720 {
721 if (EClass.rnd(80) == 0)
722 {
723 Add(ThingGen.CreateFromCategory("junk"));
724 }
725 else if (EClass.rnd(40) == 0)
726 {
727 Thing thing;
728 Add(thing = ThingGen.CreateFromTag("garbage"));
729 }
730 else
731 {
732 string id = "trash2";
733 if (EClass.rnd(3) == 0)
734 {
735 id = "trash1";
736 }
737 if (EClass.rnd(10) == 0)
738 {
739 id = ((EClass.rnd(3) == 0) ? "529" : "1170");
740 }
741 if (c != null && (!c.IsUnique || c.memberType == FactionMemberType.Livestock) && EClass.rnd((c.memberType == FactionMemberType.Livestock) ? 2 : 50) == 0)
742 {
743 id = "_poop";
744 }
745 if (EClass.rnd(200000) == 0)
746 {
747 id = "goodness";
748 }
749 Add(ThingGen.Create(id));
750 }
751 }
752 void Add(Thing t)
753 {
754 if (sortChance < EClass.rnd(100))
755 {
756 EClass._zone.TryAddThing(t, (c != null) ? (c.pos.GetRandomPoint(2) ?? c.pos).GetNearestPoint() : EClass._zone.bounds.GetRandomSurface(), destroyIfFail: true);
757 }
758 else
759 {
760 if (t.id == "_poop" && EClass.rnd(150) == 0)
761 {
762 t.ChangeMaterial((EClass.rnd(2) == 0) ? "silver" : "gold");
763 }
764 if (!TryTrash(t))
765 {
766 unsortedCount++;
767 if (unsortedCount >= 5)
768 {
769 Tutorial.Reserve("garbage");
770 }
771 }
772 }
773 }
774 }
775 }
bool IsUnique
Definition: Card.cs:2143
Point GetRandomSurface(int x, int z, int radius, bool walkable=true, bool allowWater=false)
Definition: MapBounds.cs:182
Point GetRandomPoint(int radius, bool requireLos=true, bool allowChara=true, bool allowBlocked=false, int tries=100)
Definition: Point.cs:774
static Thing CreateFromTag(string idTag, int lv=-1)
Definition: ThingGen.cs:80
static void Reserve(string idStep, Action onBeforePlay=null)
Definition: Tutorial.cs:55
MapBounds bounds
Definition: Zone.cs:52
bool TryAddThing(Thing target, Point p, bool destroyIfFail=false)
Definition: Zone.cs:2416

References EClass._zone, Zone.bounds, Card.ChangeMaterial(), ThingGen.Create(), ThingGen.CreateFromCategory(), ThingGen.CreateFromTag(), EClass.debug, CoreDebug.enable, Card.ExistsOnMap, Hobby.GetEfficiency(), Point.GetRandomPoint(), MapBounds.GetRandomSurface(), Chara.GetWork(), Card.id, Chara.IsPCParty, Card.IsUnique, Chara.memberType, Card.pos, Tutorial.Reserve(), EClass.rnd(), and Zone.TryAddThing().

◆ GetCivility()

int FactionBranch.GetCivility ( )
inline

Definition at line 1857 of file FactionBranch.cs.

1858 {
1859 int num = 10 + Evalue(2203);
1860 if (Evalue(2701) > 0)
1861 {
1862 num += 10 + (int)Mathf.Sqrt(Evalue(2701));
1863 }
1864 if (Evalue(2702) > 0)
1865 {
1866 num -= 10 + (int)Mathf.Sqrt(Evalue(2702));
1867 }
1868 return num;
1869 }

Referenced by Chara.CanEat(), and UIHomeInfo.RefreshInfo().

◆ GetDailyIncome()

void FactionBranch.GetDailyIncome ( )
inline

Definition at line 1220 of file FactionBranch.cs.

1221 {
1222 GetIncome(ref incomeShop, ref statistics.shop, "getIncomeShop", tax: false);
1223 GetIncome(ref incomeInn, ref statistics.inn, "getIncomeInn", tax: true);
1224 GetIncome(ref incomeTourism, ref statistics.tourism, "getIncomeTourism", tax: true);
1225 void GetIncome(ref int n, ref int stat, string lang, bool tax)
1226 {
1227 if (tax && !IsTaxFree)
1228 {
1229 n = n * 10 / 100;
1230 }
1231 if (n != 0)
1232 {
1233 Msg.Say(lang, Lang._currency(n, "money"), owner.Name);
1234 Thing t = ThingGen.Create("money").SetNum(n);
1235 EClass.pc.Pick(t);
1236 stat += n;
1237 n = 0;
1238 }
1239 }
1240 }
Thing Pick(Thing t, bool msg=true, bool tryStack=true)
Definition: Chara.cs:4612
Statistics statistics
Definition: Lang.cs:7
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:161

References Lang._currency(), ThingGen.Create(), FactionBranch.Statistics.inn, Spatial.Name, EClass.pc, Chara.Pick(), Msg.Say(), Card.SetNum(), FactionBranch.Statistics.shop, and FactionBranch.Statistics.tourism.

Referenced by OnAfterSimulate().

◆ GetHappiness()

int FactionBranch.GetHappiness ( FactionMemberType  type)
inline

Definition at line 1628 of file FactionBranch.cs.

1629 {
1630 float num = 0f;
1631 if (members.Count == 0)
1632 {
1633 return 0;
1634 }
1635 foreach (Chara member in members)
1636 {
1637 num += (float)member.happiness;
1638 }
1639 return (int)(num / (float)members.Count);
1640 }
int happiness
Definition: Chara.cs:112

References Chara.happiness.

◆ GetHearthHint()

string FactionBranch.GetHearthHint ( int  a)
inline

Definition at line 1489 of file FactionBranch.cs.

1490 {
1491 if (a <= 1)
1492 {
1493 return "hearth1".lang();
1494 }
1495 string text = "";
1496 for (int i = 1; i < a; i++)
1497 {
1498 string text2 = ("hearth" + (i + 1)).lang();
1499 if (!text2.IsEmpty())
1500 {
1501 text = text + text2 + Environment.NewLine;
1502 }
1503 }
1504 return text.TrimEnd(Environment.NewLine.ToCharArray());
1505 }

Referenced by UIHomeInfo.RefreshInfo().

◆ GetHearthIncome() [1/2]

float FactionBranch.GetHearthIncome ( )
inline

Definition at line 1871 of file FactionBranch.cs.

1872 {
1873 float num = 0f;
1874 foreach (Element value in elements.dict.Values)
1875 {
1876 if (value.source.category == "culture")
1877 {
1878 num += GetHearthIncome(value.source.alias);
1879 }
1880 }
1881 return num;
1882 }
Dictionary< int, Element > dict
SourceElement.Row source
Definition: ELEMENT.cs:282
float GetHearthIncome()

References Element.source.

◆ GetHearthIncome() [2/2]

float FactionBranch.GetHearthIncome ( string  id)
inline

Definition at line 1884 of file FactionBranch.cs.

1885 {
1886 int num = 0;
1887 foreach (KeyValuePair<int, Element> item in elements.dict)
1888 {
1889 if (item.Value.source.aliasParent == id)
1890 {
1891 num++;
1892 }
1893 }
1894 return 0.2f * (float)num;
1895 }

References item.

◆ GetMaid()

Chara FactionBranch.GetMaid ( )
inline

Definition at line 1669 of file FactionBranch.cs.

1670 {
1671 foreach (Chara member in members)
1672 {
1673 if (member.IsAliveInCurrentZone && member.IsMaid)
1674 {
1675 return member;
1676 }
1677 }
1678 return null;
1679 }
override bool IsAliveInCurrentZone
Definition: Chara.cs:569
bool IsMaid
Definition: Chara.cs:1076

References Chara.IsAliveInCurrentZone, and Chara.IsMaid.

Referenced by MeetingManager.CallNext().

◆ GetMailBox()

Thing FactionBranch.GetMailBox ( )
inline

Definition at line 1103 of file FactionBranch.cs.

1104 {
1105 return EClass._map.props.installed.FindEmptyContainer<TraitMailPost>();
1106 }

References EClass._map, PropsManager.installed, and Map.props.

◆ GetMailBoxPos()

Point FactionBranch.GetMailBoxPos ( )
inline

Definition at line 1108 of file FactionBranch.cs.

1109 {
1110 Thing thing = GetMailBox();
1111 if (thing == null)
1112 {
1114 }
1115 if (thing != null)
1116 {
1117 return thing.pos.GetNearestPoint(allowBlock: false, allowChara: true, allowInstalled: false, ignoreCenter: true).Clamp(useBounds: true);
1118 }
1119 return EClass._map.GetCenterPos();
1120 }
Thing GetMailBox()
Point GetCenterPos()
Definition: MapBounds.cs:52
Point GetNearestPoint(bool allowBlock=false, bool allowChara=true, bool allowInstalled=true, bool ignoreCenter=false, int minRadius=0)
Definition: Point.cs:624
Point Clamp(bool useBounds=false)
Definition: Point.cs:1014

References EClass._map, Point.Clamp(), Props.Find(), MapBounds.GetCenterPos(), Point.GetNearestPoint(), PropsManager.installed, Card.pos, and Map.props.

◆ GetMeal()

Thing FactionBranch.GetMeal ( Chara  c)
inline

Definition at line 1242 of file FactionBranch.cs.

1243 {
1244 if (c.things.IsFull())
1245 {
1246 return null;
1247 }
1248 if (c.memberType == FactionMemberType.Livestock && policies.IsActive(2715))
1249 {
1250 return null;
1251 }
1252 Thing thing = EClass._zone.TryGetThingFromSharedContainer((Thing t) => c.CanEat(t, shouldEat: true) && !t.c_isImportant);
1253 if (thing != null)
1254 {
1255 thing = thing.Split(1);
1256 }
1257 return thing;
1258 }
Thing Split(int a)
Definition: Card.cs:3665
bool c_isImportant
Definition: Card.cs:1051
bool CanEat(Thing t, bool shouldEat=false)
Definition: Chara.cs:8095

References EClass._zone, Card.c_isImportant, Chara.CanEat(), PolicyManager.IsActive(), ThingContainer.IsFull(), Chara.memberType, Card.Split(), Card.things, and Zone.TryGetThingFromSharedContainer().

Referenced by AI_Idle.Run().

◆ GetNextExp()

int FactionBranch.GetNextExp ( int  _lv = -1)
inline

Definition at line 156 of file FactionBranch.cs.

157 {
158 if (_lv == -1)
159 {
160 _lv = lv;
161 }
162 return _lv * _lv * 100 + 100;
163 }

References lv.

Referenced by WidgetStatsBar.Build(), LayerShippingResult.Refresh(), and CoreDebug.UpdateInput().

◆ GetPastureCost()

int FactionBranch.GetPastureCost ( )
inline

Definition at line 1852 of file FactionBranch.cs.

1853 {
1854 return CountMembers(FactionMemberType.Livestock);
1855 }
int CountMembers(FactionMemberType type, bool onlyAlive=false)

Referenced by UIHomeInfo.RefreshInfo().

◆ GetProductBonus()

int FactionBranch.GetProductBonus ( Chara  c)
inline

Definition at line 179 of file FactionBranch.cs.

180 {
181 if (c.isDead || c.IsPCParty)
182 {
183 return 0;
184 }
185 if (c.memberType == FactionMemberType.Livestock)
186 {
187 return 100;
188 }
189 return Mathf.Max(1, (90 + Evalue(2116) / 2) * efficiency / 100);
190 }

References efficiency, Evalue(), Chara.isDead, Chara.IsPCParty, and Chara.memberType.

◆ GetRandomName()

string FactionBranch.GetRandomName ( )
inline

Definition at line 1681 of file FactionBranch.cs.

1682 {
1683 if (EClass.rnd(4) == 0 || members.Count == 0)
1684 {
1685 return EClass.player.title;
1686 }
1687 return members.RandomItem().Name;
1688 }
static Player player
Definition: EClass.cs:13
string title
Definition: Player.cs:1074

References EClass.player, EClass.rnd(), and Player.title.

Referenced by BaseArea.GetRandomName().

◆ GetResidentTax()

int FactionBranch.GetResidentTax ( )
inline

Definition at line 1122 of file FactionBranch.cs.

1123 {
1124 if (!policies.IsActive(2512, 30))
1125 {
1126 return 0;
1127 }
1128 int num = 0;
1129 int num2 = (policies.IsActive(2500, 30) ? Evalue(2500) : 0);
1130 int num3 = (policies.IsActive(2501, 30) ? Evalue(2501) : 0);
1131 int num4 = 50 + (int)Mathf.Sqrt(Evalue(2512)) * 5;
1132 foreach (Chara member in members)
1133 {
1134 if (member.IsPC || member.memberType != FactionMemberType.Default)
1135 {
1136 continue;
1137 }
1138 bool isWealthy = member.IsWealthy;
1139 int num5 = 0;
1140 foreach (Hobby item in member.ListWorks().Concat(member.ListHobbies()))
1141 {
1142 int num6 = item.source.tax * 100 / 100;
1143 if (num6 > num5)
1144 {
1145 num5 = num6;
1146 }
1147 }
1148 int num7 = (int)(((isWealthy ? 50 : 10) + (long)member.LV * 2L) * num5 / 100 * num4 / 100);
1149 if (isWealthy && num2 > 0)
1150 {
1151 num7 = num7 * (150 + (int)Mathf.Sqrt(num2) * 5) / 100;
1152 }
1153 if (num3 > 0)
1154 {
1155 num7 += (80 + (int)Mathf.Sqrt(num3) * 5) * member.faith.source.tax / 100;
1156 }
1157 num7 = num7 * efficiency / (IsTaxFree ? 100 : 1000);
1158 num += num7;
1159 if (num7 > 0)
1160 {
1161 Log("bTax", num7.ToString() ?? "", member.Name);
1162 }
1163 }
1164 statistics.tax += num;
1165 return num;
1166 }
Religion faith
Definition: Chara.cs:445
SourceReligion.Row source
Definition: Religion.cs:40

References Chara.faith, PolicyManager.IsActive(), Chara.IsPC, Chara.IsWealthy, item, Chara.ListHobbies(), Chara.ListWorks(), Card.LV, Chara.memberType, Card.Name, and Religion.source.

Referenced by Faction.GetResidentTax().

◆ GetTechUpgradeCost()

int FactionBranch.GetTechUpgradeCost ( Element  e)
inline

Definition at line 1897 of file FactionBranch.cs.

1898 {
1899 int valueWithoutLink = e.ValueWithoutLink;
1900 valueWithoutLink += e.CostLearn;
1901 if (e.source.max != 0 && e.ValueWithoutLink >= e.source.max)
1902 {
1903 return 0;
1904 }
1905 return valueWithoutLink;
1906 }
int ValueWithoutLink
Definition: ELEMENT.cs:303
virtual int CostLearn
Definition: ELEMENT.cs:323

References Element.CostLearn, Element.source, and Element.ValueWithoutLink.

Referenced by ButtonElement.Refresh(), and LayerHome.RefreshFeat().

◆ GetUpgradeCost()

int FactionBranch.GetUpgradeCost ( )
inline

Definition at line 1459 of file FactionBranch.cs.

1460 {
1461 return lv * lv * lv * 1000;
1462 }

◆ IsAllDead()

bool FactionBranch.IsAllDead ( )
inline

Definition at line 1642 of file FactionBranch.cs.

1643 {
1644 foreach (Chara member in members)
1645 {
1646 if (!member.isDead)
1647 {
1648 return false;
1649 }
1650 }
1651 return true;
1652 }

References Chara.isDead.

◆ IsRecruit()

bool FactionBranch.IsRecruit ( Chara  c)
inline

Definition at line 1835 of file FactionBranch.cs.

1836 {
1837 foreach (HireInfo item in listRecruit)
1838 {
1839 if (item.chara == c)
1840 {
1841 return true;
1842 }
1843 }
1844 return false;
1845 }

References item.

Referenced by DramaOutcome.chara_hired().

◆ Log() [1/3]

string FactionBranch.Log ( string  idLang,
Card  c1,
Card  c2,
string  ref1 = null,
string  ref2 = null 
)
inline

Definition at line 1914 of file FactionBranch.cs.

1915 {
1916 Msg.alwaysVisible = true;
1917 return LogRaw(Msg.GetRawText(idLang, c1, c2, ref1, ref2), EClass.sources.langGame.map[idLang].logColor);
1918 }
string LogRaw(string text, string col=null)
static string GetRawText(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:37
LangGame langGame

References Msg.GetRawText(), SourceManager.langGame, and EClass.sources.

◆ Log() [2/3]

string FactionBranch.Log ( string  idLang,
Card  c1,
string  ref1 = null,
string  ref2 = null,
string  ref3 = null 
)
inline

Definition at line 1920 of file FactionBranch.cs.

1921 {
1922 Msg.alwaysVisible = true;
1923 return LogRaw(Msg.GetRawText(idLang, c1, ref1, ref2, ref3), EClass.sources.langGame.map[idLang].logColor);
1924 }

References Msg.GetRawText(), SourceManager.langGame, and EClass.sources.

◆ Log() [3/3]

string FactionBranch.Log ( string  idLang,
string  ref1 = null,
string  ref2 = null,
string  ref3 = null,
string  ref4 = null 
)
inline

Definition at line 1908 of file FactionBranch.cs.

1909 {
1910 Msg.alwaysVisible = true;
1911 return LogRaw(Msg.GetRawText(idLang, ref1, ref2, ref3, ref4), EClass.sources.langGame.map[idLang].logColor);
1912 }

References Msg.GetRawText(), SourceManager.langGame, and EClass.sources.

Referenced by AI_Shopping.Buy(), Zone.ClaimZone(), Chara.Die(), Expedition.End(), ElementContainerCard.OnLevelUp(), ElementContainerZone.OnLevelUp(), Chara.Revive(), and Expedition.Start().

◆ LogRaw()

string FactionBranch.LogRaw ( string  text,
string  col = null 
)
inline

Definition at line 1926 of file FactionBranch.cs.

1927 {
1928 log.Add(text, col.IsEmpty() ? null : col);
1929 Msg.alwaysVisible = false;
1930 Msg.SetColor();
1931 return text;
1932 }
void Add(Data data)
Definition: MsgLog.cs:53
static void SetColor()
Definition: Msg.cs:22

References MsgLog.Add(), and Msg.SetColor().

◆ ModExp()

void FactionBranch.ModExp ( int  a)
inline

Definition at line 1464 of file FactionBranch.cs.

1465 {
1466 if (policies.IsActive(2515))
1467 {
1468 return;
1469 }
1470 if (policies.IsActive(2516))
1471 {
1472 a = a * 150 / 100 + EClass.rnd(2);
1473 }
1474 exp += a;
1475 if (exp >= GetNextExp() && CanUpgrade())
1476 {
1477 if (EClass.core.version.demo && lv >= 3)
1478 {
1479 exp = 0;
1480 Msg.Say("demoLimit2");
1481 }
1482 else
1483 {
1484 Upgrade();
1485 }
1486 }
1487 }
Version version
Definition: BaseCore.cs:17
static Core core
Definition: EClass.cs:7
bool demo
Definition: Version.cs:15

References EClass.core, Version.demo, PolicyManager.IsActive(), EClass.rnd(), Msg.Say(), and BaseCore.version.

Referenced by CoreDebug.UpdateInput().

◆ OnActivateZone()

void FactionBranch.OnActivateZone ( )
inline

Definition at line 277 of file FactionBranch.cs.

278 {
279 incomeInn = 0;
280 incomeTourism = 0;
281 foreach (Chara member in members)
282 {
283 if (member.IsAliveInCurrentZone && !member.pos.IsInBounds)
284 {
286 }
288 }
290 }
void MoveImmediate(Point p, bool focus=true, bool cancelAI=true)
Definition: Card.cs:6168
void ValidateUpgradePolicies()
bool IsInBounds
Definition: Point.cs:104

References EClass._map, elements, MapBounds.GetCenterPos(), Point.GetNearestPoint(), incomeInn, incomeTourism, Chara.IsAliveInCurrentZone, Point.IsInBounds, members, Card.MoveImmediate(), Card.pos, Chara.RefreshWorkElements(), and ValidateUpgradePolicies().

◆ OnAdvanceDay()

void FactionBranch.OnAdvanceDay ( )
inline

Definition at line 652 of file FactionBranch.cs.

653 {
654 int num = 0;
655 foreach (Chara member in members)
656 {
657 if (member.IsPC || member.isDead)
658 {
659 continue;
660 }
661 if (member.IsPCParty || member.currentZone == EClass.pc.currentZone)
662 {
663 member.c_daysWithPC++;
664 }
665 if (member.memberType == FactionMemberType.Default)
666 {
667 if (EClass.rnd(3) == 0)
668 {
669 num++;
670 }
671 if (member.GetWork("Pioneer") != null)
672 {
673 num += 3;
674 }
675 }
676 }
677 ModExp(num);
678 }
int c_daysWithPC
Definition: Card.cs:1525
Zone currentZone
Definition: Chara.cs:261
void ModExp(int a)

References Card.c_daysWithPC, Chara.currentZone, Chara.GetWork(), Chara.isDead, Chara.IsPC, Chara.IsPCParty, Chara.memberType, EClass.pc, and EClass.rnd().

Referenced by Faction.OnAdvanceDay().

◆ OnAfterSimulate()

void FactionBranch.OnAfterSimulate ( )
inline

Definition at line 292 of file FactionBranch.cs.

293 {
294 if (!EClass.game.isLoading)
295 {
297 }
298 foreach (Chara chara in EClass._map.charas)
299 {
300 if (!chara.IsPCParty && !chara.noMove)
301 {
302 if ((chara.pos.cell.HasBlock || chara.pos.cell.hasDoor) && !chara.isRestrained && !chara.HasCondition<ConSuspend>())
303 {
304 chara.MoveImmediate(chara.pos.GetNearestPoint(allowBlock: false, allowChara: false) ?? chara.pos);
305 }
307 {
308 EClass.pc.party.AddMemeber(chara, showMsg: true);
309 }
310 }
311 }
312 }
bool isRestrained
Definition: Card.cs:569
bool noMove
Definition: Card.cs:773
bool HasBlock
Definition: Cell.cs:679
bool hasDoor
Definition: Cell.cs:279
bool HasCondition(string alias)
Definition: Chara.cs:10053
static Game game
Definition: EClass.cs:9
void GetDailyIncome()
bool isLoading
Definition: Game.cs:242
bool simulatingZone
Definition: Player.cs:1252
Cell cell
Definition: Point.cs:51

References EClass._map, Party.AddMemeber(), Card.c_wasInPcParty, Point.cell, Map.charas, EClass.game, GetDailyIncome(), Point.GetNearestPoint(), Cell.HasBlock, Chara.HasCondition(), Cell.hasDoor, Game.isLoading, Chara.IsPCParty, Card.isRestrained, Card.MoveImmediate(), Card.noMove, Chara.party, EClass.pc, EClass.player, Card.pos, and Player.simulatingZone.

Referenced by Zone.OnVisit().

◆ OnClaimZone()

void FactionBranch.OnClaimZone ( )
inline

Definition at line 1260 of file FactionBranch.cs.

1261 {
1263 {
1264 foreach (SourceElement.Row item in EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == "tech"))
1265 {
1266 elements.SetBase(item.id, 1);
1267 }
1268 foreach (SourceElement.Row item2 in EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == "policy" && !a.tag.Contains("hidden")))
1269 {
1270 policies.AddPolicy(item2.id);
1271 }
1272 }
1273 else
1274 {
1275 elements.SetBase(2003, 1);
1276 elements.SetBase(4002, 1);
1277 elements.SetBase(2115, 1);
1278 elements.SetBase(2204, 1);
1279 elements.SetBase(2120, 1);
1280 policies.AddPolicy(2512);
1281 policies.AddPolicy(2702);
1282 policies.AddPolicy(2703);
1283 policies.AddPolicy(2516);
1284 policies.AddPolicy(2515);
1285 policies.AddPolicy(2514);
1286 }
1288 {
1289 policies.Activate(2514);
1290 }
1291 Element element = EClass._zone.ListLandFeats()[0];
1292 elements.SetBase(element.id, 1);
1293 switch (element.id)
1294 {
1295 case 3604:
1296 elements.SetBase(2206, 10);
1297 break;
1298 case 3602:
1299 elements.SetBase(2206, 15);
1300 break;
1301 }
1303 {
1305 }
1307 {
1308 foreach (SourceElement.Row item3 in EClass.sources.elements.rows.Where((SourceElement.Row a) => a.category == "policy"))
1309 {
1310 policies.AddPolicy(item3.id);
1311 }
1312 }
1314 }
bool allPolicy
Definition: CoreDebug.cs:253
bool allHomeSkill
Definition: CoreDebug.cs:211
int id
Definition: ELEMENT.cs:259
void AddMemeber(Chara c)
int CountTaxFreeLand()
Definition: FACTION.cs:585
Zone StartZone
Definition: Game.cs:278
void Activate(int id)
void AddPolicy(string id)
List< Element > ListLandFeats()
Definition: Zone.cs:3412

References EClass._zone, PolicyManager.Activate(), PolicyManager.AddPolicy(), CoreDebug.allHomeSkill, CoreDebug.allPolicy, Faction.CountTaxFreeLand(), EClass.debug, SourceManager.elements, Chara.faction, EClass.game, Card.id, Element.id, item, Zone.ListLandFeats(), EClass.pc, EClass.sources, and Game.StartZone.

Referenced by Zone.ClaimZone().

◆ OnCreate()

void FactionBranch.OnCreate ( Zone  zone)
inline

Definition at line 240 of file FactionBranch.cs.

241 {
242 SetOwner(zone);
243 stash = ThingGen.Create("container_salary");
247 }
void RemoveThings()
Definition: Card.cs:3491
Religion faith
void SetOwner(Zone zone)
ReligionManager religions
Definition: Game.cs:159
ReligionEyth Eyth

References ThingGen.Create(), World.date, dateFound, ReligionManager.Eyth, faith, EClass.game, Date.GetRaw(), Game.religions, Card.RemoveThings(), SetOwner(), stash, and EClass.world.

Referenced by Zone.ClaimZone().

◆ OnSimulateDay()

void FactionBranch.OnSimulateDay ( VirtualDate  date)
inline

Definition at line 598 of file FactionBranch.cs.

599 {
600 if (owner == null || owner.mainFaction != EClass.Home)
601 {
602 return;
603 }
607 if (!date.IsRealTime)
608 {
609 BranchMap branchMap = date.GetBranchMap();
610 foreach (Chara member in members)
611 {
612 if (!member.IsPCParty && member.memberType != FactionMemberType.Livestock && !member.faith.IsEyth && !member.c_isPrayed && branchMap.altarMap.Contains(member.faith.id))
613 {
614 AI_Pray.Pray(member, silent: true);
615 }
616 }
617 }
618 foreach (Chara member2 in members)
619 {
620 member2.c_isPrayed = false;
621 member2.c_isTrained = false;
622 }
623 if (date.day != 1)
624 {
625 return;
626 }
627 luckyMonth = false;
628 if (date.month == 1)
629 {
630 luckyMonthDone = false;
631 }
632 if (!luckyMonthDone)
633 {
634 bool flag = EClass.pc.faith == EClass.game.religions.Luck;
635 luckyMonth = (float)(flag ? 30 : 5) + Mathf.Sqrt(Evalue(2118)) * (float)(flag ? 4 : 2) > (float)EClass.rnd(720);
636 if (EClass.debug.enable)
637 {
638 luckyMonth = true;
639 }
640 if (luckyMonth)
641 {
642 Log("lucky_month", EClass._zone.Name);
643 Msg.Say("lucky_month", EClass._zone.Name);
644 Msg.Say("umi");
645 SE.Play("godbless");
646 EClass.world.SendPackage(ThingGen.Create("book_kumiromi"));
647 luckyMonthDone = true;
648 }
649 }
650 }
static void Pray(Chara c, bool silent=false)
Definition: AI_Pray.cs:52
HashSet< string > altarMap
Definition: BranchMap.cs:5
bool c_isPrayed
Definition: Card.cs:1099
int month
Definition: Date.cs:50
int day
Definition: Date.cs:62
HappinessManager happiness
ResearchManager researches
HomeResourceManager resources
ReligionLuck Luck
bool IsEyth
Definition: Religion.cs:65
virtual string id
Definition: Religion.cs:33
Faction mainFaction
Definition: Spatial.cs:442
BranchMap GetBranchMap()
Definition: VirtualDate.cs:44
void SendPackage(Thing p)
Definition: World.cs:68

References EClass._zone, Card.c_isPrayed, ThingGen.Create(), EClass.debug, CoreDebug.enable, Chara.faith, EClass.game, VirtualDate.GetBranchMap(), EClass.Home, Religion.id, Religion.IsEyth, Chara.IsPCParty, VirtualDate.IsRealTime, ReligionManager.Luck, Spatial.mainFaction, Chara.memberType, Spatial.Name, HappinessManager.OnSimulateDay(), HomeResourceManager.OnSimulateDay(), ResearchManager.OnSimulateDay(), AI_Pray.Pray(), Game.religions, EClass.rnd(), Msg.Say(), World.SendPackage(), and EClass.world.

Referenced by Zone.OnSimulateDay().

◆ OnSimulateHour()

void FactionBranch.OnSimulateHour ( VirtualDate  date)
inline

Definition at line 318 of file FactionBranch.cs.

319 {
320 int num = CountMembers(FactionMemberType.Default, onlyAlive: true);
321 int starveChance = Mathf.Max(num - MaxPopulation, 0);
322 members.ForeachReverse(delegate(Chara c)
323 {
324 if (!c.IsPCParty && c.IsAliveInCurrentZone && !c.noMove)
325 {
326 if (EClass.rnd(24 * members.Count) < starveChance)
327 {
328 starveChance--;
329 }
330 else
331 {
332 c.TickWork(date);
333 }
334 if (!date.IsRealTime && EClass.rnd(3) != 0 && c.memberType == FactionMemberType.Default)
335 {
336 c.hunger.Mod(1);
337 if (c.hunger.GetPhase() >= 3)
338 {
339 Thing meal = GetMeal(c);
340 if (meal != null)
341 {
342 FoodEffect.Proc(c, meal);
343 }
344 else
345 {
346 c.hunger.Mod(-50);
347 }
348 }
349 }
350 }
351 });
355 int num2 = Evalue(3707);
356 int num3 = Evalue(3705) + Evalue(3710) * 2;
357 int num4 = 4 + num3 * 4;
358 int num5 = Mathf.Max(1, (100 + Evalue(2205) * 5 + Evalue(3703) * 100 - num2 * 80) / 10);
359 int num6 = 10;
360 if (policies.IsActive(2709))
361 {
362 num6 = 0;
363 }
365 {
366 num5 /= 2;
367 }
368 if ((date.IsRealTime || num2 > 0) && !EClass.debug.enable && EClass.rnd(num5) == 0 && !EClass.pc.IsDeadOrSleeping && EClass._map.CountHostile() < num4)
369 {
370 int num7 = 1 + EClass.rnd(num2 + num3 + 1);
371 for (int num8 = 0; num8 < num7; num8++)
372 {
374 if (chara == null)
375 {
376 break;
377 }
378 if (chara.IsAnimal && policies.IsActive(2709))
379 {
380 chara.Destroy();
381 }
382 }
383 }
384 if ((date.IsRealTime || num2 == 0) && num6 != 0 && EClass.rnd(num6) == 0 && EClass._map.CountWildAnimal() < num4)
385 {
387 }
388 if (EClass.rnd(5) == 0 && policies.IsActive(2810))
389 {
390 int num9 = 3 + lv + Evalue(2206) / 5 + Evalue(3702) * 2 + Evalue(2202) / 2;
391 num9 = num9 * (100 + Evalue(3702) * 20 + Evalue(2206)) / 100;
392 num9 = num9 * (100 + (int)Mathf.Sqrt(Evalue(2811)) * 3) / 100;
393 if (luckyMonth)
394 {
395 num9 = num9 * 2 + 5;
396 }
397 if (EClass._map.CountGuest() < num9)
398 {
399 Chara chara2;
400 if (luckyMonth || (policies.IsActive(2822) && Mathf.Sqrt(Evalue(2822) / 2) + 5f >= (float)EClass.rnd(100)))
401 {
404 }
405 else
406 {
408 }
409 if (chara2 != null && (chara2.id == "nun_mother" || chara2.id == "prostitute") && policies.IsActive(2710))
410 {
411 chara2.Destroy();
412 chara2 = null;
413 }
414 if (chara2 != null)
415 {
417 chara2.memberType = FactionMemberType.Guest;
418 chara2.SetInt(34, EClass.world.date.GetRaw());
419 chara2.c_allowance = chara2.LV * 100;
420 if (chara2.IsWealthy)
421 {
422 chara2.c_allowance *= 10;
423 }
424 if (date.IsRealTime)
425 {
426 Msg.Say("guestArrive", chara2.Name);
427 }
428 else
429 {
430 chara2.TryAssignBed();
431 }
432 }
433 }
434 }
435 foreach (Chara chara4 in EClass._map.charas)
436 {
437 if (chara4.memberType != FactionMemberType.Guest || ((chara4.c_allowance > 0 || EClass.rnd(2) != 0) && chara4.GetInt(34) + 10080 >= EClass.world.date.GetRaw()))
438 {
439 continue;
440 }
441 foreach (Chara item in EClass._zone.ListMinions(chara4))
442 {
443 item.Destroy();
444 }
445 if (!chara4.IsGlobal)
446 {
447 chara4.Destroy();
448 }
449 chara4.ClearBed();
450 break;
451 }
452 if (date.hour == 5)
453 {
454 for (int num10 = 0; num10 < ((!luckyMonth) ? 1 : 2); num10++)
455 {
456 DailyOutcome(date);
457 }
458 GenerateGarbage(date);
459 if (!date.IsRealTime)
460 {
461 AutoClean();
462 }
465 if (date.IsRealTime)
466 {
468 }
469 }
470 if (!EClass.player.simulatingZone && date.hour == 6)
471 {
472 ReceivePackages(date);
473 }
474 if (!date.IsRealTime && date.hour % 8 == 0)
475 {
476 foreach (Chara item2 in EClass._map.charas.Where((Chara c) => c.memberType == FactionMemberType.Guest).ToList())
477 {
478 for (int num11 = 0; num11 < 3; num11++)
479 {
480 AI_Shopping.TryShop(item2, realtime: false);
481 }
482 }
483 AI_Shopping.TryRestock(EClass.pc, realtime: false);
484 }
485 if (EClass.rnd(24) == 0 || EClass.debug.enable)
486 {
487 foreach (Thing thing in EClass._map.things)
488 {
489 if (EClass.rnd(20) == 0 && thing.trait is TraitFoodEggFertilized && thing.pos.FindThing<TraitBed>() != null)
490 {
491 Chara chara3 = TraitFoodEggFertilized.Incubate(thing, thing.pos);
492 thing.ModNum(-1);
493 if (date.IsRealTime)
494 {
495 chara3.PlaySound("egg");
496 }
497 break;
498 }
499 }
500 }
502 }
if(!match.Success)
SpawnPosition
Definition: SpawnPosition.cs:2
static bool TryRestock(Chara c, bool realtime)
Definition: AI_Shopping.cs:129
static bool TryShop(Chara c, bool realtime)
Definition: AI_Shopping.cs:16
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
void SetInt(string id, int value=0)
Definition: Card.cs:2586
int c_allowance
Definition: Card.cs:1357
int GetInt(string id, int? defaultInt=null)
Definition: Card.cs:2567
static Chara CreateWealthy(int lv=-1)
Definition: CharaGen.cs:53
TraitBed TryAssignBed()
Definition: Chara.cs:7829
bool IsAnimal
Definition: Chara.cs:916
override bool IsDeadOrSleeping
Definition: Chara.cs:581
int hour
Definition: Date.cs:74
bool IsNight
Definition: Date.cs:112
MeetingManager meetings
ExpeditionManager expeditions
void DailyOutcome(VirtualDate date)
void CalcInnIncome()
void CalcTourismIncome()
void GenerateGarbage(VirtualDate date)
void ReceivePackages(VirtualDate date)
int CountHostile()
Definition: Map.cs:2653
int CountGuest()
Definition: Map.cs:2640
int CountWildAnimal()
Definition: Map.cs:2666
void OnSimulateHour(VirtualDate date)
Thing FindThing(Func< Thing, bool > func)
Definition: Point.cs:1146
void OnSimulateHour(VirtualDate date)
static SpawnSetting HomeWild(int lv)
static SpawnSetting HomeEnemy(int lv)
static SpawnSetting HomeGuest(int lv)
static Chara Incubate(Thing egg, Point pos, Card incubator=null)
List< Chara > ListMinions(Chara c)
Definition: Zone.cs:4023
Chara SpawnMob(string id, Point pos=null)
Definition: Zone.cs:2988
Card AddCard(Card t, Point point)
Definition: Zone.cs:2159
Point GetSpawnPos(Chara c, ZoneTransition.EnterState destState=ZoneTransition.EnterState.Auto)
Definition: Zone.cs:1500

References CountMembers(), if(), Chara.IsAliveInCurrentZone, Chara.IsPCParty, VirtualDate.IsRealTime, MaxPopulation, members, Chara.memberType, Card.noMove, and EClass.rnd().

Referenced by Zone.OnSimulateHour().

◆ OnSimulateMonth()

void FactionBranch.OnSimulateMonth ( VirtualDate  date)
inline

Definition at line 680 of file FactionBranch.cs.

681 {
683 statistics = new Statistics();
684 }
Statistics lastStatistics

Referenced by Zone.OnSimulateMonth().

◆ OnUnclaimZone()

void FactionBranch.OnUnclaimZone ( )
inline

Definition at line 1316 of file FactionBranch.cs.

1317 {
1318 List<Element> source = owner.ListLandFeats();
1319 if (lv >= 5)
1320 {
1321 foreach (Element item in source.Where((Element a) => a.HasTag("network")).ToList())
1322 {
1324 }
1325 }
1326 Element[] array = elements.dict.Values.ToArray();
1327 foreach (Element element in array)
1328 {
1329 elements.SetBase(element.id, 0);
1330 }
1331 owner.landFeats = null;
1333 owner.branch = null;
1334 }
bool HasTag(string tag)
Definition: ELEMENT.cs:482

References Faction.elements, Chara.faction, Element.HasTag(), Element.id, item, Zone.ListLandFeats(), ElementContainer.ModBase(), and EClass.pc.

Referenced by Zone.AbandonZone().

◆ OnUnloadMap()

void FactionBranch.OnUnloadMap ( )
inline

Definition at line 314 of file FactionBranch.cs.

315 {
316 }

Referenced by Zone.UnloadMap().

◆ PutInMailBox()

void FactionBranch.PutInMailBox ( Thing  t,
bool  outside = false,
bool  install = true 
)
inline

Definition at line 1084 of file FactionBranch.cs.

1085 {
1086 if (!outside)
1087 {
1088 Thing mailBox = GetMailBox();
1089 if (mailBox != null)
1090 {
1091 mailBox.AddCard(t);
1092 return;
1093 }
1094 }
1095 Point mailBoxPos = GetMailBoxPos();
1096 EClass._zone.AddCard(t, mailBoxPos);
1097 if (install)
1098 {
1099 t.Install();
1100 }
1101 }
Card AddCard(Card c)
Definition: Card.cs:3266
Card Install()
Definition: Card.cs:3922
Point GetMailBoxPos()

References EClass._zone, Card.AddCard(), Zone.AddCard(), and Card.Install().

◆ ReceivePackages()

void FactionBranch.ReceivePackages ( VirtualDate  date)
inline

Definition at line 788 of file FactionBranch.cs.

789 {
791 {
792 return;
793 }
794 List<Thing> listPackage = EClass.game.cards.listPackage;
795 if (EClass.player.stats.days >= 2 && !EClass.player.flags.elinGift && Steam.HasDLC(ID_DLC.BackerReward))
796 {
797 listPackage.Add(ThingGen.Create("gift"));
798 EClass.player.flags.elinGift = true;
799 }
800 if (listPackage.Count == 0)
801 {
802 return;
803 }
804 SE.Play("notice");
805 int num = 0;
806 foreach (Thing item in listPackage)
807 {
808 if (item.id != "bill")
809 {
810 num++;
811 }
812 PutInMailBox(item, item.id == "cardboard_box" || item.id == "gift");
813 WidgetPopText.Say("popDeliver".lang(item.Name));
814 }
815 Msg.Say("deliver_arrive", num.ToString() ?? "");
816 listPackage.Clear();
817 }
ID_DLC
Definition: ID_DLC.cs:2
void Add(Act a, string s="")
Definition: ActPlan.cs:11
List< Thing > listPackage
Definition: CardManager.cs:61
void PutInMailBox(Thing t, bool outside=false, bool install=true)
CardManager cards
Definition: Game.cs:156
bool elinGift
Definition: Player.cs:412
int days
Definition: Player.cs:75
Flags flags
Definition: Player.cs:1164
Stats stats
Definition: Player.cs:1086
static bool HasDLC(ID_DLC id)
Definition: Steam.cs:43

References ActPlan.List.Add(), Game.cards, ThingGen.Create(), Player.Stats.days, Player.Flags.elinGift, Player.flags, EClass.game, Steam.HasDLC(), item, CardManager.listPackage, EClass.player, Msg.Say(), WidgetPopText.Say(), Player.simulatingZone, and Player.stats.

◆ Recruit()

void FactionBranch.Recruit ( Chara  c)
inline

Definition at line 1654 of file FactionBranch.cs.

1655 {
1656 RemoveRecruit(c);
1657 AddMemeber(c);
1658 c.isRestrained = false;
1659 if (c.currentZone != EClass._zone && !c.isDead)
1660 {
1662 EClass._zone.AddCard(c, point);
1663 }
1666 Msg.Say("hire".langGame(c.Name));
1667 }
void RemoveRecruit(Chara c)
TraitManager traits
Definition: Props.cs:18
TraitSet GetTraitSet(Type t)
Definition: TraitManager.cs:94
Point GetPoint()
Definition: Trait.cs:845

References EClass._map, EClass._zone, Zone.AddCard(), Chara.currentZone, Trait.GetPoint(), TraitManager.GetTraitSet(), Map.Installed, Chara.isDead, Card.Name, EClass.pc, Card.pos, Chara.RefreshWorkElements(), Msg.Say(), and Props.traits.

Referenced by DramaOutcome.chara_hired(), DramaOutcome.chara_hired_ticket(), ListPeopleCallReserve.OnClick(), and DramaOutcome.QuestExploration_MeetFarris2().

◆ RefreshEfficiency()

void FactionBranch.RefreshEfficiency ( )
inline

Definition at line 192 of file FactionBranch.cs.

193 {
194 int num = 100;
195 int num2 = CountMembers(FactionMemberType.Default);
196 int ration = 0;
197 foreach (Chara member in members)
198 {
199 if (member.memberType != FactionMemberType.Default || member.IsPCParty || member.homeBranch == null || member.homeBranch.owner == null)
200 {
201 continue;
202 }
203 foreach (Hobby item in member.ListHobbies())
204 {
205 TryAdd(item);
206 }
207 foreach (Hobby item2 in member.ListWorks())
208 {
209 TryAdd(item2);
210 }
211 }
212 if (num2 > MaxPopulation)
213 {
214 num -= (num2 - MaxPopulation) * 20 * 100 / (100 + 20 * (int)Mathf.Sqrt(ration));
215 }
216 if (efficiency < 0)
217 {
218 efficiency = 0;
219 }
220 efficiency = num;
221 void TryAdd(Hobby h)
222 {
223 if (!h.source.elements.IsEmpty())
224 {
225 for (int i = 0; i < h.source.elements.Length; i += 2)
226 {
227 if (h.source.elements[i] == 2207)
228 {
229 ration += h.source.elements[i + 1];
230 }
231 }
232 }
233 }
234 }
FactionBranch homeBranch
Definition: Chara.cs:1115

References CountMembers(), efficiency, Chara.homeBranch, Chara.IsPCParty, item, Chara.ListHobbies(), Chara.ListWorks(), MaxPopulation, members, Chara.memberType, owner, and Hobby.source.

Referenced by Party.AddMemeber(), UIHomeInfo.RefreshReport(), Party.RemoveMember(), and SetOwner().

◆ RemoveMemeber()

void FactionBranch.RemoveMemeber ( Chara  c)
inline

Definition at line 1608 of file FactionBranch.cs.

1609 {
1610 c.isSale = false;
1611 if (c.currentZone != null && c.currentZone.map != null)
1612 {
1614 c.currentZone.map.props.sales.Remove(c);
1615 }
1617 if (!(c.trait is TraitUniqueChara) && !c.IsUnique && !EClass.game.cards.listAdv.Contains(c))
1618 {
1619 c.RemoveGlobal();
1620 }
1621 members.Remove(c);
1626 }
List< Chara > listAdv
Definition: CardManager.cs:64
new Faction Wilds
FactionManager factions
Definition: Game.cs:162
List< Card > sales
Definition: PropsManager.cs:14
Map map
Definition: Zone.cs:66

References Game.cards, Faction.charaElements, Chara.ClearBed(), Chara.currentZone, Chara.faction, Game.factions, EClass.game, Card.IsUnique, CardManager.listAdv, Zone.map, ElementContainerFaction.OnRemoveMember(), EClass.pc, Map.props, Chara.RefreshWorkElements(), Chara.RemoveGlobal(), PropsManager.sales, Chara.SetFaction(), Chara.trait, PolicyManager.Validate(), and FactionManager.Wilds.

Referenced by AddMemeber(), Faction.AddReserve(), Chara.Die(), and QuestDebt.OnStart().

◆ RemoveRecruit()

void FactionBranch.RemoveRecruit ( Chara  c)
inline

Definition at line 1803 of file FactionBranch.cs.

1804 {
1805 listRecruit.ForeachReverse(delegate(HireInfo i)
1806 {
1807 if (i.chara == c)
1808 {
1809 listRecruit.Remove(i);
1810 }
1811 });
1812 }
Chara chara
Definition: HireInfo.cs:6

References HireInfo.chara.

◆ SetOwner()

void FactionBranch.SetOwner ( Zone  zone)
inline

Definition at line 249 of file FactionBranch.cs.

250 {
251 owner = zone;
252 resources.SetOwner(this);
253 researches.SetOwner(this);
254 policies.SetOwner(this);
255 happiness.SetOwner(this);
256 expeditions.SetOwner(this);
257 meetings.SetOwner(this);
258 foreach (Chara value in EClass.game.cards.globalCharas.Values)
259 {
260 if (value == null)
261 {
262 Debug.LogError("exception: c==null");
263 }
264 else if (EClass.pc == null)
265 {
266 Debug.LogError("exception: pc==null");
267 }
268 else if (value.homeZone == zone && value.faction == EClass.pc.faction)
269 {
270 members.Add(value);
272 }
273 }
275 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
Zone homeZone
Definition: Chara.cs:273
void SetOwner(FactionBranch _branch)
void SetOwner(FactionBranch _owner)
void SetOwner(FactionBranch _owner)
void SetOwner(FactionBranch _branch)
void SetOwner(FactionBranch _owner)
void SetOwner(FactionBranch _branch)

References Game.cards, Faction.charaElements, Debug, expeditions, Chara.faction, EClass.game, CardManager.globalCharas, happiness, Chara.homeZone, meetings, members, ElementContainerFaction.OnAddMemeber(), owner, EClass.pc, policies, RefreshEfficiency(), researches, resources, ExpeditionManager.SetOwner(), MeetingManager.SetOwner(), ResearchManager.SetOwner(), HappinessManager.SetOwner(), HomeResourceManager.SetOwner(), and PolicyManager.SetOwner().

Referenced by OnCreate(), and Zone.OnLoad().

◆ TryTrash()

bool FactionBranch.TryTrash ( Thing  t)
inline

Definition at line 777 of file FactionBranch.cs.

778 {
779 Thing thing = ((t.id == "_poop" || t.source._origin == "dish") ? EClass._map.props.installed.FindEmptyContainer<TraitContainerCompost>(t) : (t.isFireproof ? EClass._map.props.installed.FindEmptyContainer<TraitContainerUnburnable>(t) : EClass._map.props.installed.FindEmptyContainer<TraitContainerBurnable>(t)));
780 if (thing != null)
781 {
782 thing.AddCard(t);
783 return true;
784 }
785 return EClass._zone.TryAddThingInSpot<TraitSpotGarbage>(t, useContainer: false);
786 }

References EClass._map, EClass._zone, Card.AddCard(), PropsManager.installed, and Map.props.

◆ UpdateReqruits()

void FactionBranch.UpdateReqruits ( bool  clear = false)
inline

Definition at line 1729 of file FactionBranch.cs.

1730 {
1732 if (clear)
1733 {
1734 listRecruit.ForeachReverse(delegate(HireInfo i)
1735 {
1736 if (!i.chara.IsGlobal)
1737 {
1738 i.chara.Destroy();
1739 }
1740 if (i.chara.isDestroyed)
1741 {
1742 listRecruit.Remove(i);
1743 }
1744 });
1745 listRecruit.Clear();
1746 lastUpdateReqruit = -1;
1747 }
1748 else
1749 {
1750 listRecruit.ForeachReverse(delegate(HireInfo i)
1751 {
1752 if (i.Hours < 0)
1753 {
1754 if (!i.chara.IsGlobal)
1755 {
1756 i.chara.Destroy();
1757 }
1758 listRecruit.Remove(i);
1759 }
1760 });
1761 }
1763 {
1764 return;
1765 }
1767 int num = 2 + (int)Mathf.Sqrt(Evalue(2513)) / 2;
1768 int num2 = EClass.rnd(3 + (int)Mathf.Sqrt(Evalue(2513)) / 2) + num - listRecruit.Count;
1769 if (num2 <= 0)
1770 {
1771 return;
1772 }
1773 new List<Chara>(EClass.game.cards.globalCharas.Values).Shuffle();
1774 for (int num3 = 0; num3 < num2; num3++)
1775 {
1776 Chara chara = CharaGen.CreateFromFilter("c_neutral", ContentLV + Mathf.Min(EClass.player.stats.days, 10));
1777 if (chara.isBackerContent || chara.source.quality != 0)
1778 {
1779 num3--;
1780 }
1781 else
1782 {
1783 AddRecruit(chara);
1784 }
1785 }
1787 {
1789 }
1790 }
bool isBackerContent
Definition: Card.cs:952
static Chara CreateFromFilter(string id, int lv=-1, int levelRange=-1)
Definition: CharaGen.cs:22
SourceChara.Row source
Definition: Chara.cs:164
void AddRecruit(Chara c)
SurvivalManager survival
Definition: Game.cs:228
bool IsSurvival
Definition: Game.cs:276
int Hours
Definition: HireInfo.cs:26
void OnUpdateRecruit(FactionBranch branch)

References HireInfo.chara, HireInfo.Hours, if(), Card.isDestroyed, Chara.IsGlobal, and HomeResourceManager.Refresh().

Referenced by LayerQuestBoard.OnInit(), and LayerQuestBoard.OnSwitchContent().

◆ Upgrade()

void FactionBranch.Upgrade ( )
inline

Definition at line 1373 of file FactionBranch.cs.

1374 {
1375 List<Element> list = owner.ListLandFeats();
1376 if (owner.IsActiveZone)
1377 {
1378 TraitCoreZone traitCoreZone = EClass._map.FindThing<TraitCoreZone>();
1379 if (traitCoreZone != null)
1380 {
1381 SE.Play("godbless");
1382 traitCoreZone.owner.PlayEffect("aura_heaven");
1383 }
1384 }
1385 lv++;
1386 exp = 0;
1387 int admin = 4;
1388 int food = 4;
1389 Set(4, 3);
1390 switch (list[0].id)
1391 {
1392 case 3500:
1393 Set(5, 3);
1394 break;
1395 case 3604:
1396 Set(4, 3);
1397 break;
1398 case 3600:
1399 Set(5, 3);
1400 break;
1401 case 3601:
1402 Set(4, 4);
1403 break;
1404 case 3603:
1405 Set(6, 2);
1406 break;
1407 case 3602:
1408 Set(5, 2);
1409 break;
1410 }
1411 elements.SetBase(2003, Mathf.Min((lv - 1) * 2 + 1, 10));
1412 elements.SetBase(2115, (lv - 1) * admin + 1);
1413 elements.SetBase(2204, (lv - 1) * food + 1);
1416 if (lv == 4)
1417 {
1418 elements.SetBase(list[1].id, 1);
1419 }
1420 if (lv == 7)
1421 {
1422 elements.SetBase(list[2].id, 1);
1423 }
1424 if (lv >= 5)
1425 {
1426 List<Element> list2 = elements.dict.Values.Where((Element a) => a.source.category == "landfeat" && a.HasTag("network")).ToList();
1427 foreach (Element item in list2)
1428 {
1430 }
1431 foreach (Element item2 in list2)
1432 {
1433 elements.Remove(item2.id);
1434 }
1435 }
1436 Msg.Say("upgrade_hearth", lv.ToString() ?? "", owner.Name);
1437 LogRaw("upgrade_hearth".langGame(lv.ToString() ?? "", owner.Name), "Good");
1438 Tutorial.Reserve("stone");
1439 void Set(int a, int f)
1440 {
1441 admin = a;
1442 food = f;
1443 }
1444 }
Effect PlayEffect(string id, bool useRenderPos=true, float range=0f, Vector3 fix=default(Vector3))
Definition: Card.cs:6679
void Remove(int id)
Element GetElement(string alias)
void CheckLevelBonus(ElementContainer owner, UINote n=null)
Definition: ELEMENT.cs:1028
Thing FindThing(Func< Thing, bool > func)
Definition: Map.cs:2778
bool IsActiveZone
Definition: Zone.cs:502

References EClass._map, Faction.elements, Chara.faction, Map.FindThing(), food, Element.HasTag(), Element.id, Zone.IsActiveZone, item, Zone.ListLandFeats(), ElementContainer.ModBase(), Spatial.Name, Trait.owner, EClass.pc, Card.PlayEffect(), Tutorial.Reserve(), Msg.Say(), and Element.source.

◆ ValidateUpgradePolicies()

void FactionBranch.ValidateUpgradePolicies ( )
inline

Definition at line 1336 of file FactionBranch.cs.

1337 {
1338 if (lv >= 2)
1339 {
1340 if (!policies.HasPolicy(2705))
1341 {
1342 policies.AddPolicy(2705);
1344 }
1345 if (!policies.HasPolicy(2708))
1346 {
1347 policies.AddPolicy(2708);
1349 }
1350 if (!policies.HasPolicy(2707))
1351 {
1352 policies.AddPolicy(2707);
1353 }
1354 if (!policies.HasPolicy(2709))
1355 {
1356 policies.AddPolicy(2709);
1357 }
1358 if (!policies.HasPolicy(2715))
1359 {
1360 policies.AddPolicy(2715);
1361 }
1362 }
1363 foreach (int globalPolicy in EClass.pc.faction.globalPolicies)
1364 {
1365 if (!policies.HasPolicy(globalPolicy))
1366 {
1367 policies.AddPolicy(globalPolicy, show: false);
1369 }
1370 }
1371 }
HashSet< int > globalPolicies
Definition: FACTION.cs:144
void SetGlobalPolicyActive(int id, bool active)
Definition: FACTION.cs:491
bool HasPolicy(int id)

References PolicyManager.AddPolicy(), Chara.faction, Faction.globalPolicies, PolicyManager.HasPolicy(), Faction.IsGlobalPolicyActive(), EClass.pc, and Faction.SetGlobalPolicyActive().

Referenced by OnActivateZone(), and TraitBookSkill.OnRead().

Member Data Documentation

◆ dateFound

int FactionBranch.dateFound

Definition at line 103 of file FactionBranch.cs.

Referenced by OnCreate(), and UIHomeInfo.RefreshInfo().

◆ efficiency

int FactionBranch.efficiency = 100

Definition at line 120 of file FactionBranch.cs.

Referenced by GetProductBonus(), RefreshEfficiency(), and UIHomeInfo.RefreshReport().

◆ exp

int FactionBranch.exp

Definition at line 40 of file FactionBranch.cs.

Referenced by WidgetStatsBar.Build(), and GameDate.ShipGoods().

◆ expeditions

ExpeditionManager FactionBranch.expeditions = new ExpeditionManager()

◆ faith

Religion FactionBranch.faith

◆ happiness

◆ incomeInn

int FactionBranch.incomeInn

Definition at line 116 of file FactionBranch.cs.

Referenced by OnActivateZone().

◆ incomeShop

int FactionBranch.incomeShop

Definition at line 55 of file FactionBranch.cs.

◆ incomeTourism

int FactionBranch.incomeTourism

Definition at line 118 of file FactionBranch.cs.

Referenced by OnActivateZone().

◆ lastStatistics

Statistics FactionBranch.lastStatistics = new Statistics()

Definition at line 112 of file FactionBranch.cs.

Referenced by ItemStatistics.Refresh().

◆ lastUpdateReqruit

int FactionBranch.lastUpdateReqruit

Definition at line 52 of file FactionBranch.cs.

◆ listRecruit

List<HireInfo> FactionBranch.listRecruit = new List<HireInfo>()

◆ log

MsgLog FactionBranch.log
Initial value:
= new MsgLog
{
id = "log"
}
Definition: MsgLog.cs:7

Definition at line 88 of file FactionBranch.cs.

Referenced by ContentHomeLog.RefreshLog().

◆ luckyMonth

bool FactionBranch.luckyMonth

Definition at line 58 of file FactionBranch.cs.

Referenced by WidgetDate._Refresh().

◆ luckyMonthDone

bool FactionBranch.luckyMonthDone

Definition at line 61 of file FactionBranch.cs.

◆ lv

◆ meetings

MeetingManager FactionBranch.meetings = new MeetingManager()

Definition at line 82 of file FactionBranch.cs.

Referenced by Meeting.OnEndDrama(), UIHomeInfo.RefreshReport(), and SetOwner().

◆ members

◆ owner

◆ policies

◆ rank

int FactionBranch.rank

◆ researches

◆ resources

◆ seedPlan

int FactionBranch.seedPlan

Definition at line 43 of file FactionBranch.cs.

Referenced by ResearchManager.ShowNewPlans().

◆ stability

GStability FactionBranch.stability
Initial value:
{
value = 1
}

Definition at line 64 of file FactionBranch.cs.

◆ stash

Thing FactionBranch.stash

Definition at line 85 of file FactionBranch.cs.

Referenced by OnCreate().

◆ statistics

Statistics FactionBranch.statistics = new Statistics()

Definition at line 109 of file FactionBranch.cs.

Referenced by ContentHomeLog.OnSwitchContent().

◆ temper

int FactionBranch.temper

Definition at line 46 of file FactionBranch.cs.

Referenced by UIHomeInfo.RefreshInfo().

◆ tourism

int FactionBranch.tourism

Definition at line 106 of file FactionBranch.cs.

Referenced by WidgetStatsBar.Build(), and HomeResourceWorth.WriteNote().

◆ uidMaid

int FactionBranch.uidMaid

Property Documentation

◆ ContentLV

int FactionBranch.ContentLV
get

Definition at line 136 of file FactionBranch.cs.

◆ DangerLV

int FactionBranch.DangerLV
get

Definition at line 138 of file FactionBranch.cs.

◆ elements

◆ HasItemProtection

bool FactionBranch.HasItemProtection
get

Definition at line 140 of file FactionBranch.cs.

Referenced by ActEffect.DamageEle(), Map.TryShatter(), and Chara.TryTakeSharedItems().

◆ HasNetwork

bool FactionBranch.HasNetwork
get

Definition at line 142 of file FactionBranch.cs.

Referenced by Evalue(), ButtonElement.Refresh(), and TraitTeleporter.TryTeleport().

◆ IsStartBranch

bool FactionBranch.IsStartBranch
get

Definition at line 150 of file FactionBranch.cs.

◆ IsTaxFree

bool FactionBranch.IsTaxFree
get

Definition at line 144 of file FactionBranch.cs.

◆ MaxAP

int FactionBranch.MaxAP
get

Definition at line 130 of file FactionBranch.cs.

Referenced by UICurrency.Build(), and LayerPolicy.RefreshPolicyList().

◆ MaxLv

int FactionBranch.MaxLv
get

Definition at line 154 of file FactionBranch.cs.

Referenced by UIHomeInfo.RefreshInfo().

◆ MaxPopulation

int FactionBranch.MaxPopulation
get

Definition at line 132 of file FactionBranch.cs.

Referenced by OnSimulateHour(), RefreshEfficiency(), and UIHomeInfo.RefreshInfo().

◆ MaxSoil

int FactionBranch.MaxSoil
get

Definition at line 134 of file FactionBranch.cs.

Referenced by UIHomeInfo.RefreshInfo().

◆ Money

int FactionBranch.Money
get

Definition at line 124 of file FactionBranch.cs.

◆ NumHeirloom

int FactionBranch.NumHeirloom
get

Definition at line 128 of file FactionBranch.cs.

Referenced by HomeResourceWorth.WriteNote().

◆ RankText

string FactionBranch.RankText
get

Definition at line 146 of file FactionBranch.cs.

Referenced by ContentHomeReport.RefreshInfo(), and UIHomeInfo.RefreshInfo().

◆ TextLv

string FactionBranch.TextLv
get

◆ Worth

int FactionBranch.Worth
get

Definition at line 126 of file FactionBranch.cs.

Referenced by Faction.CountWealth(), and UIHomeInfo.RefreshInfo().


The documentation for this class was generated from the following file: