claude godot 4 port

This commit is contained in:
2026-06-13 16:08:36 -04:00
parent aa1f470a7b
commit 1c1109fe93
227 changed files with 3112 additions and 2505 deletions
@@ -1,20 +1,19 @@
extends HBoxContainer
onready var time_display = $VBoxContainer/time_display
onready var weather_display = $VBoxContainer/weather_display
onready var location_display = $VBoxContainer/location_display
onready var temperature_display = $VBoxContainer/temperature_display
onready var audio = $VBoxContainer/audio
@onready var time_display = $VBoxContainer/time_display
@onready var weather_display = $VBoxContainer/weather_display
@onready var location_display = $VBoxContainer/location_display
@onready var temperature_display = $VBoxContainer/temperature_display
@onready var audio = $VBoxContainer/audio
func _ready():
Config.connect("changed", self, '_on_config_changed')
Config.changed.connect(_on_config_changed)
_on_config_changed()
func _on_config_changed():
$"%location_display".text = Config.flags.location
$"%location_display".text = Config.flags.location.to_upper()
$"%time_display".use_12_hours = Config.flags.use_12_hour_clock
$"%temperature_display".show_celsius = Config.flags.show_celsius
$"%temperature_display".show_fahrenheit = Config.flags.show_fahrenheit
@@ -23,10 +22,10 @@ func _on_config_changed():
func hourly_weather_update(json):
var WC = Constants.WEATHER.UNKNOWN
var temp = 0.0
if json != null and !json.has('error'):
if json != null and json is Dictionary and !json.has('error'):
WC = json['current']['condition']['code']
temp = json['current']['temp_c']
var weather = Constants.code_to_weather(WC)
temperature_display.set_degrees_celsius(temp)
temperature_display.temperature_unknown = weather == Constants.WEATHER.UNKNOWN