Esempio n. 1
0
        void OpenRequest(bool open, long identityId)
        {
            VRage.Game.MyRelationsBetweenPlayerAndBlock relation = GetUserRelationToOwner(identityId);

            if (relation.IsFriendly())
            {
                Open = open;
            }
        }
Esempio n. 2
0
        void OpenRequest(bool open, long identityId)
        {
            VRage.Game.MyRelationsBetweenPlayerAndBlock relation = GetUserRelationToOwner(identityId);

            MyIdentity identity = MySession.Static.Players.TryGetIdentity(identityId);
            MyPlayer   player   = identity != null && identity.Character != null?MyPlayer.GetPlayerFromCharacter(identity.Character) : null;

            if (relation.IsFriendly() ||
                (identity != null && identity.Character != null && player != null && MySession.Static.IsUserSpaceMaster(player.Client.SteamUserId)))
            {
                Open = open;
            }
        }
Esempio n. 3
0
        public virtual bool HasPlayerAccess(long playerId)
        {
            if (!MyFakes.SHOW_FACTIONS_GUI)
            {
                return(true);
            }

            VRage.Game.MyRelationsBetweenPlayerAndBlock relation = GetUserRelationToOwner(playerId);

            bool accessAllowed = relation.IsFriendly();

            return(accessAllowed);
        }