diff --git a/addons/resources_spreadsheet_view/editor_view.gd b/addons/resources_spreadsheet_view/editor_view.gd index 1bb7baa..ad02721 100644 --- a/addons/resources_spreadsheet_view/editor_view.gd +++ b/addons/resources_spreadsheet_view/editor_view.gd @@ -324,7 +324,7 @@ func duplicate_selected_rows(new_name : String): func delete_selected_rows(): io.delete_rows(_get_row_resources(_selection.get_edited_rows())) refresh() - call_deferred(&"refresh") + refresh.call_deferred() func has_row_names(): diff --git a/addons/resources_spreadsheet_view/import_export/spreadsheet_import.gd b/addons/resources_spreadsheet_view/import_export/spreadsheet_import.gd index ee5b5db..dc91f53 100644 --- a/addons/resources_spreadsheet_view/import_export/spreadsheet_import.gd +++ b/addons/resources_spreadsheet_view/import_export/spreadsheet_import.gd @@ -54,7 +54,7 @@ func initialize(path): func save(): resource_path = edited_path.get_basename() + SUFFIX - ResourceSaver.call_deferred("save", self) + ResourceSaver.save.call_deferred(self) func string_to_property(string : String, col_index : int): diff --git a/addons/resources_spreadsheet_view/main_screen/input_handler.gd b/addons/resources_spreadsheet_view/main_screen/input_handler.gd index b6e54b3..96186f5 100644 --- a/addons/resources_spreadsheet_view/main_screen/input_handler.gd +++ b/addons/resources_spreadsheet_view/main_screen/input_handler.gd @@ -84,13 +84,6 @@ func _key_specific_action(event : InputEvent): elif event.keycode == KEY_TAB: _move_selection_on_grid((1 if !ctrl_pressed else 10), 0) - # Non-text and paths can't be edited. - if editor_view.columns[column] == "resource_path": - return - - if !selection.column_editors[column].is_text(): - return - # CURSOR MOVEMENT if event.keycode == KEY_LEFT: TextEditingUtilsClass.multi_move_left( diff --git a/addons/resources_spreadsheet_view/main_screen/selection_manager.gd b/addons/resources_spreadsheet_view/main_screen/selection_manager.gd index 47c6f59..7a3ecd4 100644 --- a/addons/resources_spreadsheet_view/main_screen/selection_manager.gd +++ b/addons/resources_spreadsheet_view/main_screen/selection_manager.gd @@ -175,11 +175,11 @@ func can_select_cell(cell : Control) -> bool: return !cell in edited_cells -func get_cell_column(cell) -> int: +func get_cell_column(cell : Control) -> int: return cell.get_index() % editor_view.columns.size() -func get_cell_row(cell) -> int: +func get_cell_row(cell : Control) -> int: return cell.get_index() / editor_view.columns.size() + editor_view.first_row diff --git a/addons/resources_spreadsheet_view/text_editing_utils.gd b/addons/resources_spreadsheet_view/text_editing_utils.gd index 907426f..3800b1c 100644 --- a/addons/resources_spreadsheet_view/text_editing_utils.gd +++ b/addons/resources_spreadsheet_view/text_editing_utils.gd @@ -65,7 +65,7 @@ static func multi_erase_right(values : Array, cursor_positions : Array, ctrl_pre return values -static func multi_erase_left(values : Array, cursor_positions : Array, ctrl_pressed): +static func multi_erase_left(values : Array, cursor_positions : Array, ctrl_pressed : bool): for i in values.size(): var start_pos = cursor_positions[i] @@ -78,12 +78,12 @@ static func multi_erase_left(values : Array, cursor_positions : Array, ctrl_pres return values -static func multi_move_left(values : Array, cursor_positions : Array, ctrl_pressed): +static func multi_move_left(values : Array, cursor_positions : Array, ctrl_pressed : bool): for i in cursor_positions.size(): cursor_positions[i] = _step_cursor(values[i], cursor_positions[i], -1, ctrl_pressed) -static func multi_move_right(values : Array, cursor_positions : Array, ctrl_pressed): +static func multi_move_right(values : Array, cursor_positions : Array, ctrl_pressed : bool): for i in cursor_positions.size(): cursor_positions[i] = _step_cursor(values[i], cursor_positions[i], 1, ctrl_pressed) diff --git a/addons/resources_spreadsheet_view/typed_cells/cell_editor_color.gd b/addons/resources_spreadsheet_view/typed_cells/cell_editor_color.gd index e3ec557..db7c7b6 100644 --- a/addons/resources_spreadsheet_view/typed_cells/cell_editor_color.gd +++ b/addons/resources_spreadsheet_view/typed_cells/cell_editor_color.gd @@ -10,7 +10,7 @@ func create_cell(caller : Control) -> Control: node.custom_minimum_size.x = 56 node.add_child(color) color.name = "Color" - call_deferred(&"_resize_color_rect", color) + _resize_color_rect.call_deferred(color) return node diff --git a/addons/resources_spreadsheet_view/typed_editors/dock_dict.gd b/addons/resources_spreadsheet_view/typed_editors/dock_dict.gd index 24e1987..055cb90 100644 --- a/addons/resources_spreadsheet_view/typed_editors/dock_dict.gd +++ b/addons/resources_spreadsheet_view/typed_editors/dock_dict.gd @@ -169,7 +169,7 @@ func var_to_str_no_sort(value, indent = " ", cur_indent = ""): cur_indent += indent lines.resize(value.size()) for i in lines.size(): - if value[i] is Array || value[i] is Dictionary: + if value[i] is Array or value[i] is Dictionary: lines[i] = "%s%s" % [cur_indent, var_to_str_no_sort(value[i])] else: @@ -184,7 +184,7 @@ func var_to_str_no_sort(value, indent = " ", cur_indent = ""): cur_indent += indent lines.resize(keys.size()) for i in lines.size(): - if values[i] is Array || values[i] is Dictionary: + if values[i] is Array or values[i] is Dictionary: lines[i] = "%s%s : %s" % [cur_indent, var_to_str(keys[i]), var_to_str_no_sort(values[i])] else: diff --git a/example/Random Upgrades/upgrades/elemental.tres b/example/Random Upgrades/upgrades/elemental.tres index 80f2f5d..b0a6db6 100644 --- a/example/Random Upgrades/upgrades/elemental.tres +++ b/example/Random Upgrades/upgrades/elemental.tres @@ -15,7 +15,7 @@ icon = ExtResource("1_utkae") prerequisites = Array[ExtResource("2")]([]) color2 = Color(0.964706, 0.298039, 0.298039, 1) base_weight = 10.0 -is_notable = true +is_notable = false multiplier_per_tag = "" multiplier_if_tag_present = "" multiplier_if_tag_not_present = "elemental 0" diff --git a/example/Random Upgrades/upgrades/health.tres b/example/Random Upgrades/upgrades/health.tres index ead5b29..3cce2ba 100644 --- a/example/Random Upgrades/upgrades/health.tres +++ b/example/Random Upgrades/upgrades/health.tres @@ -15,7 +15,7 @@ icon = ExtResource("1") prerequisites = Array[ExtResource("2")]([]) color2 = Color(0.129412, 1, 0.243137, 1) base_weight = 10.0 -is_notable = true +is_notable = false multiplier_per_tag = "strength 1.5 melee 2.0" multiplier_if_tag_present = "" multiplier_if_tag_not_present = "" diff --git a/example/Random Upgrades/upgrades/mastery_strength.tres b/example/Random Upgrades/upgrades/mastery_strength.tres index 3b5858f..2f25fcc 100644 --- a/example/Random Upgrades/upgrades/mastery_strength.tres +++ b/example/Random Upgrades/upgrades/mastery_strength.tres @@ -19,7 +19,7 @@ prerequisites = Array[ExtResource("2")]([ExtResource("2_kb33p"), ExtResource("3_ color2 = Color(0.992157, 0.941176, 0.2, 1) base_weight = 1.0 is_notable = true -multiplier_per_tag = "" +multiplier_per_tag = "strength 1.2" multiplier_if_tag_present = "" multiplier_if_tag_not_present = "strength 0" max_tags_present = "" diff --git a/example/Random Upgrades/upgrades/up_aoe.tres b/example/Random Upgrades/upgrades/up_aoe.tres index 0a4a706..37ff9cc 100644 --- a/example/Random Upgrades/upgrades/up_aoe.tres +++ b/example/Random Upgrades/upgrades/up_aoe.tres @@ -15,7 +15,7 @@ icon = ExtResource("1_prpsx") prerequisites = Array[ExtResource("2")]([]) color2 = Color(0.964706, 0.298039, 0.298039, 1) base_weight = 10.0 -is_notable = true +is_notable = false multiplier_per_tag = "" multiplier_if_tag_present = "" multiplier_if_tag_not_present = "aoe 0"