Elin Decompiled Documentation EA 23.240 Nightly
Loading...
Searching...
No Matches
Faction Class Reference
Inheritance diagram for Faction:
EClass Guild GuildFighter GuildMage GuildMerchant GuildThief

Public Member Functions

void Init ()
 
void OnLoad ()
 
float GetHappiness ()
 
Sprite GetSprite ()
 
int CountTax ()
 
int GetMaxReserve ()
 
List< FactionBranchGetChildren ()
 
int CountWealth ()
 
int CountTerritories ()
 
int CountMembers ()
 
Hostility GetHostility ()
 
void ModRelation (int a)
 
bool HasMember (string id, bool includeReserve=true)
 
bool IsWearingPanty (Chara c)
 
void AddContribution (int a)
 
void AddReserve (Chara c)
 
void RemoveReserve (Chara c)
 
void OnAdvanceDay ()
 
void OnAdvanceMonth ()
 
void TryPayBill (Thing bill)
 
FactionBranch FindBranch (Chara c)
 
void AddGlobalPolicy (int id)
 
bool IsGlobalPolicyActive (int id)
 
void SetGlobalPolicyActive (int id, bool active)
 
int GetResidentTax ()
 
int GetRankIncome ()
 
int GetFactionSalary ()
 
int GetTotalTax (bool evasion)
 
int GetBaseTax (bool evasion)
 
int GetFameTax (bool evasion)
 
int EvadeTax (int v, bool evasion)
 
void SetTaxTooltip (UINote n)
 
int CountTaxFreeLand ()
 

Static Public Member Functions

static Faction Create (SourceFaction.Row r)
 
- 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 (int _a, int start, int step, int rate=75)
 
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)
 

Public Attributes

FactionRelation relation = new FactionRelation()
 
string id
 
string uid
 
string name
 
List< HireInfolistReserve = new List<HireInfo>()
 
ElementContainerZone elements = new ElementContainerZone()
 
HashSet< int > globalPolicies = new HashSet<int>()
 
ElementContainerFaction charaElements = new ElementContainerFaction()
 
SourceFaction.Row _source
 

Properties

string Name [get]
 
SourceFaction.Row source [get]
 
virtual string TextType [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 Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 123 of file FACTION.cs.

Member Function Documentation

◆ AddContribution()

void Faction.AddContribution ( int  a)
inline

Definition at line 318 of file FACTION.cs.

319 {
320 if (a != 0 && relation.type == FactionRelation.RelationType.Member)
321 {
322 if (relation.exp < 0)
323 {
324 relation.exp = 0;
325 }
326 if ((long)relation.exp + (long)a >= 100000000)
327 {
328 relation.exp = 100000000;
329 }
330 else
331 {
332 relation.exp += a;
333 }
334 Msg.Say("contribute", a.ToString() ?? "", Name);
335 }
336 }
RelationType type
string Name
Definition: FACTION.cs:150
FactionRelation relation
Definition: FACTION.cs:126
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58

References FactionRelation.exp, Name, relation, Msg.Say(), and FactionRelation.type.

Referenced by AI_Shopping.Buy(), CoreDebug.ModContribution(), ShopTransaction.OnEndTransaction(), and TraitBaseSpellbook.OnRead().

◆ AddGlobalPolicy()

void Faction.AddGlobalPolicy ( int  id)
inline

Definition at line 448 of file FACTION.cs.

449 {
450 globalPolicies.Add(id);
451 }
HashSet< int > globalPolicies
Definition: FACTION.cs:144

References globalPolicies.

Referenced by PolicyManager.AddPolicy().

◆ AddReserve()

void Faction.AddReserve ( Chara  c)
inline

Definition at line 338 of file FACTION.cs.

339 {
340 if (c.IsPCParty)
341 {
343 }
344 if (c.memberType == FactionMemberType.Livestock)
345 {
346 c.SetInt(36, EClass.world.date.GetRaw() + 14400);
347 }
348 if (c.IsHomeMember())
349 {
351 }
352 if (c.currentZone != null)
353 {
355 }
356 if (EClass.Branch.uidMaid == c.uid)
357 {
358 EClass.Branch.uidMaid = 0;
359 }
361 {
362 chara = c,
363 isNew = true
364 };
365 listReserve.Add(item);
366 }
FactionMemberType
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
int uid
Definition: Card.cs:122
override bool IsPCParty
Definition: Chara.cs:615
Party party
Definition: Chara.cs:43
Zone currentZone
Definition: Chara.cs:255
FactionMemberType memberType
Definition: Chara.cs:46
bool IsHomeMember()
Definition: Chara.cs:6515
FactionBranch homeBranch
Definition: Chara.cs:1066
int GetRaw(int offsetHours=0)
Definition: Date.cs:326
Definition: EClass.cs:6
static World world
Definition: EClass.cs:41
static FactionBranch Branch
Definition: EClass.cs:23
static Chara pc
Definition: EClass.cs:15
void RemoveMemeber(Chara c)
List< HireInfo > listReserve
Definition: FACTION.cs:138
void RemoveMember(Chara c)
Definition: Party.cs:102
GameDate date
Definition: World.cs:6
void RemoveCard(Card t)
Definition: Zone.cs:1999

References EClass.Branch, Chara.currentZone, World.date, Date.GetRaw(), Chara.homeBranch, Chara.IsHomeMember(), Chara.IsPCParty, item, listReserve, Chara.memberType, Chara.party, EClass.pc, Zone.RemoveCard(), Party.RemoveMember(), FactionBranch.RemoveMemeber(), BaseCard.SetInt(), Card.uid, FactionBranch.uidMaid, and EClass.world.

Referenced by ItemGachaResult.Confirm(), and BaseListPeople.OnClick().

◆ CountMembers()

int Faction.CountMembers ( )
inline

Definition at line 242 of file FACTION.cs.

243 {
244 int num = 0;
245 foreach (Chara value in EClass.game.cards.globalCharas.Values)
246 {
247 if (value.Chara.faction == this)
248 {
249 num++;
250 }
251 }
252 return num;
253 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
virtual Chara Chara
Definition: Card.cs:2070
Definition: Chara.cs:10
Faction faction
Definition: Chara.cs:427
static Game game
Definition: EClass.cs:9
CardManager cards
Definition: Game.cs:155

References Game.cards, Card.Chara, Chara.faction, EClass.game, and CardManager.globalCharas.

Referenced by LayerGlobalMap.RefreshSummary().

◆ CountTax()

int Faction.CountTax ( )
inline

Definition at line 187 of file FACTION.cs.

188 {
189 return (int)((float)CountWealth() * 0.1f);
190 }
int CountWealth()
Definition: FACTION.cs:215

References CountWealth().

◆ CountTaxFreeLand()

int Faction.CountTaxFreeLand ( )
inline

Definition at line 560 of file FACTION.cs.

561 {
562 int num = 0;
563 foreach (FactionBranch child in GetChildren())
564 {
565 if (child.policies.IsActive(2514))
566 {
567 num++;
568 }
569 }
570 return num;
571 }
PolicyManager policies
List< FactionBranch > GetChildren()
Definition: FACTION.cs:202
bool IsActive(int id, int days=-1)

References GetChildren(), PolicyManager.IsActive(), and FactionBranch.policies.

Referenced by FactionBranch.OnClaimZone(), and ContentPolicy.RefreshPolicyList().

◆ CountTerritories()

int Faction.CountTerritories ( )
inline

Definition at line 229 of file FACTION.cs.

230 {
231 int num = 0;
232 foreach (Spatial value in EClass.game.spatials.map.Values)
233 {
234 if (value.mainFaction == this)
235 {
236 num++;
237 }
238 }
239 return num;
240 }
SpatialManager spatials
Definition: Game.cs:152
GlobalSpatialList map
Faction mainFaction
Definition: Spatial.cs:442

References EClass.game, Spatial.mainFaction, SpatialManager.map, and Game.spatials.

Referenced by WindowChara.RefreshProfile(), and LayerGlobalMap.RefreshSummary().

◆ CountWealth()

int Faction.CountWealth ( )
inline

Definition at line 215 of file FACTION.cs.

216 {
218 {
220 }
221 int num = 0;
222 foreach (FactionBranch child in GetChildren())
223 {
224 num += child.Worth;
225 }
226 return num;
227 }
static Zone _zone
Definition: EClass.cs:21
HomeResourceManager resources
FactionBranch branch
Definition: Zone.cs:34
bool IsPCFaction
Definition: Zone.cs:470

References EClass._zone, Zone.branch, GetChildren(), Zone.IsPCFaction, HomeResourceManager.Refresh(), FactionBranch.resources, and FactionBranch.Worth.

Referenced by CountTax(), and LayerGlobalMap.RefreshSummary().

◆ Create()

static Faction Faction.Create ( SourceFaction::Row  r)
inlinestatic

Definition at line 156 of file FACTION.cs.

157 {
158 Faction faction = ClassCache.Create<Faction>(r.type, "Elin");
159 faction.id = r.id;
160 faction.Init();
161 return faction;
162 }
void Init()
Definition: FACTION.cs:164

References id, and Init().

Referenced by FactionManager.OnCreateGame().

◆ EvadeTax()

int Faction.EvadeTax ( int  v,
bool  evasion 
)
inline

Definition at line 538 of file FACTION.cs.

539 {
540 if (!evasion)
541 {
542 return v;
543 }
544 int num = 0;
545 foreach (FactionBranch child in GetChildren())
546 {
547 num += child.Evalue(2119);
548 }
549 return (int)(long)((float)(v * 100) / (100f + Mathf.Sqrt(num * 5)));
550 }
int Evalue(int ele)

References FactionBranch.Evalue(), and GetChildren().

Referenced by GetBaseTax(), and GetFameTax().

◆ FindBranch()

FactionBranch Faction.FindBranch ( Chara  c)
inline

Definition at line 436 of file FACTION.cs.

437 {
438 foreach (FactionBranch child in GetChildren())
439 {
440 if (child.members.Contains(c))
441 {
442 return child;
443 }
444 }
445 return null;
446 }
List< Chara > members

References GetChildren(), and FactionBranch.members.

Referenced by FactionBranch.AddMemeber().

◆ GetBaseTax()

int Faction.GetBaseTax ( bool  evasion)
inline

Definition at line 521 of file FACTION.cs.

522 {
523 int a = EClass.world.date.year - EClass.game.Prologue.year;
524 int v = 500 + Mathf.Min(a, 10) * 500;
525 return EvadeTax(v, evasion);
526 }
int EvadeTax(int v, bool evasion)
Definition: FACTION.cs:538
Prologue Prologue
Definition: Game.cs:263
int year
Definition: Prologue.cs:15

References EvadeTax(), EClass.game, Game.Prologue, and Prologue.year.

Referenced by GetTotalTax(), and SetTaxTooltip().

◆ GetChildren()

List< FactionBranch > Faction.GetChildren ( )
inline

◆ GetFactionSalary()

int Faction.GetFactionSalary ( )
inline

Definition at line 502 of file FACTION.cs.

503 {
504 int num = 0;
505 foreach (Faction value in EClass.game.factions.dictAll.Values)
506 {
507 num += value.relation.GetSalary();
508 }
509 if (num > 0)
510 {
511 Msg.Say("getFactionSalary", Lang._currency(num, "money"));
512 }
513 return num;
514 }
Dictionary< string, Faction > dictAll
FactionManager factions
Definition: Game.cs:161
Definition: Lang.cs:6
static string _currency(object a, string IDCurrency)
Definition: Lang.cs:162

References Lang._currency(), FactionManager.dictAll, Game.factions, EClass.game, FactionRelation.GetSalary(), relation, and Msg.Say().

Referenced by OnAdvanceMonth().

◆ GetFameTax()

int Faction.GetFameTax ( bool  evasion)
inline

Definition at line 528 of file FACTION.cs.

529 {
530 int num = EClass.curve(EClass.player.fame * 2, 10000, 2000, 80);
531 if (num > 1000000 || num < 0)
532 {
533 num = 1000000;
534 }
535 return EvadeTax(num, evasion);
536 }
static int curve(int _a, int start, int step, int rate=75)
Definition: EClass.cs:69
static Player player
Definition: EClass.cs:13
int fame
Definition: Player.cs:881

References EClass.curve(), EvadeTax(), Player.fame, and EClass.player.

Referenced by GetTotalTax(), and SetTaxTooltip().

◆ GetHappiness()

float Faction.GetHappiness ( )
inline

Definition at line 177 of file FACTION.cs.

178 {
179 return 50f;
180 }

◆ GetHostility()

Hostility Faction.GetHostility ( )
inline

Definition at line 255 of file FACTION.cs.

256 {
257 if (this == EClass.Home || relation.affinity >= 200)
258 {
259 return Hostility.Ally;
260 }
261 if (relation.affinity >= 100)
262 {
263 return Hostility.Friend;
264 }
265 if (relation.affinity <= -100)
266 {
267 return Hostility.Enemy;
268 }
269 return Hostility.Neutral;
270 }
Hostility
Definition: Hostility.cs:2
static Faction Home
Definition: EClass.cs:27

References FactionRelation.affinity, EClass.Home, and relation.

Referenced by Chara.SetFaction().

◆ GetMaxReserve()

int Faction.GetMaxReserve ( )
inline

Definition at line 192 of file FACTION.cs.

193 {
194 int num = 2;
195 foreach (FactionBranch child in GetChildren())
196 {
197 num += child.lv;
198 }
199 return num;
200 }

References GetChildren(), and FactionBranch.lv.

Referenced by BaseListPeople.OnClick().

◆ GetRankIncome()

int Faction.GetRankIncome ( )
inline

Definition at line 488 of file FACTION.cs.

489 {
490 int num = 0;
491 foreach (FactionBranch child in GetChildren())
492 {
493 num += EClass.game.spatials.ranks.GetIncome(child.owner);
494 }
495 if (num > 0)
496 {
497 Msg.Say("getRankIncome", Lang._currency(num, "money"));
498 }
499 return num;
500 }
int GetIncome(Zone z)
RankedZoneManager ranks

References Lang._currency(), EClass.game, GetChildren(), RankedZoneManager.GetIncome(), FactionBranch.owner, SpatialManager.ranks, Msg.Say(), and Game.spatials.

Referenced by OnAdvanceMonth().

◆ GetResidentTax()

int Faction.GetResidentTax ( )
inline

Definition at line 474 of file FACTION.cs.

475 {
476 int num = 0;
477 foreach (FactionBranch child in GetChildren())
478 {
479 num += child.GetResidentTax();
480 }
481 if (num > 0)
482 {
483 Msg.Say("getResidentTax", Lang._currency(num, "money"));
484 }
485 return num;
486 }

References Lang._currency(), GetChildren(), FactionBranch.GetResidentTax(), and Msg.Say().

Referenced by OnAdvanceMonth().

◆ GetSprite()

Sprite Faction.GetSprite ( )
inline

Definition at line 182 of file FACTION.cs.

183 {
184 return ResourceCache.Load<Sprite>("Media/Graphics/Image/Faction/" + source.id);
185 }
SourceFaction.Row source
Definition: FACTION.cs:152

References source.

◆ GetTotalTax()

int Faction.GetTotalTax ( bool  evasion)
inline

Definition at line 516 of file FACTION.cs.

517 {
518 return GetBaseTax(evasion) + GetFameTax(evasion) + EClass.player.extraTax;
519 }
int GetFameTax(bool evasion)
Definition: FACTION.cs:528
int GetBaseTax(bool evasion)
Definition: FACTION.cs:521
int extraTax
Definition: Player.cs:932

References Player.extraTax, GetBaseTax(), GetFameTax(), and EClass.player.

Referenced by OnAdvanceMonth(), and UIHomeInfo.RefreshReport().

◆ HasMember()

bool Faction.HasMember ( string  id,
bool  includeReserve = true 
)
inline

Definition at line 277 of file FACTION.cs.

278 {
279 foreach (Chara value in EClass.game.cards.globalCharas.Values)
280 {
281 if (value.id == id && value.IsHomeMember())
282 {
283 return true;
284 }
285 }
286 if (includeReserve)
287 {
288 foreach (HireInfo item in listReserve)
289 {
290 if (item.chara.id == id)
291 {
292 return true;
293 }
294 }
295 }
296 return false;
297 }
string id
Definition: Card.cs:35

References Game.cards, EClass.game, CardManager.globalCharas, Card.id, Chara.IsHomeMember(), item, and listReserve.

Referenced by QuestDialog.CanStartQuest().

◆ Init()

void Faction.Init ( )
inline

Definition at line 164 of file FACTION.cs.

165 {
167 relation.faction = this;
168 relation.affinity = source.relation;
169 name = source.GetText();
170 }
void AssignUID(Faction s)
string name
Definition: FACTION.cs:135

References FactionManager.AssignUID(), Game.factions, EClass.game, name, and source.

Referenced by Create().

◆ IsGlobalPolicyActive()

bool Faction.IsGlobalPolicyActive ( int  id)
inline

Definition at line 453 of file FACTION.cs.

454 {
455 bool result = false;
456 foreach (FactionBranch child in GetChildren())
457 {
458 if (child.policies.IsActive(id))
459 {
460 result = true;
461 }
462 }
463 return result;
464 }

References GetChildren(), PolicyManager.IsActive(), and FactionBranch.policies.

Referenced by FactionBranch.DailyOutcome(), FortuneRollData.GetPrizeList(), IsWearingPanty(), TryPayBill(), and FactionBranch.ValidateUpgradePolicies().

◆ IsWearingPanty()

bool Faction.IsWearingPanty ( Chara  c)
inline

Definition at line 299 of file FACTION.cs.

300 {
301 if ((!c.IsUnique || c.bio.gender != 2) && (c.IsHuman || c.IsFairy) && !(c.trait is TraitMerchant))
302 {
303 return true;
304 }
305 if (IsGlobalPolicyActive(2712))
306 {
307 foreach (Chara value in EClass.game.cards.globalCharas.Values)
308 {
309 if (value.id == c.id && value.IsHomeMember())
310 {
311 return true;
312 }
313 }
314 }
315 return false;
316 }
int gender
Definition: Biography.cs:29
bool IsUnique
Definition: Card.cs:2091
Biography bio
Definition: Card.cs:44
new TraitChara trait
Definition: Chara.cs:503
bool IsHuman
Definition: Chara.cs:879
bool IsFairy
Definition: Chara.cs:939
bool IsGlobalPolicyActive(int id)
Definition: FACTION.cs:453

References Card.bio, Game.cards, EClass.game, Biography.gender, CardManager.globalCharas, Card.id, Chara.IsFairy, IsGlobalPolicyActive(), Chara.IsHomeMember(), Chara.IsHuman, Card.IsUnique, and Chara.trait.

◆ ModRelation()

void Faction.ModRelation ( int  a)
inline

Definition at line 272 of file FACTION.cs.

273 {
274 relation.affinity += a;
275 }

◆ OnAdvanceDay()

void Faction.OnAdvanceDay ( )
inline

Definition at line 379 of file FACTION.cs.

380 {
381 foreach (FactionBranch child in GetChildren())
382 {
383 child.OnAdvanceDay();
384 }
385 }
void OnAdvanceDay()

References GetChildren(), and FactionBranch.OnAdvanceDay().

Referenced by GameDate.AdvanceDay().

◆ OnAdvanceMonth()

void Faction.OnAdvanceMonth ( )
inline

Definition at line 387 of file FACTION.cs.

388 {
389 if (GetChildren().Count == 0)
390 {
391 return;
392 }
393 int num = 0;
394 num += GetResidentTax();
395 num += GetRankIncome();
396 num += GetFactionSalary();
397 if (num > 0)
398 {
399 Thing container_deposit = EClass.game.cards.container_deposit;
400 if (EClass.pc.homeBranch.policies.IsActive(2711) && (container_deposit.GetCurrency() > 0 || !container_deposit.things.IsFull()))
401 {
402 container_deposit.ModCurrency(num);
403 Msg.Say("bankIncome", Lang._currency(num, "money"));
404 }
405 else
406 {
407 Thing thing = ThingGen.Create("money").SetNum(num);
408 Thing p = ThingGen.CreateParcel("parcel_salary", thing);
410 }
411 }
412 num = GetTotalTax(evasion: true);
413 Thing thing2 = ThingGen.CreateBill(num, tax: true);
414 thing2.SetInt(35, EClass.player.extraTax);
415 Msg.Say("getBill", Lang._currency(num, "money"));
416 TryPayBill(thing2);
417 Msg.Say("bills", EClass.player.taxBills.ToString() ?? "");
419 {
421 }
422 }
Thing container_deposit
Definition: CardManager.cs:58
Thing SetNum(int a)
Definition: Card.cs:3492
int GetCurrency(string id="money")
Definition: Card.cs:3972
void ModCurrency(int a, string id="money")
Definition: Card.cs:3958
ThingContainer things
Definition: Card.cs:38
bool godMode
Definition: CoreDebug.cs:173
static CoreDebug debug
Definition: EClass.cs:49
int GetFactionSalary()
Definition: FACTION.cs:502
int GetTotalTax(bool evasion)
Definition: FACTION.cs:516
void TryPayBill(Thing bill)
Definition: FACTION.cs:424
int GetResidentTax()
Definition: FACTION.cs:474
int GetRankIncome()
Definition: FACTION.cs:488
GamePrincipal principal
Definition: Game.cs:224
void ModKarma(int a)
Definition: Player.cs:2511
int taxBills
Definition: Player.cs:908
bool IsFull(int y=0)
static Thing CreateParcel(string idLang=null, params Thing[] things)
Definition: ThingGen.cs:42
static Thing CreateBill(int pay, bool tax)
Definition: ThingGen.cs:85
static Thing Create(string id, int idMat=-1, int lv=-1)
Definition: ThingGen.cs:53
Definition: Thing.cs:8
void SendPackage(Thing p)
Definition: World.cs:68

References Lang._currency(), Game.cards, CardManager.container_deposit, ThingGen.Create(), ThingGen.CreateBill(), ThingGen.CreateParcel(), EClass.debug, Player.extraTax, EClass.game, GetChildren(), Card.GetCurrency(), GetFactionSalary(), GetRankIncome(), GetResidentTax(), GetTotalTax(), CoreDebug.godMode, Chara.homeBranch, PolicyManager.IsActive(), ThingContainer.IsFull(), Card.ModCurrency(), Player.ModKarma(), EClass.pc, EClass.player, FactionBranch.policies, Game.principal, Msg.Say(), World.SendPackage(), BaseCard.SetInt(), Card.SetNum(), GamePrincipal.tax, Player.taxBills, Card.things, TryPayBill(), and EClass.world.

Referenced by GameDate.AdvanceMonth().

◆ OnLoad()

void Faction.OnLoad ( )
inline

Definition at line 172 of file FACTION.cs.

173 {
174 relation.faction = this;
175 }

Referenced by FactionManager.OnLoad().

◆ RemoveReserve()

void Faction.RemoveReserve ( Chara  c)
inline

Definition at line 368 of file FACTION.cs.

369 {
370 listReserve.ForeachReverse(delegate(HireInfo i)
371 {
372 if (i.chara == c || i.chara.uid == c.uid)
373 {
374 listReserve.Remove(i);
375 }
376 });
377 }
Chara chara
Definition: HireInfo.cs:6

References HireInfo.chara, listReserve, and Card.uid.

Referenced by FactionBranch.AddMemeber().

◆ SetGlobalPolicyActive()

void Faction.SetGlobalPolicyActive ( int  id,
bool  active 
)
inline

Definition at line 466 of file FACTION.cs.

467 {
468 foreach (FactionBranch child in GetChildren())
469 {
470 child.policies.SetActive(id, active);
471 }
472 }
void SetActive(int id, bool active)

References GetChildren(), FactionBranch.policies, and PolicyManager.SetActive().

Referenced by FactionBranch.ValidateUpgradePolicies().

◆ SetTaxTooltip()

void Faction.SetTaxTooltip ( UINote  n)
inline

Definition at line 552 of file FACTION.cs.

553 {
554 n.AddHeader("tax");
555 n.AddTopic("tax_base", Lang._currency(GetBaseTax(evasion: true), showUnit: true) + " (" + Lang._currency(GetBaseTax(evasion: false)) + ")");
556 n.AddTopic("tax_fame", Lang._currency(GetFameTax(evasion: true), showUnit: true) + " (" + Lang._currency(GetFameTax(evasion: false)) + ")");
557 n.AddTopic("tax_extra", Lang._currency(EClass.player.extraTax, showUnit: true));
558 }
UIItem AddHeader(string text, Sprite sprite=null)
Definition: UINote.cs:79
UIItem AddTopic(string id, string text, string value=null)
Definition: UINote.cs:144

References Lang._currency(), UINote.AddHeader(), UINote.AddTopic(), Player.extraTax, GetBaseTax(), GetFameTax(), and EClass.player.

Referenced by UIHomeInfo.RefreshReport().

◆ TryPayBill()

void Faction.TryPayBill ( Thing  bill)
inline

Definition at line 424 of file FACTION.cs.

425 {
427 {
428 InvOwnerDeliver.PayBill(bill, fromBank: true);
429 }
430 else
431 {
433 }
434 }
static void PayBill(Thing t, bool fromBank=false)

References bill, Game.cards, CardManager.container_deposit, EClass.game, Card.GetCurrency(), IsGlobalPolicyActive(), InvOwnerDeliver.PayBill(), World.SendPackage(), and EClass.world.

Referenced by OnAdvanceMonth(), and GameDate.ShipPackages().

Member Data Documentation

◆ _source

SourceFaction.Row Faction._source

Definition at line 148 of file FACTION.cs.

◆ charaElements

◆ elements

◆ globalPolicies

HashSet<int> Faction.globalPolicies = new HashSet<int>()

Definition at line 144 of file FACTION.cs.

Referenced by AddGlobalPolicy(), and FactionBranch.ValidateUpgradePolicies().

◆ id

string Faction.id

◆ listReserve

◆ name

◆ relation

◆ uid

string Faction.uid

Definition at line 132 of file FACTION.cs.

Referenced by FactionManager.AssignUID(), and RefFaction.RefFaction().

Property Documentation

◆ Name

◆ source

SourceFaction.Row Faction.source
get

Definition at line 152 of file FACTION.cs.

Referenced by GetSprite(), and Init().

◆ TextType

virtual string Faction.TextType
get

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