Small cleanups to the code.

This commit is contained in:
Relintai 2022-08-05 22:48:27 +02:00
parent 9e4bd47103
commit 86ff313d6b
4 changed files with 7 additions and 7 deletions

View File

@ -60,7 +60,7 @@ func switch_to(resource : WorldGenBaseResource) -> void:
if (continent == resource):
option_button.select(i)
on_item_selected(i)
set_continent(continent)
return
func set_continent(continent : Continent) -> void:

View File

@ -125,7 +125,7 @@ func switch_to(continent : WorldGenBaseResource, zone : WorldGenBaseResource, su
if (ccont == continent):
contob.select(i)
on_continent_item_selected(i)
set_continent(continent)
break
var zoneob : OptionButton = $HSplitContainer/VBoxContainer/ZoneOptionButton
@ -135,7 +135,7 @@ func switch_to(continent : WorldGenBaseResource, zone : WorldGenBaseResource, su
if (czone == zone):
zoneob.select(i)
on_zone_item_selected(i)
set_zone(zone)
break
var subzoneob : OptionButton = $HSplitContainer/VBoxContainer/SubZoneOptionButton

View File

@ -149,7 +149,7 @@ func switch_to(continent : WorldGenBaseResource, zone : WorldGenBaseResource, su
if (ccont == continent):
contob.select(i)
on_continent_item_selected(i)
set_continent(continent)
break
var zoneob : OptionButton = $VBoxContainer/ZoneOptionButton
@ -159,7 +159,7 @@ func switch_to(continent : WorldGenBaseResource, zone : WorldGenBaseResource, su
if (czone == zone):
zoneob.select(i)
on_zone_item_selected(i)
set_zone(zone)
break
var subzoneob : OptionButton = $VBoxContainer/SubZoneOptionButton

View File

@ -95,7 +95,7 @@ func switch_to(continent : WorldGenBaseResource, resource : WorldGenBaseResource
if (ccont == continent):
contob.select(i)
on_continent_item_selected(i)
set_continent(continent)
break
var zoneob : OptionButton = $HSplitContainer/VBoxContainer/ZoneOptionButton
@ -105,7 +105,7 @@ func switch_to(continent : WorldGenBaseResource, resource : WorldGenBaseResource
if (czone == resource):
zoneob.select(i)
on_zone_item_selected(i)
set_zone(czone)
return
func on_continent_item_selected(idx : int) -> void: