Groovy Documentation

de.dewarim.goblin
[Groovy] Class RequiredSlot

java.lang.Object
  de.dewarim.goblin.RequiredSlot

class RequiredSlot

Mapping class between ItemType and EquipmentSlotType. Instances of this class define which EquipmentSlots an Item needs to be usable by a player character. An item may require several types of EquipmentSlots. For example, a 2-handed broadsword will require 2 hands. But this mechanic also may be used for other interesting stuff, like a full suit of rune armor which may only be worn once a complete set has been found. Or a runic woad-skin-painting, which prevents the user from carrying any other kind of armor (ever again). Note: (itemType : slotType) is not required to be unique, you may map itemType[longSword] to slotType[hand] twice.


Property Summary
java.lang.Integer amount

static java.lang.Object belongsTo

 
Constructor Summary
RequiredSlot()

RequiredSlot(EquipmentSlotType slotType, ItemType itemType)

Create a new RequiredSlot instance and add it to the relation instances (ItemType.requiredSlots and EquipmentSlotType.requiredSlots)

 
Method Summary
boolean equals(java.lang.Object o)

int hashCode()

 
Methods inherited from class java.lang.Object
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll()
 

Property Detail

amount

java.lang.Integer amount


belongsTo

static java.lang.Object belongsTo


 
Constructor Detail

RequiredSlot

RequiredSlot()


RequiredSlot

RequiredSlot(EquipmentSlotType slotType, ItemType itemType)
Create a new RequiredSlot instance and add it to the relation instances (ItemType.requiredSlots and EquipmentSlotType.requiredSlots)
Parameters:
slotType - the equipment slot type
itemType - the item type


 
Method Detail

equals

boolean equals(java.lang.Object o)


hashCode

int hashCode()


 

Groovy Documentation