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

Package class diagram package ItemType
java.lang.Object
  extended by cz.cuni.amis.pogamut.udk.communication.messages.ItemType
All Implemented Interfaces:
Serializable

public class ItemType
extends Object
implements Serializable

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.

Author:
Juraj 'Loque' Simlovic, Jimmy, Radek 'Black_Hand' Pibil
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 AVRIL
          Avril weapon
static ItemType AVRIL_AMMO
          Avril ammo
static ItemType BASE_ARMOR
          Base armor.
static ItemType BIORIFLE
          Biorifle weapon
static ItemType BIORIFLE_AMMO
          Biorifle ammo
static cz.cuni.amis.utils.maps.HashMapSet<ItemType.Category,ItemType> CATEGORIES
          Contains item types that belongs to their categories.
static ItemType ENFORCER
          Enforcer weapon
static ItemType ENFORCER_AMMO
          Enforcer ammo
static ItemType FLAK_CANNON
          FlakCannon weapon
static ItemType FLAK_CANNON_AMMO
          FlakCannon ammo
static cz.cuni.amis.utils.maps.HashMapSet<ItemType.Group,ItemType> GROUPS
          Contains item types that belongs to their groups.
static ItemType HEALTH_PACK
          Health pack.
static ItemType HEALTH_VIAL
          Health vial.
static ItemType IMPACT_HAMMER
          ImpactHammer weapon
static ItemType INSTAGIBRIFLE
          InstagibRifle weapon
static ItemType INSTAGIBRIFLE_AMMO
          InstagibRifle ammo
static ItemType JUMP_BOOTS
          UDamage bonus (damage multiplier).
static ItemType LINK_GUN
          LinkGun weapon.
static ItemType LINK_GUN_AMMO
          LinkGun ammo.
static ItemType NONE
          No ItemType
static ItemType REDEEMER
          Redeemer weapon
static ItemType REDEEMER_AMMO
          Redeemer ammo
static ItemType ROCKET_LAUNCHER
          RocketLauncher weapon.
static ItemType ROCKET_LAUNCHER_AMMO
          RocketLauncher ammo.
static ItemType SHIELD_BELT
          Shield belt.
static ItemType SHOCK_RIFLE
          ShockRifle weapon.
static ItemType SHOCK_RIFLE_AMMO
          ShockRifle ammo.
static ItemType SNIPERRIFLE
          SniperRifle weapon
static ItemType SNIPERRIFLE_AMMO
          SniperRifle ammo
static ItemType STINGER
          Stinger weapon
static ItemType STINGER_AMMO
          Stinger ammo
static ItemType THIGH_PAD
          Thigh pad.
static ItemType TRANSLOCATOR
          Translocator weapon
static ItemType UDAMAGE
          UDamage bonus (damage multiplier).
static ItemType WEAPON_LOCKER
          Weapons locker
 
Constructor Summary
ItemType(String name)
          Public constructor - creates ItemType of the EXTRA category and Group OTHER.
 
Method Summary
 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()
           
 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.


AVRIL

public static final ItemType AVRIL
Avril weapon


AVRIL_AMMO

public static final ItemType AVRIL_AMMO
Avril ammo


BIORIFLE

public static final ItemType BIORIFLE
Biorifle weapon


BIORIFLE_AMMO

public static final ItemType BIORIFLE_AMMO
Biorifle ammo


ENFORCER

public static final ItemType ENFORCER
Enforcer weapon


ENFORCER_AMMO

public static final ItemType ENFORCER_AMMO
Enforcer ammo


FLAK_CANNON

public static final ItemType FLAK_CANNON
FlakCannon weapon


FLAK_CANNON_AMMO

public static final ItemType FLAK_CANNON_AMMO
FlakCannon ammo


IMPACT_HAMMER

public static final ItemType IMPACT_HAMMER
ImpactHammer weapon


INSTAGIBRIFLE

public static final ItemType INSTAGIBRIFLE
InstagibRifle weapon


INSTAGIBRIFLE_AMMO

public static final ItemType INSTAGIBRIFLE_AMMO
InstagibRifle ammo


REDEEMER

public static final ItemType REDEEMER
Redeemer weapon


REDEEMER_AMMO

public static final ItemType REDEEMER_AMMO
Redeemer ammo


SNIPERRIFLE

public static final ItemType SNIPERRIFLE
SniperRifle weapon


SNIPERRIFLE_AMMO

public static final ItemType SNIPERRIFLE_AMMO
SniperRifle ammo


STINGER

public static final ItemType STINGER
Stinger weapon


STINGER_AMMO

public static final ItemType STINGER_AMMO
Stinger ammo


TRANSLOCATOR

public static final ItemType TRANSLOCATOR
Translocator weapon


SHOCK_RIFLE

public static final ItemType SHOCK_RIFLE
ShockRifle weapon.


SHOCK_RIFLE_AMMO

public static final ItemType SHOCK_RIFLE_AMMO
ShockRifle ammo.


LINK_GUN

public static final ItemType LINK_GUN
LinkGun weapon.


LINK_GUN_AMMO

public static final ItemType LINK_GUN_AMMO
LinkGun ammo.


ROCKET_LAUNCHER

public static final ItemType ROCKET_LAUNCHER
RocketLauncher weapon.


ROCKET_LAUNCHER_AMMO

public static final ItemType ROCKET_LAUNCHER_AMMO
RocketLauncher ammo.


HEALTH_PACK

public static final ItemType HEALTH_PACK
Health pack.


HEALTH_VIAL

public static final ItemType HEALTH_VIAL
Health vial.


THIGH_PAD

public static final ItemType THIGH_PAD
Thigh pad.


BASE_ARMOR

public static final ItemType BASE_ARMOR
Base armor.


SHIELD_BELT

public static final ItemType SHIELD_BELT
Shield belt.


UDAMAGE

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


JUMP_BOOTS

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


WEAPON_LOCKER

public static final ItemType WEAPON_LOCKER
Weapons locker


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

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()


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