Commit Graph

3466 Commits

Author SHA1 Message Date
Yuri Sizov b02c61ddb1 Ignore OS specific values (constants, project settings, properties)
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
2021-10-10 23:40:32 +03:00
Bartłomiej T. Listwon 5b4e3624f4 Faster hash_compare for integer and string keys in dictionaries 2021-10-08 10:13:43 +02:00
Rémi Verschelde 81da3b8ba4
Use translated docs in PropertySelector
And do the dedent and stripping for both translated and
non-translated strings for consistency, and so that we
don't need to do it at the call site.

(cherry picked from commit a16031beb6)
2021-10-07 12:48:23 +02:00
Thakee Nathees 46df39d5e5
i18n: Fix parsing of multiple escapes before quotes
See https://github.com/godotengine/godot/pull/37114#issuecomment-601463765

(cherry picked from commit 8c3ad2af93)
2021-10-07 12:48:23 +02:00
Rémi Verschelde 9729432ec0
i18n: Add support for translating the class reference
- Parse `.po` files from `doc/translations/*.po` like already done
  with `editor/translations/*.po`.
- Add logic to register a doc translation mapping in `TranslationServer`
  and `EditorSettings`.
- Add `DTR()` to lookup the doc translation mapping (similar to `TTR()`).
  Strings are automatically dedented and stripped of whitespace to ensure
  that they would match the translation catalog.
- Use `DTR()` to translate relevant strings in `EditorHelp`,
  `EditorInspector`, `CreateDialog`, `ConnectionsDialog`.
- Small simplification to `TranslationLoaderPO`, the path argument was
  not really meaningful.

(cherry picked from commit 4857648a16)
2021-10-07 12:48:23 +02:00
Maxime Lapointe 487ca87e94
Improve error message when instantiating virtual class
(cherry picked from commit 29dc8de88b)
2021-10-06 09:29:31 +02:00
Rémi Verschelde df69945f1f
Merge pull request #52714 from m4gr3d/provide_getter_for_project_data_dir_3x 2021-10-05 21:02:41 +02:00
Rémi Verschelde c637588214
Merge pull request #47500 from briansemrau/nan-inf-tscn-parsing-bug-3.x 2021-10-05 20:00:05 +02:00
Thakee Nathees 91be2b4407 NaN, INF read/write bug fixed
Fix: #40589
2021-10-05 13:28:39 -04:00
Rémi Verschelde 393166793c
Merge pull request #52952 from Calinou/cpu-lightmapper-num-threads-editor-setting 2021-10-05 19:20:29 +02:00
Hugo Locurcio 0e943939e2
Add an editor setting to configure number of threads for lightmap baking
This can be used to free some CPU cores when baking lightmaps.
When using fewer CPU cores, lightmap baking is slower but background
tasks aren't slowed down as much.
2021-10-05 17:35:20 +02:00
Rémi Verschelde db0370cab5
Merge pull request #51086 from aaronfranke/3.x-warn-dectime 2021-10-05 12:06:03 +02:00
Rémi Verschelde d82c75adca
Merge pull request #53393 from lawnjelly/dev_asserts 2021-10-05 11:25:24 +02:00
Rémi Verschelde 5f1b659d35
Merge pull request #53226 from aaronfranke/3.x-c-locale 2021-10-05 11:20:20 +02:00
Jordan Schidlowsky db44406082
revert 0d7409a so additional error information prints in release builds
(cherry picked from commit b78d399f91)
2021-10-05 10:56:53 +02:00
lawnjelly c835f1f3c5 Add DEV_ASSERT and DEV_CHECK macros
Change the existing DEV_ASSERT function to be switched on and off by the DEV_ENABLED define. DEV_ASSERT breaks into the debugger as soon as hit.
Add error macros DEV_CHECK and DEV_CHECK_ONCE to add an alternative check that ERR_PRINT when a condition fails, again only enabled in DEV_ENABLED builds.
2021-10-04 14:57:54 +01:00
Shatur95 8ebefc8cf4
Fix CONNECT_REFERENCE_COUNTED
(cherry picked from commit e5a086fde6)
2021-10-04 15:15:27 +02:00
PouleyKetchoupp 54424b57b3
Fix buffer overflow in 2D BVH
Some areas of code were missed and assumed Vector3.

(cherry picked from commit d3c6395dcd)
2021-10-04 15:15:23 +02:00
Lucy 1d3f1c8c0a
Fix Platform Thread Override
(cherry picked from commit 5fe1857496)
2021-10-04 14:37:27 +02:00
Haoyu Qiu 7be67ee1b7 Fix crash when creating thread 2021-10-03 16:03:41 +08:00
Rémi Verschelde 7c9e06f936
Merge pull request #48686 from bruvzg/bundle_icon_3 2021-09-30 14:55:41 +02:00
Aaron Franke c1734dacf6
Add locale rename for the "C" locale 2021-09-29 13:57:24 -05:00
Rémi Verschelde 6bdd84b8d5
Fix -Wextra warnings from GCC 11 2021-09-29 15:23:12 +02:00
O01eg cddabf2a8b
Implement override of get_message 2021-09-29 14:06:57 +03:00
LATRio 4fb7b1ebb0 fix crash in Variant::get_method_default_arguments when wrong type is passed 2021-09-28 19:57:45 +09:00
Haoyu Qiu 8a47fe9eb0 Fix crash when casting from null 2021-09-26 10:08:14 +08:00
kleonc 67b27ea4c9
AStar Add error messages
(cherry picked from commit 71255bc2a9)
2021-09-21 20:33:12 +02:00
Rémi Verschelde b4fc24b73f
Implement `OS::get_locale_language()` helper method
This method extracts the 2 or 3-letter language code from `OS::get_locale()`,
making it easier for users to identify the "main" language code for users
that might have different OS locales due to different OS or region, but
should be matched to the same translation (e.g. "generic" Spanish).

Fixes #40703.

(cherry picked from commit def99c7baf)
2021-09-21 20:33:12 +02:00
Lucy 83bbb527ad
Allow for platform Thread implementation override
(cherry picked from commit e9723efd34)
2021-09-21 17:15:00 +02:00
jmb462 e7dac5da41
Adding InputMap action error suggestion for Input singleton
(cherry picked from commit a3b9842616)
2021-09-21 17:14:58 +02:00
Aaron Franke a5543bc35e
[3.x] Warn when using the dectime method
dectime has been removed in the master branch (what will be Godot 4.0)
2021-09-21 10:03:42 -05:00
Rémi Verschelde 22aab6be1c
Merge pull request #51796 from RandomShaper/dangling_obj_release_3.x
[3.x] Promote object validity checks to release builds
2021-09-21 11:48:11 +02:00
Pedro J. Estébanez 26edc6cd41 Promote object validity checks to release builds
Extra:
- Optimized the debug-only check about why the object is null to determine if it's because it has been deleted (the RC is enough; no need to check the ObjectDB).
- Because of the previous point. the debugger being attached is not required anymore for giving the "Object was deleted" error; from now, it only matters that it's a debug build.
- `is_instance_valid()` is now trustworthy. It will return `true` if, and only if, the last object assigned to a `Variant` is still alive (and not if a new object happened to be created at the same memory address of the old one).
- Replacements of `instance_validate()` are used where possible `Variant::is_invalid_object()` is introduced to help with that. (GDScript's `is_instance_valid()` is good.)
2021-09-21 10:39:04 +02:00
Rémi Verschelde b37776fa2f
Merge pull request #52591 from timothyqiu/error-macros
[3.x] Remove do{ } while(0) wrapper around error macros
2021-09-21 10:38:34 +02:00
David Socha ede023d4fa
Update connection comparison operator to compare connection sources based on instance ID instead of by pointer 2021-09-21 01:38:11 -05:00
Rémi Verschelde 91d0e985cd
Merge pull request #52572 from timothyqiu/expose-enum-3x
[3.x] Expose enum related methods in ClassDB
2021-09-20 16:12:16 +02:00
lawnjelly 0316d50ece
Improve Basis::get_quaternion error message
The previous error message incorrectly suggested that any Basis could be fixed by calling get_rotation_quation() or orthonormalize(). This PR points out that only a valid rotation Basis can be fixed in this way.

(cherry picked from commit d3a3b3aff3)
2021-09-20 13:05:26 +02:00
Ricardo Subtil 723ad5ef61
Fix path with multiple slashes not being corrected on templates
(cherry picked from commit eef0327d1e)
2021-09-20 13:01:13 +02:00
Hugo Locurcio 59eafe4cd3
Remove `#ifdefs` for handling compilation with Visual Studio < 2015
Godot 3.3 and later require Visual Studio 2017 to be compiled.

(cherry picked from commit fc0bfbb33b)
2021-09-19 11:30:22 +02:00
Rémi Verschelde 16ca2757f8
Merge pull request #52737 from EIRTeam/action_erase_fix 2021-09-17 11:52:42 +02:00
Álex Román Núñez 43bc8830f1 Fix InputMap.action_erase_event() failing to erase events correctly.
Fixes #52733

(3.x backport of 7104229a85)
2021-09-17 03:08:21 +02:00
Theraot d03f7c0598 [3.x] Fix get_base_dir windows top level directory logic
This is a fix for https://github.com/godotengine/godot/issues/52048
2021-09-16 06:38:29 -05:00
Fredia Huya-Kouadio c8b022c165 Provide a getter for the project data directory. 2021-09-15 13:00:25 -07:00
Rémi Verschelde 187b1ec61e
Merge pull request #51095 from RandomShaper/error_cast_freed_object_3.x
[3.x] Complain if casting a freed object in a debug session
2021-09-14 22:40:17 +02:00
Pedro J. Estébanez 123d3ef935 Complain if casting a freed object in a debug session
The idea is to give the user a chance to realize a mistake that will cause a crash in a release build (or with no debugger attached).
2021-09-14 21:05:47 +02:00
Haoyu Qiu 25bd0c3f72
Try other resolved IPs if one fails to connect
(cherry picked from commit fd52e18d19)
2021-09-14 14:18:18 +02:00
Haoyu Qiu e46d54ebec
Quote and escape ConfigFile keys when necessary
(cherry picked from commit 597d489a20)
2021-09-14 13:41:27 +02:00
Gilles Roudière b0cb253a51
Fix LocalVector crash on insert.
(cherry picked from commit de0765b94a)
2021-09-14 13:41:26 +02:00
Haoyu Qiu 70853fd669 Remove do{ } while(0) wrapper around error macros 2021-09-12 15:04:53 +08:00
Haoyu Qiu 468a2a2a65 Expose enum related methods in ClassDB 2021-09-11 20:33:29 +08:00