Also add the initial rect size setup code to Continent and Zone.

This commit is contained in:
Relintai 2021-12-25 03:26:33 +01:00
parent b7b36d47ab
commit c21970b82f
2 changed files with 12 additions and 0 deletions

View File

@ -14,6 +14,12 @@ func add_content(item_name : String = "") -> void:
var zone : Zone = Zone.new()
zone.resource_name = item_name
var r : Rect2 = get_rect()
r.size.x /= 10.0
r.size.y /= 10.0
zone.set_rect(r)
zones.append(zone)
emit_changed()

View File

@ -14,6 +14,12 @@ func add_content(item_name : String = "") -> void:
var subzone : SubZone = SubZone.new()
subzone.resource_name = item_name
var r : Rect2 = get_rect()
r.size.x /= 10.0
r.size.y /= 10.0
subzone.set_rect(r)
subzones.append(subzone)
emit_changed()