refactor worldgen to class, make worldgen functional
This commit is contained in:
parent
5cb839d8e2
commit
7651e574c1
5 changed files with 248 additions and 126 deletions
|
@ -3,6 +3,16 @@
|
|||
|
||||
extends Node
|
||||
|
||||
enum {TILE_WATER, TILE_TERRAIN, TILE_FOREST, TILE_BOG}
|
||||
|
||||
func are_coords_valid(value:int, bounds:Vector2i, errmsg:String) -> bool:
|
||||
if bounds.x > value or value > bounds.y:
|
||||
errmsg = errmsg % [value, bounds.x, bounds.y]
|
||||
push_error(errmsg)
|
||||
return false
|
||||
|
||||
return true
|
||||
|
||||
var world_map: TileMap
|
||||
var map_image_size:Vector2i
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue