Elin Decompiled Documentation EA 23.102 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 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 121 of file FACTION.cs.

Member Function Documentation

◆ AddContribution()

void Faction.AddContribution ( int  a)
inline

Definition at line 316 of file FACTION.cs.

317 {
318 if (a != 0 && relation.type == FactionRelation.RelationType.Member)
319 {
320 relation.exp += a;
321 Msg.Say("contribute", a.ToString() ?? "", Name);
322 }
323 }
RelationType type
string Name
Definition: FACTION.cs:148
FactionRelation relation
Definition: FACTION.cs:124
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 Name, relation, Msg.Say(), and FactionRelation.type.

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

◆ AddGlobalPolicy()

void Faction.AddGlobalPolicy ( int  id)
inline

Definition at line 431 of file FACTION.cs.

432 {
433 globalPolicies.Add(id);
434 }
HashSet< int > globalPolicies
Definition: FACTION.cs:142

References globalPolicies.

Referenced by PolicyManager.AddPolicy().

◆ AddReserve()

void Faction.AddReserve ( Chara  c)
inline

Definition at line 325 of file FACTION.cs.

326 {
327 if (c.memberType == FactionMemberType.Livestock)
328 {
329 c.SetInt(36, EClass.world.date.GetRaw() + 14400);
330 }
331 if (c.IsHomeMember())
332 {
334 }
335 if (c.currentZone != null)
336 {
338 }
339 if (EClass.Branch.uidMaid == c.uid)
340 {
341 EClass.Branch.uidMaid = 0;
342 }
344 {
345 chara = c,
346 isNew = true
347 };
348 listReserve.Add(item);
349 }
FactionMemberType
void SetInt(int id, int value=0)
Definition: BaseCard.cs:39
int uid
Definition: Card.cs:118
Zone currentZone
Definition: Chara.cs:240
FactionMemberType memberType
Definition: Chara.cs:46
bool IsHomeMember()
Definition: Chara.cs:5942
FactionBranch homeBranch
Definition: Chara.cs:889
int GetRaw(int offsetHours=0)
Definition: Date.cs:322
Definition: EClass.cs:5
static World world
Definition: EClass.cs:40
static FactionBranch Branch
Definition: EClass.cs:22
void RemoveMemeber(Chara c)
List< HireInfo > listReserve
Definition: FACTION.cs:136
GameDate date
Definition: World.cs:6
void RemoveCard(Card t)
Definition: Zone.cs:1933

References EClass.Branch, Chara.currentZone, World.date, Date.GetRaw(), Chara.homeBranch, Chara.IsHomeMember(), item, listReserve, Chara.memberType, Zone.RemoveCard(), 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 240 of file FACTION.cs.

241 {
242 int num = 0;
243 foreach (Chara value in EClass.game.cards.globalCharas.Values)
244 {
245 if (value.Chara.faction == this)
246 {
247 num++;
248 }
249 }
250 return num;
251 }
GlobalCharaList globalCharas
Definition: CardManager.cs:46
virtual Chara Chara
Definition: Card.cs:1946
Definition: Chara.cs:10
Faction faction
Definition: Chara.cs:412
static Game game
Definition: EClass.cs:8
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 185 of file FACTION.cs.

186 {
187 return (int)((float)CountWealth() * 0.1f);
188 }
int CountWealth()
Definition: FACTION.cs:213

References CountWealth().

◆ CountTaxFreeLand()

int Faction.CountTaxFreeLand ( )
inline

Definition at line 544 of file FACTION.cs.

545 {
546 int num = 0;
547 foreach (FactionBranch child in GetChildren())
548 {
549 if (child.policies.IsActive(2514))
550 {
551 num++;
552 }
553 }
554 return num;
555 }
PolicyManager policies
List< FactionBranch > GetChildren()
Definition: FACTION.cs:200
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 227 of file FACTION.cs.

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

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 213 of file FACTION.cs.

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

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 154 of file FACTION.cs.

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

References id, and Init().

Referenced by FactionManager.OnCreateGame().

◆ EvadeTax()

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

Definition at line 522 of file FACTION.cs.

523 {
524 if (!evasion)
525 {
526 return v;
527 }
528 int num = 0;
529 foreach (FactionBranch child in GetChildren())
530 {
531 num += child.Evalue(2119);
532 }
533 return (int)(long)((float)(v * 100) / (100f + Mathf.Sqrt(num * 5)));
534 }
int Evalue(int ele)

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

Referenced by GetBaseTax(), and GetFameTax().

◆ FindBranch()

FactionBranch Faction.FindBranch ( Chara  c)
inline

Definition at line 419 of file FACTION.cs.

420 {
421 foreach (FactionBranch child in GetChildren())
422 {
423 if (child.members.Contains(c))
424 {
425 return child;
426 }
427 }
428 return null;
429 }
List< Chara > members

References GetChildren(), and FactionBranch.members.

Referenced by FactionBranch.AddMemeber().

◆ GetBaseTax()

int Faction.GetBaseTax ( bool  evasion)
inline

Definition at line 504 of file FACTION.cs.

505 {
506 int a = EClass.world.date.year - EClass.game.Prologue.year;
507 int v = 500 + Mathf.Min(a, 10) * 500;
508 return EvadeTax(v, evasion);
509 }
int EvadeTax(int v, bool evasion)
Definition: FACTION.cs:522
Prologue Prologue
Definition: Game.cs:257
int year
Definition: Prologue.cs:13

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

Referenced by GetTotalTax(), and SetTaxTooltip().

◆ GetChildren()

List< FactionBranch > Faction.GetChildren ( )
inline

Definition at line 200 of file FACTION.cs.

201 {
202 List<FactionBranch> list = new List<FactionBranch>();
203 foreach (Spatial value in EClass.game.spatials.map.Values)
204 {
205 if (value.mainFaction == this)
206 {
207 list.Add((value as Zone).branch);
208 }
209 }
210 return list;
211 }
Definition: Zone.cs:12

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

Referenced by CountTaxFreeLand(), CountWealth(), EvadeTax(), FindBranch(), RankedZoneManager.GetIncome(), GetMaxReserve(), GetRankIncome(), GetResidentTax(), IsGlobalPolicyActive(), OnAdvanceDay(), OnAdvanceMonth(), Game.OnLoad(), TraitBookSkill.OnRead(), TraitDeedRelocate.OnRead(), Card.PurgeDuplicateArtifact(), SetGlobalPolicyActive(), Player.SimulateFaction(), and TraitBookPlan.WriteNote().

◆ GetFactionSalary()

int Faction.GetFactionSalary ( )
inline

Definition at line 485 of file FACTION.cs.

486 {
487 int num = 0;
488 foreach (Faction value in EClass.game.factions.dictAll.Values)
489 {
490 num += value.relation.GetSalary();
491 }
492 if (num > 0)
493 {
494 Msg.Say("getFactionSalary", Lang._currency(num, "money"));
495 }
496 return num;
497 }
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 511 of file FACTION.cs.

512 {
513 int v = EClass.curve(EClass.player.fame * 2, 10000, 2000, 80);
514 v = EvadeTax(v, evasion);
515 if (v < 0)
516 {
517 v = 50000;
518 }
519 return v;
520 }
static int curve(int a, int start, int step, int rate=75)
Definition: EClass.cs:55
static Player player
Definition: EClass.cs:12
int fame
Definition: Player.cs:688

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

Referenced by GetTotalTax(), and SetTaxTooltip().

◆ GetHappiness()

float Faction.GetHappiness ( )
inline

Definition at line 175 of file FACTION.cs.

176 {
177 return 50f;
178 }

◆ GetHostility()

Hostility Faction.GetHostility ( )
inline

Definition at line 253 of file FACTION.cs.

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

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

Referenced by Chara.SetFaction().

◆ GetMaxReserve()

int Faction.GetMaxReserve ( )
inline

Definition at line 190 of file FACTION.cs.

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

References GetChildren(), and FactionBranch.lv.

Referenced by BaseListPeople.OnClick().

◆ GetRankIncome()

int Faction.GetRankIncome ( )
inline

Definition at line 471 of file FACTION.cs.

472 {
473 int num = 0;
474 foreach (FactionBranch child in GetChildren())
475 {
476 num += EClass.game.spatials.ranks.GetIncome(child.owner);
477 }
478 if (num > 0)
479 {
480 Msg.Say("getRankIncome", Lang._currency(num, "money"));
481 }
482 return num;
483 }
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 457 of file FACTION.cs.

458 {
459 int num = 0;
460 foreach (FactionBranch child in GetChildren())
461 {
462 num += child.GetResidentTax();
463 }
464 if (num > 0)
465 {
466 Msg.Say("getResidentTax", Lang._currency(num, "money"));
467 }
468 return num;
469 }

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

Referenced by OnAdvanceMonth().

◆ GetSprite()

Sprite Faction.GetSprite ( )
inline

Definition at line 180 of file FACTION.cs.

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

References source.

◆ GetTotalTax()

int Faction.GetTotalTax ( bool  evasion)
inline

Definition at line 499 of file FACTION.cs.

500 {
501 return GetBaseTax(evasion) + GetFameTax(evasion) + EClass.player.extraTax;
502 }
int GetFameTax(bool evasion)
Definition: FACTION.cs:511
int GetBaseTax(bool evasion)
Definition: FACTION.cs:504
int extraTax
Definition: Player.cs:739

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 275 of file FACTION.cs.

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

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 162 of file FACTION.cs.

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

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

Referenced by Create().

◆ IsGlobalPolicyActive()

bool Faction.IsGlobalPolicyActive ( int  id)
inline

Definition at line 436 of file FACTION.cs.

437 {
438 bool result = false;
439 foreach (FactionBranch child in GetChildren())
440 {
441 if (child.policies.IsActive(id))
442 {
443 result = true;
444 }
445 }
446 return result;
447 }

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 297 of file FACTION.cs.

298 {
299 if ((!c.IsUnique || c.bio.gender != 2) && (c.race.IsHuman || c.race.IsFairy) && !(c.trait is TraitMerchant))
300 {
301 return true;
302 }
303 if (IsGlobalPolicyActive(2712))
304 {
305 foreach (Chara value in EClass.game.cards.globalCharas.Values)
306 {
307 if (value.id == c.id && value.IsHomeMember())
308 {
309 return true;
310 }
311 }
312 }
313 return false;
314 }
int gender
Definition: Biography.cs:29
bool IsUnique
Definition: Card.cs:1967
Biography bio
Definition: Card.cs:40
new TraitChara trait
Definition: Chara.cs:488
SourceRace.Row race
Definition: Chara.cs:449
bool IsGlobalPolicyActive(int id)
Definition: FACTION.cs:436

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

◆ ModRelation()

void Faction.ModRelation ( int  a)
inline

Definition at line 270 of file FACTION.cs.

271 {
272 relation.affinity += a;
273 }

◆ OnAdvanceDay()

void Faction.OnAdvanceDay ( )
inline

Definition at line 362 of file FACTION.cs.

363 {
364 foreach (FactionBranch child in GetChildren())
365 {
366 child.OnAdvanceDay();
367 }
368 }
void OnAdvanceDay()

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

Referenced by GameDate.AdvanceDay().

◆ OnAdvanceMonth()

void Faction.OnAdvanceMonth ( )
inline

Definition at line 370 of file FACTION.cs.

371 {
372 if (GetChildren().Count == 0)
373 {
374 return;
375 }
376 int num = 0;
377 num += GetResidentTax();
378 num += GetRankIncome();
379 num += GetFactionSalary();
380 if (num > 0)
381 {
382 Thing container_deposit = EClass.game.cards.container_deposit;
383 if (EClass.pc.homeBranch.policies.IsActive(2711) && (container_deposit.GetCurrency() > 0 || !container_deposit.things.IsFull()))
384 {
385 container_deposit.ModCurrency(num);
386 Msg.Say("bankIncome", Lang._currency(num, "money"));
387 }
388 else
389 {
390 Thing thing = ThingGen.Create("money").SetNum(num);
391 Thing p = ThingGen.CreateParcel("parcel_salary", thing);
393 }
394 }
395 num = GetTotalTax(evasion: true);
396 Thing thing2 = ThingGen.CreateBill(num, tax: true);
397 thing2.SetInt(35, EClass.player.extraTax);
398 Msg.Say("getBill", Lang._currency(num, "money"));
399 TryPayBill(thing2);
400 Msg.Say("bills", EClass.player.taxBills.ToString() ?? "");
402 {
404 }
405 }
Thing container_deposit
Definition: CardManager.cs:58
Thing SetNum(int a)
Definition: Card.cs:3242
int GetCurrency(string id="money")
Definition: Card.cs:3652
void ModCurrency(int a, string id="money")
Definition: Card.cs:3638
ThingContainer things
Definition: Card.cs:34
bool godMode
Definition: CoreDebug.cs:172
static Chara pc
Definition: EClass.cs:14
static CoreDebug debug
Definition: EClass.cs:48
int GetFactionSalary()
Definition: FACTION.cs:485
int GetTotalTax(bool evasion)
Definition: FACTION.cs:499
void TryPayBill(Thing bill)
Definition: FACTION.cs:407
int GetResidentTax()
Definition: FACTION.cs:457
int GetRankIncome()
Definition: FACTION.cs:471
GamePrincipal principal
Definition: Game.cs:221
void ModKarma(int a)
Definition: Player.cs:2289
int taxBills
Definition: Player.cs:715
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 170 of file FACTION.cs.

171 {
172 relation.faction = this;
173 }

Referenced by FactionManager.OnLoad().

◆ RemoveReserve()

void Faction.RemoveReserve ( Chara  c)
inline

Definition at line 351 of file FACTION.cs.

352 {
353 listReserve.ForeachReverse(delegate(HireInfo i)
354 {
355 if (i.chara == c || i.chara.uid == c.uid)
356 {
357 listReserve.Remove(i);
358 }
359 });
360 }
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 449 of file FACTION.cs.

450 {
451 foreach (FactionBranch child in GetChildren())
452 {
453 child.policies.SetActive(id, active);
454 }
455 }
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 536 of file FACTION.cs.

537 {
538 n.AddHeader("tax");
539 n.AddTopic("tax_base", Lang._currency(GetBaseTax(evasion: true), showUnit: true) + " (" + Lang._currency(GetBaseTax(evasion: false)) + ")");
540 n.AddTopic("tax_fame", Lang._currency(GetFameTax(evasion: true), showUnit: true) + " (" + Lang._currency(GetFameTax(evasion: false)) + ")");
541 n.AddTopic("tax_extra", Lang._currency(EClass.player.extraTax, showUnit: true));
542 }
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 407 of file FACTION.cs.

408 {
410 {
411 InvOwnerDeliver.PayBill(bill, fromBank: true);
412 }
413 else
414 {
416 }
417 }
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 146 of file FACTION.cs.

◆ charaElements

◆ elements

◆ globalPolicies

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

Definition at line 142 of file FACTION.cs.

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

◆ id

string Faction.id

◆ listReserve

◆ name

◆ relation

◆ uid

string Faction.uid

Definition at line 130 of file FACTION.cs.

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

Property Documentation

◆ Name

◆ source

SourceFaction.Row Faction.source
get

Definition at line 150 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: