Ignore:
Timestamp:
Jul 3, 2015, 4:16:11 PM (9 years ago)
Author:
alloc
Message:

Server fixes for A12

Location:
binary-improvements/AllocsCommands/Commands
Files:
1 added
8 edited

Legend:

Unmodified
Added
Removed
  • binary-improvements/AllocsCommands/Commands/Give.cs

    r230 r238  
    1212                }
    1313
     14                public override string GetHelp () {
     15                        return "Give an item to a player by dropping it in front of that player\n" +
     16                                   "Usage:\n" +
     17                                   "   give <name / entity id> <item name> <amount>\n" +
     18                                   "Either pass the full name of a player or his entity id (given by e.g. \"lpi\").\n" +
     19                                   "Item name has to be the exact name of an item as listed by \"listitems\".\n" +
     20                                   "Amount is the number of instances of this item to drop (as a single stack).";
     21                }
     22
    1423                public override string[] GetCommands ()
    1524                {
     
    2130                        try {
    2231                                if (_params.Count != 3) {
    23                                         SdtdConsole.Instance.Output ("Usage: give <playername|entityid> <itemname> <amount>");
     32                                        SdtdConsole.Instance.Output ("Wrong number of arguments, expected 3, found " + _params.Count + ".");
    2433                                        return;
    2534                                }
     
    4655                                EntityPlayer p = GameManager.Instance.World.Players.dict [ci.entityId];
    4756
    48                                 InventoryField invField = new InventoryField (iv, n);
     57                                ItemStack invField = new ItemStack (iv, n);
    4958
    5059                                GameManager.Instance.ItemDropServer (invField, p.GetPosition (), Vector3.zero, -1, 50);
  • binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs

    r233 r238  
    99                public override string GetDescription ()
    1010                {
    11                         return "lists all players that were ever online (optionally filtered)";
     11                        return "lists all players that were ever online";
     12                }
     13
     14                public override string GetHelp () {
     15                        return "Usage:\n" +
     16                                   "  1. listknownplayers\n" +
     17                                   "  2. listknownplayers -online\n" +
     18                                   "  3. listknownplayers -notbanned\n" +
     19                                   "  4. listknownplayers <player name>\n" +
     20                                   "1. Lists all players that have ever been online\n" +
     21                                   "2. Lists only the players that are currently online\n" +
     22                                   "3. Lists only the players that are not banned\n" +
     23                                        "4. Lists all players whose name contains the given string";
    1224                }
    1325
  • binary-improvements/AllocsCommands/Commands/ListLandProtection.cs

    r233 r238  
    99                {
    1010                        return "lists all land protection blocks and owners";
     11                }
     12
     13                public override string GetHelp () {
     14                        return "Usage:\n" +
     15                                   "  1. listlandprotection summary\n" +
     16                                   "  2. listlandprotection <steam id>\n" +
     17                                   "  3. listlandprotection <player name / entity id>\n" +
     18                                   "  4. listlandprotection nearby\n" +
     19                                   "  5. listlandprotection nearby <radius>\n" +
     20                                   "1. Lists only players that own claimstones, the number they own and the protection status\n" +
     21                                   "2. Lists only the claims of the player given by his SteamID including the individual claim positions\n" +
     22                                   "3. Same as 2 but player given by his player name or entity id (as given by e.g. \"lpi\")\n" +
     23                                   "4. Lists claims in a square with edge length of 64 around the executing player\n" +
     24                                   "5. Same as 4 but square edge length can be specified";
    1125                }
    1226
     
    7286                                }
    7387
    74                                 Dictionary<Vector3i, PersistentPlayerData> d = ppl.positionToLPBlockOwner;
     88                                Dictionary<Vector3i, PersistentPlayerData> d = ppl.m_lpBlockMap;
    7589                                if (d != null) {
    7690                                        Dictionary<PersistentPlayerData, List<Vector3i>> owners = new Dictionary<PersistentPlayerData, List<Vector3i>> ();
     
    93107                                                        name += " (" + kvp.Key.PlayerId + ")";
    94108
    95                                                         SdtdConsole.Instance.Output (String.Format ("Player \"{0}\" owns {3} keystones (protected: {1}, current hardness multiplier: {2})", name, w.LandClaimIsActive (kvp.Key), w.LandClaimPower (kvp.Key), kvp.Value.Count));
     109                                                        SdtdConsole.Instance.Output (String.Format ("Player \"{0}\" owns {3} keystones (protected: {1}, current hardness multiplier: {2})", name, w.IsLandProtectionValidForPlayer (kvp.Key), w.GetLandProtectionHardnessModifierForPlayer (kvp.Key), kvp.Value.Count));
    96110                                                        if (!summaryOnly) {
    97111                                                                foreach (Vector3i v in kvp.Value) {
  • binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs

    r230 r238  
    99                {
    1010                        return "removes the association of a land protection block to the owner";
     11                }
     12
     13                public override string GetHelp () {
     14                        return "Usage:" +
     15                                   "  1. removelandprotection <steamid>\n" +
     16                                   "  2. removelandprotection <x> <y> <z>\n" +
     17                                   "1. Remove all land claims owned by the user with the given SteamID\n" +
     18                                   "2. Remove only the claim block on the exactly given block position";
    1119                }
    1220
     
    6573                                PersistentPlayerList ppl = GameManager.Instance.GetPersistentPlayerList ();
    6674
    67                                 Dictionary<Vector3i, PersistentPlayerData> d = ppl.positionToLPBlockOwner;
     75                                Dictionary<Vector3i, PersistentPlayerData> d = ppl.m_lpBlockMap;
    6876                                if (d == null || !d.ContainsKey (v)) {
    6977                                        SdtdConsole.Instance.Output ("No land protection block at the given position or not a valid position. Use \"listlandprotection\" to get a list of keystones.");
  • binary-improvements/AllocsCommands/Commands/Reply.cs

    r233 r238  
    99                {
    1010                        return "send a message to  the player who last sent you a PM";
     11                }
     12
     13                public override string GetHelp () {
     14                        return "Usage:\n" +
     15                                   "   reply <message>\n" +
     16                                   "Send the given message to the user you last received a PM from.";
    1117                }
    1218
  • binary-improvements/AllocsCommands/Commands/SayToPlayer.cs

    r230 r238  
    99                {
    1010                        return "send a message to a single player";
     11                }
     12
     13                public override string GetHelp () {
     14                        return "Usage:\n" +
     15                                   "   pm <player name / steam id / entity id> <message>\n" +
     16                                   "Send a PM to the player given by the player name or entity id (as given by e.g. \"lpi\").";
    1117                }
    1218
  • binary-improvements/AllocsCommands/Commands/ShowInventory.cs

    r233 r238  
    99                public override string GetDescription ()
    1010                {
    11                         return "list inventory of a given player (steam id, entity id or name)";
     11                        return "list inventory of a given player";
     12                }
     13
     14                public override string GetHelp () {
     15                        return "Usage:\n" +
     16                                   "   showinventory <steam id / player name / entity id>\n" +
     17                                   "Show the inventory of the player given by his SteamID, player name or\n" +
     18                                   "entity id (as given by e.g. \"lpi\")." +
     19                                   "Note: This only shows the player's inventory after it was first sent to\n" +
     20                                   "the server which happens at least every 30 seconds.";
    1221                }
    1322
  • binary-improvements/AllocsCommands/Commands/TeleportPlayer.cs

    r235 r238  
    1010                {
    1111                        return "teleport a player to a given location";
     12                }
     13
     14                public override string GetHelp () {
     15                        return "Usage:\n" +
     16                                   "  1. teleportplayer <steam id / player name / entity id> <x> <y> <z>\n" +
     17                                   "  2. teleportplayer <steam id / player name / entity id> <target steam id / player name / entity id>\n" +
     18                                   "1. Teleports the player given by his SteamID, player name or entity id (as given by e.g. \"lpi\")\n" +
     19                                   "   to the specified location\n" +
     20                                        "2. As 1, but destination given by another player which has to be online";
    1221                }
    1322
     
    6170                                        }
    6271
    63                                         NetPackage_EntityTeleport pkg = new NetPackage_EntityTeleport (ep1);
     72                                        NetPackageEntityTeleport pkg = new NetPackageEntityTeleport (ep1);
    6473
    6574                                        ci1.SendPackage (pkg);
Note: See TracChangeset for help on using the changeset viewer.