diff options
-rw-r--r-- | DONORS.md | 76 | ||||
-rw-r--r-- | core/list.h | 3 | ||||
-rw-r--r-- | doc/classes/@GDScript.xml | 10 | ||||
-rw-r--r-- | doc/classes/Particles.xml | 3 | ||||
-rw-r--r-- | editor/plugins/tile_map_editor_plugin.cpp | 65 | ||||
-rw-r--r-- | editor/script_editor_debugger.cpp | 7 | ||||
-rw-r--r-- | scene/gui/tree.cpp | 6 |
7 files changed, 95 insertions, 75 deletions
@@ -17,25 +17,24 @@ generous deed immortalized in the next stable release of Godot Engine. ## Gold sponsors Gamblify <https://www.gamblify.com> - Image Campus <https://www.imagecampus.edu.ar> ## Mini sponsors Alan Beauchamp + Aleksandar Kordic Anandarup Mallik Andrew Dunai Brandon Lamb + Christian Chipont Christian Uldall Pedersen Christoph Woinke - Connor Hill Denis Malyavin Edward Flick GameDev.net GameDev.tv Hein-Pieter van Braam Jacob McKenney - Javary Games - Jay Sistar + Javary Co. Justin Arnold Kyle Szklenski Leonard Meagher @@ -44,15 +43,13 @@ generous deed immortalized in the next stable release of Godot Engine. Mike King Neal Gompa (Conan Kudo) Patrick Aarstad - "Rainway " Slobodan Milnovic - StarFlare Software Stephan Lanfermann Stephen Telford Steve - TigerJ VilliHaukka Xananax + Y8.com Zashi ## Gold donors @@ -77,12 +74,14 @@ generous deed immortalized in the next stable release of Godot Engine. Andreas Schüle Asher Glick Austen McRae + Brian van der Stel + Carlo Cabanilla Daniel James David Giardi - David Graham Edward E Florian Breisch Gero + Javier Roman Jay Horton Jon Smith Jon Woodward @@ -107,12 +106,12 @@ generous deed immortalized in the next stable release of Godot Engine. William Wold Wyatt Goodin + Alex Khayrullin Chris Goddard Chris Serino Christian Padilla Conrad Curry Craig Smith - Daniel Egger Dean Harmon Ian Richard Kunert Ivan Trombley @@ -135,17 +134,18 @@ generous deed immortalized in the next stable release of Godot Engine. Wojciech Chojnacki Xavier PATRICELLI + Adam Neumann Alessandra Pereyra + Alexander J Maynard Alexey Dyadchenko Andrew Bowen Asdf - Benjamin W Flint + Ben Botwin Carlos de Sousa Marques Chris Petrich Christian Leth Jeppesen Christoph Schröder Cody Parker - ComicSads D Daniel Daniel Eichler @@ -163,6 +163,8 @@ generous deed immortalized in the next stable release of Godot Engine. Guilherme Felipe de C. G. da Silva Heath Hayes Hysteria + Idzard Kwadijk + Jared White Jose Malheiro Joshua Flores Juan T Chen @@ -173,7 +175,6 @@ generous deed immortalized in the next stable release of Godot Engine. Leandro Voltolino Maarten Elings Malcolm Peralty - Marius Kamm Markus Fehr Markus Wiesner Martin Eigel @@ -184,6 +185,7 @@ generous deed immortalized in the next stable release of Godot Engine. M H Nick Nikitin Oliver Dick + Paolo Munoz Paul Hocker Paul Von Zimmerman Pete Goodwin @@ -197,7 +199,6 @@ generous deed immortalized in the next stable release of Godot Engine. Urho WytRabbit Xavier Fumado Beltran - yuanzhe zhou ## Silver donors @@ -208,6 +209,7 @@ generous deed immortalized in the next stable release of Godot Engine. Adam Nakonieczny Adam Smeltzer Adisibio + Agustinus Arya Aidan O'Flannagain Alder Stefano Alessandro Senese @@ -231,21 +233,23 @@ generous deed immortalized in the next stable release of Godot Engine. Benedikt Ben Phelan Ben Vercammen + Ben Woodley + Berbank Bernd Jänichen Black Block Blair Allen Bobby CC Wong Boyquotes - Branwen Zak + Branwyn Tylwyth Bryan Stevenson - Carl Winder Carwyn Edwards Chris Brown Chris Chapin + Chris Gonzales Christian Baune Christian Winter Christoffer Sundbom - Christopher Fisher + Christopher Schmitt Chris Wilson Clay Heaton Cobaltum @@ -262,7 +266,6 @@ generous deed immortalized in the next stable release of Godot Engine. Dominik Wetzel Duobix Edward Herbert - E.G. Egon Elbre Ellen Marie Dash Elmeri '- Duy Kevin Nguyen @@ -271,30 +274,33 @@ generous deed immortalized in the next stable release of Godot Engine. Eric Martini Eric McCarthy Eric Williams - Fabian Lökes + Evan Rose Felix Kollmann fengjiongmax - Foomf + Flaredown G3Dev sàrl Gary Hulst Gerrit Großkopf gmmath Grant Clarke Greg Olson - Greg Pennefather + Greg P Guldoman Heribert Hirth Hiroshi Naruo HMan Hunter Jones + Hylpher ialex32x Igor Buzatovic Iiari + IndustrialRobot Isaac Morton Jaime Ruiz-Borau Vizárraga Jako Danar James A F Manley Jax + Jed Jeff Hungerford Jeff Nyte Jeremy Kahn @@ -302,6 +308,7 @@ generous deed immortalized in the next stable release of Godot Engine. Joe Alden Joel Fivat Joel Setterberg + Johannes Eichler Johannes Wuensch Jonas Rudlang Jonas Yamazaki @@ -316,6 +323,7 @@ generous deed immortalized in the next stable release of Godot Engine. Juan Negrier Judd Julian Murgia + Kasier Bald0 KC Chan kickmaniac Kiyohiro Kawamura (kyorohiro) @@ -324,22 +332,24 @@ generous deed immortalized in the next stable release of Godot Engine. KsyTek Games Kuan Cheang kycho + Lavik1988 Levi Lindsey Linus Lind Lundgren Lionel Gaillard Luis Moraes + LunaticInAHat + Lurkars Macil - magodev Major Haul Malcolm Malik Ahmed + Malik Nejer + Marcus Richter Markus Michael Egger Martin Holas Matthew Little Maxwell medecau - Menno Finlay-Smits - Mertcan Mermerkaya mhilbrunner Michael Dürwald Michael Gringauz @@ -347,9 +357,9 @@ generous deed immortalized in the next stable release of Godot Engine. Mikael Olsson Mikayla Hutchinson Mike Cunningham + mlevin cantu MoM Moritz Laass - Moritz Weissenberger MuffinManKen Natrim nee @@ -360,6 +370,7 @@ generous deed immortalized in the next stable release of Godot Engine. Nicolas SAN AGUSTIN Nithin Jino NZ + Omar Delarosa Oscar Norlander Pan Ip Patrick Forringer @@ -370,30 +381,30 @@ generous deed immortalized in the next stable release of Godot Engine. Philip O. Staiger Pierre-Igor Berthet Pietro Vertechi - Piotr Kaczmarski Pitsanu Tongprasin Poryg + Rafa Laguna + Rafal Wyszomirski Raphael Leroux - Red Hara Rémi Verschelde Ricardo Alcantara - Rob Crowle Robert Farr (Larington) Robert Hernandez Rodrigo Loli - Roger Burgess Roger Smith Roland Rząsa Roman Tinkov Ryan Groom Ryan Hentz Saad Khoudmi - Samdze + Samuele Zolfanelli + Sanka.X Sasori Olkof Scott D. Yelich Sebastian Michailidis Shane Sicienski Shane Spoor + Simon Ledam Simon Wenner SK Sootstone @@ -408,13 +419,18 @@ generous deed immortalized in the next stable release of Godot Engine. Tim Drumheller Tim Gudex Timo Schmidt + Timothy B. MacDonald + Tobbun Tom Larrow Torsten Crass Travis O'Brien + Trent Skinner Tryggve Sollid - Tyler Strafos + Turgut Temucin + Tyler Stafos UltyX Vaiktorg + Valeria Viana Gusmao Veodok Victor Vigilant Watch diff --git a/core/list.h b/core/list.h index 103a82a31d..d1b528562d 100644 --- a/core/list.h +++ b/core/list.h @@ -602,9 +602,6 @@ public: Element *next = current->next_ptr; - //disconnect - current->next_ptr = NULL; - if (from != current) { current->prev_ptr = NULL; diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 553fd4d629..b6de5dbf62 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -92,13 +92,13 @@ <argument index="0" name="condition" type="bool"> </argument> <description> - Assert that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code] a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always [code]true[/code]. + Asserts that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code], an error is generated and the program is halted until you resume it. Only executes in debug builds, or when running the game from the editor. Use it for debugging purposes, to make sure a statement is [code]true[/code] during development. [codeblock] - # Speed should always be between 0 and 20 + # Imagine we always want speed to be between 0 and 20 speed = -10 - assert(speed < 20) # Is true and program continues - assert(speed >= 0) # Is false and program stops - assert(speed >= 0 && speed < 20) # Or combined + assert(speed < 20) # True, the program will continue + assert(speed >= 0) # False, the program will stop + assert(speed >= 0 && speed < 20) # You can also combine the two conditional statements in one check [/codeblock] </description> </method> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 0023fce97d..7820c63ad7 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -15,13 +15,14 @@ <return type="AABB"> </return> <description> + Returns the bounding box that contains all the particles that are active in the current frame. </description> </method> <method name="restart"> <return type="void"> </return> <description> - Restarts the particle emmission, clearing existing particles. + Restarts the particle emission, clearing existing particles. </description> </method> </methods> diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp index 4ef2d17128..3f513de30f 100644 --- a/editor/plugins/tile_map_editor_plugin.cpp +++ b/editor/plugins/tile_map_editor_plugin.cpp @@ -299,9 +299,13 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p Vector2 position; int current = manual_palette->get_current(); if (current != -1) { - position = manual_palette->get_item_metadata(current); + if (tool != TOOL_PASTING) { + position = manual_palette->get_item_metadata(current); + } else { + position = p_autotile_coord; + } } else { - // if there is no manual tile selected, that either means that + // If there is no manual tile selected, that either means that // autotiling is enabled, or the given tile is not autotiling. Either // way, the coordinate of the tile does not matter, so assigning it to // the coordinate of the existing tile works fine. @@ -309,7 +313,7 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p } if (p_value == prev_val && p_flip_h == prev_flip_h && p_flip_v == prev_flip_v && p_transpose == prev_transpose && prev_position == position) - return; //check that it's actually different + return; // Check that it's actually different. for (int y = p_pos.y - 1; y <= p_pos.y + 1; y++) { for (int x = p_pos.x - 1; x <= p_pos.x + 1; x++) { @@ -322,21 +326,19 @@ void TileMapEditor::_set_cell(const Point2i &p_pos, Vector<int> p_values, bool p node->_set_celld(p_pos, _create_cell_dictionary(p_value, p_flip_h, p_flip_v, p_transpose, p_autotile_coord)); + if (tool == TOOL_PASTING) + return; + if (manual_autotile || (p_value != -1 && node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE)) { if (current != -1) { node->set_cell_autotile_coord(p_pos.x, p_pos.y, position); - - } else if (tool != TOOL_PASTING && node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE && priority_atlastile) { - - // BIND_CENTER is used to indicate that bitmask should not update for this tile cell + } else if (node->get_tileset()->tile_get_tile_mode(p_value) == TileSet::ATLAS_TILE && priority_atlastile) { + // BIND_CENTER is used to indicate that bitmask should not update for this tile cell. node->get_tileset()->autotile_set_bitmask(p_value, Vector2(p_pos.x, p_pos.y), TileSet::BIND_CENTER); node->update_cell_bitmask(p_pos.x, p_pos.y); } } else { - // manually placing tiles should not update bitmasks - if (tool != TOOL_PASTING) { - node->update_bitmask_area(Point2(p_pos)); - } + node->update_bitmask_area(Point2(p_pos)); } } @@ -396,6 +398,8 @@ void TileMapEditor::_update_palette() { // Update the palette Vector<int> selected = get_selected_tiles(); + int selected_single = palette->get_current(); + int selected_manual = manual_palette->get_current(); palette->clear(); manual_palette->clear(); manual_palette->hide(); @@ -503,7 +507,7 @@ void TileMapEditor::_update_palette() { if (selected.get(0) != TileMap::INVALID_CELL) { set_selected_tiles(selected); sel_tile = selected.get(Math::rand() % selected.size()); - } else { + } else if (palette->get_item_count() > 0) { palette->select(0); } @@ -545,9 +549,10 @@ void TileMapEditor::_update_palette() { if (manual_palette->get_item_count() > 0) { // Only show the manual palette if at least tile exists in it - int selected2 = manual_palette->get_current(); - if (selected2 == -1) selected2 = 0; - manual_palette->set_current(selected2); + if (selected_manual == -1 || selected_single != palette->get_current()) + selected_manual = 0; + if (selected_manual < manual_palette->get_item_count()) + manual_palette->set_current(selected_manual); manual_palette->show(); } @@ -759,15 +764,15 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p Rect2 r = node->get_tileset()->tile_get_region(p_cell); if (node->get_tileset()->tile_get_tile_mode(p_cell) == TileSet::AUTO_TILE || node->get_tileset()->tile_get_tile_mode(p_cell) == TileSet::ATLAS_TILE) { Vector2 offset; - int selected = manual_palette->get_current(); - if ((manual_autotile || (node->get_tileset()->tile_get_tile_mode(p_cell) == TileSet::ATLAS_TILE && !priority_atlastile)) && selected != -1) { - offset = manual_palette->get_item_metadata(selected); - } else { - if (tool != TOOL_PASTING) { - offset = node->get_tileset()->autotile_get_icon_coordinate(p_cell); + if (tool != TOOL_PASTING) { + int selected = manual_palette->get_current(); + if ((manual_autotile || (node->get_tileset()->tile_get_tile_mode(p_cell) == TileSet::ATLAS_TILE && !priority_atlastile)) && selected != -1) { + offset = manual_palette->get_item_metadata(selected); } else { - offset = p_autotile_coord; + offset = node->get_tileset()->autotile_get_icon_coordinate(p_cell); } + } else { + offset = p_autotile_coord; } int spacing = node->get_tileset()->autotile_get_spacing(p_cell); @@ -810,10 +815,11 @@ void TileMapEditor::_draw_cell(Control *p_viewport, int p_cell, const Point2i &p Color modulate = node->get_tileset()->tile_get_modulate(p_cell); modulate.a = 0.5; - if (r.has_no_area()) + if (r.has_no_area()) { p_viewport->draw_texture_rect(t, rect, false, modulate, p_transpose); - else + } else { p_viewport->draw_texture_rect_region(t, rect, r, modulate, p_transpose); + } } void TileMapEditor::_draw_fill_preview(Control *p_viewport, int p_cell, const Point2i &p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Point2i p_autotile_coord, const Transform2D &p_xform) { @@ -848,7 +854,6 @@ void TileMapEditor::_update_copydata() { TileData tcd; tcd.cell = node->get_cell(j, i); - if (tcd.cell != TileMap::INVALID_CELL) { tcd.pos = Point2i(j, i); tcd.flip_h = node->is_cell_x_flipped(j, i); @@ -1980,31 +1985,31 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) { p->connect("id_pressed", this, "_menu_option"); rotate_left_button = memnew(ToolButton); - rotate_left_button->set_tooltip(TTR("Rotate left")); + rotate_left_button->set_tooltip(TTR("Rotate Left")); rotate_left_button->set_focus_mode(FOCUS_NONE); rotate_left_button->connect("pressed", this, "_rotate", varray(-1)); tool_hb->add_child(rotate_left_button); rotate_right_button = memnew(ToolButton); - rotate_right_button->set_tooltip(TTR("Rotate right")); + rotate_right_button->set_tooltip(TTR("Rotate Right")); rotate_right_button->set_focus_mode(FOCUS_NONE); rotate_right_button->connect("pressed", this, "_rotate", varray(1)); tool_hb->add_child(rotate_right_button); flip_horizontal_button = memnew(ToolButton); - flip_horizontal_button->set_tooltip(TTR("Flip horizontally")); + flip_horizontal_button->set_tooltip(TTR("Flip Horizontally")); flip_horizontal_button->set_focus_mode(FOCUS_NONE); flip_horizontal_button->connect("pressed", this, "_flip_horizontal"); tool_hb->add_child(flip_horizontal_button); flip_vertical_button = memnew(ToolButton); - flip_vertical_button->set_tooltip(TTR("Flip vertically")); + flip_vertical_button->set_tooltip(TTR("Flip Vertically")); flip_vertical_button->set_focus_mode(FOCUS_NONE); flip_vertical_button->connect("pressed", this, "_flip_vertical"); tool_hb->add_child(flip_vertical_button); clear_transform_button = memnew(ToolButton); - clear_transform_button->set_tooltip(TTR("Clear transform")); + clear_transform_button->set_tooltip(TTR("Clear Transform")); clear_transform_button->set_focus_mode(FOCUS_NONE); clear_transform_button->connect("pressed", this, "_clear_transform"); tool_hb->add_child(clear_transform_button); diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp index 621ab039f4..c3b62810f1 100644 --- a/editor/script_editor_debugger.cpp +++ b/editor/script_editor_debugger.cpp @@ -1025,7 +1025,9 @@ void ScriptEditorDebugger::_performance_draw() { int pi = which[i]; Color c = get_color("accent_color", "Editor"); float h = (float)which[i] / (float)(perf_items.size()); - c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * 1.4); + // Use a darker color on light backgrounds for better visibility + float value_multiplier = EditorSettings::get_singleton()->is_dark_theme() ? 1.4 : 0.55; + c.set_hsv(Math::fmod(h + 0.4, 0.9), c.get_s() * 0.9, c.get_v() * value_multiplier); c.a = 0.6; perf_draw->draw_string(graph_font, r.position + Point2(0, graph_font->get_ascent()), perf_items[pi]->get_text(0), c, r.size.x); @@ -1045,9 +1047,8 @@ void ScriptEditorDebugger::_performance_draw() { float h2 = E->get()[pi] / m; h2 = (1.0 - h2) * r.size.y; - c.a = 0.7; if (E != perf_history.front()) - perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, 2.0); + perf_draw->draw_line(r.position + Point2(from, h2), r.position + Point2(from + spacing, prev), c, Math::round(EDSCALE), true); prev = h2; E = E->next(); from -= spacing; diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index 474eb51860..2007ae2669 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -3532,14 +3532,14 @@ TreeItem *Tree::_search_item_text(TreeItem *p_at, const String &p_find, int *r_c TreeItem *Tree::search_item_text(const String &p_find, int *r_col, bool p_selectable) { - TreeItem *from = get_selected()->get_next_visible(); + TreeItem *from = get_selected(); - if (!root) + if (!from) from = root; if (!from) return NULL; - return _search_item_text(from, p_find, r_col, p_selectable); + return _search_item_text(from->get_next_visible(true), p_find, r_col, p_selectable); } void Tree::_do_incr_search(const String &p_add) { |