Elin Decompiled Documentation EA 23.283 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]
 
bool killedDuponne [get, set]
 
int santa [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]
 
int reward_gould [get, set]
 
int reward_killkill [get, set]
 
int fishStolen [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 (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)
 

Detailed Description

Definition at line 262 of file Player.cs.

Member Function Documentation

◆ _OnDeserialized()

void Player.Flags._OnDeserialized ( StreamingContext  context)
inlineprivate

Definition at line 736 of file Player.cs.

737 {
738 bits.Bits = (uint)ints[0];
739 }
int[] ints
Definition: Player.cs:267

References Player.Flags.ints.

◆ _OnSerializing()

void Player.Flags._OnSerializing ( StreamingContext  context)
inlineprivate

Definition at line 730 of file Player.cs.

731 {
732 ints[0] = (int)bits.Bits;
733 }
BitArray32 bits
Definition: Player.cs:281
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 821 of file Player.cs.

822 {
823 if (!playedStories.Contains(id) && !availableStories.Contains(id))
824 {
825 availableStories.Add(id);
826 Msg.Say("story_added");
827 SE.WriteJournal();
828 }
829 }
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:273
List< int > playedStories
Definition: Player.cs:270

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

787 {
788 ExcelData excelData = storyExcel.TryGetValue(idBook);
789 if (excelData == null)
790 {
791 excelData = new ExcelData();
792 excelData.path = CorePath.DramaData + idBook + ".xlsx";
793 excelData.BuildList("index");
794 storyExcel.Add(idBook, excelData);
795 }
796 return excelData;
797 }
List< Dictionary< string, string > > BuildList(string sheetName="_default")
Definition: ExcelData.cs:92
Dictionary< string, ExcelData > storyExcel
Definition: Player.cs:283

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

775 {
776 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
777 {
778 if (item["id"].ToInt() == id)
779 {
780 return item;
781 }
782 }
783 return null;
784 }
ExcelData GetStoryExcelData(string idBook)
Definition: Player.cs:786

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

Referenced by Player.Flags.PlayStory().

◆ GetStoryRowID()

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

Definition at line 762 of file Player.cs.

763 {
764 foreach (Dictionary<string, string> item in GetStoryExcelData(idBook).sheets["index"].list)
765 {
766 if (item["step"] == idStep)
767 {
768 return item["id"].ToInt();
769 }
770 }
771 return 0;
772 }

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

758 {
759 return playedStories.Contains(flag);
760 }

References Player.Flags.playedStories.

Referenced by TraitStoryBook.OnRead().

◆ OnBuild()

void Player.Flags.OnBuild ( Recipe  r)
inline

Definition at line 749 of file Player.cs.

750 {
751 if (build == 0 && r.id == "workbench")
752 {
753 build = 1;
754 }
755 }
int build
Definition: Player.cs:610
string id
Definition: Recipe.cs:178

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

Referenced by TaskBuild.OnProgressComplete().

◆ OnCreateGame()

void Player.Flags.OnCreateGame ( )
inline

Definition at line 741 of file Player.cs.

742 {
743 }

Referenced by Player.OnCreateGame().

◆ OnEnableDebug()

void Player.Flags.OnEnableDebug ( )
inline

Definition at line 745 of file Player.cs.

746 {
747 }

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

◆ OnEnterZone()

void Player.Flags.OnEnterZone ( )
inline

Definition at line 831 of file Player.cs.

832 {
833 if (EClass._zone.id == "nymelle")
834 {
835 if (EClass._zone.lv == -1)
836 {
837 AddStory(10);
838 }
839 if (EClass._zone.lv == -2)
840 {
841 AddStory(20);
842 }
843 if (EClass._zone.lv == -3)
844 {
845 AddStory(30);
846 }
847 }
848 if (QuestMain.Phase == 700 && EClass._zone.id == "lothria")
849 {
850 PlayStory(50);
851 }
853 {
855 availableStories.RemoveAt(0);
856 }
858 {
860 {
862 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
863 }
865 {
866 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
867 }
869 {
870 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
871 }
873 {
874 EClass.game.quests.Get<QuestIntoDarkness>().UpdateOnTalk();
875 }
876 }
877 }
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Zone _zone
Definition: EClass.cs:21
bool isLoading
Definition: Game.cs:242
Prologue Prologue
Definition: Game.cs:264
QuestManager quests
Definition: Game.cs:183
static LayerDrama Instance
Definition: LayerDrama.cs:20
bool PlayStory(string idBook, int id, bool fromBook=false)
Definition: Player.cs:799
void AddStory(int id)
Definition: Player.cs:821
string idStartZone
Definition: Prologue.cs:9
static int Phase
Definition: QuestMain.cs:23
int GetPhase(string id)
Quest Get(string id)
int lv
Definition: Spatial.cs:142
string id
Definition: Spatial.cs:13
bool IsPCFaction
Definition: Zone.cs:475

References EClass._zone, Player.Flags.AddStory(), Player.Flags.availableStories, EClass.game, QuestManager.Get(), QuestManager.GetPhase(), Spatial.id, Prologue.idStartZone, LayerDrama.Instance, Game.isLoading, Zone.IsPCFaction, Spatial.lv, QuestMain.Phase, Player.Flags.PlayStory(), Game.Prologue, and Game.quests.

Referenced by Scene.Init().

◆ OnLeaveZone()

void Player.Flags.OnLeaveZone ( )
inline

Definition at line 879 of file Player.cs.

880 {
882 {
883 PlayStory(40);
884 }
885 }
static Player player
Definition: EClass.cs:13
bool simulatingZone
Definition: Player.cs:1202

References QuestMain.Phase, EClass.player, Player.Flags.PlayStory(), and Player.simulatingZone.

Referenced by Scene.OnUpdate().

◆ PlayStory() [1/2]

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

Definition at line 816 of file Player.cs.

817 {
818 return PlayStory("_main", id, fromBook);
819 }

References Player.Flags.PlayStory().

◆ PlayStory() [2/2]

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

Definition at line 799 of file Player.cs.

800 {
801 if (!fromBook && playedStories.Contains(id))
802 {
803 return false;
804 }
805 Dictionary<string, string> storyRow = GetStoryRow(idBook, id);
806 SoundManager.ForceBGM();
807 LayerDrama.fromBook = fromBook;
808 LayerDrama.Activate(idBook, storyRow["sheet"], storyRow["step"]);
809 if (!fromBook && !playedStories.Contains(id))
810 {
811 playedStories.Add(id);
812 }
813 return true;
814 }
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:774

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

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

◆ bits

BitArray32 Player.Flags.bits

Definition at line 281 of file Player.cs.

Referenced by Player.Flags._OnSerializing().

◆ ints

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

Definition at line 267 of file Player.cs.

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

◆ MonoDeparture

const int Player.Flags.MonoDeparture = 100
static

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

◆ reservedTutorial

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

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

Referenced by Player.Flags.GetStoryExcelData().

Property Documentation

◆ abilityHighlightDisabled

bool Player.Flags.abilityHighlightDisabled
getset

Definition at line 381 of file Player.cs.

382 {
383 get
384 {
385 return bits[9];
386 }
387 set
388 {
389 bits[9] = value;
390 }
391 }

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

◆ backpackHighlightDisabled

bool Player.Flags.backpackHighlightDisabled
getset

Definition at line 369 of file Player.cs.

370 {
371 get
372 {
373 return bits[8];
374 }
375 set
376 {
377 bits[8] = value;
378 }
379 }

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

◆ build

int Player.Flags.build
getset

Definition at line 609 of file Player.cs.

610 {
611 get
612 {
613 return ints[11];
614 }
615 set
616 {
617 ints[11] = value;
618 }
619 }

Referenced by Player.Flags.OnBuild().

◆ canComupWithFoodRecipe

bool Player.Flags.canComupWithFoodRecipe
getset

Definition at line 417 of file Player.cs.

418 {
419 get
420 {
421 return bits[12];
422 }
423 set
424 {
425 bits[12] = value;
426 }
427 }

Referenced by RecipeCard.Craft().

◆ daysAfterQuestExploration

int Player.Flags.daysAfterQuestExploration
getset

Definition at line 657 of file Player.cs.

658 {
659 get
660 {
661 return ints[16];
662 }
663 set
664 {
665 ints[16] = value;
666 }
667 }

Referenced by GameDate.AdvanceDay().

◆ debugEnabled

bool Player.Flags.debugEnabled
getset

Definition at line 513 of file Player.cs.

514 {
515 get
516 {
517 return bits[20];
518 }
519 set
520 {
521 bits[20] = value;
522 }
523 }

Referenced by UI.ToggleFeedback().

◆ elinGift

bool Player.Flags.elinGift
getset

Definition at line 393 of file Player.cs.

394 {
395 get
396 {
397 return bits[10];
398 }
399 set
400 {
401 bits[10] = value;
402 }
403 }

Referenced by FactionBranch.ReceivePackages().

◆ fiamaFirstDream

bool Player.Flags.fiamaFirstDream
getset

Definition at line 321 of file Player.cs.

322 {
323 get
324 {
325 return bits[4];
326 }
327 set
328 {
329 bits[4] = value;
330 }
331 }

Referenced by Chara.ShowDialog().

◆ fiamaStoryBookGiven

bool Player.Flags.fiamaStoryBookGiven
getset

Definition at line 309 of file Player.cs.

310 {
311 get
312 {
313 return bits[3];
314 }
315 set
316 {
317 bits[3] = value;
318 }
319 }

Referenced by Chara.ShowDialog().

◆ fishStolen

int Player.Flags.fishStolen
getset

Definition at line 717 of file Player.cs.

718 {
719 get
720 {
721 return ints[21];
722 }
723 set
724 {
725 ints[21] = value;
726 }
727 }

Referenced by AI_Fish.ProgressFish.OnProgressComplete(), and CoreDebug.Stats().

◆ gotClickReward

bool Player.Flags.gotClickReward
getset

Definition at line 285 of file Player.cs.

286 {
287 get
288 {
289 return bits[1];
290 }
291 set
292 {
293 bits[1] = value;
294 }
295 }

◆ gotEtherDisease

bool Player.Flags.gotEtherDisease
getset

Definition at line 477 of file Player.cs.

478 {
479 get
480 {
481 return bits[17];
482 }
483 set
484 {
485 bits[17] = value;
486 }
487 }

Referenced by Chara.MutateRandom().

◆ gotJurePillow

bool Player.Flags.gotJurePillow
getset

Definition at line 549 of file Player.cs.

550 {
551 get
552 {
553 return bits[30];
554 }
555 set
556 {
557 bits[30] = value;
558 }
559 }

Referenced by DramaOutcome.convert_Jure().

◆ gotLoytelMart

bool Player.Flags.gotLoytelMart
getset

Definition at line 561 of file Player.cs.

562 {
563 get
564 {
565 return bits[31];
566 }
567 set
568 {
569 bits[31] = value;
570 }
571 }

Referenced by QuestDebt.GiveReward().

◆ gotMelilithCurse

bool Player.Flags.gotMelilithCurse
getset

Definition at line 405 of file Player.cs.

406 {
407 get
408 {
409 return bits[11];
410 }
411 set
412 {
413 bits[11] = value;
414 }
415 }

◆ helpHighlightDisabled

bool Player.Flags.helpHighlightDisabled
getset

Definition at line 333 of file Player.cs.

334 {
335 get
336 {
337 return bits[5];
338 }
339 set
340 {
341 bits[5] = value;
342 }
343 }

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

◆ isShoesOff

bool Player.Flags.isShoesOff
getset

Definition at line 357 of file Player.cs.

358 {
359 get
360 {
361 return bits[7];
362 }
363 set
364 {
365 bits[7] = value;
366 }
367 }

Referenced by Chara._Move().

◆ KilledBossInVoid

bool Player.Flags.KilledBossInVoid
getset

Definition at line 429 of file Player.cs.

430 {
431 get
432 {
433 return bits[13];
434 }
435 set
436 {
437 bits[13] = value;
438 }
439 }

Referenced by Chara.TryDropBossLoot().

◆ killedDuponne

bool Player.Flags.killedDuponne
getset

Definition at line 573 of file Player.cs.

574 {
575 get
576 {
577 return bits[32];
578 }
579 set
580 {
581 bits[32] = value;
582 }
583 }

◆ landDeedBought

int Player.Flags.landDeedBought
getset

Definition at line 669 of file Player.cs.

670 {
671 get
672 {
673 return ints[17];
674 }
675 set
676 {
677 ints[17] = value;
678 }
679 }

Referenced by Card.GetPrice().

◆ little_killed

bool Player.Flags.little_killed
getset

Definition at line 465 of file Player.cs.

466 {
467 get
468 {
469 return bits[16];
470 }
471 set
472 {
473 bits[16] = value;
474 }
475 }

Referenced by Chara.ShowDialog().

◆ little_saved

bool Player.Flags.little_saved
getset

Definition at line 453 of file Player.cs.

454 {
455 get
456 {
457 return bits[15];
458 }
459 set
460 {
461 bits[15] = value;
462 }
463 }

Referenced by Chara.ShowDialog().

◆ loytelEscaped

bool Player.Flags.loytelEscaped
getset

Definition at line 489 of file Player.cs.

490 {
491 get
492 {
493 return bits[18];
494 }
495 set
496 {
497 bits[18] = value;
498 }
499 }

Referenced by Chara.ShowDialog().

◆ loytelMartLv

int Player.Flags.loytelMartLv
getset

Definition at line 681 of file Player.cs.

682 {
683 get
684 {
685 return ints[18];
686 }
687 set
688 {
689 ints[18] = value;
690 }
691 }

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

◆ lutz

int Player.Flags.lutz
getset

Definition at line 645 of file Player.cs.

646 {
647 get
648 {
649 return ints[15];
650 }
651 set
652 {
653 ints[15] = value;
654 }
655 }

Referenced by GameDate.ShipLetter().

◆ magicChestSent

bool Player.Flags.magicChestSent
getset

Definition at line 525 of file Player.cs.

526 {
527 get
528 {
529 return bits[21];
530 }
531 set
532 {
533 bits[21] = value;
534 }
535 }

Referenced by GameDate.AdvanceDay().

◆ main

int Player.Flags.main
getset

Definition at line 621 of file Player.cs.

622 {
623 get
624 {
625 return ints[13];
626 }
627 set
628 {
629 ints[13] = value;
630 }
631 }

◆ pickedMelilithTreasure

bool Player.Flags.pickedMelilithTreasure
getset

Definition at line 345 of file Player.cs.

346 {
347 get
348 {
349 return bits[6];
350 }
351 set
352 {
353 bits[6] = value;
354 }
355 }

◆ reward_gould

int Player.Flags.reward_gould
getset

Definition at line 693 of file Player.cs.

694 {
695 get
696 {
697 return ints[19];
698 }
699 set
700 {
701 ints[19] = value;
702 }
703 }

Referenced by AI_PlayMusic.ThrowReward().

◆ reward_killkill

int Player.Flags.reward_killkill
getset

Definition at line 705 of file Player.cs.

706 {
707 get
708 {
709 return ints[20];
710 }
711 set
712 {
713 ints[20] = value;
714 }
715 }

Referenced by AI_PlayMusic.ThrowReward().

◆ santa

int Player.Flags.santa
getset

Definition at line 585 of file Player.cs.

586 {
587 get
588 {
589 return ints[9];
590 }
591 set
592 {
593 ints[9] = value;
594 }
595 }

◆ start

int Player.Flags.start
getset

Definition at line 597 of file Player.cs.

598 {
599 get
600 {
601 return ints[10];
602 }
603 set
604 {
605 ints[10] = value;
606 }
607 }

◆ statueShipped

bool Player.Flags.statueShipped
getset

Definition at line 441 of file Player.cs.

442 {
443 get
444 {
445 return bits[14];
446 }
447 set
448 {
449 bits[14] = value;
450 }
451 }

Referenced by GameDate.ShipRandomPackages(), and CoreDebug.Stats().

◆ storyFiama

int Player.Flags.storyFiama
getset

Definition at line 633 of file Player.cs.

634 {
635 get
636 {
637 return ints[14];
638 }
639 set
640 {
641 ints[14] = value;
642 }
643 }

Referenced by Chara.ShowDialog().

◆ toggleHotbarHighlightActivated

bool Player.Flags.toggleHotbarHighlightActivated
getset

Definition at line 537 of file Player.cs.

538 {
539 get
540 {
541 return bits[22];
542 }
543 set
544 {
545 bits[22] = value;
546 }
547 }

Referenced by InvOwnerHotbar.OnProcess().

◆ toggleHotbarHighlightDisabled

bool Player.Flags.toggleHotbarHighlightDisabled
getset

Definition at line 501 of file Player.cs.

502 {
503 get
504 {
505 return bits[19];
506 }
507 set
508 {
509 bits[19] = value;
510 }
511 }

Referenced by WidgetCurrentTool.OnActivate().

◆ welcome

bool Player.Flags.welcome
getset

Definition at line 297 of file Player.cs.

298 {
299 get
300 {
301 return bits[2];
302 }
303 set
304 {
305 bits[2] = value;
306 }
307 }

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