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

Public Member Functions

void OnCreateGame ()
 
void OnEnableDebug ()
 
void OnBuild (Recipe r)
 
bool IsStoryPlayed (int flag)
 
int GetStoryRowID (string idBook, string idStep)
 
Dictionary< string, string > GetStoryRow (string idBook, int id)
 
ExcelData GetStoryExcelData (string idBook)
 
bool PlayStory (string idBook, int id, bool fromBook=false)
 
bool PlayStory (int id, bool fromBook=false)
 
void AddStory (int id)
 
void OnEnterZone ()
 
void OnLeaveZone ()
 

Public Attributes

int[] ints = new int[50]
 
List< int > playedStories = new List<int>()
 
List< int > availableStories = new List<int>()
 
HashSet< int > pleaseDontTouch = new HashSet<int>()
 
List< string > reservedTutorial = new List<string>()
 
BitArray32 bits
 
Dictionary< string, ExcelDatastoryExcel = new Dictionary<string, ExcelData>()
 

Static Public Attributes

const int MonoDeparture = 100
 
- Static Public Attributes inherited from EClass
static Core core
 

Properties

bool gotClickReward [get, set]
 
bool welcome [get, set]
 
bool fiamaStoryBookGiven [get, set]
 
bool fiamaFirstDream [get, set]
 
bool helpHighlightDisabled [get, set]
 
bool pickedMelilithTreasure [get, set]
 
bool isShoesOff [get, set]
 
bool backpackHighlightDisabled [get, set]
 
bool abilityHighlightDisabled [get, set]
 
bool elinGift [get, set]
 
bool gotMelilithCurse [get, set]
 
bool canComupWithFoodRecipe [get, set]
 
bool KilledBossInVoid [get, set]
 
bool statueShipped [get, set]
 
bool little_saved [get, set]
 
bool little_killed [get, set]
 
bool gotEtherDisease [get, set]
 
bool loytelEscaped [get, set]
 
bool toggleHotbarHighlightDisabled [get, set]
 
bool debugEnabled [get, set]
 
bool magicChestSent [get, set]
 
bool toggleHotbarHighlightActivated [get, set]
 
bool gotJurePillow [get, set]
 
int start [get, set]
 
int build [get, set]
 
int main [get, set]
 
int storyFiama [get, set]
 
int lutz [get, set]
 
int daysAfterQuestExploration [get, set]
 
int landDeedBought [get, set]
 
int loytelMartLv [get, 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]
 

Private Member Functions

void _OnSerializing (StreamingContext context)
 
void _OnDeserialized (StreamingContext context)
 

Additional Inherited Members

- 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)
 

Detailed Description

Definition at line 138 of file Player.cs.

Member Function Documentation

◆ _OnDeserialized()

void Player.Flags._OnDeserialized ( StreamingContext  context)
inlineprivate

Definition at line 540 of file Player.cs.

541 {
542 bits.Bits = (uint)ints[0];
543 }
int[] ints
Definition: Player.cs:143

References Player.Flags.ints.

◆ _OnSerializing()

void Player.Flags._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 534 of file Player.cs.

535 {
536 ints[0] = (int)bits.Bits;
537 }
BitArray32 bits
Definition: Player.cs:157
uint Bits
Definition: BitArray32.cs:6

References Player.Flags.bits, BitArray32.Bits, and Player.Flags.ints.

◆ AddStory()

void Player.Flags.AddStory ( int  id)
inline

Definition at line 625 of file Player.cs.

626 {
627 if (!playedStories.Contains(id) && !availableStories.Contains(id))
628 {
629 availableStories.Add(id);
630 Msg.Say("story_added");
631 SE.WriteJournal();
632 }
633 }
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
List< int > availableStories
Definition: Player.cs:149
List< int > playedStories
Definition: Player.cs:146

References Player.Flags.availableStories, Player.Flags.playedStories, and Msg.Say().

Referenced by Player.Flags.OnEnterZone().

◆ GetStoryExcelData()

ExcelData Player.Flags.GetStoryExcelData ( string  idBook)
inline

Definition at line 590 of file Player.cs.

591 {
592 ExcelData excelData = storyExcel.TryGetValue(idBook);
593 if (excelData == null)
594 {
595 excelData = new ExcelData();
596 excelData.path = CorePath.DramaData + idBook + ".xlsx";
597 excelData.BuildList("index");
598 storyExcel.Add(idBook, excelData);
599 }
600 return excelData;
601 }
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Dictionary< string, ExcelData > storyExcel
Definition: Player.cs:159

References ExcelData.BuildList(), and Player.Flags.storyExcel.

Referenced by Player.Flags.GetStoryRow(), and Player.Flags.GetStoryRowID().

◆ GetStoryRow()

Dictionary< string, string > Player.Flags.GetStoryRow ( string  idBook,
int  id 
)
inline

Definition at line 578 of file Player.cs.

579 {
580 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
581 {
582 if (item["id"].ToInt() == id)
583 {
584 return item;
585 }
586 }
587 return null;
588 }
ExcelData GetStoryExcelData(string idBook)
Definition: Player.cs:590

References Player.Flags.GetStoryExcelData(), and item.

Referenced by Player.Flags.PlayStory().

◆ GetStoryRowID()

int Player.Flags.GetStoryRowID ( string  idBook,
string  idStep 
)
inline

Definition at line 566 of file Player.cs.

567 {
568 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
569 {
570 if (item["step"] == idStep)
571 {
572 return item["id"].ToInt();
573 }
574 }
575 return 0;
576 }

References Player.Flags.GetStoryExcelData(), and item.

Referenced by Tutorial.Play(), Tutorial.Remove(), and Tutorial.Reserve().

◆ IsStoryPlayed()

bool Player.Flags.IsStoryPlayed ( int  flag)
inline

Definition at line 561 of file Player.cs.

562 {
563 return playedStories.Contains(flag);
564 }

References Player.Flags.playedStories.

Referenced by TraitStoryBook.OnRead().

◆ OnBuild()

void Player.Flags.OnBuild ( Recipe  r)
inline

Definition at line 553 of file Player.cs.

554 {
555 if (build == 0 && r.id == "workbench")
556 {
557 build = 1;
558 }
559 }
int build
Definition: Player.cs:450
string id
Definition: Recipe.cs:161

References Player.Flags.build, and Recipe.id.

Referenced by TaskBuild.OnProgressComplete().

◆ OnCreateGame()

void Player.Flags.OnCreateGame ( )
inline

Definition at line 545 of file Player.cs.

546 {
547 }

Referenced by Player.OnCreateGame().

◆ OnEnableDebug()

void Player.Flags.OnEnableDebug ( )
inline

Definition at line 549 of file Player.cs.

550 {
551 }

Referenced by CoreDebug.EnableDebugResource(), and CoreDebug.QuickStart().

◆ OnEnterZone()

void Player.Flags.OnEnterZone ( )
inline

Definition at line 635 of file Player.cs.

636 {
637 if (EClass._zone.id == "nymelle")
638 {
639 if (EClass._zone.lv == -1)
640 {
641 AddStory(10);
642 }
643 if (EClass._zone.lv == -2)
644 {
645 AddStory(20);
646 }
647 if (EClass._zone.lv == -3)
648 {
649 AddStory(30);
650 }
651 }
652 if (QuestMain.Phase == 700 && EClass._zone.id == "lothria")
653 {
654 PlayStory(50);
655 }
657 {
659 availableStories.RemoveAt(0);
660 }
661 }
Definition: EClass.cs:5
static Game game
Definition: EClass.cs:8
static Zone _zone
Definition: EClass.cs:20
Prologue Prologue
Definition: Game.cs:257
bool PlayStory(string idBook, int id, bool fromBook=false)
Definition: Player.cs:603
void AddStory(int id)
Definition: Player.cs:625
string idStartZone
Definition: Prologue.cs:7
static int Phase
Definition: QuestMain.cs:23
int lv
Definition: Spatial.cs:142
string id
Definition: Spatial.cs:13
bool IsPCFaction
Definition: Zone.cs:464

References EClass._zone, Player.Flags.AddStory(), Player.Flags.availableStories, EClass.game, Spatial.id, Prologue.idStartZone, Zone.IsPCFaction, Spatial.lv, QuestMain.Phase, Player.Flags.PlayStory(), and Game.Prologue.

Referenced by Scene.Init().

◆ OnLeaveZone()

void Player.Flags.OnLeaveZone ( )
inline

Definition at line 663 of file Player.cs.

664 {
665 if (QuestMain.Phase == 700)
666 {
667 PlayStory(40);
668 }
669 }

References QuestMain.Phase, and Player.Flags.PlayStory().

Referenced by Scene.OnUpdate().

◆ PlayStory() [1/2]

bool Player.Flags.PlayStory ( int  id,
bool  fromBook = false 
)
inline

Definition at line 620 of file Player.cs.

621 {
622 return PlayStory("_main", id, fromBook);
623 }

References Player.Flags.PlayStory().

◆ PlayStory() [2/2]

bool Player.Flags.PlayStory ( string  idBook,
int  id,
bool  fromBook = false 
)
inline

Definition at line 603 of file Player.cs.

604 {
605 if (!fromBook && playedStories.Contains(id))
606 {
607 return false;
608 }
609 Dictionary<string, string> storyRow = GetStoryRow(idBook, id);
610 SoundManager.ForceBGM();
611 LayerDrama.fromBook = fromBook;
612 LayerDrama.Activate(idBook, storyRow["sheet"], storyRow["step"]);
613 if (!fromBook && !playedStories.Contains(id))
614 {
615 playedStories.Add(id);
616 }
617 return true;
618 }
static LayerDrama Activate(string book, string idSheet, string idStep, Chara target=null, Card ref1=null, string tag="")
Definition: LayerDrama.cs:66
Dictionary< string, string > GetStoryRow(string idBook, int id)
Definition: Player.cs:578

References LayerDrama.Activate(), Player.Flags.GetStoryRow(), and Player.Flags.playedStories.

Referenced by Player.Flags.OnEnterZone(), Player.Flags.OnLeaveZone(), TraitStoryBook.OnRead(), Tutorial.Play(), and Player.Flags.PlayStory().

Member Data Documentation

◆ availableStories

List<int> Player.Flags.availableStories = new List<int>()

Definition at line 149 of file Player.cs.

Referenced by Player.Flags.AddStory(), and Player.Flags.OnEnterZone().

◆ bits

BitArray32 Player.Flags.bits

Definition at line 157 of file Player.cs.

Referenced by Player.Flags._OnSerializing().

◆ ints

int [] Player.Flags.ints = new int[50]

Definition at line 143 of file Player.cs.

Referenced by Player.Flags._OnDeserialized(), and Player.Flags._OnSerializing().

◆ MonoDeparture

const int Player.Flags.MonoDeparture = 100
static

Definition at line 140 of file Player.cs.

◆ playedStories

List<int> Player.Flags.playedStories = new List<int>()

◆ pleaseDontTouch

HashSet<int> Player.Flags.pleaseDontTouch = new HashSet<int>()

Definition at line 152 of file Player.cs.

◆ reservedTutorial

List<string> Player.Flags.reservedTutorial = new List<string>()

Definition at line 155 of file Player.cs.

Referenced by Tutorial.Reserve(), and Tutorial.TryPlayReserve().

◆ storyExcel

Dictionary<string, ExcelData> Player.Flags.storyExcel = new Dictionary<string, ExcelData>()

Definition at line 159 of file Player.cs.

Referenced by Player.Flags.GetStoryExcelData().

Property Documentation

◆ abilityHighlightDisabled

bool Player.Flags.abilityHighlightDisabled
getset

Definition at line 257 of file Player.cs.

258 {
259 get
260 {
261 return bits[9];
262 }
263 set
264 {
265 bits[9] = value;
266 }
267 }

Referenced by HotItemLayer.OnClick(), and HotItemLayer.OnSetItem().

◆ backpackHighlightDisabled

bool Player.Flags.backpackHighlightDisabled
getset

Definition at line 245 of file Player.cs.

246 {
247 get
248 {
249 return bits[8];
250 }
251 set
252 {
253 bits[8] = value;
254 }
255 }

Referenced by HotItemLayer.OnClick(), and HotItemLayer.OnSetItem().

◆ build

int Player.Flags.build
getset

Definition at line 449 of file Player.cs.

450 {
451 get
452 {
453 return ints[11];
454 }
455 set
456 {
457 ints[11] = value;
458 }
459 }

Referenced by Player.Flags.OnBuild().

◆ canComupWithFoodRecipe

bool Player.Flags.canComupWithFoodRecipe
getset

Definition at line 293 of file Player.cs.

294 {
295 get
296 {
297 return bits[12];
298 }
299 set
300 {
301 bits[12] = value;
302 }
303 }

Referenced by RecipeCard.Craft().

◆ daysAfterQuestExploration

int Player.Flags.daysAfterQuestExploration
getset

Definition at line 497 of file Player.cs.

498 {
499 get
500 {
501 return ints[16];
502 }
503 set
504 {
505 ints[16] = value;
506 }
507 }

Referenced by GameDate.AdvanceDay().

◆ debugEnabled

bool Player.Flags.debugEnabled
getset

Definition at line 389 of file Player.cs.

390 {
391 get
392 {
393 return bits[20];
394 }
395 set
396 {
397 bits[20] = value;
398 }
399 }

Referenced by UI.ToggleFeedback().

◆ elinGift

bool Player.Flags.elinGift
getset

Definition at line 269 of file Player.cs.

270 {
271 get
272 {
273 return bits[10];
274 }
275 set
276 {
277 bits[10] = value;
278 }
279 }

Referenced by FactionBranch.ReceivePackages().

◆ fiamaFirstDream

bool Player.Flags.fiamaFirstDream
getset

Definition at line 197 of file Player.cs.

198 {
199 get
200 {
201 return bits[4];
202 }
203 set
204 {
205 bits[4] = value;
206 }
207 }

Referenced by Chara.ShowDialog().

◆ fiamaStoryBookGiven

bool Player.Flags.fiamaStoryBookGiven
getset

Definition at line 185 of file Player.cs.

186 {
187 get
188 {
189 return bits[3];
190 }
191 set
192 {
193 bits[3] = value;
194 }
195 }

Referenced by Chara.ShowDialog().

◆ gotClickReward

bool Player.Flags.gotClickReward
getset

Definition at line 161 of file Player.cs.

162 {
163 get
164 {
165 return bits[1];
166 }
167 set
168 {
169 bits[1] = value;
170 }
171 }

◆ gotEtherDisease

bool Player.Flags.gotEtherDisease
getset

Definition at line 353 of file Player.cs.

354 {
355 get
356 {
357 return bits[17];
358 }
359 set
360 {
361 bits[17] = value;
362 }
363 }

Referenced by Chara.MutateRandom().

◆ gotJurePillow

bool Player.Flags.gotJurePillow
getset

Definition at line 425 of file Player.cs.

426 {
427 get
428 {
429 return bits[30];
430 }
431 set
432 {
433 bits[30] = value;
434 }
435 }

Referenced by DramaOutcome.convert_Jure().

◆ gotMelilithCurse

bool Player.Flags.gotMelilithCurse
getset

Definition at line 281 of file Player.cs.

282 {
283 get
284 {
285 return bits[11];
286 }
287 set
288 {
289 bits[11] = value;
290 }
291 }

◆ helpHighlightDisabled

bool Player.Flags.helpHighlightDisabled
getset

Definition at line 209 of file Player.cs.

210 {
211 get
212 {
213 return bits[5];
214 }
215 set
216 {
217 bits[5] = value;
218 }
219 }

Referenced by HotItemLayer.OnClick(), and HotItemLayer.OnSetItem().

◆ isShoesOff

bool Player.Flags.isShoesOff
getset

Definition at line 233 of file Player.cs.

234 {
235 get
236 {
237 return bits[7];
238 }
239 set
240 {
241 bits[7] = value;
242 }
243 }

Referenced by Chara._Move().

◆ KilledBossInVoid

bool Player.Flags.KilledBossInVoid
getset

Definition at line 305 of file Player.cs.

306 {
307 get
308 {
309 return bits[13];
310 }
311 set
312 {
313 bits[13] = value;
314 }
315 }

Referenced by Chara.TryDropBossLoot().

◆ landDeedBought

int Player.Flags.landDeedBought
getset

Definition at line 509 of file Player.cs.

510 {
511 get
512 {
513 return ints[17];
514 }
515 set
516 {
517 ints[17] = value;
518 }
519 }

Referenced by Card.GetPrice().

◆ little_killed

bool Player.Flags.little_killed
getset

Definition at line 341 of file Player.cs.

342 {
343 get
344 {
345 return bits[16];
346 }
347 set
348 {
349 bits[16] = value;
350 }
351 }

Referenced by Chara.ShowDialog().

◆ little_saved

bool Player.Flags.little_saved
getset

Definition at line 329 of file Player.cs.

330 {
331 get
332 {
333 return bits[15];
334 }
335 set
336 {
337 bits[15] = value;
338 }
339 }

Referenced by Chara.ShowDialog().

◆ loytelEscaped

bool Player.Flags.loytelEscaped
getset

Definition at line 365 of file Player.cs.

366 {
367 get
368 {
369 return bits[18];
370 }
371 set
372 {
373 bits[18] = value;
374 }
375 }

Referenced by Chara.ShowDialog().

◆ loytelMartLv

int Player.Flags.loytelMartLv
getset

Definition at line 521 of file Player.cs.

522 {
523 get
524 {
525 return ints[18];
526 }
527 set
528 {
529 ints[18] = value;
530 }
531 }

Referenced by Trait.CreateStock(), and CoreDebug.UpdateInput().

◆ lutz

int Player.Flags.lutz
getset

Definition at line 485 of file Player.cs.

486 {
487 get
488 {
489 return ints[15];
490 }
491 set
492 {
493 ints[15] = value;
494 }
495 }

Referenced by GameDate.ShipLetter().

◆ magicChestSent

bool Player.Flags.magicChestSent
getset

Definition at line 401 of file Player.cs.

402 {
403 get
404 {
405 return bits[21];
406 }
407 set
408 {
409 bits[21] = value;
410 }
411 }

Referenced by GameDate.AdvanceDay().

◆ main

int Player.Flags.main
getset

Definition at line 461 of file Player.cs.

462 {
463 get
464 {
465 return ints[13];
466 }
467 set
468 {
469 ints[13] = value;
470 }
471 }

◆ pickedMelilithTreasure

bool Player.Flags.pickedMelilithTreasure
getset

Definition at line 221 of file Player.cs.

222 {
223 get
224 {
225 return bits[6];
226 }
227 set
228 {
229 bits[6] = value;
230 }
231 }

◆ start

int Player.Flags.start
getset

Definition at line 437 of file Player.cs.

438 {
439 get
440 {
441 return ints[10];
442 }
443 set
444 {
445 ints[10] = value;
446 }
447 }

◆ statueShipped

bool Player.Flags.statueShipped
getset

Definition at line 317 of file Player.cs.

318 {
319 get
320 {
321 return bits[14];
322 }
323 set
324 {
325 bits[14] = value;
326 }
327 }

Referenced by GameDate.ShipRandomPackages().

◆ storyFiama

int Player.Flags.storyFiama
getset

Definition at line 473 of file Player.cs.

474 {
475 get
476 {
477 return ints[14];
478 }
479 set
480 {
481 ints[14] = value;
482 }
483 }

Referenced by Chara.ShowDialog().

◆ toggleHotbarHighlightActivated

bool Player.Flags.toggleHotbarHighlightActivated
getset

Definition at line 413 of file Player.cs.

414 {
415 get
416 {
417 return bits[22];
418 }
419 set
420 {
421 bits[22] = value;
422 }
423 }

Referenced by InvOwnerHotbar.OnProcess().

◆ toggleHotbarHighlightDisabled

bool Player.Flags.toggleHotbarHighlightDisabled
getset

Definition at line 377 of file Player.cs.

378 {
379 get
380 {
381 return bits[19];
382 }
383 set
384 {
385 bits[19] = value;
386 }
387 }

Referenced by WidgetCurrentTool.OnActivate().

◆ welcome

bool Player.Flags.welcome
getset

Definition at line 173 of file Player.cs.

174 {
175 get
176 {
177 return bits[2];
178 }
179 set
180 {
181 bits[2] = value;
182 }
183 }

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