Package worldBuilder
Class OverlayRule
- java.lang.Object
-
- worldBuilder.ResourceRule
-
- worldBuilder.OverlayRule
-
public class OverlayRule extends ResourceRule
An extension of ResourceRules that includes information about RPGM tiles
-
-
Field Summary
Fields Modifier and Type Field Description inta_maxrange of acceptable Z percentagesinta_minrange of acceptable Z percentagesintd_maxrange of acceptable depth percentagesintd_minrange of acceptable depth percentagesintheightdimensions (if this is a stamp)java.awt.image.BufferedImageiconpreview icon imagestatic inttile_sizeRPGMaker 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 OverlayRule(java.lang.String name)create a new rule
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.lang.String prefix)dump out the extended field attributes (for debugging)OverlayRulefactory(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 ...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)called from ResourceRule.loadFile ...-
Methods inherited from class worldBuilder.ResourceRule
iterator, loadRules, size, wrongFlora
-
-
-
-
Field Detail
-
tile_size
public static int tile_size
RPGMaker tile set
-
height
public int height
dimensions (if this is a stamp)
-
width
public int width
dimensions (if this is a stamp)
-
a_min
public int a_min
range of acceptable Z percentages
-
a_max
public int a_max
range of acceptable Z percentages
-
d_min
public int d_min
range of acceptable depth percentages
-
d_max
public int d_max
range of acceptable depth percentages
-
icon
public java.awt.image.BufferedImage icon
preview icon image
-
-
Method Detail
-
factory
public OverlayRule 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)called from ResourceRule.loadFile ... 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
-
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
-
-