Loads of crap
This commit is contained in:
parent
b5bf7619e6
commit
1dc768ad27
725 changed files with 15096 additions and 191 deletions
|
|
@ -1,19 +1,9 @@
|
|||
class_name MapDataClass
|
||||
extends Node
|
||||
|
||||
var map_data: Array
|
||||
var map_data: Array = Global.map_data
|
||||
var cell_data: CellDataResource
|
||||
|
||||
func _init() -> void:
|
||||
map_data.resize(500) # First resize the main array
|
||||
for y in range(500):
|
||||
map_data[y] = []
|
||||
map_data[y].resize(500)
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
Log.pr('MapData class ready...')
|
||||
|
||||
func setup_cell_data(x, z, density, path = false, water = false):
|
||||
var cell_data_res = CellDataResource.new()
|
||||
|
||||
|
|
@ -39,9 +29,5 @@ func get_map_data(x, z) -> CellDataResource:
|
|||
if x < map_data.size() and x >= 0:
|
||||
if z < map_data[x].size() and z >= 0:
|
||||
return map_data[x][z]
|
||||
else:
|
||||
Log.pr("Z index out of bounds")
|
||||
else:
|
||||
Log.pr("X index out of bounds")
|
||||
|
||||
return CellDataResource.new()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue