Пример #1
0
            private static bool Prefix(LocalMap __instance, PointerEventData eventData)
            {
                if (eventData.button == PointerEventData.InputButton.Left)
                {
                    if (IsShiftPressed)
                    {
                        CustomMapMarkers.CreateMarker(__instance, eventData);
                    }
                }

                // Don't pass the click through to the map if control or shift are pressed
                return(!(IsControlPressed || IsShiftPressed));
            }
Пример #2
0
        void ISceneHandler.OnAreaBeginUnloading()
        {
            Log.Write($"OnAreaBeginUnloading current=[{CurrentState.CharacterName}] game=[{Game.Instance.Player.MainCharacter.Value?.CharacterName}]");

            string gameCharacterName = Game.Instance.Player.MainCharacter.Value?.CharacterName;

            if (gameCharacterName == null || gameCharacterName.Length == 0)
            {
                // The game does a non-player unload when preparing for a new game, ignore it as there's no player state here
                return;
            }
            if (CurrentState == null || CurrentState.CharacterName != gameCharacterName)
            {
                CurrentState = new SavedState();
            }
            SaveState();
            CustomMapMarkers.RemoveMarkersFromLocalMap();
        }
Пример #3
0
 private static bool Prefix(LocalMap __instance)
 {
     IsLocalMapActive = true;
     CustomMapMarkers.OnShowLocalMap();
     return(true);
 }