Elin Decompiled Documentation EA 23.312 Nightly Patch 4
Loading...
Searching...
No Matches
CustomElementContent Class Reference
Inheritance diagram for CustomElementContent:
CustomSourceContent CustomContent EClass

Public Member Functions

override void OnGameLoad (GameIOContext context)
 
override string ToString ()
 
- Public Member Functions inherited from CustomContent
virtual void OnGameLoad (GameIOContext context)
 
virtual void OnGameSave (GameIOContext context)
 
override string ToString ()
 

Static Public Member Functions

static CustomElementContent CreateFromRow (SourceElement.Row r, ModPackage owner=null)
 
- Static Public Member Functions inherited from CustomSourceContent
static string string string[] kv GetParams (string tag)
 
- 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)
 

Public Attributes

bool addOnLoad
 

Properties

override string SourceType [get]
 
- Properties inherited from CustomSourceContent
virtual string SourceType [get]
 
string SourceId [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 Attributes inherited from CustomSourceContent
static string action
 
static string string spec
 
- Static Public Attributes inherited from EClass
static Core core
 

Detailed Description

Definition at line 4 of file CustomElementContent.cs.

Member Function Documentation

◆ CreateFromRow()

static CustomElementContent CustomElementContent.CreateFromRow ( SourceElement::Row  r,
ModPackage  owner = null 
)
inlinestatic

Definition at line 10 of file CustomElementContent.cs.

11 {
12 if (owner == null)
13 {
14 owner = ModUtil.FindSourceRowPackage(r);
15 }
16 CustomElementContent customElementContent = new CustomElementContent
17 {
18 ContentId = "Element/" + r.alias,
19 SourceId = r.alias,
20 Owner = owner
21 };
22 string[] tag = r.tag;
23 int i;
24 for (i = 0; i < tag.Length; i++)
25 {
26 string item = CustomSourceContent.GetParams(tag[i]).action;
27 if (item == "addEleOnLoad" || item == "addOnLoad")
28 {
29 customElementContent.addOnLoad = true;
30 }
31 }
32 i = r.id;
33 if (i > 10000 || i < 0)
34 {
35 switch (r.group)
36 {
37 case "FEAT":
38 case "ABILITY":
39 case "SPELL":
40 {
41 i = ((!(r.group == "FEAT")) ? 48 : 32);
42 int num = i;
43 ModUtil.AppendSpriteSheet(r.alias, num, num);
44 break;
45 }
46 }
47 }
48 return customElementContent;
49 }
string ContentId
Definition: CustomContent.cs:6
static string string string[] kv GetParams(string tag)

References CustomContent.ContentId, CustomSourceContent.GetParams(), item, CustomContent.Owner, and CustomSourceContent.SourceId.

Referenced by ModPackage.GenerateCustomContentProfiles().

◆ OnGameLoad()

override void CustomElementContent.OnGameLoad ( GameIOContext  context)
inlinevirtual

Reimplemented from CustomContent.

Definition at line 51 of file CustomElementContent.cs.

52 {
53 SourceElement.Row row = EClass.sources.elements.alias[base.SourceId];
54 if (addOnLoad && !EClass.pc.HasElement(base.SourceId))
55 {
56 switch (row.group)
57 {
58 case "FEAT":
59 EClass.pc.SetFeat(row.id, 1, msg: true);
60 break;
61 case "ABILITY":
62 case "SPELL":
64 break;
65 }
66 }
67 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6272
void SetFeat(int id, int value=1, bool msg=false)
Definition: Chara.cs:10236
void GainAbility(int ele, int mtp=100, Thing origin=null)
Definition: Chara.cs:10436
Definition: EClass.cs:6
static SourceManager sources
Definition: EClass.cs:43
static Chara pc
Definition: EClass.cs:15
SourceElement elements

References addOnLoad, SourceManager.elements, Chara.GainAbility(), SourceElement.Row.group, Card.HasElement(), SourceElement.Row.id, EClass.pc, Chara.SetFeat(), and EClass.sources.

◆ ToString()

override string CustomElementContent.ToString ( )
inline

Definition at line 69 of file CustomElementContent.cs.

70 {
71 return $"{base.ContentId}/addOnLoad={addOnLoad}";
72 }
$
Definition: ModManager.cs:76

References $.

Member Data Documentation

◆ addOnLoad

bool CustomElementContent.addOnLoad

Definition at line 6 of file CustomElementContent.cs.

Referenced by OnGameLoad().

Property Documentation

◆ SourceType

override string CustomElementContent.SourceType
get

Definition at line 8 of file CustomElementContent.cs.


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