World¶
World and Map Generation¶
-
class WorldGenerator:
Prototype¶ -
staticmethod reg(name:
string):WorldGenerator¶ Register a new WorldGenerator static object
- Parameters:
name (
string) – The name of the object
-
staticmethod find(name:
string):WorldGenerator¶ Searching for WorldGenerator in db
- Parameters:
name (
string) – The name of the object
-
staticmethod get_class():
Class¶ Return WorldGenerator class object
-
staticmethod cast(object:
Object):WorldGenerator¶ Trying to cast Object into WorldGenerator
- Parameters:
object (
Object) – to cast
-
staticmethod reg(name:
-
class MapgenData:
Instance¶ -
staticmethod new(parent:
Object, name:string):MapgenData¶ Creates a new MapgenData instance
- Parameters:
parent (
Object) – Object of parentname (
string) – The name of the instance
-
staticmethod new_simple():
MapgenData¶ Creates a new MapgenData instance
-
staticmethod get_class():
Class¶ Return MapgenData class object
-
staticmethod cast(object:
Object):MapgenData¶ Trying to cast Object into MapgenData
- Parameters:
object (
Object) – to cast
-
staticmethod new(parent:
-
class MapStructure:
Object¶ -
offset:
Vec2i¶ undocumented
-
structure:
StaticStructure¶ undocumented
-
staticmethod new():
MapStructure¶ Create new instance of MapStructure
-
offset:
-
class Region:
Instance¶ -
pos:
Vec2i¶ undocumented
-
add_structure(self:
Region, structure:MapStructure)¶ Add structure to this Region
-
add_source(self:
Region, source:SourceData)¶ Add source to this Region
-
staticmethod new(parent:
Object, name:string):Region¶ Creates a new Region instance
- Parameters:
parent (
Object) – Object of parentname (
string) – The name of the instance
-
staticmethod get_class():
Class¶ Return Region class object
-
pos:
-
class RegionLayer:
Instance¶ -
item:
StaticItem¶ item to mine
-
staticmethod new(parent:
Object, name:string):RegionLayer¶ Creates a new RegionLayer instance
- Parameters:
parent (
Object) – Object of parentname (
string) – The name of the instance
-
staticmethod new_simple():
RegionLayer¶ Creates a new RegionLayer instance
-
staticmethod get_class():
Class¶ Return RegionLayer class object
-
staticmethod cast(object:
Object):RegionLayer¶ Trying to cast Object into RegionLayer
- Parameters:
object (
Object) – to cast
-
item:
- class RegionMap¶
Global object
-
get_region(self:
RegionMap, spos:Vec2i):Region¶ Get Region by its position
- Parameters:
spos (
Vec2i) – position in RegionMap grid
-
find_region(self:
RegionMap, spos:Vec2i):Region¶ Looking for existing Region with given sector position
- Parameters:
spos (
Vec2i) – position in RegionMap grid
-
find_source(self:
RegionMap, wbpos:Vec3i):SourceData¶ Looking for SourceData near given location in world blocks
- Parameters:
wbpos (
Vec3i) – position in Dimension grid
-
has_region(self:
RegionMap, pos:Vec2i):boolean¶ Is region exists
- Parameters:
pos (
Vec2i) – region position
-
staticmethod world_block_to_grid(bpos:
Vec3i): (RegionMap:Vec2i)¶ Convert Block World position to RegionMap grid cell that contains this position
- Returns:
RegionMap (
Vec2i) – grid position
-
staticmethod new(parent:
Object, name:string):RegionMap¶ Creates a new RegionMap instance
- Parameters:
parent (
Object) – Object of parentname (
string) – The name of the instance
-
staticmethod get_class():
Class¶ Return RegionMap class object
-
get_region(self:
-
class LayeringGenerator:
Prototype¶ -
staticmethod reg(name:
string):LayeringGenerator¶ Register a new LayeringGenerator static object
- Parameters:
name (
string) – The name of the object
-
staticmethod find(name:
string):LayeringGenerator¶ Searching for LayeringGenerator in db
- Parameters:
name (
string) – The name of the object
-
staticmethod get_class():
Class¶ Return LayeringGenerator class object
-
staticmethod cast(object:
Object):LayeringGenerator¶ Trying to cast Object into LayeringGenerator
- Parameters:
object (
Object) – to cast
-
staticmethod reg(name:
-
class SimpleLayeringGenerator:
LayeringGenerator¶
-
class ChancedLayeringGenerator:
SimpleLayeringGenerator¶
-
class PropsGenerator:
Prototype¶ -
staticmethod reg(name:
string):PropsGenerator¶ Register a new PropsGenerator static object
- Parameters:
name (
string) – The name of the object
-
staticmethod find(name:
string):PropsGenerator¶ Searching for PropsGenerator in db
- Parameters:
name (
string) – The name of the object
-
staticmethod get_class():
Class¶ Return PropsGenerator class object
-
staticmethod cast(object:
Object):PropsGenerator¶ Trying to cast Object into PropsGenerator
- Parameters:
object (
Object) – to cast
-
staticmethod reg(name:
-
class Biome:
Prototype¶ -
staticmethod reg(name:
string):Biome¶ Register a new Biome static object
- Parameters:
name (
string) – The name of the object
-
staticmethod find(name:
string):Biome¶ Searching for Biome in db
- Parameters:
name (
string) – The name of the object
-
staticmethod get_class():
Class¶ Return Biome class object
-
staticmethod reg(name:
-
class SourceData:
Instance¶ -
position:
Vec2i¶ source position in block coordinates
-
item:
StaticItem¶ item to mine
-
initial_capacity:
integer¶ initial source capacity (ore quantity)
-
current_ore:
integer¶ current remaining ore quantity (clamped to 2% of initial)
-
active_miners:
integer¶ number of miners currently extracting
-
infinite_ore:
boolean¶ undocumented
-
staticmethod new(parent:
Object, name:string):SourceData¶ Creates a new SourceData instance
- Parameters:
parent (
Object) – Object of parentname (
string) – The name of the instance
-
staticmethod new_simple():
SourceData¶ Creates a new SourceData instance
-
staticmethod get_class():
Class¶ Return SourceData class object
-
staticmethod cast(object:
Object):SourceData¶ Trying to cast Object into SourceData
- Parameters:
object (
Object) – to cast
-
position:
- class Dimension¶
-
spawn_block(
self:Dimension,
bpos:Vec3i,
quat:Quat,
staticBlock:StaticBlock
): (The:BlockLogic)¶ Spawn a block at the given position
- Parameters:
bpos (
Vec3i) – Block positionquat (
Quat) – RotationstaticBlock (
StaticBlock) – Block type to spawn
- Returns:
The (
BlockLogic) – spawned block logic instance
-
spawn_block_identity(self:
Dimension, bpos:Vec3i, staticBlock:StaticBlock): (The:BlockLogic)¶ Spawn a block with full identity at the given position
- Parameters:
bpos (
Vec3i) – Block positionstaticBlock (
StaticBlock) – Block type to spawn with identity rotation
- Returns:
The (
BlockLogic) – spawned block logic instance
-
set_cell(self:
Dimension, bpos:Vec3i, cl:StaticBlock|nil)¶ Set a block cell at the given position
- Parameters:
bpos (
Vec3i) – Block positioncl (
StaticBlock|nil) – Block type to set
-
spawn_block(