From f963897cf08c5082b1759649e53a1ca3ef014a6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lera=20Elvo=C3=A9?= Date: Wed, 17 Jan 2024 09:31:22 +0300 Subject: [PATCH] add inverse godot types map to DeckType --- classes/types/deck_type.gd | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/classes/types/deck_type.gd b/classes/types/deck_type.gd index a26523e..adb91a7 100644 --- a/classes/types/deck_type.gd +++ b/classes/types/deck_type.gd @@ -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: