mirror of
https://github.com/Relintai/broken_seals.git
synced 2024-12-21 13:16:49 +01:00
Now the added resource's rect gets recalculated on add_content() instead in create_content()
This commit is contained in:
parent
0a0f4ee865
commit
f739cca1f4
@ -14,16 +14,16 @@ func create_content(item_name : String = "") -> void:
|
|||||||
var continent : Continent = Continent.new()
|
var continent : Continent = Continent.new()
|
||||||
continent.resource_name = item_name
|
continent.resource_name = item_name
|
||||||
|
|
||||||
|
add_content(continent)
|
||||||
|
|
||||||
|
func add_content(entry : WorldGenBaseResource) -> void:
|
||||||
var r : Rect2 = get_rect()
|
var r : Rect2 = get_rect()
|
||||||
r.position = Vector2()
|
r.position = Vector2()
|
||||||
r.size.x /= 10.0
|
r.size.x /= 10.0
|
||||||
r.size.y /= 10.0
|
r.size.y /= 10.0
|
||||||
|
|
||||||
continent.set_rect(r)
|
entry.set_rect(r)
|
||||||
|
|
||||||
add_content(continent)
|
|
||||||
|
|
||||||
func add_content(entry : WorldGenBaseResource) -> void:
|
|
||||||
continents.append(entry)
|
continents.append(entry)
|
||||||
emit_changed()
|
emit_changed()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user