Changeset 238 for binary-improvements/AllocsCommands
- Timestamp:
- Jul 3, 2015, 4:16:11 PM (9 years ago)
- Location:
- binary-improvements/AllocsCommands
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
binary-improvements/AllocsCommands/AllocsCommands.csproj
r233 r238 52 52 <Compile Include="Chat.cs" /> 53 53 <Compile Include="Commands\ListItems.cs" /> 54 <Compile Include="Commands\ GenerateItemIcons.cs" />54 <Compile Include="Commands\ExportItemIcons.cs" /> 55 55 </ItemGroup> 56 56 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -
binary-improvements/AllocsCommands/Chat.cs
r235 r238 13 13 senderName = "Server"; 14 14 } 15 _receiver.SendPackage (new NetPackage _GameInfoMessage (_message, senderName + " (PM)"));15 _receiver.SendPackage (new NetPackageGameMessage (_message, senderName + " (PM)")); 16 16 string receiverName = _receiver.playerName; 17 17 SdtdConsole.Instance.Output ("Message to player " + (receiverName != null ? "\"" + receiverName + "\"" : "unknownName") + " sent with sender \"" + senderName + "\""); -
binary-improvements/AllocsCommands/Commands/Give.cs
r230 r238 12 12 } 13 13 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 14 23 public override string[] GetCommands () 15 24 { … … 21 30 try { 22 31 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 + "."); 24 33 return; 25 34 } … … 46 55 EntityPlayer p = GameManager.Instance.World.Players.dict [ci.entityId]; 47 56 48 I nventoryField invField = new InventoryField(iv, n);57 ItemStack invField = new ItemStack (iv, n); 49 58 50 59 GameManager.Instance.ItemDropServer (invField, p.GetPosition (), Vector3.zero, -1, 50); -
binary-improvements/AllocsCommands/Commands/ListKnownPlayers.cs
r233 r238 9 9 public override string GetDescription () 10 10 { 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"; 12 24 } 13 25 -
binary-improvements/AllocsCommands/Commands/ListLandProtection.cs
r233 r238 9 9 { 10 10 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"; 11 25 } 12 26 … … 72 86 } 73 87 74 Dictionary<Vector3i, PersistentPlayerData> d = ppl. positionToLPBlockOwner;88 Dictionary<Vector3i, PersistentPlayerData> d = ppl.m_lpBlockMap; 75 89 if (d != null) { 76 90 Dictionary<PersistentPlayerData, List<Vector3i>> owners = new Dictionary<PersistentPlayerData, List<Vector3i>> (); … … 93 107 name += " (" + kvp.Key.PlayerId + ")"; 94 108 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)); 96 110 if (!summaryOnly) { 97 111 foreach (Vector3i v in kvp.Value) { -
binary-improvements/AllocsCommands/Commands/RemoveLandProtection.cs
r230 r238 9 9 { 10 10 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"; 11 19 } 12 20 … … 65 73 PersistentPlayerList ppl = GameManager.Instance.GetPersistentPlayerList (); 66 74 67 Dictionary<Vector3i, PersistentPlayerData> d = ppl. positionToLPBlockOwner;75 Dictionary<Vector3i, PersistentPlayerData> d = ppl.m_lpBlockMap; 68 76 if (d == null || !d.ContainsKey (v)) { 69 77 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 9 9 { 10 10 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."; 11 17 } 12 18 -
binary-improvements/AllocsCommands/Commands/SayToPlayer.cs
r230 r238 9 9 { 10 10 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\")."; 11 17 } 12 18 -
binary-improvements/AllocsCommands/Commands/ShowInventory.cs
r233 r238 9 9 public override string GetDescription () 10 10 { 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."; 12 21 } 13 22 -
binary-improvements/AllocsCommands/Commands/TeleportPlayer.cs
r235 r238 10 10 { 11 11 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"; 12 21 } 13 22 … … 61 70 } 62 71 63 NetPackage _EntityTeleport pkg = new NetPackage_EntityTeleport (ep1);72 NetPackageEntityTeleport pkg = new NetPackageEntityTeleport (ep1); 64 73 65 74 ci1.SendPackage (pkg); -
binary-improvements/AllocsCommands/ModInfo.xml
r236 r238 5 5 <Description value="Additional commands for server operation" /> 6 6 <Author value="Christian 'Alloc' Illy" /> 7 <Version value=" 2" />7 <Version value="4" /> 8 8 <Website value="http://7dtd.illy.bz" /> 9 9 </ModInfo>
Note:
See TracChangeset
for help on using the changeset viewer.