Changeset 238 for binary-improvements/AllocsCommands/Commands/Give.cs
- Timestamp:
- Jul 3, 2015, 4:16:11 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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);
Note:
See TracChangeset
for help on using the changeset viewer.