Package worldBuilder
Class ResourceRule
- java.lang.Object
-
- worldBuilder.ResourceRule
-
- Direct Known Subclasses:
OverlayRule
,RPGMRule
public class ResourceRule extends java.lang.Object
parameters 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.String
className
name of this rule and its classboolean
debug
Debug: trace bids from this ruleboolean
flexRange
is there flexibility in these rangesjava.lang.String
floraType
where can this creature liveint
id
resource type ID #java.lang.String
justification
Debug: explain the basis for the last bidint
maxAltitude
Altitude ranges for this ruledouble
maxDepth
water-depth ranges for this ruledouble
maxFlux
river flux range for this ruledouble
maxRain
rainfall range for this ruledouble
maxSlope
slope ranges for this ruledouble
maxTemp
Temperature range for this ruleint
minAltitude
Altitude ranges for this ruledouble
minDepth
water-depth ranges for this ruledouble
minFlux
river flux range for this ruledouble
minRain
rainfall range for this ruledouble
minSlope
slope ranges for this ruledouble
minTemp
Temperature range for this ruleint
order
when, in the sequence of bids, does this gojava.awt.Color
previewColor
what color should this render as in previewsstatic java.lang.String
ruleFile
list of all ingested rulesjava.lang.String
ruleName
name of this rule and its classstatic java.lang.String
ruleset
boolean
taperedBid
taper bids as we move away from mid-rangeint
vigor
how 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 void
dump(java.lang.String prefix)
dump out a Rule (for debugging)static java.util.ListIterator<ResourceRule>
iterator()
void
loadRules(java.lang.String file)
load in resource placement rulesvoid
set_attribute(java.lang.String name, int value)
void
set_attribute(java.lang.String name, java.lang.String value)
void
set_range(java.lang.String name, java.lang.String limit, double value)
static int
size()
boolean
wrongFlora(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
-
-