FillMode
¶ALL = siege.worldgen.FillMode.ALL
OPEN_ONLY = siege.worldgen.FillMode.OPEN_ONLY
SOLID_ONLY = siege.worldgen.FillMode.SOLID_ONLY
TileDirection
¶Bottom = siege.worldgen.TileDirection.Bottom
BottomLeft = siege.worldgen.TileDirection.BottomLeft
BottomRight = siege.worldgen.TileDirection.BottomRight
Left = siege.worldgen.TileDirection.Left
Right = siege.worldgen.TileDirection.Right
Top = siege.worldgen.TileDirection.Top
TopLeft = siege.worldgen.TileDirection.TopLeft
TopRight = siege.worldgen.TileDirection.TopRight
Biome
¶__repr__
()¶Returns a printable representation of this object.
Return type: | str |
---|
getActions
()¶Returns a Python list
Return type: | list |
---|
getFinalActions
()¶Returns a Python list
Return type: | list |
---|
getOccurrences
(realmSize)¶Returns a Range
of ints from 0 to 9999
Parameters: | realmSize (RealmSize ) – A RealmSize |
---|---|
Return type: | RangeUint |
getPostActions
()¶Returns a Python list
Return type: | list |
---|
getRules
()¶Returns a Python dictionary
Return type: | dict |
---|
getStamps
(remainingSpace)¶Returns a Python list
Parameters: | remainingSpace (int) – Has no use |
---|---|
Return type: | list |
isCompatible
(arg2, biome)¶True if biome is marked compatible, false otherwise
Parameters: |
|
---|---|
Return type: | bool |
back1
¶back2
¶back3
¶back4
¶crystalIcon
¶sky
¶widthIncrement
¶BoolStamp
¶__init__
(imagePath, allowFlipX, allowFlipY)¶Parameters: |
|
---|
canFlipX
()¶Set to true to allow flipping image on x axis
Return type: | bool |
---|
canFlipY
()¶Set to true to allow flipping image on y axis
Return type: | bool |
---|
get
(x, y, size, flipX, flipY)¶Returns boolean value at x,y based on size
Parameters: |
|
---|---|
Return type: | bool |
ColorStamp
¶__init__
( imagePath, allowFlipX, allowFlipY]])¶Parameters: |
|
---|
__setattr__
(attr, value)¶Changes an attribute of this ColorStamp
Parameters: |
|
---|
canFlipX
()¶Set to true to allow flipping image on x axis
Return type: | bool |
---|
canFlipY
()¶Set to true to allow flipping image on y axis
Return type: | bool |
---|
forceFlipX
()¶Return true if forced flipping is active, false otherwise
Return type: | bool |
---|
get
(x, y, size, flipX, flipY)¶Returns color value at x,y based on size
Parameters: |
|
---|---|
Return type: | int |
getColor
(color)¶If color is present in ColorMap return color value
Parameters: | color (int) – Color |
---|---|
Return type: | TileVectorList |
getSimple
(x, y, flipX, flipY)¶Returns color value at x,y
Parameters: |
|
---|---|
Return type: | int |
getSize
()¶Returns a TileVector
of the size of the ColorMap
Return type: | TileVector |
---|
has
(color)¶Returns true if color is in this ColorStamp
Parameters: | color (int) – Color to search for |
---|---|
Returns: | A TileVectorList of the color |
Return type: | bool |
setForceFlipX
(flipX)¶Changes force flipping behavior
Parameters: | flipX (bool) – Set to true to force flip the image on the x axis |
---|
image
¶Terraform
¶applySimpleStamp
(stamp, position, rules, flipX, flipY, ground, wall, automata)¶Change all tiles under area according to the stamp pattern
The dictionary is keyed with StampColor The dictionary’s value is a tuple with (groundId, wallId) or (groundId, wallId, foliageGroundId, foliageWallId) If groundId or wallId is 1, the tile will not be replaced If groundId or wallId is 0, the tile will be deleted If foliageGroundId or foliageWallId is 0, no foliage will be placed:param flipX: Set to true to force flip stamp on x axis
param stamp: Pattern to use type stamp: ColorStamp
param position: Target for change type position: TileVector
param rules: Python dictionary of rules for changes type rules: dict param flipX: type flipX: bool param flipY: Set to true to force flip stamp on y axis type flipY: bool param ground: Ground layer to be changed type ground: TileLayer
param wall: Wall layer to be changed type wall: TileLayer
param automata: An instance of AutomataManager
type automata: AutomataManager
- static
fillGrassFoliage
(realm, layerType, foliage, area)¶Cover the provided area with the grass foliage. Only applied to compatible tiles that have an exposed side.
Parameters:
- static
fillTiles
(layer, area, tileId, fillMode)¶Change all tiles under area to tiles of tileId
Parameters:
- static
overlapsSurface
(startX, y, width, threshold, realmSize)¶Returns true if surface overlaps threshold tolerance, false otherwise
Parameters:
- startX (int) – Starting x coordinate of surface
- y (int) – Y coordinate of surface
- width (int) – Width of surface
- threshold (list) – List of values from a populateAreaEmptyThreshold call
- realmSize (
RealmSize
) –Return type: bool
- static
placeFoliage
(arg1, area, layer, fillMode, stamp)¶Change all foliage under area according to the stamp pattern
Parameters:
- static
placeTiles
(arg1, area, layer, fillMode, stamp)¶Change all tiles under area according to the stamp pattern
Parameters:
- static
populateAreaEmptyThreshold
(layer, area, tolerance, threshold)¶After calling Threshold stores a dictionary of x values mapped to their y values added to the threshold
Parameters:
- static
populateMapAutomataData
(realm, data)¶Populate a realm using automata, storing values in data
Parameters:
- realm (
Realm
) – Which realm to target- data (list) – Where to store results
- static
populateMapData
(realm, data, colors)¶Fill a list of color data from target realm
Parameters:
- realm (
Realm
) – Which realm to target- data (list) – Python list to fill with data
- colors (dict) – Python dictionary of colors
- static
replaceTiles
(realm, layerType, area, tiles)¶Goes through area and replaces tiles according to tile mapping with dithering.
Parameters:
- static
replaceTilesDither
(realm, layerType, area, direction, startPosition, endPosition, tiles)¶Goes through area and replaces tiles according to tile mapping.
Parameters:
- realm (
Realm
) –Realm
that will be changed.- layerType (
Layer
) –Layer
that will be changed (Layer
.Ground,Layer
.Wall, orLayer
.WallAndGround).- area (
TileRect
) – Area of layer to replace tiles within.- direction (
TileDirection
) – (Tile:class:`Direction`
)Direction
of source moving from this origin.- startPosition (int) –
- endPosition (int) –
- tiles (dict) – (dict) Mapping of existing tile ids to new tile ids.
- static
stampGrassFoliage
(realm, layerType, foliage, foliageSupport, area, stamp)¶Cover the provided area with the grass foliage. Only applied to compatible tiles that have an exposed side.
Parameters:
- realm (
Realm
) –Realm
that will be changed.- layerType (
Layer
) –Layer
that will be changed (Layer
.Ground,Layer
.Wall).- foliage (
FoliageComponent
) – The grass foliage to fill this area with.- foliageSupport (int) – The support foliage content id.
- area (
TileRect
) – Area of layer to replace tiles within.- stamp (
BoolStamp
) – Pattern image to follow