Elin Decompiled Documentation EA 23.102 Nightly
Loading...
Searching...
No Matches
LayerEmbark Class Reference
Inheritance diagram for LayerEmbark:
ELayer Layer IUISkin

Public Types

enum  Mode { top , previewMap , member , map }
 

Public Member Functions

override void OnAfterAddLayer ()
 
void OnClickBack ()
 
void SwitchMode (int i)
 
void SwitchMode (Mode _mode)
 
override bool OnBack ()
 
override void OnKill ()
 
void RerollPreviewMap ()
 
void OnClickPreview (UIMapPreview preview)
 
void RefreshMembers ()
 
void RerollPC ()
 
void RerollMembers ()
 
string GetAlias ()
 
void RerollPlayerAlias ()
 
void RerollPlayerName ()
 
void OnEndEditPlayerName ()
 
void ListPlayerAlias ()
 
- Public Member Functions inherited from ELayer
override void OnBeforeAddLayer ()
 
void InitInspector ()
 
sealed override void Init ()
 
override void OnAfterAddLayer ()
 
void TryShowHelp ()
 
void AddLayerToUI (string id)
 
void TryShowHint (string _langHint=null)
 
void TalkHomeMemeber (string id)
 
void TalkMaid (string id)
 
override void OnRightClick ()
 
- Public Member Functions inherited from Layer
virtual string GetTextHeader (Window window)
 
virtual bool HeaderIsListOf (int id)
 
virtual void Init ()
 
virtual void OnInit ()
 
virtual void OnAfterInit ()
 
virtual void ApplySkin ()
 
void ShowScreenLock (string id)
 
void UpdateInput ()
 
virtual void OnUpdateInput ()
 
virtual void OnRightClick ()
 
virtual bool OnBack ()
 
virtual void OnChangeLayer ()
 
virtual void OnCreate ()
 
void _AddLayer (string id)
 
Layer AddLayer (string id)
 
AddLayer< T > ()
 
AddLayer< T > (string id)
 
AddLayerDontCloseOthers< T > ()
 
Layer AddLayerDontCloseOthers (Layer l)
 
GetOrAddLayer< T > ()
 
virtual void OnBeforeAddLayer ()
 
virtual void OnAfterAddLayer ()
 
Layer AddLayer (Layer l)
 
void ToggleLayer (string id)
 
ToggleLayer< T > (string id=null)
 
void WaitAndClose ()
 
void OnClickClose ()
 
virtual void Close ()
 
void CloseLayers ()
 
void RemoveLayers (bool removeImportant=false)
 
bool RemoveLayer< T > ()
 
void RemoveLayer (Layer l)
 
virtual void OnKill ()
 
Layer SetOnKill (Action action)
 
void DisableClose ()
 
void Delay (float duration=0.05f)
 
Layer SetDelay (float d)
 
Layer GetLayer (string id)
 
GetLayer< T > (bool fromTop=false)
 
Layer GetTopLayer ()
 
void SwitchContent (int idWindow, int i)
 
virtual void OnSwitchContent (Window window)
 
Layer SetTitles (string langList, string idHeaderRow=null)
 
bool IsBlockWidgetClick ()
 
bool IsHideHud ()
 
bool IsAllowGeneralInput ()
 
bool IsUseBlur ()
 
bool IsPointerOnLayer ()
 
void ApplySkin ()
 

Public Attributes

UIMapPreview mapPreview
 
GameObject goTop
 
GameObject goPreviewMap
 
GameObject goMembers
 
GameObject goMap
 
UICharaMaker maker
 
UIMapSelector selector
 
UIList listMembers
 
InputField inputHomeName
 
InputField inputPlayerAlias
 
InputField inputSupplyType
 
InputField inputRegion
 
InputField inputEra
 
InputField inputPlayerName
 
UICardInfo cardInfo
 
UIButton buttonRerollSupply
 
UIButton toggleSkipQuests
 
UIButton buttonEmbark
 
UISelectableGroup groupGameMode
 
RectTransform mapHolder1
 
RectTransform mapHolder2
 
Mode mode
 
Mode lastMode
 
EmbarkActor moldActor
 
GridLayoutGroup gridPreview
 
UIMapPreview moldPreview
 
List< UIMapPreviewpreviews
 
- Public Attributes inherited from Layer
Option option
 
UnityEvent onKill
 
Anime animeIn
 
Anime animeOut
 
bool closeOthers
 
bool defaultActionMode = true
 
Button screenLock
 
Layer parent
 
string idLayer
 
List< Layerlayers = new List<Layer>()
 
Vector2 lastParentPos
 
List< Windowwindows = new List<Window>()
 
string langHint
 

Static Public Attributes

static LayerEmbark Instance
 
- Static Public Attributes inherited from Layer
static int skipInput
 
static bool closeOnRightClick
 
static bool rightClicked
 
static bool cancelKeyDown
 
static bool ignoreSounds
 
static Transform blurStopInstance
 
static string[] searchPath = new string[3] { "Layer", "Layer/Dialog", "Layer/LayerHome" }
 

Properties

GameBlueprint bp [get]
 
LayerTitle title [get]
 
- Properties inherited from ELayer
static Core core [get]
 
static Game game [get]
 
static bool AdvMode [get]
 
static Player player [get]
 
static Chara pc [get]
 
static FactionBranch Branch [get]
 
static Faction Home [get]
 
static UI ui [get]
 
static Map _map [get]
 
static Zone _zone [get]
 
static Scene scene [get]
 
static BaseGameScreen screen [get]
 
static CoreConfig config [get]
 
static GameSetting setting [get]
 
static ColorProfile Colors [get]
 
static SourceManager sources [get]
 
static World world [get]
 
static SoundManager Sound [get]
 
static CoreDebug debug [get]
 
bool IsFloat [get]
 
virtual string IdHelp [get]
 
- Properties inherited from Layer
Layer TopLayer [get]
 
string uid [get]
 
virtual RectTransform rectLayers [get]
 
virtual bool blockWidgetClick [get]
 

Private Member Functions

void Update ()
 

Private Attributes

bool firstPreview = true
 

Additional Inherited Members

- Static Public Member Functions inherited from ELayer
static int rnd (int a)
 
- Static Public Member Functions inherited from Layer
static T Create< T > ()
 
static T Create< T > (string path)
 
static Layer Create (string path)
 
- Protected Member Functions inherited from ELayer
sealed override void _Close ()
 
sealed override void Kill ()
 
- Protected Member Functions inherited from Layer
virtual void Awake ()
 
virtual void _Close ()
 
virtual void Kill ()
 
- Protected Attributes inherited from Layer
RectTransform _rect
 
bool isDestroyed
 

Detailed Description

Definition at line 5 of file LayerEmbark.cs.

Member Enumeration Documentation

◆ Mode

Enumerator
top 
previewMap 
member 
map 

Definition at line 7 of file LayerEmbark.cs.

Member Function Documentation

◆ GetAlias()

string LayerEmbark.GetAlias ( )
inline

Definition at line 256 of file LayerEmbark.cs.

257 {
258 if (ELayer.rnd(4) == 0)
259 {
260 return ELayer.player.title;
261 }
262 return bp.charas.RandomItem().Name;
263 }
Definition: ELayer.cs:4
static Player player
Definition: ELayer.cs:13
static int rnd(int a)
Definition: ELayer.cs:49
GameBlueprint bp
Definition: LayerEmbark.cs:73
string title
Definition: Player.cs:805
List< Chara > charas

References bp, ZoneBlueprint.charas, ELayer.player, ELayer.rnd(), and Player.title.

◆ ListPlayerAlias()

void LayerEmbark.ListPlayerAlias ( )
inline

Definition at line 280 of file LayerEmbark.cs.

281 {
282 ELayer.ui.AddLayer<LayerList>().SetStringList(() => WordGen.GetList("title"), delegate(int a, string b)
283 {
284 ELayer.player.title = b;
285 });
286 }
static UI ui
Definition: ELayer.cs:21

References ELayer.ui.

◆ OnAfterAddLayer()

override void LayerEmbark.OnAfterAddLayer ( )
inlinevirtual

Reimplemented from ELayer.

Definition at line 77 of file LayerEmbark.cs.

78 {
79 Instance = this;
80 if (ELayer.game == null)
81 {
82 Game.Create();
83 }
84 if (bp.map != null)
85 {
87 }
88 if (!LayerTitle.actor)
89 {
90 LayerTitle.actor = Util.Instantiate(moldActor);
91 }
93 SwitchMode(Mode.top);
94 ELayer.ui.AddLayer<LayerEditBio>();
95 }
static Game game
Definition: ELayer.cs:9
Definition: Game.cs:8
static void Create(string _id=null, bool cloud=false)
Definition: Game.cs:693
UIMapPreview mapPreview
Definition: LayerEmbark.cs:17
void RefreshMembers()
Definition: LayerEmbark.cs:213
EmbarkActor moldActor
Definition: LayerEmbark.cs:63
static LayerEmbark Instance
Definition: LayerEmbark.cs:15
void SwitchMode(int i)
Definition: LayerEmbark.cs:106
static EmbarkActor actor
Definition: LayerTitle.cs:25
void SetMap(Map _map)
Definition: Util.cs:10
static Transform Instantiate(string path, Component parent=null)
Definition: Util.cs:67

References LayerTitle.actor, bp, Game.Create(), ELayer.game, Instance, ZoneBlueprint.map, mapPreview, moldActor, RefreshMembers(), UIMapPreview.SetMap(), SwitchMode(), ELayer.ui, and Util.

◆ OnBack()

override bool LayerEmbark.OnBack ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 151 of file LayerEmbark.cs.

152 {
153 if (mode == Mode.map)
154 {
155 return false;
156 }
157 if (mode != 0)
158 {
159 SwitchMode(Mode.top);
160 return false;
161 }
162 return base.OnBack();
163 }

References mode, and SwitchMode().

◆ OnClickBack()

void LayerEmbark.OnClickBack ( )
inline

Definition at line 97 of file LayerEmbark.cs.

98 {
99 if (mode == Mode.previewMap && lastMode != Mode.map)
100 {
101 SE.Click();
102 }
103 SwitchMode(Mode.top);
104 }
Mode lastMode
Definition: LayerEmbark.cs:61

References lastMode, mode, and SwitchMode().

◆ OnClickPreview()

void LayerEmbark.OnClickPreview ( UIMapPreview  preview)
inline

Definition at line 205 of file LayerEmbark.cs.

206 {
207 bp.map = preview.map;
208 bp.genSetting = preview.thread.bp.genSetting;
210 SwitchMode(Mode.top);
211 }
GenThread thread
Definition: UIMapPreview.cs:86
MapGenSetting genSetting

References bp, UIMapPreview.GenThread.bp, ZoneBlueprint.genSetting, UIMapPreview.map, ZoneBlueprint.map, mapPreview, UIMapPreview.SetMap(), SwitchMode(), and UIMapPreview.thread.

◆ OnEndEditPlayerName()

void LayerEmbark.OnEndEditPlayerName ( )
inline

Definition at line 275 of file LayerEmbark.cs.

276 {
277 ELayer.player.chara.c_altName = inputPlayerName.text;
278 }
InputField inputPlayerName
Definition: LayerEmbark.cs:43

References inputPlayerName.

◆ OnKill()

override void LayerEmbark.OnKill ( )
inlinevirtual

Reimplemented from Layer.

Definition at line 173 of file LayerEmbark.cs.

174 {
175 }

◆ RefreshMembers()

void LayerEmbark.RefreshMembers ( )
inline

Definition at line 213 of file LayerEmbark.cs.

214 {
216 listMembers.callbacks = new UIList.Callback<Chara, ButtonChara>
217 {
218 onInstantiate = delegate(Chara a, ButtonChara b)
219 {
220 b.SetChara(a, ButtonChara.Mode.Embark);
222 b.item.button2.SetActive(a == ELayer.player.chara);
223 b.item.button1.SetActive(a == ELayer.player.chara);
224 b.item.button1.onClick.AddListener(delegate
225 {
226 ELayer.ui.AddLayer<LayerEditBio>().SetChara(null, delegate
227 {
229 });
230 });
231 }
232 };
233 foreach (Chara chara in bp.charas)
234 {
235 if (chara.IsPCC)
236 {
237 listMembers.Add(chara);
238 }
239 }
241 }
new UIItem item
Definition: ButtonChara.cs:29
void SetChara(Chara c, Mode m)
Definition: ButtonChara.cs:35
ElementContainerCard elements
Definition: Card.cs:37
Definition: Chara.cs:10
override bool IsPCC
Definition: Chara.cs:667
List< Element > ListBestSkills()
UIList listMembers
Definition: LayerEmbark.cs:31
Chara chara
Definition: Player.cs:1004
UIButton button1
Definition: UIItem.cs:18
UIButton button2
Definition: UIItem.cs:20
Definition: UIList.cs:9
override void Clear()
Definition: UIList.cs:349
override void Add(object item)
Definition: UIList.cs:302
virtual void Refresh(bool highlightLast=false)
Definition: UIList.cs:424

References UIList.Add(), bp, UIItem.button1, UIItem.button2, Player.chara, ZoneBlueprint.charas, UIList.Clear(), Card.elements, Chara.IsPCC, ButtonChara.item, ElementContainer.ListBestSkills(), listMembers, ELayer.player, UIList.Refresh(), RefreshMembers(), ButtonChara.SetChara(), and ELayer.ui.

Referenced by OnAfterAddLayer(), RefreshMembers(), RerollMembers(), and SwitchMode().

◆ RerollMembers()

void LayerEmbark.RerollMembers ( )
inline

Definition at line 250 of file LayerEmbark.cs.

251 {
252 bp.RerollChara();
254 }
void RerollChara()
Definition: GameBlueprint.cs:8

References bp, RefreshMembers(), and GameBlueprint.RerollChara().

◆ RerollPC()

void LayerEmbark.RerollPC ( )
inline

Definition at line 243 of file LayerEmbark.cs.

244 {
245 bp.charas.Remove(ELayer.player.chara);
246 bp.charas.Insert(0, ELayer.player.chara);
247 (listMembers.buttons[0].component as ButtonChara).SetChara(ELayer.player.chara, ButtonChara.Mode.Embark);
248 }
List< ButtonPair > buttons
Definition: UIList.cs:244

References bp, UIList.buttons, Player.chara, ZoneBlueprint.charas, listMembers, and ELayer.player.

◆ RerollPlayerAlias()

void LayerEmbark.RerollPlayerAlias ( )
inline

Definition at line 265 of file LayerEmbark.cs.

266 {
267 ELayer.player.title = WordGen.Get("title");
268 }

◆ RerollPlayerName()

void LayerEmbark.RerollPlayerName ( )
inline

Definition at line 270 of file LayerEmbark.cs.

271 {
272 ELayer.player.chara.c_altName = NameGen.getRandomName();
273 }

◆ RerollPreviewMap()

void LayerEmbark.RerollPreviewMap ( )
inline

Definition at line 177 of file LayerEmbark.cs.

178 {
179 if (firstPreview)
180 {
181 for (int i = 0; i < 8; i++)
182 {
184 previews.Add(p);
185 p.button.onClick.AddListener(delegate
186 {
187 if (!p.thread.done)
188 {
189 SE.Beep();
190 }
191 else
192 {
193 OnClickPreview(p);
194 }
195 });
196 }
197 firstPreview = false;
198 }
199 foreach (UIMapPreview preview in previews)
200 {
201 preview.GenerateMap(bp);
202 }
203 }
UIMapPreview moldPreview
Definition: LayerEmbark.cs:67
List< UIMapPreview > previews
Definition: LayerEmbark.cs:69
bool firstPreview
Definition: LayerEmbark.cs:71
GridLayoutGroup gridPreview
Definition: LayerEmbark.cs:65
void GenerateMap(ZoneBlueprint bp)
UIButton button
Definition: UIMapPreview.cs:57

References bp, UIMapPreview.button, UIMapPreview.GenThread.done, firstPreview, UIMapPreview.GenerateMap(), gridPreview, moldPreview, previews, UIMapPreview.thread, and Util.

Referenced by SwitchMode().

◆ SwitchMode() [1/2]

void LayerEmbark.SwitchMode ( int  i)
inline

Definition at line 106 of file LayerEmbark.cs.

107 {
108 SwitchMode(i.ToEnum<Mode>());
109 }

References SwitchMode().

Referenced by OnAfterAddLayer(), OnBack(), OnClickBack(), OnClickPreview(), and SwitchMode().

◆ SwitchMode() [2/2]

void LayerEmbark.SwitchMode ( Mode  _mode)
inline

Definition at line 111 of file LayerEmbark.cs.

112 {
113 bool flag = lastMode == Mode.map;
114 if (_mode == Mode.top && mode == Mode.previewMap && flag)
115 {
116 _mode = Mode.map;
117 }
118 lastMode = mode;
119 mode = _mode;
120 goPreviewMap.SetActive(mode == Mode.previewMap);
121 goTop.SetActive(mode == Mode.top);
122 goMembers.SetActive(mode == Mode.member);
123 buttonEmbark.SetActive(mode == Mode.top);
124 goMap.SetActive(mode == Mode.map);
125 switch (mode)
126 {
127 case Mode.top:
128 mapPreview.transform.SetParent(mapHolder1, worldPositionStays: false);
129 ELayer.ui.hud.hint.Show("hintEmbarkTop".lang(), icon: false);
131 break;
132 case Mode.previewMap:
133 SE.Play("click_paper");
134 ELayer.ui.hud.hint.Show("hintEmbarkPreview".lang(), icon: false);
136 break;
137 case Mode.member:
138 ELayer.ui.AddLayer<LayerEditBio>().SetChara(null, delegate
139 {
141 SwitchMode(Mode.top);
142 });
143 break;
144 case Mode.map:
145 mapPreview.transform.SetParent(mapHolder2, worldPositionStays: false);
146 ELayer.ui.hud.hint.Show("hintEmbarkMap".lang(), icon: false);
147 break;
148 }
149 }
void RerollPreviewMap()
Definition: LayerEmbark.cs:177
RectTransform mapHolder1
Definition: LayerEmbark.cs:55
UIMapSelector selector
Definition: LayerEmbark.cs:29
GameObject goMap
Definition: LayerEmbark.cs:25
GameObject goMembers
Definition: LayerEmbark.cs:23
GameObject goPreviewMap
Definition: LayerEmbark.cs:21
GameObject goTop
Definition: LayerEmbark.cs:19
UIButton buttonEmbark
Definition: LayerEmbark.cs:51
RectTransform mapHolder2
Definition: LayerEmbark.cs:57
Zone zone
Definition: Player.cs:883
void WriteNote(Zone z)

References buttonEmbark, goMap, goMembers, goPreviewMap, goTop, lastMode, mapHolder1, mapHolder2, mapPreview, mode, ELayer.player, RefreshMembers(), RerollPreviewMap(), selector, SwitchMode(), ELayer.ui, UIMapSelector.WriteNote(), and Player.zone.

◆ Update()

void LayerEmbark.Update ( )
inlineprivate

Definition at line 165 of file LayerEmbark.cs.

166 {
167 if (mode == Mode.map)
168 {
170 }
171 }
static AM_Title Title
Definition: ActionMode.cs:9
void InputMovement()
Definition: ActionMode.cs:934

References ActionMode.InputMovement(), mode, and ActionMode.Title.

Member Data Documentation

◆ buttonEmbark

UIButton LayerEmbark.buttonEmbark

Definition at line 51 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ buttonRerollSupply

UIButton LayerEmbark.buttonRerollSupply

Definition at line 47 of file LayerEmbark.cs.

◆ cardInfo

UICardInfo LayerEmbark.cardInfo

Definition at line 45 of file LayerEmbark.cs.

◆ firstPreview

bool LayerEmbark.firstPreview = true
private

Definition at line 71 of file LayerEmbark.cs.

Referenced by RerollPreviewMap().

◆ goMap

GameObject LayerEmbark.goMap

Definition at line 25 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ goMembers

GameObject LayerEmbark.goMembers

Definition at line 23 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ goPreviewMap

GameObject LayerEmbark.goPreviewMap

Definition at line 21 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ goTop

GameObject LayerEmbark.goTop

Definition at line 19 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ gridPreview

GridLayoutGroup LayerEmbark.gridPreview

Definition at line 65 of file LayerEmbark.cs.

Referenced by RerollPreviewMap().

◆ groupGameMode

UISelectableGroup LayerEmbark.groupGameMode

Definition at line 53 of file LayerEmbark.cs.

◆ inputEra

InputField LayerEmbark.inputEra

Definition at line 41 of file LayerEmbark.cs.

◆ inputHomeName

InputField LayerEmbark.inputHomeName

Definition at line 33 of file LayerEmbark.cs.

◆ inputPlayerAlias

InputField LayerEmbark.inputPlayerAlias

Definition at line 35 of file LayerEmbark.cs.

◆ inputPlayerName

InputField LayerEmbark.inputPlayerName

Definition at line 43 of file LayerEmbark.cs.

Referenced by OnEndEditPlayerName().

◆ inputRegion

InputField LayerEmbark.inputRegion

Definition at line 39 of file LayerEmbark.cs.

◆ inputSupplyType

InputField LayerEmbark.inputSupplyType

Definition at line 37 of file LayerEmbark.cs.

◆ Instance

LayerEmbark LayerEmbark.Instance
static

Definition at line 15 of file LayerEmbark.cs.

Referenced by OnAfterAddLayer().

◆ lastMode

Mode LayerEmbark.lastMode

Definition at line 61 of file LayerEmbark.cs.

Referenced by OnClickBack(), and SwitchMode().

◆ listMembers

UIList LayerEmbark.listMembers

Definition at line 31 of file LayerEmbark.cs.

Referenced by RefreshMembers(), and RerollPC().

◆ maker

UICharaMaker LayerEmbark.maker

Definition at line 27 of file LayerEmbark.cs.

◆ mapHolder1

RectTransform LayerEmbark.mapHolder1

Definition at line 55 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ mapHolder2

RectTransform LayerEmbark.mapHolder2

Definition at line 57 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ mapPreview

UIMapPreview LayerEmbark.mapPreview

Definition at line 17 of file LayerEmbark.cs.

Referenced by OnAfterAddLayer(), OnClickPreview(), and SwitchMode().

◆ mode

Mode LayerEmbark.mode

Definition at line 59 of file LayerEmbark.cs.

Referenced by OnBack(), OnClickBack(), SwitchMode(), and Update().

◆ moldActor

EmbarkActor LayerEmbark.moldActor

Definition at line 63 of file LayerEmbark.cs.

Referenced by OnAfterAddLayer().

◆ moldPreview

UIMapPreview LayerEmbark.moldPreview

Definition at line 67 of file LayerEmbark.cs.

Referenced by RerollPreviewMap().

◆ previews

List<UIMapPreview> LayerEmbark.previews

Definition at line 69 of file LayerEmbark.cs.

Referenced by RerollPreviewMap().

◆ selector

UIMapSelector LayerEmbark.selector

Definition at line 29 of file LayerEmbark.cs.

Referenced by SwitchMode().

◆ toggleSkipQuests

UIButton LayerEmbark.toggleSkipQuests

Definition at line 49 of file LayerEmbark.cs.

Property Documentation

◆ bp

◆ title

LayerTitle LayerEmbark.title
get

Definition at line 75 of file LayerEmbark.cs.


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