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

Public Member Functions

void SetOwner (FactionBranch _branch)
 
void OnCreate ()
 
void Start ()
 
void OnAdvanceHour ()
 
void End ()
 

Static Public Member Functions

static Expedition Create (Chara c, ExpeditionType type)
 
- 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)
 

Public Attributes

int hours
 
int uidChara
 
ExpeditionType type
 
HomeResource.CostList costs = new HomeResource.CostList()
 
FactionBranch branch
 

Properties

Chara chara [get]
 
int MinHour [get]
 
int MaxHour [get]
 
string strType [get]
 
- 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 EClass
static Core core
 

Detailed Description

Definition at line 3 of file Expedition.cs.

Member Function Documentation

◆ Create()

static Expedition Expedition.Create ( Chara  c,
ExpeditionType  type 
)
inlinestatic

Definition at line 112 of file Expedition.cs.

113 {
114 Expedition expedition = new Expedition();
115 expedition.uidChara = c.uid;
116 expedition.type = type;
117 expedition.SetOwner(c.homeBranch);
118 expedition.OnCreate();
119 return expedition;
120 }
int uid
Definition: Card.cs:118
FactionBranch homeBranch
Definition: Chara.cs:889
void OnCreate()
Definition: Expedition.cs:31
void SetOwner(FactionBranch _branch)
Definition: Expedition.cs:26
ExpeditionType type
Definition: Expedition.cs:12

References Chara.homeBranch, OnCreate(), SetOwner(), type, and Card.uid.

Referenced by ListPeopleExpedition.OnList(), and Chara.TryWorkOutside().

◆ End()

void Expedition.End ( )
inline

Definition at line 76 of file Expedition.cs.

77 {
80 WidgetPopText.Say("expeditionEnd".lang(chara.Name, strType));
81 branch.Log("bExpeditionEnd", chara, strType);
83 {
84 Msg.Say("bExpeditionEnd", chara, strType);
85 }
86 switch (type)
87 {
88 case ExpeditionType.Search:
89 {
91 {
92 if (!item.isKnown)
93 {
94 item.isKnown = true;
95 WidgetPopText.Say("discoverZone".lang(item.Name), FontColor.Great);
96 }
97 }
99 if (zone != null)
100 {
101 zone.isKnown = true;
102 WidgetPopText.Say("discoverZone".lang(zone.Name), FontColor.Great);
103 }
104 break;
105 }
106 case ExpeditionType.Explore:
108 break;
109 }
110 }
ExpeditionType
FontColor
Definition: FontColor.cs:2
string Name
Definition: Card.cs:2013
WorkSummary GetWorkSummary()
Definition: Chara.cs:8308
Zone homeZone
Definition: Chara.cs:252
bool IsInActiveZone
Definition: Chara.cs:791
void MoveZone(string alias)
Definition: Chara.cs:3010
Definition: EClass.cs:5
static World world
Definition: EClass.cs:40
Dictionary< int, Expedition > dict
int uidChara
Definition: Expedition.cs:9
string strType
Definition: Expedition.cs:24
FactionBranch branch
Definition: Expedition.cs:16
Chara chara
Definition: Expedition.cs:18
ExpeditionManager expeditions
string Log(string idLang, string ref1=null, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
Zone CreateRandomSite(Zone center, int radius=8, string idSource=null, bool updateMesh=true, int lv=0)
Definition: Region.cs:104
List< Zone > ListZonesInRadius(Zone center, int radius=10)
Definition: Region.cs:263
virtual string Name
Definition: Spatial.cs:495
static void Say(string text, FontColor fontColor=FontColor.Default, Sprite sprite=null)
Region region
Definition: World.cs:23
Definition: Zone.cs:12

References branch, chara, Region.CreateRandomSite(), ExpeditionManager.dict, FactionBranch.expeditions, Chara.GetWorkSummary(), Chara.homeZone, Chara.IsInActiveZone, item, Region.ListZonesInRadius(), FactionBranch.Log(), Chara.MoveZone(), Card.Name, Spatial.Name, FactionBranch.owner, WorkSummary.progress, World.region, Msg.Say(), WidgetPopText.Say(), strType, type, uidChara, and EClass.world.

Referenced by OnAdvanceHour().

◆ OnAdvanceHour()

void Expedition.OnAdvanceHour ( )
inline

Definition at line 67 of file Expedition.cs.

68 {
69 hours--;
70 if (hours <= 0)
71 {
72 End();
73 }
74 }
void End()
Definition: Expedition.cs:76
int hours
Definition: Expedition.cs:6

References End(), and hours.

Referenced by ExpeditionManager.OnSimulateHour().

◆ OnCreate()

void Expedition.OnCreate ( )
inline

Definition at line 31 of file Expedition.cs.

32 {
33 _ = branch.resources;
34 switch (type)
35 {
36 case ExpeditionType.Search:
37 hours = 24;
38 break;
39 case ExpeditionType.Training:
40 hours = 120;
41 break;
42 case ExpeditionType.Explore:
43 hours = 10;
44 break;
45 case ExpeditionType.Hunt:
46 hours = 10;
47 break;
48 default:
49 hours = 24;
50 break;
51 }
52 }
HomeResourceManager resources

References branch, hours, FactionBranch.resources, and type.

Referenced by Create().

◆ SetOwner()

void Expedition.SetOwner ( FactionBranch  _branch)
inline

Definition at line 26 of file Expedition.cs.

27 {
28 branch = _branch;
29 }

References branch.

Referenced by Create(), and ExpeditionManager.SetOwner().

◆ Start()

void Expedition.Start ( )
inline

Definition at line 54 of file Expedition.cs.

55 {
57 costs.Pay();
58 WidgetPopText.Say("expeditionStart".lang(chara.Name, strType));
59 EClass.Branch.Log("bExpeditionStart", chara, strType);
61 {
62 Msg.Say("bExpeditionStart", chara, strType);
63 }
64 chara.MoveZone("somewhere");
65 }
static FactionBranch Branch
Definition: EClass.cs:22
int MinHour
Definition: Expedition.cs:20
int MaxHour
Definition: Expedition.cs:22
HomeResource.CostList costs
Definition: Expedition.cs:14
Definition: Rand.cs:4
static int Range(int min, int max)
Definition: Rand.cs:42

References EClass.Branch, chara, costs, hours, Chara.IsInActiveZone, FactionBranch.Log(), MaxHour, MinHour, Chara.MoveZone(), Card.Name, Rand.Range(), Msg.Say(), WidgetPopText.Say(), and strType.

Referenced by ExpeditionManager.Add().

Member Data Documentation

◆ branch

FactionBranch Expedition.branch

Definition at line 16 of file Expedition.cs.

Referenced by End(), OnCreate(), and SetOwner().

◆ costs

◆ hours

int Expedition.hours

Definition at line 6 of file Expedition.cs.

Referenced by OnAdvanceHour(), OnCreate(), Start(), and Chara.TryWorkOutside().

◆ type

ExpeditionType Expedition.type

Definition at line 12 of file Expedition.cs.

Referenced by Create(), End(), and OnCreate().

◆ uidChara

int Expedition.uidChara

Definition at line 9 of file Expedition.cs.

Referenced by ExpeditionManager.Add(), and End().

Property Documentation

◆ chara

Chara Expedition.chara
get

Definition at line 18 of file Expedition.cs.

Referenced by End(), and Start().

◆ MaxHour

int Expedition.MaxHour
get

Definition at line 22 of file Expedition.cs.

Referenced by ListPeopleExpedition.SetSubText(), and Start().

◆ MinHour

int Expedition.MinHour
get

Definition at line 20 of file Expedition.cs.

Referenced by ListPeopleExpedition.SetSubText(), and Start().

◆ strType

string Expedition.strType
get

Definition at line 24 of file Expedition.cs.

Referenced by End(), and Start().


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