Class LockedDoor
java.lang.Object
marauroa.common.game.Attributes
marauroa.common.game.SlotOwner
marauroa.common.game.RPObject
games.stendhal.server.entity.Entity
games.stendhal.server.entity.mapstuff.portal.Portal
games.stendhal.server.entity.mapstuff.portal.AccessCheckingPortal
games.stendhal.server.entity.mapstuff.portal.Door
games.stendhal.server.entity.mapstuff.portal.LockedDoor
- All Implemented Interfaces:
TurnListener,UseListener,Killer,Cloneable,Iterable<String>,Serializable
- Direct Known Subclasses:
KeyDestroyingDoor
A locked door is a special kind of portal which requires a key to pass it. If
the player carries the key with him, he can use the door just like a normal
portal; it will automatically open and close.
By using the requiredAmount parameter, it can need more than one item for a
key
Note that you can link a door with a portal; that way, people only require
the key when walking in one direction and can walk in the other direction
without any key.
-
Nested Class Summary
Nested classes/interfaces inherited from class games.stendhal.server.entity.mapstuff.portal.AccessCheckingPortal
AccessCheckingPortal.SendMessageNested classes/interfaces inherited from class marauroa.common.game.RPObject
RPObject.ID -
Field Summary
FieldsFields inherited from class games.stendhal.server.entity.mapstuff.portal.AccessCheckingPortal
forceStop, instantAction, listeningRadius, passwordAcceptedMessage, passwordRejectedMessage, portalID, portalIDCounter, rejectedAction, rejectedMessage, requiredPasswordFields inherited from class games.stendhal.server.entity.mapstuff.portal.Portal
ATTR_FACE, ATTR_HIDDEN, ATTR_OFFSET, ATTR_USEFields inherited from class marauroa.common.game.RPObject
INVALID_ID -
Constructor Summary
ConstructorsConstructorDescriptionLockedDoor(String key, String clazz) Creates a new Locked door which need 1 key item.LockedDoor(String key, String clazz, int requiredAmount) Creates a new Locked door. -
Method Summary
Methods inherited from class games.stendhal.server.entity.mapstuff.portal.Door
close, describe, generateRPClass, isOpen, onTurnReached, onUsed, onUsedBackwards, open, updateMethods inherited from class games.stendhal.server.entity.mapstuff.portal.AccessCheckingPortal
getListeningRadius, getPasswordAcceptedMessage, getPasswordRejectedMessage, getRejectedMessage, getRequiredPassword, hasInstanceAction, logic, playerIsPortalUnlocked, rejected, sendMessage, setForceStop, setInstantAction, setListeningRadius, setPasswordAcceptedMessage, setPasswordRejectedMessage, setRejectedAction, setRejectedMessage, setRequiredPasswordMethods inherited from class games.stendhal.server.entity.mapstuff.portal.Portal
getDestinationReference, getDestinationZone, getFaceDirection, getIdentifier, getOffset, hasFaceDirection, hasOffset, isHidden, loaded, onPushedOntoFrom, setDestination, setFaceDirection, setFaceDirection, setHidden, setIdentifier, setIgnoreNoDestination, toString, usePortalMethods inherited from class games.stendhal.server.entity.Entity
getAdjacentNodes, getArea, getArea, getCursor, getDescription, getDescriptionName, getEntitySlot, getHeight, getName, getOrigin, getResistance, getResistance, getTitle, getWidth, getX, getY, getZone, hasDescription, isInSight, isObstacle, nextTo, nextTo, notifyWorldAboutChanges, onAdded, onMoved, onRemoved, setCursor, setDescription, setEntityClass, setEntitySubclass, setMenu, setPosition, setResistance, setSize, setVisibility, slotIterator, slots, squaredDistance, squaredDistance, stoppedMethods inherited from class marauroa.common.game.RPObject
addEvent, addLink, addLink, addMap, addSlot, addSlot, applyDifferences, clearEvents, clearVisible, clone, containsKey, equals, events, eventsIterator, fill, get, getBaseContainer, getBoolean, getContainer, getContainerBaseOwner, getContainerOwner, getContainerSlot, getDifferences, getDouble, getFromSlots, getID, getInt, getLink, getLinkedObject, getMap, getSlot, has, hashCode, hasLink, hasMap, hasSlot, hide, isContained, isEmpty, isStorable, maps, put, put, put, put, readObject, remove, removeLink, removeMap, removeSlot, resetAddedAndDeleted, resetAddedAndDeletedMaps, resetAddedAndDeletedRPLink, resetAddedAndDeletedRPSlot, setAddedMaps, setAddedRPSlot, setContainer, setDeletedMaps, setDeletedRPSlot, setID, size, slots, slotsIterator, store, unhide, unstore, writeObject, writeObject, writeToJsonMethods inherited from class marauroa.common.game.SlotOwner
deserializeRPSlots, fill, serializeRPSlotsMethods inherited from class marauroa.common.game.Attributes
add, applyDifferences, get, getBool, getDouble, getInt, getList, getLong, getRPClass, has, instanceOf, iterator, put, put, put, put, put, readFromMap, remove, resetAddedAndDeletedAttributes, setAddedAttributes, setDeletedAttributes, setRPClass, setRPClass, toAttributeStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
requiredAmount
protected int requiredAmount
-
-
Constructor Details
-
LockedDoor
Creates a new Locked door which need 1 key item.- Parameters:
key- The name of the item that is required to use the doorclazz- The class. Responsible for how this door looks like.
-
LockedDoor
Creates a new Locked door.- Parameters:
key- The name of the item that is required to use the doorclazz- The class. Responsible for how this door looks like.requiredAmount- The number of key items that are needed
-
-
Method Details
-
isAllowed
Description copied from class:AccessCheckingPortalDetermine if this portal can be used.- Specified by:
isAllowedin classAccessCheckingPortal- Parameters:
user- The user to be checked.- Returns:
trueif the user can use the portal.
-