java.lang.Object com.realtime.crossfire.jxclient.settings.options.Pickup
public class Pickup
Defines constants for pickup mode.
Field Summary | |
---|---|
private CommandQueue |
commandQueue
The command queue for sending pickup commands. |
static long |
DEFAULT_PICKUP_MODE
The default pickup mode. |
private long |
pickupMode
The pickup mode. |
private java.util.Collection<PickupOption> |
pickupOptions
All pickup options. |
static long |
PU_ARMOUR
Pickup mode: armors. |
static long |
PU_ARROW
Pickup mode: arrows. |
static long |
PU_BOOTS
Pickup mode: boots. |
static long |
PU_BOW
Pickup mode: bows. |
static long |
PU_CLOAK
Pickup mode: cloaks. |
static long |
PU_CONTAINER
Pickup mode: container. |
static long |
PU_DEBUG
Pickup mode: debug. |
static long |
PU_DRINK
Pickup mode: drinks. |
static long |
PU_FLESH
Pickup mode: flesh. |
static long |
PU_FOOD
Pickup mode: food. |
static long |
PU_GLOVES
Pickup mode: gloves. |
static long |
PU_HELMET
Pickup mode: helmets. |
static long |
PU_INHIBIT
Pickup mode: disable pickup. |
static long |
PU_JEWELS
Pickup mode: jewels and money. |
static long |
PU_KEY
Pickup mode: keys. |
static long |
PU_MAGIC_DEVICE
Pickup mode: magic devices. |
static long |
PU_MAGICAL
Pickup mode: magical items. |
static long |
PU_MELEE_WEAPON
Pickup mode: all weapons. |
static long |
PU_MISSILE_WEAPON
Pickup mode: missile weapons. |
static long |
PU_NEW_MODE
Pickup mode: enable newpickup mode. |
static long |
PU_NOT_CURSED
Pickup mode: ignore cursed items. |
static long |
PU_NOTHING
Pickup mode: nothing. |
static long |
PU_POTION
Pickup mode: potions. |
static long |
PU_RATIO
Pickup mode: mask for value/weight ratio. |
static long |
PU_READABLES
Pickup mode: normal books and scrolls. |
static long |
PU_SHIELD
Pickup mode: shields. |
static long |
PU_SKILLSCROLL
Pickup mode: skillscrolls. |
static long |
PU_SPELLBOOK
Pickup mode: spellbooks. |
static long |
PU_STOP
Pickup mode: stop before pickup. |
static long |
PU_VALUABLES
Pickup mode: rings and amulets. |
Constructor Summary | |
---|---|
Pickup(CommandQueue commandQueue,
OptionManager optionManager)
Creates a new instance. |
Method Summary | |
---|---|
long |
getPickupMode()
Returns the pickup mode. |
private Option |
newPickupOption(long option,
java.lang.String tooltipText)
Creates a new PickupOption . |
void |
setPickupMode(long pickupMode)
Sets the pickup mode. |
void |
setPickupMode(long pickupMode,
boolean set)
Sets or unsets the pickup mode. |
void |
update()
Notifies the Crossfire server and all pickup options that the pickup mode has changed. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@NotNull private final CommandQueue commandQueue
public static final long DEFAULT_PICKUP_MODE
private long pickupMode
@NotNull private final java.util.Collection<PickupOption> pickupOptions
public static final long PU_ARMOUR
public static final long PU_ARROW
public static final long PU_BOOTS
public static final long PU_BOW
public static final long PU_CLOAK
public static final long PU_CONTAINER
public static final long PU_DEBUG
public static final long PU_DRINK
public static final long PU_FLESH
public static final long PU_FOOD
public static final long PU_GLOVES
public static final long PU_HELMET
public static final long PU_INHIBIT
public static final long PU_JEWELS
public static final long PU_KEY
public static final long PU_MAGIC_DEVICE
public static final long PU_MAGICAL
public static final long PU_MELEE_WEAPON
public static final long PU_MISSILE_WEAPON
public static final long PU_NEW_MODE
public static final long PU_NOT_CURSED
public static final long PU_NOTHING
public static final long PU_POTION
public static final long PU_RATIO
public static final long PU_READABLES
public static final long PU_SHIELD
public static final long PU_SKILLSCROLL
public static final long PU_SPELLBOOK
public static final long PU_STOP
public static final long PU_VALUABLES
Constructor Detail |
---|
public Pickup(@NotNull CommandQueue commandQueue, @NotNull OptionManager optionManager) throws OptionException
commandQueue
- the command queue for sending pickup commandsoptionManager
- the option manager to use
OptionException
- if an option cannot be registeredMethod Detail |
---|
public long getPickupMode()
@NotNull private Option newPickupOption(long option, @NotNull java.lang.String tooltipText)
PickupOption
.
option
- the pickup valuetooltipText
- the tooltip text to explain this option
public void setPickupMode(long pickupMode)
pickupMode
- the pickup modepublic void setPickupMode(long pickupMode, boolean set)
pickupMode
- the pickup mode(s) to affectset
- true
=set, false
=unsetpublic void update()