Elin Decompiled Documentation EA 23.344.1 Nightly
Loading...
Searching...
No Matches
AM_Adv Class Reference
Inheritance diagram for AM_Adv:
AM_BaseGameMode ActionMode EClass AM_ADV_Target AM_Region

Classes

class  PressedAction
 

Public Member Functions

override bool HighlightWall (Point p)
 
override void OnActivate ()
 
override void OnDeactivate ()
 
override void OnRenderTile (Point point, HitResult result, int dir)
 
override int GetDefaultTile (Point p)
 
override void OnBeforeUpdate ()
 
override void OnAfterUpdate ()
 
override void OnUpdateCursor ()
 
void UpdatePlans ()
 
void UpdateLangWheel ()
 
void ClearPlans ()
 
void OnBecomeNoGoal ()
 
override void _OnUpdateInput ()
 
virtual void OnEnterChat (string text)
 
void ShowAllAction ()
 
void SetTurbo (int mtp=-1)
 
void EndTurbo ()
 
void ToggleZoom ()
 
bool TryCancelInteraction (bool sound=true)
 
bool CanAct ()
 
void AxisMove ()
 
void SetManualMove ()
 
void SetPressedAction (ButtonState button)
 
bool IsEntangled ()
 
bool PressedActionMove (Point pos)
 
virtual void RefreshArrow ()
 
- Public Member Functions inherited from AM_BaseGameMode
override void OnUpdateInput ()
 
override string GetHintText ()
 
virtual void _OnUpdateInput ()
 
override void OnCancel ()
 
override HitResult HitTest (Point point, Point start)
 
- Public Member Functions inherited from ActionMode
virtual int TopHeight (Point p)
 
virtual void SEExecuteSummary ()
 
virtual bool HighlightWall (Point p)
 
virtual void OnClickSubMenu (int a)
 
virtual string OnSetSubMenuButton (int a, UIButton b)
 
virtual bool IsRoofEditMode (Card c=null)
 
virtual bool IsFillMode ()
 
virtual int GetDefaultTile (Point p)
 
virtual void OnShowExtraHint (UINote n)
 
void Activate (bool toggle=true, bool forceActivate=false)
 
virtual void OnActivate ()
 
void RefreshTexts ()
 
virtual string GetSimpleText (Card c)
 
void ClearSimpleTexts ()
 
void Deactivate ()
 
virtual void OnDeactivate ()
 
virtual void OnCancel ()
 
virtual void OnBeforeUpdate ()
 
virtual void OnAfterUpdate ()
 
virtual void OnUpdateCursor ()
 
void OnRotate ()
 
void SetCursorOnMap (CursorInfo cursor)
 
void UpdateInput ()
 
void InputMovement ()
 
virtual void InputWheel (int wheel)
 
virtual void OnUpdateInput ()
 
void DoFunc (CoreConfig.GameFuncBuild func)
 
bool IsFuncPressed (CoreConfig.GameFunc func)
 
void DoFunc (CoreConfig.GameFunc func)
 
virtual void OnScroll ()
 
void TryRightClickCloseWidget ()
 
bool TryShowWidgetMenu ()
 
HitResult _HitTest (Point point, Point start)
 
virtual HitResult HitTest (Point point, Point start)
 
virtual void OnSelectStart (Point point)
 
virtual void OnSelectEnd (bool cancel)
 
virtual MeshPass GetGuidePass (Point point)
 
virtual void OnRenderTile (Point point, HitResult result, int dir)
 
void OnRenderTileFloor (Point point, HitResult result)
 
virtual bool CanProcessTiles ()
 
virtual void OnBeforeProcessTiles ()
 
virtual void OnProcessTiles (Point point, int dir)
 
virtual void OnAfterProcessTiles (Point start, Point end)
 
virtual void OnFinishProcessTiles ()
 
virtual void OnRefreshSummary (Point point, HitResult result, HitSummary summary)
 
void ShowLayer ()
 
virtual Layer OnShowLayer ()
 
void HideLayer ()
 
virtual void OnHideLayer ()
 
virtual string GetHintText ()
 
virtual void RotateUnderMouse ()
 
virtual ref string SetMouseInfo (ref string s)
 
void TogglePause ()
 
void Pause (bool sound=false)
 
void UnPause (bool sound=false)
 
void ChangeGameSpeed (int a, bool sound=false)
 

Public Attributes

bool zoomOut
 
bool zoomOut2
 
bool movedByKey
 
int itemLost
 
PressedAction pressedAction = new PressedAction()
 
PointTarget axisTarget
 
ActPlan planLeft
 
ActPlan planRight
 
ActPlan planKeyboard
 
ActPlan planAll
 
string textWheel
 
string textMiddle
 
bool updatePlans
 
bool isMoving
 
float rightMouseTimer
 
- Public Attributes inherited from AM_BaseGameMode
bool isMouseOnMap
 
- Public Attributes inherited from ActionMode
Layer layer
 
int brushRadius = 4
 

Static Public Attributes

static float turbo
 
static int actCount
 
- Static Public Attributes inherited from ActionMode
static ActionMode DefaultMode
 
static AM_Title Title = new AM_Title()
 
static AM_Sim Sim
 
static AM_ViewZone View
 
static AM_Adv Adv
 
static AM_Region Region
 
static AM_ADV_Target AdvTarget
 
static AM_EloMap EloMap
 
static AM_Inspect Inspect
 
static AM_NoMap NoMap
 
static AM_MiniGame MiniGame
 
static AM_NewZone NewZone
 
static AM_Bird Bird
 
static AM_Mine Mine
 
static AM_Dig Dig
 
static AM_Harvest Harvest
 
static AM_Cut Cut
 
static AM_StateEditor StateEditor
 
static AM_Picker Picker
 
static AM_Copy Copy
 
static AM_Blueprint Blueprint
 
static AM_Build Build
 
static AM_CreateArea CreateArea
 
static AM_EditArea EditArea
 
static AM_ExpandArea ExpandArea
 
static AM_Deconstruct Deconstruct
 
static AM_Select Select
 
static AM_RemoveDesignation RemoveDesignation
 
static AM_ViewMap ViewMap
 
static AM_Terrain Terrain
 
static AM_Populate Populate
 
static AM_EditMarker EditMarker
 
static AM_Visibility Visibility
 
static AM_Cinema Cinema
 
static AM_Paint Paint
 
static AM_FlagCell FlagCell
 
static ActionMode LastBuildMode
 
static SourceMaterial.Row lastEditorMat
 
static bool ignoreSound
 
static float[] GameSpeeds = new float[4] { 0f, 1f, 2f, 5f }
 
static List< TCSimpleTextsimpleTexts = new List<TCSimpleText>()
 
static float hotElementTimer
 
- Static Public Attributes inherited from EClass
static Core core
 

Protected Attributes

int arrowIndex
 
float timerStartRunning
 
bool cursorMove
 
bool keepWalking
 
Vector3 posOrigin
 
Vector3 posArrow
 
Vector2 vArrow
 
Vector3 clickPos
 

Properties

PointTarget mouseTarget [get]
 
bool autorun [get]
 
bool ShouldHideTile [get]
 
override float gameSpeed [get]
 
override bool FixFocus [get]
 
override bool ShouldPauseGame [get]
 
override bool AllowWheelZoom [get]
 
override float TargetZoom [get]
 
- Properties inherited from AM_BaseGameMode
override AreaHighlightMode AreaHihlight [get]
 
override bool ShowActionHint [get]
 
override bool HideSubWidgets [get]
 
override BaseTileSelector.HitType hitType [get]
 
override BaseTileSelector.SelectType selectType [get]
 
override BaseGameScreen TargetGameScreen [get]
 
Point hit [get]
 
- Properties inherited from ActionMode
static AM_Adv AdvOrRegion [get]
 
static bool IsAdv [get]
 
virtual float gameSpeed [get]
 
bool IsActive [get]
 
virtual BaseTileSelector.HitType hitType [get]
 
virtual BaseTileSelector.SelectType selectType [get]
 
virtual BaseTileSelector.BoxType boxType [get]
 
virtual bool ContinuousClick [get]
 
virtual int hitW [get]
 
virtual int hitH [get]
 
HitSummary Summary [get]
 
bool Multisize [get]
 
virtual string id [get]
 
virtual CursorInfo DefaultCursor [get]
 
virtual string idHelpTopic [get]
 
virtual string idSound [get]
 
virtual bool enableMouseInfo [get]
 
virtual bool hideBalloon [get]
 
virtual string textHintTitle [get]
 
virtual bool AllowAutoClick [get]
 
virtual bool ShowActionHint [get]
 
virtual bool ShowMouseoverTarget [get]
 
virtual AreaHighlightMode AreaHihlight [get]
 
virtual bool CanSelectTile [get]
 
virtual bool CanTargetOutsideBounds [get]
 
virtual bool ShouldPauseGame [get]
 
virtual bool FixFocus [get]
 
virtual bool HideSubWidgets [get]
 
virtual bool IsBuildMode [get]
 
virtual bool ShowBuildWidgets [get]
 
virtual BuildMenu.Mode buildMenuMode [get]
 
virtual bool ShouldHideBuildMenu [get]
 
virtual bool CanTargetFog [get]
 
virtual int CostMoney [get]
 
virtual bool AllowBuildModeShortcuts [get]
 
virtual bool AllowMiddleClickFunc [get]
 
virtual bool AllowHotbar [get]
 
virtual bool AllowGeneralInput [get]
 
virtual bool ShowMaskedThings [get]
 
virtual int SelectorHeight [get]
 
virtual bool AllowWheelZoom [get]
 
virtual float TargetZoom [get]
 
virtual BaseTileMap.CardIconMode cardIconMode [get]
 
virtual BaseGameScreen TargetGameScreen [get]
 
virtual bool IsNoMap [get]
 
virtual bool UseSubMenu [get]
 
virtual bool UseSubMenuSlider [get]
 
virtual bool SubMenuAsGroup [get]
 
virtual int SubMenuModeIndex [get]
 
virtual bool ShowExtraHint [get]
 
BaseTileSelector tileSelector [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]
 

Private Attributes

float gearAngle
 
Vector3 lastCamPos
 
bool startedRun
 

Additional Inherited Members

- Static Public Member Functions inherited from ActionMode
static void OnGameInstantiated ()
 
- 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)
 
- Static Protected Attributes inherited from ActionMode
static Vector3 mpos
 

Detailed Description

Definition at line 6 of file AM_Adv.cs.

Member Function Documentation

◆ _OnUpdateInput()

override void AM_Adv._OnUpdateInput ( )
inlinevirtual

Reimplemented from AM_BaseGameMode.

Reimplemented in AM_ADV_Target.

Definition at line 470 of file AM_Adv.cs.

471 {
472 if (EClass.debug.enable)
473 {
474 EClass.player.flags.debugEnabled = true;
475 }
477 {
478 EClass.game.Save(isAutoSave: true);
479 EClass.player.willAutoSave = false;
480 }
482 {
483 RecipeUpdater.dirty = false;
485 }
487 {
488 actCount = 0;
489 }
491 {
493 {
494 rightMouseTimer = 2.5f;
495 }
496 }
497 else
498 {
500 }
501 EClass.player.waitingInput = false;
503 {
505 {
506 Msg.Say("abort_lowHP");
507 EClass.pc.ai.Cancel();
508 }
510 {
511 Msg.Say("abort_allyDying");
512 EClass.pc.ai.Cancel();
513 }
515 {
516 Msg.Say("abort_itemLoss");
517 EClass.pc.ai.Cancel();
518 }
519 }
520 itemLost = 0;
521 if (EClass.pc.HasNoGoal)
522 {
524 {
526 EClass.player.invlunerable = false;
527 return;
528 }
529 if (EClass.pc.isBerserk && !(EClass.pc.ai is GoalCombat))
530 {
532 if (EClass.pc.enemy != null)
533 {
535 }
537 return;
538 }
540 {
541 EClass.player.lastTurn = EClass.pc.turn;
542 EClass.player.invlunerable = false;
543 EClass.pc.RemoveCondition<ConInvulnerable>();
545 if (!EClass.pc.HasNoGoal)
546 {
547 return;
548 }
549 }
550 EClass.player.waitingInput = true;
552 {
553 Thing playingTool = AI_PlayMusic.playingTool;
555 if (EInput.IsAnyKeyDown() || (playingTool.GetRootCard() != EClass.pc && (!playingTool.ExistsOnMap || playingTool.Dist(EClass.pc) > 1)) || (condition != null && condition.GetPhase() > 0))
556 {
558 return;
559 }
560 UISong instance = UISong.Instance;
561 if (!instance || instance.ratio > 0.85f)
562 {
564 {
565 tool = playingTool
566 });
567 return;
568 }
569 }
570 }
572 {
573 EClass.player.returnInfo.askDest = false;
574 int uidDest = 0;
575 List<Zone> list = EClass.game.spatials.ListReturnLocations();
576 if (list == null || list.Count == 0)
577 {
578 EClass.player.returnInfo = null;
579 Msg.Say("returnAbort");
580 return;
581 }
582 EClass.ui.AddLayer<LayerList>().SetList2(list, (Zone a) => a.NameWithDangerLevel, delegate(Zone a, ItemGeneral b)
583 {
584 uidDest = a.uid;
585 if (a is Zone_Dungeon)
586 {
587 uidDest = a.FindDeepestZone().uid;
588 }
589 EClass.player.returnInfo = new Player.ReturnInfo
590 {
591 turns = EClass.rnd(10) + 10,
592 uidDest = uidDest
593 };
595 {
596 EClass.player.returnInfo.turns = 1;
598 }
599 }, delegate(Zone a, ItemGeneral b)
600 {
601 string lang = ((a is Zone_Dungeon) ? a.TextDeepestLv : "surface".lang());
602 b.SetSubText(lang, 200, FontColor.Default, TextAnchor.MiddleRight);
603 b.Build();
604 b.button1.mainText.rectTransform.sizeDelta = new Vector2(350f, 20f);
605 }).SetSize(500f)
606 .SetOnKill(delegate
607 {
608 if (uidDest == 0)
609 {
610 EClass.player.returnInfo = null;
611 Msg.Say("returnAbort");
612 }
613 })
614 .SetTitles("wReturn");
615 return;
616 }
618 {
619 EClass.player.haltMove = false;
620 TryCancelInteraction(sound: false);
621 EInput.Consume(1);
622 return;
623 }
625 {
626 keepWalking = false;
627 EInput.Consume(1);
628 return;
629 }
630 if (EClass.player.showShippingResult && !EClass.ui.IsActive)
631 {
632 EClass.player.showShippingResult = false;
633 EClass.ui.AddLayer<LayerShippingResult>().Show();
634 }
636 {
637 pressedAction.timer += Core.delta;
638 if (pressedAction.action != null)
639 {
640 if (pressedAction.canTurbo && ((autorun && pressedAction.timer > 0.45f) || Input.GetKey(KeyCode.LeftShift)))
641 {
642 SetTurbo();
643 }
645 {
646 return;
647 }
649 {
650 pressedAction.timerRepeat += Core.delta;
651 if (pressedAction.timerRepeat < 0.3f)
652 {
653 return;
654 }
655 }
657 if (pressedAction.action())
658 {
660 {
661 EClass.player.EndTurn(consume: false);
663 {
664 pressedAction.action = null;
665 }
666 }
667 }
668 else if (!pressedAction.repeat)
669 {
670 pressedAction.action = null;
671 }
672 }
673 else if ((autorun && pressedAction.timer > 0.5f) || Input.GetKey(KeyCode.LeftShift))
674 {
675 SetTurbo();
676 }
677 return;
678 }
680 {
681 updatePlans = true;
682 }
683 cursorMove = false;
684 EClass.player.nextMove = Vector2.zero;
685 if (EClass.pc.HasNoGoal)
686 {
687 EndTurbo();
688 }
689 pressedAction.button = null;
690 pressedAction.axis = Vector2.zero;
691 pressedAction.count = 0;
692 pressedAction.timerRepeat = 0f;
694 {
695 EClass.player.willEndTurn = false;
697 return;
698 }
699 if (EInput.axis != Vector2.zero)
700 {
701 AxisMove();
702 return;
703 }
705 startedRun = false;
707 {
708 EClass.pc.ai.Cancel();
709 }
710 movedByKey = false;
713 {
715 {
716 return;
717 }
718 CursorSystem.ignoreCount = 5;
720 }
722 {
724 {
725 return;
726 }
727 CursorSystem.ignoreCount = 5;
729 }
731 {
733 {
734 if (EInput.wheel != 0)
735 {
737 SE.Tab();
739 EInput.wheel = 0;
740 }
742 {
743 EInput.middleMouse.pressedTimer = 100f;
744 }
745 }
746 else if (EClass.scene.mouseTarget.CanCycle())
747 {
748 if (EInput.wheel != 0)
749 {
751 EInput.wheel = 0;
752 }
754 {
755 EInput.middleMouse.pressedTimer = 100f;
756 }
757 }
758 }
760 {
762 {
764 {
766 SE.Rotate();
767 }
768 else
769 {
770 DoFunc(input.middleClick);
771 }
772 }
774 {
775 DoFunc(input.middlePressLong);
776 }
777 }
779 {
780 DoFunc(input.mouse3Click);
781 }
782 else if (EInput.mouse3.pressedLong)
783 {
784 DoFunc(input.mouse3PressLong);
785 }
787 {
788 if (zoomOut)
789 {
790 ToggleZoom();
791 }
792 else
793 {
794 DoFunc(input.mouse4Click);
795 }
796 }
797 else if (EInput.mouse4.pressedLong)
798 {
799 DoFunc(input.mouse4PressLong);
800 }
801 if (EInput.wheel != 0)
802 {
804 {
805 if (EInput.wheel != 0)
806 {
808 SE.Tab();
810 EInput.wheel = 0;
811 }
812 }
813 else
814 {
816 UpdatePlans();
817 }
818 }
820 {
822 }
823 if (Input.GetKey(KeyCode.LeftControl))
824 {
825 if (Input.GetKeyDown(KeyCode.F))
826 {
827 EClass.ui.widgets.Toggle("Search")?.SoundActivate();
828 }
829 return;
830 }
831 switch (EInput.action)
832 {
833 case EAction.Console:
834 EClass.ui.AddLayer<LayerConsole>();
835 break;
836 case EAction.Chat:
837 Dialog.InputName("", "", delegate(bool cancel, string text)
838 {
839 if (!cancel && !text.IsEmpty())
840 {
841 string[] array = text.SplitByNewline();
842 foreach (string obj in array)
843 {
844 Chara chara = EClass.pc;
845 string text2 = obj;
846 if ((text2[0] == '@' || text2[0] == 'ï¼ ') && text2.Length > 1 && int.TryParse(text2[1].ToString().Normalize(NormalizationForm.FormKC), out var result))
847 {
848 text2 = text2.Substring(2);
849 chara = EClass.pc.party.members.TryGet(result);
850 }
851 if (text2.StartsWith('@'))
852 {
853 text2 = text2.Substring(1);
854 }
855 chara.SayRaw(text2);
856 string text3 = text2;
857 Msg.SetColor("ono");
858 if (!text2.StartsWith('*') && !text2.StartsWith('(') && !text2.StartsWith('('))
859 {
860 text2 = text2.Bracket();
861 }
862 Msg.Say(text2.RemoveAllTags(), chara);
863 OnEnterChat(text3);
864 }
865 }
866 }, Dialog.InputType.Chat);
867 break;
868 case EAction.Search:
869 EClass.ui.widgets.Toggle("Search")?.SoundActivate();
870 break;
871 case EAction.Meditate:
872 if (EClass.pc.HasNoGoal)
873 {
874 EClass.pc.UseAbility("AI_Meditate", EClass.pc);
875 }
876 break;
877 case EAction.Dump:
879 break;
880 case EAction.EmptyHand:
881 if ((bool)WidgetCurrentTool.Instance)
882 {
884 }
885 break;
886 case EAction.AutoCombat:
887 {
889 {
890 break;
891 }
892 List<Chara> list2 = EClass.scene.mouseTarget.pos.ListCharas();
893 list2.Sort((Chara a, Chara b) => a.hostility - b.hostility);
894 foreach (Chara item in list2)
895 {
896 if (item.hostility < Hostility.Friend)
897 {
899 return;
900 }
901 }
902 Msg.Say("noTargetFound");
903 break;
904 }
905 case EAction.QuickSave:
907 {
908 if (!EClass.pc.HasNoGoal)
909 {
910 SE.Beep();
911 }
912 else
913 {
914 EClass.game.Save();
915 }
916 }
917 break;
918 case EAction.QuickLoad:
919 {
921 {
922 SE.Beep();
923 break;
924 }
925 string slot = Game.id;
926 bool isCloud = EClass.game.isCloud;
927 Game.TryLoad(slot, isCloud, delegate
928 {
930 {
931 EClass.scene.Init(Scene.Mode.None);
932 Game.Load(slot, isCloud);
933 });
934 });
935 break;
936 }
937 case EAction.Report:
938 if (!EClass.debug.enable)
939 {
940 EClass.ui.ToggleFeedback();
941 }
942 break;
943 case EAction.Wait:
944 {
946 {
948 break;
949 }
950 if (!EClass.pc.HasNoGoal)
951 {
953 {
954 EClass.pc.ai.Cancel();
955 }
956 break;
957 }
959 {
961 break;
962 }
964 if (traitNewZone != null && traitNewZone.CanAutoEnter())
965 {
966 traitNewZone.MoveZone();
968 }
969 else
970 {
973 }
974 break;
975 }
976 case EAction.Fire:
978 {
981 {
982 SE.Play("lock_on");
983 }
985 {
987 }
988 }
989 else
990 {
991 if (!EClass.pc.HasNoGoal)
992 {
993 break;
994 }
996 bool reloading = EClass.pc.HasCondition<ConReload>();
997 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
998 {
1000 {
1001 if (button.obj is Thing thing2 && thing2.CanAutoFire(EClass.pc, EClass.player.target, reloading))
1002 {
1003 thing = thing2;
1004 break;
1005 }
1006 }
1007 }
1008 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
1009 {
1010 thing = EClass.pc.things.Find((Thing _t) => _t.isEquipped && _t.CanAutoFire(EClass.pc, EClass.player.target, reloading));
1011 }
1012 if (thing == null || !thing.CanAutoFire(EClass.pc, EClass.player.target, reloading))
1013 {
1014 break;
1015 }
1016 if (thing.HasTag(CTAG.throwWeapon))
1017 {
1018 _ = EClass.player.target.pos;
1020 {
1021 ACT.Throw.target = thing;
1023 EClass.player.EndTurn(consume: false);
1024 SetTurbo();
1025 }
1026 }
1027 else if (thing.trait is TraitAbility traitAbility)
1028 {
1029 if (traitAbility.act.CanPerform(EClass.pc, EClass.player.target, EClass.player.target.pos) && EClass.pc.UseAbility(traitAbility.act.source.alias, EClass.player.target, EClass.player.target.pos))
1030 {
1031 EClass.player.EndTurn(consume: false);
1032 }
1033 }
1034 else
1035 {
1036 if (!(thing.trait is TraitToolRange))
1037 {
1038 break;
1039 }
1040 EClass.pc.ranged = thing;
1042 {
1043 EClass.player.renderThing = thing;
1045 {
1046 EClass.player.EndTurn(consume: false);
1047 SetTurbo();
1048 }
1049 }
1050 }
1051 }
1052 break;
1053 }
1054 }
CTAG
Definition: CTAG.cs:2
EAction
Definition: EAction.cs:2
FontColor
Definition: FontColor.cs:2
Hostility
Definition: Hostility.cs:2
Definition: ACT.cs:6
static ActRanged Ranged
Definition: ACT.cs:17
static ActThrow Throw
Definition: ACT.cs:19
static new ActWait Wait
Definition: ACT.cs:7
virtual bool CanManualCancel()
Definition: AIAct.cs:326
virtual bool IsRunning
Definition: AIAct.cs:31
virtual Status Cancel()
Definition: AIAct.cs:305
static Thing playingTool
Definition: AI_PlayMusic.cs:10
static bool keepPlaying
Definition: AI_PlayMusic.cs:8
static void CancelKeepPlaying()
Definition: AI_PlayMusic.cs:40
Func< bool > action
Definition: AM_Adv.cs:24
ButtonState button
Definition: AM_Adv.cs:10
bool IsPressing()
Definition: AM_Adv.cs:82
void AxisMove()
Definition: AM_Adv.cs:1143
float timerStartRunning
Definition: AM_Adv.cs:114
void ToggleZoom()
Definition: AM_Adv.cs:1111
bool cursorMove
Definition: AM_Adv.cs:116
void EndTurbo()
Definition: AM_Adv.cs:1106
bool zoomOut
Definition: AM_Adv.cs:104
bool TryCancelInteraction(bool sound=true)
Definition: AM_Adv.cs:1120
static int actCount
Definition: AM_Adv.cs:102
bool autorun
Definition: AM_Adv.cs:173
void OnBecomeNoGoal()
Definition: AM_Adv.cs:439
float rightMouseTimer
Definition: AM_Adv.cs:165
virtual void OnEnterChat(string text)
Definition: AM_Adv.cs:1056
bool startedRun
Definition: AM_Adv.cs:167
ActPlan planLeft
Definition: AM_Adv.cs:133
void UpdatePlans()
Definition: AM_Adv.cs:401
void SetPressedAction(ButtonState button)
Definition: AM_Adv.cs:1213
bool keepWalking
Definition: AM_Adv.cs:118
bool CanAct()
Definition: AM_Adv.cs:1138
int itemLost
Definition: AM_Adv.cs:110
PressedAction pressedAction
Definition: AM_Adv.cs:126
bool updatePlans
Definition: AM_Adv.cs:159
void SetTurbo(int mtp=-1)
Definition: AM_Adv.cs:1091
bool movedByKey
Definition: AM_Adv.cs:108
void ModAltitude(int a)
Definition: AM_Build.cs:371
Point pos
Definition: ActPlan.cs:152
override bool Perform()
Definition: ActRanged.cs:65
override bool CanPerform()
Definition: ActRanged.cs:44
override bool Perform()
Definition: ActThrow.cs:42
static bool CanThrow(Chara c, Thing t, Card target, Point p=null)
Definition: ActThrow.cs:64
override bool Perform()
Definition: ActWait.cs:9
static AM_Build Build
Definition: ActionMode.cs:49
void DoFunc(CoreConfig.GameFuncBuild func)
Definition: ActionMode.cs:1063
void WaitForEndOfFrame(Action action)
Definition: BaseCore.cs:61
bool pressing
Definition: ButtonState.cs:35
bool clicked
Definition: ButtonState.cs:37
float pressedTimer
Definition: ButtonState.cs:17
float clickDuration
Definition: ButtonState.cs:23
bool pressedLong
Definition: ButtonState.cs:64
int hp
Definition: Card.cs:245
bool HasTag(CTAG tag)
Definition: Card.cs:2728
Point pos
Definition: Card.cs:60
Trait trait
Definition: Card.cs:54
ThingContainer things
Definition: Card.cs:39
int turn
Definition: Card.cs:68
Card GetRootCard()
Definition: Card.cs:3607
int Evalue(int ele)
Definition: Card.cs:2704
int Dist(Card c)
Definition: Card.cs:8204
void SayRaw(string text, string ref1=null, string ref2=null)
Definition: Card.cs:7302
Definition: Chara.cs:10
BaseCondition GetCondition(string idCon)
Definition: Chara.cs:10067
AIAct ai
Definition: Chara.cs:206
bool IsCriticallyWounded(bool includeRide=false)
Definition: Chara.cs:1236
Party party
Definition: Chara.cs:43
bool HasCondition(string alias)
Definition: Chara.cs:10011
void SetAIImmediate(AIAct g)
Definition: Chara.cs:9486
Stats mana
Definition: Chara.cs:1213
bool UseAbility(int idAct, Card tc=null, Point pos=null, bool pt=false)
Definition: Chara.cs:6129
bool isBerserk
Definition: Chara.cs:124
bool FindNearestNewEnemy()
Definition: Chara.cs:6895
bool HasNoGoal
Definition: Chara.cs:1047
Chara enemy
Definition: Chara.cs:86
Hostility hostility
Definition: Chara.cs:295
override void LookAt(Card c)
Definition: Chara.cs:3775
bool WillConsumeTurn()
Definition: Chara.cs:3899
override int GetPhase()
InputSetting input
Definition: CoreConfig.cs:633
bool instaReturn
Definition: CoreDebug.cs:221
bool enable
Definition: CoreDebug.cs:302
bool boradcast
Definition: CoreDebug.cs:276
void BroadcastNext()
Definition: CoreDebug.cs:2526
Definition: Core.cs:14
static float delta
Definition: Core.cs:17
CoreConfig config
Definition: Core.cs:70
Definition: Dialog.cs:7
static Dialog InputName(string langDetail, string text, Action< bool, string > onClose, InputType inputType=InputType.Default)
Definition: Dialog.cs:536
InputType
Definition: Dialog.cs:9
Definition: EClass.cs:6
static Game game
Definition: EClass.cs:9
static Scene scene
Definition: EClass.cs:31
static Core core
Definition: EClass.cs:7
static Zone _zone
Definition: EClass.cs:21
static int rnd(long a)
Definition: EClass.cs:59
static Player player
Definition: EClass.cs:13
static Chara pc
Definition: EClass.cs:15
static CoreDebug debug
Definition: EClass.cs:49
static UI ui
Definition: EClass.cs:17
Definition: EInput.cs:8
static bool IsAnyKeyDown(bool includeAxis=true, bool _skipframe=true)
Definition: EInput.cs:630
static void WaitReleaseKey()
Definition: EInput.cs:661
static int wheel
Definition: EInput.cs:300
static ButtonState middleMouse
Definition: EInput.cs:364
static bool hasShiftChanged
Definition: EInput.cs:284
static void Consume(int _skipFrame)
Definition: EInput.cs:667
static ButtonState mouse4
Definition: EInput.cs:368
static Vector2 axis
Definition: EInput.cs:342
static ButtonState leftMouse
Definition: EInput.cs:360
static bool isShiftDown
Definition: EInput.cs:272
static ButtonState rightMouse
Definition: EInput.cs:362
static ButtonState mouse3
Definition: EInput.cs:366
static KeyboardPress keyFire
Definition: EInput.cs:260
static EAction action
Definition: EInput.cs:270
bool disableManualSave
RecipeUpdater recipe
Definition: GameUpdater.cs:371
ConfigAutoCombat autoCombat
Definition: Game.cs:94
Definition: Game.cs:9
static void Load(string id, bool cloud)
Definition: Game.cs:322
GamePrincipal principal
Definition: Game.cs:225
static bool TryLoad(string id, bool cloud, Action onLoad)
Definition: Game.cs:311
static string id
Definition: Game.cs:148
bool Save(bool isAutoSave=false, bool silent=false)
Definition: Game.cs:1068
SpatialManager spatials
Definition: Game.cs:153
bool isCloud
Definition: Game.cs:246
GameUpdater updater
Definition: Game.cs:250
Config config
Definition: Game.cs:219
static bool CanRotate()
Definition: HotItemHeld.cs:28
static bool CanChangeHeightByWheel()
Definition: HotItemHeld.cs:15
static TaskBuild taskBuild
Definition: HotItemHeld.cs:7
virtual bool LookAtMouse
Definition: HotItem.cs:44
virtual Thing Thing
Definition: HotItem.cs:38
void Build()
Definition: ItemGeneral.cs:210
UIButton SetSubText(string lang, int x, FontColor c=FontColor.Default, TextAnchor align=TextAnchor.MiddleLeft)
Definition: ItemGeneral.cs:161
Layer SetOnKill(Action action)
Definition: Layer.cs:579
Definition: Msg.cs:5
static string Say(string idLang, string ref1, string ref2=null, string ref3=null, string ref4=null)
Definition: Msg.cs:58
static void SetColor()
Definition: Msg.cs:22
bool IsCriticallyWounded(bool includePc=false)
Definition: Party.cs:174
List< Chara > members
Definition: Party.cs:19
bool showShippingResult
Definition: Player.cs:1062
bool haltMove
Definition: Player.cs:1244
bool HasValidRangedTarget()
Definition: Player.cs:2392
bool willAutoSave
Definition: Player.cs:1248
void EndTurn(bool consume=true)
Definition: Player.cs:2179
void EnterLocalZone(bool encounter=false, Chara mob=null)
Definition: Player.cs:2044
int autoCombatStartHP
Definition: Player.cs:1298
bool TargetRanged()
Definition: Player.cs:2401
Chara target
Definition: Player.cs:1306
HotItem currentHotItem
Definition: Player.cs:1170
ReturnInfo returnInfo
Definition: Player.cs:933
int lastTurn
Definition: Player.cs:1264
bool willEndTurn
Definition: Player.cs:1234
bool CanAcceptInput()
Definition: Player.cs:2559
void CycleTarget(int a)
Definition: PointTarget.cs:204
bool isValid
Definition: PointTarget.cs:30
bool CanCycle()
Definition: PointTarget.cs:215
List< Chara > ListCharas()
Definition: Point.cs:1177
int Distance(Point p)
Definition: Point.cs:995
Thing FindThing(Func< Thing, bool > func)
Definition: Point.cs:1146
static bool dirty
void Build(Point _p, Mode _mode=Mode.Passive)
virtual void Rotate()
Definition: Recipe.cs:877
Definition: Scene.cs:8
PointTarget mouseTarget
Definition: Scene.cs:135
void Init(Mode newMode)
Definition: Scene.cs:178
Mode
Definition: Scene.cs:10
List< Zone > ListReturnLocations()
int uid
Definition: Spatial.cs:70
virtual bool IsRegion
Definition: Spatial.cs:515
Zone FindDeepestZone()
Definition: Spatial.cs:715
virtual int value
Definition: Stats.cs:56
Recipe recipe
Definition: TaskBuild.cs:8
static void TryPerform()
Definition: TaskDump.cs:6
bool isRepeated
Definition: TaskPoint.cs:13
Thing Find(int uid)
Definition: Thing.cs:8
bool CanAutoFire(Chara c, Card tg, bool reloading=false)
Definition: Thing.cs:126
bool CanAutoEnter()
bool MoveZone(bool confirmed=false)
Definition: UIList.cs:9
List< ButtonPair > buttons
Definition: UIList.cs:276
Definition: UISong.cs:5
static UISong Instance
Definition: UISong.cs:6
float ratio
Definition: UISong.cs:18
static WidgetCurrentTool Instance
void Select(int index, bool fromHotkey=false)
UIPlaceHelper placer
Definition: Zone.cs:12
string TextDeepestLv
Definition: Zone.cs:441

References EClass._zone, ConfigAutoCombat.abortOnAllyDying, ConfigAutoCombat.abortOnHalfHP, ConfigAutoCombat.abortOnItemLoss, actCount, AM_Adv.PressedAction.action, EInput.action, Chara.ai, Player.ReturnInfo.askDest, Game.Config.autoCombat, Player.autoCombatStartHP, autorun, EInput.axis, AxisMove(), CoreDebug.boradcast, CoreDebug.BroadcastNext(), ActionMode.Build, ItemGeneral.Build(), RecipeUpdater.Build(), AM_Adv.PressedAction.button, UIList.buttons, Player.CanAcceptInput(), CanAct(), TraitNewZone.CanAutoEnter(), Thing.CanAutoFire(), AIAct.Cancel(), AI_PlayMusic.CancelKeepPlaying(), HotItemHeld.CanChangeHeightByWheel(), PointTarget.CanCycle(), AIAct.CanManualCancel(), ActRanged.CanPerform(), HotItemHeld.CanRotate(), ActThrow.CanThrow(), AM_Adv.PressedAction.canTurbo, ButtonState.clickDuration, ButtonState.clicked, Core.config, Game.config, EInput.KeyboardPress.Consume(), EInput.Consume(), EClass.core, AM_Adv.PressedAction.count, Player.currentHotItem, cursorMove, PointTarget.CycleTarget(), EClass.debug, Core.delta, RecipeUpdater.dirty, GamePrincipal.disableManualSave, Card.Dist(), Point.Distance(), ActionMode.DoFunc(), ButtonState.down, CoreDebug.enable, EndTurbo(), Player.EndTurn(), Chara.enemy, Player.EnterLocalZone(), Card.Evalue(), ThingContainer.Find(), Spatial.FindDeepestZone(), Chara.FindNearestNewEnemy(), Point.FindThing(), EClass.game, Chara.GetCondition(), ConSuffocation.GetPhase(), Card.GetRootCard(), Player.haltMove, Chara.HasCondition(), Chara.HasNoGoal, EInput.hasShiftChanged, Card.HasTag(), Player.HasValidRangedTarget(), Chara.hostility, Card.hp, Game.id, AM_Adv.PressedAction.ignoreCount, Scene.Init(), CoreConfig.input, Dialog.InputName(), UISong.Instance, WidgetCurrentTool.Instance, CoreDebug.instaReturn, EInput.IsAnyKeyDown(), Chara.isBerserk, Game.isCloud, Party.IsCriticallyWounded(), Chara.IsCriticallyWounded(), AM_Adv.PressedAction.IsPressing(), Spatial.IsRegion, TaskPoint.isRepeated, EInput.KeyboardPress.IsRepeating, AIAct.IsRunning, EInput.isShiftDown, PointTarget.isValid, item, itemLost, AI_PlayMusic.keepPlaying, keepWalking, EInput.keyFire, Player.lastTurn, EInput.leftMouse, WidgetCurrentTool.list, Point.ListCharas(), SpatialManager.ListReturnLocations(), Game.Load(), Chara.LookAt(), HotItem.LookAtMouse, Chara.mana, Party.members, CoreConfig.InputSetting.middleClick, EInput.middleMouse, CoreConfig.InputSetting.middlePressLong, AM_Build.ModAltitude(), WidgetCurrentTool.ModSelected(), EInput.mouse3, CoreConfig.InputSetting.mouse3Click, CoreConfig.InputSetting.mouse3PressLong, EInput.mouse4, CoreConfig.InputSetting.mouse4Click, CoreConfig.InputSetting.mouse4PressLong, Scene.mouseTarget, movedByKey, TraitNewZone.MoveZone(), Spatial.NameWithDangerLevel, OnBecomeNoGoal(), OnEnterChat(), Chara.party, EClass.pc, ActRanged.Perform(), ActThrow.Perform(), ActWait.Perform(), WidgetCurrentTool.placer, planLeft, EClass.player, AI_PlayMusic.playingTool, ActPlan.pos, Card.pos, PointTarget.pos, pressedAction, ButtonState.pressedLong, ButtonState.pressedTimer, ButtonState.pressing, Game.principal, ACT.Ranged, UISong.ratio, GameUpdater.recipe, TaskBuild.recipe, UIPlaceHelper.Refresh(), AM_Adv.PressedAction.repeat, Player.returnInfo, EInput.rightMouse, rightMouseTimer, EClass.rnd(), Recipe.Rotate(), Game.Save(), Msg.Say(), Card.SayRaw(), EClass.scene, WidgetCurrentTool.Select(), Chara.SetAIImmediate(), Msg.SetColor(), Layer.SetOnKill(), SetPressedAction(), ItemGeneral.SetSubText(), SetTurbo(), Player.showShippingResult, Game.spatials, startedRun, Player.target, Player.TargetRanged(), HotItemHeld.taskBuild, Zone.TextDeepestLv, HotItem.Thing, Card.things, ACT.Throw, AM_Adv.PressedAction.timer, AM_Adv.PressedAction.timerRepeat, timerStartRunning, ToggleZoom(), tool, Card.trait, TryCancelInteraction(), Game.TryLoad(), TaskDump.TryPerform(), Card.turn, EClass.ui, Spatial.uid, updatePlans, UpdatePlans(), Game.updater, Chara.UseAbility(), Stats.value, ACT.Wait, BaseCore.WaitForEndOfFrame(), AM_Adv.PressedAction.waitForTurn, EInput.WaitReleaseKey(), EInput.wheel, Player.willAutoSave, Chara.WillConsumeTurn(), AM_Adv.PressedAction.willEndTurn, Player.willEndTurn, and zoomOut.

◆ AxisMove()

void AM_Adv.AxisMove ( )
inline

Definition at line 1143 of file AM_Adv.cs.

1144 {
1145 Vector2 vector = ((EClass.core.config.input.altKeyAxis && !EClass._zone.IsRegion) ? Util.ConvertAxis(EInput.axis) : EInput.axis);
1146 if (!startedRun)
1147 {
1148 if ((autorun && timerStartRunning >= 0.7f) || Input.GetKey(KeyCode.LeftShift))
1149 {
1150 SetTurbo();
1151 startedRun = true;
1152 }
1153 }
1154 else if (Input.GetKeyDown(KeyCode.LeftShift))
1155 {
1156 SetTurbo((turbo == 0f) ? (-1) : 0);
1157 }
1159 {
1160 SetTurbo((!Input.GetKey(KeyCode.LeftShift)) ? (-1) : 0);
1161 }
1163 EClass.player.nextMove.x = 0f;
1164 EClass.player.nextMove.y = 0f;
1165 if (vector != Vector2.zero && IsEntangled())
1166 {
1167 return;
1168 }
1169 Point point = EClass.pc.pos.Copy();
1170 point.x += (int)vector.x;
1171 point.z += (int)vector.y;
1172 if (EClass.pc.HasNoGoal && !point.IsValid && EClass.player.CanExitBorder(point))
1173 {
1175 return;
1176 }
1177 axisTarget.Update(point);
1178 pressedAction.Init(Vector3.zero);
1180 if (planKeyboard.HasAct)
1181 {
1182 if (planKeyboard.list[0].act.ResetAxis && EClass.pc.ai is GoalManualMove)
1183 {
1184 EInput.forbidAxis = EInput.axis;
1185 EClass.pc.ai.Cancel();
1186 }
1187 else
1188 {
1189 pressedAction.axis = EInput.axis;
1191 }
1192 return;
1193 }
1194 EClass.player.nextMove.x = vector.x;
1195 EClass.player.nextMove.y = vector.y;
1196 if (!(EClass.pc.ai is GoalManualMove) && EClass.pc.HasNoGoal && GoalManualMove.CanMove())
1197 {
1198 SetManualMove();
1199 }
1200 movedByKey = true;
1201 }
void SetAction(Func< bool > _action=null, bool _canTurbo=true, bool _willEndTurn=true, bool _waitForTurn=true, bool _canRepeat=false)
Definition: AM_Adv.cs:56
void Init(Vector3 _axis)
Definition: AM_Adv.cs:38
static float turbo
Definition: AM_Adv.cs:100
bool IsEntangled()
Definition: AM_Adv.cs:1260
void SetManualMove()
Definition: AM_Adv.cs:1203
ActPlan planKeyboard
Definition: AM_Adv.cs:143
PointTarget axisTarget
Definition: AM_Adv.cs:128
void Update(PointTarget target)
Definition: ActPlan.cs:439
Func< bool > GetAction()
Definition: ActPlan.cs:289
List list
Definition: ActPlan.cs:166
bool WillEndTurn
Definition: ActPlan.cs:223
bool canRepeat
Definition: ActPlan.cs:193
bool HasAct
Definition: ActPlan.cs:246
static bool CanMove()
bool CanExitBorder(Point p)
Definition: Player.cs:1987
void ExitBorder(ActPlan p=null)
Definition: Player.cs:1945
void Update(Point _pos)
Definition: PointTarget.cs:52
Definition: Point.cs:9
Point Copy()
Definition: Point.cs:491
int x
Definition: Point.cs:36
int z
Definition: Point.cs:39
bool IsValid
Definition: Point.cs:88
Definition: Util.cs:10
static Vector2 ConvertAxis(Vector2 v)
Definition: Util.cs:157

References EClass._zone, Chara.ai, CoreConfig.Test.alwaysRun, autorun, EInput.axis, axisTarget, AIAct.Cancel(), Player.CanExitBorder(), GoalManualMove.CanMove(), ActPlan.canRepeat, Core.config, Point.Copy(), EClass.core, Core.delta, Player.ExitBorder(), ActPlan.GetAction(), ActPlan.HasAct, Chara.HasNoGoal, AM_Adv.PressedAction.Init(), IsEntangled(), Spatial.IsRegion, Point.IsValid, ActPlan.list, movedByKey, EClass.pc, planKeyboard, EClass.player, Card.pos, pressedAction, AM_Adv.PressedAction.SetAction(), SetManualMove(), SetTurbo(), startedRun, CoreConfig.test, timerStartRunning, turbo, PointTarget.Update(), ActPlan.Update(), Util, ActPlan.WillEndTurn, Point.x, and Point.z.

Referenced by _OnUpdateInput().

◆ CanAct()

bool AM_Adv.CanAct ( )
inline

Definition at line 1138 of file AM_Adv.cs.

1139 {
1140 return EClass.pc.HasNoGoal;
1141 }

References Chara.HasNoGoal, and EClass.pc.

Referenced by _OnUpdateInput().

◆ ClearPlans()

void AM_Adv.ClearPlans ( )
inline

Definition at line 432 of file AM_Adv.cs.

433 {
434 planLeft.Clear();
436 updatePlans = true;
437 }
ActPlan planRight
Definition: AM_Adv.cs:138
void Clear()
Definition: ActPlan.cs:433

References ActPlan.Clear(), planLeft, planRight, and updatePlans.

Referenced by Card.Kick(), and ToggleZoom().

◆ EndTurbo()

void AM_Adv.EndTurbo ( )
inline

Definition at line 1106 of file AM_Adv.cs.

1107 {
1108 turbo = 0f;
1109 }

References turbo.

Referenced by _OnUpdateInput(), OnDeactivate(), and PressedActionMove().

◆ GetDefaultTile()

override int AM_Adv.GetDefaultTile ( Point  p)
inlinevirtual

Reimplemented from ActionMode.

Definition at line 309 of file AM_Adv.cs.

310 {
311 if (!p.IsSync)
312 {
313 return 30;
314 }
315 return 0;
316 }
bool IsSync
Definition: Point.cs:344

References Point.IsSync.

◆ HighlightWall()

override bool AM_Adv.HighlightWall ( Point  p)
inlinevirtual

Reimplemented from ActionMode.

Definition at line 253 of file AM_Adv.cs.

254 {
255 if (EClass.pc.held != null)
256 {
257 return TaskMine.CanMine(p, EClass.pc.held);
258 }
259 return false;
260 }
Card held
Definition: Chara.cs:70
static bool CanMine(Point pos, Card t)
Definition: TaskMine.cs:36

References TaskMine.CanMine(), Chara.held, and EClass.pc.

◆ IsEntangled()

bool AM_Adv.IsEntangled ( )
inline

Definition at line 1260 of file AM_Adv.cs.

1261 {
1263 {
1264 EClass.pc.Say("entangled", EClass.pc);
1265 EClass.pc.PlaySound("web");
1266 EClass.pc.PlayAnime(AnimeID.Shiver);
1268 return true;
1269 }
1270 return false;
1271 }
AnimeID
Definition: AnimeID.cs:2
SoundSource PlaySound(string id, float v=1f, bool spatial=true)
Definition: Card.cs:6645
void PlayAnime(AnimeID id, bool force=false)
Definition: Card.cs:6664
void Say(string lang, string ref1=null, string ref2=null)
Definition: Card.cs:7323

References Chara.HasCondition(), EClass.pc, Card.PlayAnime(), Card.PlaySound(), Card.Say(), and EInput.WaitReleaseKey().

Referenced by AxisMove(), and PressedActionMove().

◆ OnActivate()

override void AM_Adv.OnActivate ( )
inlinevirtual

Reimplemented from ActionMode.

Reimplemented in AM_ADV_Target.

Definition at line 262 of file AM_Adv.cs.

263 {
264 if ((bool)WidgetMouseover.Instance)
265 {
267 }
268 ActionMode.DefaultMode = this;
270 EClass.pc.ai.Cancel();
272 (EClass.pc.renderer as CharaRenderer).first = true;
276 }
BaseTileMap tileMap
virtual void RefreshPosition()
void RefreshHeight()
Definition: BaseTileMap.cs:913
virtual void SetFirst(bool first, Vector3 pos)
CardRenderer renderer
Definition: Card.cs:64
static BaseGameScreen screen
Definition: EClass.cs:33
ref Vector3 PositionCenter()
Definition: Point.cs:592
void Hide(bool immediate=false)
static WidgetMouseover Instance

References Chara.ai, AIAct.Cancel(), BaseGameScreen.FocusPC(), WidgetMouseover.Hide(), AM_Adv.PressedAction.Init(), WidgetMouseover.Instance, EClass.pc, Card.pos, Point.PositionCenter(), pressedAction, BaseTileMap.RefreshHeight(), BaseGameScreen.RefreshPosition(), Card.renderer, EClass.screen, CardRenderer.SetFirst(), and BaseGameScreen.tileMap.

◆ OnAfterUpdate()

override void AM_Adv.OnAfterUpdate ( )
inlinevirtual

Reimplemented from ActionMode.

Definition at line 330 of file AM_Adv.cs.

331 {
332 Vector3 position = (mouseTarget.pos.IsValid ? mouseTarget.pos.PositionAuto() : EClass.pc.pos.PositionAuto());
333 position = Camera.main.WorldToScreenPoint(position);
334 position.z = 0f;
335 position += EClass.ui.hud.transRightPos * Mathf.Min(0f, EClass.screen.Zoom - 1f);
336 EClass.ui.hud.transRight.position = position;
338 }
PointTarget mouseTarget
Definition: AM_Adv.cs:171
void MarkMapHighlights()
Definition: Player.cs:2553
ref Vector3 PositionAuto()
Definition: Point.cs:544

References Player.MarkMapHighlights(), mouseTarget, EClass.pc, EClass.player, Card.pos, PointTarget.pos, Point.PositionAuto(), EClass.screen, and BaseGameScreen.Zoom.

◆ OnBecomeNoGoal()

void AM_Adv.OnBecomeNoGoal ( )
inline

Definition at line 439 of file AM_Adv.cs.

440 {
441 EClass.player.renderThing = null;
442 if (EClass.player.hotItemToRestore != null)
443 {
445 {
447 }
448 EClass.player.hotItemToRestore = null;
449 }
451 {
453 }
454 if (EClass.rnd(30) == 0 && EClass.pc.HasElement(1559))
455 {
456 List<Thing> list = EClass.pc.things.List((Thing a) => a.trait is TraitPotion, onlyAccessible: true);
457 if (list.Count > 0)
458 {
459 EClass.pc.Drink(list.RandomItem());
461 }
462 }
463 if ((int)(Time.timeSinceLevelLoad / 60f / 60f) > Player.realHour)
464 {
466 }
468 }
bool HasElement(int ele, bool includeNagative=false)
Definition: Card.cs:6383
void Drink(Card t)
Definition: Chara.cs:5429
new GameConfig game
Definition: CoreConfig.cs:627
Definition: Player.cs:11
void OnAdvanceRealHour()
Definition: Player.cs:1586
static int realHour
Definition: Player.cs:1210
HotItem hotItemToRestore
Definition: Player.cs:1222
void SetCurrentHotItem(HotItem item)
Definition: Player.cs:2366
List< Thing > List(Func< Thing, bool > func, bool onlyAccessible=false)
static void TryPlayReserve()
Definition: Tutorial.cs:68

References CoreConfig.GameConfig.alwaysUpdateRecipe, RecipeUpdater.Build(), Core.config, EClass.core, Player.currentHotItem, Chara.Drink(), Player.EndTurn(), CoreConfig.game, EClass.game, Card.HasElement(), Player.hotItemToRestore, ThingContainer.List(), Player.OnAdvanceRealHour(), EClass.pc, EClass.player, Card.pos, Player.realHour, GameUpdater.recipe, EClass.rnd(), Player.SetCurrentHotItem(), Card.things, Card.trait, Tutorial.TryPlayReserve(), and Game.updater.

Referenced by _OnUpdateInput().

◆ OnBeforeUpdate()

override void AM_Adv.OnBeforeUpdate ( )
inlinevirtual

Reimplemented from ActionMode.

Definition at line 318 of file AM_Adv.cs.

319 {
321 {
322 isMoving = true;
323 }
324 else
325 {
326 isMoving = false;
327 }
328 }
bool isMoving
Definition: AM_Adv.cs:161
virtual bool IsMoving
Definition: CardRenderer.cs:31

References isMoving, CardRenderer.IsMoving, EClass.pc, and Card.renderer.

◆ OnDeactivate()

override void AM_Adv.OnDeactivate ( )
inlinevirtual

Reimplemented from ActionMode.

Definition at line 278 of file AM_Adv.cs.

279 {
280 EndTurbo();
281 }

References EndTurbo().

◆ OnEnterChat()

virtual void AM_Adv.OnEnterChat ( string  text)
inlinevirtual

Definition at line 1056 of file AM_Adv.cs.

1057 {
1058 if (text == "nyan")
1059 {
1060 Msg.SetColor("save");
1061 Msg.Say("*" + EClass.player.stats.lastChuryu + " nyan*");
1062 }
1063 }
int lastChuryu
Definition: Player.cs:150
Stats stats
Definition: Player.cs:1086

References Player.Stats.lastChuryu, EClass.player, Msg.Say(), Msg.SetColor(), and Player.stats.

Referenced by _OnUpdateInput().

◆ OnRenderTile()

override void AM_Adv.OnRenderTile ( Point  point,
HitResult  result,
int  dir 
)
inlinevirtual

Reimplemented from ActionMode.

Reimplemented in AM_Region.

Definition at line 283 of file AM_Adv.cs.

284 {
285 if (ShouldHideTile)
286 {
287 return;
288 }
289 EClass.player.currentHotItem.OnRenderTile(point, result, dir);
290 base.OnRenderTile(point, result, dir);
292 {
293 point.Installed.trait.OnRenderTile(point, result, dir);
294 }
296 {
297 return;
298 }
299 foreach (Chara chara in EClass._map.charas)
300 {
301 if (chara.isSynced && chara.IsHostile(EClass.pc) && !chara.IsMultisize && EClass.pc.CanSee(chara) && (chara.mimicry == null || !chara.mimicry.IsThing))
302 {
303 Vector3 vector = chara.pos.Position();
304 EClass.screen.guide.passGuideFloor.Add(vector.x, vector.y, vector.z - 0.01f, 23f, 0.3f);
305 }
306 }
307 }
bool ShouldHideTile
Definition: AM_Adv.cs:176
ScreenGuide guide
override bool isSynced
Definition: Chara.cs:709
bool CanSee(Card c)
Definition: Chara.cs:1277
override bool IsMultisize
Definition: Chara.cs:724
bool IsHostile()
Definition: Chara.cs:6910
ConBaseTransmuteMimic mimicry
Definition: Chara.cs:106
static Map _map
Definition: EClass.cs:19
bool highlightArea
Definition: Game.cs:40
virtual void OnRenderTile(Point point, HitResult result, int dir)
Definition: HotItem.cs:116
List< Chara > charas
Definition: Map.cs:84
void Add(Point point, float tile=0f, float color=0f)
Definition: MeshPass.cs:122
Thing Installed
Definition: Point.cs:327
ref Vector3 Position(int height)
Definition: Point.cs:553
bool HasChara
Definition: Point.cs:238
MeshPass passGuideFloor
Definition: ScreenGuide.cs:7
virtual void OnRenderTile(Point point, HitResult result, int dir)
Definition: Trait.cs:739
bool IsPCFaction
Definition: Zone.cs:480

References EClass._map, EClass._zone, MeshPass.Add(), Chara.CanSee(), Map.charas, Core.config, Game.config, EClass.core, Player.currentHotItem, CoreConfig.game, EClass.game, BaseGameScreen.guide, Point.HasChara, Game.Config.highlightArea, CoreConfig.GameConfig.highlightEnemy, Point.Installed, Chara.IsHostile(), Chara.IsMultisize, Zone.IsPCFaction, Chara.isSynced, ConBaseTransmuteMimic.IsThing, Chara.mimicry, HotItem.OnRenderTile(), Trait.OnRenderTile(), ScreenGuide.passGuideFloor, EClass.pc, EClass.player, Card.pos, Point.Position(), EClass.screen, ShouldHideTile, and Card.trait.

◆ OnUpdateCursor()

override void AM_Adv.OnUpdateCursor ( )
inlinevirtual

Reimplemented from ActionMode.

Definition at line 340 of file AM_Adv.cs.

341 {
342 RefreshArrow();
343 CursorInfo info = ((EClass.ui.layers.Count == 0 && !EClass.ui.isPointerOverUI) ? CursorSystem.Instance.arrows[arrowIndex] : null);
344 CursorSystem.leftIcon = null;
345 bool flag = (EClass.pc.ai.IsRunning || turbo != 0f || pressedAction.action != null) && !EClass.pc.HasNoGoal && !(EClass.pc.ai is GoalManualMove);
346 if (flag && !EClass.ui.isPointerOverUI)
347 {
348 CursorSystem.leftIcon = CursorSystem.IconGear;
349 CursorSystem.leftIconAngle = (int)(gearAngle / 45f) * 45;
350 }
352 {
353 updatePlans = true;
354 }
355 if (!ShouldHideTile)
356 {
357 if (planLeft.HasAct)
358 {
359 info = planLeft.CursorIcon;
360 }
361 else if (planRight.HasAct)
362 {
363 info = planRight.CursorIcon;
364 }
365 }
366 gearAngle += Core.gameDelta * 200f;
368 if ((updatePlans && !flag) || EClass.pc.IsDisabled)
369 {
370 UpdatePlans();
371 }
373 {
375 EClass.ui.hud.transRight.SetActive(enable: true);
376 bool flag2 = !ShouldHideTile && !pressedAction.hideRightInfo && !EClass.ui.contextMenu.isActive;
377 EClass.ui.hud.textLeft.SetActive(flag2 && planLeft.ShowAct);
378 EClass.ui.hud.textRight.SetActive(flag2 && planRight.ShowAct);
379 EClass.ui.hud.textMiddle.SetActive(flag2 && textMiddle != null);
380 EClass.ui.hud.textWheel.SetActive(flag2 && textWheel != null);
381 if (EClass.ui.hud.textLeft.gameObject.activeSelf)
382 {
383 EClass.ui.hud.textLeft.rectTransform.anchoredPosition = EClass.ui.hud.leftTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
384 }
385 if (EClass.ui.hud.textRight.gameObject.activeSelf)
386 {
387 EClass.ui.hud.textRight.rectTransform.anchoredPosition = EClass.ui.hud.rightTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
388 }
389 if (EClass.ui.hud.textMiddle.gameObject.activeSelf)
390 {
391 EClass.ui.hud.textMiddle.rectTransform.anchoredPosition = EClass.ui.hud.wheelTextPos * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
392 }
393 if (EClass.ui.hud.textWheel.gameObject.activeSelf)
394 {
395 EClass.ui.hud.textWheel.rectTransform.anchoredPosition = (EClass.ui.hud.textMiddle.gameObject.activeSelf ? EClass.ui.hud.wheelTextPos2 : EClass.ui.hud.wheelTextPos) * Mathf.Max(1f, EClass.screen.Zoom) / EClass.core.uiScale;
396 }
397 EClass.ui.hud.imageRight.SetActive(flag2 && planRight.HasAct);
398 }
399 }
string textMiddle
Definition: AM_Adv.cs:155
float gearAngle
Definition: AM_Adv.cs:157
string textWheel
Definition: AM_Adv.cs:153
void UpdateLangWheel()
Definition: AM_Adv.cs:408
int arrowIndex
Definition: AM_Adv.cs:112
virtual void RefreshArrow()
Definition: AM_Adv.cs:1375
bool ShowAct
Definition: ActPlan.cs:249
CursorInfo CursorIcon
Definition: ActPlan.cs:207
bool performed
Definition: ActPlan.cs:156
override bool IsDisabled
Definition: Chara.cs:591
override float uiScale
Definition: Core.cs:98
static int ignoreCount
Definition: CursorSystem.cs:26
List< CursorInfo > arrows
Definition: CursorSystem.cs:32
static CursorInfo IconGear
static void SetCursor(CursorInfo info=null, int _priority=0)
static CursorSystem Instance
Definition: CursorSystem.cs:6
bool hasTargetChanged
Definition: PointTarget.cs:20
bool Equals(int _x, int _z)
Definition: Point.cs:966

References Chara.ai, arrowIndex, CursorSystem.arrows, EClass.core, ActPlan.CursorIcon, cursorMove, Point.Equals(), gearAngle, ActPlan.HasAct, Chara.HasNoGoal, PointTarget.hasTargetChanged, CursorSystem.IconGear, CursorSystem.ignoreCount, CursorSystem.Instance, Chara.IsDisabled, mouseTarget, EClass.pc, ActPlan.performed, planLeft, planRight, ActPlan.pos, PointTarget.pos, RefreshArrow(), EClass.screen, CursorSystem.SetCursor(), ShouldHideTile, ActPlan.ShowAct, textMiddle, textWheel, turbo, EClass.ui, Core.uiScale, UpdateLangWheel(), updatePlans, UpdatePlans(), and BaseGameScreen.Zoom.

◆ PressedActionMove()

bool AM_Adv.PressedActionMove ( Point  pos)
inline

Definition at line 1273 of file AM_Adv.cs.

1274 {
1276 {
1277 return false;
1278 }
1279 if (pos != null)
1280 {
1282 {
1283 if (EClass.pc.pos.Equals(pos) || !pos.IsValid)
1284 {
1285 EClass.player.nextMove = Vector2.zero;
1286 EClass.pc.ai.Cancel();
1287 }
1289 {
1290 if (!EClass.pc.IsEnemyOnPath(pos))
1291 {
1292 EClass.pc.SetAIImmediate(new AI_Goto(pos, 0));
1293 }
1294 }
1295 else
1296 {
1297 EClass.player.nextMove = Vector2.zero;
1298 EClass.pc.ai.Cancel();
1299 }
1300 return false;
1301 }
1303 {
1304 keepWalking = true;
1305 }
1306 }
1307 if (autorun)
1308 {
1309 if (Vector2.Distance(posOrigin, posArrow) > EClass.core.config.game.runDistance)
1310 {
1311 SetTurbo();
1312 }
1313 else if (turbo != 0f && !Input.GetKey(KeyCode.LeftShift) && !EClass.core.config.input.keepRunning && !zoomOut && Vector2.Distance(posOrigin, posArrow) < 1.2f)
1314 {
1315 EndTurbo();
1316 }
1317 }
1318 if (pos != null && !cursorMove)
1319 {
1320 Vector2Int vector2Int = new Vector2Int(pos.x - EClass.pc.pos.x, pos.z - EClass.pc.pos.z);
1321 if (Mathf.Abs(vector2Int.x) > 1 || Mathf.Abs(vector2Int.y) > 1)
1322 {
1323 int num = Mathf.Max(Mathf.Abs(vector2Int.x), Mathf.Abs(vector2Int.y));
1324 vector2Int.x /= num;
1325 vector2Int.y /= num;
1326 }
1327 EClass.player.nextMove = vector2Int;
1328 Point.shared.Set(EClass.pc.pos.x + vector2Int.x, EClass.pc.pos.z + vector2Int.y);
1329 }
1330 else
1331 {
1332 EClass.player.nextMove = vArrow;
1333 Point.shared.Set(EClass.pc.pos.x + (int)vArrow.x, EClass.pc.pos.z + (int)vArrow.y);
1334 }
1336 {
1337 if (EClass.pc.ai is GoalManualMove)
1338 {
1339 EClass.pc.ai.Cancel();
1340 }
1341 return true;
1342 }
1343 if (!Point.shared.IsInBounds)
1344 {
1346 {
1348 return false;
1349 }
1350 if (EClass.pc.ai is GoalManualMove)
1351 {
1352 EClass.pc.ai.Cancel();
1353 }
1354 return true;
1355 }
1356 if (!(EClass.pc.ai is GoalManualMove))
1357 {
1358 if (EClass.pc.HasNoGoal)
1359 {
1360 if (GoalManualMove.CanMove())
1361 {
1362 SetTurbo(EInput.isShiftDown ? (-1) : 0);
1364 }
1365 cursorMove = true;
1366 }
1367 }
1368 else
1369 {
1370 cursorMove = true;
1371 }
1372 return true;
1373 }
Vector2 vArrow
Definition: AM_Adv.cs:124
Vector3 posOrigin
Definition: AM_Adv.cs:120
Vector3 posArrow
Definition: AM_Adv.cs:122
bool IsEnemyOnPath(Point p, bool cancelAI=true)
Definition: Chara.cs:2727
static Point lastlastPoint
static Point lastPoint
void RequestPathImmediate(PathProgress progress)
Definition: PathManager.cs:41
static PathManager Instance
Definition: PathManager.cs:16
bool TooHeavyToMove()
Definition: Player.cs:2679
static Point shared
Definition: Point.cs:20
Point Set(int _x, int _z)
Definition: Point.cs:503
bool IsInBounds
Definition: Point.cs:104

References Chara.ai, autorun, CoreConfig.InputSetting.autowalk, AIAct.Cancel(), Player.CanExitBorder(), GoalManualMove.CanMove(), ButtonState.clicked, Core.config, EClass.core, cursorMove, ButtonState.down, EndTurbo(), Point.Equals(), Player.ExitBorder(), CoreConfig.game, Chara.HasNoGoal, CoreConfig.input, PathManager.Instance, Chara.IsEnemyOnPath(), IsEntangled(), Point.IsInBounds, EInput.isShiftDown, Point.IsValid, CoreConfig.InputSetting.keepRunning, keepWalking, GoalManualMove.lastlastPoint, GoalManualMove.lastPoint, EInput.leftMouse, EClass.pc, EClass.player, Card.pos, posArrow, posOrigin, PathManager.RequestPathImmediate(), EInput.rightMouse, CoreConfig.GameConfig.runDistance, Point.Set(), Chara.SetAIImmediate(), SetTurbo(), Point.shared, Player.TooHeavyToMove(), turbo, vArrow, Point.x, Point.z, and zoomOut.

Referenced by SetPressedAction().

◆ RefreshArrow()

virtual void AM_Adv.RefreshArrow ( )
inlinevirtual

Reimplemented in AM_Region.

Definition at line 1375 of file AM_Adv.cs.

1376 {
1377 bool flag = zoomOut || EInput.rightMouse.pressedLong;
1378 if (flag && mouseTarget.pos.Equals(EClass.pc.pos))
1379 {
1380 vArrow = Vector2.zero;
1381 EClass.player.nextMove = vArrow;
1382 return;
1383 }
1386 float num;
1387 if (cursorMove || EClass.pc.pos.Distance(base.hit) > 1)
1388 {
1389 num = Util.GetAngle(posArrow.x - posOrigin.x, posArrow.y - posOrigin.y) + 90f + 22.5f;
1390 }
1391 else
1392 {
1393 num = Util.GetAngle(EClass.pc.pos.x - base.hit.x, EClass.pc.pos.z - base.hit.z) - 22.5f;
1394 if (num < 0f)
1395 {
1396 num = 360f + num;
1397 }
1398 }
1399 if ((bool)WidgetUnityChan.Instance)
1400 {
1402 }
1403 if (clickPos != Vector3.zero)
1404 {
1405 if (Vector3.Distance(Input.mousePosition, clickPos) < EClass.core.config.game.angleMargin)
1406 {
1407 return;
1408 }
1409 clickPos = Vector3.zero;
1410 }
1411 vArrow = Vector2.zero;
1412 int _angle = 0;
1413 Action<int, int, int, int> action = delegate(int x, int y, int i, int a)
1414 {
1415 vArrow.x = x;
1416 vArrow.y = y;
1417 arrowIndex = i;
1418 _angle = -a;
1419 };
1420 if (num < 45f || num >= 360f)
1421 {
1422 action(-1, -1, 0, 0);
1423 }
1424 else if (num < 90f)
1425 {
1426 action(-1, 0, 1, 35);
1427 }
1428 else if (num < 135f)
1429 {
1430 action(-1, 1, 2, 90);
1431 }
1432 else if (num < 180f)
1433 {
1434 action(0, 1, 3, 145);
1435 }
1436 else if (num < 225f)
1437 {
1438 action(1, 1, 4, 180);
1439 }
1440 else if (num < 270f)
1441 {
1442 action(1, 0, 5, 215);
1443 }
1444 else if (num < 315f)
1445 {
1446 action(1, -1, 6, 270);
1447 }
1448 else
1449 {
1450 action(0, -1, 7, 325);
1451 }
1452 }
Vector3 clickPos
Definition: AM_Adv.cs:169
static Vector3 position
Definition: CursorSystem.cs:22
static Vector3 posOrigin
Definition: CursorSystem.cs:24
static float GetAngle(Vector3 self, Vector3 target)
Definition: Util.cs:121
void Refresh(float angle)
static WidgetUnityChan Instance

References CoreConfig.GameConfig.angleMargin, arrowIndex, clickPos, Core.config, EClass.core, cursorMove, Point.Distance(), Point.Equals(), CoreConfig.game, WidgetUnityChan.Instance, mouseTarget, EClass.pc, Card.pos, PointTarget.pos, posArrow, CursorSystem.position, Point.PositionCenter(), posOrigin, CursorSystem.posOrigin, ButtonState.pressedLong, WidgetUnityChan.Refresh(), EInput.rightMouse, Util, vArrow, Point.x, Point.z, and zoomOut.

Referenced by Scene.Init(), and OnUpdateCursor().

◆ SetManualMove()

void AM_Adv.SetManualMove ( )
inline

Definition at line 1203 of file AM_Adv.cs.

1204 {
1206 {
1207 SetTurbo(EInput.isShiftDown ? (-1) : 0);
1209 cursorMove = true;
1210 }
1211 }

References cursorMove, EInput.isShiftDown, EClass.pc, EClass.player, Chara.SetAIImmediate(), SetTurbo(), and Player.TooHeavyToMove().

Referenced by AxisMove(), and Scene.Init().

◆ SetPressedAction()

void AM_Adv.SetPressedAction ( ButtonState  button)
inline

Definition at line 1213 of file AM_Adv.cs.

1214 {
1215 if (updatePlans)
1216 {
1217 UpdatePlans();
1218 }
1219 bool flag = button == EInput.leftMouse;
1220 pressedAction.Init(button);
1221 if (isMouseOnMap)
1222 {
1223 if (!flag)
1224 {
1225 if (planRight.HasAct)
1226 {
1228 }
1229 else
1230 {
1231 SE.Play("noAction");
1232 }
1233 return;
1234 }
1235 if (planLeft.HasAct)
1236 {
1238 return;
1239 }
1240 }
1241 if (!flag)
1242 {
1243 return;
1244 }
1245 Point pos = ((!isMouseOnMap) ? null : base.hit.Copy());
1246 if (pos != null && (EClass.pc.pos.Equals(pos) || (EClass.pc.pos.Distance(pos) == 1 && pos.cell.blocked && !EClass.pc.IsAstralBody)))
1247 {
1248 return;
1249 }
1251 if (!planLeft.HasAct)
1252 {
1253 clickPos = Input.mousePosition;
1254 pressedAction.SetAction(() => PressedActionMove(pos), _canTurbo: false, _willEndTurn: false, _waitForTurn: false);
1255 pressedAction.repeat = zoomOut;
1256 pressedAction.ignoreCount = true;
1257 }
1258 }
void SetPlan(ActPlan _plan)
Definition: AM_Adv.cs:69
bool PressedActionMove(Point pos)
Definition: AM_Adv.cs:1273
bool IsAstralBody
Definition: Chara.cs:506

References clickPos, Point.Distance(), Point.Equals(), ActPlan.HasAct, AM_Adv.PressedAction.Init(), Chara.IsAstralBody, AM_BaseGameMode.isMouseOnMap, EInput.leftMouse, mouseTarget, EClass.pc, planLeft, planRight, Card.pos, pressedAction, PressedActionMove(), AM_Adv.PressedAction.SetAction(), AM_Adv.PressedAction.SetPlan(), ActPlan.Update(), updatePlans, UpdatePlans(), and zoomOut.

Referenced by _OnUpdateInput(), and Scene.Init().

◆ SetTurbo()

void AM_Adv.SetTurbo ( int  mtp = -1)
inline

◆ ShowAllAction()

void AM_Adv.ShowAllAction ( )
inline

Definition at line 1065 of file AM_Adv.cs.

1066 {
1068 if (planAll.HasAct)
1069 {
1071 return;
1072 }
1073 if (EClass._zone.IsRegion)
1074 {
1075 EClass.ui.ToggleLayer<LayerTravel>();
1076 return;
1077 }
1078 if (EClass.debug.godBuild)
1079 {
1080 Thing lastThing = planAll.pos.LastThing;
1081 if (lastThing != null && EClass.pc.pos.Distance(planAll.pos) > 1 && lastThing.W == lastThing.H)
1082 {
1083 lastThing.Rotate();
1084 SE.Rotate();
1085 return;
1086 }
1087 }
1088 SE.BeepSmall();
1089 }
ActPlan planAll
Definition: AM_Adv.cs:148
void ShowContextMenu()
Definition: ActPlan.cs:330
virtual void Rotate(bool reverse=false)
Definition: Card.cs:6720
int H
Definition: Card.cs:2436
bool godBuild
Definition: CoreDebug.cs:320
Thing LastThing
Definition: Point.cs:314

References EClass._zone, EClass.debug, Point.Distance(), CoreDebug.godBuild, Card.H, ActPlan.HasAct, Spatial.IsRegion, Point.LastThing, mouseTarget, EClass.pc, planAll, ActPlan.pos, Card.pos, Card.Rotate(), ActPlan.ShowContextMenu(), EClass.ui, and ActPlan.Update().

Referenced by ActionMode.DoFunc().

◆ ToggleZoom()

void AM_Adv.ToggleZoom ( )
inline

Definition at line 1111 of file AM_Adv.cs.

1112 {
1113 EClass.screen.focusPos = null;
1114 zoomOut2 = !zoomOut2;
1115 SE.Play(zoomOut2 ? "zoomOut" : "zoomIn");
1116 EClass.ui.widgets.OnChangeActionMode();
1117 ClearPlans();
1118 }
void ClearPlans()
Definition: AM_Adv.cs:432
bool zoomOut2
Definition: AM_Adv.cs:106

References ClearPlans(), EClass.ui, and zoomOut2.

Referenced by _OnUpdateInput(), and ActionMode.DoFunc().

◆ TryCancelInteraction()

bool AM_Adv.TryCancelInteraction ( bool  sound = true)
inline

Definition at line 1120 of file AM_Adv.cs.

1121 {
1123 {
1125 {
1126 EClass.pc.ai.Cancel();
1127 if (sound)
1128 {
1129 SE.CancelAction();
1130 }
1131 }
1132 EInput.Consume(consumeAxis: true);
1133 return true;
1134 }
1135 return false;
1136 }

References Chara.ai, AIAct.Cancel(), AIAct.CanManualCancel(), EInput.Consume(), Chara.HasNoGoal, AIAct.IsRunning, and EClass.pc.

Referenced by _OnUpdateInput(), and Chara.Tick().

◆ UpdateLangWheel()

void AM_Adv.UpdateLangWheel ( )
inline

Definition at line 408 of file AM_Adv.cs.

409 {
410 textWheel = null;
411 textMiddle = null;
412 if (!planRight.HasAct)
413 {
414 return;
415 }
417 {
418 textWheel = "textWheel_changeHeight".lang();
420 {
421 textWheel = textWheel + " (" + ((HotItemHeld.taskBuild.altitude >= 0) ? "+" : "") + HotItemHeld.taskBuild.altitude + ")";
422 }
423 }
424 else if (HotItemHeld.CanRotate())
425 {
426 textMiddle = "textMiddle_rotate".lang(EInput.keys.mouseMiddle.key.ToString() ?? "");
427 }
428 EClass.ui.hud.textWheel.SetText(textWheel.IsEmpty(""));
429 EClass.ui.hud.textMiddle.SetText(textMiddle.IsEmpty(""));
430 }
KeyMap mouseMiddle
Definition: EInput.cs:135
KeyCode key
Definition: EInput.cs:14
static KeyMapManager keys
Definition: EInput.cs:378
int altitude
Definition: TaskBuild.cs:17

References TaskBuild.altitude, HotItemHeld.CanChangeHeightByWheel(), HotItemHeld.CanRotate(), Point.Distance(), ActPlan.HasAct, EInput.KeyMap.key, EInput.keys, EInput.KeyMapManager.mouseMiddle, Scene.mouseTarget, EClass.pc, planRight, Card.pos, PointTarget.pos, EClass.scene, HotItemHeld.taskBuild, textMiddle, textWheel, and EClass.ui.

Referenced by OnUpdateCursor().

◆ UpdatePlans()

void AM_Adv.UpdatePlans ( )
inline

Member Data Documentation

◆ actCount

int AM_Adv.actCount
static

◆ arrowIndex

int AM_Adv.arrowIndex
protected

Definition at line 112 of file AM_Adv.cs.

Referenced by OnUpdateCursor(), RefreshArrow(), and AM_Region.RefreshArrow().

◆ axisTarget

PointTarget AM_Adv.axisTarget
Initial value:
{
mouse = false
}

Definition at line 128 of file AM_Adv.cs.

Referenced by AxisMove().

◆ clickPos

Vector3 AM_Adv.clickPos
protected

Definition at line 169 of file AM_Adv.cs.

Referenced by RefreshArrow(), AM_Region.RefreshArrow(), and SetPressedAction().

◆ cursorMove

bool AM_Adv.cursorMove
protected

◆ gearAngle

float AM_Adv.gearAngle
private

Definition at line 157 of file AM_Adv.cs.

Referenced by OnUpdateCursor().

◆ isMoving

bool AM_Adv.isMoving

Definition at line 161 of file AM_Adv.cs.

Referenced by OnBeforeUpdate().

◆ itemLost

int AM_Adv.itemLost

Definition at line 110 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), and Map.TryShatter().

◆ keepWalking

bool AM_Adv.keepWalking
protected

Definition at line 118 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), and PressedActionMove().

◆ lastCamPos

Vector3 AM_Adv.lastCamPos
private

Definition at line 163 of file AM_Adv.cs.

◆ movedByKey

bool AM_Adv.movedByKey

Definition at line 108 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), and AxisMove().

◆ planAll

ActPlan AM_Adv.planAll
Initial value:
= new ActPlan
{
input = ActInput.AllAction
}

Definition at line 148 of file AM_Adv.cs.

Referenced by HotItemHeld.CanRotate(), and ShowAllAction().

◆ planKeyboard

ActPlan AM_Adv.planKeyboard
Initial value:
= new ActPlan
{
input = ActInput.Key
}

Definition at line 143 of file AM_Adv.cs.

Referenced by AxisMove().

◆ planLeft

ActPlan AM_Adv.planLeft
Initial value:
= new ActPlan
{
input = ActInput.LeftMouse
}

Definition at line 133 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), ClearPlans(), OnUpdateCursor(), SetPressedAction(), and UpdatePlans().

◆ planRight

ActPlan AM_Adv.planRight
Initial value:
= new ActPlan
{
input = ActInput.RightMouse
}

Definition at line 138 of file AM_Adv.cs.

Referenced by ClearPlans(), OnUpdateCursor(), SetPressedAction(), UpdateLangWheel(), and UpdatePlans().

◆ posArrow

Vector3 AM_Adv.posArrow
protected

Definition at line 122 of file AM_Adv.cs.

Referenced by PressedActionMove(), RefreshArrow(), and AM_Region.RefreshArrow().

◆ posOrigin

Vector3 AM_Adv.posOrigin
protected

Definition at line 120 of file AM_Adv.cs.

Referenced by PressedActionMove(), RefreshArrow(), and AM_Region.RefreshArrow().

◆ pressedAction

PressedAction AM_Adv.pressedAction = new PressedAction()

Definition at line 126 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), AxisMove(), OnActivate(), and SetPressedAction().

◆ rightMouseTimer

float AM_Adv.rightMouseTimer

Definition at line 165 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), and BaseGameScreen.RefreshPosition().

◆ startedRun

bool AM_Adv.startedRun
private

Definition at line 167 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), and AxisMove().

◆ textMiddle

string AM_Adv.textMiddle

Definition at line 155 of file AM_Adv.cs.

Referenced by OnUpdateCursor(), and UpdateLangWheel().

◆ textWheel

string AM_Adv.textWheel

Definition at line 153 of file AM_Adv.cs.

Referenced by OnUpdateCursor(), and UpdateLangWheel().

◆ timerStartRunning

float AM_Adv.timerStartRunning
protected

Definition at line 114 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), and AxisMove().

◆ turbo

float AM_Adv.turbo
static

Definition at line 100 of file AM_Adv.cs.

Referenced by AxisMove(), EndTurbo(), OnUpdateCursor(), PressedActionMove(), and SetTurbo().

◆ updatePlans

bool AM_Adv.updatePlans

Definition at line 159 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), ClearPlans(), OnUpdateCursor(), SetPressedAction(), and UpdatePlans().

◆ vArrow

Vector2 AM_Adv.vArrow
protected

Definition at line 124 of file AM_Adv.cs.

Referenced by PressedActionMove(), RefreshArrow(), and AM_Region.RefreshArrow().

◆ zoomOut

◆ zoomOut2

bool AM_Adv.zoomOut2

Definition at line 106 of file AM_Adv.cs.

Referenced by HotItemContext.Show(), and ToggleZoom().

Property Documentation

◆ AllowWheelZoom

override bool AM_Adv.AllowWheelZoom
get

Definition at line 239 of file AM_Adv.cs.

◆ autorun

bool AM_Adv.autorun
get

Definition at line 173 of file AM_Adv.cs.

Referenced by _OnUpdateInput(), AxisMove(), and PressedActionMove().

◆ FixFocus

override bool AM_Adv.FixFocus
get

Definition at line 199 of file AM_Adv.cs.

200 {
201 get
202 {
203 if (!zoomOut)
204 {
206 {
208 {
210 {
212 {
213 return !(EClass.pc.ai as TaskDesignation).isRepeated;
214 }
215 return true;
216 }
217 return false;
218 }
219 return true;
220 }
221 return true;
222 }
223 return false;
224 }
225 }
static NoGoal _NoGoalRepeat
Definition: Chara.cs:202
bool alwaysFixCamera
Definition: CoreConfig.cs:576

◆ gameSpeed

override float AM_Adv.gameSpeed
get

Definition at line 187 of file AM_Adv.cs.

188 {
189 get
190 {
191 if (!ShouldPauseGame)
192 {
193 return ActionMode.GameSpeeds[EClass.game.gameSpeedIndex] * ((turbo != 0f) ? turbo : 1f);
194 }
195 return 1f;
196 }
197 }
override bool ShouldPauseGame
Definition: AM_Adv.cs:228
static float[] GameSpeeds
Definition: ActionMode.cs:93
int gameSpeedIndex
Definition: Game.cs:230

◆ mouseTarget

PointTarget AM_Adv.mouseTarget
get

◆ ShouldHideTile

bool AM_Adv.ShouldHideTile
get

Definition at line 175 of file AM_Adv.cs.

176 {
177 get
178 {
179 if (EClass.ui.layers.Count <= 0 && (!EClass.pc.renderer.IsMoving || EInput.rightMouse.pressing) && !(EClass.pc.ai.Current is AI_Goto) && !cursorMove && !EClass.ui.isPointerOverUI)
180 {
181 return EInput.axis != Vector2.zero;
182 }
183 return true;
184 }
185 }
AIAct Current
Definition: AIAct.cs:103

Referenced by OnRenderTile(), and OnUpdateCursor().

◆ ShouldPauseGame

override bool AM_Adv.ShouldPauseGame
get

Definition at line 227 of file AM_Adv.cs.

228 {
229 get
230 {
232 {
233 return EClass.pc.HasNoGoal;
234 }
235 return false;
236 }
237 }

◆ TargetZoom

override float AM_Adv.TargetZoom
get

Definition at line 241 of file AM_Adv.cs.

242 {
243 get
244 {
245 if (!zoomOut2)
246 {
247 return 0.01f * (float)EClass.game.config.defaultZoom;
248 }
249 return 0.01f * (float)EClass.game.config.zoomedZoom;
250 }
251 }
int defaultZoom
Definition: Game.cs:64
int zoomedZoom
Definition: Game.cs:67

Referenced by BaseGameScreen.RefreshPosition().


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