mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Do not add an empty tile in the tilesets when loading a pxo file
This commit is contained in:
parent
e5c7d46997
commit
65e907e1d2
|
@ -352,7 +352,7 @@ func deserialize(dict: Dictionary, zip_reader: ZIPReader = null, file: FileAcces
|
|||
if dict.has("tilesets"):
|
||||
for saved_tileset in dict["tilesets"]:
|
||||
var tile_size = str_to_var("Vector2i" + saved_tileset.get("tile_size"))
|
||||
var tileset := TileSetCustom.new(tile_size)
|
||||
var tileset := TileSetCustom.new(tile_size, "", false)
|
||||
tileset.deserialize(saved_tileset)
|
||||
tilesets.append(tileset)
|
||||
if dict.has("frames") and dict.has("layers"):
|
||||
|
|
|
@ -39,9 +39,10 @@ class Tile:
|
|||
return times_used <= 0
|
||||
|
||||
|
||||
func _init(_tile_size: Vector2i, _name := "") -> void:
|
||||
func _init(_tile_size: Vector2i, _name := "", add_empty_tile := true) -> void:
|
||||
tile_size = _tile_size
|
||||
name = _name
|
||||
if add_empty_tile:
|
||||
var empty_image := Image.create_empty(tile_size.x, tile_size.y, false, Image.FORMAT_RGBA8)
|
||||
tiles.append(Tile.new(empty_image))
|
||||
|
||||
|
|
Loading…
Reference in a new issue