Elin Decompiled Documentation EA 23.315 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 185 of file SourceManager.cs.

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

References item, and list.

◆ ImportSourceTexts()

void SourceManager.ImportSourceTexts ( )
inline

Definition at line 201 of file SourceManager.cs.

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

References item, list, and things.

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

◆ Init()

void SourceManager.Init ( )
inline

Definition at line 114 of file SourceManager.cs.

115 {
116 Debug.Log("SourceManager Init");
117 if (initialized)
118 {
119 return;
120 }
121 initialized = true;
122 list.Clear();
123 FieldInfo[] fields = GetType().GetFields();
124 foreach (FieldInfo fieldInfo in fields)
125 {
126 if (typeof(SourceData).IsAssignableFrom(fieldInfo.FieldType))
127 {
128 list.Add((SourceData)fieldInfo.GetValue(this));
129 }
130 }
131 BaseModManager.PublishEvent("elin.source.importing");
132 elements.Init();
133 materials.Init();
134 charas.Init();
135 things.Init();
136 thingV.Init();
137 foods.Init();
138 cards.Init();
139 checks.Init();
140 races.Init();
141 persons.Init();
142 categories.Init();
143 spawnLists.Init();
144 religions.Init();
145 factions.Init();
146 jobs.Init();
147 hobbies.Init();
148 floors.Init();
149 decos.Init();
150 blocks.Init();
151 cellEffects.Init();
152 objs.Init();
153 stats.Init();
154 areas.Init();
155 zones.Init();
156 zoneAffixes.Init();
157 researches.Init();
158 homeResources.Init();
159 globalTiles.Init();
161 quests.Init();
162 charaText.Init();
163 calc.Init();
164 recipes.Init();
165 backers.Init();
166 tactics.Init();
167 keyItems.Init();
168 ACT.Init();
169 TimeTable.Init();
171 Element.ListAttackElements.AddRange(EMono.sources.elements.rows.Where((SourceElement.Row r) => r.categorySub == "eleAttack"));
172 BaseModManager.PublishEvent("elin.source.imported");
173 }
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:275
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 Core.SetReferences().

◆ OnChangeLang()

void SourceManager.OnChangeLang ( )
inline

Definition at line 110 of file SourceManager.cs.

111 {
112 }

Referenced by Core.SetLang().

◆ Reload()

void SourceManager.Reload ( )
inline

Definition at line 175 of file SourceManager.cs.

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

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

◆ UpdateSourceTexts()

void SourceManager.UpdateSourceTexts ( string  path)
inline

Definition at line 193 of file SourceManager.cs.

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

References item, and list.

◆ ValidateLang()

void SourceManager.ValidateLang ( )
inline

Definition at line 216 of file SourceManager.cs.

217 {
218 Log.system = "";
219 foreach (SourceData item in list)
220 {
221 item.ValidateLang();
222 }
223 string text = Lang.setting.dir + "validation.txt";
224 IO.SaveText(text, Log.system);
225 Util.Run(text);
226 }
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(), 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(), FoodEffect.Proc(), ActEffect.Proc(), 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: