Commit Graph
312 Commits
Author SHA1 Message Date
eoineoineoinandGitHub 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
TayrtahnandGitHub da7abc6580 Add analyzer and fixer for redundant DataField tag arguments (#5134)
* Add analyzer and fixer for redundant DataField tag arguments

* Share Tag autogeneration logic
2024-05-17 07:44:03 +02:00
41c40f1a94 Fix checking wrong property in TryGetVariableType() (#5120)
Co-authored-by: amylizzle <amylizzle@users.noreply.github.com>
2024-05-14 08:44:19 +10:00
ccbb6ddec7 Add method for getting type of var (#5070)
Co-authored-by: amylizzle <amylizzle@users.noreply.github.com>
2024-05-06 20:39:32 +02:00
DrSmugleafandGitHub beb1c4b1fb Add EntProtoId<T> (#5097)
* Add EntProtoId<T>

* Fix error messages

* Shorten error messages

* Make services non-optional
2024-05-05 22:59:45 +02:00
Leon FriedrichandGitHub 4c3c74865c Fix yaml linter & improve validation of static fields (#5056) 2024-04-25 00:27:02 +10:00
TayrtahnandGitHub 8db3da4852 Add Type tracking to FieldNotFoundErrorNode (#5032)
* Add Type tracking to FieldNotFoundErrorNode

* Suggested changes, plus xmldoc and primary constructor conversion.
2024-04-08 19:27:02 +02:00
Leon FriedrichandGitHub c8cb13f832 Fix serialization error logging (#4973) 2024-03-17 18:01:00 +01:00
metalgearslothandGitHub c7d48b2526 Remove ISerHooks obsoletion (#4928)
Still needed in rare cases so not really deprecated and we already discourage coders from using it where possible.
2024-02-28 19:01:08 +01:00
Pieter-Jan Briers 74622bac83 Add DateTimeSerializer 2024-02-11 16:40:52 +01:00
Pieter-Jan BriersandGitHub af98933173 Isolate net messages in integration tests. (#4838)
* Isolate net messages in integration tests.

Integration tests don't use Lidgren to connect client and send, instead they just use some in-process channels to communicate. Because of this, the original implementation of net messages *directly* passed the net message instances between client and server instances. This caused issues whenever content would mutate data in a NetMessage after it "passed through".

Now we run the messages through WriteToBuffer() and ReadFromBuffer() so they pass through binary serialization. This means there's no more implicit sharing of the objects.

Note that this requires some trickery: Lidgren's message types have internal constructors. Really ideally we'd change the engine to make this more testable... but that's a content breaking change. Instead I just added InternalsVisibleTo to Lidgren so we can mess with it. We maintain the library ourselves anyways I can do what I want.

Fixes #4836

* Register Robust.UnitTesting as assembly for reflection.

This is necessary so that serialized types in the assembly can be picked up by NetSerializer.

Have to disable automatic reflection on all entity systems/components that tests register manually right now, because otherwise tests break.

* Stop shallow cloning specific net messages in integration tests.

This isn't necessary anymore now that we have a thorough fix.

* Wow I really forgot to copy-paste that line to the other side huh.

* Add test that serializer hash matches.

* Another test one I missed earlier.

* Changelog
2024-01-16 21:04:39 +01:00
Leon FriedrichandGitHub c1789cbbaf Make MappingDataNode ordered (#4800) 2024-01-03 10:22:44 +11:00
metalgearslothandGitHub 371cd7ddf1 Reduce robust mapped string allocs (#4754) 2023-12-22 17:08:07 +01:00
Leon FriedrichandGitHub 1f8b89e92f Add frozen collections to sandbox and add yaml type serializers (#4721) 2023-12-16 18:36:58 +01:00
Leon FriedrichandGitHub 6246ae412e Make RobustMappedStringSerializer use frozen dictionaries (#4717)
* Make RobustMappedStringSerializer use frozen dictionaries

* Update RobustMappedStringSerializer.MappedStringDict.cs

* Change log to verbose

* RStopwatch.StartNew()
2023-12-16 15:48:57 +11:00
2733435218 Audio rework unrevert + audio packaging (#4555)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2023-11-27 22:12:26 +11:00
metalgearslothandGitHub 24b0165ec9 Revert Arch (#4613) 2023-11-27 21:41:01 +11:00
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 FriedrichandGitHub 19a3e82848 Cache prototype data for IEntityManager.IsDefault() (#4531) 2023-10-29 12:54:52 +11:00
DrSmugleafandGitHub 16d916796a Add doc clarification to CopyByRef inheritance for the future coder (#4476) 2023-10-10 17:34:24 -07:00
deltanedasandGitHub 662195e4ff add SortedSetSerializer (#4473) 2023-10-10 04:29:42 +11:00
DrSmugleafandGitHub 0c2c8f352a Add LocId and LocIdSerializer (#4456) 2023-09-28 20:22:17 +10:00
Leon FriedrichandGitHub 7da22557fe Add entity categories (#4356) 2023-09-18 12:14:26 +10:00
metalgearslothandGitHub 4879252e99 Remove comprefs entirely (#4367) 2023-09-15 21:52:47 +10:00
DrSmugleafandGitHub 814d6fe2d0 Add ProtoId, EntProtoId and serializers (#4387) 2023-09-12 23:19:40 -07:00
DrSmugleafandGitHub 77b98b8308 Add ProtoId, EntProtoId and serializers (#4386) 2023-09-13 14:32:01 +10:00
DrSmugleafandGitHub 1b6123c79f Make data field tags optional (#4382) 2023-09-13 12:58:46 +10:00
DrSmugleafandGitHub 4666a87aa5 Add obsoletion warnings to serialization source generated methods, xmldocs (#4364) 2023-09-11 20:15:07 +10:00
Leon FriedrichandGitHub d2311c193f Add AbstractDictionarySerializer (#4276) 2023-08-23 18:53:13 +10:00
DrSmugleafandGitHub b2d121e780 Fix serialization sharing instances when copying data definitions and not assigning null when the source is null (#4295) 2023-08-22 23:59:03 -07:00
DrSmugleafandGitHub 66239d23ea Refactor serialization copying to use source generators (#4286) 2023-08-22 17:37:13 -07:00
Pieter-Jan Briers d6467f768a Fix Logger calls in ComponentRegistrySerializer 2023-08-11 23:50:54 +02:00
ArturandGitHub aff5711fde Add missing CultureInfo.InvariantCulture in angle validaton (#4248) 2023-08-08 11:52:24 +10:00
Leon FriedrichandGitHub 5843f1087e Add ContentFileRead test and fix file reading on windows (#4242) 2023-08-07 11:39:09 +10:00
Leon FriedrichandGitHub 93c0ce815f Add IPrototypeManager.EnumerateKinds() (#4244) 2023-08-07 11:24:34 +10:00
Leon FriedrichandGitHub b699e22c85 More serialization fixes (#4224) 2023-08-06 11:08:48 +10:00
Leon FriedrichandGitHub a137c839fc Add prototype serialization validation methods. (#4210) 2023-08-02 10:29:55 +10:00
Leon FriedrichandGitHub ff41329ad7 Add DataNode.ToString() (#4209) 2023-08-01 12:13:46 +10:00
Leon FriedrichandGitHub fffe3c56e9 Fix enum serialization (#4208) 2023-07-30 20:17:22 +10:00
Leon FriedrichandGitHub 9969899f38 Add method to validate prototype ids in c# fields (#4189) 2023-07-30 03:31:17 +10:00
metalgearslothandGitHub 7d1ad527d9 Replace Robust Vector2 with System.Numerics (#4092) 2023-07-08 14:08:26 +10:00
Leon FriedrichandGitHub 8fd1e9047f Rejig time offset serializer (#4154) 2023-06-26 06:29:45 +10:00
Leon FriedrichandGitHub 11fed18c47 Fix mapped strings serializer not properly checking string size. (#4115) 2023-06-06 10:55:57 +02:00
06f5c78152 Allow specifiying overrides for components when spawning an entity. (#4068)
* Oh goddamnit this is a refactor now.

* aaaaaaaaaaa

---------

Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
2023-05-19 15:38:45 -05:00
Raphael BertocheandGitHub f08344f60e Fix duplicate yaml validation error exception (#4032) 2023-05-14 10:37:05 +10:00
Leon FriedrichandGitHub e2bac1b3df Sort serializable types (#4012) 2023-05-08 16:05:23 +10:00
metalgearslothandGitHub a52719b53f Refactor fixture serialization (#3923) 2023-05-06 16:26:06 +10:00
metalgearslothandGitHub 45734a2bdd TimeOffsetSerializer fixes (#3985) 2023-05-01 14:47:16 +10:00
Leon FriedrichandGitHub c5ecc426d0 Remove server and shared sprite component (#3981) 2023-04-30 16:09:07 +10:00
metalgearslothandGitHub a65ccd7c24 Add debug assert for data defs (#3977) 2023-04-29 15:53:02 +10:00