cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands
Class AddInventory

java.lang.Object
  extended by cz.cuni.amis.pogamut.base.communication.messages.CommandMessage
      extended by cz.cuni.amis.pogamut.ut2004.communication.messages.gbcommands.AddInventory

public class AddInventory
extends CommandMessage

Representation of the GameBots2004 command ADDINV. We can add custom inventory for specified bot. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Issuing by bot is allowed just when the game has allowed cheating (bAllowCheats = True in GameBots2004.ini file).


Field Summary
protected  UnrealId Id
          Id of the target bot.
static java.lang.String PROTOTYPE
          Example how the message looks like - used during parser tests.
protected  java.lang.String Type
          Class of the item we want to add.
 
Constructor Summary
AddInventory()
          Creates new instance of command AddInventory.
AddInventory(AddInventory original)
          Cloning constructor.
AddInventory(UnrealId Id, java.lang.String Type)
          Creates new instance of command AddInventory.
 
Method Summary
 UnrealId getId()
          Id of the target bot.
 java.lang.String getType()
          Class of the item we want to add.
 AddInventory setId(UnrealId Id)
          Id of the target bot.
 AddInventory setType(java.lang.String Type)
          Class of the item we want to add.
 java.lang.String toHtmlString()
           
 java.lang.String toMessage()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PROTOTYPE

public static final java.lang.String PROTOTYPE
Example how the message looks like - used during parser tests.

See Also:
Constant Field Values

Id

protected UnrealId Id
Id of the target bot. Is used just when sending command to the server. If sending command to the bot Id is ignored and ADDINV command is executed on the bot (if bAllowCheats == True).


Type

protected java.lang.String Type
Class of the item we want to add. Must be pickup class (e.g. xWeapons.FlakCannonPickup).

Constructor Detail

AddInventory

public AddInventory(UnrealId Id,
                    java.lang.String Type)
Creates new instance of command AddInventory. We can add custom inventory for specified bot. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Issuing by bot is allowed just when the game has allowed cheating (bAllowCheats = True in GameBots2004.ini file). Corresponding GameBots message for this command is ADDINV.

Parameters:
Id - Id of the target bot. Is used just when sending command to the server. If sending command to the bot Id is ignored and ADDINV command is executed on the bot (if bAllowCheats == True).
Type - Class of the item we want to add. Must be pickup class (e.g. xWeapons.FlakCannonPickup).

AddInventory

public AddInventory()
Creates new instance of command AddInventory. We can add custom inventory for specified bot. This command can be issued also by bot on the bot itself (in this case Id attribute is not parsed). Issuing by bot is allowed just when the game has allowed cheating (bAllowCheats = True in GameBots2004.ini file). Corresponding GameBots message for this command is ADDINV.

WARNING: this is empty-command constructor, you have to use setters to fill it up with data that should be sent to GameBots2004!


AddInventory

public AddInventory(AddInventory original)
Cloning constructor.

Parameters:
original -
Method Detail

getId

public UnrealId getId()
Id of the target bot. Is used just when sending command to the server. If sending command to the bot Id is ignored and ADDINV command is executed on the bot (if bAllowCheats == True).


setId

public AddInventory setId(UnrealId Id)
Id of the target bot. Is used just when sending command to the server. If sending command to the bot Id is ignored and ADDINV command is executed on the bot (if bAllowCheats == True).


getType

public java.lang.String getType()
Class of the item we want to add. Must be pickup class (e.g. xWeapons.FlakCannonPickup).


setType

public AddInventory setType(java.lang.String Type)
Class of the item we want to add. Must be pickup class (e.g. xWeapons.FlakCannonPickup).


toString

public java.lang.String toString()
Overrides:
toString in class CommandMessage

toHtmlString

public java.lang.String toHtmlString()

toMessage

public java.lang.String toMessage()