Elin Decompiled Documentation EA 23.167 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]
 
bool gotLoytelMart [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 rndSeed (int a, int seed)
 
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 242 of file Player.cs.

Member Function Documentation

◆ _OnDeserialized()

void Player.Flags._OnDeserialized ( StreamingContext  context)
inlineprivate

Definition at line 656 of file Player.cs.

657 {
658 bits.Bits = (uint)ints[0];
659 }
int[] ints
Definition: Player.cs:247

References Player.Flags.ints.

◆ _OnSerializing()

void Player.Flags._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 650 of file Player.cs.

651 {
652 ints[0] = (int)bits.Bits;
653 }
BitArray32 bits
Definition: Player.cs:261
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 741 of file Player.cs.

742 {
743 if (!playedStories.Contains(id) && !availableStories.Contains(id))
744 {
745 availableStories.Add(id);
746 Msg.Say("story_added");
747 SE.WriteJournal();
748 }
749 }
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:253
List< int > playedStories
Definition: Player.cs:250

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 706 of file Player.cs.

707 {
708 ExcelData excelData = storyExcel.TryGetValue(idBook);
709 if (excelData == null)
710 {
711 excelData = new ExcelData();
712 excelData.path = CorePath.DramaData + idBook + ".xlsx";
713 excelData.BuildList("index");
714 storyExcel.Add(idBook, excelData);
715 }
716 return excelData;
717 }
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Dictionary< string, ExcelData > storyExcel
Definition: Player.cs:263

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 694 of file Player.cs.

695 {
696 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
697 {
698 if (item["id"].ToInt() == id)
699 {
700 return item;
701 }
702 }
703 return null;
704 }
ExcelData GetStoryExcelData(string idBook)
Definition: Player.cs:706

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

Referenced by Player.Flags.PlayStory().

◆ GetStoryRowID()

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

Definition at line 682 of file Player.cs.

683 {
684 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
685 {
686 if (item["step"] == idStep)
687 {
688 return item["id"].ToInt();
689 }
690 }
691 return 0;
692 }

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 677 of file Player.cs.

678 {
679 return playedStories.Contains(flag);
680 }

References Player.Flags.playedStories.

Referenced by TraitStoryBook.OnRead().

◆ OnBuild()

void Player.Flags.OnBuild ( Recipe  r)
inline

Definition at line 669 of file Player.cs.

670 {
671 if (build == 0 && r.id == "workbench")
672 {
673 build = 1;
674 }
675 }
int build
Definition: Player.cs:566
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 661 of file Player.cs.

662 {
663 }

Referenced by Player.OnCreateGame().

◆ OnEnableDebug()

void Player.Flags.OnEnableDebug ( )
inline

Definition at line 665 of file Player.cs.

666 {
667 }

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

◆ OnEnterZone()

void Player.Flags.OnEnterZone ( )
inline

Definition at line 751 of file Player.cs.

752 {
753 if (EClass._zone.id == "nymelle")
754 {
755 if (EClass._zone.lv == -1)
756 {
757 AddStory(10);
758 }
759 if (EClass._zone.lv == -2)
760 {
761 AddStory(20);
762 }
763 if (EClass._zone.lv == -3)
764 {
765 AddStory(30);
766 }
767 }
768 if (QuestMain.Phase == 700 && EClass._zone.id == "lothria")
769 {
770 PlayStory(50);
771 }
773 {
775 availableStories.RemoveAt(0);
776 }
777 }
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:719
void AddStory(int id)
Definition: Player.cs:741
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:466

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 779 of file Player.cs.

780 {
781 if (QuestMain.Phase == 700)
782 {
783 PlayStory(40);
784 }
785 }

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 736 of file Player.cs.

737 {
738 return PlayStory("_main", id, fromBook);
739 }

References Player.Flags.PlayStory().

◆ PlayStory() [2/2]

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

Definition at line 719 of file Player.cs.

720 {
721 if (!fromBook && playedStories.Contains(id))
722 {
723 return false;
724 }
725 Dictionary<string, string> storyRow = GetStoryRow(idBook, id);
726 SoundManager.ForceBGM();
727 LayerDrama.fromBook = fromBook;
728 LayerDrama.Activate(idBook, storyRow["sheet"], storyRow["step"]);
729 if (!fromBook && !playedStories.Contains(id))
730 {
731 playedStories.Add(id);
732 }
733 return true;
734 }
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:694

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 253 of file Player.cs.

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

◆ bits

BitArray32 Player.Flags.bits

Definition at line 261 of file Player.cs.

Referenced by Player.Flags._OnSerializing().

◆ ints

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

Definition at line 247 of file Player.cs.

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

◆ MonoDeparture

const int Player.Flags.MonoDeparture = 100
static

Definition at line 244 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 256 of file Player.cs.

◆ reservedTutorial

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

Definition at line 259 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 263 of file Player.cs.

Referenced by Player.Flags.GetStoryExcelData().

Property Documentation

◆ abilityHighlightDisabled

bool Player.Flags.abilityHighlightDisabled
getset

Definition at line 361 of file Player.cs.

362 {
363 get
364 {
365 return bits[9];
366 }
367 set
368 {
369 bits[9] = value;
370 }
371 }

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

◆ backpackHighlightDisabled

bool Player.Flags.backpackHighlightDisabled
getset

Definition at line 349 of file Player.cs.

350 {
351 get
352 {
353 return bits[8];
354 }
355 set
356 {
357 bits[8] = value;
358 }
359 }

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

◆ build

int Player.Flags.build
getset

Definition at line 565 of file Player.cs.

566 {
567 get
568 {
569 return ints[11];
570 }
571 set
572 {
573 ints[11] = value;
574 }
575 }

Referenced by Player.Flags.OnBuild().

◆ canComupWithFoodRecipe

bool Player.Flags.canComupWithFoodRecipe
getset

Definition at line 397 of file Player.cs.

398 {
399 get
400 {
401 return bits[12];
402 }
403 set
404 {
405 bits[12] = value;
406 }
407 }

Referenced by RecipeCard.Craft().

◆ daysAfterQuestExploration

int Player.Flags.daysAfterQuestExploration
getset

Definition at line 613 of file Player.cs.

614 {
615 get
616 {
617 return ints[16];
618 }
619 set
620 {
621 ints[16] = value;
622 }
623 }

Referenced by GameDate.AdvanceDay().

◆ debugEnabled

bool Player.Flags.debugEnabled
getset

Definition at line 493 of file Player.cs.

494 {
495 get
496 {
497 return bits[20];
498 }
499 set
500 {
501 bits[20] = value;
502 }
503 }

Referenced by UI.ToggleFeedback().

◆ elinGift

bool Player.Flags.elinGift
getset

Definition at line 373 of file Player.cs.

374 {
375 get
376 {
377 return bits[10];
378 }
379 set
380 {
381 bits[10] = value;
382 }
383 }

Referenced by FactionBranch.ReceivePackages().

◆ fiamaFirstDream

bool Player.Flags.fiamaFirstDream
getset

Definition at line 301 of file Player.cs.

302 {
303 get
304 {
305 return bits[4];
306 }
307 set
308 {
309 bits[4] = value;
310 }
311 }

Referenced by Chara.ShowDialog().

◆ fiamaStoryBookGiven

bool Player.Flags.fiamaStoryBookGiven
getset

Definition at line 289 of file Player.cs.

290 {
291 get
292 {
293 return bits[3];
294 }
295 set
296 {
297 bits[3] = value;
298 }
299 }

Referenced by Chara.ShowDialog().

◆ gotClickReward

bool Player.Flags.gotClickReward
getset

Definition at line 265 of file Player.cs.

266 {
267 get
268 {
269 return bits[1];
270 }
271 set
272 {
273 bits[1] = value;
274 }
275 }

◆ gotEtherDisease

bool Player.Flags.gotEtherDisease
getset

Definition at line 457 of file Player.cs.

458 {
459 get
460 {
461 return bits[17];
462 }
463 set
464 {
465 bits[17] = value;
466 }
467 }

Referenced by Chara.MutateRandom().

◆ gotJurePillow

bool Player.Flags.gotJurePillow
getset

Definition at line 529 of file Player.cs.

530 {
531 get
532 {
533 return bits[30];
534 }
535 set
536 {
537 bits[30] = value;
538 }
539 }

Referenced by DramaOutcome.convert_Jure().

◆ gotLoytelMart

bool Player.Flags.gotLoytelMart
getset

Definition at line 541 of file Player.cs.

542 {
543 get
544 {
545 return bits[31];
546 }
547 set
548 {
549 bits[31] = value;
550 }
551 }

Referenced by QuestDebt.GiveReward().

◆ gotMelilithCurse

bool Player.Flags.gotMelilithCurse
getset

Definition at line 385 of file Player.cs.

386 {
387 get
388 {
389 return bits[11];
390 }
391 set
392 {
393 bits[11] = value;
394 }
395 }

◆ helpHighlightDisabled

bool Player.Flags.helpHighlightDisabled
getset

Definition at line 313 of file Player.cs.

314 {
315 get
316 {
317 return bits[5];
318 }
319 set
320 {
321 bits[5] = value;
322 }
323 }

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

◆ isShoesOff

bool Player.Flags.isShoesOff
getset

Definition at line 337 of file Player.cs.

338 {
339 get
340 {
341 return bits[7];
342 }
343 set
344 {
345 bits[7] = value;
346 }
347 }

Referenced by Chara._Move().

◆ KilledBossInVoid

bool Player.Flags.KilledBossInVoid
getset

Definition at line 409 of file Player.cs.

410 {
411 get
412 {
413 return bits[13];
414 }
415 set
416 {
417 bits[13] = value;
418 }
419 }

Referenced by Chara.TryDropBossLoot().

◆ landDeedBought

int Player.Flags.landDeedBought
getset

Definition at line 625 of file Player.cs.

626 {
627 get
628 {
629 return ints[17];
630 }
631 set
632 {
633 ints[17] = value;
634 }
635 }

Referenced by Card.GetPrice().

◆ little_killed

bool Player.Flags.little_killed
getset

Definition at line 445 of file Player.cs.

446 {
447 get
448 {
449 return bits[16];
450 }
451 set
452 {
453 bits[16] = value;
454 }
455 }

Referenced by Chara.ShowDialog().

◆ little_saved

bool Player.Flags.little_saved
getset

Definition at line 433 of file Player.cs.

434 {
435 get
436 {
437 return bits[15];
438 }
439 set
440 {
441 bits[15] = value;
442 }
443 }

Referenced by Chara.ShowDialog().

◆ loytelEscaped

bool Player.Flags.loytelEscaped
getset

Definition at line 469 of file Player.cs.

470 {
471 get
472 {
473 return bits[18];
474 }
475 set
476 {
477 bits[18] = value;
478 }
479 }

Referenced by Chara.ShowDialog().

◆ loytelMartLv

int Player.Flags.loytelMartLv
getset

Definition at line 637 of file Player.cs.

638 {
639 get
640 {
641 return ints[18];
642 }
643 set
644 {
645 ints[18] = value;
646 }
647 }

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

◆ lutz

int Player.Flags.lutz
getset

Definition at line 601 of file Player.cs.

602 {
603 get
604 {
605 return ints[15];
606 }
607 set
608 {
609 ints[15] = value;
610 }
611 }

Referenced by GameDate.ShipLetter().

◆ magicChestSent

bool Player.Flags.magicChestSent
getset

Definition at line 505 of file Player.cs.

506 {
507 get
508 {
509 return bits[21];
510 }
511 set
512 {
513 bits[21] = value;
514 }
515 }

Referenced by GameDate.AdvanceDay().

◆ main

int Player.Flags.main
getset

Definition at line 577 of file Player.cs.

578 {
579 get
580 {
581 return ints[13];
582 }
583 set
584 {
585 ints[13] = value;
586 }
587 }

◆ pickedMelilithTreasure

bool Player.Flags.pickedMelilithTreasure
getset

Definition at line 325 of file Player.cs.

326 {
327 get
328 {
329 return bits[6];
330 }
331 set
332 {
333 bits[6] = value;
334 }
335 }

◆ start

int Player.Flags.start
getset

Definition at line 553 of file Player.cs.

554 {
555 get
556 {
557 return ints[10];
558 }
559 set
560 {
561 ints[10] = value;
562 }
563 }

◆ statueShipped

bool Player.Flags.statueShipped
getset

Definition at line 421 of file Player.cs.

422 {
423 get
424 {
425 return bits[14];
426 }
427 set
428 {
429 bits[14] = value;
430 }
431 }

Referenced by GameDate.ShipRandomPackages().

◆ storyFiama

int Player.Flags.storyFiama
getset

Definition at line 589 of file Player.cs.

590 {
591 get
592 {
593 return ints[14];
594 }
595 set
596 {
597 ints[14] = value;
598 }
599 }

Referenced by Chara.ShowDialog().

◆ toggleHotbarHighlightActivated

bool Player.Flags.toggleHotbarHighlightActivated
getset

Definition at line 517 of file Player.cs.

518 {
519 get
520 {
521 return bits[22];
522 }
523 set
524 {
525 bits[22] = value;
526 }
527 }

Referenced by InvOwnerHotbar.OnProcess().

◆ toggleHotbarHighlightDisabled

bool Player.Flags.toggleHotbarHighlightDisabled
getset

Definition at line 481 of file Player.cs.

482 {
483 get
484 {
485 return bits[19];
486 }
487 set
488 {
489 bits[19] = value;
490 }
491 }

Referenced by WidgetCurrentTool.OnActivate().

◆ welcome

bool Player.Flags.welcome
getset

Definition at line 277 of file Player.cs.

278 {
279 get
280 {
281 return bits[2];
282 }
283 set
284 {
285 bits[2] = value;
286 }
287 }

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