13 lines
350 B
GDScript
13 lines
350 B
GDScript
extends Control
|
|
|
|
|
|
func _ready():
|
|
var stuff = await $WeatherAPINode.get_current()
|
|
var out = JSON.stringify(stuff, " ")
|
|
$RichTextLabel.text = out
|
|
var WC = str(stuff['current']['condition']['code'])
|
|
print([WC])
|
|
print(Constants.weather_codes)
|
|
print(Constants.weather_codes.has(WC))
|
|
print(Constants.WEATHER.keys()[Constants.code_to_weather(WC)])
|