Elin Decompiled Documentation EA 23.312 Nightly Patch 4
Loading...
Searching...
No Matches
CustomFileContent Class Referenceabstract
Inheritance diagram for CustomFileContent:
CustomContent EClass CustomBiographyContent CustomMerchantStock

Public Member Functions

bool HasFileChanged ()
 
virtual void OnSetLang (string lang)
 
void Load ()
 
- Public Member Functions inherited from CustomContent
virtual void OnGameLoad (GameIOContext context)
 
virtual void OnGameSave (GameIOContext context)
 
override string ToString ()
 

Protected Member Functions

abstract void LoadContent ()
 

Properties

DateTime LastModified = DateTime.MinValue [get, set]
 
FileInfo File [get, set]
 
- Properties inherited from CustomContent
string ContentId [get, protected set]
 
EMod Owner [get, protected set]
 
- 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 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 (long _a, int start, int step, int rate=75)
 
static int sqrt (int a)
 
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
 

Detailed Description

Definition at line 6 of file CustomFileContent.cs.

Member Function Documentation

◆ HasFileChanged()

bool CustomFileContent.HasFileChanged ( )
inline

Definition at line 14 of file CustomFileContent.cs.

15 {
16 File.Refresh();
17 return File.LastWriteTimeUtc != LastModified;
18 }

References File, and LastModified.

Referenced by Load().

◆ Load()

void CustomFileContent.Load ( )
inline

Definition at line 24 of file CustomFileContent.cs.

25 {
26 if (!HasFileChanged())
27 {
28 return;
29 }
30 try
31 {
33 }
34 catch (Exception message)
35 {
36 ModUtil.LogModError("exception while loading file '" + base.ContentId + "'", base.Owner);
37 Debug.LogError(message);
38 }
39 finally
40 {
41 LastModified = File.LastWriteTimeUtc;
42 }
43 }
abstract void LoadContent()

References Debug, File, HasFileChanged(), LastModified, and LoadContent().

Referenced by CustomMerchantStock.Generate(), and CustomBiographyContent.RefreshCharaBio().

◆ LoadContent()

abstract void CustomFileContent.LoadContent ( )
protectedpure virtual

Implemented in CustomBiographyContent, and CustomMerchantStock.

Referenced by Load().

◆ OnSetLang()

virtual void CustomFileContent.OnSetLang ( string  lang)
inlinevirtual

Reimplemented in CustomBiographyContent.

Definition at line 20 of file CustomFileContent.cs.

21 {
22 }

Property Documentation

◆ File

FileInfo CustomFileContent.File
getset

◆ LastModified

DateTime CustomFileContent.LastModified = DateTime.MinValue
getsetprotected

Definition at line 8 of file CustomFileContent.cs.

8{ get; set; } = DateTime.MinValue;

Referenced by HasFileChanged(), and Load().


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