Age | Commit message (Collapse) | Author |
|
- Add support for explicit values in properties using `PROPERTY_HINT_FLAGS`
that works the same way it does for enums.
- Fix enums and flags in VisualScriptEditor (it wasn't considering the
explicit value).
- Use `PROPERTY_HINT_FLAGS` for C# enums with the FlagsAttribute instead
of `PROPERTY_HINT_ENUM`.
|
|
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
|
|
Adds a new, cleaned up, HashMap implementation.
* Uses Robin Hood Hashing (https://en.wikipedia.org/wiki/Hash_table#Robin_Hood_hashing).
* Keeps elements in a double linked list for simpler, ordered, iteration.
* Allows keeping iterators for later use in removal (Unlike Map<>, it does not do much
for performance vs keeping the key, but helps replace old code).
* Uses a more modern C++ iterator API, deprecates the old one.
* Supports custom allocator (in case there is a wish to use a paged one).
This class aims to unify all the associative template usage and replace it by this one:
* Map<> (whereas key order does not matter, which is 99% of cases)
* HashMap<>
* OrderedHashMap<>
* OAHashMap<>
|
|
|
|
|
|
|
|
|
|
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
|
|
Using codespell 2.2-dev from current git.
Fix a couple incorrect uses of gendered pronouns.
|
|
`DirAccess *` needs to be deleted manually, and this is often forgotten
especially when doing early returns with `ERR_FAIL_COND`.
`DirAccessRef` is deleted automatically when it goes out of scope.
Co-authored-by: bruvzg <7645683+bruvzg@users.noreply.github.com>
|
|
Remove currently unused implementation of TextureBasisU, could be re-added
later on if needed and ported.
|
|
|
|
Happy new year to the wonderful Godot community!
|
|
If the class is generic, we must get its generic type definition and use
it to retrieve the delegates.
|
|
We prefer to prevent using chained assignment (`T a = b = c = T();`) as this
can lead to confusing code and subtle bugs.
According to https://en.wikipedia.org/wiki/Assignment_operator_(C%2B%2B), C++
allows any arbitrary return type, so this is standard compliant.
This could be re-assessed if/when we have an actual need for a behavior more
akin to that of the C++ STL, for now this PR simply changes a handful of
cases which were inconsistent with the rest of the codebase (`void` return
type was already the most common case prior to this commit).
|
|
Settings that aren't within a subsection are difficult to reach when
other settings do have a subsection.
This also adds documentation for the project setting.
|
|
clang-format keeps breaking the way it handles break *after* ternary operators,
so I give up and go with the only style they seem to actually test.
|
|
Sets `AlignOperands` to `DontAlign`.
`clang-format` developers seem to mostly care about space-based indentation and
every other version of clang-format breaks the bad mismatch of tabs and spaces
that it seems to use for operand alignment. So it's better without, so that it
respects our two-tabs `ContinuationIndentWidth`.
|
|
Chose to pass unhandled exceptions to the toaster, we might want to reconsider
if those are already reported somewhere else (e.g. in the Mono panel).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Allows using generic C# types in signals as long as they inherit
from `Godot.Object`.
|
|
|
|
any -> any_peer
sync -> call_local
ordered -> unreliable_ordered
Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER
Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
|
|
Update attribute class references in mono cache
|
|
This commit completely removes the RPC_MODE_MASTER ("master" keyword),
and renames the RPC_MODE_PUPPET to RPC_MODE_AUTHORITY ("auth" keyword).
This commit also renames the "Node.[get|set]_network_master" methods to
"Node.[get|set]_network_authority".
This commit also renames the RPC_MODE_REMOTE constant to RPC_MODE_ANY.
RPC_MODE_MASTER in Godot 3.x meant that a given RPC would be callable by
any puppet peer on the master, while RPC_MODE_PUPPET meant that it would
be callable by the master on any puppet.
Beside proving to be very confusing to the user (referring to where it
could be called instead of who can call it) the RPC_MODE_MASTER is quite
useless. It is almost the same as RPC_MODE_REMOTE (anyone can call) with
the exception that the network master cannot. While this could be useful
to check in some case, in such a function you would anyway need to check
in code who is the caller via get_rpc_sender_id(), so adding the check
there for those rare cases does not warrants a dedicated mode.
|
|
Fix race condition on `script_binding` in C#
|
|
Previously there weren't any Callable arguments with a default value,
but d4dd859991205e6cecfa9a0553b89db47c983d0b introduced one.
|
|
Thanks to neikeq for the initial work.
Co-authored-by: Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com>
|
|
This was needed after: 44691448911f1d29d4d79dbdd5553734761e57c4
|
|
|
|
|
|
|
|
- Move the "sync" property for RPCs to RPCConfig.
- Unify GDScript annotations into a single one:
- `@rpc(master)` # default
- `@rpc(puppet)`
- `@rpc(any)` # former `@remote`
- Implement three additional `@rpc` options:
- The second parameter is the "sync" option (which also calls the
function locally when RPCing). One of "sync", "nosync".
- The third parameter is the transfer mode (reliable, unreliable,
ordered).
- The third parameter is the channel (unused for now).
|
|
* The harcoded 8 slots are no more and impose limits in the new extension system.
* New system is limitless, although it will impose small performance hit with a mutex.
* Use a token to request the instance binding.
**Warning**: Mono will most likely break as a result of this, will need to be modified to use the new system.
|
|
|
|
- Fix C++ compile errors about pending variable renames after the `Reference` to `RefCount` change.
- Fix C# compile errors due to the recent rename of `EnablePlugin()` and `Build()`, which are now underscore-prefixed in bindings.
- Additional rename: `godot_icall_Reference_Dtor` to `godot_icall_RefCounted_Dtor`.
|
|
Add a Time singleton
|
|
|
|
|
|
File handling APIs are typically considered part of I/O, and we did have most
`FileAccess` implementations in `core/io` already.
|
|
|
|
Also _transform to _transform3d
|
|
|
|
Follow-up to #38736 (these uses were likely added after this PR was merged).
|
|
The current code style guidelines forbid the use of `auto`.
Some uses of `auto` are still present, such as in UWP code (which
can't be currently tested) and macros (where removing `auto` isn't
easy).
|