Marauroa Core API: Difference between revisions
Content deleted Content added
imported>Hendrik Brummermann |
imported>Hendrik Brummermann |
||
Line 242:
=IRPZone=
IRPZone is the
The methods are:
<source lang="java">
/** This method is called when the zone is created to populate it */
public void onInit() throws Exception;
/** This method is called when the server finish to save the content of the zone */
public void onFinish() throws Exception;
Line 252 ⟶ 254:
/** This method adds an object to the Zone */
public void add(RPObject object) throws RPObjectInvalidException;
/** This method tag an object of the Zone as modified */
public void modify(RPObject object) throws RPObjectInvalidException;
/** This method removed an object of the Zone and return it.*/
public RPObject remove(RPObject.ID id) throws RPObjectNotFoundException;
/** This method returns an object of the Zone */
public RPObject get(RPObject.ID id) throws RPObjectNotFoundException;
/** This method returns true if the object exists in the Zone */
public boolean has(RPObject.ID id);
Line 266 ⟶ 272:
/** Iterates over the elements of the zone */
public Iterator iterator();
/** Returns the number of elements of the zone */
public long size();
Line 271 ⟶ 278:
/** This method return the perception of a zone for a player */
public Perception getPerception(RPObject.ID id, byte type);
/** This method is called to take zone to the next turn */
public void nextTurn();
/** Method to create the map to send to player's client */
public java.util.List buildMapObjectsList(RPObject.ID id);
</
In most of the cases all you will wish to modify are:
Line 281 ⟶ 290:
* onFinish
* buildMapObjectsList
=IRPRuleProcessor=
| |||