claude godot 4 port
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
extends Reference
|
||||
extends RefCounted
|
||||
class_name Constants
|
||||
|
||||
static func current_moment()->Moment:
|
||||
static func current_moment() -> Moment:
|
||||
var out = Moment.new()
|
||||
var current = Time.get_time_dict_from_system()
|
||||
out.hour = current['hour']
|
||||
@@ -19,13 +19,13 @@ enum WEATHER { # DO NOT CHANGE THE ORDER OF THIS!!! IT MATTERS IN SOME PLACES!!
|
||||
UNKNOWN,
|
||||
}
|
||||
|
||||
static func celsius_to_fahrenheit(celsius:float)->float:
|
||||
return (celsius * (9/5)) + 32
|
||||
static func celsius_to_fahrenheit(celsius: float) -> float:
|
||||
return (celsius * (9.0/5.0)) + 32.0
|
||||
|
||||
static func fahrenheit_to_celsius(fahrenheit:float)->float:
|
||||
return (fahrenheit - 32) * 5/9
|
||||
static func fahrenheit_to_celsius(fahrenheit: float) -> float:
|
||||
return (fahrenheit - 32.0) * 5.0/9.0
|
||||
|
||||
static func code_to_weather(code)->int:
|
||||
static func code_to_weather(code) -> int:
|
||||
return weather_codes.get(str(code), WEATHER.UNKNOWN)
|
||||
|
||||
const weather_color := {
|
||||
@@ -39,8 +39,8 @@ const weather_color := {
|
||||
WEATHER.UNKNOWN: Color('d0d0d0'),
|
||||
}
|
||||
|
||||
static func weather_to_color(weather:int):
|
||||
var out:Color = weather_color.get(weather, WEATHER.UNKNOWN)
|
||||
static func weather_to_color(weather: int):
|
||||
var out: Color = weather_color.get(weather, WEATHER.UNKNOWN)
|
||||
return out
|
||||
|
||||
const weather_codes := {
|
||||
|
||||
Reference in New Issue
Block a user