cz.cuni.pogamut.MessageObjects
Class ItemCathegories

java.lang.Object
  extended by cz.cuni.pogamut.MessageObjects.ItemCathegories

public class ItemCathegories
extends java.lang.Object

this class is a database, yet it could be written in XML, but we decided to save parsing of XML and do it this way

anyway, this class stores static HashMap, that includes all known objects in current Unreal Tournament 2004 the key is the object class, atributes are desribing object properties, capabilities etc.
they are HAND MADE!!! so they are possibly a bit inaccurate

well, the atributs are stored in the class ItemCathegory, which has two variables same for all items (type of message and type of item) and variating part composed of variating number of properties those are:

as you can see, every object has multiple lines, that is for the fact, that the class is different for an object laying on the floor and for object (INV message) which has been picked up (AIN message). another reason for multiple lines is in unconsistent naming of objects in UT - like classic sniper rifle and sniper rifle

In weapons ... the int[5] is initial alternative ammo, TODO: wrong! Intialized to 0.

Anyway this will be heavily remade with the next minor version of Pogamut.


Field Summary
static java.util.HashMap<java.lang.String,ItemCathegory> cathegories
           
private static ItemCathegories instance
           
 
Constructor Summary
private ItemCathegories()
           
 
Method Summary
static java.lang.String getNameFromClass(java.lang.String className)
          Returns human readable name of the item that is a key for the ItemCathegory.
static Item processItem(Item item)
          Creates new Item object with properly filled properties accroding to the item's object class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cathegories

public static java.util.HashMap<java.lang.String,ItemCathegory> cathegories

instance

private static ItemCathegories instance
Constructor Detail

ItemCathegories

private ItemCathegories()
Method Detail

getNameFromClass

public static java.lang.String getNameFromClass(java.lang.String className)
Returns human readable name of the item that is a key for the ItemCathegory.

Parameters:
className -
Returns:

processItem

public static Item processItem(Item item)
Creates new Item object with properly filled properties accroding to the item's object class.

Returns:
new Item with all properties filled