Beispiel #1
0
        private void SpawnedGridsSuccessful(HashSet <MyCubeGrid> Grids)
        {
            GridUtilities.BiggestGrid(Grids, out MyCubeGrid BiggestGrid);

            if (BiggestGrid != null && IdentityID != 0)
            {
                GpsSender.SendGps(BiggestGrid.PositionComp.GetPosition(), BiggestGrid.DisplayName, IdentityID);
            }
        }
Beispiel #2
0
        public bool GetGrids(Chat Response, MyCharacter character, string GridNameOREntityID = null)
        {
            if (!GridUtilities.FindGridList(GridNameOREntityID, character, out Grids))
            {
                Response.Respond("No grids found. Check your viewing angle or make sure you spelled right!");
                return(false);
            }

            if (!GridUtilities.BiggestGrid(Grids, out BiggestGrid))
            {
                Response.Respond("Grid incompatible!");
                return(false);
            }


            if (!IsAdmin && !BiggestGrid.BigOwners.Contains(character.GetPlayerIdentityId()))
            {
                Response.Respond("You are not the owner of the biggest grid!");
                return(false);
            }


            if (BiggestGrid.BigOwners.Count == 0)
            {
                BiggestOwner = 0;
            }
            else
            {
                BiggestOwner = BiggestGrid.BigOwners[0];
            }


            if (!GetOwner(BiggestOwner, out OwnerSteamID))
            {
                Response.Respond("Unable to get owners SteamID");
                return(false);
            }


            GridName = BiggestGrid.DisplayName;
            return(true);
        }