Class HousePortal
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.HousePortal
- All Implemented Interfaces:
UseListener,Killer,Cloneable,Iterable<String>,Serializable
A portal that can be used with a matching
HouseKey.
The requirements are saved with the portal.-
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
Fields 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
ConstructorsConstructorDescriptionHousePortal(String doorId) Create a HousePortal.HousePortal(RPObject object) Create a HousePortal from anRPObject. -
Method Summary
Modifier and TypeMethodDescriptionvoidIncrease the lock number by one.describe()Describes the entity (if a players looks at it).static voidGets other zones that should hear knocking on door.Gets other zones that should hear knocking on door.Get the identification string of this portal.longGet the expiration time of the portal.intGet the number of the lock.getOwner()Get the name of the owner.intGet the house number of this portal.protected booleanDetermine if this portal can be used.voidsetAssociatedZones(String zones) Sets other zones that should hear knocking on door.voidsetDestination(String zone, Object id) Set the destination portal zone and reference.voidsetExpireTime(long time) Set the expiration time of the portal.voidsetIdentifier(Object id) Set the portal reference to identify this specific portal with-in a zone.voidSets the owner of this portal.Methods inherited from class games.stendhal.server.entity.mapstuff.portal.AccessCheckingPortal
getListeningRadius, getPasswordAcceptedMessage, getPasswordRejectedMessage, getRejectedMessage, getRequiredPassword, hasInstanceAction, logic, onUsed, 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, onUsedBackwards, setFaceDirection, setFaceDirection, setHidden, 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, stopped, updateMethods 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
-
Constructor Details
-
HousePortal
Create a HousePortal.- Parameters:
doorId- the door identifier
-
HousePortal
Create a HousePortal from anRPObject. Used when restoring from the database.- Parameters:
object- the correspondingRPObject
-
-
Method Details
-
generateRPClass
public static void generateRPClass() -
setOwner
Sets the owner of this portal.- Parameters:
owner- name of the owner.
-
setDestination
Description copied from class:PortalSet the destination portal zone and reference. The reference should match the same type/value as that passed to setReference() in the corresponding portal.- Overrides:
setDestinationin classPortal- Parameters:
zone- The target zone.id- A reference tag.
-
setIdentifier
Description copied from class:PortalSet the portal reference to identify this specific portal with-in a zone. This value is opaque and requires a working equals(), but typically uses a String or Integer.- Overrides:
setIdentifierin classPortal- Parameters:
id- A reference tag.
-
describe
Description copied from class:EntityDescribes the entity (if a players looks at it). -
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.
-
getDoorId
Get the identification string of this portal.- Returns:
- the identification string
-
getPortalNumber
public int getPortalNumber()Get the house number of this portal.- Returns:
- the house number, or 0 if house number not found
-
getOwner
Get the name of the owner.- Returns:
- owner
-
getLockNumber
public int getLockNumber()Get the number of the lock.- Returns:
- number of the lock
-
changeLock
public void changeLock()Increase the lock number by one. -
getExpireTime
public long getExpireTime()Get the expiration time of the portal.- Returns:
- time in milliseconds
-
setExpireTime
public void setExpireTime(long time) Set the expiration time of the portal.- Parameters:
time- time in milliseconds
-
setAssociatedZones
Sets other zones that should hear knocking on door.- Parameters:
zones- Comma-separated string of zone names.
-
getAssociatedZones
Gets other zones that should hear knocking on door. -
getAssociatedZonesList
Gets other zones that should hear knocking on door.
-