Beispiel #1
0
    public override List <DialogueChoice> GetChoices(GameObject player)
    {
        PlayerQuests          playerQuests = player.GetComponent <PlayerQuests>();
        List <DialogueChoice> result       = new List <DialogueChoice>();

        // accept button if we can accept it
        if (playerQuests.CanAccept(quest))
        {
            result.Add(new DialogueChoice(
                           acceptText,
                           true,
                           (() => {
                playerQuests.Accept(quest);
                UINpcDialogue.singleton.Hide();
            })));
        }

        // complete button if we have this quest
        if (playerQuests.HasActive(quest.name))
        {
            result.Add(new DialogueChoice(
                           completeText,
                           playerQuests.CanComplete(quest.name),
                           (() => {
                playerQuests.Complete(quest);
                UINpcDialogue.singleton.Hide();
            })));
        }

        // reject
        result.Add(new DialogueChoice(rejectText, true, UINpcDialogue.singleton.Hide));

        return(result);
    }
Beispiel #2
0
    void Update()
    {
        GameObject player = Player.player;

        if (!player)
        {
            return;
        }

        PlayerQuests playerQuests = player.GetComponent <PlayerQuests>();

        // only show active quests, no completed ones
        List <Quest> activeQuests = playerQuests.quests.Where(q => !q.completed).ToList();

        // instantiate/destroy enough slots
        UIUtils.BalancePrefabs(slotPrefab.gameObject, activeQuests.Count, content);

        // refresh all
        for (int i = 0; i < activeQuests.Count; ++i)
        {
            UIQuestSlot slot  = content.GetChild(i).GetComponent <UIQuestSlot>();
            Quest       quest = activeQuests[i];

            // name button
            GameObject descriptionPanel = slot.descriptionText.gameObject;
            string     prefix           = descriptionPanel.activeSelf ? hidePrefix : expandPrefix;
            slot.nameButton.GetComponentInChildren <Text>().text = prefix + quest.name;
            slot.nameButton.onClick.SetListener(() => {
                descriptionPanel.SetActive(!descriptionPanel.activeSelf);
            });

            // description
            slot.descriptionText.text = quest.ToolTip(player);
        }
    }
Beispiel #3
0
    // Start is called before the first frame update
    void Start()
    {
        Physics2D.queriesStartInColliders = false;

        instance = this;

        rb = GetComponent <Rigidbody2D>();

        weapons      = GetComponent <PlayerWeapons>();
        playerQuests = GetComponent <PlayerQuests>();

        //Set up the melee and ranged weapons
        meleeWeapon     = weapons.getMeleeWeapon();
        longRangeWeapon = weapons.getRangedWeapon();


        //Give the player starter weapons
        inventory.addWeapon(meleeWeapon);
        inventory.addWeapon(longRangeWeapon);

        //Set up the camera offset
        offset = cam.transform.position - this.transform.position;
        camPos = cam.transform.position;

        //Set up the dash variables
        dashTime = startDashTime;
        dashTrail.gameObject.SetActive(false);
    }
Beispiel #4
0
        private void OnAnyFlagChanged(PlayerQuests quests, PlayerQuestFlag flag)
        {
            var player = GetUnturnedPlayer(quests.player) !;

            var @event =
                new UnturnedPlayerFlagChangedEvent(player, flag);

            Emit(@event);
        }
Beispiel #5
0
        private void OnGroupRankChanged(PlayerQuests sender, EPlayerGroupRank oldGroupRank,
                                        EPlayerGroupRank newGroupRank)
        {
            var player = GetUnturnedPlayer(sender.player) !;

            var @event =
                new UnturnedPlayerGroupRankChangedEvent(player, oldGroupRank, newGroupRank);

            Emit(@event);
        }
            private static void TrackResourceKill(PlayerQuests __instance, Guid treeGuid)
            {
                // You can get the resource asset from the guid
                var asset = (ResourceAsset)Assets.find(treeGuid);

                // The native player
                var playerId = __instance.channel.owner.playerID.steamID;

                OnResourceKill?.Invoke(playerId, asset);
            }
Beispiel #7
0
    void Awake()
    {
        persistantDataLoadedEvent = new UnityEvent();
        devDataLoadedEvent        = new UnityEvent();

        playerQuests    = GetComponent <PlayerQuests>();
        playerCrafting  = GetComponent <PlayerCrafting>();
        playerArtifacts = GetComponent <PlayerArtifacts>();
        playerAbilities = GetComponent <PlayerAbilities>();
        playerStats     = GetComponent <PlayerStats>();
        playerInventory = GetComponent <PlayerInventory>();
    }
Beispiel #8
0
 public bool CanPlayerCompleteAnyQuestHere(PlayerQuests playerQuests)
 {
     // check manually. Linq.Any() is HEAVY(!) on GC and performance
     foreach (ScriptableQuestOffer entry in quests)
     {
         if (entry.completeHere && playerQuests.CanComplete(entry.quest.name))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #9
0
 public bool CanPlayerAcceptAnyQuestHere(PlayerQuests playerQuests)
 {
     // check manually. Linq.Any() is HEAVY(!) on GC and performance
     foreach (ScriptableQuestOffer entry in quests)
     {
         if (entry.acceptHere && playerQuests.CanAccept(entry.quest))
         {
             return(true);
         }
     }
     return(false);
 }
Beispiel #10
0
 private void onPlayerCreated(Player player)
 {
     if (player.channel.isOwner)
     {
         Player.onPlayerCreated = (PlayerCreated)Delegate.Remove(Player.onPlayerCreated, new PlayerCreated(this.onPlayerCreated));
         PlayerQuests quests = Player.player.quests;
         quests.onFlagsUpdated = (FlagsUpdated)Delegate.Combine(quests.onFlagsUpdated, new FlagsUpdated(this.onFlagsUpdated));
         PlayerQuests quests2 = Player.player.quests;
         quests2.onFlagUpdated = (FlagUpdated)Delegate.Combine(quests2.onFlagUpdated, new FlagUpdated(this.onFlagUpdated));
         this.updateConditions();
     }
 }
Beispiel #11
0
 void SaveQuests(SqliteConnection connection, PlayerQuests quests)
 {
     // quests: remove old entries first, then add all new ones
     ExecuteNonQuery(connection, "DELETE FROM character_quests WHERE character=@character", new SqliteParameter("@character", quests.name));
     foreach (Quest quest in quests.quests)
     {
         ExecuteNonQuery(connection, "INSERT INTO character_quests VALUES (@character, @name, @field0, @completed)",
                         new SqliteParameter("@character", quests.name),
                         new SqliteParameter("@name", quest.name),
                         new SqliteParameter("@field0", quest.field0),
                         new SqliteParameter("@completed", Convert.ToInt32(quest.completed)));
     }
 }
Beispiel #12
0
    // events //////////////////////////////////////////////////////////////////
    public override void OnLocation(GameObject player, int questIndex, Collider location)
    {
        PlayerQuests quests = player.GetComponent <PlayerQuests>();

        // the location counts if it has exactly the same name as the quest.
        // simple and stupid.
        if (location.name == name)
        {
            Quest quest = quests.quests[questIndex];
            quest.field0 = 1;
            quests.quests[questIndex] = quest;
        }
    }
Beispiel #13
0
    // events //////////////////////////////////////////////////////////////////
    public override void OnKilled(GameObject player, int questIndex, GameObject victim)
    {
        PlayerQuests quests = player.GetComponent <PlayerQuests>();

        // not done yet, and same name as prefab? (hence same monster?)
        Quest quest = quests.quests[questIndex];

        if (quest.field0 < killAmount && victim.name == killTarget.name)
        {
            // increase int field in quest (up to 'amount')
            ++quest.field0;
            quests.quests[questIndex] = quest;
        }
    }
Beispiel #14
0
 void SaveQuests(PlayerQuests quests)
 {
     // quests: remove old entries first, then add all new ones
     connection.Execute("DELETE FROM character_quests WHERE character=?", quests.name);
     foreach (Quest quest in quests.quests)
     {
         connection.InsertOrReplace(new character_quests {
             character = quests.name,
             name      = quest.name,
             progress  = quest.progress,
             completed = quest.completed
         });
     }
 }
Beispiel #15
0
    // Start is called before the first frame update
    public void Start()
    {
        Physics2D.queriesStartInColliders = false;

        rb     = GetComponent <Rigidbody2D>();
        health = data.health;
        damage = data.damage;
        force  = data.force;

        quests = Player.instance.playerQuests;
        anim   = GetComponent <Animator>();

        canvas.GetComponent <Canvas>().worldCamera = Camera.main;

        boundsX = GetComponent <Collider2D>().bounds.size.x;
        boundsY = GetComponent <Collider2D>().bounds.size.y;
        StartCoroutine("checkDistance");
    }
Beispiel #16
0
    public override string GetText(GameObject player)
    {
        // find quest index in player quest list
        PlayerQuests playerQuests = player.GetComponent <PlayerQuests>();
        int          questIndex   = playerQuests.GetQuestIndexByName(quest.name);

        // running quest: shows description with current progress
        if (questIndex != -1)
        {
            Quest quest = playerQuests.quests[questIndex];
            return(quest.ToolTip(player));
        }
        // new quest
        else
        {
            return(new Quest(quest).ToolTip(player));
        }
    }
Beispiel #17
0
 void LoadQuests(PlayerQuests quests)
 {
     // load quests
     foreach (character_quests row in connection.Query <character_quests>("SELECT * FROM character_quests WHERE character=?", quests.name))
     {
         ScriptableQuest questData;
         if (ScriptableQuest.All.TryGetValue(row.name.GetStableHashCode(), out questData))
         {
             Quest quest = new Quest(questData);
             quest.progress  = row.progress;
             quest.completed = row.completed;
             quests.quests.Add(quest);
         }
         else
         {
             Debug.LogWarning("LoadQuests: skipped quest " + row.name + " for " + quests.name + " because it doesn't exist anymore. If it wasn't removed intentionally then make sure it's in the Resources folder.");
         }
     }
 }
Beispiel #18
0
    public override List <DialogueChoice> GetChoices(GameObject player)
    {
        PlayerQuests          playerQuests = player.GetComponent <PlayerQuests>();
        List <DialogueChoice> result       = new List <DialogueChoice>();

        // quests
        foreach (ScriptableQuest quest in quests)
        {
            // can we accept this yet, or did we accept it already?
            // (don't show quests for level 50 if we are level 1, etc.)
            if (playerQuests.CanAccept(quest) || playerQuests.HasActive(quest.name))
            {
                result.Add(new DialogueChoice(
                               quest.name,
                               true,
                               (() => {
                    // construct a new QuestDialogue for this quest and show it
                    // (need to create runtime scriptable objects via
                    //  ScriptableObject.CreateInstance)
                    QuestDialogue dialogue = CreateInstance <QuestDialogue>();
                    dialogue.quest = quest;
                    UINpcDialogue.singleton.Show(dialogue, player);
                })
                               ));
            }
        }

        // trade
        result.Add(new DialogueChoice(
                       tradeText,
                       true,
                       (() => {
            UIMainPanel.singleton.Show();
            UINpcDialogue.singleton.Hide();
        })
                       ));

        // close
        result.Add(new DialogueChoice(closeText, true, UINpcDialogue.singleton.Hide));

        return(result);
    }
Beispiel #19
0
    void LoadQuests(SqliteConnection connection, PlayerQuests quests)
    {
        // load quests
        List <List <object> > table = ExecuteReader(connection, "SELECT name, field0, completed FROM character_quests WHERE character=@character", new SqliteParameter("@character", quests.name));

        foreach (List <object> row in table)
        {
            string questName = (string)row[0];
            if (ScriptableQuest.dict.TryGetValue(questName, out ScriptableQuest questData))
            {
                Quest quest = new Quest(questData);
                quest.field0    = Convert.ToInt32((long)row[1]);
                quest.completed = ((long)row[2]) != 0; // sqlite has no bool
                quests.quests.Add(quest);
            }
            else
            {
                Debug.LogWarning("LoadQuests: skipped quest " + questData.name + " for " + quests.name + " because it doesn't exist anymore. If it wasn't removed intentionally then make sure it's in the Resources folder.");
            }
        }
    }
        public static void OV_refreshDynamicMap()
        {
            OV_PlayerDashboardInformationUI.mapDynamicContainer.remove();
            bool flag  = !PlayerDashboardInformationUI.active;
            bool flag2 = !flag;

            if (flag2)
            {
                bool flag3 = PlayerDashboardInformationUI.noLabel.isVisible || !Provider.modeConfigData.Gameplay.Group_Map;
                bool flag4 = !flag3;
                if (flag4)
                {
                    bool flag5 = LevelManager.levelType == ELevelType.ARENA;
                    bool flag6 = flag5;
                    if (flag6)
                    {
                        SleekImageTexture sleekImageTexture = new SleekImageTexture(PlayerDashboardInformationUI.icons.load <Texture2D>("Arena_Area"));
                        sleekImageTexture.positionScale_X = LevelManager.arenaTargetCenter.x / (float)(Level.size - Level.border * 2) + 0.5f - LevelManager.arenaTargetRadius / (float)(Level.size - Level.border * 2);
                        sleekImageTexture.positionScale_Y = 0.5f - LevelManager.arenaTargetCenter.z / (float)(Level.size - Level.border * 2) - LevelManager.arenaTargetRadius / (float)(Level.size - Level.border * 2);
                        sleekImageTexture.sizeScale_X     = LevelManager.arenaTargetRadius * 2f / (float)(Level.size - Level.border * 2);
                        sleekImageTexture.sizeScale_Y     = LevelManager.arenaTargetRadius * 2f / (float)(Level.size - Level.border * 2);
                        sleekImageTexture.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture);
                        SleekImageTexture sleekImageTexture2 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture2.positionScale_Y = sleekImageTexture.positionScale_Y;
                        sleekImageTexture2.sizeScale_X     = sleekImageTexture.positionScale_X;
                        sleekImageTexture2.sizeScale_Y     = sleekImageTexture.sizeScale_Y;
                        sleekImageTexture2.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture2);
                        SleekImageTexture sleekImageTexture3 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture3.positionScale_X = sleekImageTexture.positionScale_X + sleekImageTexture.sizeScale_X;
                        sleekImageTexture3.positionScale_Y = sleekImageTexture.positionScale_Y;
                        sleekImageTexture3.sizeScale_X     = 1f - sleekImageTexture.positionScale_X - sleekImageTexture.sizeScale_X;
                        sleekImageTexture3.sizeScale_Y     = sleekImageTexture.sizeScale_Y;
                        sleekImageTexture3.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture3);
                        SleekImageTexture sleekImageTexture4 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture4.sizeScale_X     = 1f;
                        sleekImageTexture4.sizeScale_Y     = sleekImageTexture.positionScale_Y;
                        sleekImageTexture4.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture4);
                        SleekImageTexture sleekImageTexture5 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture5.positionScale_Y = sleekImageTexture.positionScale_Y + sleekImageTexture.sizeScale_Y;
                        sleekImageTexture5.sizeScale_X     = 1f;
                        sleekImageTexture5.sizeScale_Y     = 1f - sleekImageTexture.positionScale_Y - sleekImageTexture.sizeScale_Y;
                        sleekImageTexture5.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture5);
                        SleekImageTexture sleekImageTexture6 = new SleekImageTexture(PlayerDashboardInformationUI.icons.load <Texture2D>("Arena_Area"));
                        sleekImageTexture6.positionScale_X = LevelManager.arenaCurrentCenter.x / (float)(Level.size - Level.border * 2) + 0.5f - LevelManager.arenaCurrentRadius / (float)(Level.size - Level.border * 2);
                        sleekImageTexture6.positionScale_Y = 0.5f - LevelManager.arenaCurrentCenter.z / (float)(Level.size - Level.border * 2) - LevelManager.arenaCurrentRadius / (float)(Level.size - Level.border * 2);
                        sleekImageTexture6.sizeScale_X     = LevelManager.arenaCurrentRadius * 2f / (float)(Level.size - Level.border * 2);
                        sleekImageTexture6.sizeScale_Y     = LevelManager.arenaCurrentRadius * 2f / (float)(Level.size - Level.border * 2);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture6);
                        SleekImageTexture sleekImageTexture7 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture7.positionScale_Y = sleekImageTexture6.positionScale_Y;
                        sleekImageTexture7.sizeScale_X     = sleekImageTexture6.positionScale_X;
                        sleekImageTexture7.sizeScale_Y     = sleekImageTexture6.sizeScale_Y;
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture7);
                        SleekImageTexture sleekImageTexture8 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture8.positionScale_X = sleekImageTexture6.positionScale_X + sleekImageTexture6.sizeScale_X;
                        sleekImageTexture8.positionScale_Y = sleekImageTexture6.positionScale_Y;
                        sleekImageTexture8.sizeScale_X     = 1f - sleekImageTexture6.positionScale_X - sleekImageTexture6.sizeScale_X;
                        sleekImageTexture8.sizeScale_Y     = sleekImageTexture6.sizeScale_Y;
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture8);
                        SleekImageTexture sleekImageTexture9 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture9.sizeScale_X = 1f;
                        sleekImageTexture9.sizeScale_Y = sleekImageTexture6.positionScale_Y;
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture9);
                        SleekImageTexture sleekImageTexture10 = new SleekImageTexture((Texture2D)Resources.Load("Materials/Pixel"));
                        sleekImageTexture10.positionScale_Y = sleekImageTexture6.positionScale_Y + sleekImageTexture6.sizeScale_Y;
                        sleekImageTexture10.sizeScale_X     = 1f;
                        sleekImageTexture10.sizeScale_Y     = 1f - sleekImageTexture6.positionScale_Y - sleekImageTexture6.sizeScale_Y;
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture10);
                    }
                    foreach (SteamPlayer steamPlayer in Provider.clients)
                    {
                        bool flag7 = steamPlayer.model == null;
                        bool flag8 = !flag7;
                        if (flag8)
                        {
                            PlayerQuests quests = steamPlayer.player.quests;
                            bool         flag9  = steamPlayer.playerID.steamID != Provider.client && !quests.isMemberOfSameGroupAs(OptimizationVariables.MainPlayer) && (!MiscOptions.ShowPlayersOnMap || !DrawUtilities.ShouldRun() || PlayerCoroutines.IsSpying);
                            bool         flag10 = !flag9;
                            if (flag10)
                            {
                                SleekImageTexture sleekImageTexture11 = new SleekImageTexture();
                                sleekImageTexture11.positionOffset_X = -10;
                                sleekImageTexture11.positionOffset_Y = -10;
                                sleekImageTexture11.positionScale_X  = steamPlayer.player.transform.position.x / (float)(Level.size - Level.border * 2) + 0.5f;
                                sleekImageTexture11.positionScale_Y  = 0.5f - steamPlayer.player.transform.position.z / (float)(Level.size - Level.border * 2);
                                sleekImageTexture11.sizeOffset_X     = 20;
                                sleekImageTexture11.sizeOffset_Y     = 20;
                                bool flag11 = !OptionsSettings.streamer;
                                bool flag12 = flag11;
                                if (flag12)
                                {
                                    sleekImageTexture11.texture = Provider.provider.communityService.getIcon(steamPlayer.playerID.steamID, false);
                                }
                                sleekImageTexture11.addLabel(steamPlayer.playerID.characterName, ESleekSide.RIGHT);
                                sleekImageTexture11.shouldDestroyTexture = true;
                                OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture11);
                                bool flag13 = !quests.isMarkerPlaced;
                                bool flag14 = !flag13;
                                if (flag14)
                                {
                                    SleekImageTexture sleekImageTexture12 = new SleekImageTexture(PlayerDashboardInformationUI.icons.load <Texture2D>("Marker"));
                                    sleekImageTexture12.positionScale_X  = quests.markerPosition.x / (float)(Level.size - Level.border * 2) + 0.5f;
                                    sleekImageTexture12.positionScale_Y  = 0.5f - quests.markerPosition.z / (float)(Level.size - Level.border * 2);
                                    sleekImageTexture12.positionOffset_X = -10;
                                    sleekImageTexture12.positionOffset_Y = -10;
                                    sleekImageTexture12.sizeOffset_X     = 20;
                                    sleekImageTexture12.sizeOffset_Y     = 20;
                                    sleekImageTexture12.backgroundColor  = steamPlayer.markerColor;
                                    sleekImageTexture12.addLabel(steamPlayer.playerID.characterName, ESleekSide.RIGHT);
                                    OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture12);
                                }
                            }
                        }
                    }
                    bool flag15 = OptimizationVariables.MainPlayer == null;
                    bool flag16 = !flag15;
                    if (flag16)
                    {
                        SleekImageTexture sleekImageTexture13 = new SleekImageTexture();
                        sleekImageTexture13.positionOffset_X = -10;
                        sleekImageTexture13.positionOffset_Y = -10;
                        sleekImageTexture13.positionScale_X  = OptimizationVariables.MainPlayer.transform.position.x / (float)(Level.size - Level.border * 2) + 0.5f;
                        sleekImageTexture13.positionScale_Y  = 0.5f - OptimizationVariables.MainPlayer.transform.position.z / (float)(Level.size - Level.border * 2);
                        sleekImageTexture13.sizeOffset_X     = 20;
                        sleekImageTexture13.sizeOffset_Y     = 20;
                        sleekImageTexture13.isAngled         = true;
                        sleekImageTexture13.angle            = OptimizationVariables.MainPlayer.transform.rotation.eulerAngles.y;
                        sleekImageTexture13.texture          = PlayerDashboardInformationUI.icons.load <Texture2D>("Player");
                        sleekImageTexture13.backgroundTint   = ESleekTint.FOREGROUND;
                        sleekImageTexture13.addLabel(string.IsNullOrEmpty(Characters.active.nick) ? Characters.active.name : Characters.active.nick, ESleekSide.RIGHT);
                        OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture13);
                    }
                }
            }
        }
Beispiel #21
0
    //public GameObject enemyBars;

    void Awake()
    {
        fightManager     = FindObjectOfType <FightManager>();
        bossFightManager = FindObjectOfType <BossFightManager>();
        playerQuests     = FindObjectOfType <PlayerQuests>();
    }
		public static void OV_refreshDynamicMap()
		{
			OV_PlayerDashboardInformationUI.mapDynamicContainer.remove();
			if (!PlayerDashboardInformationUI.active)
			{
				return;
			}
			if (!PlayerDashboardInformationUI.noLabel.isVisible && Provider.modeConfigData.Gameplay.Group_Map)
			{
				if (LevelManager.levelType == ELevelType.ARENA)
				{
					Texture2D newTexture = PlayerDashboardInformationUI.icons.load<Texture2D>("Arena_Area");
					Texture2D newTexture2 = (Texture2D)Resources.Load("Materials/Pixel");
					if ((double)Mathf.Abs(LevelManager.arenaTargetRadius - 0.5f) > 0.01)
					{
						SleekImageTexture sleekImageTexture = new SleekImageTexture(newTexture);
						sleekImageTexture.positionScale_X = LevelManager.arenaTargetCenter.x / (float)(Level.size - Level.border * 2) + 0.5f - LevelManager.arenaTargetRadius / (float)(Level.size - Level.border * 2);
						sleekImageTexture.positionScale_Y = 0.5f - LevelManager.arenaTargetCenter.z / (float)(Level.size - Level.border * 2) - LevelManager.arenaTargetRadius / (float)(Level.size - Level.border * 2);
						sleekImageTexture.sizeScale_X = LevelManager.arenaTargetRadius * 2f / (float)(Level.size - Level.border * 2);
						sleekImageTexture.sizeScale_Y = LevelManager.arenaTargetRadius * 2f / (float)(Level.size - Level.border * 2);
						sleekImageTexture.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
						OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture);
						SleekImageTexture sleekImageTexture2 = new SleekImageTexture(newTexture2);
						sleekImageTexture2.positionScale_Y = sleekImageTexture.positionScale_Y;
						sleekImageTexture2.sizeScale_X = sleekImageTexture.positionScale_X;
						sleekImageTexture2.sizeScale_Y = sleekImageTexture.sizeScale_Y;
						sleekImageTexture2.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
						OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture2);
						SleekImageTexture sleekImageTexture3 = new SleekImageTexture(newTexture2);
						sleekImageTexture3.positionScale_X = sleekImageTexture.positionScale_X + sleekImageTexture.sizeScale_X;
						sleekImageTexture3.positionScale_Y = sleekImageTexture.positionScale_Y;
						sleekImageTexture3.sizeScale_X = 1f - sleekImageTexture.positionScale_X - sleekImageTexture.sizeScale_X;
						sleekImageTexture3.sizeScale_Y = sleekImageTexture.sizeScale_Y;
						sleekImageTexture3.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
						OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture3);
						SleekImageTexture sleekImageTexture4 = new SleekImageTexture(newTexture2);
						sleekImageTexture4.sizeScale_X = 1f;
						sleekImageTexture4.sizeScale_Y = sleekImageTexture.positionScale_Y;
						sleekImageTexture4.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
						OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture4);
						SleekImageTexture sleekImageTexture5 = new SleekImageTexture(newTexture2);
						sleekImageTexture5.positionScale_Y = sleekImageTexture.positionScale_Y + sleekImageTexture.sizeScale_Y;
						sleekImageTexture5.sizeScale_X = 1f;
						sleekImageTexture5.sizeScale_Y = 1f - sleekImageTexture.positionScale_Y - sleekImageTexture.sizeScale_Y;
						sleekImageTexture5.backgroundColor = new Color(1f, 1f, 0f, 0.5f);
						OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture5);
					}
					SleekImageTexture sleekImageTexture6 = new SleekImageTexture(newTexture);
					sleekImageTexture6.positionScale_X = LevelManager.arenaCurrentCenter.x / (float)(Level.size - Level.border * 2) + 0.5f - LevelManager.arenaCurrentRadius / (float)(Level.size - Level.border * 2);
					sleekImageTexture6.positionScale_Y = 0.5f - LevelManager.arenaCurrentCenter.z / (float)(Level.size - Level.border * 2) - LevelManager.arenaCurrentRadius / (float)(Level.size - Level.border * 2);
					sleekImageTexture6.sizeScale_X = LevelManager.arenaCurrentRadius * 2f / (float)(Level.size - Level.border * 2);
					sleekImageTexture6.sizeScale_Y = LevelManager.arenaCurrentRadius * 2f / (float)(Level.size - Level.border * 2);
					OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture6);
					SleekImageTexture sleekImageTexture7 = new SleekImageTexture(newTexture2);
					sleekImageTexture7.positionScale_Y = sleekImageTexture6.positionScale_Y;
					sleekImageTexture7.sizeScale_X = sleekImageTexture6.positionScale_X;
					sleekImageTexture7.sizeScale_Y = sleekImageTexture6.sizeScale_Y;
					OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture7);
					SleekImageTexture sleekImageTexture8 = new SleekImageTexture(newTexture2);
					sleekImageTexture8.positionScale_X = sleekImageTexture6.positionScale_X + sleekImageTexture6.sizeScale_X;
					sleekImageTexture8.positionScale_Y = sleekImageTexture6.positionScale_Y;
					sleekImageTexture8.sizeScale_X = 1f - sleekImageTexture6.positionScale_X - sleekImageTexture6.sizeScale_X;
					sleekImageTexture8.sizeScale_Y = sleekImageTexture6.sizeScale_Y;
					OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture8);
					SleekImageTexture sleekImageTexture9 = new SleekImageTexture(newTexture2);
					sleekImageTexture9.sizeScale_X = 1f;
					sleekImageTexture9.sizeScale_Y = sleekImageTexture6.positionScale_Y;
					OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture9);
					SleekImageTexture sleekImageTexture10 = new SleekImageTexture(newTexture2);
					sleekImageTexture10.positionScale_Y = sleekImageTexture6.positionScale_Y + sleekImageTexture6.sizeScale_Y;
					sleekImageTexture10.sizeScale_X = 1f;
					sleekImageTexture10.sizeScale_Y = 1f - sleekImageTexture6.positionScale_Y - sleekImageTexture6.sizeScale_Y;
					OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture10);
				}
				Texture2D newTexture3 = PlayerDashboardInformationUI.icons.load<Texture2D>("Marker");
				foreach (SteamPlayer steamPlayer in Provider.clients)
				{
					if (!(steamPlayer.model == null))
					{
						PlayerQuests quests = steamPlayer.player.quests;
						if ((MiscOptions.ShowPlayersOnMap || steamPlayer.playerID.steamID == Provider.client || quests.isMemberOfSameGroupAs(Player.player)) && quests.isMarkerPlaced)
						{
							SleekImageTexture sleekImageTexture11 = new SleekImageTexture(newTexture3);
							sleekImageTexture11.positionScale_X = quests.markerPosition.x / (float)(Level.size - Level.border * 2) + 0.5f;
							sleekImageTexture11.positionScale_Y = 0.5f - quests.markerPosition.z / (float)(Level.size - Level.border * 2);
							sleekImageTexture11.positionOffset_X = -10;
							sleekImageTexture11.positionOffset_Y = -10;
							sleekImageTexture11.sizeOffset_X = 20;
							sleekImageTexture11.sizeOffset_Y = 20;
							sleekImageTexture11.backgroundColor = steamPlayer.markerColor;
							if (!string.IsNullOrEmpty(steamPlayer.playerID.nickName))
							{
								sleekImageTexture11.addLabel(steamPlayer.playerID.nickName, ESleekSide.RIGHT);
							}
							else
							{
								sleekImageTexture11.addLabel(steamPlayer.playerID.characterName, ESleekSide.RIGHT);
							}
							OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture11);
						}
					}
				}
				bool areSpecStatsVisible = Player.player.look.areSpecStatsVisible;
				for (int i = 0; i < Provider.clients.Count; i++)
				{
					SteamPlayer steamPlayer2 = Provider.clients[i];
					if (steamPlayer2.model != null && steamPlayer2.playerID.steamID != Provider.client)
					{
						bool flag = steamPlayer2.player.quests.isMemberOfSameGroupAs(Player.player);
						if (MiscOptions.ShowPlayersOnMap || areSpecStatsVisible || flag)
						{
							SleekImageTexture sleekImageTexture12 = new SleekImageTexture();
							sleekImageTexture12.positionOffset_X = -10;
							sleekImageTexture12.positionOffset_Y = -10;
							sleekImageTexture12.positionScale_X = steamPlayer2.player.transform.position.x / (float)(Level.size - Level.border * 2) + 0.5f;
							sleekImageTexture12.positionScale_Y = 0.5f - steamPlayer2.player.transform.position.z / (float)(Level.size - Level.border * 2);
							sleekImageTexture12.sizeOffset_X = 20;
							sleekImageTexture12.sizeOffset_Y = 20;
							if (!OptionsSettings.streamer)
							{
								sleekImageTexture12.texture = Provider.provider.communityService.getIcon(steamPlayer2.playerID.steamID, false);
							}
							if (!string.IsNullOrEmpty(steamPlayer2.playerID.nickName))
							{
								sleekImageTexture12.addLabel(steamPlayer2.playerID.nickName, ESleekSide.RIGHT);
							}
							else
							{
								sleekImageTexture12.addLabel(steamPlayer2.playerID.characterName, ESleekSide.RIGHT);
							}
							sleekImageTexture12.shouldDestroyTexture = true;
							OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture12);
						}
					}
				}
				if (Player.player != null)
				{
					SleekImageTexture sleekImageTexture13 = new SleekImageTexture();
					sleekImageTexture13.positionOffset_X = -10;
					sleekImageTexture13.positionOffset_Y = -10;
					sleekImageTexture13.positionScale_X = Player.player.transform.position.x / (float)(Level.size - Level.border * 2) + 0.5f;
					sleekImageTexture13.positionScale_Y = 0.5f - Player.player.transform.position.z / (float)(Level.size - Level.border * 2);
					sleekImageTexture13.sizeOffset_X = 20;
					sleekImageTexture13.sizeOffset_Y = 20;
					sleekImageTexture13.isAngled = true;
					sleekImageTexture13.angle = Player.player.transform.rotation.eulerAngles.y;
					sleekImageTexture13.texture = PlayerDashboardInformationUI.icons.load<Texture2D>("Player");
					sleekImageTexture13.backgroundTint = ESleekTint.FOREGROUND;
					if (string.IsNullOrEmpty(Characters.active.nick))
					{
						sleekImageTexture13.addLabel(Characters.active.name, ESleekSide.RIGHT);
					}
					else
					{
						sleekImageTexture13.addLabel(Characters.active.nick, ESleekSide.RIGHT);
					}
					OV_PlayerDashboardInformationUI.mapDynamicContainer.add(sleekImageTexture13);
				}
			}
		}