Commit Graph

60 Commits

Author SHA1 Message Date
IProduceWidgets
a2983a5ee0 safe dictionary assignment (#5587) 2025-01-06 21:02:02 +01:00
Pieter-Jan Briers
05cdb99252 Warning fixes around IMapManager.GetMapEntityId (#5298)
* Add MapSystem.GetMapOrInvalid

This is effectively the same exact behavior as IMapManager.GetMapEntityId. Adding this so I don't have to consider whether warning fixes using MapSystem.GetMap() instead would change behavior.

* Warning fixes around IMapManager.GetMapEntityId

* Fix tests
2024-07-13 15:27:32 +10:00
eoineoineoin
56c30edf04 Replace Matrix3 with System.Numerics.Matrix3x2 (#5078)
* Delete Matrix3. Replace with System.Numerics.Matrix3x2

* Feedback

* release notes
2024-06-02 14:08:47 +10:00
Leon Friedrich
1031ae4cc5 Fix mapping not pausing maps (#5063) 2024-04-23 14:25:40 +10:00
Leon Friedrich
0ab59d70b1 More mapinit fixes (#5058) 2024-04-21 18:57:20 +10:00
Leon Friedrich
15f94bd094 Fix mapinit persistence when overwriting existing maps (#5057)
* Fix mapinit persistence when overwriting existing maps

* Hours wasted chasing fucking chickens in a crate
2024-04-21 16:48:39 +10:00
Leon Friedrich
d5c4981648 Partial MapManager refactor (#5042)
* MapManager rejig

* Update Tests

* A
2024-04-18 14:05:02 +10:00
Pieter-Jan Briers
2a9de462d5 Preserve tile maps when saving maps & related changes (#5003)
* Un-hardcode behavior to make a component not saved to map file.

MapSaveId is a special component that can't be saved to map files due to a hardcoded type check. This behavior can now be applied to any component with [UnsavedComponent].

Moved "component registration" attributes into a single file because they don't deserve their own (poorly organized) .cs files.

* Add ITileDefinitionManager.TryGetDefinition

Try-pattern version of the existing indexers.

* Preserve tile maps when saving maps

This changes the map saver and loader code so that the "tilemap" can be preserved between map modifications as much as possible.

The tile map from the loaded map gets stored onto MapSaveTileMapComponent components on all loaded grids. This tile map is then used when saving, meaning that changes to the engine's internal tile IDs do not cause diffs.

Fixes #5000

* Changelog

* Fix tests
2024-03-27 14:14:19 +11:00
Leon Friedrich
c1789cbbaf Make MappingDataNode ordered (#4800) 2024-01-03 10:22:44 +11:00
Leon Friedrich
97d03c6954 VisMask and EntityLifeStage changes (#4794) 2024-01-02 11:43:08 +11:00
Leon Friedrich
bc84590a33 Make ChildEnumerator out value non-nullable (#4707)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-12-17 03:10:20 +11:00
DrSmugleaf
a23915e0dd Make MapLoaderSystem.GetSaveData public (#4702) 2023-12-12 13:09:39 +11:00
metalgearsloth
24b0165ec9 Revert Arch (#4613) 2023-11-27 21:41:01 +11:00
metalgearsloth
4cb51af733 Add arch trimming back (#4608) 2023-11-26 12:35:13 +11:00
metalgearsloth
7dce51e2cf Arch PR two electric boogaloo (#4388)
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-11-23 14:29:37 +11:00
Leon Friedrich
19564a421b Fix deserialization of empty grid chunks (#4565) 2023-11-13 05:22:20 +11:00
DrSmugleaf
b737ecf9b3 Add generic EntityUid, remove some usages of .Owner (#4498) 2023-10-19 12:23:48 -07:00
metalgearsloth
1ea7071ffb Backport some arch comp net changes (#4408)
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2023-09-17 11:03:11 +10:00
ike709
8917b29255 Convert Tile.TypeId to an int (#4307)
Co-authored-by: ike709 <ike709@github.com>
Co-authored-by: DrSmugleaf <drsmugleaf@gmail.com>
2023-08-26 22:16:14 +10:00
metalgearsloth
e4a14d1ec8 Start MapGrid ECS (#4185) 2023-07-23 20:50:23 +10:00
metalgearsloth
69589195e0 MapLoader perf stuff (#4179) 2023-07-10 17:53:46 +10:00
metalgearsloth
7d1ad527d9 Replace Robust Vector2 with System.Numerics (#4092) 2023-07-08 14:08:26 +10:00
Pieter-Jan Briers
e71f1cc8a5 Warning fixes (#4160)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-07-01 22:02:12 +10:00
Leon Friedrich
8fd1e9047f Rejig time offset serializer (#4154) 2023-06-26 06:29:45 +10:00
metalgearsloth
474f4f09b9 Remove name + author from map file (#3992) 2023-05-07 17:22:14 +02:00
Leon Friedrich
af1fc3cf6b Add BeforeSaveEvent (#4005) 2023-05-07 09:37:20 +10:00
metalgearsloth
ee8f95650b Fix maploader logs (#4001) 2023-05-04 23:32:45 +10:00
metalgearsloth
b24e6d0673 Add comp to loaded maps (#3994)
Easiest way to tell how MapLoader loaded a map (i.e. did it use the existing map or did it overwrite it).
2023-05-01 19:32:23 -04:00
metalgearsloth
45734a2bdd TimeOffsetSerializer fixes (#3985) 2023-05-01 14:47:16 +10:00
Leon Friedrich
3aa4bd1448 Add basic map loader support for entity renaming (#3975) 2023-05-01 13:35:47 +10:00
Leon Friedrich
c5ecc426d0 Remove server and shared sprite component (#3981) 2023-04-30 16:09:07 +10:00
metalgearsloth
96ef013095 Save entities by prototype in map data (#3913) 2023-04-29 14:08:52 +10:00
ElectroJr
c4dead2c99 Release notes + tiny map saving fix 2023-04-25 00:06:05 -04:00
Leon Friedrich
f917748809 Make map loading log errors on invalid UIDs (#3970) 2023-04-25 13:58:10 +10:00
metalgearsloth
8a6cadd38f Revert "Revert "Replace ResourcePath with ResPath (#3926)" (#3949)" (#3950) 2023-04-20 20:15:57 +10:00
metalgearsloth
d646403068 Revert "Replace ResourcePath with ResPath (#3926)" (#3949) 2023-04-20 11:43:51 +10:00
Ygg01
d6a3e1e286 Replace ResourcePath with ResPath (#3926) 2023-04-19 23:37:46 +10:00
metalgearsloth
56d15c8ef0 Fix mapinit in some instances (#3931) 2023-04-14 10:26:54 +10:00
metalgearsloth
7a35a859d9 Set paused before ent startup when loading (#3806) 2023-04-12 19:51:26 +10:00
Leon Friedrich
521a97939d Suppress invalid map saving warnings (#3873) 2023-03-27 22:37:24 +11:00
metalgearsloth
e2b7c11750 Don't write unnecessary tilemap (#3824) 2023-03-24 13:18:34 +11:00
Leon Friedrich
bfa9965056 Fix map saving bug (#3852) 2023-03-17 17:28:51 +11:00
metalgearsloth
211dfb4b11 Cull some .Owner calls around transforms (#3791) 2023-02-22 12:40:29 +11:00
Leon Friedrich
084cc1a073 Add NoLocalRotation check to map saving (#3649) 2023-01-04 08:01:10 +11:00
Leon Friedrich
7857e3a195 NoLocalRotation fixes (#3634) 2023-01-01 11:39:52 +11:00
Paul Ritter
bafbdb6363 Analyzer to check that notnullableflag is being properly used (#3569) 2022-12-21 00:11:04 +01:00
metalgearsloth
3bcd53d7c5 Bandaid mapgrid loading (#3577) 2022-12-14 23:38:56 +01:00
metalgearsloth
8e70afd235 Fix pause map serialization for time offsets (#3507) 2022-12-13 13:09:21 +11:00
metalgearsloth
31c4a331ab Swap entities when a map is loaded onto an existing map (#3511) 2022-12-10 14:37:23 +11:00
Leon Friedrich
ada056dcdf Fix rootUid returning all loaded entities (#3540) 2022-11-29 15:20:23 +11:00