Elin Decompiled Documentation EA 23.331 Nightly
Loading...
Searching...
No Matches
SourceManager Class Reference
Inheritance diagram for SourceManager:
EMono

Public Member Functions

void InitLang ()
 
void OnChangeLang ()
 
void Init ()
 
void Reload ()
 
void ExportSourceTexts (string path)
 
void UpdateSourceTexts (string path)
 
void ImportSourceTexts ()
 
void ValidateLang ()
 

Public Attributes

LangGeneral langGeneral
 
LangList langList
 
LangGame langGame
 
LangWord langWord
 
LangNote langNote
 
SourceCard cards = new SourceCard()
 
SourceChara charas
 
SourceCharaText charaText
 
SourceTactics tactics
 
SourcePerson persons
 
SourceThing things
 
SourceElement elements
 
SourceCalc calc
 
SourceCheck checks
 
SourceRace races
 
SourceCategory categories
 
SourceMaterial materials
 
SourceSpawnList spawnLists
 
SourceBlock blocks
 
SourceFloor floors
 
SourceDeco decos
 
SourceCellEffect cellEffects
 
SourceObj objs
 
SourceFaction factions
 
SourceReligion religions
 
SourceJob jobs
 
SourceHobby hobbies
 
SourceQuest quests
 
SourceStat stats
 
SourceArea areas
 
SourceZone zones
 
SourceZoneAffix zoneAffixes
 
SourceResearch researches
 
SourceHomeResource homeResources
 
SourceCollectible collectibles
 
SourceGlobalTile globalTiles
 
SourceThingV thingV
 
SourceFood foods
 
SourceRecipe recipes
 
SourceBacker backers
 
SourceAsset asset
 
SourceKeyItem keyItems
 
bool initialized
 

Private Attributes

List< SourceDatalist = new List<SourceData>()
 

Additional Inherited Members

- Static Public Member Functions inherited from EMono
static int rnd (int a)
 
- Static Public Attributes inherited from EMono
static Core core
 
- Properties inherited from EMono
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 Scene scene [get]
 
static BaseGameScreen screen [get]
 
static GameSetting setting [get]
 
static GameData gamedata [get]
 
static ColorProfile Colors [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static SourceManager sources [get]
 
static SourceManager editorSources [get]
 
static CoreDebug debug [get]
 

Detailed Description

Definition at line 6 of file SourceManager.cs.

Member Function Documentation

◆ ExportSourceTexts()

void SourceManager.ExportSourceTexts ( string  path)
inline

Definition at line 186 of file SourceManager.cs.

187 {
188 foreach (SourceData item in list)
189 {
190 item.ExportTexts(path);
191 }
192 }
List< SourceData > list

References item, and list.

◆ ImportSourceTexts()

void SourceManager.ImportSourceTexts ( )
inline

Definition at line 202 of file SourceManager.cs.

203 {
204 foreach (SourceData item in list)
205 {
206 if (item is SourceThingV)
207 {
208 things.ImportTexts(item.nameSheet);
209 }
210 else
211 {
212 item.ImportTexts();
213 }
214 }
215 }
SourceThing things

References item, list, and things.

Referenced by Core.SetLang(), and CoreDebug.UpdateAlways().

◆ Init()

void SourceManager.Init ( )
inline

Definition at line 115 of file SourceManager.cs.

116 {
117 Debug.Log("SourceManager Init");
118 if (initialized)
119 {
120 return;
121 }
122 initialized = true;
123 list.Clear();
124 FieldInfo[] fields = GetType().GetFields();
125 foreach (FieldInfo fieldInfo in fields)
126 {
127 if (typeof(SourceData).IsAssignableFrom(fieldInfo.FieldType))
128 {
129 list.Add((SourceData)fieldInfo.GetValue(this));
130 }
131 }
132 BaseModManager.PublishEvent("elin.source.importing");
133 elements.Init();
134 materials.Init();
135 charas.Init();
136 things.Init();
137 thingV.Init();
138 foods.Init();
139 cards.Init();
140 checks.Init();
141 races.Init();
142 persons.Init();
143 categories.Init();
144 spawnLists.Init();
145 religions.Init();
146 factions.Init();
147 jobs.Init();
148 hobbies.Init();
149 floors.Init();
150 decos.Init();
151 blocks.Init();
152 cellEffects.Init();
153 objs.Init();
154 stats.Init();
155 areas.Init();
156 zones.Init();
157 zoneAffixes.Init();
158 researches.Init();
159 homeResources.Init();
160 globalTiles.Init();
162 quests.Init();
163 charaText.Init();
164 calc.Init();
165 recipes.Init();
166 backers.Init();
167 tactics.Init();
168 keyItems.Init();
169 ACT.Init();
170 TimeTable.Init();
172 Element.ListAttackElements.AddRange(EMono.sources.elements.rows.Where((SourceElement.Row r) => r.categorySub == "eleAttack"));
173 BaseModManager.PublishEvent("elin.source.imported");
174 }
Definition: ACT.cs:6
static void Init()
Definition: ACT.cs:25
static void PublishEvent(string eventId, object data=null)
Definition: EMono.cs:4
static SourceManager sources
Definition: EMono.cs:41
static List< SourceElement.Row > ListAttackElements
Definition: ELEMENT.cs:279
void Init()
Definition: SourceCard.cs:15
void OnAfterInit()
Definition: SourceFloor.cs:287
SourceFaction factions
SourceMaterial materials
SourceRace races
SourceStat stats
SourceKeyItem keyItems
SourceResearch researches
SourceCalc calc
SourceHomeResource homeResources
SourceCard cards
SourceThingV thingV
SourceObj objs
SourceZone zones
SourceHobby hobbies
SourceFood foods
SourceSpawnList spawnLists
SourceGlobalTile globalTiles
SourceDeco decos
SourceCheck checks
SourceCellEffect cellEffects
SourceBlock blocks
SourcePerson persons
SourceRecipe recipes
SourceArea areas
SourceCharaText charaText
SourceZoneAffix zoneAffixes
SourceBacker backers
SourceCategory categories
SourceElement elements
SourceChara charas
SourceQuest quests
SourceJob jobs
SourceReligion religions
SourceTactics tactics
SourceFloor floors
static void Init()
Definition: TimeTable.cs:19

References areas, backers, blocks, calc, cards, categories, cellEffects, charas, charaText, checks, Debug, decos, elements, factions, floors, foods, globalTiles, hobbies, homeResources, ACT.Init(), SourceCard.Init(), TimeTable.Init(), initialized, jobs, keyItems, list, Element.ListAttackElements, materials, objs, SourceFloor.OnAfterInit(), persons, BaseModManager.PublishEvent(), quests, races, recipes, religions, researches, EMono.sources, spawnLists, stats, tactics, things, thingV, zoneAffixes, and zones.

Referenced by Reload(), and Core.StartCase().

◆ InitLang()

void SourceManager.InitLang ( )
inline

Definition at line 96 of file SourceManager.cs.

97 {
98 langGeneral.Init();
99 langGame.Init();
100 langList.Init();
101 langNote.Init();
102 langWord.Init();
103 Lang.General = langGeneral;
104 Lang.Game = langGame;
105 Lang.List = langList;
106 Lang.Note = langNote;
107 WordGen.source = langWord;
108 }
LangGeneral langGeneral
Definition: SourceManager.cs:8
LangGame langGame
LangWord langWord
LangNote langNote
LangList langList

References langGame, langGeneral, langList, langNote, and langWord.

Referenced by OnChangeLang(), and Core.SetReferences().

◆ OnChangeLang()

void SourceManager.OnChangeLang ( )
inline

Definition at line 110 of file SourceManager.cs.

111 {
112 InitLang();
113 }

References InitLang().

Referenced by Core.SetLang().

◆ Reload()

void SourceManager.Reload ( )
inline

Definition at line 176 of file SourceManager.cs.

177 {
178 initialized = false;
179 foreach (SourceData item in list)
180 {
181 item.Reset();
182 }
183 Init();
184 }

References Init(), initialized, item, and list.

◆ UpdateSourceTexts()

void SourceManager.UpdateSourceTexts ( string  path)
inline

Definition at line 194 of file SourceManager.cs.

195 {
196 foreach (SourceData item in list)
197 {
198 item.ExportTexts(path, update: true);
199 }
200 }

References item, and list.

◆ ValidateLang()

void SourceManager.ValidateLang ( )
inline

Definition at line 217 of file SourceManager.cs.

218 {
219 Log.system = "";
220 foreach (SourceData item in list)
221 {
222 item.ValidateLang();
223 }
224 string text = Lang.setting.dir + "validation.txt";
225 IO.SaveText(text, Log.system);
226 Util.Run(text);
227 }
Definition: IO.cs:10
static void SaveText(string path, string text)
Definition: IO.cs:103
Definition: Log.cs:4
static string system
Definition: Log.cs:5
Definition: Util.cs:10
static void Run(string itemPath)
Definition: Util.cs:242

References item, list, Log.system, and Util.

Member Data Documentation

◆ areas

SourceArea SourceManager.areas

Definition at line 66 of file SourceManager.cs.

Referenced by Init(), and BuildMenu.RefreshCategoryArea().

◆ asset

SourceAsset SourceManager.asset

Definition at line 88 of file SourceManager.cs.

Referenced by SourceThingV.RestorePref().

◆ backers

◆ blocks

◆ calc

SourceCalc SourceManager.calc

Definition at line 32 of file SourceManager.cs.

Referenced by Dice.Create(), ActEffect.DamageEle(), Init(), and ActEffect.Proc().

◆ cards

◆ categories

◆ cellEffects

SourceCellEffect SourceManager.cellEffects

Definition at line 50 of file SourceManager.cs.

Referenced by RecipeManager.BuildList(), and Init().

◆ charas

◆ charaText

SourceCharaText SourceManager.charaText

Definition at line 22 of file SourceManager.cs.

Referenced by Chara.GetTopicText(), and Init().

◆ checks

SourceCheck SourceManager.checks

Definition at line 34 of file SourceManager.cs.

Referenced by Init().

◆ collectibles

◆ decos

SourceDeco SourceManager.decos

Definition at line 48 of file SourceManager.cs.

Referenced by RecipeManager.BuildList(), ThingGen.CreateDeco(), and Init().

◆ elements

SourceElement SourceManager.elements

Definition at line 30 of file SourceManager.cs.

Referenced by Element._WriteNote(), Chara.AddCondition(), Chara.AddCooldown(), Element.AddEncNote(), FactionBranch.AddFeat(), PolicyManager.AddPolicy(), CraftUtil.AddRandomFoodEnc(), SourceElement.AddRow(), Card.AddRune(), DNA.Apply(), Feat.Apply(), DomainManager.Build(), CharaAbility.BuildRandomAbilityList(), Card.CanAddRune(), DNA.CanRemove(), Element.CheckLevelBonus(), ElementContainerCard.CheckSkillActions(), RecipeManager.ComeUpWithRecipe(), TraitCrafter.Craft(), TraitPotion.Create(), TraitSpellbook.Create(), TraitRod.Create(), CustomThingContent.Create(), ACT.Create(), Element.Create(), TraitAbility.CreateAct(), ThingGen.CreateSpellbook(), Trait.CreateStock(), FactionBranch.DailyOutcome(), Player.DreamSpell(), FactionBranch.Evalue(), Card.Evalue(), Zone.Evalue(), SpawnList.Filter(), AI_Fuck.Finish(), Biography.Generate(), Element.Get(), Chara.GetBuffStats(), ElementContainer.GetElement(), Core.GetElement(), BaseCondition.GetElementSource(), Thing.GetEnchant(), Religion.GetFeat(), Element.GetId(), SourceElement.Row.GetName(), Element.GetName(), ElementContainer.GetOrCreateElement(), Element.GetRandomElement(), TraitScrollStatic.GetRefSprite(), BaseTaskHarvest.GetReqEle(), Element.GetSortVal(), Element.GetSource(), BaseCondition.GetSpriteColor(), ConBuffStats.GetText(), Check.GetText(), Religion.GetTextBenefit(), ElementContainer.Has(), Card.HasElement(), HotItemAct.HotItemAct(), SourceImporter.ImportFilesCached(), ACT.Init(), Init(), SourceElement.Row.IsEncAppliable(), Chara.ListAvailabeFeats(), Zone.ListLandFeats(), Card.MakeFoodFrom(), Thing.MatchEncSearch(), Card.ModExp(), Chara.ModTempElement(), Chara.MutateRandom(), SourceElement.OnAfterImportData(), SourceThingV.OnAfterImportData(), Trait.OnBarter(), FactionBranch.OnClaimZone(), Chara.OnCreate(), TraitBookSkill.OnCreate(), TraitMod.OnCreate(), CustomElementContent.OnGameLoad(), ElementContainerCard.OnLearn(), ElementContainerZone.OnLearn(), CustomThingContent.OnThingCreated(), ElementContainerCard.OnTrain(), RaceBonus.OnWriteNote(), ResearchPlan.ParseReward(), AttackProcess.Perform(), ConBuffStats.PlayEffect(), Card.PlayEffect(), ActEffect.Proc(), FoodEffect.ProcNutrition(), CoreDebug.QuickStart(), CharaAbility.Refresh(), WindowCharaMini.Refresh(), CustomBiographyContent.RefreshCharaBio(), Chara.RefreshFaithElement(), WindowChara.RefreshInfo(), WindowChara.RefreshSkill(), Chara.RefreshSpeed(), Card.ResistLvFrom(), ElementSelecter.Select(), Player.SelectDomain(), ElementContainer.SetBase(), CoreDebug.SetElement(), Chara.SetMainElement(), Chara.SetMutation(), TraitAbility.SetName(), TraitAmmoTalisman.SetName(), TraitBookSkill.SetName(), BaseTaskHarvest.SetTarget(), ConDisease.Tick(), Chara.TryAbsorbRod(), TaskHarvest.TryGetAct(), Chara.TryUpgrade(), GoalCombat.TryUseAbility(), BaseListPeople.WriteHobbies(), Element.BonusInfo.WriteNote(), and Thing.WriteNote().

◆ factions

SourceFaction SourceManager.factions

Definition at line 54 of file SourceManager.cs.

Referenced by RankedZone.GetFactionName(), Init(), and FactionManager.OnCreateGame().

◆ floors

◆ foods

SourceFood SourceManager.foods

Definition at line 82 of file SourceManager.cs.

Referenced by Init(), and SourcePrefInspector.ValidatePrefs().

◆ globalTiles

SourceGlobalTile SourceManager.globalTiles

◆ hobbies

SourceHobby SourceManager.hobbies

Definition at line 60 of file SourceManager.cs.

Referenced by Chara.HasHobbyOrWork(), Init(), and Chara.RerollHobby().

◆ homeResources

SourceHomeResource SourceManager.homeResources

Definition at line 74 of file SourceManager.cs.

Referenced by Init().

◆ initialized

bool SourceManager.initialized

Definition at line 94 of file SourceManager.cs.

Referenced by Init(), and Reload().

◆ jobs

◆ keyItems

◆ langGame

LangGame SourceManager.langGame

Definition at line 12 of file SourceManager.cs.

Referenced by Msg.GetGameText(), InitLang(), and FactionBranch.Log().

◆ langGeneral

LangGeneral SourceManager.langGeneral

Definition at line 8 of file SourceManager.cs.

Referenced by InitLang(), and Core.SetLang().

◆ langList

LangList SourceManager.langList

Definition at line 10 of file SourceManager.cs.

Referenced by InitLang().

◆ langNote

LangNote SourceManager.langNote

Definition at line 16 of file SourceManager.cs.

Referenced by InitLang().

◆ langWord

LangWord SourceManager.langWord

◆ list

List<SourceData> SourceManager.list = new List<SourceData>()
private

◆ materials

◆ objs

◆ persons

SourcePerson SourceManager.persons

Definition at line 26 of file SourceManager.cs.

Referenced by DramaSequence.GetActor(), and Init().

◆ quests

◆ races

◆ recipes

SourceRecipe SourceManager.recipes

◆ religions

SourceReligion SourceManager.religions

Definition at line 56 of file SourceManager.cs.

Referenced by Init(), Trait.OfferProcess(), and Chara.RefreshFaithElement().

◆ researches

◆ spawnLists

◆ stats

SourceStat SourceManager.stats

◆ tactics

SourceTactics SourceManager.tactics

◆ things

◆ thingV

SourceThingV SourceManager.thingV

Definition at line 80 of file SourceManager.cs.

Referenced by Init(), and SourcePrefInspector.ValidatePrefs().

◆ zoneAffixes

SourceZoneAffix SourceManager.zoneAffixes

◆ zones


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