Package worldBuilder
Class RPGMRule
- java.lang.Object
 - 
- worldBuilder.ResourceRule
 - 
- worldBuilder.RPGMRule
 
 
 
- 
public class RPGMRule extends ResourceRule
An extension of ResourceRules that includes information about RPGM tiles 
- 
- 
Field Summary
Fields Modifier and Type Field Description intaltTilebase tile number for what we might surroundbooleanbarrierdoes this tile represent an impassable barrierintbaseTilebase tile number for this ruleintheightdimensions (if this is a stamp)intlevelRPGMaker map levelintneighborsnumber of neighbors for auto-tilingintterrainTerrainType for this rulestatic inttileSetRPGMaker tile setintwidthdimensions (if this is a stamp)- 
Fields inherited from class worldBuilder.ResourceRule
className, debug, flexRange, floraType, id, justification, maxAltitude, maxDepth, maxFlux, maxRain, maxSlope, maxTemp, minAltitude, minDepth, minFlux, minRain, minSlope, minTemp, order, previewColor, ruleFile, ruleName, ruleset, taperedBid, vigor 
 - 
 
- 
Constructor Summary
Constructors Constructor Description RPGMRule(java.lang.String name)create a new rule 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.lang.String prefix)dump out the extended field attributes (for debugging)RPGMRulefactory(java.lang.String name)Factory method (to permit subclass instantiation by ResourceRule.loadFile)voidset_attribute(java.lang.String name, int value)called from ResourceRule.loadFile set an extended attribute (integer value)voidset_attribute(java.lang.String name, java.lang.String value)called from ResourceRule.loadFile ...voidset_range(java.lang.String name, java.lang.String limit, double value)set an extended attribute (min/max double value)static RPGMRuletileRule(int base)return a reference to the first rule for a specified base tilebooleanwrongTerrain(int terrain)is this rule inapplicable to a particular terrain- 
Methods inherited from class worldBuilder.ResourceRule
iterator, loadRules, size, wrongFlora 
 - 
 
 - 
 
- 
- 
Field Detail
- 
tileSet
public static int tileSet
RPGMaker tile set 
- 
level
public int level
RPGMaker map level 
- 
baseTile
public int baseTile
base tile number for this rule 
- 
altTile
public int altTile
base tile number for what we might surround 
- 
terrain
public int terrain
TerrainType for this rule 
- 
barrier
public boolean barrier
does this tile represent an impassable barrier 
- 
height
public int height
dimensions (if this is a stamp) 
- 
width
public int width
dimensions (if this is a stamp) 
- 
neighbors
public int neighbors
number of neighbors for auto-tiling 
 - 
 
- 
Method Detail
- 
factory
public RPGMRule factory(java.lang.String name)
Factory method (to permit subclass instantiation by ResourceRule.loadFile)- Parameters:
 name- of this rule Note: this method is called by ResourceRule.read() when the rule reading is complete, which means that any extended attributes have already been set (in the static save variables). We copy those into the new rule, and then reinitialize them.
 
- 
set_attribute
public void set_attribute(java.lang.String name, java.lang.String value)called from ResourceRule.loadFile ... set an extended attribute (string value)- Overrides:
 set_attributein classResourceRule- Parameters:
 name- of the attribute being setvalue- to be set
 
- 
set_attribute
public void set_attribute(java.lang.String name, int value)called from ResourceRule.loadFile set an extended attribute (integer value)- Overrides:
 set_attributein classResourceRule- Parameters:
 name- of the attribute being setvalue- to be set
 
- 
set_range
public void set_range(java.lang.String name, java.lang.String limit, double value)set an extended attribute (min/max double value)- Overrides:
 set_rangein classResourceRule- Parameters:
 name- of the attribute being setlimit- (min or max)value- to be set
 
- 
tileRule
public static RPGMRule tileRule(int base)
return a reference to the first rule for a specified base tile- Parameters:
 base- tile number
 
- 
wrongTerrain
public boolean wrongTerrain(int terrain)
is this rule inapplicable to a particular terrain- Parameters:
 terrain- type to be checked
 
- 
dump
public void dump(java.lang.String prefix)
dump out the extended field attributes (for debugging)- Overrides:
 dumpin classResourceRule- Parameters:
 prefix- ... leading blanks Note: subclass should call super.dump() and then add its own output
 
 - 
 
 -