public class ItemDescriptors extends SensorModule<UDKBot>
ItemType and ItemDescriptor providing
an easy way to obtain item descriptors for various items in UT2004.
Additionally it provides ammo->weapon mapping via getWeaponForAmmo(ItemType).
It is designed to be initialized inside IUDKBotController.prepareBot(UDKBot) method call
and may be used since IUDKBotController#botInitialized(cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.GameInfo, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.ConfigChange, cz.cuni.amis.pogamut.ut2004.communication.messages.gbinfomessages.InitedMessage)
is called.
worldViewagent, controller, eventBus, log| Constructor and Description |
|---|
ItemDescriptors(UDKBot bot)
Constructor.
|
ItemDescriptors(UDKBot bot,
LogCategory moduleLog) |
| Modifier and Type | Method and Description |
|---|---|
ItemDescriptor |
getDescriptor(ItemType itemType)
Returns the descriptor for the given 'itemType'.
|
ItemDescriptor |
getDescriptor(String inventoryType)
Returns the descriptor for the given 'inventoryType'.
|
ItemType |
getWeaponForAmmo(ItemType ammoType)
Returns a weapon type for the given 'ammoType'.
|
boolean |
hasDescriptor(ItemType itemType)
Tells whether the descriptor for given 'itemType' exists.
|
boolean |
hasDescriptor(String inventoryType)
Tells whether the descriptor for given 'inventoryType' exists.
|
protected void |
start(boolean startPaused)
Provides initialization of the module (clearing internal data structures).
|
cleanUp, getComponentId, getLog, getState, initComponentId, isRunning, kill, pause, reset, resume, stop, toStringpublic ItemDescriptors(UDKBot bot)
bot - owner of the modulepublic ItemDescriptors(UDKBot bot, LogCategory moduleLog)
public ItemType getWeaponForAmmo(ItemType ammoType)
ammoType - public boolean hasDescriptor(ItemType itemType)
itemType - public ItemDescriptor getDescriptor(ItemType itemType)
itemType - public boolean hasDescriptor(String inventoryType)
itemType - public ItemDescriptor getDescriptor(String inventoryType)
itemType - protected void start(boolean startPaused)
start in class AgentModule<UDKBot>Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.