Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
FactionManager Class Reference
Inheritance diagram for FactionManager:
EClass

Public Member Functions

void AssignUID (Faction s)
 
void OnCreateGame ()
 
void OnLoad ()
 
Find< T > (string id)
 
Faction Find (string id)
 

Public Attributes

Dictionary< string, FactiondictAll = new Dictionary<string, Faction>()
 
new Faction Home
 
new Faction Wilds
 
GuildFighter Fighter
 
GuildMage Mage
 
GuildThief Thief
 
GuildMerchant Merchant
 

Additional Inherited Members

- 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)
 
- Static Public Attributes inherited from EClass
static Core core
 
- 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]
 

Detailed Description

Definition at line 5 of file FactionManager.cs.

Member Function Documentation

◆ AssignUID()

void FactionManager.AssignUID ( Faction  s)
inline

Definition at line 28 of file FactionManager.cs.

29 {
30 Faction faction = dictAll.TryGetValue(s.id);
31 if (faction != null)
32 {
33 Debug.LogError("exception: Faction id already exists:" + faction.id);
34 }
35 s.uid = s.id;
36 dictAll.Add(s.uid, s);
37 }
Dictionary< string, Faction > dictAll
string uid
Definition: FACTION.cs:130
string id
Definition: FACTION.cs:127

References Debug, dictAll, Faction.id, and Faction.uid.

Referenced by Faction.Init().

◆ Find()

Faction FactionManager.Find ( string  id)
inline

Definition at line 67 of file FactionManager.cs.

68 {
69 foreach (Faction value in dictAll.Values)
70 {
71 if (value.id == id)
72 {
73 return value;
74 }
75 }
76 return null;
77 }

References dictAll, and Faction.id.

Referenced by Game._Create(), Find< T >(), and OnCreateGame().

◆ Find< T >()

T FactionManager.Find< T > ( string  id)
inline
Type Constraints
T :Faction 

Definition at line 62 of file FactionManager.cs.

62 : Faction
63 {
64 return Find(id) as T;
65 }
Faction Find(string id)

References Find().

◆ OnCreateGame()

void FactionManager.OnCreateGame ( )
inline

Definition at line 39 of file FactionManager.cs.

40 {
41 foreach (SourceFaction.Row row in EClass.sources.factions.rows)
42 {
43 Faction.Create(row);
44 }
45 Home = Find("home");
46 Home.relation.type = FactionRelation.RelationType.Owner;
47 Wilds = Find("wilds");
48 Fighter = Find<GuildFighter>("guild_fighter");
49 Mage = Find<GuildMage>("guild_mage");
50 Thief = Find<GuildThief>("guild_thief");
51 Merchant = Find<GuildMerchant>("guild_merchant");
52 }
Definition: EClass.cs:5
static SourceManager sources
Definition: EClass.cs:42
GuildMerchant Merchant
new Faction Home
GuildThief Thief
GuildMage Mage
GuildFighter Fighter
new Faction Wilds
static Faction Create(SourceFaction.Row r)
Definition: FACTION.cs:154
SourceFaction factions

References Faction.Create(), SourceManager.factions, Fighter, Find(), Home, Mage, Merchant, EClass.sources, Thief, and Wilds.

Referenced by Game._Create().

◆ OnLoad()

void FactionManager.OnLoad ( )
inline

Definition at line 54 of file FactionManager.cs.

55 {
56 foreach (Faction value in dictAll.Values)
57 {
58 value.OnLoad();
59 }
60 }
void OnLoad()
Definition: FACTION.cs:170

References dictAll, and Faction.OnLoad().

Referenced by Game.OnLoad().

Member Data Documentation

◆ dictAll

Dictionary<string, Faction> FactionManager.dictAll = new Dictionary<string, Faction>()

◆ Fighter

GuildFighter FactionManager.Fighter

Definition at line 17 of file FactionManager.cs.

Referenced by OnCreateGame().

◆ Home

new Faction FactionManager.Home

Definition at line 11 of file FactionManager.cs.

Referenced by OnCreateGame().

◆ Mage

GuildMage FactionManager.Mage

Definition at line 20 of file FactionManager.cs.

Referenced by OnCreateGame().

◆ Merchant

GuildMerchant FactionManager.Merchant

◆ Thief

GuildThief FactionManager.Thief

Definition at line 23 of file FactionManager.cs.

Referenced by OnCreateGame().

◆ Wilds

new Faction FactionManager.Wilds

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