add inverse godot types map to DeckType

This commit is contained in:
Lera Elvoé 2024-01-17 09:31:22 +03:00
parent 03300438c1
commit f963897cf0
No known key found for this signature in database

View file

@ -29,6 +29,14 @@ const GODOT_TYPES_MAP := {
Types.DICTIONARY: TYPE_DICTIONARY,
}
const INVERSE_GODOT_TYPES_MAP := {
TYPE_BOOL: Types.BOOL,
TYPE_FLOAT: Types.NUMERIC,
TYPE_STRING: Types.STRING,
TYPE_ARRAY: Types.ARRAY,
TYPE_DICTIONARY: Types.DICTIONARY,
}
static func can_convert(from: Types, to: Types) -> bool:
if from == to: