1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

StringName Dictionary keys

also added 'is_string()' method to Variant
and refactored many String type comparisons to use it instead
This commit is contained in:
rune-scape
2023-12-28 14:44:23 -08:00
committed by rune-scape
parent 40b378e9e2
commit 154049ce17
34 changed files with 65 additions and 82 deletions

View File

@@ -82,7 +82,7 @@ void SceneRPCInterface::_parse_rpc_config(const Variant &p_config, bool p_for_no
Array names = config.keys();
names.sort(); // Ensure ID order
for (int i = 0; i < names.size(); i++) {
ERR_CONTINUE(names[i].get_type() != Variant::STRING && names[i].get_type() != Variant::STRING_NAME);
ERR_CONTINUE(!names[i].is_string());
String name = names[i].operator String();
ERR_CONTINUE(config[name].get_type() != Variant::DICTIONARY);
ERR_CONTINUE(!config[name].operator Dictionary().has("rpc_mode"));