Commit Graph

55 Commits

Author SHA1 Message Date
c16c5d35f4 Bind is_priority_generation bool in TerrainWorld. Also set it to false in the constructor, but set it to true when eneteeing tree if the world already has chunks loaded. 2025-04-12 22:53:18 +02:00
9289351284 Also check whether chunks are building when doing a priority generation. 2025-04-08 09:17:12 +02:00
97380e3f53 Only build the chunk in TerrainWorld::chunk_add() if the world is in the tree. 2025-04-08 08:32:37 +02:00
d99577365c Call chunk's enter_tree and set voxel world on entering the tree in TerrainWorld. 2025-04-08 08:31:53 +02:00
4c2ae4dc8b Fix error message on startup. 2025-04-07 22:13:14 +02:00
bd476c1d66 Split _create_chunk() to _create_chunk() and _setup_chunk() in TerrainWorld.
Unfortunately this is a breaking change. (Very slight though.)
Now _create_chunk() should be used to initialize serialized properties
in chunks. The new _setup_chunk() virtual should be used to initialize
other non/serialized properties (like meshers).
Fortunately the only thing that needs to be done is to split old
_create_chunk() into two.
Note that when using procedural generation, the old way should just work
without any updates necessary. This change is only needed when loading
of chunks is desired.
2025-04-07 22:06:04 +02:00
b7bfd13ec4 Added a force save all chunks button to TerrainWorld's inspector if a TerrainWorldChunkDataManager is set. 2025-04-07 17:37:26 +02:00
9fefe64c3b Added force_save_all_chunks() method to TerrainWorld. 2025-04-07 17:30:29 +02:00
117f6cffd1 Now TerrainWorld won't save it's chunks into scenes in the editor anymore if a TerrainWorldChunkDataManager is set. 2025-04-07 17:04:57 +02:00
5dbfdac48e Now TerrainWorld uses TerrainWorldChunkDataManagers if they are available. 2025-04-07 12:53:51 +02:00
a4ff7e9e66 Added use_vertex_lights_3d property to TerrainWorld. 2025-04-04 17:44:42 +02:00
ffa4cf938f Added more helper methods to TerrainWorld. 2025-04-04 16:24:30 +02:00
74ddba1eb1 Added mesh_data_resource_add() helper method to TerrainWorld. 2025-04-04 15:05:31 +02:00
0847706fa2 Implement setting a name to scenes in TerrainChunk. 2025-04-04 10:53:12 +02:00
7e52eb6b43 Now props added to TerrainWorld can also have a name. The prop bake editor tool uses it to save and restore node names. 2025-04-04 01:27:22 +02:00
5d3aa83ffa Rebuild chunks in TerrainWorld::prop_add(). 2025-04-04 01:14:23 +02:00
f56182466f Fix compile on windows, osx, and javascript. (Hopefully.) 2025-02-14 19:43:35 +01:00
10c5076819 Added the new scene_add() method to TerrainWorld. Also store scenes from props inside chunks. 2025-02-14 17:49:07 +01:00
601185c2bd Set prop ownership to lights in TerrainWorld::prop_add(). 2025-02-14 16:09:21 +01:00
7006c947cd Store whether a mesh_data_resource in a TerrainChunk is original or not. 2025-02-14 15:49:39 +01:00
2054f60c6d Renamed the new original parameter in TerrainChunk and TerrainWorld's prop api from owner to original. 2025-02-14 15:32:54 +01:00
0a87629b01 Set prop ownership when adding them in TerrainWorld. 2025-02-14 15:28:45 +01:00
954ca26471 Make sure the remaining chunks are notified of the changed world lights when adding / removing chunks. 2025-02-11 00:50:21 +01:00
583298dbfe Now TerrainLights are stored inside chunks (they are also automatically saved with them). Also changed TerrainLight's api to makes use of Vector3i. 2025-02-11 00:38:48 +01:00
eb3ed4fa20 Now props and mesh data resources are saved with the TerrainChunks. 2025-02-10 17:48:11 +01:00
b0177a2c3a Only generate chunks once. 2025-02-10 15:24:16 +01:00
23614770f1 Simplify chunks_set() in TerrainWorld. 2025-02-08 15:55:40 +01:00
a980238482 Add the new chunk to the generation queue instead of directly calling it's build method in TerrainWorld::chunk_add(). 2025-02-08 14:47:29 +01:00
4886ff454b Call TerrainChunk's build() after it's added to a World manually. 2025-02-08 14:22:55 +01:00
4ac6095509 Added a new helper method to TerrainWorld. 2025-02-08 14:22:31 +01:00
12214cb8c7 Fix potential hang on exit due to deadlocks. 2025-02-08 11:24:42 +01:00
f7a9f5201f Added liquid mode to the isolevel brush and paint brush tools in TerrainWorldEditor. 2025-02-08 07:49:26 +01:00
17e048a044 Added a new helper method to TerrainWorld. 2025-02-08 07:44:55 +01:00
39b3a12b1a Handle a missing case when setting voxels in TerrainWorld. 2025-02-07 12:17:11 +01:00
2024a33ee9 Implemented chunk material invalidation support for TerrainLibraryMergerPCM. 2025-02-07 10:08:22 +01:00
2688162cf9 Optimized editing in TerrainWorldEditor. 2025-02-06 17:42:53 +01:00
c13a4d08a5 Use the new immediate build mode in TerrainWorld's set_voxel_at_world_data_position(). 2025-02-06 17:22:42 +01:00
9cd4da72c8 Added new helper methods to TerrainWorld. 2025-02-04 18:26:01 +01:00
c199161646 Removed set_voxel_with_tool from TerrainWorld. 2025-02-04 13:10:28 +01:00
a52a68afb7 Added more properties to PropDataLight and other light helper classes. 2024-03-18 08:38:27 +01:00
429575fab6 File copyright header updates pt8. 2023-12-18 00:18:53 +01:00
5088d32fa0 Removed my old copyright headers. 2023-12-17 22:59:50 +01:00
3f8ca3136e Codestyle fixes. 2023-10-13 20:41:22 +02:00
c5ec0b8a33 Codestyle. 2023-10-13 20:26:59 +02:00
f058c87868 Backported from godot4: Rework Navigation Avoidance
Rework Navigation Avoidance.
- smix8
a6ac305f96
2023-06-10 20:58:49 +02:00
b240df7df6 Updated more copyright headers for 2023. 2022-12-31 21:07:05 +01:00
2fdaacfa66 Moved away from the MESH_DATA_RESOURCE_PRESENT define aswell. 2022-10-05 12:54:17 +02:00
ea2a36c4ea Also replaced the old PROPS_PRESENT defines with the module system's generated defines. 2022-10-05 11:16:32 +02:00
dc9cc716c7 Moved Object related classes under core/object. 2022-08-17 13:45:14 +02:00
e71e3ed897 Now Vector4, Vector4i, Projection, PoolVector4Array, PoolVector4iArray, are built in variant types. Also reordered the Variant's Type enum, renamed _RID in it to RID, fixed a few smaller issues and removed some very old compat code. 2022-08-16 21:55:56 +02:00