MUDLaw
public interface LegalLibrary extends CMLibrary
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
INDOORSTR |
The default room title for an indoor room
These get localized later.
|
static java.lang.String |
OUTDOORSTR |
The default room title for an outdoor room
These get localized later.
|
static java.lang.String |
RENTSTR |
The default room description for a room for rent
These get localized later.
|
static java.lang.String |
SALESTR |
The default room description for a room for sale
These get localized later.
|
idConverter
Modifier and Type | Method | Description |
---|---|---|
boolean |
canAttackThisProperty(MOB mob,
PrivateProperty record) |
Property can be attacked if it is unowned, owned by the attacker,
is owned by a clan whose leader the attacker may fight, or owned
by a person whom the attacker may fight.
|
void |
colorRoomForSale(Room R,
LandTitle title,
boolean reset) |
If the given room with the given land title was recently
created, or recently lost its owner and has gone back into
a for-sale state, then this method will update or create
its ID and fix its title and description.
|
boolean |
doesAnyoneHavePrivilegesHere(MOB mob,
java.lang.String overrideID,
Room R) |
Returns whether the given mob, or an optional given property owner,
or literally anyone else in the room, has normal privileges in the
room.
|
boolean |
doesHavePriviledgesHere(MOB mob,
Room room) |
A mob has normal privileges with record to property if they are the owner, married
to the owner, has HOME_PRIVS clan privileges with clan owned property, or with the
property of a clan that your clan is friendly with.
|
boolean |
doesHavePriviledgesInThisDirection(MOB mob,
Room room,
Exit exit) |
Given a mob, a room the mob is currently in, and an exit in that room that
the mob would enter, this will return whether the given mob has normal
privileges in the room in the direction of the exit.
|
boolean |
doesHavePrivilegesWith(MOB mob,
PrivateProperty record) |
A mob has normal privileges with record to property if they are the owner, married
to the owner, has HOME_PRIVS clan privileges with clan owned property, or with the
property of a clan that your clan is friendly with.
|
boolean |
doesHaveWeakPriviledgesHere(MOB mob,
Room room) |
Weak privileges are had when one owns a room, is married to the
owner, is following someone who is an owner, or is a member of
the clan that owns the property (privileges notwithstanding).
|
boolean |
doesHaveWeakPrivilegesWith(MOB mob,
PrivateProperty record) |
Weak privileges are had when one owns property, is married to the
owner, or is a member of the clan that owns the property
(privileges notwithstanding).
|
boolean |
doesOwnThisLand(MOB mob,
Room room) |
Someone is considered the owner if they are the named owner, married
to the named owner, with property ownership privileges to clan owned
property, or are Following someone who is otherwise an owner of some
sort.
|
boolean |
doesOwnThisProperty(MOB mob,
PrivateProperty record) |
Someone is considered the owner if they are the named owner, married
to the named owner, with property ownership privileges to clan owned
property, or are Following someone who is otherwise an owner of some
sort.
|
boolean |
doesOwnThisProperty(MOB mob,
Room room) |
Someone is considered the owner if they are the named owner, married
to the named owner, with property ownership privileges to clan owned
property, or are Following someone who is otherwise an owner of some
sort.
|
java.util.List<LandTitle> |
getAllUniqueLandTitles(Area A,
java.lang.String owner,
boolean includeRentals) |
Scans the given area metro for property titles, returning only the
unique ones (so rooms groups under one title return only the 1 title).
|
java.lang.String |
getClericInfused(Physical P) |
Cleric Infusion is actually more a part of Divine Law
than the normal kind.
|
Deity.DeityWorshipper |
getClericInfusion(Physical P) |
Cleric Infusion is actually more a part of Divine Law
than the normal kind.
|
java.util.Set<Room> |
getHomePeersOnThisFloor(Room room,
java.util.Set<Room> doneRooms) |
Returns all interconnected rooms that are private
property and ownable, even if owned by no one.
|
java.lang.String |
getLandOwnerName(Room room) |
Returns the name of the owner of the given room.
|
LandTitle |
getLandTitle(Area area) |
Returns the private property record of the given area,
if one exists.
|
LandTitle |
getLandTitle(Room room) |
Returns the private property record of the given room,
if one exists, or its area.
|
LegalBehavior |
getLegalBehavior(Area A) |
If an area is subject to law and order,
this method will return the legal system that
applies to it.
|
LegalBehavior |
getLegalBehavior(Room R) |
If a room is in an area subject to law and order,
this method will return the legal system that
applies to it.
|
Area |
getLegalObject(Area A) |
If an area is subject to law and order,
this method will return the exact area object
that the legal system directly applies to.
|
Area |
getLegalObject(Room R) |
If a room is in an area subject to law and order,
this method will return the exact area object
that the legal system directly applies to.
|
MOB |
getPropertyOwner(PrivateProperty record) |
If the owner of the given property record is a clan, this will return
the property owner mob.
|
java.lang.String |
getPropertyOwnerName(Room room) |
Returns the name of the owner of the given room.
|
PrivateProperty |
getPropertyRecord(Area area) |
Returns the private property record of the given area,
if one existsa.
|
PrivateProperty |
getPropertyRecord(Item item) |
Returns the private property record of the given item,
if one exists.
|
PrivateProperty |
getPropertyRecord(Room room) |
Returns the private property record of the given room,
if one exists, or its area.
|
PrivateProperty |
getPropertyRecord(MOB mob) |
Returns the private property record of the given mob,
if one exists.
|
Law |
getTheLaw(Room R) |
If a room is in an area subject to law and order,
this method will return the legal policy object that
applies to it.
|
boolean |
isACity(Area A) |
Returns whether the stats for the given area reflect
that it is legally considered a City.
|
boolean |
isHomeRoomDownstairs(Room room) |
Given a room that is presumably a piece of property, this will return
whether the given room is downstairs (not necc directly) of property
rooms, even if owned by someone else.
|
boolean |
isHomeRoomUpstairs(Room room) |
Given a room that is presumably a piece of property, this will return
whether the given room is upstairs (not necc directly) of property
rooms, even if owned by someone else.
|
boolean |
isLandOwnable(Room room) |
Returns whether the given room has a land
title that makes it possible to own, which
might include the area.
|
boolean |
isLandOwnersName(java.lang.String name,
Room room) |
Someone is considered the direct owner if they are the named owner.
|
boolean |
isLegalJudgeHere(MOB mob) |
Returns whether the given mob is legally considered
a Judge in the place where the mob is presently
located when this method is called.
|
boolean |
isLegalOfficerHere(MOB mob) |
Returns whether the given mob is legally considered
a Police Officer in the place where the mob is presently
located when this method is called.
|
boolean |
isLegalOfficialHere(MOB mob) |
Returns whether the given mob is either a police
officer or a judge in the place where the mob is
presently located when this is called.
|
boolean |
isPropertyOwnersName(java.lang.String name,
Room room) |
Someone is considered the direct owner if they are the named owner.
|
boolean |
isRoomSimilarlyTitled(LandTitle title,
Room R) |
Given a title with an owner, this will return whether
the given room, or any room adjacent to the given room,
is owned by the same owner.
|
boolean |
mayOwnThisItem(MOB mob,
Item item) |
Given a mob and an item, this will return whether the mob
has weak privileges with a property record on the item.
|
boolean |
robberyCheck(PrivateProperty record,
CMMsg msg,
boolean quiet) |
This method is called whenever an action occurs on private property to
determine whether the action might start a "robbery" state.
|
activate, getServiceClient, L, propertiesLoaded, shutdown
copyOf, ID, initializeClass, name, newInstance
static final java.lang.String SALESTR
static final java.lang.String RENTSTR
static final java.lang.String INDOORSTR
static final java.lang.String OUTDOORSTR
Law getTheLaw(Room R)
R
- the room to checkgetLegalObject(Area)
,
getLegalBehavior(Area)
,
getLegalObject(Room)
,
getLegalBehavior(Room)
LegalBehavior getLegalBehavior(Area A)
A
- the area to checkgetTheLaw(Room)
,
getLegalObject(Area)
,
getLegalObject(Room)
,
getLegalBehavior(Room)
Area getLegalObject(Area A)
A
- the area to checkgetTheLaw(Room)
,
getLegalBehavior(Area)
,
getLegalObject(Room)
,
getLegalBehavior(Room)
LegalBehavior getLegalBehavior(Room R)
R
- the room to checkgetTheLaw(Room)
,
getLegalObject(Area)
,
getLegalBehavior(Area)
,
getLegalObject(Room)
Area getLegalObject(Room R)
R
- the room to checkgetTheLaw(Room)
,
getLegalObject(Area)
,
getLegalBehavior(Area)
,
getLegalBehavior(Room)
java.lang.String getLandOwnerName(Room room)
room
- the room to checkgetPropertyOwnerName(Room)
,
isLandOwnable(Room)
boolean isLandOwnable(Room room)
room
- the room to checkgetPropertyOwnerName(Room)
,
getLandOwnerName(Room)
java.lang.String getPropertyOwnerName(Room room)
room
- the room to checkisLandOwnable(Room)
,
getLandOwnerName(Room)
void colorRoomForSale(Room R, LandTitle title, boolean reset)
R
- the room that's for saletitle
- the rooms land titlereset
- reset the room descriptionLandTitle getLandTitle(Area area)
area
- the area to checkgetPropertyRecord(Room)
,
getPropertyRecord(Area)
,
getPropertyRecord(Item)
,
getPropertyRecord(MOB)
,
getLandTitle(Room)
LandTitle getLandTitle(Room room)
room
- the room to checkgetPropertyRecord(Room)
,
getPropertyRecord(Area)
,
getPropertyRecord(Item)
,
getPropertyRecord(MOB)
,
getLandTitle(Area)
PrivateProperty getPropertyRecord(Area area)
area
- the area to checkgetPropertyRecord(Room)
,
getPropertyRecord(Item)
,
getPropertyRecord(MOB)
,
getLandTitle(Area)
,
getLandTitle(Room)
PrivateProperty getPropertyRecord(MOB mob)
mob
- the mob to checkgetPropertyRecord(Room)
,
getPropertyRecord(Item)
,
getPropertyRecord(Area)
,
getLandTitle(Area)
,
getLandTitle(Room)
PrivateProperty getPropertyRecord(Room room)
room
- the room to checkgetPropertyRecord(Area)
,
getPropertyRecord(Item)
,
getPropertyRecord(MOB)
,
getLandTitle(Area)
,
getLandTitle(Room)
PrivateProperty getPropertyRecord(Item item)
item
- the item to checkgetPropertyRecord(Area)
,
getPropertyRecord(Room)
,
getPropertyRecord(MOB)
,
getLandTitle(Area)
,
getLandTitle(Room)
boolean isRoomSimilarlyTitled(LandTitle title, Room R)
title
- the title to serve as basisR
- the room to start checking fromjava.util.Set<Room> getHomePeersOnThisFloor(Room room, java.util.Set<Room> doneRooms)
room
- the room to checkdoneRooms
- a required set to put all peer rooms inisHomeRoomUpstairs(Room)
,
isHomeRoomDownstairs(Room)
boolean isHomeRoomDownstairs(Room room)
room
- the room to check whether it is downstairsisHomeRoomUpstairs(Room)
,
getHomePeersOnThisFloor(Room, Set)
boolean isHomeRoomUpstairs(Room room)
room
- the room to check whether it is upstairsisHomeRoomDownstairs(Room)
,
getHomePeersOnThisFloor(Room, Set)
boolean doesAnyoneHavePrivilegesHere(MOB mob, java.lang.String overrideID, Room R)
mob
- the mob to check firstoverrideID
- "", or another property ownerR
- the room with possible privilegeddoesHavePrivilegesWith(MOB, PrivateProperty)
,
doesHavePriviledgesHere(MOB, Room)
,
doesHavePriviledgesInThisDirection(MOB, Room, Exit)
boolean doesHavePriviledgesHere(MOB mob, Room room)
mob
- the mobroom
- the roomdoesHavePrivilegesWith(MOB, PrivateProperty)
,
doesAnyoneHavePrivilegesHere(MOB, String, Room)
,
doesHavePriviledgesInThisDirection(MOB, Room, Exit)
boolean doesHavePriviledgesInThisDirection(MOB mob, Room room, Exit exit)
mob
- the mobroom
- the mobs current roomexit
- the exit in the room denoting the directiondoesHavePrivilegesWith(MOB, PrivateProperty)
,
doesAnyoneHavePrivilegesHere(MOB, String, Room)
,
doesHavePriviledgesHere(MOB, Room)
boolean doesHavePrivilegesWith(MOB mob, PrivateProperty record)
mob
- the mob to checkrecord
- the property to checkdoesHaveWeakPrivilegesWith(MOB, PrivateProperty)
,
doesHavePriviledgesInThisDirection(MOB, Room, Exit)
,
doesHavePriviledgesHere(MOB, Room)
,
doesAnyoneHavePrivilegesHere(MOB, String, Room)
boolean doesHaveWeakPrivilegesWith(MOB mob, PrivateProperty record)
mob
- the mob to checkrecord
- the record to checkdoesHaveWeakPriviledgesHere(MOB, Room)
boolean doesHaveWeakPriviledgesHere(MOB mob, Room room)
mob
- the mob to checkroom
- the room to checkdoesHaveWeakPrivilegesWith(MOB, PrivateProperty)
boolean isLandOwnersName(java.lang.String name, Room room)
name
- the name (mob or clan) to check for ownership statusroom
- the property to checkdoesOwnThisLand(MOB, Room)
boolean doesOwnThisLand(MOB mob, Room room)
mob
- the mob to check for ownership statusroom
- the property to checkisLandOwnersName(String, Room)
boolean mayOwnThisItem(MOB mob, Item item)
mob
- the mob to check possible item ownership ofitem
- the item to checkdoesHavePrivilegesWith(MOB, PrivateProperty)
,
doesHaveWeakPrivilegesWith(MOB, PrivateProperty)
boolean isPropertyOwnersName(java.lang.String name, Room room)
name
- the name (mob or clan) to check for ownership statusroom
- the property to checkdoesOwnThisProperty(MOB, PrivateProperty)
,
doesOwnThisProperty(MOB, Room)
boolean doesOwnThisProperty(MOB mob, Room room)
mob
- the mob to check for ownership statusroom
- the property to checkdoesOwnThisProperty(MOB, PrivateProperty)
,
isPropertyOwnersName(String, Room)
boolean doesOwnThisProperty(MOB mob, PrivateProperty record)
mob
- the mob to check for ownership statusrecord
- the property record to checkdoesOwnThisProperty(MOB, Room)
,
isPropertyOwnersName(String, Room)
boolean robberyCheck(PrivateProperty record, CMMsg msg, boolean quiet)
record
- the property record for the roommsg
- the event to checkquiet
- true to not report anything to the source of the eventdoesHavePriviledgesHere(MOB, Room)
MOB getPropertyOwner(PrivateProperty record)
record
- the property recordboolean canAttackThisProperty(MOB mob, PrivateProperty record)
mob
- the attackerrecord
- the property record for the given propertyjava.util.List<LandTitle> getAllUniqueLandTitles(Area A, java.lang.String owner, boolean includeRentals)
A
- the area whose rooms and children to scan for titlesowner
- null for all titles, * for all owned titles, or owner nameincludeRentals
- true to include rental property, false otherwiseDeity.DeityWorshipper getClericInfusion(Physical P)
P
- the thing to check for infusionDeity.DeityWorshipper
java.lang.String getClericInfused(Physical P)
P
- the thing to check for infusionboolean isLegalOfficerHere(MOB mob)
mob
- the mob to checkisLegalJudgeHere(MOB)
,
isLegalOfficialHere(MOB)
boolean isLegalJudgeHere(MOB mob)
mob
- the mob to checkisLegalOfficerHere(MOB)
,
isLegalOfficialHere(MOB)
boolean isLegalOfficialHere(MOB mob)
mob
- the mob to checkisLegalJudgeHere(MOB)
,
isLegalOfficerHere(MOB)
boolean isACity(Area A)
A
- the area to check