Package mindustry.maps.filters
Class GenerateFilter
java.lang.Object
mindustry.maps.filters.GenerateFilter
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
BlendFilter,ClearFilter,CoreSpawnFilter,DistortFilter,EnemySpawnFilter,LogicFilter,MedianFilter,MirrorFilter,NoiseFilter,OreFilter,OreMedianFilter,RandomItemFilter,RiverNoiseFilter,ScatterFilter,SpawnPathFilter,TerrainFilter
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classan input for generating at a certain coordinate. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply the actual filter on the inputvoidapply(Tiles tiles, GenerateFilter.GenerateInput in) protected floatchance(int x, int y) copy()voiddraw(arc.scene.ui.Image image) draw any additional guidescharicon()booleanbooleanisPost()name()localized display nameprotected floatnoise(float x, float y, float scl, float mag, float octaves, float persistence) protected floatnoise(int seedOffset, GenerateFilter.GenerateInput in, float scl, float mag) protected floatnoise(GenerateFilter.GenerateInput in, float scl, float mag) protected floatnoise(GenerateFilter.GenerateInput in, float scl, float mag, float octaves, float persistence) abstract FilterOption[]options()voidset the seed to a random numberprotected floatrnoise(float x, float y, float scl, float mag) protected floatrnoise(float x, float y, int octaves, float scl, float falloff, float mag)
-
Field Details
-
seed
public int seed
-
-
Constructor Details
-
GenerateFilter
public GenerateFilter()
-
-
Method Details
-
apply
-
options
- Returns:
- a new array of options for configuring this filter
-
apply
apply the actual filter on the input -
draw
public void draw(arc.scene.ui.Image image) draw any additional guides -
simpleName
-
name
localized display name -
icon
public char icon() -
randomize
public void randomize()set the seed to a random number -
isBuffered
public boolean isBuffered()- Returns:
- whether this filter needs a read/write buffer (e.g. not a 1:1 tile mapping).
-
isPost
public boolean isPost()- Returns:
- whether this filter can *only* be used while generating the map, e.g. is not undoable.
-
noise
-
noise
-
noise
protected float noise(GenerateFilter.GenerateInput in, float scl, float mag, float octaves, float persistence) -
noise
protected float noise(float x, float y, float scl, float mag, float octaves, float persistence) -
rnoise
protected float rnoise(float x, float y, float scl, float mag) -
rnoise
protected float rnoise(float x, float y, int octaves, float scl, float falloff, float mag) -
chance
protected float chance(int x, int y) -
copy
-