Package worldBuilder
Class ResourceRule
- java.lang.Object
-
- worldBuilder.ResourceRule
-
- Direct Known Subclasses:
OverlayRule,RPGMRule
public class ResourceRule extends java.lang.Objectparameters and bids for a single resource (eg flora or mineral) that bids for MeshPoints or export tiles.
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.StringclassNamename of this rule and its classbooleandebugDebug: trace bids from this rulebooleanflexRangeis there flexibility in these rangesjava.lang.StringfloraTypewhere can this creature liveintidresource type ID #java.lang.StringjustificationDebug: explain the basis for the last bidintmaxAltitudeAltitude ranges for this ruledoublemaxDepthwater-depth ranges for this ruledoublemaxFluxriver flux range for this ruledoublemaxRainrainfall range for this ruledoublemaxSlopeslope ranges for this ruledoublemaxTempTemperature range for this ruleintminAltitudeAltitude ranges for this ruledoubleminDepthwater-depth ranges for this ruledoubleminFluxriver flux range for this ruledoubleminRainrainfall range for this ruledoubleminSlopeslope ranges for this ruledoubleminTempTemperature range for this ruleintorderwhen, in the sequence of bids, does this gojava.awt.ColorpreviewColorwhat color should this render as in previewsstatic java.lang.StringruleFilelist of all ingested rulesjava.lang.StringruleNamename of this rule and its classstatic java.lang.StringrulesetbooleantaperedBidtaper bids as we move away from mid-rangeintvigorhow high should this rule bid
-
Constructor Summary
Constructors Constructor Description ResourceRule(java.lang.String name)create a new subtype
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddump(java.lang.String prefix)dump out a Rule (for debugging)static java.util.ListIterator<ResourceRule>iterator()voidloadRules(java.lang.String file)load in resource placement rulesvoidset_attribute(java.lang.String name, int value)voidset_attribute(java.lang.String name, java.lang.String value)voidset_range(java.lang.String name, java.lang.String limit, double value)static intsize()booleanwrongFlora(java.lang.String floraClass)is this rule inapplicable to a particular floral class
-
-
-
Field Detail
-
ruleFile
public static java.lang.String ruleFile
list of all ingested rules
-
ruleset
public static java.lang.String ruleset
-
ruleName
public java.lang.String ruleName
name of this rule and its class
-
className
public java.lang.String className
name of this rule and its class
-
id
public int id
resource type ID #
-
minAltitude
public int minAltitude
Altitude ranges for this rule
-
maxAltitude
public int maxAltitude
Altitude ranges for this rule
-
minSlope
public double minSlope
slope ranges for this rule
-
maxSlope
public double maxSlope
slope ranges for this rule
-
minDepth
public double minDepth
water-depth ranges for this rule
-
maxDepth
public double maxDepth
water-depth ranges for this rule
-
minTemp
public double minTemp
Temperature range for this rule
-
maxTemp
public double maxTemp
Temperature range for this rule
-
minRain
public double minRain
rainfall range for this rule
-
maxRain
public double maxRain
rainfall range for this rule
-
minFlux
public double minFlux
river flux range for this rule
-
maxFlux
public double maxFlux
river flux range for this rule
-
flexRange
public boolean flexRange
is there flexibility in these ranges
-
taperedBid
public boolean taperedBid
taper bids as we move away from mid-range
-
vigor
public int vigor
how high should this rule bid
-
floraType
public java.lang.String floraType
where can this creature live
-
order
public int order
when, in the sequence of bids, does this go
-
previewColor
public java.awt.Color previewColor
what color should this render as in previews
-
debug
public boolean debug
Debug: trace bids from this rule
-
justification
public java.lang.String justification
Debug: explain the basis for the last bid
-
-
Method Detail
-
size
public static int size()
-
iterator
public static java.util.ListIterator<ResourceRule> iterator()
-
set_attribute
public void set_attribute(java.lang.String name, java.lang.String value)
-
set_attribute
public void set_attribute(java.lang.String name, int value)
-
set_range
public void set_range(java.lang.String name, java.lang.String limit, double value)
-
loadRules
public void loadRules(java.lang.String file)
load in resource placement rules- Parameters:
file- name of file to be read
-
dump
public void dump(java.lang.String prefix)
dump out a Rule (for debugging)- Parameters:
prefix- ... leading blanks Note: subclass should call super.dump() and then add its own output
-
wrongFlora
public boolean wrongFlora(java.lang.String floraClass)
is this rule inapplicable to a particular floral class- Parameters:
floraClass- to be checked
-
-