Triggerer.TriggerCode, Triggerer.TrigSignal| Modifier and Type | Field | Description |
|---|---|---|
protected int |
version |
idConverter| Constructor | Description |
|---|---|
NonTriggerer() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addTrigger(java.lang.Object key,
java.lang.String encodedTrigger,
java.util.Map<java.lang.String,java.util.List<Social>> socials,
java.util.List<java.lang.String> errors) |
Parses and adds a new series of steps, which together form
a complete trigger.
|
void |
addTriggerAssist(MOB assistingM,
java.lang.Object key) |
If a trigger allows otherwise non-qualifying participants,
this will allow it to add other participants to the message
listener for their main triggerer and key, using the INCLUDE
trigger directive.
|
int |
compareTo(CMObject o) |
|
CMObject |
copyOf() |
Similar to Cloneable.clone(), but does its best to make sure that
any internal objects to this class are also copyOfed.
|
void |
deleteTracking(MOB mob,
java.lang.Object key) |
If the given trigger key is in progress by the given mob,
this cancels it entirely.
|
CMMsg |
genNextAbleTrigger(MOB hostM,
MOB mob,
java.lang.Object key,
boolean force) |
Generates a message for the next step in the
tracked trigger denoted by the given trigger
key.
|
Triad<MOB,java.lang.Object,java.util.List<java.lang.String>> |
getCompleted(MOB hostM,
java.lang.Object[] keys,
CMMsg msg) |
Given a set of trigger keys that may be progressed or
completed by the given message, this will progress them, and
then return the first one which , because of the message, is
now in a completed state, along with any args accumulated.
|
java.lang.Object[] |
getInProgress(MOB mob) |
Returns the trigger keys for any triggers that the given
mob currently has in progress.
|
java.util.Map<java.lang.String,java.util.List<Social>> |
getSocialSets() |
Returns the internal socials applicable to this trigger.
|
java.lang.String |
getTriggerDesc(java.lang.Object key) |
Returns a description of the trigger steps
of the given trigger key
|
boolean |
hasTrigger(java.lang.Object key) |
Returns whether a trigger with the given key is being tracked here.
|
java.lang.String |
ID() |
The CoffeeMud Java Class ID shared by all instances of
this object.
|
void |
initializeClass() |
Called ONCE after all objects are loaded, but before the map is read in
during initialization.
|
boolean |
isCompleted(java.lang.Object key,
CMMsg msg) |
Given a trigger key, and a message which may be progressed
completed by the given message, this will progress it, and
then return true if it was completed.
|
boolean |
isDisabled() |
If this triggering engine is disabled, this will return true
|
boolean |
isObsolete() |
If something has changed that requires a triggerer or tracker to
be reset, then every instance is notified, and this method can
be called to see if this specific object needs resetting.
|
boolean |
isTracking(MOB mob,
java.lang.Object key) |
Returns whether the given trigger key is in progress
by the given mob
|
boolean |
isTracking(java.lang.Object key,
CMMsg msg) |
Given a message and a trigger key, this will see if
the message might begin, progress, or complete the
given trigger steps.
|
java.lang.String |
name() |
The displayable name of this object.
|
CMObject |
newInstance() |
Returns a new instance of this class.
|
void |
setIgnoreTracking(MOB mob,
boolean truefalse) |
Sets the given mob as being ignored for the purpose of
tracking, or re-enables tracking.
|
Triggerer |
setName(java.lang.String name) |
Some triggers benefit from unique names, and in those cases,
this allows that name to be set for proper matching.
|
void |
setObsolete() |
If this triggering engine needs disabling due to changes in
local abilities, this method can be called.
|
boolean |
wasCompletedRecently(MOB mob,
java.lang.Object key) |
Returns whether the given mob recently completed the trigger
with the given key, typically within 4 seconds.
|
java.lang.Object[] |
whichCompleted(java.lang.Object[] keys,
CMMsg msg) |
Given a set of trigger keys that may be progressed or
completed by the given message, this will progress them, and
then return the set of keys which, because of the message, are
now in a completed state.
|
java.lang.Object[] |
whichTracking(CMMsg msg) |
Given a message, this will check all triggers to see if
the message might begin, progress, or complete one of the
triggers.
|
MOB[] |
whosDoneWaiting() |
If any triggers are currently in a wait state, this will return
which ones, as of the moment this method was called, are now
done waiting.
|
public java.lang.String ID()
CMObjectpublic CMObject newInstance()
CMObjectnewInstance in interface CMObjectpublic java.lang.String name()
CMObjectname in interface CMObjectEnvironmental.Name()public Triggerer setName(java.lang.String name)
Triggererpublic boolean isObsolete()
TriggererisObsolete in interface TriggererTriggerer.setObsolete()public void setObsolete()
TriggerersetObsolete in interface TriggererTriggerer.isObsolete()public boolean isDisabled()
TriggererisDisabled in interface Triggererpublic CMObject copyOf()
CMObjectpublic void initializeClass()
CMObjectinitializeClass in interface CMObjectpublic int compareTo(CMObject o)
compareTo in interface java.lang.Comparable<CMObject>public void addTrigger(java.lang.Object key,
java.lang.String encodedTrigger,
java.util.Map<java.lang.String,java.util.List<Social>> socials,
java.util.List<java.lang.String> errors)
TriggereraddTrigger in interface Triggererkey - the arbitrary but unique key objectencodedTrigger - the encoded trigger stepssocials - null, or list of custom socials that might apply to this triggererrors - null, or a list to put errors intopublic boolean hasTrigger(java.lang.Object key)
TriggererhasTrigger in interface Triggererkey - the trigger keypublic java.lang.String getTriggerDesc(java.lang.Object key)
TriggerergetTriggerDesc in interface Triggererkey - the arbitrary but unique key objectpublic CMMsg genNextAbleTrigger(MOB hostM, MOB mob, java.lang.Object key, boolean force)
TriggerergenNextAbleTrigger in interface TriggererhostM - TODOmob - the mob to checkkey - the arbitrary but unique key objectforce - true to force even an unstarted triggerpublic void setIgnoreTracking(MOB mob, boolean truefalse)
TriggerersetIgnoreTracking in interface Triggerermob - the mob to checktruefalse - true to turn on ignoring, false otherwisepublic void deleteTracking(MOB mob, java.lang.Object key)
TriggererdeleteTracking in interface Triggerermob - the mob to checkkey - the arbitrary but unique key objectpublic boolean isTracking(MOB mob, java.lang.Object key)
TriggererisTracking in interface Triggerermob - the mob to checkkey - the arbitrary but unique key objectpublic boolean isTracking(java.lang.Object key,
CMMsg msg)
TriggererisTracking in interface Triggererkey - the arbitrary but unique key objectmsg - the message that might be relevant.Triggerer.isCompleted(Object, CMMsg),
Triggerer.whichTracking(CMMsg),
Triggerer.whichCompleted(Object[], CMMsg)public java.lang.Object[] whichTracking(CMMsg msg)
TriggererwhichTracking in interface Triggerermsg - the message that might be relevantTriggerer.isCompleted(Object, CMMsg),
Triggerer.isTracking(Object, CMMsg),
Triggerer.whichCompleted(Object[], CMMsg)public boolean isCompleted(java.lang.Object key,
CMMsg msg)
TriggererisCompleted in interface Triggererkey - the arbitrary but unique key objectmsg - the message which may cause a trigger to completeTriggerer.whichTracking(CMMsg),
Triggerer.isTracking(Object, CMMsg),
Triggerer.whichCompleted(Object[], CMMsg)public java.lang.Object[] whichCompleted(java.lang.Object[] keys,
CMMsg msg)
TriggererwhichCompleted in interface Triggererkeys - the arbitrary but unique keys to apply the message tomsg - the message which may cause triggers to completeTriggerer.isCompleted(Object, CMMsg),
Triggerer.whichTracking(CMMsg),
Triggerer.isTracking(Object, CMMsg)public Triad<MOB,java.lang.Object,java.util.List<java.lang.String>> getCompleted(MOB hostM, java.lang.Object[] keys, CMMsg msg)
TriggerergetCompleted in interface TriggererhostM - normally the msg.source(), but who is the trigger hostkeys - the arbitrary but unique keys to apply the message tomsg - the message which may cause triggers to completeTriggerer.isCompleted(Object, CMMsg),
Triggerer.whichTracking(CMMsg),
Triggerer.isTracking(Object, CMMsg)public MOB[] whosDoneWaiting()
TriggererwhosDoneWaiting in interface Triggererpublic java.lang.Object[] getInProgress(MOB mob)
TriggerergetInProgress in interface Triggerermob - the mob who started somethingpublic boolean wasCompletedRecently(MOB mob, java.lang.Object key)
TriggererwasCompletedRecently in interface Triggerermob - the mob to checkkey - the object key to checkpublic java.util.Map<java.lang.String,java.util.List<Social>> getSocialSets()
TriggerergetSocialSets in interface Triggererpublic void addTriggerAssist(MOB assistingM, java.lang.Object key)
TriggereraddTriggerAssist in interface TriggererassistingM - the mob being assisted, the main triggerer mobkey - the key to the trigger