cz.cuni.amis.pogamut.ut2004.communication.messages
Class ItemType

Package class diagram package ItemType
java.lang.Object
  extended by cz.cuni.amis.pogamut.ut2004.communication.messages.ItemType
All Implemented Interfaces:
Serializable, Comparable<ItemType>

public class ItemType
extends Object
implements Serializable, Comparable<ItemType>

Type of the item.

Note: Items of the same type might have different names in UT engine. Always use equals(Object) to safely compare two ItemTypes.

Use getCategory() to obtain basic categorization of items.

Use getGroup() to obtain detailed group info of items.

Comparable according to getName().

Author:
Juraj 'Loque' Simlovic, Jimmy
See Also:
Serialized Form

Nested Class Summary
static class ItemType.Category
          List of all item categories.
static class ItemType.Group
          List of all item groups.
 
Field Summary
static ItemType ADRENALINE_PACK
          Adrenaline capsule.
static ItemType ASSAULT_RIFLE
          AssaultRifle weapon.
static ItemType ASSAULT_RIFLE_AMMO
          AssaultRifle ammo.
static ItemType ASSAULT_RIFLE_GRENADE
          AssaultRifle secondary ammo.
static ItemType ASSAULT_RIFLE_PROJECTILE
          AssaultRifle projectile.
static ItemType BIO_RIFLE
          BioRifle weapon.
static ItemType BIO_RIFLE_AMMO
          BioRifle ammo.
static ItemType BIO_RIFLE_PROJECTILE
          BioRifle projectile.
static cz.cuni.amis.utils.maps.HashMapSet<ItemType.Category,ItemType> CATEGORIES
          Contains item types that belongs to their categories.
static ItemType FLAK_CANNON
          FlakCannon weapon.
static ItemType FLAK_CANNON_AMMO
          FlakCannon ammo.
static ItemType FLAK_CANNON_CHUNK
          FlakCannon chunk projectile.
static ItemType FLAK_CANNON_SHELL
          FlakCannon shell projectile.
static cz.cuni.amis.utils.maps.HashMapSet<ItemType.Group,ItemType> GROUPS
          Contains item types that belongs to their groups.
static ItemType HEALTH_PACK
          Health kit.
static ItemType ION_PAINTER
          IonPainter weapon.
static ItemType ION_PAINTER_AMMO
          IonPainter ammo.
static ItemType KEY
          Key.
static ItemType LIGHTNING_GUN
          LightningGun weapon (modern sniper weapon).
static ItemType LIGHTNING_GUN_AMMO
          LightningGun ammo.
static ItemType LINK_GUN
          LinkGun weapon.
static ItemType LINK_GUN_AMMO
          LinkGun ammo.
static ItemType LINK_GUN_PROJECTILE
          LinkGun projectile.
static ItemType MINI_HEALTH_PACK
          Health vial.
static ItemType MINIGUN
          Minigun weapon.
static ItemType MINIGUN_AMMO
          Minigun ammo.
static ItemType NONE
          No ItemType
static ItemType ONS_AVRIL
          AVRiL Onslaught weapon.
static ItemType ONS_AVRIL_AMMO
          AVRiL ammo.
static ItemType ONS_AVRIL_PROJECTILE
          AVRiL projectile.
static ItemType ONS_GRENADE_LAUNCHER
          GrenadeLauncher Onslaught weapon.
static ItemType ONS_GRENADE_LAUNCHER_AMMO
          GrenadeLauncher ammo.
static ItemType ONS_GRENADE_LAUNCHER_PROJECTILE
          GrenadeLauncher ammo.
static ItemType ONS_MINE_LAYER
          MineLayer Onslaught weapon.
static ItemType ONS_MINE_LAYER_AMMO
          MineLayer ammo.
static ItemType ONS_MINE_LAYER_PROJECTILE
          MineLayer projectile.
static ItemType ONS_TARGET_PAINTER
          TargetPainter Onslaught weapon.
static ItemType REDEEMER
          Redeemer weapon.
static ItemType REDEEMER_AMMO
          Redeemer ammo.
static ItemType REDEEMER_PROJECTILE
          Redeemer weapon.
static ItemType ROCKET_LAUNCHER
          RocketLauncher weapon.
static ItemType ROCKET_LAUNCHER_AMMO
          RocketLauncher ammo.
static ItemType ROCKET_LAUNCHER_PROJECTILE
          RocketLauncher projectile.
static ItemType SHIELD_GUN
          ShieldGun weapon.
static ItemType SHIELD_GUN_AMMO
          ShieldGun ammo - sent when the bot is spawned.
static ItemType SHIELD_PACK
          SmallShield.
static ItemType SHOCK_RIFLE
          ShockRifle weapon.
static ItemType SHOCK_RIFLE_AMMO
          ShockRifle ammo.
static ItemType SHOCK_RIFLE_PROJECTILE
          ShockRifle projectile.
static ItemType SNIPER_RIFLE
          SniperRifle weapon (classic sniper weapon).
static ItemType SNIPER_RIFLE_AMMO
          SniperRifle ammo.
static ItemType SUPER_HEALTH_PACK
          SuperHealth charger.
static ItemType SUPER_SHIELD_PACK
          SuperShield.
static ItemType SUPER_SHOCK_RIFLE
          SuperShockRifle weapon (instagib weapon).
static ItemType TRANSLOCATOR
          Translocator.
static ItemType TRANSLOCATOR_PROJECTILE
          Translocator Beacon.
static ItemType U_DAMAGE_PACK
          UDamage bonus (damage multiplier).
 
Constructor Summary
ItemType(String name)
          Public constructor - creates ItemType of the EXTRA category and Group OTHER.
 
Method Summary
 int compareTo(ItemType o)
           
 boolean equals(Object obj)
          Indicates whether some other ItemType is "equal to" this one.
 ItemType.Category getCategory()
          Retreives category of the item type.
 ItemType.Group getGroup()
          Retreives group of the item type.
static ItemType getItemType(String utName)
          Retrieves an ItemType for the specified item type name.
 String getName()
           
static ItemType getWeapon(UnrealId id)
          Attempts to recognize the weapon you are currently holding...
 int hashCode()
          Returns a hash code value for the object.
static ItemType MakePrototype(ItemType.Category category, ItemType.Group group, String[] utNames)
          Proto-constructor.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

CATEGORIES

public static final cz.cuni.amis.utils.maps.HashMapSet<ItemType.Category,ItemType> CATEGORIES
Contains item types that belongs to their categories.


GROUPS

public static final cz.cuni.amis.utils.maps.HashMapSet<ItemType.Group,ItemType> GROUPS
Contains item types that belongs to their groups.


TRANSLOCATOR

public static final ItemType TRANSLOCATOR
Translocator.


TRANSLOCATOR_PROJECTILE

public static final ItemType TRANSLOCATOR_PROJECTILE
Translocator Beacon.


SHIELD_GUN

public static final ItemType SHIELD_GUN
ShieldGun weapon.


SHIELD_GUN_AMMO

public static final ItemType SHIELD_GUN_AMMO
ShieldGun ammo - sent when the bot is spawned.


ASSAULT_RIFLE

public static final ItemType ASSAULT_RIFLE
AssaultRifle weapon.


ASSAULT_RIFLE_AMMO

public static final ItemType ASSAULT_RIFLE_AMMO
AssaultRifle ammo.


ASSAULT_RIFLE_GRENADE

public static final ItemType ASSAULT_RIFLE_GRENADE
AssaultRifle secondary ammo.


ASSAULT_RIFLE_PROJECTILE

public static final ItemType ASSAULT_RIFLE_PROJECTILE
AssaultRifle projectile.


BIO_RIFLE

public static final ItemType BIO_RIFLE
BioRifle weapon.


BIO_RIFLE_AMMO

public static final ItemType BIO_RIFLE_AMMO
BioRifle ammo.


BIO_RIFLE_PROJECTILE

public static final ItemType BIO_RIFLE_PROJECTILE
BioRifle projectile.


SHOCK_RIFLE

public static final ItemType SHOCK_RIFLE
ShockRifle weapon.


SHOCK_RIFLE_AMMO

public static final ItemType SHOCK_RIFLE_AMMO
ShockRifle ammo.


SHOCK_RIFLE_PROJECTILE

public static final ItemType SHOCK_RIFLE_PROJECTILE
ShockRifle projectile.


LINK_GUN

public static final ItemType LINK_GUN
LinkGun weapon.


LINK_GUN_AMMO

public static final ItemType LINK_GUN_AMMO
LinkGun ammo.


LINK_GUN_PROJECTILE

public static final ItemType LINK_GUN_PROJECTILE
LinkGun projectile.


MINIGUN

public static final ItemType MINIGUN
Minigun weapon.


MINIGUN_AMMO

public static final ItemType MINIGUN_AMMO
Minigun ammo.


FLAK_CANNON

public static final ItemType FLAK_CANNON
FlakCannon weapon.


FLAK_CANNON_AMMO

public static final ItemType FLAK_CANNON_AMMO
FlakCannon ammo.


FLAK_CANNON_CHUNK

public static final ItemType FLAK_CANNON_CHUNK
FlakCannon chunk projectile.


FLAK_CANNON_SHELL

public static final ItemType FLAK_CANNON_SHELL
FlakCannon shell projectile.


ROCKET_LAUNCHER

public static final ItemType ROCKET_LAUNCHER
RocketLauncher weapon.


ROCKET_LAUNCHER_AMMO

public static final ItemType ROCKET_LAUNCHER_AMMO
RocketLauncher ammo.


ROCKET_LAUNCHER_PROJECTILE

public static final ItemType ROCKET_LAUNCHER_PROJECTILE
RocketLauncher projectile.


LIGHTNING_GUN

public static final ItemType LIGHTNING_GUN
LightningGun weapon (modern sniper weapon).


LIGHTNING_GUN_AMMO

public static final ItemType LIGHTNING_GUN_AMMO
LightningGun ammo.


SNIPER_RIFLE

public static final ItemType SNIPER_RIFLE
SniperRifle weapon (classic sniper weapon).


SNIPER_RIFLE_AMMO

public static final ItemType SNIPER_RIFLE_AMMO
SniperRifle ammo.


REDEEMER

public static final ItemType REDEEMER
Redeemer weapon.


REDEEMER_AMMO

public static final ItemType REDEEMER_AMMO
Redeemer ammo. Does not actually exist.


REDEEMER_PROJECTILE

public static final ItemType REDEEMER_PROJECTILE
Redeemer weapon.


SUPER_SHOCK_RIFLE

public static final ItemType SUPER_SHOCK_RIFLE
SuperShockRifle weapon (instagib weapon).


ION_PAINTER

public static final ItemType ION_PAINTER
IonPainter weapon.


ION_PAINTER_AMMO

public static final ItemType ION_PAINTER_AMMO
IonPainter ammo. Uses BallAmmo odly enough.


ONS_MINE_LAYER

public static final ItemType ONS_MINE_LAYER
MineLayer Onslaught weapon.


ONS_MINE_LAYER_AMMO

public static final ItemType ONS_MINE_LAYER_AMMO
MineLayer ammo.


ONS_MINE_LAYER_PROJECTILE

public static final ItemType ONS_MINE_LAYER_PROJECTILE
MineLayer projectile.


ONS_GRENADE_LAUNCHER

public static final ItemType ONS_GRENADE_LAUNCHER
GrenadeLauncher Onslaught weapon.


ONS_GRENADE_LAUNCHER_AMMO

public static final ItemType ONS_GRENADE_LAUNCHER_AMMO
GrenadeLauncher ammo.


ONS_GRENADE_LAUNCHER_PROJECTILE

public static final ItemType ONS_GRENADE_LAUNCHER_PROJECTILE
GrenadeLauncher ammo.


ONS_AVRIL

public static final ItemType ONS_AVRIL
AVRiL Onslaught weapon.


ONS_AVRIL_AMMO

public static final ItemType ONS_AVRIL_AMMO
AVRiL ammo.


ONS_AVRIL_PROJECTILE

public static final ItemType ONS_AVRIL_PROJECTILE
AVRiL projectile.


ONS_TARGET_PAINTER

public static final ItemType ONS_TARGET_PAINTER
TargetPainter Onslaught weapon.


HEALTH_PACK

public static final ItemType HEALTH_PACK
Health kit.


MINI_HEALTH_PACK

public static final ItemType MINI_HEALTH_PACK
Health vial.


SUPER_HEALTH_PACK

public static final ItemType SUPER_HEALTH_PACK
SuperHealth charger.


SHIELD_PACK

public static final ItemType SHIELD_PACK
SmallShield.


SUPER_SHIELD_PACK

public static final ItemType SUPER_SHIELD_PACK
SuperShield.


U_DAMAGE_PACK

public static final ItemType U_DAMAGE_PACK
UDamage bonus (damage multiplier).


ADRENALINE_PACK

public static final ItemType ADRENALINE_PACK
Adrenaline capsule.


KEY

public static final ItemType KEY
Key.


NONE

public static final ItemType NONE
No ItemType

Constructor Detail

ItemType

public ItemType(String name)
Public constructor - creates ItemType of the EXTRA category and Group OTHER.

Parameters:
name - Type name from GB engine.
Method Detail

getWeapon

public static ItemType getWeapon(UnrealId id)
Attempts to recognize the weapon you are currently holding...

See Self.getWeapon().

May return null == weapon was not recognized. ALWAYS CHECK!

Returns:

toString

public String toString()
Overrides:
toString in class Object

getCategory

public ItemType.Category getCategory()
Retreives category of the item type.

Returns:
Category of the item type.

getGroup

public ItemType.Group getGroup()
Retreives group of the item type.

Returns:
Group of the item type.

equals

public boolean equals(Object obj)
Indicates whether some other ItemType is "equal to" this one.

Overrides:
equals in class Object
Parameters:
obj - Object to be compared with.
Returns:
True, if the objects are equal.

hashCode

public int hashCode()
Returns a hash code value for the object.

Overrides:
hashCode in class Object
Returns:
A hash code value for this object.

MakePrototype

public static ItemType MakePrototype(ItemType.Category category,
                                     ItemType.Group group,
                                     String[] utNames)
Proto-constructor.

Parameters:
category - Category of the item.
group - Group of the item.
utNames - Names of the item in UT engine.
Returns:
Prototype of known ItemType.

getItemType

public static ItemType getItemType(String utName)
Retrieves an ItemType for the specified item type name.

Parameters:
utName - e.g. Item.getType()
Returns:

getName

public String getName()

compareTo

public int compareTo(ItemType o)
Specified by:
compareTo in interface Comparable<ItemType>


Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.