Compare commits

...

631 Commits

Author SHA1 Message Date
Jezithyr
fd2a0f97eb Version: 0.80.2.0 2023-01-13 03:11:43 -08:00
Jezithyr
eaf74f11d1 Allowing UI controllers to subscribe to broadcast events by ref (#3683)
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
2023-01-13 11:58:44 +01:00
wixoa
64a6fc9b03 Add string HttpUtility.JavaScriptStringEncode(string) to the sandbox (#3679) 2023-01-13 12:08:15 +11:00
metalgearsloth
8e6bc1651e Add tooltip tracking (#3665) 2023-01-13 11:40:35 +11:00
metalgearsloth
fde83f0838 Fix note typos 2023-01-12 13:49:09 +11:00
metalgearsloth
c67d8ba795 Version: 0.80.1.0 2023-01-12 13:44:38 +11:00
metalgearsloth
08d47feb97 Obsolete .Owner (#3373) 2023-01-12 13:39:55 +11:00
ike709
4c2ea93624 Adds a WCvar to override the CEF user-agent (#3676) 2023-01-12 13:33:44 +11:00
Jacob Tong
d430df07f7 Change RadioOptions so that buttons can be customized (#3673) 2023-01-12 12:56:47 +11:00
Leon Friedrich
3f0dfe7f73 Add CC-BY to RSI.json (#3667) 2023-01-12 12:50:35 +11:00
TemporalOroboros
95ef1853b6 Fix fixtures (#3677) 2023-01-12 12:50:18 +11:00
eoineoineoin
2e456a6bc0 Fix incorrect size of second window in split container (#3675) 2023-01-12 12:49:16 +11:00
ElectroJr
50de6b4866 Add missing release notes 2023-01-11 00:07:59 -05:00
DrSmugleaf
191519932e Add location of compile errors to XAML UI (#3674) 2023-01-10 17:44:15 +01:00
metalgearsloth
cb11afd777 Version: 0.80.0.0 2023-01-11 00:03:00 +11:00
metalgearsloth
3ef6af58da Physics shape serializer (#3643) 2023-01-10 23:57:28 +11:00
TemporalOroboros
8a1d092af5 Increase granularity of ShouldCollide (#3585)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-01-10 22:57:56 +11:00
metalgearsloth
90708000f5 Check grid traversal when grids overlap entities (#3601) 2023-01-10 22:38:14 +11:00
Leon Friedrich
45295d4b49 Split container layout changes. (#3656) 2023-01-10 22:38:05 +11:00
metalgearsloth
59d40eb56c Remove manual comp registrations from client / server (#3626) 2023-01-10 22:32:07 +11:00
metalgearsloth
18a579947f Move gravity to a controller (#3617) 2023-01-10 22:23:49 +11:00
DrSmugleaf
c74c99d3e3 Version: 0.79.0.1 2023-01-10 10:33:29 +01:00
metalgearsloth
cfd7e5575b Add helper for SnapGridPosAt (#3655) 2023-01-09 21:43:24 +11:00
Jezithyr
74445de12b Adding Event helpers to UIControllers (#3671)
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
2023-01-09 15:34:50 +11:00
metalgearsloth
8361162959 Fallback to mapgrid for query (#3659) 2023-01-09 15:10:03 +11:00
metalgearsloth
8ec32eb6bb Don't use current broadphase for physics contacts (#3653) 2023-01-09 15:06:02 +11:00
Leon Friedrich
9bbd1d28b1 Fix & update window position constraints (#3660) 2023-01-09 14:27:23 +11:00
Leon Friedrich
3d1ca2eed9 Add RichTextLabel.GetMessage() (#3669) 2023-01-09 14:10:49 +11:00
metalgearsloth
4cff5774d2 Version: 0.79.0.0 2023-01-09 13:44:28 +11:00
metalgearsloth
d9c0c84efa Deprecate TileChangedEventArgs (#3670) 2023-01-09 13:39:45 +11:00
Leon Friedrich
a323f2ef84 Grid delta states (#3635) 2023-01-08 16:43:49 +11:00
eoineoineoin
987d76b53d Style box texture scaling (#3632) 2023-01-08 16:42:46 +11:00
metalgearsloth
2776b4caa4 Remove some resolves on IsMapPaused (#3654) 2023-01-08 16:29:00 +11:00
keronshb
d90a365fa5 Adds TCS to Sandbox (#3662) 2023-01-08 16:27:09 +11:00
metalgearsloth
0c9fe010b1 Fix tooltips being incorrect for a frame (#3664) 2023-01-08 16:22:16 +11:00
metalgearsloth
af7e9150bb Don't predict sleeping on disallowed bodies (#3661) 2023-01-06 20:39:08 +11:00
metalgearsloth
fb0907a1a4 Remove EntityInitializedMessage (#3657) 2023-01-05 20:00:47 +11:00
metalgearsloth
7522737d90 Optimise TryFindGridAt (#3651) 2023-01-04 19:48:31 +11:00
metalgearsloth
ec5f07b372 Purge IPhysicsManager (#3652) 2023-01-04 19:18:53 +11:00
Leon Friedrich
a015e8722e Better debug assert message. (#3650) 2023-01-04 15:30:54 +11:00
ElectroJr
8cf3b519e7 Version: 0.78.0.0 2023-01-03 16:02:06 -05:00
ElectroJr
d56bf7739b update release notes 2023-01-03 16:01:37 -05:00
Leon Friedrich
084cc1a073 Add NoLocalRotation check to map saving (#3649) 2023-01-04 08:01:10 +11:00
metalgearsloth
9125d99ec1 Fix RotateVec rounding (#3638) 2023-01-04 07:29:17 +11:00
metalgearsloth
d9f602ee91 Minor joints cleanup (#3647) 2023-01-03 18:53:07 +11:00
metalgearsloth
d518d55897 Remove IPhysBody (#3646) 2023-01-03 17:45:36 +11:00
metalgearsloth
01e96ebcb9 Make FastNoise docs public (#3639) 2023-01-03 16:40:13 +11:00
Leon Friedrich
cb69facebf Fix broken click bound checks in Tree controls. (#3641) 2023-01-02 23:32:01 +11:00
Leon Friedrich
c9b942635a Audio frame update cleanup (#3630) 2023-01-01 15:53:18 +11:00
Leon Friedrich
7857e3a195 NoLocalRotation fixes (#3634) 2023-01-01 11:39:52 +11:00
Leon Friedrich
e0cfb24f1b Add missing null forgiving operator (#3636) 2023-01-01 09:23:28 +11:00
Leon Friedrich
24622eb548 Remove bad debug assert (#3633) 2023-01-01 05:24:55 +11:00
Leon Friedrich
66577acd1f Expose more net serializer stuff to content (#3476) 2022-12-31 04:07:33 +11:00
Leon Friedrich
f3364a196c Client-, shared-, and server-side ConfigurationManager (#3477) 2022-12-31 04:04:49 +11:00
Leon Friedrich
504f3f16d8 Add tickrate to debug monitor (#3631) 2022-12-31 04:04:38 +11:00
metalgearsloth
0a2735a60d Version: 0.77.0.2 2022-12-28 14:00:39 +11:00
metalgearsloth
6c4b71e06b Make phys contacts per-world rather than per-map (#3619) 2022-12-28 13:54:36 +11:00
Leon Friedrich
360db24f0a Fix invisible entity spawn menu buttons (#3628) 2022-12-28 13:52:18 +11:00
metalgearsloth
e0878096f4 Add AttachToGridOrMap test (#3625)
Closes https://github.com/space-wizards/RobustToolbox/issues/3624
2022-12-27 14:33:04 +11:00
metalgearsloth
f73babd869 Version: 0.77.0.1 2022-12-27 14:10:19 +11:00
metalgearsloth
61e193466c Hotfix AttachToGridOrMap (#3623) 2022-12-27 14:08:41 +11:00
metalgearsloth
6836816649 Version: 0.77.0.0 2022-12-27 13:38:07 +11:00
Leon Friedrich
054a908efd Generalize component trees (#3598) 2022-12-27 13:33:46 +11:00
metalgearsloth
ace8500240 Remove client/server split on sharedphysicsmap (#3618) 2022-12-27 13:17:54 +11:00
Leon Friedrich
d8d68480c3 Remove DeferredUpdates (#3622) 2022-12-27 12:27:43 +11:00
metalgearsloth
5284f3c2fb Version: 0.76.0.0 2022-12-26 10:57:11 +11:00
metalgearsloth
5c1d753a8d Physics solver refactor (#3479) 2022-12-26 10:51:00 +11:00
Leon Friedrich
27e0c22fe2 Somewhat improve sprite processing (#3587)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-12-26 10:48:08 +11:00
keronshb
b9f7733c67 Physics Substepping (#3156)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
closes https://github.com/space-wizards/RobustToolbox/issues/3116
2022-12-25 23:26:08 +11:00
Leon Friedrich
b09ddf986c Remove nullspace logic from CreateEntityUninitialized (#3600) 2022-12-25 22:37:09 +11:00
metalgearsloth
589d56fe67 Remove some more warnings (#3610) 2022-12-25 22:36:40 +11:00
DrSmugleaf
fdbb85dfe0 Add benchmarks for entTraitArray and class components (#3616) 2022-12-25 07:15:14 +01:00
DrSmugleaf
d33076b782 Add archetype enumerator benchmark (#3615) 2022-12-25 05:23:45 +01:00
Moony
91f5cfdf35 Please give me fast noise (#3612) 2022-12-24 16:31:50 -08:00
DrSmugleaf
037f702097 Fix missing refs and make consumer static in archetype benchmarks (#3608) 2022-12-23 12:29:07 +01:00
DrSmugleaf
e5dde1c7ad Add archetype iteration and has component benchmarks (#3607) 2022-12-22 23:31:05 +01:00
DrSmugleaf
272c3f8e84 Add archetype component access benchmark (#3606) 2022-12-22 21:39:58 +01:00
DrSmugleaf
9c831b3bda Add type switch matching benchmark (#3599) 2022-12-22 18:09:34 +01:00
Pieter-Jan Briers
9573e4e6c7 Improve UPnP logging. 2022-12-21 21:49:33 +01:00
ElectroJr
3330870a43 Version: 0.75.1.0 2022-12-21 14:27:03 -05:00
ElectroJr
1c86d2a6ea update release notes 2022-12-21 14:26:40 -05:00
Leon Friedrich
5ec72082bb Fix tests (#3605) 2022-12-22 06:26:03 +11:00
Leon Friedrich
ce4a0eb8bb Revert "Don't defer dirty matrices" (#3604) 2022-12-22 05:38:58 +11:00
metalgearsloth
fdfe0949ab Hotfix generic visualizers (#3602) 2022-12-21 16:28:31 +11:00
Paul Ritter
bafbdb6363 Analyzer to check that notnullableflag is being properly used (#3569) 2022-12-21 00:11:04 +01:00
Pieter-Jan Briers
a0b067a062 Add command to dump injector cache list.
To allow me to figure out how big it is.
2022-12-21 00:03:22 +01:00
Paul Ritter
ef0c0d0082 Analyzer to warn about using a boxing variant (#3564) 2022-12-20 23:53:02 +01:00
Kara
3393658953 Version: 0.75.0.0 2022-12-20 16:22:16 -06:00
AJCM-git
78a75daea2 SharedAppearanceSystem.TryGetData() generics support and small VisualizerSystem tweak (#3583) 2022-12-20 14:21:10 -08:00
Leon Friedrich
1bbfd6b38f Change default value for outsidePrediction (#3596) 2022-12-20 14:21:03 -08:00
Pieter-Jan Briers
20bbe30a23 Minor config default changes (#3543)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2022-12-20 14:20:52 -08:00
Leon Friedrich
8c5e790cb5 Don't defer dirty matrices (#3586) 2022-12-20 14:14:31 -08:00
Vera Aguilera Puerto
ddbd34aee2 VVRead command attempts to serialize objects before printing them. (#3591) 2022-12-20 14:14:26 -08:00
metalgearsloth
7e2a05ab65 Set movebuffer pool to default (#3592) 2022-12-20 14:13:23 -08:00
Leon Friedrich
e3108d22ac Fix RenderingTreeSystem move update (#3597) 2022-12-20 14:11:20 -08:00
Pieter-Jan Briers
4f7f43e193 Version: 0.74.0.0 2022-12-20 22:56:56 +01:00
Pieter-Jan Briers
84733a335c Prototype load parallelization (#3502) 2022-12-20 22:46:30 +01:00
metalgearsloth
2aafb21772 Version: 0.73.0.0 2022-12-20 22:23:17 +11:00
Pieter-Jan Briers
20c8eca6bf Use ConcurrentDictionary in SerializationManager.
Better GC behavior.
2022-12-19 02:39:28 +01:00
Pieter-Jan Briers
be72dd4107 Don't watch for prototype reload in integration tests. 2022-12-19 02:39:28 +01:00
Pieter-Jan Briers
187c158e6b Remove finalizer dispose from Overlay.
This should never have been on here what the hell.
2022-12-19 02:39:28 +01:00
metalgearsloth
53fb9d01e0 Grid helper methods (#3580) 2022-12-19 04:52:47 +11:00
Pieter-Jan Briers
bcf825d112 Mapped strings don't need IoC context anymore. 2022-12-18 17:40:17 +01:00
Pieter-Jan Briers
ab07c75966 Changelog for #3590 2022-12-18 15:50:28 +01:00
eoineoineoin
b5747f7003 Fix bug where config files could be corrupted (#3590)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: Eoin Mcloughlin <helloworld@eoinrul.es>
2022-12-18 15:49:17 +01:00
Pieter-Jan Briers
44da2fe738 Log breaking change from DependencyInjection thread-safety stuff 2022-12-18 12:58:05 +01:00
Pieter-Jan Briers
2995baca6f Optimize Clyde QuadBatchIndexWrite a bit. 2022-12-18 12:28:41 +01:00
Pieter-Jan Briers
a86a539c15 Move to .NET 7 SIMD intrinsics (#3584) 2022-12-18 11:44:57 +01:00
Pieter-Jan Briers
de486207b3 .NET 7 (#3582) 2022-12-17 14:15:58 +01:00
Pieter-Jan Briers
d1eb70da07 DependencyCollection is now thread safe.
We can now safely run stuff in parallel with registrations and all that goodness.
2022-12-17 00:38:34 +01:00
Pieter-Jan Briers
52588bee92 Fix ConfigurationManagerTest 2022-12-16 23:32:41 +01:00
Pieter-Jan Briers
ec26ef1e42 Check for CVar typos in server startup.
We now check the list of CVars to see if there's any unregistered CVars specified (i.e. in config, but not actually registered by the code). This would probably indicate a typo.

Only doing this on the server for now. The client may share config files from multiple codebases and end up with unknown CVars from there. This is probably fine, since those would be applied more automatically and not prone to config file typos as much.
2022-12-16 23:24:53 +01:00
AJCM-git
67381c369c Obsolete AnimationPlayerComponent E/C methods (#3581) 2022-12-17 02:13:57 +11:00
AJCM-git
b05b9949e6 Obsolete TimerComponent and TimerExtension (#3579) 2022-12-16 16:39:53 +11:00
Leon Friedrich
89ac6f0a43 Remove LookupFlags.Anchored (#3578) 2022-12-15 15:30:03 +11:00
metalgearsloth
3bcd53d7c5 Bandaid mapgrid loading (#3577) 2022-12-14 23:38:56 +01:00
ElectroJr
248e9240c1 update release notes 2022-12-13 20:01:54 -05:00
ElectroJr
e64d499000 Version: 0.72.0.0 2022-12-13 20:00:03 -05:00
metalgearsloth
5f03465879 Add pause time to pause events (#3570) 2022-12-14 11:56:11 +11:00
Pieter-Jan Briers
2a7920adaf Version: 0.71.1.4 2022-12-14 00:09:10 +01:00
Pieter-Jan Briers
a16731c957 Make config write exception safe.
Also changelog for 0688cd0202
2022-12-14 00:08:09 +01:00
Errant
0688cd0202 Fix Configuration write error (#3576) 2022-12-13 23:51:50 +01:00
Leon Friedrich
0c5b43d5af Fix sprite inert update (#3574) 2022-12-13 15:24:29 +11:00
metalgearsloth
8e70afd235 Fix pause map serialization for time offsets (#3507) 2022-12-13 13:09:21 +11:00
Leon Friedrich
7623c8357b Stop audio when audio system shuts down. (#3562)
fixes https://github.com/space-wizards/space-station-14/issues/12905
2022-12-13 12:42:22 +11:00
Pieter-Jan Briers
2e7dce5f08 validate_rsis.py chmod +x 2022-12-12 22:23:44 +01:00
Moony
2b03a2c550 Commits an unholy sin (PJB approved) (#3566) 2022-12-12 22:13:24 +01:00
metalgearsloth
b39adf0095 Fix some build warnings (#3573) 2022-12-12 22:12:51 +01:00
metalgearsloth
3c168f5a31 Replace GridEntityId with Owner (#3530) 2022-12-12 14:58:41 +11:00
ShadowCommander
fef963e77a Version: 0.71.1.3 2022-12-11 15:28:23 -08:00
Paul
b39f92f1fa Revert "removes a serializationhook"
This reverts commit 9a844ae413.
2022-12-12 00:24:33 +01:00
Paul
f6d4389f52 Revert "hotfixes an oopsie (#3572)"
This reverts commit 23233c59df.
2022-12-12 00:24:15 +01:00
Paul Ritter
23233c59df hotfixes an oopsie (#3572) 2022-12-12 00:18:23 +01:00
ShadowCommander
a243c4c795 Version: 0.71.1.2 2022-12-11 14:51:31 -08:00
ShadowCommander
349438358c Version: 0.71.1.1 2022-12-11 14:10:12 -08:00
Paul
9a844ae413 removes a serializationhook 2022-12-11 22:58:35 +01:00
metalgearsloth
6b076645db Kill NetworkedMapManager (#3516)
Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
Co-authored-by: Paul <ritter.paul1@googlemail.com>
2022-12-11 22:00:31 +01:00
Leon Friedrich
445a3aa8fb Adds basic delta state support (#3492) 2022-12-11 21:36:49 +01:00
Leon Friedrich
ca83543f9e Fix scroll bars being visible when they shouldn't be (#3568) 2022-12-11 11:06:31 -08:00
Pieter-Jan Briers
9b42527de3 Changelog for integration test improvements. 2022-12-10 12:47:08 +01:00
Pieter-Jan Briers
f98d8707c9 Move ShaderInstance finalizer around so DummyShaderInstance isn't finalized.
Maybe help a bit with test GC performance.
2022-12-10 12:35:05 +01:00
Pieter-Jan Briers
55fd79eb36 Fix GameController exception logging memory leak in tests. 2022-12-10 12:27:23 +01:00
metalgearsloth
509aca8c03 Version: 0.71.1.0 2022-12-10 20:16:47 +11:00
metalgearsloth
1e2756e4f7 Add API to get hard layer / mask (#3565) 2022-12-10 14:47:41 +11:00
Leon Friedrich
7175f49fa6 Physics solver tweaks (#3553) 2022-12-10 14:39:08 +11:00
metalgearsloth
31c4a331ab Swap entities when a map is loaded onto an existing map (#3511) 2022-12-10 14:37:23 +11:00
Pieter-Jan Briers
e71cab167b Don't run GC collect in startup in integration tests.
Oof.
2022-12-09 21:22:23 +01:00
Leon Friedrich
c2de890441 Add try-catch to window rendering (#3555) 2022-12-09 12:51:15 +11:00
Morb
6fe3d7cff5 Correct removal of PVS state for players without inGame status (#3531) 2022-12-08 11:28:31 +01:00
Pieter-Jan Briers
f51b7bbd99 Better RSI validator script. (#3558) 2022-12-07 23:50:29 +01:00
KIBORG04
a3e9dea8d8 Fix max_connections category in config (#3557) 2022-12-06 21:13:54 +01:00
metalgearsloth
6db41a05c2 Fix non-filled circle drawing (#3559) 2022-12-06 22:08:03 +11:00
metalgearsloth
ea2aab739f Remove some glass code (#3560) 2022-12-06 03:07:29 -08:00
metalgearsloth
17a623222d Version: 0.71.0.0 2022-12-06 13:19:20 +11:00
Leon Friedrich
55d2c4a066 More broadphase fixes (#3556) 2022-12-06 13:16:37 +11:00
Pieter-Jan Briers
db1e85e69d Warmup system to speed up startup. 2022-12-05 00:44:50 +01:00
Pieter-Jan Briers
22fe99ac99 Pass stream directly to JsonSerializer.Deserialize in RSI load.
This function didn't use to exist in a synchronous form, it does now.
2022-12-05 00:43:34 +01:00
Pieter-Jan Briers
be46a97849 Warn about loading raw PNGs inside RSIs. 2022-12-04 23:42:58 +01:00
Pieter-Jan Briers
9307298313 Disallow trailing commas in RSIs.
These are generally a mess and incompatible with tons of JSON parsers (e.g. Python's). Furthermore they can't be used with S.T.J source generators.
2022-12-04 23:38:54 +01:00
Pieter-Jan Briers
a12233ea4a Fix csi NRE. 2022-12-04 23:10:47 +01:00
Pieter-Jan Briers
3f86f5f5dd Rename game.maxplayers to net.max_connections, raise to 256. (#3552) 2022-12-03 11:51:37 +01:00
Pieter-Jan Briers
342d9ed2cd System debug panel in F3. 2022-12-03 00:28:33 +01:00
Pieter-Jan Briers
36f781d05b Add windowing API to ClydeDebugPanel. 2022-12-03 00:27:56 +01:00
Pieter-Jan Briers
1799ecaa68 Stop waiting on Godot, re-add 2px DebugMonitors separation. 2022-12-03 00:20:20 +01:00
Pieter-Jan Briers
f573143e29 Move Debug monitor (F3) panels to their own folder. 2022-12-02 23:05:21 +01:00
Kevin Zheng
5e08ef69aa Use correct native GLFW library name on FreeBSD (#3535) 2022-12-02 17:51:03 +01:00
Leon Friedrich
5d2cfcff66 Add scrollbar to dropdown options (#3550) 2022-12-02 17:31:05 +01:00
Leon Friedrich
e112938998 Remove unnecessary IoC resolves from audio system (#3551) 2022-12-02 17:28:44 +01:00
ElectroJr
5aa8aa120c Version: 0.70.0.0 2022-12-01 18:39:23 -05:00
ElectroJr
dd2697fbe5 update release notes 2022-12-01 18:39:00 -05:00
Mervill
fa94ef0df2 Warn about invalid placement type (#3467) 2022-12-02 10:22:06 +11:00
Leon Friedrich
af7d8c4601 Fix broadphase/lookup bugs (#3538) 2022-12-02 10:21:06 +11:00
Leon Friedrich
c0f384ac96 Add IDependencyCollection.FromParent() (#3541) 2022-12-02 10:19:51 +11:00
Leon Friedrich
6c1f8a86d7 Remove extra list index while y-sorting sprites. (#3544) 2022-12-02 10:19:26 +11:00
Morb
5cdae85e9f Call OnConnect method for player session (#3547) 2022-12-02 10:19:02 +11:00
Leon Friedrich
89331f6948 Queue serializer (#3546) 2022-12-02 10:16:35 +11:00
Ben Velie
cf6f52c1fa Fix simple typo (#3549) 2022-12-01 22:43:09 +01:00
Pieter-Jan Briers
86ffed9afb LoadDefaultsFromTomlStream to load CVars as CVar default overrides. 2022-12-01 22:40:19 +01:00
Pieter-Jan Briers
cb29e6e19d Add DEVELOPMENT define constant, equal to !FULL_RELEASE. 2022-12-01 22:39:10 +01:00
Pieter-Jan Briers
5fed38fecd Give GameShared an IDependencyCollection.
Death to IoCManager.
2022-12-01 00:14:11 +01:00
Leon Friedrich
ada056dcdf Fix rootUid returning all loaded entities (#3540) 2022-11-29 15:20:23 +11:00
metalgearsloth
3a05a82934 Fix pre init map loads on postinit maps (#3542) 2022-11-28 15:03:39 +11:00
Leon Friedrich
e6f2d36d50 Public state reset function. (#3539) 2022-11-28 12:12:07 +11:00
Leon Friedrich
f856ac0efa Misc replay related engine changes (#3508) 2022-11-28 12:11:44 +11:00
Pieter-Jan Briers
c34cbcdfa7 Server descriptions & info links. 2022-11-27 19:56:38 +01:00
Paul
b791a5e815 Version: 0.69.0.0 2022-11-27 19:25:05 +01:00
Paul Ritter
be8147a722 serv4 (#3527)
Co-authored-by: Paul <ritter.paul1@gmail.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
2022-11-27 19:23:58 +01:00
Leon Friedrich
c5ebe2c252 Two small bugfixes (#3534) 2022-11-26 16:03:38 +11:00
metalgearsloth
e418ab96b9 Version: 0.68.0.0 2022-11-26 14:03:15 +11:00
metalgearsloth
025fa95854 Remove dupe grid serialization (#3522) 2022-11-26 13:55:48 +11:00
Pieter-Jan Briers
32bdc152d7 Remove restart command. 2022-11-25 23:20:42 +01:00
Moony
fef46f7856 bug fix moment (#3533)
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
2022-11-25 13:08:21 +01:00
Moony
11492ff62f Map editor engine changes. (#3532)
Co-authored-by: moonheart08 <moonheart08@users.noreply.github.com>
2022-11-25 12:34:26 +01:00
metalgearsloth
b7d460cee6 Audio position fixes (#3459) 2022-11-25 20:00:11 +11:00
metalgearsloth
c62d0ecfd0 Update yml schema validator (#3521) 2022-11-25 09:21:05 +01:00
metalgearsloth
1dfa6587b1 Version: 0.67.2.2 2022-11-24 16:23:09 +11:00
Leon Friedrich
78bea7312e Fix grid chunk double subscription (#3526) 2022-11-24 13:38:09 +11:00
metalgearsloth
03363296db Fix grid contact ordering (#3525) 2022-11-24 12:28:55 +11:00
Leon Friedrich
7e9f3dd5e6 Fix replicated & archived client-settable cvars (#3454) 2022-11-23 11:11:19 +11:00
metalgearsloth
54a29a030e Version: 0.67.2.1 2022-11-23 11:04:38 +11:00
metalgearsloth
733097c1f4 Fix chunk event sub (#3520) 2022-11-23 11:02:51 +11:00
metalgearsloth
187d8865db Version: 0.67.2.0 2022-11-22 22:43:42 +11:00
Amy
9841b74936 Add submenu support to the menubar control (#3500) 2022-11-22 22:41:29 +11:00
metalgearsloth
d5faceca21 Fix dupe gridtree returns (#3517) 2022-11-22 22:33:30 +11:00
metalgearsloth
5b62ddeca4 Version: 0.67.1.3 2022-11-22 21:02:26 +11:00
metalgearsloth
8a4f186fd5 Fix map mapgrids again (#3515) 2022-11-22 20:58:16 +11:00
metalgearsloth
b14d461e9b Version: 0.67.1.2 2022-11-22 20:27:48 +11:00
metalgearsloth
3bfb23f35d Fix deserialized grid networking (#3514) 2022-11-22 20:24:58 +11:00
metalgearsloth
846cc3fa48 Version: 0.67.1.1 2022-11-22 14:07:50 +11:00
metalgearsloth
01673fb155 Mapgrid fixes (#3513) 2022-11-22 14:04:22 +11:00
metalgearsloth
15d30eacd0 Version: 0.67.1.0 2022-11-22 13:30:31 +11:00
metalgearsloth
615b1ae2af Changes for MapGrid support (#3491) 2022-11-22 13:28:10 +11:00
metalgearsloth
85f99e6303 Version: 0.67.0.0 2022-11-22 13:11:33 +11:00
metalgearsloth
5e3a5a0d0c Merge MapGrid into MapGridComponent (#3468) 2022-11-22 13:04:51 +11:00
ElectroJr
8dfc779611 Version: 0.66.0.0 2022-11-21 19:57:32 -05:00
ElectroJr
3ba7238076 Release notes 2022-11-21 19:56:57 -05:00
Leon Friedrich
7b59fbd3ef Audio and other misc replay related changes (#3471) 2022-11-22 11:49:59 +11:00
Paul Ritter
d87963206c im back 2022-11-22 00:07:13 +01:00
metalgearsloth
9dd13245ef Add lookup reparenting tests (#3421) 2022-11-21 23:14:08 +11:00
Leon Friedrich
1c3905a8f4 Fix mapload positions (#3510) 2022-11-21 14:43:11 +11:00
Pieter-Jan Briers
762cd786ea Fix dependency injecting missing on script globals. 2022-11-20 14:50:08 +01:00
metalgearsloth
120c90862b Version: 0.65.2.1 2022-11-20 12:51:53 +11:00
Pieter-Jan Briers
4e0deb2e42 Enable server GC by default on server. 2022-11-19 19:23:39 +01:00
Pieter-Jan Briers
6bc831eb05 Emitted GLSL uniform arrays have size after name.
We're dropping GLES2 but I already wrote the code so.
2022-11-19 18:08:37 +01:00
metalgearsloth
e0be355707 Fix metadata dupes on maps (#3505)
Fixes https://github.com/space-wizards/RobustToolbox/issues/3504
2022-11-20 03:06:32 +11:00
Paul Ritter
ec3485e741 my bad bb 2022-11-19 12:24:44 +01:00
metalgearsloth
fb0ed471a0 Set map as uninitialized on loadmap (#3503) 2022-11-19 14:33:53 +11:00
metalgearsloth
509ba2ec4b Remove some resolves from filters (#3498) 2022-11-19 10:53:37 +11:00
Pieter-Jan Briers
8121c3c41b Move freetype font data to POH.
Avoids stuff getting stuck in gen0.
2022-11-18 00:50:20 +01:00
Pieter-Jan Briers
4a003eaec0 Try to fix publishing self-contained executable issues. 2022-11-17 23:19:17 +01:00
Paul Ritter
47f7b73ea0 Update CODEOWNERS 2022-11-17 11:58:39 +01:00
metalgearsloth
8a898adaa2 Version: 0.65.2.0 2022-11-17 19:08:47 +11:00
metalgearsloth
031dceeb48 Parallel physics broadphase (#3483) 2022-11-17 19:01:29 +11:00
Pieter-Jan Briers
bf6928703f Custom YAML -> DataNode parser. (#3496) 2022-11-16 22:17:30 +01:00
Pieter-Jan Briers
75288ba5e7 More clarity in glibc bug warning. 2022-11-16 21:59:31 +01:00
DrSmugleaf
96938ca85a Remove redundant read-only VV from datafields (#3494) 2022-11-16 21:02:39 +01:00
metalgearsloth
a60011d612 Use static lambda for pvs grid query (#3490) 2022-11-16 21:02:16 +01:00
Leon Friedrich
60e0c0b804 Expose more state/tick logic to content (#3474) 2022-11-16 20:56:02 +01:00
Leon Friedrich
a0c23c7fee Add ClydeAudio.StopAllAudio() (#3473) 2022-11-16 20:44:01 +01:00
Pieter-Jan Briers
46183aa41a Add WebView to solution.
This makes sure it will be built by CI
2022-11-16 20:33:28 +01:00
Pieter-Jan Briers
3f175a8d2a Add Robust.Packaging to solution 2022-11-16 20:27:00 +01:00
Amy
fac1b2c469 Fix bad reference (#3484)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2022-11-16 20:15:15 +01:00
DrSmugleaf
bb137d69a2 Version: 0.65.1.0 2022-11-16 19:55:52 +01:00
Jezithyr
1723be3d5b Implementing value protoIds for dictionary serializers (#3470)
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
2022-11-16 12:03:16 +01:00
DrSmugleaf
a35632d89e Add test for (de)serializing data record structs (#3493) 2022-11-16 07:14:50 +01:00
Leon Friedrich
f956ad2008 Fixes lerping clean up issue added in #3472 (#3489) 2022-11-16 12:39:41 +11:00
Pieter-Jan Briers
1646297039 Remove most static IoCManager. accesses from engine. (#3466)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-11-15 22:00:28 +11:00
metalgearsloth
c26c8fb81e Version: 0.65.0.1 2022-11-15 11:58:59 +11:00
DrSmugleaf
38f2808816 Fix responses and error in tpgrid command (#3486) 2022-11-14 20:41:40 +01:00
metalgearsloth
7994935b23 Use field for setlocalposrot (#3482) 2022-11-15 01:07:08 +11:00
metalgearsloth
7120000ef5 Version: 0.65.0.0 2022-11-14 22:02:30 +11:00
metalgearsloth
7c3fd3eaa9 Destroy non-colliding contacts (#3481) 2022-11-14 21:58:29 +11:00
Leon Friedrich
8bd47cd7f8 Misc lerping changes (#3472) 2022-11-14 21:42:30 +11:00
metalgearsloth
1068458beb Force grids to be collidable (#3480) 2022-11-14 21:38:53 +11:00
metalgearsloth
54db524e53 Fix testbeds (#3478) 2022-11-14 17:38:53 +11:00
Pieter-Jan Briers
9265af75bf Automatically update release notes in version.py
General cleanup to the script too.
2022-11-13 18:47:57 +01:00
Pieter-Jan Briers
037bff9099 RichTextEntry uses ValueList, OutputPanel list refs. 2022-11-13 16:09:43 +01:00
Pieter-Jan Briers
6de1b41d9c Changelog for 0.64.1.0 2022-11-13 15:53:14 +01:00
Pieter-Jan Briers
0ab9f34046 Version: 0.64.1.0 2022-11-13 15:51:32 +01:00
Pieter-Jan Briers
2746dccfc6 Fix RichTextEntry wrapping. 2022-11-13 15:51:11 +01:00
DrSmugleaf
eae54d0327 Fix help string for server ProfileEntitySpawningCommand and doc for UserInterfaceManager._dependencies (#3469) 2022-11-13 10:56:52 +01:00
metalgearsloth
c1195d1f1d Version: 0.64.0.0 2022-11-13 17:32:50 +11:00
metalgearsloth
5a02c5c03f 0.64.0.0 release notes 2022-11-13 17:32:37 +11:00
metalgearsloth
d9c59164f2 Refactor maploader to a system (#3385) 2022-11-13 17:29:57 +11:00
metalgearsloth
72a952fbdd ECS grid methods and map partials (#3441) 2022-11-13 15:37:01 +11:00
metalgearsloth
45e58c1ed8 Fix release notes
oop
2022-11-13 15:02:31 +11:00
metalgearsloth
127d1d7eaf Release notes for 0.63.0.0 2022-11-13 14:59:55 +11:00
metalgearsloth
18c9c6bf0a Version: 0.63.0.0 2022-11-13 14:59:39 +11:00
Leon Friedrich
89ec06468f Fix map saves sometimes not including new components (#3461) 2022-11-13 14:49:40 +11:00
Leon Friedrich
9920e409ca Add support for saving missing prototype components (#3462)
Fixes https://github.com/space-wizards/RobustToolbox/issues/2824
2022-11-13 14:49:18 +11:00
Pieter-Jan Briers
f1681b2128 Fix hot reload unit tests 2022-11-12 15:09:54 +01:00
Pieter-Jan Briers
490a4efff8 IoCManager.InitThread now returns new IDependencyCollection. 2022-11-12 12:24:31 +01:00
Pieter-Jan Briers
a416eedff0 Fix some bad doc comment links to IoCManager.Resolve{T}() 2022-11-12 12:23:12 +01:00
Pieter-Jan Briers
2fe0c94d84 Register<T> extension for IDependencyCollection. 2022-11-12 12:12:05 +01:00
Pieter-Jan Briers
2f22de4eff Make IoC Register have where TInterface : class 2022-11-12 12:11:19 +01:00
Pieter-Jan Briers
2017d943fb Move entity prototype reload logic to entity system.
Removes dependency of IPrototypeManager -> IEntityManager.
2022-11-12 12:03:15 +01:00
Pieter-Jan Briers
e34935c9e2 TextEdit control & a bunch of other stuff (#3436) 2022-11-12 03:12:49 +01:00
Pieter-Jan Briers
db95c6284b Oops I forgot to commit a file 2022-11-12 00:31:09 +01:00
Pieter-Jan Briers
6255ee6e96 Cache JsonSerializerOptions in benchmarks exporter. 2022-11-12 00:30:17 +01:00
Pieter-Jan Briers
d1b16d9a52 Engine HttpClient usage fixes.
Properly pool them.
Extend keep-alive timeout for hub advertisements.
Proper user-agents
2022-11-12 00:28:37 +01:00
Pieter-Jan Briers
708b3b2acf Remove unnecessary IoC resolve from new theming system. 2022-11-11 01:25:17 +01:00
Pieter-Jan Briers
2e471366b7 Profile group for UIRefactor controllers 2022-11-11 01:25:11 +01:00
metalgearsloth
ca9ce7c7ed Allow render targets to not clear (#3457) 2022-11-10 23:33:18 +01:00
metalgearsloth
81cd43f988 Random timespan support (#3458) 2022-11-10 23:32:52 +01:00
Mervill
cf5c72e7ea CVar game.type is obsolete (#3460) 2022-11-10 23:32:28 +01:00
Mervill
2629fd3efb LoadFromDocument properly detects duplicate entities (#3448)
I circled back around to this and discovered that the fix is (probably?) easy.

Closes #3079

I tested this locally but I'm pushing the change via the web editor so I don't have to go to the trouble of setting up a Robust fork of my own.
2022-11-10 09:37:47 +01:00
Pieter-Jan Briers
338fcd5fcb Read Lidgren status change from data message. 2022-11-10 01:48:16 +01:00
Pieter-Jan Briers
b5395c0bc0 New version of Robust.LoaderApi to remove warning on .NET 7 2022-11-10 01:45:31 +01:00
Pieter-Jan Briers
97bdc1edee Fix bad \n in DebugClydePanel. 2022-11-10 01:41:58 +01:00
Pieter-Jan Briers
8a0464ed35 Use shared target framework for Avalonia.Base project. 2022-11-10 01:39:34 +01:00
Pieter-Jan Briers
31d68dcd49 .NET 7 compilation fixes. 2022-11-10 01:26:05 +01:00
ElectroJr
3b337bf88d Version: 0.62.1.0 2022-11-08 19:37:03 -05:00
ElectroJr
f3e0706488 release notes 2022-11-08 19:36:51 -05:00
Leon Friedrich
3378f1ff98 Add new anchoring test (#3447) 2022-11-09 11:14:51 +11:00
Leon Friedrich
f160508da3 Fix PVS error (#3452)
Fixes https://github.com/space-wizards/RobustToolbox/issues/3413
2022-11-09 11:14:10 +11:00
Leon Friedrich
1ba5c9120f Remove redundant client-side error (#3450) 2022-11-09 10:56:10 +11:00
Leon Friedrich
701606c75a Better client state exception tolerance (#3451) 2022-11-09 10:55:56 +11:00
Leon Friedrich
efa0fa3f1b Remove more "real" nullspace maps (#3449) 2022-11-08 13:29:56 +11:00
ElectroJr
63b9b56006 Version: 0.62.0.1 2022-11-06 16:22:56 -04:00
ElectroJr
4b082baf37 release notes 2022-11-06 16:22:45 -04:00
Leon Friedrich
698d65c5af Fix sprite animations not updating (#3446) 2022-11-07 07:20:40 +11:00
Leon Friedrich
c9dd27658e Fix anchoring bug (#3445)
Fixes https://github.com/space-wizards/RobustToolbox/issues/3444
2022-11-07 06:35:42 +11:00
ElectroJr
266223c3fd Version: 0.62.0.0 2022-11-06 12:28:11 -04:00
ElectroJr
521e4746c6 update release notes 2022-11-06 12:27:33 -04:00
Leon Friedrich
72efbe543c Better ResetPredictedEntities error handling (#3442) 2022-11-07 03:20:53 +11:00
metalgearsloth
b69ccc2241 Remove obsolete map event handlers (#3440) 2022-11-07 03:18:52 +11:00
Leon Friedrich
656992ae5f More lookup fixes (#3438) 2022-11-06 18:15:08 +11:00
Moony
947f04ebb9 Remove SAO mode from the engine (makes sure the client actually gets its command permissions) (#3439) 2022-11-06 01:20:09 +01:00
Leon Friedrich
603b88c77a Client entity deletion error tolerance (#3435) 2022-11-06 03:45:28 +11:00
Ygg01
108e270f9e Localize commands (#3374) 2022-11-06 03:00:57 +11:00
metalgearsloth
d3edd10714 Entity query struct enumerators (#3334) 2022-11-04 11:46:43 +11:00
ElectroJr
125d138e16 Version: 0.61.0.0 2022-11-03 19:38:18 -04:00
ElectroJr
f5c210b990 release notes 2022-11-03 19:38:04 -04:00
metalgearsloth
4521dc37f5 Remove IMap / IMapGrid comps (#3434) 2022-11-04 10:12:36 +11:00
Jacob Tong
adcdb9f736 Clean up audiosystem (#3251) 2022-11-04 09:48:33 +11:00
ElectroJr
2116230f58 Version: 0.60.0.0 2022-11-02 21:56:52 -04:00
ElectroJr
dd0d186314 release notes 2022-11-02 21:56:30 -04:00
Paul Ritter
329e2b0cdc removes beforeserialization hook (#3422) 2022-11-03 12:50:40 +11:00
Paul Ritter
a562675553 misc optimizations in pvs (#3427) 2022-11-03 12:39:11 +11:00
metalgearsloth
89a1d32e1d Remove some redundant physics calls (#3425) 2022-11-03 12:33:41 +11:00
metalgearsloth
05fb110f40 Fix client fixture state handling (#3431) 2022-11-03 12:32:07 +11:00
Leon Friedrich
c6896e9bd9 More broadphase fixes (#3429) 2022-11-03 12:30:14 +11:00
DrSmugleaf
2678fad629 Call GC.Collect before running profileEntitySpawning (#3428) 2022-11-02 15:53:10 +01:00
Rane
7d0e9f9635 method to return all open uis on a session (#3424) 2022-11-01 14:44:11 +11:00
ElectroJr
7a5df9a718 Version: 0.59.0.0 2022-10-31 20:40:00 -04:00
ElectroJr
856fbd0480 release notes 2022-10-31 20:39:57 -04:00
metalgearsloth
828ac48f7c Remove transform methods from MapGrid (#3382) 2022-11-01 11:27:41 +11:00
Leon Friedrich
d0e11a755c Fix PVS exception (#3423) 2022-11-01 09:49:14 +11:00
Leon Friedrich
b637967163 Remove some duplicate code in DetachParentToNull() (#3417) 2022-11-01 00:53:23 +11:00
Leon Friedrich
50dce4d56b Make Resolve<TComp> protected (#3411) 2022-10-31 21:26:05 +11:00
Leon Friedrich
e9af594448 PVS tweaks (#3419) 2022-10-31 21:24:22 +11:00
Leon Friedrich
b5662007d5 Fix GetEntitiesIntersecting bug (#3420) 2022-10-31 21:22:41 +11:00
ElectroJr
03acded657 Version: 0.58.1.1 2022-10-30 21:57:54 -04:00
ElectroJr
6b0e2deede release notes 2022-10-30 21:57:36 -04:00
Leon Friedrich
ffe1689be6 Fix misc container and lookup bugs (#3418) 2022-10-31 12:54:37 +11:00
Leon Friedrich
2f3f7976f1 Fix containers not force ejecting (#3416) 2022-10-31 11:11:28 +11:00
ElectroJr
df7933b890 Version: 0.58.1.0 2022-10-30 19:52:26 -04:00
ElectroJr
5778ca87e7 release notes 2022-10-30 19:52:14 -04:00
Leon Friedrich
af8a21df53 Don't raise physics events before initialization (#3415) 2022-10-31 10:48:59 +11:00
ElectroJr
cd02dddd5d Version: 0.58.0.0 2022-10-30 19:14:52 -04:00
ElectroJr
e44805cd20 Update release notes 2022-10-30 19:14:18 -04:00
Leon Friedrich
635387a23e Disable collision for fixtureless entities. (#3412) 2022-10-31 10:06:47 +11:00
Leon Friedrich
2b594f6356 Cache broadphases and container rejig (#3407) 2022-10-31 10:06:08 +11:00
Leon Friedrich
cec14ae861 Add exception for infinite loop in Balance() (#3398) 2022-10-30 19:15:08 +11:00
metalgearsloth
a12a973a26 Mark component.Dirty() as obsolete (#3409) 2022-10-30 19:14:50 +11:00
DrSmugleaf
45a315bb69 Add command to profile entity spawning (#3404) 2022-10-30 14:09:30 +11:00
Leon Friedrich
1e843bf3a2 More Transform ECS (#3368) 2022-10-30 03:36:23 +11:00
Vera Aguilera Puerto
26c85725a5 Version: 0.57.0.4 2022-10-29 18:14:00 +02:00
Vera Aguilera Puerto
467d391ec8 Extra-graceful entity deletions. (#3405) 2022-10-29 18:10:19 +02:00
Leon Friedrich
601feb7cc0 Optimize DeparentAllEntsOnTile (#3401) 2022-10-29 14:26:04 +11:00
Leon Friedrich
cd1466cdc0 Replaces ContainsEntity() with metadata flag check (#3392) 2022-10-29 11:37:43 +11:00
Leon Friedrich
94aeb309b2 Add additional container assert (#3397) 2022-10-29 10:53:29 +11:00
Leon Friedrich
3fba59eb6c Lookup movement handling changes. (#3369) 2022-10-29 10:44:48 +11:00
metalgearsloth
508754f4bc Disable kinematic controller collisions (#3358) 2022-10-29 05:05:36 +11:00
Leon Friedrich
3f4ae0f02a Better AddComponent error (#3394) 2022-10-28 17:16:11 +11:00
ElectroJr
b0daf64d94 Version: 0.57.0.3 2022-10-27 23:07:44 -04:00
ElectroJr
c4223f015d release notes 2022-10-27 23:07:23 -04:00
Leon Friedrich
33ebb99b9c Fix lookups for StaticSundriesTree (#3393) 2022-10-28 14:04:54 +11:00
Leon Friedrich
dad176aca1 fix pvs parent change (#3386) 2022-10-28 12:35:36 +11:00
metalgearsloth
cac1f3e018 Version: 0.57.0.2 2022-10-28 12:25:57 +11:00
Leon Friedrich
49dfb2d2f1 Lookup fixes (#3390) 2022-10-28 11:23:23 +11:00
Leon Friedrich
4e0821c6c1 Replace some GetAABB() with GetAABBNoContainer() (#3391) 2022-10-28 11:16:03 +11:00
ElectroJr
39800d57d1 Version: 0.57.0.1 2022-10-27 10:49:20 -04:00
ElectroJr
52b9729bb8 update release notes 2022-10-27 10:49:04 -04:00
metalgearsloth
5a49ce1812 Don't raise rotation event before parent change (#3384) 2022-10-28 01:46:38 +11:00
metalgearsloth
c3d27fb338 Update engine CL (#3383) 2022-10-28 00:10:12 +11:00
metalgearsloth
07378f4503 Version: 0.57.0.0 2022-10-27 23:37:49 +11:00
metalgearsloth
ae2f3fe70c Remove EntityLookupComponent and de-dupe AABBs (#3367)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-27 23:36:01 +11:00
Leon Friedrich
6edd5d8a63 Slight movement PVS performance improvement (#3381) 2022-10-27 14:59:28 +11:00
metalgearsloth
08c6e52806 Pool contact pairbuffer (#3344)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-27 13:55:26 +11:00
metalgearsloth
f13a066bdd Use static lambdas for sprites / lights (#3335) 2022-10-27 13:52:04 +11:00
metalgearsloth
c478ef3a4b Re-use contact linkedlist nodes (#3343)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-27 13:50:59 +11:00
ElectroJr
1d3bf8d072 Version: 0.56.1.1 2022-10-26 22:31:48 -04:00
ElectroJr
12f40d951d Update release notes 2022-10-26 22:31:17 -04:00
Leon Friedrich
c98e409ad8 PVS bugfix (#3380) 2022-10-27 13:21:06 +11:00
metalgearsloth
ef6efd3c68 Fix parent change velocity (#3378) 2022-10-26 18:46:21 +02:00
ElectroJr
c4b0534240 Version: 0.56.1.0 2022-10-25 21:54:44 -04:00
ElectroJr
ff0dbecbee Update changelog 2022-10-25 21:54:11 -04:00
Leon Friedrich
b0d59e5e3f PVS budget tweaks (#3360) 2022-10-26 12:31:29 +11:00
Leon Friedrich
e3d29ae28f Change PVS parent-change handing (#3362) 2022-10-25 23:44:35 +11:00
estacaoespacialpirata
9aebaa3749 Update pt-BR locale (#3372)
Co-authored-by: zero <ribeirolucasdev@gmail.com>
2022-10-24 15:35:04 -07:00
Leon Friedrich
2bae6abbc0 Entity deletion changes (#3355) 2022-10-24 03:50:58 +11:00
Vera Aguilera Puerto
880160e7af Fix VV type handler removal. 2022-10-23 14:51:27 +02:00
DrSmugleaf
801b513cde Make Box2Serializer split on a span (#3365) 2022-10-23 13:03:39 +02:00
Leon Friedrich
bd284cc945 Improve GetOccluderTree() (#3366) 2022-10-23 18:42:37 +11:00
metalgearsloth
c481b50a8b Remove IEnumerable abuse from entitylookup (#3333) 2022-10-23 15:48:38 +11:00
DrSmugleaf
c889c2b2aa Optimize client entity spawning by 15% (#3364) 2022-10-23 15:46:46 +11:00
Leon Friedrich
60c150269e improve rendering tree movement handling (#3361) 2022-10-23 13:55:08 +11:00
metalgearsloth
8dffeef261 Nuke grid enumeration allocs (#3342)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-23 13:54:48 +11:00
Leon Friedrich
6943693d3f Add trace to mid-deletion reparenting error logs. (#3356) 2022-10-21 15:39:34 +11:00
metalgearsloth
964ab60020 Fix a bunch of warnings (#3289) 2022-10-21 00:17:29 +11:00
Paul Ritter
8fad4d291f fixes heaps of build warnings (#3329)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-10-20 23:36:32 +11:00
Kara
d3adcb83db Version: 0.56.0.2 2022-10-19 16:05:16 -07:00
Kara
3c046b5f6f Rename _lib.ftl to _engine_lib.ftl to avoid overwriting
Engine and content locales get merged into the same folder. This is causing two files named the same thing to be in the same place, presumably causing extracting the build to fail? Hopefully?
2022-10-19 16:04:48 -07:00
Kara
dd567a4cc8 Version: 0.56.0.1 2022-10-19 15:22:06 -07:00
DrSmugleaf
fe78883a93 Fix instantiation of data records containing value types (#3352) 2022-10-19 16:04:03 +02:00
Kara
1d0c9e9512 notes 2022-10-18 19:48:12 -07:00
Kara
1a61f1925c Version: 0.56.0.0 2022-10-18 19:35:48 -07:00
estacaoespacialpirata
18567c7051 Add the pt-BR locale (#3168)
Co-authored-by: zero <ribeirolucasdev@gmail.com>
2022-10-18 19:01:22 -07:00
Kara
4932487859 Partially move content _lib.ftl to engine + CONJUGATE-BASIC (#3262) 2022-10-18 18:57:31 -07:00
metalgearsloth
506f0b0a1e Fix audio fallback coords (#3306) 2022-10-18 18:49:35 -07:00
Vera Aguilera Puerto
ae2e6bca82 Add new helpers to TypeHandlers, fix bug with TypeHandler listing. (#3348) 2022-10-18 18:48:30 -07:00
Paul Ritter
0b19d04c1c makes some loops for in pvs for free perf (#3338) 2022-10-18 18:47:41 -07:00
metalgearsloth
8344e8ba10 Fix inverse vec2 allocations (#3341)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-18 18:30:34 -07:00
Kevin Zheng
5dd1b58357 Move CastShadows to SharedPointLightComponent (#3346) 2022-10-19 10:10:30 +11:00
metalgearsloth
537e1ab4f9 Update release-notes + version (#3347) 2022-10-17 15:48:07 +11:00
metalgearsloth
7247171b4b TryGetNearest update to allow passing in transforms (#3330)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-17 15:34:58 +11:00
Francesco
155a35ab06 Adds a getter to AnimationHelper (#3345) 2022-10-17 03:54:10 +11:00
metalgearsloth
3c50db8b5e Don't allocate a list per physics contact (#3332) 2022-10-16 11:53:32 +11:00
Ygg01
78ba02432e Fix obsolete warnings in tests (#3340) 2022-10-16 11:12:11 +11:00
Leon Friedrich
32f8b6f4b8 Prevent singular sprite matrices (#3339) 2022-10-16 11:04:53 +11:00
Leon Friedrich
97d52393ed Add a new Logger.Info() to MapLoader (#3320) 2022-10-16 11:03:36 +11:00
Leon Friedrich
576abe7adb Enable release mode PVS debug commands (#3337) 2022-10-15 16:18:16 +11:00
Vera Aguilera Puerto
d404494018 ViewVariables Exorcism Part 1: Of paths and commands (#3214) 2022-10-14 19:03:44 +02:00
Игорь Спичкин
80e390a74b Use invariant culture in serialization (#3323) 2022-10-12 14:10:04 +02:00
ElectroJr
cf912d8c07 Version: 0.55.4.1 2022-10-11 20:51:36 -04:00
Leon Friedrich
ae8a7481bc Fix eye networking (#3328) 2022-10-12 11:50:38 +11:00
Paul
dbcb9bde3d Version: 0.55.4.0 2022-10-12 01:41:24 +02:00
Paul
6dc06e7690 fixes statistics crash 2022-10-12 01:40:52 +02:00
Paul
f2cbfbf705 fixes typo 2022-10-12 01:20:28 +02:00
Paul
ca79d1fc13 overhauls benchmarks 2022-10-12 01:15:30 +02:00
Paul
2bcfca3d78 makes benchmarks use subfolders 2022-10-11 20:48:54 +02:00
Paul
74c86bf08c Version: 0.55.3.0 2022-10-11 20:19:39 +02:00
Paul Ritter
b8397a1a27 required changes for content benchmarks (#3327) 2022-10-11 20:16:09 +02:00
metalgearsloth
4c2da94a58 Fix Saltern in default config (#3326) 2022-10-11 13:18:55 +02:00
metalgearsloth
42c6b9976a Version: 0.55.2.0 2022-10-11 16:17:37 +11:00
Leon Friedrich
cd40916df0 Remove Dirty(comp) on component init. (#3303) 2022-10-11 16:14:08 +11:00
Leon Friedrich
95525a549a Make TransformComponent._localMatrix public (#3325) 2022-10-11 16:13:10 +11:00
ElectroJr
07c5c0ca0e Version: 0.55.1.0 2022-10-10 21:19:14 -04:00
Leon Friedrich
c8e36eadf7 Fix mapfile validator (#3324) 2022-10-11 12:18:04 +11:00
Paul Ritter
b3df54d2bb fixes benchmark names (#3322) 2022-10-10 19:27:02 +02:00
Paul Ritter
007bfe4447 fixes the benchmark db schema and adds a json variant of params (#3321) 2022-10-10 16:48:25 +02:00
ElectroJr
ea1691c7f5 Version: 0.55.0.0 2022-10-09 21:31:03 -04:00
Leon Friedrich
f82e3e8432 Fix error in HandlePhysicsMapRemove (#3319) 2022-10-10 12:19:52 +11:00
Paul Ritter
59d8cb37f0 re-enables running all benchmarks (#3318) 2022-10-10 03:09:19 +02:00
Paul Ritter
cf52985eaf fixes benchmark db write (#3317) 2022-10-10 02:28:10 +02:00
Paul Ritter
aa412c2b47 temporarily makes benchmarks only run one benchmark (#3316) 2022-10-10 02:17:59 +02:00
Paul Ritter
917280b4d7 reworks benchmarks db stuff (#3314) 2022-10-10 02:11:24 +02:00
ElectroJr
51c6ff934e Version: 0.54.0.0 2022-10-09 17:44:23 -04:00
Leon Friedrich
e534fcd800 Unrevert "Remove obsolete GridId and all references to it" (#3279) 2022-10-10 08:41:58 +11:00
Leon Friedrich
6105be4b14 Fix saving entities without prototypes (#3312) 2022-10-10 06:58:34 +11:00
metalgearsloth
205147c0f0 Store paused time on entities (#3288) 2022-10-10 04:58:08 +11:00
Leon Friedrich
f6d722f7c3 Make InitializeAndStartEntity public (#3305) 2022-10-10 04:57:41 +11:00
keronshb
d1c1bffc4f Got Inserted Event for containers (#3311) 2022-10-10 04:57:04 +11:00
metalgearsloth
54316b7255 Version: 0.53.0.1 (#3310)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-09 21:51:02 +11:00
metalgearsloth
2d7cd49dbc Revert "Container tweaks (#3293)" (#3309)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-09 21:42:12 +11:00
metalgearsloth
5832cb3866 Version: 0.53.0.0 2022-10-09 17:34:07 +11:00
metalgearsloth
818ea1a629 Revert "Remove obsolete GridId and all references to it" (#3308) 2022-10-09 17:32:54 +11:00
metalgearsloth
58c0f7796b Version: 0.51.0.1 2022-10-09 16:47:01 +11:00
metalgearsloth
55217c982d Fix build (#3307) 2022-10-09 16:45:22 +11:00
metalgearsloth
036951ae62 Version: 0.51.0.0 2022-10-09 16:25:23 +11:00
SpaceManiac
ebaa8d9ac3 Remove obsolete GridId and all references to it (#3279) 2022-10-09 16:23:40 +11:00
Leon Friedrich
e222f82059 Fix map loader entity dirtying (#3301) 2022-10-09 16:19:32 +11:00
Leon Friedrich
d867661c24 Add MetadataComponent argument to Dirty() (#3302) 2022-10-09 16:19:09 +11:00
Alex Evgrashin
ac7c44ab2e Grid line enumerator (#3278) 2022-10-09 13:27:05 +11:00
themias
b861182846 Fix EmptyContainer and CleanContainer (#3300) 2022-10-09 04:30:46 +11:00
Vera Aguilera Puerto
1f3e42b013 Use our own NFluidsynth NuGet package. (#3304) 2022-10-08 12:29:53 +02:00
Leon Friedrich
7b0c4dd7fb Fix component removal / PVS bugs (#3275) 2022-10-08 13:22:32 +11:00
Kevin Zheng
2898e1413b Add build property to use system SQLite3 (#3298) 2022-10-08 00:15:49 +02:00
metalgearsloth
ba3525c0c0 Version: 0.50.2.1 2022-10-07 11:31:08 +11:00
metalgearsloth
5ff11980b7 Fix nearest check for non-hard bodies (#3297) 2022-10-07 11:30:38 +11:00
metalgearsloth
29274986f8 Version: 0.50.2.0 2022-10-07 00:35:56 +11:00
metalgearsloth
57d862f9fc Add API to get nearest distance for 2 entities (#3291)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-07 00:35:25 +11:00
metalgearsloth
31da2557d5 Container tweaks (#3293) 2022-10-06 13:12:43 +02:00
Kevin Zheng
9752996497 Update OpenTK.OpenAL to 4.7.5 (#3296) 2022-10-06 13:00:35 +02:00
metalgearsloth
7c7c8d23fb Version: 0.50.1.0 2022-10-04 16:10:31 +11:00
metalgearsloth
e1dc83a573 Add method to get velocity from a point (#3239) 2022-10-04 16:09:58 +11:00
metalgearsloth
520461ff95 Version: 0.50.0.0 2022-10-04 15:30:56 +11:00
metalgearsloth
7c2a010c71 Change mass to density (#3282) 2022-10-04 15:30:33 +11:00
metalgearsloth
c17faedccf Version: 0.49.0.0 2022-10-03 20:28:58 +11:00
metalgearsloth
36495fe81b Add time offset serializer (#3287)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2022-10-03 20:28:28 +11:00
Leon Friedrich
9e3851b847 Allow EyeComponent to centre on other entities. (#3292) 2022-10-03 20:03:22 +11:00
Pieter-Jan Briers
582e705088 Update Lidgren to v0.2.2 2022-10-01 00:06:55 +02:00
Pieter-Jan Briers
cf893c3c32 Avoid rogue obj/ folders breaking Lidgren build. 2022-10-01 00:06:55 +02:00
Pieter-Jan Briers
3a5cc20a88 Compile Lidgren net6.0, change assembly name. 2022-10-01 00:06:55 +02:00
Pieter-Jan Briers
cb209df0e5 Add MTU-related CVars for Lidgren. 2022-10-01 00:06:55 +02:00
Pieter-Jan Briers
eb64f55ce5 Release notes template 2022-10-01 00:06:55 +02:00
metalgearsloth
00ab9c6474 Version: 0.48.2.0 2022-09-30 15:28:00 +10:00
Pieter-Jan Briers
26eaa38e89 Improve MsgState ReliableThreshold
Explain real reason for it (I didn't know it at the time). Make the constant pegged to Lidgren's.
2022-09-30 01:43:00 +02:00
metalgearsloth
42bc16d4c9 Add some more types to type reflection (#3283) 2022-09-29 13:00:33 +02:00
metalgearsloth
498ce86176 Add API to get text dimensions (#3290) 2022-09-29 12:50:06 +02:00
metalgearsloth
3104678140 Version: 0.48.1.0 2022-09-29 16:04:50 +10:00
metalgearsloth
c63984eaca Add alt use key (#3253) 2022-09-29 16:04:27 +10:00
Leon Friedrich
078b81d495 Better sprite errors (#3285) 2022-09-28 16:32:37 +10:00
Leon Friedrich
4c341f0289 Replace Logger.Error with IRuntimeLog (#3267) 2022-09-28 11:07:45 +10:00
Leon Friedrich
bb4461587e Mark server-side SpriteComponent as obsolete. (#3276) 2022-09-28 11:07:25 +10:00
SpaceManiac
fe45af151a Allow startup to continue if prototype watching fails (#3273)
* Allow startup to continue if prototype watching fails

* Move _watchers.Add inside try, so dud watchers are not saved
2022-09-26 16:18:07 +02:00
wrexbe
ae2b0e9d8f Version: 0.48.0.1 2022-09-25 21:53:39 -07:00
wrexbe
ddf4828bf9 UI popup size fix (#3281) 2022-09-25 21:51:23 -07:00
DrSmugleaf
b1d0dbf03c Make UIControllers available to each other through IoC (#3277) 2022-09-25 07:54:58 +02:00
metalgearsloth
a91b134c5d Version: 0.48.0.0 2022-09-23 13:57:17 +10:00
Leon Friedrich
660b0b05d3 Remove RotateEvent (#3270) 2022-09-23 13:56:13 +10:00
Paul Ritter
e14493246e moves generic pooling policies out of pvssystem and adds listpolicy (#3272) 2022-09-22 15:44:50 -07:00
Leon Friedrich
d93a35b620 Replace some obsolete physics function calls (#3271) 2022-09-22 15:25:02 +10:00
Paul Ritter
2e12a712fa removes unused property (#3269) 2022-09-22 08:46:45 +10:00
metalgearsloth
29a84a6621 Version: 0.47.1.0 2022-09-21 20:45:26 +10:00
metalgearsloth
51f00d4b3b ECS 90% of physics component (#3256) 2022-09-21 20:44:49 +10:00
Leon Friedrich
a67b22cce8 Add get-matrix functions to IViewportControl (#3264) 2022-09-21 20:42:17 +10:00
metalgearsloth
cfbfdbf420 Don't sleep initialised items (#3259) 2022-09-21 20:35:17 +10:00
Leon Friedrich
a76d053818 Prevent PVS error spam and add more debugging asserts (#3263)
Co-authored-by: Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
2022-09-21 09:49:14 +10:00
Leon Friedrich
1587ee3c93 Store username inn player data (#3265) 2022-09-19 17:44:00 -07:00
Vera Aguilera Puerto
662808d0d3 Adjust MIDI logging to prevent log spam on RELEASE. 2022-09-17 09:54:31 +02:00
metalgearsloth
9d88857b55 Version: 0.47.0.2 2022-09-16 00:14:47 +10:00
metalgearsloth
3c92794aed Revert "Don't do any splitting when disabled" (#3257) 2022-09-16 00:14:21 +10:00
wrexbe
527879c048 Version: 0.47.0.1 2022-09-14 17:27:56 -07:00
Jacob Tong
d2494bcdc7 Allow Content to use InitializeTesting (#3019)
* Allow Content to use InitializeTesting

* Remove internal redefinition

Co-authored-by: ElectroJr <leonsfriedrich@gmail.com>
2022-09-14 17:25:22 -07:00
metalgearsloth
486aa1423b Version: 0.47.0.0 2022-09-14 19:39:23 +10:00
Pieter-Jan Briers
20659789b0 Robust.Packaging system (#3016)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-09-14 19:39:00 +10:00
Leon Friedrich
d87d6f7f8c Session specific state support (#3249) 2022-09-14 19:29:46 +10:00
Leon Friedrich
fa5fdcb5a5 Move appearance state to shared (#3252)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2022-09-14 18:20:44 +10:00
metalgearsloth
e6af084c22 Version: 0.46.0.0 2022-09-14 17:24:32 +10:00
metalgearsloth
de01b9d8cb Raise collision events by-ref (#3201) 2022-09-14 17:23:35 +10:00
Leon Friedrich
c9aa2c61bd Pass IRobustSerializer to NetMessage (#3220) 2022-09-14 17:23:17 +10:00
metalgearsloth
8200f1d942 Version: 0.45.8.0 2022-09-14 16:49:51 +10:00
Leon Friedrich
1af0ebca6c Make RaisePredictiveEvent check IsPredictionEnabled (#3246) 2022-09-14 16:39:49 +10:00
Leon Friedrich
fe5957bb91 RemoveComponentDeferred changes (#3245) 2022-09-14 15:53:50 +10:00
Leon Friedrich
be08f1787f Allow appearance to ignore PVS state (#3250) 2022-09-14 15:53:00 +10:00
metalgearsloth
ea35e6c03f Version: 0.45.7.0 2022-09-14 12:57:16 +10:00
metalgearsloth
a6c6b22393 Add entitylookup for components (#3065) 2022-09-13 19:52:46 +10:00
Leon Friedrich
5e6e5cb5ea Fix container debug assert (#3244) 2022-09-13 07:44:26 +10:00
Jacob Tong
64d2a3ca28 Fix non-map or grid coordinate returns for most cases (#3241) 2022-09-11 08:01:46 +10:00
Pieter-Jan Briers
bee4e499a8 Fix Rider analysis complaints 2022-09-10 10:57:30 +02:00
metalgearsloth
55da2dc5e5 TryGet for moved grids (#3238) 2022-09-08 13:09:30 +10:00
metalgearsloth
177eca0f90 Version: 0.45.6.1 2022-09-07 22:18:25 +10:00
metalgearsloth
ae229a03d8 Don't do any splitting when disabled (#3172) 2022-09-07 21:48:21 +10:00
metalgearsloth
2dc8093660 Fix fixture clearing on SetTiles (#3235) 2022-09-07 21:47:55 +10:00
metalgearsloth
071acbc818 Move MoveBuffer to the physicsmapcomponent (#3199)
Co-authored-by: Kara <lunarautomaton6@gmail.com>
2022-09-07 21:44:41 +10:00
metalgearsloth
3f5982cac0 Version: 0.45.6.0 2022-09-07 18:48:33 +10:00
Leon Friedrich
6f387402fe Fix OnParentChange bug (#3237) 2022-09-07 15:33:37 +10:00
Leon Friedrich
363e28561c Sprite direction bias (#3232)
* Sprite direction bias

* cvar
2022-09-06 21:54:07 -07:00
Jacob Tong
4d63b54259 Fix construction ghost rotation on entities without directional sprites (#3206) 2022-09-06 17:58:10 -07:00
Leon Friedrich
7fa05c7db3 make /tpto use AttachToGridOrMap() (#3234) 2022-09-05 22:21:26 -07:00
Leon Friedrich
c466f5f17f Don't update appearance while applying states (#3233) 2022-09-06 14:18:28 +10:00
metalgearsloth
b6f302b71e Version: 0.45.5.0 2022-09-06 13:11:50 +10:00
Leon Friedrich
7d9db6f7b2 NetSyncEnabled & animation changes (#3228) 2022-09-06 13:10:59 +10:00
Leon Friedrich
8bedba2da7 Fix initial tile & entity spawn menu sizes (#3230) 2022-09-05 20:00:35 -07:00
Leon Friedrich
837dde78c9 Fix interp overlay (#3229) 2022-09-05 20:00:19 -07:00
metalgearsloth
a01629969d Version: 0.45.4.0 2022-09-05 23:14:22 +10:00
metalgearsloth
15e13c7f92 Fix yml reflection (#3227) 2022-09-05 23:11:31 +10:00
metalgearsloth
3dd80b90eb Allow !type:float and !type:double in yml (#3176) 2022-09-05 22:47:24 +10:00
metalgearsloth
cb8e295ad9 Use TryComp instead of GetComp for animation playback (#3224) 2022-09-05 22:29:03 +10:00
Leon Friedrich
909163a923 Fix awake bodies in containers (#3219) 2022-09-05 15:04:37 +10:00
ElectroJr
6aa2408364 Version: 0.45.3.1 2022-09-04 20:04:23 -04:00
Leon Friedrich
afc1eed7ae QueueUpdateIsInert fixes (#3221) 2022-09-05 10:02:48 +10:00
wrexbe
85c8dc05fe Version: 0.45.3.0 2022-09-04 16:13:16 -07:00
Jezithyr
710371d7d1 UI refactor and UITheme implementations (#2712)
* UIControllerManager


Implemented UI Controller Manager

* added fetch function

* added note

* Hiding some internal stuff

* Implemented event on gamestate switch for ui

* Fix serialization field assigner emit

* fixing issues with ILEmitter stuff

* AHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH

Blame Smug

* fixing nullref

* Add checking for no backing field / property for ui system dependencies

* fixes Gamestate detection

* Implemented event on UIControllers on system load

* Updated systemload/unload listeners

* Had this backwards lol

* Fix nulling systems before calling OnSystemUnloaded, broke InventoryUIController.Hands.cs

* Created UI Window management system

- A manager that allows for easy creation and access of popup or gamestate windows

* Changing to use basewindow instead of default window

* Implemented UI Theming that isn't ass

* Updated default theme loading and validation

* Added path validation for themes

* Implemented UI Themes

* Implemented UI Theme prototypes

* Implementing theming for texture buttons and Texturerects

* fixing server error

* Remove IUILink

* Implemented default theme overriding and theme colors

* Fixing sandbox lul

* Added error for not finding UITheme

* fixing setting default theme in content

* Move entity and tile spawn window logic to controllers

* Add 2 TODOs

* Merge fixes

* Add IOnStateChanged for UI controllers

* Fix inventory window being slow to open
Caches resources when the UI theme is changed

* Remove caching on theme change
The real fix was fixing the path for resources

* Remove test method

* Fix crash when controllers implement non generic interfaces

* Add controllers frame update

* Split UserInterfaceManager into partials

- Created UI screen

* Converted more UI managers into partials

* Setup UIScreen manager system

* Added some widget utility funcs


updated adding widgets

* Started removing HUDManager

* Moved UiController Manager to Partials


Finished moving all UIController code to UIManager

* Fixed screen loading

* Fixed Screen scaling

* Fixed Screen scaling


cleanup

* wat

* IwantToDie

* Fixed resolving ResourceCache instead of IResourceCache

* Split IOnStateChanged into IOnStateEntered and IOnStateExited

* Implemented helpers for adjusting UIAutoscale for screens

* Fixed autoscale, removed archiving from autoscale

* Implemented popups and adjusted some stuff

* Fixing some popup related shinanegans

* Fixing some draw order issues

* fixing dumb shit

* Fix indentation in UserInterfaceManager.Input.cs

* Moved screen setup to post init (run after content)

* Fix updating theme

* Merge fixes

* Fix resolving sprite system on control creation

* Fix min size of tile spawn window

* Add UIController.Initialize method

* https://tenor.com/view/minor-spelling-mistake-gif-21179057

* Add doc comment to UIController

* Split UIController.cs and UISystemDependency.cs into their own files

* Add more documentation to ui controllers

* Add AttributeUsage to UISystemDependencyAttribute

* Fix method naming

* Add documentation for assigners

* Return casted widgets where relevant

* Fix entity spawner scroll (#1)

* Add CloseOnClick and CloseOnEscape for popups

* Remove named windows and popups

* Cleanup controller code

* Add IOnStateChanged, IOnSystemChanged, IOnSystemLoaded, IOnSystemUnloaded

* Add more docs to state and system change interfaces

* Fixing Window issues

* Fixing some window fuckery

* Added OnOpen event to windows, updated sandbox window

Sandbox windows now persist values and positions

* Recurse through controls to register widgets (#2)

* Allow path to be folder

* Fix local player shutdown

* Fixing escape menu

* Fix backing field in DataDefinition.Emitters

* Ent+Tile spawn no crash

* Skip no-spawn in entity spawn menu

Co-authored-by: Jezithyr <jmaster9999@gmail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: Jezithyr <Jezithyr@gmail.com>
Co-authored-by: wrexbe <81056464+wrexbe@users.noreply.github.com>
Co-authored-by: Flipp Syder <76629141+vulppine@users.noreply.github.com>
Co-authored-by: wrexbe <wrexbe@protonmail.com>
2022-09-04 16:10:54 -07:00
ElectroJr
9f651646d7 Version: 0.45.2.0 2022-09-04 13:13:08 -04:00
Leon Friedrich
d2860c80a9 Predict component adding and removal (#2876) 2022-09-05 03:09:42 +10:00
Alex Evgrashin
e1b9ae22b6 Box2 from two points (#3211) 2022-09-05 02:49:16 +10:00
Leon Friedrich
5d64f35c96 Sprite BB fixes (#3217) 2022-09-04 16:20:15 +10:00
Flipp Syder
5cfea0cd97 Includes paused for user interface updates (#3215) 2022-09-03 17:20:20 -07:00
Jacob Tong
a165556bf5 Make AudioSystem.PlayingStream public (#3208) 2022-09-03 09:32:23 +10:00
Kara
dee2881203 Fix loadmap command typo (#3209) 2022-09-01 06:27:54 -07:00
DrSmugleaf
da0891a5f4 Add element picker to dev window (#3180) 2022-09-01 06:18:30 +02:00
DrSmugleaf
1ed9796700 Add DataRecordAttribute to turn a whole record into a data definition (#3207)
Co-authored-by: Paul <ritter.paul1@googlemail.com>
2022-09-01 01:13:43 +02:00
Leon Friedrich
578a967a31 Misc PVS error logging / debugging changes (#3197) 2022-08-30 10:17:11 +10:00
Paul Ritter
14c0c58e87 adds includedatafields to serv3 (#3101)
* adds includedatafields to serv3

* fixes some stuff and adds tests

* checks for circular include

* fix writing

* this one should fix it frfrf

* ok now this one is gonna be it i swear

* we can save a few operations here

* goofy string

Co-authored-by: Paul <ritter.paul1@gmail.com>
2022-08-29 17:16:04 +02:00
Vera Aguilera Puerto
766d909a08 Fixes MIDI bank selection not working. (#3182) 2022-08-29 11:52:29 +02:00
metalgearsloth
9c50a217da Version: 0.45.1.0 2022-08-29 15:13:31 +10:00
Leon Friedrich
4f9db0cdb7 Fix bug in spin command (#3198) 2022-08-29 14:37:59 +10:00
Leon Friedrich
3c19937750 Update sprite bounds for SnapCardinals (#3195) 2022-08-29 13:52:23 +10:00
metalgearsloth
c509764014 Add camera reset rotation key (#3185) 2022-08-29 11:09:32 +10:00
wrexbe
75e06e4060 Version: 0.45.0.3 2022-08-28 15:34:15 -07:00
wrexbe
1b909f71a1 Fix some test issues (#3196) 2022-08-28 14:04:14 -07:00
metalgearsloth
1a8764f54b Add support for snapping sprites to south (#3186) 2022-08-29 05:02:50 +10:00
metalgearsloth
9152c97de7 Make mapload errors more obvious (#3193) 2022-08-29 04:08:14 +10:00
Paul Ritter
45cb04f928 makes all serv3 null checks use the proper logic (#3128) 2022-08-27 21:37:38 +02:00
Pieter-Jan Briers
a700750d9e Make ALC context not current before destroying it.
Let's hope this fixes the hangs.
2022-08-27 00:32:05 +02:00
wrexbe
07d327eb8b Version: 0.45.0.2 2022-08-25 21:31:36 -07:00
wrexbe
2275ec9573 Update YamlDotNet (#3082) 2022-08-25 21:28:12 -07:00
wrexbe
5848b449f6 Expose way to test sandbox (#3166) 2022-08-25 21:27:42 -07:00
metalgearsloth
67aa32e694 Version: 0.45.0.1 2022-08-26 12:21:45 +10:00
Leon Friedrich
dbd2961b9f Fix client state handling bug (#3192) 2022-08-26 12:00:40 +10:00
Pieter-Jan Briers
b77b49c667 Mapped string serializer hit/miss stats.
Fixes #3190
2022-08-26 01:58:17 +02:00
Leon Friedrich
0eabe62bdb Fix prototype reloading debug assert failure (#3188) 2022-08-26 09:57:58 +10:00
Leon Friedrich
31e2ea2770 Fix AudioParams deserialization (#3191) 2022-08-25 16:46:44 -07:00
metalgearsloth
7a636b3b87 Version: 0.45.0.0 2022-08-25 23:33:10 +10:00
Leon Friedrich
98ce017b4a Physics get-colliding tweaks (#3183) 2022-08-25 23:29:46 +10:00
Leon Friedrich
26b04f0d66 Fix container init IDs (#3184) 2022-08-25 23:28:48 +10:00
Leon Friedrich
f4f2dea688 Fix load grid errors (#3181) 2022-08-25 23:28:29 +10:00
metalgearsloth
e9a0f9a4c1 Bandaid maploader for loading onto an existing one (#3160) 2022-08-24 15:49:46 +10:00
Leon Friedrich
de438ae94c Prevent players from attaching to terminating entities (#3175) 2022-08-24 01:42:48 +10:00
metalgearsloth
9ec77f20ee Version: 0.44.0.0 2022-08-23 16:35:59 +10:00
Leon Friedrich
da01040b52 Hopefully fix container issues? (#3174) 2022-08-23 16:35:02 +10:00
metalgearsloth
dce2a5ddb2 Fix physics grid reparent crash (#3122) 2022-08-23 11:33:36 +10:00
Acruid
5c99fbabf2 Map serialization postmapinit bugfix (#3165) 2022-08-23 10:52:23 +10:00
Leon Friedrich
9d0846c0e9 Add PVS/entity-state debug commands (#3169) 2022-08-23 10:50:23 +10:00
metalgearsloth
035ecfb098 Fix joint collision (#3161)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-08-23 10:48:19 +10:00
metalgearsloth
3693f5aee7 Physics component cleanup (#3158) 2022-08-23 10:45:28 +10:00
ElectroJr
b859815b07 Version: 0.43.1.1 2022-08-22 17:03:25 -04:00
Leon Friedrich
3701ca83e4 Only request full state on missing metadata. (#3170) 2022-08-23 07:01:41 +10:00
Leon Friedrich
1473f1d34c Fix entity state exception tolerance (#3171) 2022-08-23 07:01:31 +10:00
ElectroJr
889c140fb9 Version: 0.43.1.0 2022-08-22 13:32:57 -04:00
metalgearsloth
c8259915f8 LoadBP completion results (#3159) 2022-08-23 02:58:56 +10:00
Leon Friedrich
a2a25fb296 Add session info for client-side ToPrettyString() (#3162) 2022-08-23 02:56:09 +10:00
Leon Friedrich
938a9929ea Fix deferred component remove error (#3163) 2022-08-23 02:55:59 +10:00
wrexbe
7726075b9b Fix gamestate debug display (#3167) 2022-08-23 02:55:41 +10:00
Leon Friedrich
03b3d1bbe7 Maybe fix PVS bug (#3164) 2022-08-23 02:54:50 +10:00
wrexbe
17ec51b74c Add reusing username+id in tests (#3143) 2022-08-22 05:57:07 +10:00
Leon Friedrich
e92998d1ec Remove a PVS warning on full release (#3154) 2022-08-22 05:50:52 +10:00
metalgearsloth
6691512136 Version: 0.43.0.2 2022-08-21 17:10:05 +10:00
metalgearsloth
a80f4ad76c Add broadphase AABB back in (#3157) 2022-08-21 16:56:01 +10:00
Leon Friedrich
2c6f4cd80c Fix PVS/container bug (#3155) 2022-08-21 16:06:44 +10:00
ElectroJr
51a4c6dcf2 Version: 0.43.0.1 2022-08-20 19:49:03 -04:00
Leon Friedrich
1f402e581a Fix state interpolation (#3153) 2022-08-21 09:47:15 +10:00
ElectroJr
17ea92bfda Version: 0.43.0.0 2022-08-20 18:31:48 -04:00
Leon Friedrich
6a8266af7e Revert "Revert "PVS & client state handling changes"" (#3152) 2022-08-21 08:30:28 +10:00
ElectroJr
f6b7606648 Version: 0.42.0.0 2022-08-20 15:28:34 -04:00
Leon Friedrich
9cd8adae93 Revert "PVS & client state handling changes" (#3151) 2022-08-21 05:27:16 +10:00
ElectroJr
c5ba8b75c8 Version: 0.41.0.0 2022-08-20 13:42:20 -04:00
Leon Friedrich
3d73cc7289 Make AudioSystem accept nullable SoundSpecifier (#3133) 2022-08-21 03:40:49 +10:00
Leon Friedrich
11aa062ee0 Un-revert BUI PRs (#3139) 2022-08-21 03:40:29 +10:00
Leon Friedrich
b4358a9e33 PVS & client state handling changes (#3000) 2022-08-21 03:40:18 +10:00
Leon Friedrich
0cce4714a1 Make a specific EntityUid error more descriptive (#3132) 2022-08-20 16:30:11 +10:00
metalgearsloth
9c4e6a6595 Hotfix tile placement brrrrt (#3140) 2022-08-20 16:29:38 +10:00
DrSmugleaf
1ddd541fe9 Add IEntityManager.Systems proxy methods (#3150) 2022-08-20 16:28:36 +10:00
Leon Friedrich
e45aa3f2fe Assert that components are not added to terminating entities (#3144) 2022-08-20 16:28:09 +10:00
Leon Friedrich
99efdb6061 Include stack trace in deletion errors (#3145) 2022-08-20 16:27:54 +10:00
DrSmugleaf
32f0ffdc79 Move ContainerHelpers methods to SharedContainerSystem (#3149) 2022-08-20 07:57:56 +02:00
DrSmugleaf
cf166483c9 Change state manager methods to return the new state (#3137) 2022-08-15 22:05:48 +02:00
Pieter-Jan Briers
49631867f4 Fix sRGB conversion in WindowRoot background color. 2022-08-15 16:51:23 +02:00
metalgearsloth
9f56eaec9a Obsolote EntitySystem.Get<T> (#3142) 2022-08-15 16:22:06 +02:00
DrSmugleaf
04f2b732a5 Add TryFirstOrNull and TryFirstOrDefault without predicates (#3141) 2022-08-15 16:21:40 +02:00
metalgearsloth
b8cfabc339 Version: 0.40.3.3 2022-08-15 14:06:22 +10:00
metalgearsloth
1cdd39202f Make tile grid placement somewhat bearable (#3131)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-08-15 14:05:27 +10:00
Leon Friedrich
3290720b4c Don't error on missing entity suffixes (#3124) 2022-08-15 14:04:50 +10:00
Leon Friedrich
49badb06cb Fix fixture init/state bug. (#3125) 2022-08-15 14:03:57 +10:00
Visne
2c6941e73b Version: 0.40.3.2 2022-08-15 02:49:34 +02:00
wrexbe
5e5883cb88 Fix map schema (#3138) 2022-08-15 02:40:56 +02:00
ElectroJr
02c504445e Version: 0.40.3.1 2022-08-14 19:21:42 -04:00
wrexbe
4d5075a792 Update mapfile_validators.py (#3136) 2022-08-15 09:20:12 +10:00
1009 changed files with 51550 additions and 29287 deletions

View File

@@ -9,14 +9,6 @@ on:
concurrency: benchmarks
env:
ROBUST_BENCHMARKS_ENABLE_SQL: 1
ROBUST_BENCHMARKS_SQL_ADDRESS: ${{ secrets.BENCHMARKS_WRITE_ADDRESS }}
ROBUST_BENCHMARKS_SQL_PORT: ${{ secrets.BENCHMARKS_WRITE_PORT }}
ROBUST_BENCHMARKS_SQL_USER: ${{ secrets.BENCHMARKS_WRITE_USER }}
ROBUST_BENCHMARKS_SQL_PASSWORD: ${{ secrets.BENCHMARKS_WRITE_PASSWORD }}
ROBUST_BENCHMARKS_SQL_DATABASE: benchmarks
jobs:
benchmark:
name: Run Benchmarks
@@ -28,8 +20,22 @@ jobs:
host: centcomm.spacestation14.io
username: robust-benchmark-runner
key: ${{ secrets.CENTCOMM_ROBUST_BENCHMARK_RUNNER_KEY }}
command_timeout: 100000m
command_timeout: 100000m
script: |
wget https://raw.githubusercontent.com/space-wizards/RobustToolbox/${{ github.sha }}/Tools/run_benchmarks.py
python3 run_benchmarks.py "${{ secrets.BENCHMARKS_WRITE_ADDRESS }}" "${{ secrets.BENCHMARKS_WRITE_PORT }}" "${{ secrets.BENCHMARKS_WRITE_USER }}" "${{ secrets.BENCHMARKS_WRITE_PASSWORD }}" "${{ github.sha }}"
rm run_benchmarks.py
mkdir benchmark_run_${{ github.sha }}
cd benchmark_run_${{ github.sha }}
git clone https://github.com/space-wizards/RobustToolbox.git repo_dir --recursive
cd repo_dir
git checkout ${{ github.sha }}
cd Robust.Benchmarks
dotnet restore
export ROBUST_BENCHMARKS_ENABLE_SQL=1
export ROBUST_BENCHMARKS_SQL_ADDRESS="${{ secrets.BENCHMARKS_WRITE_ADDRESS }}"
export ROBUST_BENCHMARKS_SQL_PORT="${{ secrets.BENCHMARKS_WRITE_PORT }}"
export ROBUST_BENCHMARKS_SQL_USER="${{ secrets.BENCHMARKS_WRITE_USER }}"
export ROBUST_BENCHMARKS_SQL_PASSWORD="${{ secrets.BENCHMARKS_WRITE_PASSWORD }}"
export ROBUST_BENCHMARKS_SQL_DATABASE="benchmarks"
export GITHUB_SHA="${{ github.sha }}"
dotnet run --filter '*' --configuration Release
cd ../../..
rm -rf benchmark_run_${{ github.sha }}

View File

@@ -6,7 +6,7 @@ on:
jobs:
docfx:
runs-on: ubuntu-latest
steps:
steps:
- uses: actions/checkout@v2
with:
submodules: true
@@ -14,21 +14,21 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build Project
run: dotnet build --no-restore /p:WarningsAsErrors=nullable
- name: Build DocFX
uses: nikeee/docfx-action@v1.0.0
uses: nikeee/docfx-action@v1.0.0
with:
args: Robust.Docfx/docfx.json
- name: Publish Docfx Documentation on GitHub Pages
uses: maxheld83/ghpages@master
env:
BUILD_DIR: Robust.Docfx/_robust-site
GH_PAT: ${{ secrets.GH_PAT }}
BUILD_DIR: Robust.Docfx/_robust-site
GH_PAT: ${{ secrets.GH_PAT }}

View File

@@ -22,12 +22,12 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
dotnet-version: 7.0.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore /p:WarningsAsErrors=nullable
- name: Test Engine
run: dotnet test --no-build Robust.UnitTesting/Robust.UnitTesting.csproj -- NUnit.ConsoleOut=0

View File

@@ -42,7 +42,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100
dotnet-version: 7.0.x
- name: Build
run: dotnet build

View File

@@ -23,7 +23,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100
dotnet-version: 7.0.x
- name: Package client
run: Tools/package_client_build.py -p windows mac linux

View File

@@ -21,7 +21,7 @@ jobs:
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.100
dotnet-version: 7.0.x
- name: Disable submodule autoupdate
run: touch BuildChecker/DISABLE_SUBMODULE_AUTOUPDATE

View File

@@ -1,7 +1,3 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<Import Project="..\MSBuild\Robust.Properties.targets" />
</Project>

View File

@@ -1,7 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net6.0</TargetFramework>
<AssemblyName>SpaceWizards.Lidgren.Network</AssemblyName>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<EnableDefaultCompileItems>false</EnableDefaultCompileItems>
<DefaultItemExcludes>Lidgren.Network/**/*</DefaultItemExcludes>
@@ -13,6 +15,7 @@
<Compile Include="Lidgren.Network\Lidgren.Network\**\*.cs">
<Link>%(RecursiveDir)%(Filename)%(Extension)</Link>
</Compile>
<Compile Remove="Lidgren.Network\Lidgren.Network\obj\**\*.cs" />
</ItemGroup>
</Project>

View File

@@ -20,10 +20,16 @@
<PropertyGroup Condition="'$(FullRelease)' == 'True'">
<DefineConstants>$(DefineConstants);FULL_RELEASE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(FullRelease)' != 'True'">
<DefineConstants>$(DefineConstants);DEVELOPMENT</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)' == 'Release'">
<DefineConstants>$(DefineConstants);EXCEPTION_TOLERANCE</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(EnableClientScripting)' == 'True'">
<DefineConstants>$(DefineConstants);CLIENT_SCRIPTING</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(UseSystemSqlite)' == 'True'">
<DefineConstants>$(DefineConstants);USE_SYSTEM_SQLITE</DefineConstants>
</PropertyGroup>
</Project>

View File

@@ -1,4 +1,4 @@
<Project>
<!-- This file automatically reset by Tools/version.py -->
<PropertyGroup><Version>0.40.3.0</Version></PropertyGroup>
</Project>
<Project>
<!-- This file automatically reset by Tools/version.py -->

View File

@@ -1,8 +1,8 @@
<Project>
<!-- Engine-specific properties. Content should not use this file. -->
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<LangVersion>10</LangVersion>
<TargetFramework>net7.0</TargetFramework>
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<WarningsAsErrors>nullable</WarningsAsErrors>
</PropertyGroup>

View File

@@ -16,6 +16,11 @@
<ActualOS>MacOS</ActualOS>
</PropertyGroup>
</When>
<When Condition="$([MSBuild]::IsOSPlatform('FreeBSD'))">
<PropertyGroup>
<ActualOS>FreeBSD</ActualOS>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<ActualOS>Linux</ActualOS>
@@ -26,9 +31,10 @@
<TargetOS Condition="'$(TargetOS)' == ''">$(ActualOS)</TargetOS>
<Python>python3</Python>
<Python Condition="'$(ActualOS)' == 'Windows'">py -3</Python>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<EnableClientScripting>True</EnableClientScripting>
<!-- Client scripting is disabled on full release builds for security and size reasons. -->
<EnableClientScripting Condition="'$(FullRelease)' == 'True'">False</EnableClientScripting>
<UseSystemSqlite Condition="'$(TargetOS)' == 'FreeBSD'">True</UseSystemSqlite>
</PropertyGroup>
</Project>

View File

@@ -25,7 +25,7 @@ namespace OpenToolkit.GraphicsLibraryFramework
}
string rName = null;
if (OperatingSystem.IsLinux()) rName = "libglfw.so.3";
if (OperatingSystem.IsLinux() || OperatingSystem.IsFreeBSD()) rName = "libglfw.so.3";
else if (OperatingSystem.IsMacOS()) rName = "libglfw.3.dylib";
if ((rName != null) && NativeLibrary.TryLoad(rName, assembly, path, out var handle))

View File

@@ -5,7 +5,7 @@
<!-- Work around https://github.com/dotnet/project-system/issues/4314 -->
<TargetFramework>$(TargetFramework)</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<LangVersion>7.3</LangVersion>
<LangVersion>9.0</LangVersion>
</PropertyGroup>
<Import Project="..\MSBuild\Robust.DefineConstants.targets" />

View File

@@ -18,7 +18,7 @@ We are happy to accept contributions from anybody. Get in Discord or IRC if you
## Building
This repository is the **engine** part of SS14. It's the base engine all SS14 servers will be built on. As such, it does not start on its own: it needs the [content repo](https://github.com/space-wizards/space-station-14). Think of Robust Toolbox as BYOND in the context of Spacestation 13.
This repository is the **engine** part of SS14. It's the base engine all SS14 servers will be built on. As such, it does not start on its own: it needs the [content repo](https://github.com/space-wizards/space-station-14). Think of Robust Toolbox as BYOND in the context of Space Station 13.
## Legal Info

954
RELEASE-NOTES.md Normal file
View File

@@ -0,0 +1,954 @@
# Release notes for RobustToolbox.
<!--
NOTE: automatically updated sometimes by version.py.
Don't change the format without looking at the script!
-->
<!--START TEMPLATE
## Master
### Breaking changes
*None yet*
### New features
*None yet*
### Bugfixes
*None yet*
### Other
*None yet*
### Internal
*None yet*
END TEMPLATE-->
## Master
### Breaking changes
*None yet*
### New features
*None yet*
### Bugfixes
*None yet*
### Other
*None yet*
### Internal
*None yet*
## 0.80.2.0
### New features
* Tooltips now provide the option to track the mouse cursor.
## 0.80.1.0
### New features
* Added location of compile errors to XAML UI.
* Add CC-BY to RSI.json
* Allow customising radio buttons for RadioOptions.
* Added CVar to override CEF useragent.
### Bugfixes
* Fix incorrect size of second window in split container.
* Fix PreventCollideEvent fixture ordering.
### Other
* Obsoleted .Owner for future work in removing components storing a reference to their entityuid.
## 0.80.0.0
### Breaking changes
* Moved ConvexHullPolygons and MaxPolygonVertices cvars to constants.
* Moved the PhysicsMap Gravity property to its own controller.
* Made some layout changes to Split Container.
### New features
* Added the colliding fixtures to PreventCollideEvent.
### Bugfixes
* Grids overlapping entities will now flag the entity for grid traversal.
### Other
* The split container `Measure()` override now more accurately reflects the space available to children. Additionally, the split position is now publicly settable.
### Internal
* Removed manual component registrations.
## 0.79.0.1
### New features
* Add helper GetDirection to SharedMapSystem that offsets a Vector2i in the specified direction by the specified distance.
* UIController now implements IEntityEventSubscriber
### Bugfixes
* The fast TryFindGridAt overload will now also return the queried map's MapGridComponent if it exists.
### Other
* Updated window dragging movement constraints. By default windows can now be partially dragged off-screen to the left. This is configurable per window. This also fixes a bug where windows could become unreachable.
### Internal
* Remove 2 TryGetComponents per physics contact per tick.
## 0.79.0.0
### Breaking changes
* EntityInitializedMessage has been removed; the C# event invoked on EntityManager (EntityInitialized) should be used in its place.
* TileChangedEventArgs has been removed.
### Bugfixes
* Fix tooltip panels being incorrectly sized for their first frame.
* Client will no longer predict physics sleeping on bodies that are unable to sleep.
* Style box texture scaling has been fixed.
### Other
* Added TaskCompletionSource to the sandbox.
### Internal
* IPhysManager has been removed for a slight physics contacts optimisation.
* Optimise TryFindGridAt, particularly for grid traversals.
* MapGridComponent now uses delta component states.
* Removed some TryGetComponent from IsMapPaused, speeding up entity initialization in some instances.
## 0.78.0.0
### Breaking changes
* Removed the obsoleted `GlobalLinearVelocity()` EntityUid helper method.
* INetConfigurationManager now has client & server side variants. Clients can now properly set server authoritative cvars when in singleplayer mode
* IPhysBody has been removed. Just use the physics component.
* Physics joints haven been slightly refactored and some method signatures have changed.
### New features
* Added a new cvar to limit audio occlusion raycast lengths ("audio.raycast_length").
* IRobustSerializer has new public methods for getting hashes and setting string serializer data.
### Bugfixes
* Fixed broken click bound checks in the `Tree` UI Control.
* Removed erroneous debug assert in render code that was causing issued in debug mode.
* Fixed some instances where rotation-less entities were gaining non-zero local rotation.
### Other
* Tickrate is now shown in the f3 debug monitors
## 0.77.0.2
### New features
* Scroll containers now have public methods to get & set their scroll positions.
### Bugfixes
* Fixed entity spawn menu sometimes not properly updating when filtering entities.
### Other
* Physics contacts are now stored per-world rather than per-map. This allows the multi-threading to be applicable to every contact rather than per-map.
* Contacts will no longer implicitly be destroyed upon bodies changing maps.
## 0.77.0.1
### Bugfixes
* Fix AttachToGridOrMap not retaining an entity's map position.
## 0.77.0.0
### Breaking changes
* ClientOccluderComponent has been removed & OccluderComponent component functions have been moved to the occluder system.
* The OccluderDirectionsEvent namespace and properties have changed.
* The rendering and occluder trees have been refactored to use generic render tree systems.
* Several pointlight and occluder component properties now need to be set via system methods.
* SharedPhysicsMap and PhysicsMap have been combined.
* RunDeferred has been removed from transformcomponent and updates are no longer deferred.
## 0.76.0.0
### Breaking changes
* Physics contact multi-threading cvars have been removed as the parallelism is now handled by IParallelManager.
### New features
* Physics now supports substepping, this is under physics.target_minimum_tickrate. This means physics steps will run at a constant rate and not be affected by the server's tickrate which can reduce the prevalence of tunneling.
* FastNoise API is now public.
### Other
* UPnP port forwarding now has better logging.
* Physics solver has been refactored to take more advantage of parallelism and ECS some internal code.
* Sprite processing & bounding box calculations should be slightly faster now.
* Nullspace maps no longer have entities attached.
## 0.75.1.0
### New features
* Serv4's notNullableOverride parameter is now enforced by analyzer. For more info, see [the docs](https://docs.spacestation14.io/en/engine/serialization).
* Added command to dump injector cache list.
### Bugfixes
* Fix generic visualisers not working because of recent appearance system changes in v0.75.0.0
* Fix physics not working properly on moving grids (transform matrix deferral).
### Other
* Transform matrix dirtying is deferred again (undo change in v0.75.0.0
* Added two new serv3 analysers (NotNullableFlagAnalyzer and PreferGenericVariantAnalyzer)
## 0.75.0.0
### Breaking changes
* Changed default for `net.buffer_size` to `2`.
* Changed default for `auth.mode` to `Required`. On development builds, the default is overriden to remain at `Optional`, so this only affects published servers.
* The default value for the `outsidePrediction` argument of the `InputCmdHandler.FromDelegate()` has changed from false to true.
### New features
* Appearance system now has generic `TryGetData<T>()` functions.
### Bugfixes
* Mapped string serializer once again is initialized with prototype strongs, reducing bandwidth usage.
* Fixed various keybindings not working while prediction was disabled.
* Fixed a bug causing rendering trees to not properly recursively update when entities move.
### Other
* Transform matrix dirtying is no longer deferred.
* Cleaned up some `FULL_RELEASE` CVar default value overrides into `CVarDefaultOverrides.cs`.
* VVRead now attempts to serialize data to yaml
## 0.74.0.0
### Breaking changes
* `ITypeReader<,>.Read(...)` and `ITypeCopier<>.Copy(...)` have had their `bool skipHook` parameter replaced with a `SerializationHookContext` to facilitate multithreaded prototype loading.
* Prototypes are now loaded in parallel across multiple threads. Type serializers, property setters, etc... must be thread safe and not rely on an active IoC instance.
### Bugfixes
* Mapped string serializer once again is initialized with prototype strongs, reducing bandwidth usage.
### Other
* Drastically improved startup time by running prototype loading in parallel.
* `AfterDeserialization` hooks are still ran on the main thread during load to avoid issues.
* Various systems in the serialization system such as `SerializationManager` or `ReflectionManager` have had various methods made thread safe.
* `TileAliasPrototype` no longer has a load priority set.
* Straightened out terminology in prototypes: to refer to the type of a prototype (e.g. `EntityPrototype` itself), use "kind".
* This was previously mixed between "type" and "variant".
### Internal
* `SpanSplitExtensions` has been taken behind the shed for being horrifically wrong unsafe code that should never have been entered into a keyboard ever. A simpler helper method replaces its use in `Box2Serializer`.
* `PrototypeManager.cs` has been split apart into multiple files.
## 0.73.0.0
### Breaking changes
* The entity lookup flag `LookupFlags.Anchored` has been replaced with `LookupFlags.Static`.
* We are now using **.NET 7**.
* `IDependencyCollection`/`IoCManager` `RegisterInstance` does not automatically add the instance to object graph, so `BuildGraph()` must now be called to see the new instances.
* `deferInject` parameteres have been removed.
### New features
* The server will now check for any unknown CVars at startup, to possibly locate typos in your config file.
* `IDependencyCollection` is now thread safe.
### Bugfixes
* Fixed config files not being truncated before write, resulting in corruption.
### Other
* Removed some cruft from the `server_config.toml` default config file that ships with Robust.
* Most usages of x86 SIMD intrinsics have been replaced with cross-platform versions using the new .NET cross-platform intrinsics.
* This reduces code to maintain and improves performance on ARM.
* Tiny optimization to rendering code.
* `RobustSerializer` no longer needs to be called from threads with an active IoC context.
* This makes it possible to use from thread pool threads without `IoCManager.InitThread`.
* Removed finalizer dispose from `Overlay`.
* Stopped integration tests watching for prototype reload file changes, speeding stuff up.
### Internal
* Moved `SerializationManager`'s data definition storage over to a `ConcurrentDictionary` to improve GC behavior in integration tests.
## 0.72.0.0
### Breaking changes
* EntityPausedEvent has been split into EntityPausedEvent and EntityUnpausedEvent. The unpaused version now has information about how long an entity has been paused.
## 0.71.1.4
### Bugfixes
* Fixed CVars not being saved correctly to config file.
### Other
* Mark `validate_rsis.py` as `+x` in Git.
* Made config system more robust against accidental corruption when saving.
## 0.71.1.3
## 0.71.1.2
### Bugfixes
* Fixed UI ScrollContainer infinite loop freezing client.
## 0.71.1.1
### Bugfixes
* Fixed client memory leaks and improved performance in integration testing.
## 0.71.1.0
### New features
* Better RSI validator script.
* When a new map file is loaded onto an existing map the entities will be transferred over.
* Add an API to get the hard layer / mask for a particular physics body.
### Bugfixes
* Fixed non-filled circle drawing via world handle.
* Fix max_connections in the default server config.
* Fix removal of PVS states for players without ingame status.
* Fix max rotation from the physics solver.
### Internal
* Wrap window rendering in a try-catch.
## 0.71.0.0
### Breaking changes
* `DebugTimePanel`, `DebugNetPanel` and `DebugNetBandwidthPanel` have been made internal.
* RSIs with trailing commas in the JSON metadata are no longer allowed.
### Bugfixes
* `csi` doesn't throw a `NullReferenceException` anymore.
### Other
* The `game.maxplayers` CVar has been deprecated in favor of the new `net.max_connections` CVar. Functionality is the same, just renamed to avoid confusion. The old CVar still exists, so if `game.maxplayers` is set it will be preferred over the new one.
* The new default for `net.max_connections` is 256.
* Debug monitors (F3) now have margin between them.
* F3 (clyde monitor) now lists the windowing API and version in use.
* Added system monitor to F3 with various info like OS version, .NET runtime version, etc...
* The engine now warns when loading `.png` textures inside a `.rsi`. This will be blocked in the future.
## 0.70.0.0
### New features
* `game.desc` CVar for a server description to show in the launcher.
* New system for exposing links to e.g. a Discord in the launcher.
* The engine does not have a built-in method for configuring these, but it does now have a `StatusHostHelpers.AddLink` method to correctly format these from content. The idea is that content wires the types of links (with icon names) up itself via `IStatusHost.OnInfoRequest`.
* See also [the HTTP API documentation](https://docs.spacestation14.io/en/engine/http-api) for reference.
* `GameShared` now has a `Dependencies` property to allow access to the game's `IDependencyCollection`. This makes it possible to avoid using static `IoCManager` in `EntryPoint`-type content code.
* A new define constant `DEVELOPMENT` has been defined, equivalent to `!FULL_RELEASE`. See [the docs](https://docs.spacestation14.io/en/technical-docs/preprocessor-defines) for details.
* `IConfigurationManager` has new functions for reading and writing CVar directly from a TOML file `Stream`.
* New `IConfigurationManager.LoadDefaultsFromTomlStream` to load a TOML file as CVar default overrides.
* Added new serializers to support Queue<T> data-fields.
* Added a `FromParent()` function to `IDependencyCollection`, enabling dependencies to be passed to parallel threads.
* `IClientStateManager` now has a `PartialStateReset()` function to make it easier for content to rewind to previous game states.
* Added `IClientNetManager.DispatchLocalNetMessage()`, which allows a client to raise a local message that triggers networked event subscriptions.
### Bugfixes
* `IPlayerSession.OnConnect()` now actually gets called when players connect.
* `MapLoaderSystem.TryLoad(.., out rootUids)` now properly only returns entities parented to the map.
### Other
* Invalid placement types for the entity spawn menu now log warnings.
* Slightly improved sprite y-sorting performance.
### Internal
* The current physics map that an entity is on is now cached in the transform component alongside other cached broadphase data. This helps to fix some broadphase/lookup bugs.
## 0.69.0.0
## 0.68.0.0
### Breaking changes
* Updated yml schema validator to remove the `grids` node.
### Bugfixes
* Fixed position-less audio playing.
* Stop mapgrids from serializing their fixtures.
### Other
* Removed the `restart` command, since it never worked properly and just confused people.
* Add virtual to some UIScreen methods.
* Add public parameterless ctor to MenuBar.
## 0.67.2.2
### Bugfixes
* Fix double MapGrid chunk subscription.
* Fix grid contacts short-circuiting collision.
## 0.67.2.1
### Bugfixes
* Fix MapChunks not being subscribed to by MapGridComponents in some instances.
## 0.67.2.0
### New features
* Add submenu support to menubar controls.
### Bugfixes
* Fix gridtree returning mapgrid maps twice.
## 0.67.1.3
### Bugfixes
* Fix Map regression so now they can be MapGrids again without the client crashing.
## 0.67.1.2
### Bugfixes
* Fix some mapgrids not being marked as dirty and never being sent to clients (thanks checkraze).
## 0.67.1.1
### Bugfixes
* Fix some merge artifacts from mapgrid support for maps.
## 0.67.1.0
### New features
- Maps can now have MapGridComponent added to them.
## 0.67.0.0
### Breaking changes
* MapGrid is deprecated and has been merged into MapGridComponent. This is subject to further changes as it gets ECSd more in future.
* The `grids` yaml node on map files is deprecated and has been merged onto MapGridComponent. Loading maps is backwards compatible for now but is subject to change in future. Saving maps will save in the new format.
## 0.66.0.0
### Breaking changes
* AudioSystem functions for playing audio have changed. Functions that take in filters now require an additional argument that will determine whether sounds are recorded by replays. Additionally, there are several new overrides that take in a recipient session or entity.
### Bugfixes
* Script globals for C# interactive were not having dependencies injected correctly.
* GetWorldPosition() now returns the correct positions even prior to transform initialization.
* Fix map loading not properly offsetting some entities that were directly parented to the map.
### Internal
* Added lookup/broadphase re-parenting tests.
## 0.65.2.1
### Bugfixes
* Fix empty MetaData components being serialized to map files.
* Fix saving a grid as a map not marking it as pre-mapinit.
### Other
* Set `ValidateExecutableReferencesMatchSelfContained` in the server project, which may help with publishing issues. I hope.
* Move pinned font data over to Pinned Object Heap.
* Improved shader code generation for uniform arrays to be more compatible.
* Server now has server GC enabled by default.
### Internal
* Remove some unnecessary dependency resolves from filters making audio much more performant.
## 0.65.2.0
### New features
* Added ClydeAudio.StopAllAudio()
* Expose more tick logic to content.
### Bugfixes
* Fix bad reference in WebView.
### Internal
* Add Robust.Packaging to solution.
* Add WebView to solution.
* Physics contacts are now parallel and much faster.
## 0.65.1.0
### New features
* Implement value prototype id dictionary serializer.
### Bugfixes
* Fixes lerping clean up issue added in #3472.
### Internal
* Add test for (de)serializing data record structs.
## 0.65.0.1
### Bugfixes
- Fix SetLocalPositionRotation raising 2 moveevents. This should help physics performance significantly.
- Fix tpgrid responses and command error.
## 0.65.0.0
### Breaking changes
* Rename transform lerping properties alongside other minor internal changes.
### Bugfixes
* Fix physics testbeds.
* Force grids to always be collidable for now and stop them clipping.
### Other
* Slight optimization to `OutputPanel`'s handling of internal `RichTextEntry`s.
* Force non-collidable contacts to be destroyed. Previously these hung around until both entities became collidable again.
### Internal
* `Tools/version.py` has been updated to automatically update `RELEASE-NOTES.md`.
* General cleanup to `Tools/version.py`.
## 0.64.1.0
### Bugfixes
* Word-wrapping in `OutputPanel` and `RichTextLabel` has been fixed.
## 0.64.0.0
### Breaking changes
* IMapLoader has been refactored into MapLoaderSystem. The API is similar for now but is subject to change in the future.
## 0.63.0.0
### Breaking changes
* Thanks to new IME support with SDL2, `IClyde.TextInputStart()` and `IClyde.TextInputStop()` must now be appropriately called to start/stop receiving text input when focusing/unfocusing a UI control. This restriction is applied even on the (default) GLFW backend, to enforce consistent usage of these APIs.
* `[GUI]TextEventArgs` have been renamed to `[GUI]TextEnteredEventArgs`, turned into records, and made to carry a `string` rather than a single text `Rune`.
* IoC and `DependencyCollection` `Register` methods now have a `TInterface : class` constraint.
* [ABI] `IoCManager.InitThread` now returns the `IDependencyCollection`.
### New features
* Fixes for compiling & running on .NET 7. You'll still have to edit a bunch of project files to enable this though.
* `FormattedMessage.EnumerateRunes()`
* `OSWindow.Shown()` virtual function for child classes to hook into.
* `IUserInterfaceManager.DeferAction(...)` for running UI logic "not right now because that would cause an enumeration exception".
* New `TextEdit` control for multi-line editable text, complete with word-wrapping!
* `Rope` data structure for representing large editable text, used by the new `TextEdit`.
* Robust now has IME support matching SDL2's API. This only works on the SDL2 backend (which is not currently enabled by default) but the API is there:
* `IClyde.TextInputStart()`, `IClyde.TextInputStop()`, `IClyde.TextInputSetRect()` APIs to control text input behavior.
* `TextEditing` events for reporting in-progress IME compositions.
* `LineEdit` and `TextEdit` have functional IME support when the game is running on SDL2. If you provide a font file with the relevant glyphs, CJK text input should now be usable.
* `Register<T>` (single type parameter) extension method for `IDependencyCollection`.
### Bugfixes
* Fixes erroneous literal "\\n" inside the Clyde debug panel.
* Fixed Lidgren connection status changes potentially getting mislogged.
* Fixed missing components not being correctly saved for maps
* Fixed map saving sometimes not including new components.
* Fix hot reload unit tests.
### Other
* Properly re-use `HttpClient` in `NetManager` meaning we properly pool connections to the auth server, improving performance.
* Hub advertisements have extended keep-alive pool timeout, so the connection can be kept active between advertisements.
* All HTTP requests from the engine now have appropriate `User-Agent` header.
* `bind` command has been made somewhat more clear thanks to a bit of help text and some basic completions.
* `BoundKeyEventArgs` and derivatives now have a `[DebuggerDisplay]`.
* Text cursors now have a fancy blinking animation.
* `SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH` is set on the SDL2 windowing backend, so clicking on the game window to focus it will pass clicks through into the game itself, matching GLFW's behavior.
* Windows clipboard history paste now works.
* Improved multi-window UI keyboard focusing system: a single focused control is now tracked per UI root (OS window), and is saved/restored when switching between focused window. This means that you (ideally) only ever have a UI control focused on the current OS window.
### Internal
* `uitest2` is a new command that's like `uitest` but opens an OS window instead. It can also be passed an argument to open a specific tab immediately.
* Word-wrapping logic has been split off from `RichTextEntry`, into a new helper struct `WordWrap`.
* Some internal logic in `LineEdit` has been shared with `TextEdit` by moving it to a new `TextEditShared` file.
* SDL2 backend now uses `[UnmanagedCallersOnly]` instead of `GetFunctionPointerForDelegate`-style P/Invoke marshalling.
* Entity prototype reloading logic has been moved out of `PrototypeManager` and into a new `PrototypeReloadSystem`.
* Most usages of `IoCManager.` statically have been removed in favor of dependency injection.
## 0.62.1.0
### Bugfixes
* Fixed a PVS issue causing entities to be sent to clients without first sending their parents.
* Improved client-side state handling exception tolerance.
### Other
* Removed null-space map entities.
### Internal
* Added some more anchoring tests.
## 0.62.0.1
### Bugfixes
* Fixed sprites not animating when directly toggling layer visibility,
* Fixed anchored entities not being added to the anchored lookups.
## 0.62.0.0
### Breaking changes
* Removed some obsolete map event handlers.
### New features
* Added entity query struct enumerators
### Bugfixes
* Improved error tolerance during client state application.
* Added better error logs when a client deletes a predicted entity.
* Fixes command permissions not getting sent to clients.
* Fixes a broad-phase bug were entities were not properly updating their positions.
### Other
* Added the LocalizedCommands class, which automatically infer help and description loc strings from the commands name.
## 0.61.0.0
### Breaking changes
* IMap and IMapGrid have been removed. Just use the associated components directly.
### Other
* AudioSystem has been refactored.
## 0.60.0.0
### Breaking changes
* ISerializationHooks.BeforeSerialization() has been removed. Use custom type serializers instead.
### New features
* Added function to UserInterfaceSystem that returns list of BUIs that a client has open.
### Bugfixes
* Fixed various container related broadphase bugs which could result in entities getting stuck with a null-broadphase.
* Fixed client fixture state handling bug that caused the client to incorrectly disable collision.
### Other
* Misc PVS optimisations
### Internal
* Removed redundant grid-init physics logic
* Modified garbage collection for entity spawning profiling.
## 0.59.0.0
### Breaking changes
* Various transform related methods have been removed from MapGrids
* TransformSystem.SetCoordinates() arguments have changed and now allow an entity to be sent to nullspace
### Bugfixes
* Fixed an entity lookup bug that sometimes failed to return entities in StaticSundriesTrees
### Other
* The EntitySystem.Resolve<> methods have been change to protected
## 0.58.1.1
### Bugfixes
* Fixed some container shutdown errors
* Fixed LookupFlags.Static not acting as a full replacement for LookupFlags.Anchored
## 0.58.1.0
### Other
* Physics collision changed and body type changed events no longer get raised before initialisation
## 0.58.0.0
### Breaking changes
* Some TransformComponent functions have been moved to the system.
* Container insert, remove, and shutdown function arguments and functionality has changed.
* Physics entities without fixtures now automatically disable collision.
### New features
* Added command to profile entity spawning
### Bugfixes
* EntityLookup/BroadphaseComponent tracking has been overhauled, which should hopefully fix various broadphase bugs.
### Other
* Component.Owner is now marked as obsolete.
## 0.57.0.4
### Bugfixes
* Made entity deletion more resilient against exceptions. Should fix several bugs.
## 0.57.0.2 and 0.57.0.3
### Bugfixes
* Fixed more entity-lookup bugs.
## 0.57.0.1
### Bugfixes
* Fixed entity lookup bug that was causing crashes.
### 0.57.0.0
### Breaking changes
* EntityLookupComponent has been merged into BroadphaseComponent. The data that was previously stored in this tree is now stored across the 3 trees on BroadphaseComponent.
### New features
* EntityLookup has had its flags updated to reflect the merge of EntityLookupComponent and BroadphaseComponent, with the new flags reflecting each tree: Dynamic, Static, and Sundries. Dynamic and Static store physics bodies that are collidable and Sundries stores everything else (apart from grids).
### Internal
* EntityLookup and Broadphase have had their data de-duplicated, dropping the AABBs stored on the server by half. This also means MoveEvent updates will be much faster.
* PVS mover updates has had their performance improved slightly.
* Physics LinkedList nodes for contacts will no longer be re-made for every contact and will just be cleared when re-used.
* Sprite / Light dynamictree allocations on the client have been dropped by using static lambdas.
* The physics contact buffer for each FixtureProxy is now pooled.
## 0.56.1.1
### Bugfixes
* Fix PVS sometimes not sending an entity's parents.
* Fix velocity preservation on parenting changes.
## 0.56.1.0
### New features
* Update pt-BR locale with more localizations
* Separated PVS entity budget into an entity creation budget and a pvs-entry budget.
### Bugfixes
* Fix VV type handler removal.
* System errors during component removal should no longer result in undeletable entities.
### Other
* The ordering of component removals and shutdowns during entity deltion has changed (see #3355).
* Improved Box2Serializer
* Removed uses IEnumerables from EntityLookupSystem.
* Optimized client entity spawning by 15%.
* Modified how the rendering tree handles entity movement.
* Improved grid enumeration allocs.
* Fixed a bunch of build warnings (see #3329 and #3289 for details)
## 0.56.0.2
### Bugfixes
* Rename \_lib.ftl to \_engine_lib.ftl to avoid overwriting
## 0.56.0.1
### Bugfixes
* Fix instantiation of data records containing value types
## 0.56.0.0
### Breaking changes
* `CastShadows` moved to `SharedPointLightComponent` from clientside, now networked
### New features
* New type handler helpers added to V^3
* Added pt-BR locale
### Bugfixes
* Fixed audio fallback coords
### Other
* Improved PVS performance by using `for` over `forEach`
* Improved Vec2 inverse allocations
## 0.55.5.0
### New features
* Added a method to pass in physics transforms for getting nearest point.
### Bugfixes
* Prevent singular sprite matrices.
* Fix obsolete warnings in tests.
### Other
* Significantly reduce physics contact allocations.
## 0.55.4.1
### Breaking changes
* Removed `SI`, `SIoC`, `I`, `IoC`, `SE` and `CE` VV command prefixes.
* `SI`, `SIoC`, `I` and `IoC` are replaced by VV paths under `/ioc/` and `/c/ioc/`.
* `SE` and `CE` are replaced by VV paths under `/system/` and `/c/system`.
### New features
* Added CVars to control Lidgren's <abbr title="Maximum Transmission Unit">MTU</abbr> parameters:
* `net.mtu`
* `net.mtu_expand`
* `net.mtu_expand_frequency`
* `net.mtu_expand_fail_attempts`
* Added a whole load of features to ViewVariables.
* Added VV Paths, which allow you to refer to an object by a path, e.g. `/entity/1234/Transform/WorldPosition`
* Added VV Domains, which allow you to add "handlers" for the top-most VV Path segment, e.g. `/entity` is a domain and so is `/player`...
* Added VV Type Handlers, which allow you to add "custom paths" under specific types, even dynamically!
* Added VV Path networking, which allows you to read/write/invoke paths remotely, both from server to client and from client to server.
* Added `vvread`, `vvwrite` and `vvinvoke` commands, which allow you to read, write and invoke VV paths.
* Added autocompletion to all VV commands.
* Please note that the VV GUI still remains the same. It will be updated to use these new features in the future.
### Other
* Changed Lidgren to be compiled against `net6.0`. This unlocks `Half` read/write methods.
* Lidgren has been updated to [0.2.2](https://github.com/space-wizards/SpaceWizards.Lidgren.Network/blob/v0.2.2/RELEASE-NOTES.md). Not all the changes since 0.1.0 are new here, since this is the first version where we're properly tracking this in release notes.
* Robust.Client now uses our own [NFluidsynth](https://github.com/space-wizards/SpaceWizards.NFluidsynth) [nuget package](https://www.nuget.org/packages/SpaceWizards.NFluidsynth).
### Internal
* Renamed Lidgren's assembly to `SpaceWizards.Lidgren.Network`.
* Rogue `obj/` folders inside Lidgren no longer break the build.
* Renamed NFluidsynth's assembly to `SpaceWizards.NFluidsynth`

View File

@@ -0,0 +1,3 @@
- type: uiTheme
id: Default
path: /textures/interface/Default

View File

@@ -0,0 +1,63 @@
# Used internally by the THE() function.
zzzz-the = { PROPER($ent) ->
*[false] the { $ent }
[true] { $ent }
}
# Used internally by the SUBJECT() function.
zzzz-subject-pronoun = { GENDER($ent) ->
[male] he
[female] she
[epicene] they
*[neuter] it
}
# Used internally by the OBJECT() function.
zzzz-object-pronoun = { GENDER($ent) ->
[male] him
[female] her
[epicene] them
*[neuter] it
}
# Used internally by the POSS-PRONOUN() function.
zzzz-possessive-pronoun = { GENDER($ent) ->
[male] his
[female] hers
[epicene] theirs
*[neuter] its
}
# Used internally by the POSS-ADJ() function.
zzzz-possessive-adjective = { GENDER($ent) ->
[male] his
[female] her
[epicene] their
*[neuter] its
}
# Used internally by the REFLEXIVE() function.
zzzz-reflexive-pronoun = { GENDER($ent) ->
[male] himself
[female] herself
[epicene] themselves
*[neuter] itself
}
# Used internally by the CONJUGATE-BE() function.
zzzz-conjugate-be = { GENDER($ent) ->
[epicene] are
*[other] is
}
# Used internally by the CONJUGATE-HAVE() function.
zzzz-conjugate-have = { GENDER($ent) ->
[epicene] have
*[other] has
}
# Used internally by the CONJUGATE-BASIC() function.
zzzz-conjugate-basic = { GENDER($ent) ->
[epicene] { $first }
*[other] { $second }
}

View File

@@ -0,0 +1,16 @@
# Loc strings for various entity state & client-side PVS related commands
cmd-reset-ent-help = Usage: resetent <Entity UID>
cmd-reset-ent-desc = Reset an entity to the most recently received server state. This will also reset entities that have been detached to null-space.
cmd-reset-all-ents-help = Usage: resetallents
cmd-reset-all-ents-desc = Resets all entities to the most recently received server state. This only impacts entities that have not been detached to null-space.
cmd-detach-ent-help = Usage: detachent <Entity UID>
cmd-detach-ent-desc = Detach an entity to null-space, as if it had left PVS range.
cmd-local-delete-help = Usage: localdelete <Entity UID>
cmd-local-delete-desc = Deletes an entity. Unlike the normal delete command, this is CLIENT-SIDE. Unless the entity is a client-side entity, this will likely cause errors.
cmd-full-state-reset-help = Usage: fullstatereset
cmd-full-state-reset-desc = Discards any entity state information and requests a full-state from the server.

View File

@@ -1,10 +1,15 @@
### Localization for engine console commands
## generic
## generic command errors
cmd-invalid-arg-number-error = Invalid number of arguments.
cmd-parse-failure-integer = {$arg} is not a valid integer.
cmd-parse-failure-float = {$arg} is not a valid float.
cmd-parse-failure-bool = {$arg} is not a valid bool.
cmd-parse-failure-uid = {$arg} is not a valid entity UID.
cmd-parse-failure-mapid = {$arg} is not a valid MapId.
cmd-parse-failure-entity-exist = UID {$arg} does not correspond to an existing entity.
## 'help' command
@@ -124,6 +129,11 @@ cmd-monitor-minus-all-hint = Hides all monitors
cmd-monitor-plus-all-hint = Shows all monitors
## 'setambientlight' command
cmd-set-ambient-light-desc = Allows you to set the ambient light for the specified map, in SRGB.
cmd-set-ambient-light-help = setambientlight [mapid] [r g b a]
cmd-set-ambient-light-parse = Unable to parse args as a byte values for a color.
## Mapping commands
cmd-savemap-desc = Serializes a map to disk. Will not save a post-init map unless forced.
@@ -147,9 +157,379 @@ cmd-hint-loadmap-y-position = [y-position]
cmd-hint-loadmap-rotation = [rotation]
cmd-hint-loadmap-uids = [float]
cmd-hint-savebp-id = <Grid EntityID>
## 'flushcookies' command
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
cmd-flushcookies-desc = Flush CEF cookie storage to disk
cmd-flushcookies-help = This ensure cookies are properly saved to disk in the event of unclean shutdowns.
Note that the actual operation is asynchronous.
cmd-ldrsc-desc = Pre-caches a resource.
cmd-ldrsc-help = Usage: ldrsc <path> <type>
cmd-rldrsc-desc = Reloads a resource.
cmd-rldrsc-help = Usage: rldrsc <path> <type>
cmd-gridtc-desc = Gets the tile count of a grid.
cmd-gridtc-help = Usage: gridtc <gridId>
# Client-side commands
cmd-guidump-desc = Dump GUI tree to /guidump.txt in user data.
cmd-guidump-help = Usage: guidump
cmd-uitest-desc = Open a dummy UI testing window
cmd-uitest-help = Usage: uitest
## 'uitest2' command
cmd-uitest2-desc = Opens a UI control testing OS window
cmd-uitest2-help = Usage: uitest2 <tab>
cmd-uitest2-arg-tab = <tab>
cmd-uitest2-error-args = Expected at most one argument
cmd-uitest2-error-tab = Invalid tab: '{$value}'
cmd-uitest2-title = UITest2
cmd-setclipboard-desc = Sets the system clipboard
cmd-setclipboard-help = Usage: setclipboard <text>
cmd-getclipboard-desc = Gets the system clipboard
cmd-getclipboard-help = Usage: Getclipboard
cmd-togglelight-desc = Toggles light rendering.
cmd-togglelight-help = Usage: togglelight
cmd-togglefov-desc = Toggles fov for client.
cmd-togglefov-help = Usage: togglefov
cmd-togglehardfov-desc = Toggles hard fov for client. (for debugging space-station-14#2353)
cmd-togglehardfov-help = Usage: togglehardfov
cmd-toggleshadows-desc = Toggles shadow rendering.
cmd-toggleshadows-help = Usage: toggleshadows
cmd-togglelightbuf-desc = Toggles lighting rendering. This includes shadows but not FOV.
cmd-togglelightbuf-help = Usage: togglelightbuf
cmd-chunkinfo-desc = Gets info about a chunk under your mouse cursor.
cmd-chunkinfo-help = Usage: chunkinfo
cmd-rldshader-desc = Reloads all shaders.
cmd-rldshader-help = Usage: rldshader
cmd-cldbglyr-desc = Toggle fov and light debug layers.
cmd-cldbglyr-help= Usage: cldbglyr <layer>: Toggle <layer>
cldbglyr: Turn all Layers off
cmd-key-info-desc = Keys key info for a key.
cmd-key-info-help = Usage: keyinfo <Key>
## 'bind' command
cmd-bind-desc = Binds an input key combination to an input command.
cmd-bind-help = Usage: bind { cmd-bind-arg-key } { cmd-bind-arg-mode } { cmd-bind-arg-command }
Note that this DOES NOT automatically save bindings.
Use the 'svbind' command to save binding configuration.
cmd-bind-arg-key = <KeyName>
cmd-bind-arg-mode = <BindMode>
cmd-bind-arg-command = <InputCommand>
cmd-net-draw-interp-desc = Toggles the debug drawing of the network interpolation.
cmd-net-draw-interp-help = Usage: net_draw_interp
cmd-net-draw-interp-desc = Toggles the debug drawing of the network interpolation.
cmd-net-draw-interp-help = Usage: net_draw_interp
cmd-net-watch-ent-desc = Dumps all network updates for an EntityId to the console.
cmd-net-watch-ent-help = Usage: net_watchent <0|EntityUid>
cmd-net-refresh-desc = Requests a full server state.
cmd-net-refresh-help = Usage: net_refresh
cmd-net-entity-report-desc = Toggles the net entity report panel.
cmd-net-entity-report-help = Usage: net_entityreport
cmd-fill-desc = Fill up the console for debugging.
cmd-fill-help = Fills the console with some nonsense for debugging.
cmd-cls-desc = Clears the console.
cmd-cls-help = Clears the debug console of all messages.
cmd-sendgarbage-desc = Sends garbage to the server.
cmd-sendgarbage-help = The server will reply with 'no u'
cmd-loadgrid-desc = Loads a grid from a file into an existing map.
cmd-loadgrid-help = loadgrid <MapID> <Path> [x y] [rotation] [storeUids]
cmd-loc-desc = Prints the absolute location of the player's entity to console.
cmd-loc-help = loc
cmd-tpgrid-desc = Teleports a grid to a new location.
cmd-tpgrid-help = tpgrid <gridId> <X> <Y> [<MapId>]
cmd-rmgrid-desc = Removes a grid from a map. You cannot remove the default grid.
cmd-rmgrid-help = rmgrid <gridId>
cmd-mapinit-desc = Runs map init on a map.
cmd-mapinit-help = mapinit <mapID>
cmd-lsmap-desc = Lists maps.
cmd-lsmap-help = lsmap
cmd-lsgrid-desc = Lists grids.
cmd-lsgrid-help = lsgrid
cmd-addmap-desc = Adds a new empty map to the round. If the mapID already exists, this command does nothing.
cmd-addmap-help = addmap <mapID> [initialize]
cmd-rmmap-desc = Removes a map from the world. You cannot remove nullspace.
cmd-rmmap-help = rmmap <mapId>
cmd-savegrid-desc = Serializes a grid to disk.
cmd-savegrid-help = savegrid <gridID> <Path>
cmd-testbed-desc = Loads a physics testbed on the specified map.
cmd-testbed-help = testbed <mapid> <test>
cmd-saveconfig-desc = Saves the client configuration to the config file.
cmd-saveconfig-help = saveconfig
## 'flushcookies' command
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
cmd-flushcookies-desc = Flush CEF cookie storage to disk
cmd-flushcookies-help = This ensure cookies are properly saved to disk in the event of unclean shutdowns.
Note that the actual operation is asynchronous.
## 'addcomp' command
cmd-addcomp-desc = Adds a component to an entity.
cmd-addcomp-help = addcomp <uid> <componentName>
cmd-addcompc-desc = Adds a component to an entity on the client.
cmd-addcompc-help = addcompc <uid> <componentName>
## 'rmcomp' command
cmd-rmcomp-desc = Removes a component from an entity.
cmd-rmcomp-help = rmcomp <uid> <componentName>
cmd-rmcompc-desc = Removes a component from an entity on the client.
cmd-rmcompc-help = rmcomp <uid> <componentName>
## 'addview' command
cmd-addview-desc = Allows you to subscribe to an entity's view for debugging purposes.
cmd-addview-help = addview <entityUid>
cmd-addviewc-desc = Allows you to subscribe to an entity's view for debugging purposes.
cmd-addviewc-help = addview <entityUid>
## 'removeview' command
cmd-removeview-desc = Allows you to unsubscribe to an entity's view for debugging purposes.
cmd-removeview-help = removeview <entityUid>
## 'loglevel' command
cmd-loglevel-desc = Changes the log level for a provided sawmill.
cmd-loglevel-help = Usage: loglevel <sawmill> <level>
sawmill: A label prefixing log messages. This is the one you're setting the level for.
level: The log level. Must match one of the values of the LogLevel enum.
cmd-testlog-desc = Writes a test log to a sawmill.
cmd-testlog-help = Usage: testlog <sawmill> <level> <message>
sawmill: A label prefixing the logged message.
level: The log level. Must match one of the values of the LogLevel enum.
message: The message to be logged. Wrap this in double quotes if you want to use spaces.
## 'vv' command
cmd-vv-desc = Opens View Variables.
cmd-vv-help = Usage: vv <entity ID|IoC interface name|SIoC interface name>
## 'showvelocities' command
cmd-showvelocities-desc = Displays your angular and linear velocities.
cmd-showvelocities-help = Usage: showvelocities
## 'setinputcontext' command
cmd-setinputcontext-desc = Sets the active input context.
cmd-setinputcontext-help = Usage: setinputcontext <context>
## 'forall' command
cmd-forall-desc = Runs a command over all entities with a given component.
cmd-forall-help = Usage: forall <bql query> do <command...>
## 'delete' command
cmd-delete-desc = Deletes the entity with the specified ID.
cmd-delete-help = delete <entity UID>
# System commands
cmd-showtime-desc = Shows the server time.
cmd-showtime-help = showtime
cmd-restart-desc = Gracefully restarts the server (not just the round).
cmd-restart-help = restart
cmd-shutdown-desc = Gracefully shuts down the server.
cmd-shutdown-help = shutdown
cmd-saveconfig-desc = Saves the server configuration to the config file.
cmd-saveconfig-help = saveconfig
cmd-netaudit-desc = Prints into about NetMsg security.
cmd-netaudit-help = netaudit
# Player commands
cmd-tp-desc = Teleports a player to any location in the round.
cmd-tp-help = tp <x> <y> [<mapID>]
cmd-tpto-desc = Teleports the current player or the specified players/entities to the location of last player/entity specified.d.
cmd-tpto-help = tpto <username|uid> [username|uid]...
cmd-listplayers-desc = Lists all players currently connected.
cmd-listplayers-help = listplayers
cmd-kick-desc = Kicks a connected player out of the server, disconnecting them.
cmd-kick-help = kick <PlayerIndex> [<Reason>]
# Spin command
cmd-spin-desc = Causes an entity to spin. Default entity is the attached player's parent.
cmd-spin-help = spin velocity [drag] [entityUid]
# Localization command
cmd-rldloc-desc = Reloads localization (client & server).
cmd-rldloc-help = Usage: rldloc
# Debug entity controls
cmd-spawn-desc = Spawns an entity with specific type.
cmd-spawn-help = spawn <prototype> OR spawn <prototype> <relative entity ID> OR spawn <prototype> <x> <y>
cmd-cspawn-desc = Spawns a client-side entity with specific type at your feet.
cmd-cspawn-help = cspawn <entity type>
cmd-scale-desc = Increases or decreases an entity's size naively.
cmd-scale-help = scale <entityUid> <float>
cmd-dumpentities-desc = Dump entity list.
cmd-dumpentities-help = Dumps entity list of UIDs and prototype.
cmd-getcomponentregistration-desc = Gets component registration information.
cmd-getcomponentregistration-help = Usage: getcomponentregistration <componentName>
cmd-showrays-desc = Toggles debug drawing of physics rays. An integer for <raylifetime> must be provided.
cmd-showrays-help = Usage: showrays <raylifetime>
cmd-disconnect-desc = Immediately disconnect from the server and go back to the main menu.
cmd-disconnect-help = Usage: disconnect
cmd-entfo-desc = Displays verbose diagnostics for an entity.
cmd-entfo-help = Usage: entfo <entityuid>
The entity UID can be prefixed with 'c' to convert it to a client entity UID.
cmd-fuck-desc = Throws an exception
cmd-fuck-help = Throws an exception
cmd-showpos-desc = Enables debug drawing over all entity positions in the game.
cmd-showpos-help = Usage: showpos
cmd-sggcell-desc = Lists entities on a snap grid cell.
cmd-sggcell-help = Usage: sggcell <gridID> <vector2i>\nThat vector2i param is in the form x<int>,y<int>.
cmd-overrideplayername-desc = Changes the name used when attempting to connect to the server.
cmd-overrideplayername-help = Usage: overrideplayername <name>
cmd-showanchored-desc = Shows anchored entities on a particular tile
cmd-showanchored-help = Usage: showanchored
cmd-dmetamem-desc = Dumps a type's members in a format suitable for the sandbox configuration file.
cmd-dmetamem-help = Usage: dmetamem <type>
cmd-dmetamem-desc = Displays chunk bounds for the purposes of rendering.
cmd-dmetamem-help = Usage: showchunkbb <type>
cmd-launchauth-desc = Load authentication tokens from launcher data to aid in testing of live servers.
cmd-launchauth-help = Usage: launchauth <account name>
cmd-lightbb-desc = Toggles whether to show light bounding boxes.
cmd-lightbb-help = Usage: lightbb
cmd-monitorinfo-desc = Monitors info
cmd-monitorinfo-help = Usage: monitorinfo <id>
cmd-setmonitor-desc = Set monitor
cmd-setmonitor-help = Usage: setmonitor <id>
cmd-physics-desc = Shows a debug physics overlay. The arg supplied specifies the overlay.
cmd-physics-help = Usage: physics <aabbs / com / contactnormals / contactpoints / distance / joints / shapeinfo / shapes>
cmd-hardquit-desc = Kills the game client instantly.
cmd-hardquit-help = Kills the game client instantly, leaving no traces. No telling the server goodbye.
cmd-quit-desc = Shuts down the game client gracefully.
cmd-quit-help = Properly shuts down the game client, notifying the connected server and such.
cmd-csi-desc = Opens a C# interactive console.
cmd-csi-help = Usage: csi
cmd-scsi-desc = Opens a C# interactive console on the server.
cmd-scsi-help = Usage: scsi
cmd-watch-desc = Opens a variable watch window.
cmd-watch-help = Usage: watch
cmd-showspritebb-desc = Toggle whether sprite bounds are shown
cmd-showspritebb-help = Usage: showspritebb
cmd-togglelookup-desc = Shows / hides entitylookup bounds via an overlay.
cmd-togglelookup-help = Usage: togglelookup
cmd-net_entityreport-desc = Toggles the net entity report panel.
cmd-net_entityreport-help = Usage: net_entityreport
cmd-net_refresh-desc = Requests a full server state.
cmd-net_refresh-help = Usage: net_refresh
cmd-net_graph-desc = Toggles the net statistics pannel.
cmd-net_graph-help = Usage: net_graph
cmd-net_watchent-desc = Dumps all network updates for an EntityId to the console.
cmd-net_watchent-help = Usage: net_watchent <0|EntityUid>
cmd-net_draw_interp-desc = Toggles the debug drawing of the network interpolation.
cmd-net_draw_interp-help = Usage: net_draw_interp <0|EntityUid>
cmd-vram-desc = Displays video memory usage statics by the game.
cmd-vram-help = Usage: vram
cmd-showislands-desc = Shows the current physics bodies involved in each physics island.
cmd-showislands-help = Usage: showislands
cmd-showgridnodes-desc = Shows the nodes for grid split purposes.
cmd-showgridnodes-help = Usage: showgridnodes
cmd-profsnap-desc = Make a profiling snapshot.
cmd-profsnap-help = Usage: profsnap
cmd-devwindow-desc = Dev Window
cmd-devwindow-help = Usage: devwindow
cmd-devwindow-desc = Open file
cmd-devwindow-help = Usage: testopenfile
cmd-scene-desc = Immediately changes the UI scene/state.
cmd-scene-help = Usage: scene <className>
cmd-szr_stats-desc = Report serializer statistics.
cmd-szr_stats-help = Usage: szr_stats
cmd-hwid-desc = Returns the current HWID (HardWare ID).
cmd-hwid-help = Usage: hwid
cmd-vvread-desc = Retrieve a path's value using VV (View Variables).
cmd-vvread-desc = Usage: vvread <path>
cmd-vvwrite-desc = Modify a path's value using VV (View Variables).
cmd-vvwrite-desc = Usage: vvwrite <path>
cmd-vv-desc = Opens View Variables (VV).
cmd-vv-desc = Usage: vv <path|entity ID|guihover>
cmd-vvinvoke-desc = Invoke/Call a path with arguments using VV.
cmd-vvinvoke-desc = Usage: vvinvoke <path> [arguments...]
cmd-dump_dependency_injectors-desc = Dump IoCManager's dependency injector cache.
cmd-dump_dependency_injectors-help = Usage: dump_dependency_injectors
cmd-dump_dependency_injectors-total-count = Total count: { $total }

View File

@@ -1 +1 @@
midi-panic-command-description = Turns off every note for every active MIDI renderer.
cmd-midipanic-desc = Turns off every note for every active MIDI renderer.

View File

@@ -0,0 +1,63 @@
# Used internally by the THE() function.
zzzz-the = { PROPER($ent) ->
*[false] a { $ent }
[true] { $ent }
}
# Used internally by the SUBJECT() function.
zzzz-subject-pronoun = { GENDER($ent) ->
[male] ele
[female] ela
[epicene] eles
*[neuter] ele
}
# Used internally by the OBJECT() function.
zzzz-object-pronoun = { GENDER($ent) ->
[male] ele
[female] ela
[epicene] eles
*[neuter] isso
}
# Used internally by the POSS-PRONOUN() function.
zzzz-possessive-pronoun = { GENDER($ent) ->
[male] dele
[female] dela
[epicene] deles
*[neuter] dele
}
# Used internally by the POSS-ADJ() function.
zzzz-possessive-adjective = { GENDER($ent) ->
[male] dele
[female] dela
[epicene] deles
*[neuter] dele
}
# Used internally by the REFLEXIVE() function.
zzzz-reflexive-pronoun = { GENDER($ent) ->
[male] ele mesmo
[female] ela mesmo
[epicene] eles mesmos
*[neuter] ele mesmo
}
# Used internally by the CONJUGATE-BE() function.
zzzz-conjugate-be = { GENDER($ent) ->
[epicene] é
*[other] é
}
# Used internally by the CONJUGATE-HAVE() function.
zzzz-conjugate-have = { GENDER($ent) ->
[epicene] tenho
*[other] tem
}
# Used internally by the CONJUGATE-BASIC() function.
zzzz-conjugate-basic = { GENDER($ent) ->
[epicene] { $first }
*[other] { $second }
}

View File

@@ -0,0 +1,16 @@
# Strings Loc para vários comandos relacionados ao estado da entidade e ao PVS do lado do cliente
cmd-reset-ent-help = Uso: resetent <Entity UID>
cmd-reset-ent-desc = Redefina uma entidade para o estado do servidor recebido mais recentemente. Isso também redefinirá as entidades que foram desanexadas para espaço nulo.
cmd-reset-all-ents-help = Uso: resetallents
cmd-reset-all-ents-desc = Redefine todas as entidades para o estado do servidor recebido mais recentemente. Isso afeta apenas as entidades que não foram desanexadas ao espaço nulo.
cmd-detach-ent-help = Uso: detachent <Entity UID>
cmd-detach-ent-desc = Desanexar uma entidade para espaço nulo, como se tivesse saído do intervalo PVS.
cmd-local-delete-help = Uso: localdelete <Entity UID>
cmd-local-delete-desc = Exclui uma entidade. Ao contrário do comando delete normal, este é CLIENT-SIDE. A menos que a entidade seja uma entidade do lado do cliente, isso provavelmente causará erros.
cmd-full-state-reset-help = Uso: fullstatereset
cmd-full-state-reset-desc = Descarta qualquer informação de estado da entidade e solicita um estado completo do servidor.

View File

@@ -0,0 +1,161 @@
### Localization for engine console commands
## generic
cmd-invalid-arg-number-error = Número inválido de argumentos.
cmd-parse-failure-integer = {$arg} não é um inteiro válido.
cmd-parse-failure-float = {$arg} não é um float válido.
cmd-parse-failure-bool = {$arg} não é um booleano válido.
cmd-parse-failure-uid = {$arg} não é um UID de entidade válido.
cmd-parse-failure-entity-exist = UID {$arg} não corresponde a uma entidade existente.
## 'help' command
cmd-help-desc = Exibir ajuda geral ou texto de ajuda para um comando específico
cmd-help-help = Uso: help [command name]
Quando nenhum nome de comando é fornecido, exibe o texto de ajuda geral. Se um nome de comando for fornecido, exibe o texto de ajuda para esse comando.
cmd-help-no-args = Para exibir a ajuda de um comando específico, escreva 'help <command>'. Para listar todos os comandos disponíveis, escreva 'list'. Para procurar comandos, use 'list <filter>'.
cmd-help-unknown = Comando desconhecido: { $command }
cmd-help-top = { $command } - { $description }
cmd-help-invalid-args = Quantidade de argumentos inválida.
cmd-help-arg-cmdname = [command name]
## 'cvar' command
cmd-cvar-desc = Obtém ou define um CVar.
cmd-cvar-help = Uso: cvar <name | ?> [value]
Se um valor for passado, o valor será analisado e armazenado como o novo valor do CVar.
Caso contrário, o valor atual do CVar é exibido.
Use 'cvar ?' para obter uma lista de todos os CVars registrados.
cmd-cvar-invalid-args = Deve fornecer exatamente um ou dois argumentos.
cmd-cvar-not-registered = CVar '{ $cvar }' não está registrado. Use 'cvar ?' para obter uma lista de todos os CVars registrados.
cmd-cvar-parse-error = O valor de entrada está no formato incorreto para o tipo { $type }
cmd-cvar-compl-list = Listar CVars disponíveis
cmd-cvar-arg-name = <name | ?>
cmd-cvar-value-hidden = <value hidden>
## 'list' command
cmd-list-desc = Lista os comandos disponíveis, com filtro de pesquisa opcional
cmd-list-help = Uso: list [filter]
Lista todos os comandos disponíveis. Se um argumento for fornecido, ele será usado para filtrar comandos por nome.
cmd-list-heading = NOME DESC{"\u000A"}-------------------------{"\u000A"}
cmd-list-arg-filter = [filter]
## '>' command, aka remote exec
cmd-remoteexec-desc = Executa comandos do lado do servidor
cmd-remoteexec-help = Uso: > <command> [arg] [arg] [arg...]
Executa um comando no servidor. Isso é necessário se um comando com o mesmo nome existir no cliente, pois a simples execução do comando executaria o comando do cliente primeiro.
## 'gc' command
cmd-gc-desc = Execute o GC (coletor de lixo)
cmd-gc-help = Uso: gc [generation]
Usa GC.Collect() para executar o Garbage Collector.
Se um argumento for fornecido, ele será analisado como um número de geração do GC e GC.Collect(int) será usado.
Use o comando 'gfc' para fazer um GC completo compactando LOH.
cmd-gc-failed-parse = Falha ao analisar o argumento.
cmd-gc-arg-generation = [generation]
## 'gcf' command
cmd-gcf-desc = Execute o GC, totalmente, compactando LOH e tudo.
cmd-gcf-help = Uso: gcf
Faz um GC.Collect(2, GCCollectionMode.Forced, true, true) completo enquanto também compacta LOH.
Isso provavelmente será bloqueado por centenas de milissegundos, esteja avisado.
## 'gc_mode' command
cmd-gc_mode-desc = Alterar/ler o modo de latência do GC
cmd-gc_mode-help = Uso: gc_mode [type]
Se nenhum argumento for fornecido, retornará o modo de latência do GC atual.
Se um argumento for passado, ele será analisado como GCLatencyMode e definido como o modo de latência do GC.
cmd-gc_mode-current = modo de latência atual do gc: { $prevMode }
cmd-gc_mode-possible = modos possíveis:
cmd-gc_mode-option = - { $mode }
cmd-gc_mode-unknown = modo de latência gc desconhecido: { $arg }
cmd-gc_mode-attempt = tentando alterar o modo de latência do gc: { $prevMode } -> { $mode }
cmd-gc_mode-result = modo de latência gc resultante: { $mode }
cmd-gc_mode-arg-type = [type]
## 'mem' command
cmd-mem-desc = Imprime informações de memória gerenciada
cmd-mem-help = Uso: mem
cmd-mem-report = Tamanho da pilha: { TOSTRING($heapSize, "N0") }
Total alocado: { TOSTRING($totalAllocated, "N0") }
## 'physics' command
cmd-physics-overlay = {$overlay} não é uma sobreposição reconhecida
## 'lsasm' command
cmd-lsasm-desc = Lista assemblies carregados por contexto de carregamento
cmd-lsasm-help = Uso: lsasm
## 'exec' command
cmd-exec-desc = Executa um arquivo de script dos dados de usuário graváveis do jogo
cmd-exec-help = Uso: exec <fileName>
Cada linha no arquivo é executada como um único comando, a menos que comece com um #
cmd-exec-arg-filename = <fileName>
## 'dump_net_comps' command
cmd-dump_net_comps-desc = Imprime a tabela de componentes em rede.
cmd-dump_net_comps-help = Uso: dump_net-comps
cmd-dump_net_comps-error-writeable = Registro ainda gravável, IDs de rede não foram gerados.
cmd-dump_net_comps-header = Registros de componentes em rede:
## 'dump_event_tables' command
cmd-dump_event_tables-desc = Imprime tabelas de eventos direcionados para uma entidade.
cmd-dump_event_tables-help = Uso: dump_event_tables <entityUid>
cmd-dump_event_tables-missing-arg-entity = Argumento de entidade ausente
cmd-dump_event_tables-error-entity = Entidade inválida
cmd-dump_event_tables-arg-entity = <entityUid>
## 'monitor' command
cmd-monitor-desc = Alterna um monitor de depuração no menu F3.
cmd-monitor-help = Uso: monitor <name>
Os monitores possíveis são: { $monitors }
Você também pode usar os valores especiais "-all" e "+all" para ocultar ou mostrar todos os monitores, respectivamente.
cmd-monitor-arg-monitor = <monitor>
cmd-monitor-invalid-name = Nome do monitor inválido
cmd-monitor-arg-count = Argumento do monitor ausente
cmd-monitor-minus-all-hint = Esconde todos os monitores
cmd-monitor-plus-all-hint = Mostra todos os monitores
## Mapping commands
cmd-savemap-desc = Serializa um mapa para o disco. Não salvará um mapa pós-inicialização a menos que seja forçado.
cmd-savemap-help = savemap <MapID> <Path> [force]
cmd-savemap-not-exist = O mapa de destino não existe.
cmd-savemap-init-warning = Tentativa de salvar um mapa pós-inicialização sem forçar o salvamento.
cmd-savemap-attempt = Tentando salvar o mapa {$mapId} em {$path}.
cmd-savemap-success = Mapa salvo com sucesso.
cmd-hint-savemap-id = <MapID>
cmd-hint-savemap-path = <Path>
cmd-hint-savemap-force = [bool]
cmd-loadmap-desc = Carrega um mapa do disco para o jogo.
cmd-loadmap-help = loadmap <MapID> <Path> [x] [y] [rotation] [consistentUids]
cmd-loadmap-nullspace = Você não pode carregar no mapa 0.
cmd-loadmap-exists = Mapa {$mapId} já existe.
cmd-loadmap-success = Mapa {$mapId} foi carregado em {$path}.
cmd-loadmap-error = Ocorreu um erro ao carregar o mapa de {$path}.
cmd-hint-loadmap-x-position = [x-position]
cmd-hint-loadmap-y-position = [y-position]
cmd-hint-loadmap-rotation = [rotation]
cmd-hint-loadmap-uids = [float]
cmd-hint-savebp-id = <Grid EntityID>
## 'flushcookies' command
# Note: the flushcookies command is from Robust.Client.WebView, it's not in the main engine code.
cmd-flushcookies-desc = Liberar o armazenamento de cookies CEF para o disco
cmd-flushcookies-help = Isso garante que os cookies sejam salvos corretamente no disco no caso de desligamentos impróprios.
Observe que a operação real é assíncrona.

View File

@@ -0,0 +1,10 @@
color-selector-sliders-red = R
color-selector-sliders-green = G
color-selector-sliders-blue = B
color-selector-sliders-hue = H
color-selector-sliders-saturation = S
color-selector-sliders-value = V
color-selector-sliders-alpha = A
color-selector-sliders-rgb = RGB
color-selector-sliders-hsv = HSV

View File

@@ -0,0 +1,11 @@
## EntitySpawnWindow
entity-spawn-window-title = Painel de Criação de Entidade
entity-spawn-window-search-bar-placeholder = pesquisar
entity-spawn-window-clear-button = Limpar
entity-spawn-window-erase-button-text = Modo Apagar
entity-spawn-window-override-menu-tooltip = Substituir posicionamento
## Console
console-line-edit-placeholder = Comando aqui

View File

@@ -0,0 +1 @@
defaultwindow-placeholder-title = Exemplo de título de janela aqui

View File

@@ -0,0 +1,54 @@
input-key-Escape = Escape
input-key-Control = Control
input-key-Shift = Shift
input-key-Alt = Alt
input-key-Menu = Menu
input-key-F1 = F1
input-key-F2 = F2
input-key-F3 = F3
input-key-F4 = F4
input-key-F5 = F5
input-key-F6 = F6
input-key-F7 = F7
input-key-F8 = F8
input-key-F9 = F9
input-key-F10 = F10
input-key-F11 = F11
input-key-F12 = F12
input-key-F13 = F13
input-key-F14 = F14
input-key-F15 = F15
input-key-Pause = Pause
input-key-Left = Left
input-key-Up = Up
input-key-Down = Down
input-key-Right = Right
input-key-Space = Space
input-key-Return = Return
input-key-NumpadEnter = Num Enter
input-key-BackSpace = Backspace
input-key-Tab = Tab
input-key-PageUp = Page Up
input-key-PageDown = Page Down
input-key-End = End
input-key-Home = Home
input-key-Insert = Insert
input-key-Delete = Delete
input-key-MouseLeft = Mouse Left
input-key-MouseRight = Mouse Right
input-key-MouseMiddle = Mouse Middle
input-key-MouseButton4 = Mouse 4
input-key-MouseButton5 = Mouse 5
input-key-MouseButton6 = Mouse 6
input-key-MouseButton7 = Mouse 7
input-key-MouseButton8 = Mouse 8
input-key-MouseButton9 = Mouse 9
input-key-LSystem-win = Left Win
input-key-RSystem-win = Right Win
input-key-LSystem-mac = Left Cmd
input-key-RSystem-mac = Right Cmd
input-key-LSystem-linux = Left Meta
input-key-RSystem-linux = Right Meta
input-key-unknown = <unknown key>

View File

@@ -0,0 +1 @@
cmd-midipanic-desc = Desliga cada nota para cada renderizador MIDI ativo.

View File

@@ -0,0 +1 @@
tab-container-not-tab-title-provided = Sem título

View File

@@ -0,0 +1,11 @@
## ViewVariablesInstanceEntity
view-variable-instance-entity-server-components-add-component-button-placeholder = Adicionar Componente
view-variable-instance-entity-client-variables-tab-title = Variávies do Cliente
view-variable-instance-entity-client-components-tab-title = Componentes do Cliente
view-variable-instance-entity-server-variables-tab-title = Variávies do Servidor
view-variable-instance-entity-server-components-tab-title = Componentes do Servidor
view-variable-instance-entity-client-components-search-bar-placeholder = Pesquisar
view-variable-instance-entity-server-components-search-bar-placeholder = Pesquisar
view-variable-instance-entity-add-window-server-components = Adicionar Componente [S]
view-variable-instance-entity-add-window-client-components = Adicionar Componente [C]

View File

@@ -9,6 +9,14 @@ public static class Diagnostics
public const string IdAccess = "RA0002";
public const string IdExplicitVirtual = "RA0003";
public const string IdTaskResult = "RA0004";
public const string IdUseGenericVariant = "RA0005";
public const string IdUseGenericVariantInvalidUsage = "RA0006";
public const string IdUseGenericVariantAttributeValueError = "RA0007";
public const string IdNotNullableFlagNotSet = "RA0008";
public const string IdInvalidNotNullableFlagValue = "RA0009";
public const string IdInvalidNotNullableFlagImplementation = "RA0010";
public const string IdInvalidNotNullableFlagType = "RA0011";
public const string IdNotNullableFlagValueType = "RA0012";
public static SuppressionDescriptor MeansImplicitAssignment =>
new SuppressionDescriptor("RADC1000", "CS0649", "Marked as implicitly assigned.");

View File

@@ -0,0 +1,171 @@
using System.Collections.Immutable;
using System.Linq;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
namespace Robust.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public sealed class NotNullableFlagAnalyzer : DiagnosticAnalyzer
{
private const string Attribute = "Robust.Shared.Analyzers.NotNullableFlagAttribute";
private static readonly DiagnosticDescriptor NotNullableNotSetRule = new (
Diagnostics.IdNotNullableFlagNotSet,
"Not Nullable Flag not set",
"Class type parameter {0} is not annotated as nullable and notNullableOverride is not set to true",
"Usage",
DiagnosticSeverity.Error,
true,
"Assign true to notNullableOverride or specify the type parameter as nullable.");
private static readonly DiagnosticDescriptor InvalidNotNullableValueRule = new (
Diagnostics.IdInvalidNotNullableFlagValue,
"Not Nullable Flag wrongfully set",
"Class type parameter {0} is annotated as nullable but notNullableOverride is set to true",
"Usage",
DiagnosticSeverity.Error,
true,
"Remove the true assignment to notNullableOverride or remove the nullable specifier of the type parameter.");
private static readonly DiagnosticDescriptor InvalidNotNullableImplementationRule = new (
Diagnostics.IdInvalidNotNullableFlagImplementation,
"Invalid NotNullable flag implementation.",
"NotNullable flag is either not typed as bool, or does not have a default value equaling false",
"Usage",
DiagnosticSeverity.Error,
true,
"Ensure that the notNullable flag is typed bool and has false set as a default value.");
private static readonly DiagnosticDescriptor InvalidNotNullableTypeRule = new (
Diagnostics.IdInvalidNotNullableFlagType,
"Failed to resolve type parameter",
"Failed to resolve type parameter \"{0}\".",
"Usage",
DiagnosticSeverity.Error,
true,
"Use nameof to avoid typos.");
private static readonly DiagnosticDescriptor NotNullableFlagValueTypeRule = new (
Diagnostics.IdNotNullableFlagValueType,
"NotNullable flag not supported for value types.",
"Value types as generic arguments are not supported for NotNullable flags",
"Usage",
DiagnosticSeverity.Error,
true,
"Nullable value types are distinct at runtime when inspected with reflection. Therefore they are not supported for NotNullable flags.");
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics =>
ImmutableArray.Create(
NotNullableNotSetRule,
InvalidNotNullableValueRule,
InvalidNotNullableImplementationRule,
InvalidNotNullableTypeRule,
NotNullableFlagValueTypeRule);
public override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
context.EnableConcurrentExecution();
context.RegisterOperationAction(CheckNotNullableFlag, OperationKind.Invocation);
}
private bool TryGetTypeArgument(IMethodSymbol methodSymbol, string typeParamName, out ITypeSymbol typeArgument)
{
for (var index = 0; index < methodSymbol.TypeParameters.Length; index++)
{
if (methodSymbol.TypeParameters[index].Name != typeParamName)
continue;
typeArgument = methodSymbol.TypeArguments[index];
return true;
}
typeArgument = null;
return false;
}
private void CheckNotNullableFlag(OperationAnalysisContext context)
{
if (context.Operation is not IInvocationOperation invocationOperation || !invocationOperation.TargetMethod.IsGenericMethod)
return;
var attribute = context.Compilation.GetTypeByMetadataName(Attribute);
var @bool = context.Compilation.GetSpecialType(SpecialType.System_Boolean);
foreach (var argument in invocationOperation.Arguments)
{
if(argument.Parameter == null) continue;
foreach (var attributeData in argument.Parameter.GetAttributes())
{
if (!SymbolEqualityComparer.Default.Equals(attributeData.AttributeClass, attribute))
continue;
if (!SymbolEqualityComparer.Default.Equals(argument.Parameter.Type, @bool) ||
!argument.Parameter.HasExplicitDefaultValue ||
argument.Parameter.ExplicitDefaultValue as bool? != false)
{
context.ReportDiagnostic(Diagnostic.Create(
InvalidNotNullableImplementationRule,
argument.Parameter.Locations[0]));
break;
}
if (!TryGetTypeArgument(invocationOperation.TargetMethod,
attributeData.ConstructorArguments[0].Value as string, out var typeArgument))
{
context.ReportDiagnostic(Diagnostic.Create(
InvalidNotNullableTypeRule,
argument.Parameter.Locations[0],
attributeData.ConstructorArguments[0].Value as string));
break;
}
//until i find a way to implement it sanely, generic calls are exempt from this attribute
if(typeArgument is ITypeParameterSymbol) break;
//dont ask me why, argument.ConstantValue just straight up doesnt work.
//i still kept it in here as a fallback, incase it ever starts working again lol -<paul
var constantValue = (argument.Value as ILiteralOperation)?.ConstantValue ?? argument.ConstantValue;
if (typeArgument.IsValueType)
{
if (argument.ArgumentKind != ArgumentKind.DefaultValue)
{
//todo diagnostic only use for struct types
context.ReportDiagnostic(Diagnostic.Create(
NotNullableFlagValueTypeRule,
argument.Syntax.GetLocation()));
}
break;
}
if (typeArgument.NullableAnnotation == NullableAnnotation.None ||
(argument.ArgumentKind != ArgumentKind.DefaultValue && !constantValue.HasValue))
break;
var flagValue = argument.ArgumentKind != ArgumentKind.DefaultValue ||
constantValue.Value as bool? == true;
var nullable = typeArgument.NullableAnnotation == NullableAnnotation.Annotated;
if (nullable && flagValue)
{
context.ReportDiagnostic(Diagnostic.Create(InvalidNotNullableValueRule,
argument.Syntax.GetLocation(),
typeArgument));
}
else if (!nullable && !flagValue)
{
context.ReportDiagnostic(Diagnostic.Create(NotNullableNotSetRule,
argument.Syntax.GetLocation(),
typeArgument));
}
break;
}
}
}
}

View File

@@ -0,0 +1,238 @@
using System;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.CodeActions;
using Microsoft.CodeAnalysis.CodeFixes;
using Microsoft.CodeAnalysis.CSharp;
using Microsoft.CodeAnalysis.CSharp.Syntax;
using Microsoft.CodeAnalysis.Diagnostics;
using Microsoft.CodeAnalysis.Operations;
namespace Robust.Analyzers;
[DiagnosticAnalyzer(LanguageNames.CSharp)]
public sealed class PreferGenericVariantAnalyzer : DiagnosticAnalyzer
{
private const string AttributeType = "Robust.Shared.Analyzers.PreferGenericVariantAttribute";
public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics => ImmutableArray.Create(
UseGenericVariantDescriptor, UseGenericVariantInvalidUsageDescriptor,
UseGenericVariantAttributeValueErrorDescriptor);
private static readonly DiagnosticDescriptor UseGenericVariantDescriptor = new(
Diagnostics.IdUseGenericVariant,
"Consider using the generic variant of this method",
"Consider using the generic variant of this method to avoid potential allocations",
"Usage",
DiagnosticSeverity.Warning,
true,
"Consider using the generic variant of this method to avoid potential allocations.");
private static readonly DiagnosticDescriptor UseGenericVariantInvalidUsageDescriptor = new(
Diagnostics.IdUseGenericVariantInvalidUsage,
"Invalid generic variant provided",
"Generic variant provided mismatches the amount of type parameters of non-generic variant",
"Usage",
DiagnosticSeverity.Error,
true,
"The non-generic variant should have at least as many type parameter at the beginning of the method as there are generic type parameters on the generic variant.");
private static readonly DiagnosticDescriptor UseGenericVariantAttributeValueErrorDescriptor = new(
Diagnostics.IdUseGenericVariantAttributeValueError,
"Failed resolving generic variant value",
"Failed resolving generic variant value: {0}",
"Usage",
DiagnosticSeverity.Error,
true,
"Consider using nameof to avoid any typos.");
public override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.ReportDiagnostics | GeneratedCodeAnalysisFlags.Analyze);
context.EnableConcurrentExecution();
context.RegisterOperationAction(CheckForGenericVariant, OperationKind.Invocation);
}
private void CheckForGenericVariant(OperationAnalysisContext obj)
{
if(obj.Operation is not IInvocationOperation invocationOperation) return;
var preferGenericAttribute = obj.Compilation.GetTypeByMetadataName(AttributeType);
string genericVariant = null;
AttributeData foundAttribute = null;
foreach (var attribute in invocationOperation.TargetMethod.GetAttributes())
{
if (!SymbolEqualityComparer.Default.Equals(attribute.AttributeClass, preferGenericAttribute))
continue;
genericVariant = attribute.ConstructorArguments[0].Value as string ?? invocationOperation.TargetMethod.Name;
foundAttribute = attribute;
break;
}
if(genericVariant == null) return;
var maxTypeParams = 0;
var typeTypeSymbol = obj.Compilation.GetTypeByMetadataName("System.Type");
foreach (var parameter in invocationOperation.TargetMethod.Parameters)
{
if(!SymbolEqualityComparer.Default.Equals(parameter.Type, typeTypeSymbol)) break;
maxTypeParams++;
}
if (maxTypeParams == 0)
{
obj.ReportDiagnostic(
Diagnostic.Create(UseGenericVariantInvalidUsageDescriptor,
foundAttribute.ApplicationSyntaxReference?.GetSyntax().GetLocation()));
return;
}
IMethodSymbol genericVariantMethod = null;
foreach (var member in invocationOperation.TargetMethod.ContainingType.GetMembers())
{
if (member is not IMethodSymbol methodSymbol
|| methodSymbol.Name != genericVariant
|| !methodSymbol.IsGenericMethod
|| methodSymbol.TypeParameters.Length > maxTypeParams
|| methodSymbol.Parameters.Length > invocationOperation.TargetMethod.Parameters.Length - methodSymbol.TypeParameters.Length
) continue;
var typeParamCount = methodSymbol.TypeParameters.Length;
var failedParamComparison = false;
var objType = obj.Compilation.GetSpecialType(SpecialType.System_Object);
for (int i = 0; i < methodSymbol.Parameters.Length; i++)
{
if (methodSymbol.Parameters[i].Type is ITypeParameterSymbol && SymbolEqualityComparer.Default.Equals(invocationOperation.TargetMethod.Parameters[i + typeParamCount].Type, objType))
continue;
if (!SymbolEqualityComparer.Default.Equals(methodSymbol.Parameters[i].Type,
invocationOperation.TargetMethod.Parameters[i + typeParamCount].Type))
{
failedParamComparison = true;
break;
}
}
if(failedParamComparison) continue;
genericVariantMethod = methodSymbol;
}
if (genericVariantMethod == null)
{
obj.ReportDiagnostic(Diagnostic.Create(
UseGenericVariantAttributeValueErrorDescriptor,
foundAttribute.ApplicationSyntaxReference?.GetSyntax().GetLocation(),
genericVariant));
return;
}
var typeOperands = new string[genericVariantMethod.TypeParameters.Length];
for (var i = 0; i < genericVariantMethod.TypeParameters.Length; i++)
{
switch (invocationOperation.Arguments[i].Value)
{
//todo figure out if ILocalReferenceOperation, IPropertyReferenceOperation or IFieldReferenceOperation is referencing static typeof assignments
case ITypeOfOperation typeOfOperation:
typeOperands[i] = typeOfOperation.TypeOperand.ToDisplayString(SymbolDisplayFormat.FullyQualifiedFormat);
continue;
default:
return;
}
}
obj.ReportDiagnostic(Diagnostic.Create(
UseGenericVariantDescriptor,
invocationOperation.Syntax.GetLocation(),
ImmutableDictionary.CreateRange(new Dictionary<string, string>()
{
{"typeOperands", string.Join(",", typeOperands)}
})));
}
}
[ExportCodeFixProvider(LanguageNames.CSharp)]
public class PreferGenericVariantCodeFixProvider : CodeFixProvider
{
private static string Title(string method, string[] types) => $"Use {method}<{string.Join(",", types)}>.";
public override FixAllProvider GetFixAllProvider()
{
return WellKnownFixAllProviders.BatchFixer;
}
public override async Task RegisterCodeFixesAsync(CodeFixContext context)
{
var root = await context.Document.GetSyntaxRootAsync();
if(root == null) return;
foreach (var diagnostic in context.Diagnostics)
{
if (!diagnostic.Properties.TryGetValue("typeOperands", out var typeOperandsRaw)
|| typeOperandsRaw == null) continue;
var node = root.FindNode(diagnostic.Location.SourceSpan);
if (node is ArgumentSyntax argumentSyntax)
node = argumentSyntax.Expression;
if(node is not InvocationExpressionSyntax invocationExpression)
continue;
var typeOperands = typeOperandsRaw.Split(',');
context.RegisterCodeFix(
CodeAction.Create(
Title(invocationExpression.Expression.ToString(), typeOperands),
c => FixAsync(context.Document, invocationExpression, typeOperands, c),
Title(invocationExpression.Expression.ToString(), typeOperands)),
diagnostic);
}
}
private async Task<Document> FixAsync(
Document contextDocument,
InvocationExpressionSyntax invocationExpression,
string[] typeOperands,
CancellationToken cancellationToken)
{
var memberAccess = (MemberAccessExpressionSyntax)invocationExpression.Expression;
var root = (CompilationUnitSyntax) await contextDocument.GetSyntaxRootAsync(cancellationToken);
var arguments = new ArgumentSyntax[invocationExpression.ArgumentList.Arguments.Count - typeOperands.Length];
var types = new TypeSyntax[typeOperands.Length];
for (int i = 0; i < typeOperands.Length; i++)
{
types[i] = ((TypeOfExpressionSyntax)invocationExpression.ArgumentList.Arguments[i].Expression).Type;
}
Array.Copy(
invocationExpression.ArgumentList.Arguments.ToArray(),
typeOperands.Length,
arguments,
0,
arguments.Length);
memberAccess = memberAccess.WithName(SyntaxFactory.GenericName(memberAccess.Name.Identifier,
SyntaxFactory.TypeArgumentList(SyntaxFactory.SeparatedList(types))));
root = root!.ReplaceNode(invocationExpression,
invocationExpression.WithArgumentList(invocationExpression.ArgumentList.WithArguments(SyntaxFactory.SeparatedList(arguments)))
.WithExpression(memberAccess));
return contextDocument.WithSyntaxRoot(root);
}
public override ImmutableArray<string> FixableDiagnosticIds =>
ImmutableArray.Create(Diagnostics.IdUseGenericVariant);
}

View File

@@ -11,10 +11,20 @@
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.0.1" />
</ItemGroup>
<ItemGroup>
<!-- Needed for NotNullableFlagAnalyzer. -->
<Compile Include="..\Robust.Shared\Analyzers\NotNullableFlagAttribute.cs" />
</ItemGroup>
<ItemGroup>
<!-- Needed for FriendAnalyzer. -->
<Compile Include="..\Robust.Shared\Analyzers\AccessAttribute.cs" />
<Compile Include="..\Robust.Shared\Analyzers\AccessPermissions.cs" />
</ItemGroup>
<ItemGroup>
<!-- Needed for PreferGenericVariantAnalyzer. -->
<Compile Include="..\Robust.Shared\Analyzers\PreferGenericVariantAttribute.cs" />
</ItemGroup>
</Project>

File diff suppressed because it is too large Load Diff

View File

@@ -3,11 +3,13 @@ using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Text;
using System.Text.Json;
using System.Text.Json.Serialization;
using BenchmarkDotNet.Exporters;
using BenchmarkDotNet.Loggers;
using BenchmarkDotNet.Mathematics;
using BenchmarkDotNet.Parameters;
using BenchmarkDotNet.Reports;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
@@ -20,6 +22,11 @@ namespace Robust.Benchmarks.Exporters;
public sealed class SQLExporter : IExporter
{
private static readonly JsonSerializerOptions JsonSerializerOptions = new JsonSerializerOptions
{
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals
};
public static readonly IExporter Default = new SQLExporter();
private SQLExporter(){}
@@ -74,13 +81,13 @@ public sealed class SQLExporter : IExporter
{
ctx.Database.OpenConnection();
var con = (NpgsqlConnection) ctx.Database.GetDbConnection();
con.TypeMapper.AddTypeResolverFactory(new JsonOverrideTypeHandlerResolverFactory(new JsonSerializerOptions
{
NumberHandling = JsonNumberHandling.AllowNamedFloatingPointLiterals
}));
con.TypeMapper.AddTypeResolverFactory(new JsonOverrideTypeHandlerResolverFactory(JsonSerializerOptions));
ctx.Database.Migrate();
ctx.BenchmarkRuns.Add(BenchmarkRun.FromSummary(summary, gitHash));
foreach (var run in BenchmarkRun.FromSummary(summary, gitHash))
{
ctx.BenchmarkRuns.Add(run);
}
ctx.SaveChanges();
}
finally
@@ -131,6 +138,7 @@ class JsonOverrideTypeHandlerResolverFactory : TypeHandlerResolverFactory
=> null; // Let the built-in resolver do this
}
}
public sealed class DesignTimeContextFactoryPostgres : IDesignTimeDbContextFactory<BenchmarkContext>
{
public BenchmarkContext CreateDbContext(string[] args)
@@ -154,42 +162,66 @@ public class BenchmarkRun
public int Id { get; set; }
public string GitHash { get; set; } = string.Empty;
[Column(TypeName = "timestamptz")]
public DateTime RunDate { get; set; }
[Column(TypeName = "timestamptz")] public DateTime RunDate { get; set; }
public string Name { get; set; } = string.Empty;
[Column(TypeName = "jsonb")]
public BenchmarkRunReport[] Reports { get; set; } = Array.Empty<BenchmarkRunReport>();
public string? ParameterMapping { get; set; }
public static BenchmarkRun FromSummary(Summary summary, string gitHash)
[Column(TypeName = "jsonb")]
public BenchmarkRunParameter[]? ParameterMappingJson { get; set; }
[Column(TypeName = "jsonb")]
public Statistics Statistics { get; set; } = default!;
public static IEnumerable<BenchmarkRun> FromSummary(Summary summary, string gitHash)
{
return new BenchmarkRun
var runDate = DateTime.UtcNow;
foreach (var benchmarkReport in summary.Reports)
{
Reports = summary.Reports.Select(r => new BenchmarkRunReport
var paramString = new StringBuilder();
var parametersItems = benchmarkReport.BenchmarkCase.Parameters.Items;
var runParameters = new BenchmarkRunParameter[parametersItems.Count];
for (var i = 0; i < parametersItems.Count; i++)
{
Parameters = r.BenchmarkCase.Parameters.Items.Select(p => new BenchmarkRunParameter
{
Name = p.Name,
Value = p.Value
}).ToArray(),
Statistics = r.ResultStatistics
}).ToArray(),
Name = summary.BenchmarksCases.First().FolderInfo,
RunDate = DateTime.UtcNow,
GitHash = gitHash
};
runParameters[i] = new BenchmarkRunParameter(parametersItems[i]);
paramString.Append(runParameters[i].ToString());
if (i < parametersItems.Count - 1) paramString.Append(',');
}
if (benchmarkReport.ResultStatistics == null)
{
Console.WriteLine($"err: No statistics available for {benchmarkReport.BenchmarkCase.Descriptor.DisplayInfo}!");
continue;
}
yield return new BenchmarkRun
{
Name = benchmarkReport.BenchmarkCase.Descriptor.DisplayInfo,
RunDate = runDate,
GitHash = gitHash,
ParameterMapping = runParameters.Length > 0 ? paramString.ToString() : null,
ParameterMappingJson = runParameters.Length > 0 ? runParameters : null,
Statistics = benchmarkReport.ResultStatistics
};
}
}
}
public class BenchmarkRunReport
{
public BenchmarkRunParameter[] Parameters { get; set; } = Array.Empty<BenchmarkRunParameter>();
public Statistics Statistics { get; set; } = default!;
}
public class BenchmarkRunParameter
public struct BenchmarkRunParameter
{
public string Name { get; set; } = string.Empty;
public object Value { get; set; } = default!;
public BenchmarkRunParameter(ParameterInstance instance)
{
Name = instance.Name;
Value = instance.Value;
}
public override string ToString()
{
return $"{Name}={Value}";
}
}

View File

@@ -0,0 +1,62 @@
// <auto-generated />
using System;
using BenchmarkDotNet.Mathematics;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Robust.Benchmarks.Exporters;
#nullable disable
namespace Robust.Benchmarks.Migrations
{
[DbContext(typeof(BenchmarkContext))]
[Migration("20221009235705_db")]
partial class db
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("GitHash")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ParameterMapping")
.IsRequired()
.HasColumnType("text");
b.Property<DateTime>("RunDate")
.HasColumnType("timestamptz");
b.Property<Statistics>("Statistics")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("Id");
b.ToTable("BenchmarkRuns");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,36 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace Robust.Benchmarks.Migrations
{
public partial class db : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.RenameColumn(
name: "Reports",
table: "BenchmarkRuns",
newName: "Statistics");
migrationBuilder.AddColumn<string>(
name: "ParameterMapping",
table: "BenchmarkRuns",
type: "text",
nullable: false,
defaultValue: "");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ParameterMapping",
table: "BenchmarkRuns");
migrationBuilder.RenameColumn(
name: "Statistics",
table: "BenchmarkRuns",
newName: "Reports");
}
}
}

View File

@@ -0,0 +1,64 @@
// <auto-generated />
using System;
using BenchmarkDotNet.Mathematics;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
using Robust.Benchmarks.Exporters;
#nullable disable
namespace Robust.Benchmarks.Migrations
{
[DbContext(typeof(BenchmarkContext))]
[Migration("20221010144620_param_work")]
partial class param_work
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
modelBuilder.Entity("Robust.Benchmarks.Exporters.BenchmarkRun", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
.HasColumnType("integer");
NpgsqlPropertyBuilderExtensions.UseIdentityByDefaultColumn(b.Property<int>("Id"));
b.Property<string>("GitHash")
.IsRequired()
.HasColumnType("text");
b.Property<string>("Name")
.IsRequired()
.HasColumnType("text");
b.Property<string>("ParameterMapping")
.HasColumnType("text");
b.Property<BenchmarkRunParameter[]>("ParameterMappingJson")
.HasColumnType("jsonb");
b.Property<DateTime>("RunDate")
.HasColumnType("timestamptz");
b.Property<Statistics>("Statistics")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("Id");
b.ToTable("BenchmarkRuns");
});
#pragma warning restore 612, 618
}
}
}

View File

@@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore.Migrations;
using Robust.Benchmarks.Exporters;
#nullable disable
namespace Robust.Benchmarks.Migrations
{
public partial class param_work : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "ParameterMapping",
table: "BenchmarkRuns",
type: "text",
nullable: true,
oldClrType: typeof(string),
oldType: "text");
migrationBuilder.AddColumn<BenchmarkRunParameter[]>(
name: "ParameterMappingJson",
table: "BenchmarkRuns",
type: "jsonb",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "ParameterMappingJson",
table: "BenchmarkRuns");
migrationBuilder.AlterColumn<string>(
name: "ParameterMapping",
table: "BenchmarkRuns",
type: "text",
nullable: false,
defaultValue: "",
oldClrType: typeof(string),
oldType: "text",
oldNullable: true);
}
}
}

View File

@@ -1,5 +1,6 @@
// <auto-generated />
using System;
using BenchmarkDotNet.Mathematics;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
@@ -17,7 +18,7 @@ namespace Robust.Benchmarks.Migrations
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("ProductVersion", "6.0.0")
.HasAnnotation("ProductVersion", "6.0.4")
.HasAnnotation("Relational:MaxIdentifierLength", 63);
NpgsqlModelBuilderExtensions.UseIdentityByDefaultColumns(modelBuilder);
@@ -38,13 +39,19 @@ namespace Robust.Benchmarks.Migrations
.IsRequired()
.HasColumnType("text");
b.Property<BenchmarkRunReport[]>("Reports")
.IsRequired()
b.Property<string>("ParameterMapping")
.HasColumnType("text");
b.Property<BenchmarkRunParameter[]>("ParameterMappingJson")
.HasColumnType("jsonb");
b.Property<DateTime>("RunDate")
.HasColumnType("timestamptz");
b.Property<Statistics>("Statistics")
.IsRequired()
.HasColumnType("jsonb");
b.HasKey("Id");
b.ToTable("BenchmarkRuns");

View File

@@ -0,0 +1,11 @@
using System;
using BenchmarkDotNet.Mathematics;
using Robust.Benchmarks.Exporters;
namespace Robust.Benchmarks.Migrations;
public class BenchmarkRunReport
{
public BenchmarkRunParameter[] Parameters { get; set; } = Array.Empty<BenchmarkRunParameter>();
public Statistics Statistics { get; set; } = default!;
}

View File

@@ -0,0 +1,26 @@
using BenchmarkDotNet.Attributes;
using Robust.Shared.Analyzers;
namespace Robust.Benchmarks.NumericsHelpers;
[Virtual]
[DisassemblyDiagnoser()]
public class HorizontalAddBenchmark
{
[Params(8, 32, 128)]
public int N { get; set; }
private float[] _inputA = default!;
[GlobalSetup]
public void Setup()
{
_inputA = new float[N];
}
[Benchmark]
public float Bench()
{
return Shared.Maths.NumericsHelpers.HorizontalAdd(_inputA);
}
}

View File

@@ -1,8 +1,9 @@
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Running;
#if DEBUG
using BenchmarkDotNet.Configs;
#endif
using System;
using BenchmarkDotNet.Running;
using Robust.Benchmarks.Configs;
using Robust.Benchmarks.Exporters;
namespace Robust.Benchmarks
{

View File

@@ -1,5 +1,6 @@
using System.Globalization;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown;
using Robust.Shared.Serialization.Markdown.Validation;
@@ -8,7 +9,7 @@ using Robust.Shared.Serialization.TypeSerializers.Interfaces;
namespace Robust.Benchmarks.Serialization
{
public sealed class BenchmarkIntSerializer : ITypeSerializer<int, ValueDataNode>
public sealed class BenchmarkIntSerializer : ITypeSerializer<int, ValueDataNode>, ITypeCopyCreator<int>
{
public ValidationNode Validate(ISerializationManager serializationManager, ValueDataNode node,
IDependencyCollection dependencies, ISerializationContext? context = null)
@@ -19,18 +20,20 @@ namespace Robust.Benchmarks.Serialization
}
public int Read(ISerializationManager serializationManager, ValueDataNode node,
IDependencyCollection dependencies, bool skipHook, ISerializationContext? context = null, int _ = default)
IDependencyCollection dependencies, SerializationHookContext hookCtx, ISerializationContext? context = null,
ISerializationManager.InstantiationDelegate<int>? instanceProvider = null)
{
return int.Parse(node.Value, CultureInfo.InvariantCulture);
}
public DataNode Write(ISerializationManager serializationManager, int value, bool alwaysWrite = false,
public DataNode Write(ISerializationManager serializationManager, int value, IDependencyCollection dependencies,
bool alwaysWrite = false,
ISerializationContext? context = null)
{
return new ValueDataNode(value.ToString(CultureInfo.InvariantCulture));
}
public int Copy(ISerializationManager serializationManager, int source, int target, bool skipHook,
public int CreateCopy(ISerializationManager serializationManager, int source, SerializationHookContext hookCtx,
ISerializationContext? context = null)
{
return source;

View File

@@ -3,7 +3,6 @@ using System.Linq;
using BenchmarkDotNet.Attributes;
using Robust.Benchmarks.Serialization.Definitions;
using Robust.Shared.Analyzers;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown;
using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Sequence;
@@ -28,7 +27,7 @@ namespace Robust.Benchmarks.Serialization.Copy
var seedMapping = yamlStream.Documents[0].RootNode.ToDataNodeCast<SequenceDataNode>().Cast<MappingDataNode>(0);
Seed = SerializationManager.Read<SeedDataDefinition>(seedMapping);
Seed = SerializationManager.Read<SeedDataDefinition>(seedMapping, notNullableOverride: true);
}
private const string String = "ABC";
@@ -46,25 +45,25 @@ namespace Robust.Benchmarks.Serialization.Copy
[Benchmark]
public string? CreateCopyString()
{
return SerializationManager.Copy(String);
return SerializationManager.CreateCopy(String, notNullableOverride: true);
}
[Benchmark]
public int? CreateCopyInteger()
{
return SerializationManager.Copy(Integer);
return SerializationManager.CreateCopy(Integer);
}
[Benchmark]
public DataDefinitionWithString? CreateCopyDataDefinitionWithString()
{
return SerializationManager.Copy(DataDefinitionWithString);
return SerializationManager.CreateCopy(DataDefinitionWithString, notNullableOverride: true);
}
[Benchmark]
public SeedDataDefinition? CreateCopySeedDataDefinition()
{
return SerializationManager.Copy(Seed);
return SerializationManager.CreateCopy(Seed, notNullableOverride: true);
}
[Benchmark]
@@ -124,30 +123,21 @@ namespace Robust.Benchmarks.Serialization.Copy
[BenchmarkCategory("flag")]
public object? CopyFlagZero()
{
return SerializationManager.CopyWithTypeSerializer(
typeof(FlagSerializer<BenchmarkFlags>),
(int) FlagZero,
(int) FlagZero);
return SerializationManager.CreateCopy<int, FlagSerializer<BenchmarkFlags>>((int) FlagZero);
}
[Benchmark]
[BenchmarkCategory("flag")]
public object? CopyFlagThirtyOne()
{
return SerializationManager.CopyWithTypeSerializer(
typeof(FlagSerializer<BenchmarkFlags>),
(int) FlagThirtyOne,
(int) FlagThirtyOne);
return SerializationManager.CreateCopy<int, FlagSerializer<BenchmarkFlags>>((int) FlagThirtyOne);
}
[Benchmark]
[BenchmarkCategory("customTypeSerializer")]
public object? CopyIntegerCustomSerializer()
{
return SerializationManager.CopyWithTypeSerializer(
typeof(BenchmarkIntSerializer),
Integer,
Integer);
return SerializationManager.CreateCopy<int, BenchmarkIntSerializer>(Integer);
}
}
}

View File

@@ -43,7 +43,7 @@ namespace Robust.Benchmarks.Serialization.Read
[Benchmark]
public string ReadString()
{
return SerializationManager.Read<string>(StringNode);
return SerializationManager.Read<string>(StringNode, notNullableOverride: true);
}
[Benchmark]
@@ -55,43 +55,34 @@ namespace Robust.Benchmarks.Serialization.Read
[Benchmark]
public DataDefinitionWithString ReadDataDefinitionWithString()
{
return SerializationManager.Read<DataDefinitionWithString>(StringDataDefNode);
return SerializationManager.Read<DataDefinitionWithString>(StringDataDefNode, notNullableOverride: true);
}
[Benchmark]
public SeedDataDefinition ReadSeedDataDefinition()
{
return SerializationManager.Read<SeedDataDefinition>(SeedNode);
return SerializationManager.Read<SeedDataDefinition>(SeedNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("flag")]
public object? ReadFlagZero()
{
return SerializationManager.ReadWithTypeSerializer(
typeof(int),
typeof(FlagSerializer<BenchmarkFlags>),
FlagZero);
return SerializationManager.Read<int, ValueDataNode, FlagSerializer<BenchmarkFlags>>(FlagZero);
}
[Benchmark]
[BenchmarkCategory("flag")]
public object? ReadThirtyOne()
{
return SerializationManager.ReadWithTypeSerializer(
typeof(int),
typeof(FlagSerializer<BenchmarkFlags>),
FlagThirtyOne);
return SerializationManager.Read<int, ValueDataNode, FlagSerializer<BenchmarkFlags>>(FlagThirtyOne);
}
[Benchmark]
[BenchmarkCategory("customTypeSerializer")]
public object? ReadIntegerCustomSerializer()
{
return SerializationManager.ReadWithTypeSerializer(
typeof(int),
typeof(BenchmarkIntSerializer),
IntNode);
return SerializationManager.Read<int, ValueDataNode, BenchmarkIntSerializer>(IntNode);
}
}
}

View File

@@ -46,84 +46,84 @@ namespace Robust.Benchmarks.Serialization
[BenchmarkCategory("read")]
public string[]? ReadEmptyString()
{
return SerializationManager.Read<string[]>(EmptyNode);
return SerializationManager.Read<string[]>(EmptyNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public string[]? ReadOneString()
{
return SerializationManager.Read<string[]>(OneIntNode);
return SerializationManager.Read<string[]>(OneIntNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public string[]? ReadTenStrings()
{
return SerializationManager.Read<string[]>(TenIntsNode);
return SerializationManager.Read<string[]>(TenIntsNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public int[]? ReadEmptyInt()
{
return SerializationManager.Read<int[]>(EmptyNode);
return SerializationManager.Read<int[]>(EmptyNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public int[]? ReadOneInt()
{
return SerializationManager.Read<int[]>(OneIntNode);
return SerializationManager.Read<int[]>(OneIntNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public int[]? ReadTenInts()
{
return SerializationManager.Read<int[]>(TenIntsNode);
return SerializationManager.Read<int[]>(TenIntsNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public DataDefinitionWithString[]? ReadEmptyStringDataDef()
{
return SerializationManager.Read<DataDefinitionWithString[]>(EmptyNode);
return SerializationManager.Read<DataDefinitionWithString[]>(EmptyNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public DataDefinitionWithString[]? ReadOneStringDataDef()
{
return SerializationManager.Read<DataDefinitionWithString[]>(OneStringDefNode);
return SerializationManager.Read<DataDefinitionWithString[]>(OneStringDefNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public DataDefinitionWithString[]? ReadTenStringDataDefs()
{
return SerializationManager.Read<DataDefinitionWithString[]>(TenStringDefsNode);
return SerializationManager.Read<DataDefinitionWithString[]>(TenStringDefsNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public SealedDataDefinitionWithString[]? ReadEmptySealedStringDataDef()
{
return SerializationManager.Read<SealedDataDefinitionWithString[]>(EmptyNode);
return SerializationManager.Read<SealedDataDefinitionWithString[]>(EmptyNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public SealedDataDefinitionWithString[]? ReadOneSealedStringDataDef()
{
return SerializationManager.Read<SealedDataDefinitionWithString[]>(OneStringDefNode);
return SerializationManager.Read<SealedDataDefinitionWithString[]>(OneStringDefNode, notNullableOverride: true);
}
[Benchmark]
[BenchmarkCategory("read")]
public SealedDataDefinitionWithString[]? ReadTenSealedStringDataDefs()
{
return SerializationManager.Read<SealedDataDefinitionWithString[]>(TenStringDefsNode);
return SerializationManager.Read<SealedDataDefinitionWithString[]>(TenStringDefsNode, notNullableOverride: true);
}
}
}

View File

@@ -12,9 +12,9 @@ namespace Robust.Benchmarks.Serialization
{
public SerializationBenchmark()
{
IoCManager.InitThread();
ServerIoC.RegisterIoC();
IoCManager.BuildGraph();
var deps = IoCManager.InitThread();
ServerIoC.RegisterIoC(deps);
deps.BuildGraph();
var assemblies = new[]
{
@@ -25,12 +25,12 @@ namespace Robust.Benchmarks.Serialization
foreach (var assembly in assemblies)
{
IoCManager.Resolve<IConfigurationManagerInternal>().LoadCVarsFromAssembly(assembly);
deps.Resolve<IConfigurationManagerInternal>().LoadCVarsFromAssembly(assembly);
}
IoCManager.Resolve<IReflectionManager>().LoadAssemblies(assemblies);
deps.Resolve<IReflectionManager>().LoadAssemblies(assemblies);
SerializationManager = IoCManager.Resolve<ISerializationManager>();
SerializationManager = deps.Resolve<ISerializationManager>();
}
protected ISerializationManager SerializationManager { get; }

View File

@@ -3,7 +3,6 @@ using System.IO;
using BenchmarkDotNet.Attributes;
using Robust.Benchmarks.Serialization.Definitions;
using Robust.Shared.Analyzers;
using Robust.Shared.Serialization.Manager;
using Robust.Shared.Serialization.Markdown;
using Robust.Shared.Serialization.Markdown.Mapping;
using Robust.Shared.Serialization.Markdown.Sequence;
@@ -28,7 +27,7 @@ namespace Robust.Benchmarks.Serialization.Write
var seedMapping = yamlStream.Documents[0].RootNode.ToDataNodeCast<SequenceDataNode>().Cast<MappingDataNode>(0);
Seed = SerializationManager.Read<SeedDataDefinition>(seedMapping);
Seed = SerializationManager.Read<SeedDataDefinition>(seedMapping, notNullableOverride: true);
}
private const string String = "ABC";
@@ -46,7 +45,7 @@ namespace Robust.Benchmarks.Serialization.Write
[Benchmark]
public DataNode WriteString()
{
return SerializationManager.WriteValue(String);
return SerializationManager.WriteValue(String, notNullableOverride: true);
}
[Benchmark]
@@ -58,13 +57,13 @@ namespace Robust.Benchmarks.Serialization.Write
[Benchmark]
public DataNode WriteDataDefinitionWithString()
{
return SerializationManager.WriteValue(DataDefinitionWithString);
return SerializationManager.WriteValue(DataDefinitionWithString, notNullableOverride: true);
}
[Benchmark]
public DataNode WriteSeedDataDefinition()
{
return SerializationManager.WriteValue(Seed);
return SerializationManager.WriteValue(Seed, notNullableOverride: true);
}
[Benchmark]
@@ -107,30 +106,21 @@ namespace Robust.Benchmarks.Serialization.Write
[BenchmarkCategory("flag")]
public DataNode WriteFlagZero()
{
return SerializationManager.WriteWithTypeSerializer(
typeof(int),
typeof(FlagSerializer<BenchmarkFlags>),
FlagZero);
return SerializationManager.WriteValue<int, FlagSerializer<BenchmarkFlags>>((int)FlagZero);
}
[Benchmark]
[BenchmarkCategory("flag")]
public DataNode WriteThirtyOne()
{
return SerializationManager.WriteWithTypeSerializer(
typeof(int),
typeof(FlagSerializer<BenchmarkFlags>),
FlagThirtyOne);
return SerializationManager.WriteValue<int, FlagSerializer<BenchmarkFlags>>((int)FlagThirtyOne);
}
[Benchmark]
[BenchmarkCategory("customTypeSerializer")]
public DataNode WriteIntegerCustomSerializer()
{
return SerializationManager.WriteWithTypeSerializer(
typeof(int),
typeof(BenchmarkIntSerializer),
Integer);
return SerializationManager.WriteValue<int, BenchmarkIntSerializer>(Integer);
}
}
}

View File

@@ -0,0 +1,71 @@
using BenchmarkDotNet.Attributes;
using Robust.Shared.Analyzers;
namespace Robust.Benchmarks.TypeMatching;
[MemoryDiagnoser]
[Virtual]
public class TypeSwitchBenchmark
{
private readonly Matcher<Struct> _matcher = new();
[Benchmark]
public int BenchmarkInt()
{
return _matcher.TypeToInt<int>();
}
[Benchmark]
public int BenchmarkString()
{
return _matcher.TypeToInt<string>();
}
[Benchmark]
public int BenchmarkStruct()
{
return _matcher.TypeToInt<Struct>();
}
[Benchmark]
public int BenchmarkDouble()
{
return _matcher.TypeToInt<double>();
}
[Benchmark]
public int BenchmarkFloat()
{
return _matcher.TypeToInt<float>();
}
[Benchmark]
public int BenchmarkClass()
{
return _matcher.TypeToInt<Class>();
}
private class Matcher<T1>
{
public int TypeToInt<T>(T val = default!)
{
return val switch
{
int => 1,
string => 2,
double => 3,
T1 => 4,
Class => 5,
_ => 6
};
}
}
private struct Struct
{
}
private class Class
{
}
}

View File

@@ -332,7 +332,7 @@ namespace {nameSpace}
"Usage",
DiagnosticSeverity.Error,
true),
Location.None));
candidateClass.GetLocation()));
}
}

View File

@@ -143,6 +143,8 @@ namespace Robust.Client.WebView.Cef
private const int ScrollSpeed = 50;
private bool _textInputActive;
private readonly RobustRequestHandler _requestHandler = new(Logger.GetSawmill("root"));
private LiveData? _data;
private string _startUrl = "about:blank";
@@ -360,24 +362,21 @@ namespace Robust.Client.WebView.Cef
return modifiers;
}
public void TextEntered(GUITextEventArgs args)
public void TextEntered(GUITextEnteredEventArgs args)
{
if (_data == null)
return;
var host = _data.Browser.GetHost();
Span<char> buf = stackalloc char[2];
var written = args.AsRune.EncodeToUtf16(buf);
for (var i = 0; i < written; i++)
foreach (var chr in args.Text)
{
host.SendKeyEvent(new CefKeyEvent
{
EventType = CefKeyEventType.Char,
WindowsKeyCode = buf[i],
Character = buf[i],
UnmodifiedCharacter = buf[i]
WindowsKeyCode = chr,
Character = chr,
UnmodifiedCharacter = chr
});
}
}
@@ -481,6 +480,32 @@ namespace Robust.Client.WebView.Cef
_requestHandler.RemoveBeforeBrowseHandler(handler);
}
public void FocusEntered()
{
if (_textInputActive)
_clyde.TextInputStart();
}
public void FocusExited()
{
if (_textInputActive)
_clyde.TextInputStop();
}
public void TextInputStart()
{
_textInputActive = true;
if (Owner.HasKeyboardFocus())
_clyde.TextInputStart();
}
public void TextInputStop()
{
_textInputActive = false;
if (Owner.HasKeyboardFocus())
_clyde.TextInputStop();
}
private sealed class LiveData
{
public OwnedTexture Texture;
@@ -579,6 +604,22 @@ namespace Robust.Client.WebView.Cef
if (_control.Owner.Disposed)
return;
}
protected override void OnVirtualKeyboardRequested(CefBrowser browser, CefTextInputMode inputMode)
{
base.OnVirtualKeyboardRequested(browser, inputMode);
// Treat virtual keyboard requests as a guide for whether we should accept text input.
if (inputMode == CefTextInputMode.None)
{
_control.TextInputStop();
}
else
{
_control.TextInputStart();
}
}
}
}
}

View File

@@ -69,6 +69,12 @@ namespace Robust.Client.WebView.Cef
CachePath = cachePath,
};
var userAgentOverride = _cfg.GetCVar(WCVars.UserAgentOverride);
if (!string.IsNullOrEmpty(userAgentOverride))
{
settings.UserAgent = userAgentOverride;
}
Logger.Info($"CEF Version: {CefRuntime.ChromeVersion}");
_app = new RobustCefApp();

View File

@@ -106,7 +106,7 @@ namespace Robust.Client.WebView.Headless
return false;
}
public void TextEntered(GUITextEventArgs args)
public void TextEntered(GUITextEnteredEventArgs args)
{
}
@@ -125,6 +125,14 @@ namespace Robust.Client.WebView.Headless
public void RemoveBeforeBrowseHandler(Action<IBeforeBrowseContext> handler)
{
}
public void FocusEntered()
{
}
public void FocusExited()
{
}
}
private sealed class WebViewWindowDummy : DummyBase, IWebViewWindow

View File

@@ -15,10 +15,12 @@ namespace Robust.Client.WebView
void MouseExited();
void MouseWheel(GUIMouseWheelEventArgs args);
bool RawKeyEvent(in GuiRawKeyEvent guiRawEvent);
void TextEntered(GUITextEventArgs args);
void TextEntered(GUITextEnteredEventArgs args);
void Resized();
void Draw(DrawingHandleScreen handle);
void AddBeforeBrowseHandler(Action<IBeforeBrowseContext> handler);
void RemoveBeforeBrowseHandler(Action<IBeforeBrowseContext> handler);
void FocusEntered();
void FocusExited();
}
}

View File

@@ -3,7 +3,6 @@
<Import Project="..\MSBuild\Robust.Engine.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputType>WinExe</OutputType>
</PropertyGroup>

View File

@@ -14,4 +14,10 @@ public static class WCVars
/// </summary>
public static readonly CVarDef<bool> WebResProtocol =
CVarDef.Create("web.res_protocol", true, CVar.CLIENTONLY);
/// <summary>
/// Overrides the default CEF user-agent when set to a non-empty string.
/// </summary>
public static readonly CVarDef<string> UserAgentOverride =
CVarDef.Create("web.user_agent", "", CVar.CLIENTONLY);
}

View File

@@ -1,7 +1,6 @@
using System;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.WebView.Cef;
using Robust.Shared.IoC;
using Robust.Shared.ViewVariables;
@@ -76,13 +75,27 @@ namespace Robust.Client.WebView
return _controlImpl.RawKeyEvent(guiRawEvent);
}
protected internal override void TextEntered(GUITextEventArgs args)
protected internal override void TextEntered(GUITextEnteredEventArgs args)
{
base.TextEntered(args);
_controlImpl.TextEntered(args);
}
protected internal override void KeyboardFocusEntered()
{
base.KeyboardFocusEntered();
_controlImpl.FocusEntered();
}
protected internal override void KeyboardFocusExited()
{
base.KeyboardFocusExited();
_controlImpl.FocusExited();
}
protected override void Resized()
{
base.Resized();

View File

@@ -3,6 +3,7 @@ using JetBrains.Annotations;
using Robust.Shared.Animations;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
namespace Robust.Client.Animations
{
@@ -20,7 +21,14 @@ namespace Robust.Client.Animations
}
var entity = (EntityUid) context;
var component = IoCManager.Resolve<IEntityManager>().GetComponent(entity, ComponentType);
var entManager = IoCManager.Resolve<IEntityManager>();
if (!entManager.TryGetComponent(entity, ComponentType, out var component))
{
// This gets checked when the animation is first played, but the component may also be removed while the animation plays
Logger.Error($"Couldn't find component {ComponentType} on {entManager.ToPrettyString(entity)} for animation playback!");
return;
}
if (component is IAnimationProperties properties)
{

View File

@@ -1,21 +1,20 @@
using System;
using Robust.Client.Graphics;
namespace Robust.Client.Audio
{
public sealed class AudioStream
{
public TimeSpan Length { get; }
internal ClydeHandle? ClydeHandle { get; }
public string? Name { get; }
public int ChannelCount { get; }
namespace Robust.Client.Audio;
internal AudioStream(ClydeHandle handle, TimeSpan length, int channelCount, string? name = null)
{
ClydeHandle = handle;
Length = length;
ChannelCount = channelCount;
Name = name;
}
public sealed class AudioStream
{
public TimeSpan Length { get; }
internal ClydeHandle? ClydeHandle { get; }
public string? Name { get; }
public int ChannelCount { get; }
internal AudioStream(ClydeHandle handle, TimeSpan length, int channelCount, string? name = null)
{
ClydeHandle = handle;
Length = length;
ChannelCount = channelCount;
Name = name;
}
}

View File

@@ -4,15 +4,13 @@ using Robust.Shared.Localization;
namespace Robust.Client.Audio.Midi.Commands;
public sealed class MidiPanicCommand : IConsoleCommand
public sealed class MidiPanicCommand : LocalizedCommands
{
[Dependency] private readonly IMidiManager _midiManager = default!;
public string Command => "midipanic";
public string Description => Loc.GetString("midi-panic-command-description");
public string Help => $"{Command}";
public override string Command => "midipanic";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
foreach (var renderer in _midiManager.Renderers)
{

View File

@@ -146,7 +146,7 @@ internal sealed partial class MidiManager
break;
default:
_midiSawmill.Error($"Unsupported Sequencer Event: {tick:D8}: {SequencerEventToString(midiEvent)}");
_midiSawmill.Warning($"Unsupported Sequencer Event: {tick:D8}: {SequencerEventToString(midiEvent)}");
break;
}

View File

@@ -16,6 +16,7 @@ using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
@@ -24,7 +25,7 @@ namespace Robust.Client.Audio.Midi;
internal sealed partial class MidiManager : IMidiManager
{
[Dependency] private readonly IEyeManager _eyeManager = default!;
[Dependency] private readonly IResourceManagerInternal _resourceManager = default!;
[Dependency] private readonly IResourceCacheInternal _resourceManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
[Dependency] private readonly IConfigurationManager _cfgMan = default!;
[Dependency] private readonly IClydeAudio _clydeAudio = default!;
@@ -100,21 +101,27 @@ internal sealed partial class MidiManager : IMidiManager
private const string FallbackSoundfont = "/Midi/fallback.sf2";
private const float MaxDistanceForOcclusion = 1000;
private const string ContentCustomSoundfontDirectory = "/Audio/MidiCustom/";
private static ResourcePath CustomSoundfontDirectory = new ResourcePath("/soundfonts/");
private readonly ResourceLoaderCallbacks _soundfontLoaderCallbacks = new();
private readonly ResourceLoaderCallbacks _soundfontLoaderCallbacks;
private bool FluidsynthInitialized;
private bool _failedInitialize;
private NFluidsynth.Logger.LoggerDelegate _loggerDelegate = default!;
private ISawmill _sawmill = default!;
private float _maxCastLength;
[ViewVariables(VVAccess.ReadWrite)]
public int OcclusionCollisionMask { get; set; }
public MidiManager()
{
_soundfontLoaderCallbacks = new ResourceLoaderCallbacks(this);
}
private void InitializeFluidsynth()
{
if (FluidsynthInitialized || _failedInitialize) return;
@@ -127,7 +134,11 @@ internal sealed partial class MidiManager : IMidiManager
}, true);
_midiSawmill = _logger.GetSawmill("midi");
_midiSawmill.Level = LogLevel.Info;
#if DEBUG
_midiSawmill.Level = LogLevel.Debug;
#else
_midiSawmill.Level = LogLevel.Error;
#endif
_sawmill = _logger.GetSawmill("midi.fluidsynth");
_loggerDelegate = LoggerDelegate;
@@ -166,8 +177,7 @@ internal sealed partial class MidiManager : IMidiManager
}
catch (Exception e)
{
_midiSawmill.Warning(
"Failed to initialize fluidsynth due to exception, disabling MIDI support:\n{0}", e);
_midiSawmill.Error("Failed to initialize fluidsynth due to exception, disabling MIDI support:\n{0}", e);
_failedInitialize = true;
return;
}
@@ -175,13 +185,21 @@ internal sealed partial class MidiManager : IMidiManager
_midiThread = new Thread(ThreadUpdate);
_midiThread.Start();
_broadPhaseSystem = EntitySystem.Get<SharedPhysicsSystem>();
_broadPhaseSystem = _entityManager.EntitySysManager.GetEntitySystem<SharedPhysicsSystem>();
_cfgMan.OnValueChanged(CVars.AudioRaycastLength, OnRaycastLengthChanged, true);
FluidsynthInitialized = true;
}
private void OnRaycastLengthChanged(float value)
{
_maxCastLength = value;
}
private void LoggerDelegate(NFluidsynth.Logger.LogLevel level, string message, IntPtr data)
{
var rLevel = level switch {
var rLevel = level switch
{
NFluidsynth.Logger.LogLevel.Panic => LogLevel.Error,
NFluidsynth.Logger.LogLevel.Error => LogLevel.Error,
NFluidsynth.Logger.LogLevel.Warning => LogLevel.Warning,
@@ -216,6 +234,7 @@ internal sealed partial class MidiManager : IMidiManager
var renderer = new MidiRenderer(_settings!, soundfontLoader, mono, this, _clydeAudio, _taskManager, _midiSawmill);
_midiSawmill.Debug($"Loading soundfont {FallbackSoundfont}");
// Since the last loaded soundfont takes priority, we load the fallback soundfont before the soundfont.
renderer.LoadSoundfont(FallbackSoundfont);
@@ -223,11 +242,13 @@ internal sealed partial class MidiManager : IMidiManager
{
foreach (var filepath in LinuxSoundfonts)
{
if (!File.Exists(filepath) || !SoundFont.IsSoundFont(filepath)) continue;
if (!File.Exists(filepath) || !SoundFont.IsSoundFont(filepath))
continue;
try
{
renderer.LoadSoundfont(filepath, true);
renderer.LoadSoundfont(filepath);
_midiSawmill.Debug($"Loaded Linux soundfont {filepath}");
}
catch (Exception)
{
@@ -240,29 +261,37 @@ internal sealed partial class MidiManager : IMidiManager
else if (OperatingSystem.IsMacOS())
{
if (File.Exists(OsxSoundfont) && SoundFont.IsSoundFont(OsxSoundfont))
renderer.LoadSoundfont(OsxSoundfont, true);
{
_midiSawmill.Debug($"Loading soundfont {OsxSoundfont}");
renderer.LoadSoundfont(OsxSoundfont);
}
}
else if (OperatingSystem.IsWindows())
{
if (File.Exists(WindowsSoundfont) && SoundFont.IsSoundFont(WindowsSoundfont))
renderer.LoadSoundfont(WindowsSoundfont, true);
{
_midiSawmill.Debug($"Loading soundfont {WindowsSoundfont}");
renderer.LoadSoundfont(WindowsSoundfont);
}
}
// Load content-specific custom soundfonts, which could override the system/fallback soundfont.
foreach (var file in _resourceManager.ContentFindFiles(("/Audio/MidiCustom/")))
_midiSawmill.Debug($"Loading soundfonts from {ContentCustomSoundfontDirectory}");
foreach (var file in _resourceManager.ContentFindFiles(ContentCustomSoundfontDirectory))
{
if (file.Extension != "sf2" && file.Extension != "dls") continue;
_midiSawmill.Debug($"Loading soundfont {file}");
renderer.LoadSoundfont(file.ToString());
}
// Load every soundfont from the user data directory last, since those may override any other soundfont.
_midiSawmill.Debug($"loading soundfonts from {CustomSoundfontDirectory.ToRelativePath().ToString()}/*");
var enumerator = _resourceManager.UserData.Find($"{CustomSoundfontDirectory.ToRelativePath().ToString()}/*").Item1;
foreach (var soundfont in enumerator)
_midiSawmill.Debug($"Loading soundfonts from {{USERDATA}} {CustomSoundfontDirectory}");
var enumerator = _resourceManager.UserData.Find($"{CustomSoundfontDirectory.ToRelativePath()}/*").Item1;
foreach (var file in enumerator)
{
if (soundfont.Extension != "sf2" && soundfont.Extension != "dls") continue;
_midiSawmill.Debug($"loading soundfont {soundfont}");
renderer.LoadSoundfont(soundfont.ToString());
if (file.Extension != "sf2" && file.Extension != "dls") continue;
_midiSawmill.Debug($"Loading soundfont {{USERDATA}} {file}");
renderer.LoadSoundfont(file.ToString());
}
renderer.Source.SetVolume(Volume);
@@ -287,6 +316,8 @@ internal sealed partial class MidiManager : IMidiManager
}
// Update positions of streams every frame.
// This has a lot of code duplication with AudioSystem.FrameUpdate(), and they should probably be combined somehow.
lock (_renderers)
{
foreach (var renderer in _renderers)
@@ -319,17 +350,17 @@ internal sealed partial class MidiManager : IMidiManager
{
var pos = mapPos.Value;
var sourceRelative = _eyeManager.CurrentEye.Position.Position - pos.Position;
var sourceRelative = pos.Position - _eyeManager.CurrentEye.Position.Position;
var occlusion = 0f;
if (sourceRelative.Length > 0)
{
occlusion = _broadPhaseSystem.IntersectRayPenetration(
pos.MapId,
new CollisionRay(
pos.Position,
_eyeManager.CurrentEye.Position.Position,
sourceRelative.Normalized,
OcclusionCollisionMask),
MathF.Min(sourceRelative.Length, MaxDistanceForOcclusion),
MathF.Min(sourceRelative.Length, _maxCastLength),
renderer.TrackingEntity);
}
@@ -342,7 +373,8 @@ internal sealed partial class MidiManager : IMidiManager
if (trackingEntity)
{
renderer.Source.SetVelocity(renderer.TrackingEntity!.Value.GlobalLinearVelocity());
var vel = _broadPhaseSystem.GetMapLinearVelocity(renderer.TrackingEntity!.Value);
renderer.Source.SetVelocity(vel);
}
}
else
@@ -426,9 +458,15 @@ internal sealed partial class MidiManager : IMidiManager
/// </summary>
private sealed class ResourceLoaderCallbacks : SoundFontLoaderCallbacks
{
private readonly MidiManager _parent;
private readonly Dictionary<int, Stream> _openStreams = new();
private int _nextStreamId = 1;
public ResourceLoaderCallbacks(MidiManager parent)
{
_parent = parent;
}
public override IntPtr Open(string filename)
{
if (string.IsNullOrEmpty(filename))
@@ -437,7 +475,7 @@ internal sealed partial class MidiManager : IMidiManager
}
Stream? stream;
var resourceCache = IoCManager.Resolve<IResourceCache>();
var resourceCache = _parent._resourceManager;
var resourcePath = new ResourcePath(filename);
if (resourcePath.IsRooted)

View File

@@ -354,7 +354,7 @@ internal sealed class MidiRenderer : IMidiRenderer
}
}
public void LoadSoundfont(string filename, bool resetPresets = false)
public void LoadSoundfont(string filename, bool resetPresets = true)
{
lock (_playerStateLock)
{
@@ -521,7 +521,10 @@ internal sealed class MidiRenderer : IMidiRenderer
return;
_rendererState.Controllers.AsSpan[midiEvent.Channel].AsSpan[midiEvent.Control] = midiEvent.Value;
_synth.CC(midiEvent.Channel, midiEvent.Control, midiEvent.Value);
if(midiEvent.Control != 0x0)
_synth.CC(midiEvent.Channel, midiEvent.Control, midiEvent.Value);
else // Fluidsynth doesn't seem to respect CC0 as bank selection, so we have to do it manually.
_synth.BankSelect(midiEvent.Channel, midiEvent.Value);
break;
case RobustMidiCommand.ProgramChange:

View File

@@ -1,5 +1,6 @@
using System;
using System.Net;
using Robust.Client.Configuration;
using Robust.Client.Debugging;
using Robust.Client.GameObjects;
using Robust.Client.GameStates;
@@ -25,7 +26,7 @@ namespace Robust.Client
{
[Dependency] private readonly IClientNetManager _net = default!;
[Dependency] private readonly IPlayerManager _playMan = default!;
[Dependency] private readonly INetConfigurationManager _configManager = default!;
[Dependency] private readonly IClientNetConfigurationManager _configManager = default!;
[Dependency] private readonly IClientEntityManager _entityManager = default!;
[Dependency] private readonly IMapManager _mapManager = default!;
[Dependency] private readonly IDiscordRichPresence _discord = default!;
@@ -238,7 +239,7 @@ namespace Robust.Client
private void GameStoppedReset()
{
IoCManager.Resolve<INetConfigurationManager>().FlushMessages();
_configManager.FlushMessages();
_gameStates.Reset();
_playMan.Shutdown();
_entityManager.Shutdown();

View File

@@ -1,5 +1,6 @@
using System;
using Robust.Client.Audio.Midi;
using Robust.Client.Configuration;
using Robust.Client.Console;
using Robust.Client.Debugging;
using Robust.Client.GameObjects;
@@ -14,13 +15,17 @@ using Robust.Client.Player;
using Robust.Client.Profiling;
using Robust.Client.Prototypes;
using Robust.Client.Reflection;
using Robust.Client.Replays;
using Robust.Client.ResourceManagement;
using Robust.Client.Serialization;
using Robust.Client.State;
using Robust.Client.Timing;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Themes;
using Robust.Client.Utility;
using Robust.Client.ViewVariables;
using Robust.Shared;
using Robust.Shared.Configuration;
using Robust.Shared.Console;
using Robust.Shared.ContentPack;
using Robust.Shared.GameObjects;
@@ -31,91 +36,104 @@ using Robust.Shared.Physics;
using Robust.Shared.Players;
using Robust.Shared.Prototypes;
using Robust.Shared.Reflection;
using Robust.Shared.Replays;
using Robust.Shared.Serialization;
using Robust.Shared.Timing;
using Robust.Shared.ViewVariables;
namespace Robust.Client
{
internal static class ClientIoC
{
public static void RegisterIoC(GameController.DisplayMode mode)
public static void RegisterIoC(GameController.DisplayMode mode, IDependencyCollection deps)
{
SharedIoC.RegisterIoC();
SharedIoC.RegisterIoC(deps);
deps.Register<IGameTiming, ClientGameTiming>();
deps.Register<IClientGameTiming, ClientGameTiming>();
deps.Register<IPrototypeManager, ClientPrototypeManager>();
deps.Register<IPrototypeManagerInternal, ClientPrototypeManager>();
deps.Register<IMapManager, NetworkedMapManager>();
deps.Register<IMapManagerInternal, NetworkedMapManager>();
deps.Register<INetworkedMapManager, NetworkedMapManager>();
deps.Register<IEntityManager, ClientEntityManager>();
deps.Register<IReflectionManager, ClientReflectionManager>();
deps.Register<IConsoleHost, ClientConsoleHost>();
deps.Register<IClientConsoleHost, ClientConsoleHost>();
deps.Register<IComponentFactory, ComponentFactory>();
deps.Register<ITileDefinitionManager, ClydeTileDefinitionManager>();
deps.Register<IClydeTileDefinitionManager, ClydeTileDefinitionManager>();
deps.Register<GameController, GameController>();
deps.Register<IGameController, GameController>();
deps.Register<IGameControllerInternal, GameController>();
deps.Register<IResourceManager, ResourceCache>();
deps.Register<IResourceManagerInternal, ResourceCache>();
deps.Register<IResourceCache, ResourceCache>();
deps.Register<IResourceCacheInternal, ResourceCache>();
deps.Register<IClientNetManager, NetManager>();
deps.Register<EntityManager, ClientEntityManager>();
deps.Register<ClientEntityManager>();
deps.Register<IClientEntityManager, ClientEntityManager>();
deps.Register<IClientEntityManagerInternal, ClientEntityManager>();
deps.Register<IEntityNetworkManager, ClientEntityManager>();
deps.Register<IReplayRecordingManager, ReplayRecordingManager>();
deps.Register<IClientGameStateManager, ClientGameStateManager>();
deps.Register<IBaseClient, BaseClient>();
deps.Register<IPlayerManager, PlayerManager>();
deps.Register<ISharedPlayerManager, PlayerManager>();
deps.Register<IStateManager, StateManager>();
deps.Register<IUserInterfaceManager, UserInterfaceManager>();
deps.Register<IUserInterfaceManagerInternal, UserInterfaceManager>();
deps.Register<ILightManager, LightManager>();
deps.Register<IDiscordRichPresence, DiscordRichPresence>();
deps.Register<IMidiManager, MidiManager>();
deps.Register<IAuthManager, AuthManager>();
deps.Register<ProfViewManager>();
IoCManager.Register<IGameTiming, ClientGameTiming>();
IoCManager.Register<IClientGameTiming, ClientGameTiming>();
IoCManager.Register<IPrototypeManager, ClientPrototypeManager>();
IoCManager.Register<IMapManager, NetworkedMapManager>();
IoCManager.Register<IMapManagerInternal, NetworkedMapManager>();
IoCManager.Register<INetworkedMapManager, NetworkedMapManager>();
IoCManager.Register<IEntityManager, ClientEntityManager>();
IoCManager.Register<IReflectionManager, ClientReflectionManager>();
IoCManager.Register<IConsoleHost, ClientConsoleHost>();
IoCManager.Register<IClientConsoleHost, ClientConsoleHost>();
IoCManager.Register<IComponentFactory, ClientComponentFactory>();
IoCManager.Register<ITileDefinitionManager, ClydeTileDefinitionManager>();
IoCManager.Register<IClydeTileDefinitionManager, ClydeTileDefinitionManager>();
IoCManager.Register<GameController, GameController>();
IoCManager.Register<IGameController, GameController>();
IoCManager.Register<IGameControllerInternal, GameController>();
IoCManager.Register<IResourceManager, ResourceCache>();
IoCManager.Register<IResourceManagerInternal, ResourceCache>();
IoCManager.Register<IResourceCache, ResourceCache>();
IoCManager.Register<IResourceCacheInternal, ResourceCache>();
IoCManager.Register<IClientNetManager, NetManager>();
IoCManager.Register<EntityManager, ClientEntityManager>();
IoCManager.Register<ClientEntityManager>();
IoCManager.Register<IClientEntityManager, ClientEntityManager>();
IoCManager.Register<IClientEntityManagerInternal, ClientEntityManager>();
IoCManager.Register<IEntityNetworkManager, ClientEntityManager>();
IoCManager.Register<IClientGameStateManager, ClientGameStateManager>();
IoCManager.Register<IBaseClient, BaseClient>();
IoCManager.Register<IPlayerManager, PlayerManager>();
IoCManager.Register<ISharedPlayerManager, PlayerManager>();
IoCManager.Register<IStateManager, StateManager>();
IoCManager.Register<IUserInterfaceManager, UserInterfaceManager>();
IoCManager.Register<IUserInterfaceManagerInternal, UserInterfaceManager>();
IoCManager.Register<ILightManager, LightManager>();
IoCManager.Register<IDiscordRichPresence, DiscordRichPresence>();
IoCManager.Register<IMidiManager, MidiManager>();
IoCManager.Register<IAuthManager, AuthManager>();
IoCManager.Register<ProfViewManager>();
IoCManager.Register<IPhysicsManager, PhysicsManager>();
switch (mode)
{
case GameController.DisplayMode.Headless:
IoCManager.Register<IClyde, ClydeHeadless>();
IoCManager.Register<IClipboardManager, ClydeHeadless>();
IoCManager.Register<IClydeInternal, ClydeHeadless>();
IoCManager.Register<IClydeAudio, ClydeAudioHeadless>();
IoCManager.Register<IClydeAudioInternal, ClydeAudioHeadless>();
IoCManager.Register<IInputManager, InputManager>();
IoCManager.Register<IFileDialogManager, DummyFileDialogManager>();
IoCManager.Register<IUriOpener, UriOpenerDummy>();
deps.Register<IClyde, ClydeHeadless>();
deps.Register<IClipboardManager, ClydeHeadless>();
deps.Register<IClydeInternal, ClydeHeadless>();
deps.Register<IClydeAudio, ClydeAudioHeadless>();
deps.Register<IClydeAudioInternal, ClydeAudioHeadless>();
deps.Register<IInputManager, InputManager>();
deps.Register<IFileDialogManager, DummyFileDialogManager>();
deps.Register<IUriOpener, UriOpenerDummy>();
break;
case GameController.DisplayMode.Clyde:
IoCManager.Register<IClyde, Clyde>();
IoCManager.Register<IClipboardManager, Clyde>();
IoCManager.Register<IClydeInternal, Clyde>();
IoCManager.Register<IClydeAudio, FallbackProxyClydeAudio>();
IoCManager.Register<IClydeAudioInternal, FallbackProxyClydeAudio>();
IoCManager.Register<IInputManager, ClydeInputManager>();
IoCManager.Register<IFileDialogManager, FileDialogManager>();
IoCManager.Register<IUriOpener, UriOpener>();
deps.Register<IClyde, Clyde>();
deps.Register<IClipboardManager, Clyde>();
deps.Register<IClydeInternal, Clyde>();
deps.Register<IClydeAudio, FallbackProxyClydeAudio>();
deps.Register<IClydeAudioInternal, FallbackProxyClydeAudio>();
deps.Register<IInputManager, ClydeInputManager>();
deps.Register<IFileDialogManager, FileDialogManager>();
deps.Register<IUriOpener, UriOpener>();
break;
default:
throw new ArgumentOutOfRangeException();
}
IoCManager.Register<IFontManager, FontManager>();
IoCManager.Register<IFontManagerInternal, FontManager>();
IoCManager.Register<IEyeManager, EyeManager>();
IoCManager.Register<IPlacementManager, PlacementManager>();
IoCManager.Register<IOverlayManager, OverlayManager>();
IoCManager.Register<IOverlayManagerInternal, OverlayManager>();
IoCManager.Register<IViewVariablesManager, ViewVariablesManager>();
IoCManager.Register<IViewVariablesManagerInternal, ViewVariablesManager>();
IoCManager.Register<IClientConGroupController, ClientConGroupController>();
IoCManager.Register<IScriptClient, ScriptClient>();
deps.Register<IFontManager, FontManager>();
deps.Register<IFontManagerInternal, FontManager>();
deps.Register<IEyeManager, EyeManager>();
deps.Register<IPlacementManager, PlacementManager>();
deps.Register<IOverlayManager, OverlayManager>();
deps.Register<IOverlayManagerInternal, OverlayManager>();
deps.Register<IViewVariablesManager, ClientViewVariablesManager>();
deps.Register<IClientViewVariablesManager, ClientViewVariablesManager>();
deps.Register<IClientViewVariablesManagerInternal, ClientViewVariablesManager>();
deps.Register<IClientConGroupController, ClientConGroupController>();
deps.Register<IScriptClient, ScriptClient>();
deps.Register<IRobustSerializer, ClientRobustSerializer>();
deps.Register<IClientRobustSerializer, ClientRobustSerializer>();
deps.Register<IConfigurationManager, ClientNetConfigurationManager>();
deps.Register<INetConfigurationManager, ClientNetConfigurationManager>();
deps.Register<IConfigurationManagerInternal, ClientNetConfigurationManager>();
deps.Register<IClientNetConfigurationManager, ClientNetConfigurationManager>();
deps.Register<INetConfigurationManagerInternal, ClientNetConfigurationManager>();
}
}
}

View File

@@ -0,0 +1,27 @@
using System.Threading.Tasks;
using Robust.Shared;
using Robust.Shared.Resources;
namespace Robust.Client;
/// <summary>
/// Logic for "warming up" things like slow static constructors concurrently.
/// </summary>
internal static class ClientWarmup
{
public static void RunWarmup()
{
Task.Run(WarmupCore);
}
private static void WarmupCore()
{
// Get ImageSharp loaded.
_ = SixLabors.ImageSharp.Configuration.Default;
SharedWarmup.WarmupCore();
// Preload the JSON loading code.
RsiLoading.Warmup();
}
}

View File

@@ -0,0 +1,12 @@
using Robust.Client.GameObjects;
using Robust.Shared.ComponentTrees;
using Robust.Shared.GameObjects;
using Robust.Shared.Physics;
namespace Robust.Client.ComponentTrees;
[RegisterComponent]
public sealed class LightTreeComponent: Component, IComponentTreeComponent<PointLightComponent>
{
public DynamicTree<ComponentTreeEntry<PointLightComponent>> Tree { get; set; } = default!;
}

View File

@@ -0,0 +1,38 @@
using Robust.Client.GameObjects;
using Robust.Shared.ComponentTrees;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
namespace Robust.Client.ComponentTrees;
public sealed class LightTreeSystem : ComponentTreeSystem<LightTreeComponent, PointLightComponent>
{
#region Component Tree Overrides
protected override bool DoFrameUpdate => true;
protected override bool DoTickUpdate => false;
protected override bool Recursive => true;
protected override int InitialCapacity => 128;
protected override Box2 ExtractAabb(in ComponentTreeEntry<PointLightComponent> entry, Vector2 pos, Angle rot)
{
// Really we should be rotating the light offset by the relative rotation. But I assume the light offset will
// always be relatively small, so fuck it, this is probably faster than having to compute the angle every time.
var radius = entry.Component.Radius + entry.Component.Offset.Length;
return new Box2(pos - radius, pos + radius);
}
protected override Box2 ExtractAabb(in ComponentTreeEntry<PointLightComponent> entry)
{
if (entry.Component.TreeUid == null)
return default;
var pos = XformSystem.GetRelativePosition(
entry.Transform,
entry.Component.TreeUid.Value,
GetEntityQuery<TransformComponent>());
return ExtractAabb(in entry, pos, default);
}
#endregion
}

View File

@@ -0,0 +1,12 @@
using Robust.Client.GameObjects;
using Robust.Shared.ComponentTrees;
using Robust.Shared.GameObjects;
using Robust.Shared.Physics;
namespace Robust.Client.ComponentTrees;
[RegisterComponent]
public sealed class SpriteTreeComponent: Component, IComponentTreeComponent<SpriteComponent>
{
public DynamicTree<ComponentTreeEntry<SpriteComponent>> Tree { get; set; } = default!;
}

View File

@@ -0,0 +1,40 @@
using Robust.Client.GameObjects;
using Robust.Shared.ComponentTrees;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
namespace Robust.Client.ComponentTrees;
public sealed class SpriteTreeSystem : ComponentTreeSystem<SpriteTreeComponent, SpriteComponent>
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<SpriteComponent, QueueSpriteTreeUpdateEvent>(OnQueueUpdate);
}
private void OnQueueUpdate(EntityUid uid, SpriteComponent component, ref QueueSpriteTreeUpdateEvent args)
=> QueueTreeUpdate(uid, component, args.Xform);
// TODO remove this when finally ECSing sprite components
[ByRefEvent]
internal readonly struct QueueSpriteTreeUpdateEvent
{
public readonly TransformComponent Xform;
public QueueSpriteTreeUpdateEvent(TransformComponent xform)
{
Xform = xform;
}
}
#region Component Tree Overrides
protected override bool DoFrameUpdate => true;
protected override bool DoTickUpdate => false;
protected override bool Recursive => true;
protected override int InitialCapacity => 1024;
protected override Box2 ExtractAabb(in ComponentTreeEntry<SpriteComponent> entry, Vector2 pos, Angle rot)
=> entry.Component.CalculateRotatedBoundingBox(pos, rot, default).CalcBoundingBox();
#endregion
}

View File

@@ -0,0 +1,130 @@
using Robust.Shared.Configuration;
using Robust.Shared.IoC;
using Robust.Shared.Timing;
using System.Collections.Generic;
using System;
using Robust.Shared.Network.Messages;
using Robust.Shared.Network;
using Robust.Shared.Utility;
namespace Robust.Client.Configuration;
internal sealed class ClientNetConfigurationManager : NetConfigurationManager, IClientNetConfigurationManager
{
[Dependency] private readonly IBaseClient _client = default!;
private bool _receivedInitialNwVars = false;
public event EventHandler? ReceivedInitialNwVars;
public void SyncWithServer()
{
DebugTools.Assert(NetManager.IsConnected);
Sawmill.Info("Sending client info...");
var msg = new MsgConVars();
msg.Tick = default;
msg.NetworkedVars = GetReplicatedVars();
NetManager.ClientSendMessage(msg);
}
public void ClearReceivedInitialNwVars()
{
_receivedInitialNwVars = false;
}
public override void Shutdown()
{
base.Shutdown();
ReceivedInitialNwVars = null;
_receivedInitialNwVars = false;
}
/// <inheritdoc />
public override void SetCVar(string name, object value, bool force = false)
{
CVar flags;
using (Lock.ReadGuard())
{
if (!_configVars.TryGetValue(name, out var cVar) || !cVar.Registered)
throw new InvalidConfigurationException($"Trying to set unregistered variable '{name}'");
flags = cVar.Flags;
if (!force && NetManager.IsConnected && (cVar.Flags & CVar.NOT_CONNECTED) != 0)
{
Sawmill.Warning($"'{name}' can only be changed when not connected to a server.");
return;
}
if (!force && ((cVar.Flags & CVar.SERVER) != 0) && _client.RunLevel != ClientRunLevel.SinglePlayerGame)
{
Sawmill.Warning($"Only the server can change '{name}'.");
return;
}
}
// Actually set the CVar
base.SetCVar(name, value, force);
if ((flags & CVar.REPLICATED) == 0)
return;
var msg = new MsgConVars();
msg.Tick = Timing.CurTick;
msg.NetworkedVars = new List<(string name, object value)>
{
(name, value)
};
NetManager.ClientSendMessage(msg);
}
protected override void HandleNetVarMessage(MsgConVars message)
{
if (!_receivedInitialNwVars)
ApplyClientNetVarChange(message.NetworkedVars, message.Tick);
else
base.HandleNetVarMessage(message);
}
protected override void ApplyNetVarChange(
INetChannel msgChannel,
List<(string name, object value)> networkedVars,
GameTick tick)
{
ApplyClientNetVarChange(networkedVars, tick);
}
private void ApplyClientNetVarChange(List<(string name, object value)> networkedVars, GameTick tick)
{
// Server sent us a CVar update.
Sawmill.Debug($"Handling replicated cvars...");
foreach (var (name, value) in networkedVars)
{
if (!_configVars.TryGetValue(name, out var cVar))
{
Sawmill.Warning($"Server sent an unknown replicated CVar '{name}.'");
continue;
}
if ((cVar.Flags & CVar.CLIENT) != 0)
continue; // ignore the server specified value.
// Actually set the CVar
SetCVarInternal(name, value, tick);
Sawmill.Debug($"name={name}, val={value}");
}
if (!_receivedInitialNwVars)
{
_receivedInitialNwVars = true;
ReceivedInitialNwVars?.Invoke(this, EventArgs.Empty);
}
}
/// <inheritdoc />
public override T GetClientCVar<T>(INetChannel channel, string name) => GetCVar<T>(name);
}

View File

@@ -0,0 +1,27 @@
using Robust.Shared.Configuration;
using Robust.Shared.Timing;
using System;
using System.Collections.Generic;
namespace Robust.Client.Configuration;
/// <summary>
/// A networked configuration manager that controls the replication of
/// console variables between client and server.
/// </summary>
public interface IClientNetConfigurationManager : INetConfigurationManager
{
/// <summary>
/// Synchronize the CVars marked with <see cref="CVar.REPLICATED"/> with the server.
/// This needs to be called once when connecting.
/// </summary>
void SyncWithServer();
/// <summary>
/// Clears internal flag for <see cref="ReceivedInitialNwVars"/>.
/// Must be called upon disconnect.
/// </summary>
void ClearReceivedInitialNwVars();
public event EventHandler ReceivedInitialNwVars;
}

View File

@@ -266,18 +266,18 @@ namespace Robust.Client.Console
}
}
private sealed class RemoteExecCommand : IConsoleCommand
private sealed class RemoteExecCommand : LocalizedCommands
{
public string Command => ">";
public string Description => Loc.GetString("cmd-remoteexec-desc");
public string Help => Loc.GetString("cmd-remoteexec-help");
public override string Command => ">";
public override string Description => LocalizationManager.GetString("cmd-remoteexec-desc");
public override string Help => LocalizationManager.GetString("cmd-remoteexec-help");
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
shell.RemoteExecuteCommand(argStr["> ".Length..]);
}
public async ValueTask<CompletionResult> GetCompletionAsync(
public override async ValueTask<CompletionResult> GetCompletionAsync(
IConsoleShell shell,
string[] args,
CancellationToken cancel)

View File

@@ -6,13 +6,14 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
[UsedImplicitly]
internal sealed class AddCompCommand : IConsoleCommand
internal sealed class AddCompCommand : LocalizedCommands
{
public string Command => "addcompc";
public string Description => "Adds a component to an entity on the client";
public string Help => "addcompc <uid> <componentName>";
[Dependency] private readonly IComponentFactory _componentFactory = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "addcompc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 2)
@@ -24,25 +25,23 @@ namespace Robust.Client.Console.Commands
var entity = EntityUid.Parse(args[0]);
var componentName = args[1];
var compFactory = IoCManager.Resolve<IComponentFactory>();
var entityManager = IoCManager.Resolve<IEntityManager>();
var component = (Component) compFactory.GetComponent(componentName);
var component = (Component) _componentFactory.GetComponent(componentName);
component.Owner = entity;
entityManager.AddComponent(entity, component);
_entityManager.AddComponent(entity, component);
}
}
[UsedImplicitly]
internal sealed class RemoveCompCommand : IConsoleCommand
internal sealed class RemoveCompCommand : LocalizedCommands
{
public string Command => "rmcompc";
public string Description => "Removes a component from an entity.";
public string Help => "rmcompc <uid> <componentName>";
[Dependency] private readonly IComponentFactory _componentFactory = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "rmcompc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 2)
{
@@ -53,12 +52,9 @@ namespace Robust.Client.Console.Commands
var entityUid = EntityUid.Parse(args[0]);
var componentName = args[1];
var entManager = IoCManager.Resolve<IEntityManager>();
var compFactory = IoCManager.Resolve<IComponentFactory>();
var registration = _componentFactory.GetRegistration(componentName);
var registration = compFactory.GetRegistration(componentName);
entManager.RemoveComponent(entityUid, registration.Type);
_entityManager.RemoveComponent(entityUid, registration.Type);
}
}
}

View File

@@ -7,22 +7,23 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
[UsedImplicitly]
internal sealed class ClientSpawnCommand : IConsoleCommand
internal sealed class ClientSpawnCommand : LocalizedCommands
{
public string Command => "cspawn";
public string Description => "Spawns a client-side entity with specific type at your feet.";
public string Help => "cspawn <entity type>";
[Dependency] private readonly IPlayerManager _playerManager = default!;
[Dependency] private readonly IEntityManager _entityManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "cspawn";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var controlled = IoCManager.Resolve<IPlayerManager>().LocalPlayer?.ControlledEntity ?? EntityUid.Invalid;
var controlled = _playerManager.LocalPlayer?.ControlledEntity ?? EntityUid.Invalid;
if (controlled == EntityUid.Invalid)
{
shell.WriteLine("You don't have an attached entity.");
return;
}
var entityManager = IoCManager.Resolve<IEntityManager>();
var entityManager = _entityManager;
entityManager.SpawnEntity(args[0], entityManager.GetComponent<TransformComponent>(controlled).Coordinates);
}
}

View File

@@ -6,15 +6,16 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
[UsedImplicitly]
public sealed class SaveConfig : IConsoleCommand
public sealed class SaveConfig : LocalizedCommands
{
public string Command => "saveconfig";
public string Description => "Saves the client configuration to the config file";
public string Help => "saveconfig";
[Dependency] private readonly IConfigurationManager _cfg = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "saveconfig";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
IoCManager.Resolve<IConfigurationManager>().SaveToFile();
_cfg.SaveToFile();
}
}

View File

@@ -6,25 +6,21 @@ using Robust.Shared.Console;
namespace Robust.Client.Console.Commands
{
sealed class ClearCommand : IConsoleCommand
sealed class ClearCommand : LocalizedCommands
{
public string Command => "cls";
public string Help => "Clears the debug console of all messages.";
public string Description => "Clears the console.";
public override string Command => "cls";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
shell.Clear();
}
}
sealed class FillCommand : IConsoleCommand
sealed class FillCommand : LocalizedCommands
{
public string Command => "fill";
public string Help => "Fills the console with some nonsense for debugging.";
public string Description => "Fill up the console for debugging.";
public override string Command => "fill";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
for (int x = 0; x < 50; x++)
{

View File

@@ -21,6 +21,7 @@ using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Map;
using Robust.Shared.Map.Components;
using Robust.Shared.Maths;
using Robust.Shared.Network;
using Robust.Shared.Reflection;
@@ -31,30 +32,31 @@ using static Robust.Client.UserInterface.Controls.BoxContainer;
namespace Robust.Client.Console.Commands
{
internal sealed class DumpEntitiesCommand : IConsoleCommand
internal sealed class DumpEntitiesCommand : LocalizedCommands
{
public string Command => "dumpentities";
public string Help => "Dump entity list";
public string Description => "Dumps entity list of UIDs and prototype.";
[Dependency] private readonly IEntityManager _entityManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "dumpentities";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var entityManager = IoCManager.Resolve<IEntityManager>();
foreach (var e in entityManager.GetEntities().OrderBy(e => e))
foreach (var e in _entityManager.GetEntities().OrderBy(e => e))
{
shell.WriteLine($"entity {e}, {entityManager.GetComponent<MetaDataComponent>(e).EntityPrototype?.ID}, {entityManager.GetComponent<TransformComponent>(e).Coordinates}.");
shell.WriteLine(
$"entity {e}, {_entityManager.GetComponent<MetaDataComponent>(e).EntityPrototype?.ID}, {_entityManager.GetComponent<TransformComponent>(e).Coordinates}.");
}
}
}
internal sealed class GetComponentRegistrationCommand : IConsoleCommand
internal sealed class GetComponentRegistrationCommand : LocalizedCommands
{
public string Command => "getcomponentregistration";
public string Help => "Usage: getcomponentregistration <componentName>";
public string Description => "Gets component registration information";
[Dependency] private readonly IComponentFactory _componentFactory = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "getcomponentregistration";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length < 1)
{
@@ -62,11 +64,9 @@ namespace Robust.Client.Console.Commands
return;
}
var componentFactory = IoCManager.Resolve<IComponentFactory>();
try
{
var registration = componentFactory.GetRegistration(args[0]);
var registration = _componentFactory.GetRegistration(args[0]);
var message = new StringBuilder($"'{registration.Name}': (type: {registration.Type}, ");
if (registration.NetID == null)
@@ -94,13 +94,14 @@ namespace Robust.Client.Console.Commands
}
}
internal sealed class ToggleMonitorCommand : IConsoleCommand
internal sealed class ToggleMonitorCommand : LocalizedCommands
{
public string Command => "monitor";
[Dependency] private readonly IUserInterfaceManager _uiMgr = default!;
public string Description => Loc.GetString("cmd-monitor-desc");
public string Help
public override string Command => "monitor";
public override string Help
{
get
{
@@ -109,9 +110,9 @@ namespace Robust.Client.Console.Commands
}
}
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var monitors = IoCManager.Resolve<IUserInterfaceManager>().DebugMonitors;
var monitors = _uiMgr.DebugMonitors;
if (args.Length != 1)
{
@@ -149,7 +150,7 @@ namespace Robust.Client.Console.Commands
monitors.ToggleMonitor(parsedMonitor);
}
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
if (args.Length == 1)
{
@@ -167,38 +168,36 @@ namespace Robust.Client.Console.Commands
}
}
internal sealed class ExceptionCommand : IConsoleCommand
internal sealed class ExceptionCommand : LocalizedCommands
{
public string Command => "fuck";
public string Help => "Throws an exception";
public string Description => "Throws an exception";
public override string Command => "fuck";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
throw new InvalidOperationException("Fuck");
}
}
internal sealed class ShowPositionsCommand : IConsoleCommand
internal sealed class ShowPositionsCommand : LocalizedCommands
{
public string Command => "showpos";
public string Help => "";
public string Description => "Enables debug drawing over all entity positions in the game.";
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "showpos";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = EntitySystem.Get<DebugDrawingSystem>();
var mgr = _entitySystems.GetEntitySystem<DebugDrawingSystem>();
mgr.DebugPositions = !mgr.DebugPositions;
}
}
internal sealed class ShowRayCommand : IConsoleCommand
internal sealed class ShowRayCommand : LocalizedCommands
{
public string Command => "showrays";
public string Help => "Usage: showrays <raylifetime>";
public string Description => "Toggles debug drawing of physics rays. An integer for <raylifetime> must be provided";
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "showrays";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
@@ -212,35 +211,32 @@ namespace Robust.Client.Console.Commands
return;
}
var mgr = EntitySystem.Get<DebugRayDrawingSystem>();
var mgr = _entitySystems.GetEntitySystem<DebugRayDrawingSystem>();
mgr.DebugDrawRays = !mgr.DebugDrawRays;
shell.WriteError("Toggled showing rays to:" + mgr.DebugDrawRays);
mgr.DebugRayLifetime = TimeSpan.FromSeconds(duration);
}
}
internal sealed class DisconnectCommand : IConsoleCommand
internal sealed class DisconnectCommand : LocalizedCommands
{
public string Command => "disconnect";
public string Help => "";
public string Description => "Immediately disconnect from the server and go back to the main menu.";
[Dependency] private readonly IClientNetManager _netManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "disconnect";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
IoCManager.Resolve<IClientNetManager>().ClientDisconnect("Disconnect command used.");
_netManager.ClientDisconnect("Disconnect command used.");
}
}
internal sealed class EntityInfoCommand : IConsoleCommand
internal sealed class EntityInfoCommand : LocalizedCommands
{
public string Command => "entfo";
[Dependency] private readonly IEntityManager _entityManager = default!;
public string Help =>
"entfo <entityuid>\nThe entity UID can be prefixed with 'c' to convert it to a client entity UID.";
public override string Command => "entfo";
public string Description => "Displays verbose diagnostics for an entity.";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
@@ -255,15 +251,17 @@ namespace Robust.Client.Console.Commands
}
var uid = EntityUid.Parse(args[0]);
var entmgr = IoCManager.Resolve<IEntityManager>();
var entmgr = _entityManager;
if (!entmgr.EntityExists(uid))
{
shell.WriteError("That entity does not exist. Sorry lad.");
return;
}
var meta = entmgr.GetComponent<MetaDataComponent>(uid);
shell.WriteLine($"{uid}: {meta.EntityPrototype?.ID}/{meta.EntityName}");
shell.WriteLine($"init/del/lmt: {meta.EntityInitialized}/{meta.EntityDeleted}/{meta.EntityLastModifiedTick}");
shell.WriteLine(
$"init/del/lmt: {meta.EntityInitialized}/{meta.EntityDeleted}/{meta.EntityLastModifiedTick}");
foreach (var component in entmgr.GetComponents(uid))
{
shell.WriteLine(component.ToString() ?? "");
@@ -283,13 +281,13 @@ namespace Robust.Client.Console.Commands
}
}
internal sealed class SnapGridGetCell : IConsoleCommand
internal sealed class SnapGridGetCell : LocalizedCommands
{
public string Command => "sggcell";
public string Help => "sggcell <gridID> <vector2i>\nThat vector2i param is in the form x<int>,y<int>.";
public string Description => "Lists entities on a snap grid cell.";
[Dependency] private readonly IMapManager _map = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "sggcell";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 2)
{
@@ -297,12 +295,11 @@ namespace Robust.Client.Console.Commands
return;
}
string gridId = args[0];
string indices = args[1];
if (!int.TryParse(args[0], out var id))
if (!EntityUid.TryParse(args[0], out var gridUid))
{
shell.WriteError($"{args[0]} is not a valid integer.");
shell.WriteError($"{args[0]} is not a valid entity UID.");
return;
}
@@ -312,15 +309,11 @@ namespace Robust.Client.Console.Commands
return;
}
var mapMan = IoCManager.Resolve<IMapManager>();
if (mapMan.GridExists(new GridId(int.Parse(gridId, CultureInfo.InvariantCulture))))
if (_map.TryGetGrid(gridUid, out var grid))
{
foreach (var entity in
mapMan.GetGrid(new GridId(int.Parse(gridId, CultureInfo.InvariantCulture))).GetAnchoredEntities(
new Vector2i(
int.Parse(indices.Split(',')[0], CultureInfo.InvariantCulture),
int.Parse(indices.Split(',')[1], CultureInfo.InvariantCulture))))
foreach (var entity in grid.GetAnchoredEntities(new Vector2i(
int.Parse(indices.Split(',')[0], CultureInfo.InvariantCulture),
int.Parse(indices.Split(',')[1], CultureInfo.InvariantCulture))))
{
shell.WriteLine(entity.ToString());
}
@@ -332,104 +325,103 @@ namespace Robust.Client.Console.Commands
}
}
internal sealed class SetPlayerName : IConsoleCommand
internal sealed class SetPlayerName : LocalizedCommands
{
public string Command => "overrideplayername";
public string Description => "Changes the name used when attempting to connect to the server.";
public string Help => Command + " <name>";
[Dependency] private readonly IBaseClient _baseClient = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "overrideplayername";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length < 1)
{
shell.WriteLine(Help);
return;
}
var client = IoCManager.Resolve<IBaseClient>();
client.PlayerNameOverride = args[0];
_baseClient.PlayerNameOverride = args[0];
shell.WriteLine($"Overriding player name to \"{args[0]}\".");
}
}
internal sealed class LoadResource : IConsoleCommand
internal sealed class LoadResource : LocalizedCommands
{
public string Command => "ldrsc";
public string Description => "Pre-caches a resource.";
public string Help => "ldrsc <path> <type>";
[Dependency] private readonly IResourceCache _res = default!;
[Dependency] private readonly IReflectionManager _reflection = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "ldrsc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length < 2)
{
shell.WriteLine(Help);
return;
}
var resourceCache = IoCManager.Resolve<IResourceCache>();
var reflection = IoCManager.Resolve<IReflectionManager>();
Type type;
try
{
type = reflection.LooseGetType(args[1]);
type = _reflection.LooseGetType(args[1]);
}
catch(ArgumentException)
catch (ArgumentException)
{
shell.WriteError("Unable to find type");
return;
}
var getResourceMethod =
resourceCache
_res
.GetType()
.GetMethod("GetResource", new[] { typeof(string), typeof(bool) });
DebugTools.Assert(getResourceMethod != null);
var generic = getResourceMethod!.MakeGenericMethod(type);
generic.Invoke(resourceCache, new object[] { args[0], true });
generic.Invoke(_res, new object[] { args[0], true });
}
}
internal sealed class ReloadResource : IConsoleCommand
internal sealed class ReloadResource : LocalizedCommands
{
public string Command => "rldrsc";
public string Description => "Reloads a resource.";
public string Help => "rldrsc <path> <type>";
[Dependency] private readonly IResourceCache _res = default!;
[Dependency] private readonly IReflectionManager _reflection = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "rldrsc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length < 2)
{
shell.WriteLine(Help);
return;
}
var resourceCache = IoCManager.Resolve<IResourceCache>();
var reflection = IoCManager.Resolve<IReflectionManager>();
Type type;
try
{
type = reflection.LooseGetType(args[1]);
type = _reflection.LooseGetType(args[1]);
}
catch(ArgumentException)
catch (ArgumentException)
{
shell.WriteError("Unable to find type");
return;
}
var getResourceMethod = resourceCache.GetType().GetMethod("ReloadResource", new[] { typeof(string) });
var getResourceMethod = _res.GetType().GetMethod("ReloadResource", new[] { typeof(string) });
DebugTools.Assert(getResourceMethod != null);
var generic = getResourceMethod!.MakeGenericMethod(type);
generic.Invoke(resourceCache, new object[] { args[0] });
generic.Invoke(_res, new object[] { args[0] });
}
}
internal sealed class GridTileCount : IConsoleCommand
internal sealed class GridTileCount : LocalizedCommands
{
public string Command => "gridtc";
public string Description => "Gets the tile count of a grid";
public string Help => "Usage: gridtc <gridId>";
[Dependency] private readonly IMapManager _map = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "gridtc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
@@ -437,40 +429,35 @@ namespace Robust.Client.Console.Commands
return;
}
if (!int.TryParse(args[0], out var id))
if (!EntityUid.TryParse(args[0], out var gridUid))
{
shell.WriteLine($"{args[0]} is not a valid integer.");
shell.WriteLine($"{args[0]} is not a valid entity UID.");
return;
}
var gridId = new GridId(int.Parse(args[0]));
var mapManager = IoCManager.Resolve<IMapManager>();
if (mapManager.TryGetGrid(gridId, out var grid))
if (_map.TryGetGrid(gridUid, out var grid))
{
shell.WriteLine(mapManager.GetGrid(gridId).GetAllTiles().Count().ToString());
shell.WriteLine(grid.GetAllTiles().Count().ToString());
}
else
{
shell.WriteError($"No grid exists with id {id}");
shell.WriteError($"No grid exists with id {gridUid}");
}
}
}
internal sealed class GuiDumpCommand : IConsoleCommand
internal sealed class GuiDumpCommand : LocalizedCommands
{
public string Command => "guidump";
public string Description => "Dump GUI tree to /guidump.txt in user data.";
public string Help => "guidump";
[Dependency] private readonly IUserInterfaceManager _ui = default!;
[Dependency] private readonly IResourceCache _res = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "guidump";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var uiMgr = IoCManager.Resolve<IUserInterfaceManager>();
var res = IoCManager.Resolve<IResourceManager>();
using var writer = _res.UserData.OpenWriteText(new ResourcePath("/guidump.txt"));
using var writer = res.UserData.OpenWriteText(new ResourcePath("/guidump.txt"));
foreach (var root in uiMgr.AllRoots)
foreach (var root in _ui.AllRoots)
{
writer.WriteLine($"ROOT: {root}");
_writeNode(root, 0, writer);
@@ -531,278 +518,133 @@ namespace Robust.Client.Console.Commands
}
}
internal sealed class UITestCommand : IConsoleCommand
internal sealed class SetClipboardCommand : LocalizedCommands
{
public string Command => "uitest";
public string Description => "Open a dummy UI testing window";
public string Help => "uitest";
[Dependency] private readonly IClipboardManager _clipboard = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "setclipboard";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var window = new DefaultWindow { MinSize = (500, 400)};
var tabContainer = new TabContainer();
window.Contents.AddChild(tabContainer);
var scroll = new ScrollContainer();
tabContainer.AddChild(scroll);
//scroll.SetAnchorAndMarginPreset(Control.LayoutPreset.Wide);
var vBox = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
scroll.AddChild(vBox);
var progressBar = new ProgressBar { MaxValue = 10, Value = 5 };
vBox.AddChild(progressBar);
var optionButton = new OptionButton();
optionButton.AddItem("Honk");
optionButton.AddItem("Foo");
optionButton.AddItem("Bar");
optionButton.AddItem("Baz");
optionButton.OnItemSelected += eventArgs => optionButton.SelectId(eventArgs.Id);
vBox.AddChild(optionButton);
var tree = new Tree { VerticalExpand = true };
var root = tree.CreateItem();
root.Text = "Honk!";
var child = tree.CreateItem();
child.Text = "Foo";
for (var i = 0; i < 20; i++)
{
child = tree.CreateItem();
child.Text = $"Bar {i}";
}
vBox.AddChild(tree);
var rich = new RichTextLabel();
var message = new FormattedMessage();
message.AddText("Foo\n");
message.PushColor(Color.Red);
message.AddText("Bar");
message.Pop();
rich.SetMessage(message);
vBox.AddChild(rich);
var itemList = new ItemList();
tabContainer.AddChild(itemList);
for (var i = 0; i < 10; i++)
{
itemList.AddItem(i.ToString());
}
var grid = new GridContainer { Columns = 3 };
tabContainer.AddChild(grid);
for (var y = 0; y < 3; y++)
{
for (var x = 0; x < 3; x++)
{
grid.AddChild(new Button
{
MinSize = (50, 50),
Text = $"{x}, {y}"
});
}
}
var group = new ButtonGroup();
var vBoxRadioButtons = new BoxContainer
{
Orientation = LayoutOrientation.Vertical
};
for (var i = 0; i < 10; i++)
{
vBoxRadioButtons.AddChild(new Button
{
Text = i.ToString(),
Group = group
});
// ftftftftftftft
}
tabContainer.AddChild(vBoxRadioButtons);
TabContainer.SetTabTitle(vBoxRadioButtons, "Radio buttons!!");
tabContainer.AddChild(new BoxContainer
{
Orientation = LayoutOrientation.Vertical,
Name = "Slider",
Children =
{
new Slider()
}
});
tabContainer.AddChild(new SplitContainer
{
Orientation = SplitContainer.SplitOrientation.Horizontal,
Children =
{
new PanelContainer
{
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Red},
Children =
{
new Label{ Text = "FOOBARBAZ"},
}
},
new PanelContainer
{
PanelOverride = new StyleBoxFlat {BackgroundColor = Color.Blue},
Children =
{
new Label{ Text = "FOOBARBAZ"},
}
},
}
});
window.OpenCentered();
_clipboard.SetText(args[0]);
}
}
internal sealed class SetClipboardCommand : IConsoleCommand
internal sealed class GetClipboardCommand : LocalizedCommands
{
public string Command => "setclipboard";
public string Description => "Sets the system clipboard";
public string Help => "setclipboard <text>";
[Dependency] private readonly IClipboardManager _clipboard = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "getclipboard";
public override async void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<IClipboardManager>();
mgr.SetText(args[0]);
shell.WriteLine(await _clipboard.GetText());
}
}
internal sealed class GetClipboardCommand : IConsoleCommand
internal sealed class ToggleLight : LocalizedCommands
{
public string Command => "getclipboard";
public string Description => "Gets the system clipboard";
public string Help => "getclipboard";
[Dependency] private readonly ILightManager _light = default!;
public async void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "togglelight";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<IClipboardManager>();
shell.WriteLine(await mgr.GetText());
if (!_light.LockConsoleAccess)
_light.Enabled = !_light.Enabled;
}
}
internal sealed class ToggleLight : IConsoleCommand
internal sealed class ToggleFOV : LocalizedCommands
{
public string Command => "togglelight";
public string Description => "Toggles light rendering.";
public string Help => "togglelight";
[Dependency] private readonly IEyeManager _eye = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "togglefov";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<ILightManager>();
if (!mgr.LockConsoleAccess)
mgr.Enabled = !mgr.Enabled;
_eye.CurrentEye.DrawFov = !_eye.CurrentEye.DrawFov;
}
}
internal sealed class ToggleFOV : IConsoleCommand
internal sealed class ToggleHardFOV : LocalizedCommands
{
public string Command => "togglefov";
public string Description => "Toggles fov for client.";
public string Help => "togglefov";
[Dependency] private readonly ILightManager _light = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "togglehardfov";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<IEyeManager>();
if (mgr.CurrentEye != null)
mgr.CurrentEye.DrawFov = !mgr.CurrentEye.DrawFov;
if (!_light.LockConsoleAccess)
_light.DrawHardFov = !_light.DrawHardFov;
}
}
internal sealed class ToggleHardFOV : IConsoleCommand
internal sealed class ToggleShadows : LocalizedCommands
{
public string Command => "togglehardfov";
public string Description => "Toggles hard fov for client (for debugging space-station-14#2353).";
public string Help => "togglehardfov";
[Dependency] private readonly ILightManager _light = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "toggleshadows";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<ILightManager>();
if (!mgr.LockConsoleAccess)
mgr.DrawHardFov = !mgr.DrawHardFov;
if (!_light.LockConsoleAccess)
_light.DrawShadows = !_light.DrawShadows;
}
}
internal sealed class ToggleShadows : IConsoleCommand
internal sealed class ToggleLightBuf : LocalizedCommands
{
public string Command => "toggleshadows";
public string Description => "Toggles shadow rendering.";
public string Help => "toggleshadows";
[Dependency] private readonly ILightManager _light = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<ILightManager>();
if (!mgr.LockConsoleAccess)
mgr.DrawShadows = !mgr.DrawShadows;
}
}
internal sealed class ToggleLightBuf : IConsoleCommand
{
public string Command => "togglelightbuf";
public string Description => "Toggles lighting rendering. This includes shadows but not FOV.";
public string Help => "togglelightbuf";
public override string Command => "togglelightbuf";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<ILightManager>();
if (!mgr.LockConsoleAccess)
mgr.DrawLighting = !mgr.DrawLighting;
if (!_light.LockConsoleAccess)
_light.DrawLighting = !_light.DrawLighting;
}
}
internal sealed class ChunkInfoCommand : IConsoleCommand
internal sealed class ChunkInfoCommand : LocalizedCommands
{
public string Command => "chunkinfo";
public string Description => "Gets info about a chunk under your mouse cursor.";
public string Help => Command;
[Dependency] private readonly IMapManager _map = default!;
[Dependency] private readonly IEyeManager _eye = default!;
[Dependency] private readonly IInputManager _input = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "chunkinfo";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mapMan = IoCManager.Resolve<IMapManager>();
var inputMan = IoCManager.Resolve<IInputManager>();
var eyeMan = IoCManager.Resolve<IEyeManager>();
var mousePos = _eye.ScreenToMap(_input.MouseScreenPosition);
var mousePos = eyeMan.ScreenToMap(inputMan.MouseScreenPosition);
if (!mapMan.TryFindGridAt(mousePos, out var grid))
if (!_map.TryFindGridAt(mousePos, out var grid))
{
shell.WriteLine("No grid under your mouse cursor.");
return;
}
var internalGrid = (IMapGridInternal)grid;
var chunkIndex = grid.LocalToChunkIndices(grid.MapToGrid(mousePos));
var chunk = internalGrid.GetChunk(chunkIndex);
var chunk = grid.GetOrAddChunk(chunkIndex);
shell.WriteLine($"worldBounds: {internalGrid.CalcWorldAABB(chunk)} localBounds: {chunk.CachedBounds}");
shell.WriteLine($"worldBounds: {grid.CalcWorldAABB(chunk)} localBounds: {chunk.CachedBounds}");
}
}
internal sealed class ReloadShadersCommand : IConsoleCommand
internal sealed class ReloadShadersCommand : LocalizedCommands
{
[Dependency] private readonly IResourceCacheInternal _res = default!;
[Dependency] private readonly ITaskManager _taskManager = default!;
public string Command => "rldshader";
public string Description => "Reloads all shaders";
public string Help => "rldshader";
public override string Command => "rldshader";
public static Dictionary<string, FileSystemWatcher>? _watchers;
public static ConcurrentDictionary<string, bool>? _reloadShadersQueued = new();
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
IResourceCacheInternal resC;
var resC = _res;
if (args.Length == 1)
{
if (args[0] == "+watch")
@@ -812,16 +654,16 @@ namespace Robust.Client.Console.Commands
shell.WriteLine("Already watching.");
return;
}
resC = IoCManager.Resolve<IResourceCacheInternal>();
_watchers = new Dictionary<string, FileSystemWatcher>();
var stringComparer = PathHelpers.IsFileSystemCaseSensitive()
? StringComparer.Ordinal : StringComparer.OrdinalIgnoreCase;
? StringComparer.Ordinal
: StringComparer.OrdinalIgnoreCase;
var reversePathResolution = new ConcurrentDictionary<string, HashSet<ResourcePath>>(stringComparer);
var taskManager = IoCManager.Resolve<ITaskManager>();
var taskManager = _taskManager;
var shaderCount = 0;
var created = 0;
@@ -877,8 +719,7 @@ namespace Robust.Client.Console.Commands
{
try
{
IoCManager.Resolve<IResourceCache>()
.ReloadResource<ShaderSourceResource>(resPath);
resC.ReloadResource<ShaderSourceResource>(resPath);
shell.WriteLine($"Reloaded shader: {resPath}");
}
catch (Exception)
@@ -939,8 +780,6 @@ namespace Robust.Client.Console.Commands
shell.WriteLine("Reloading content shader resources...");
resC = IoCManager.Resolve<IResourceCacheInternal>();
foreach (var (path, _) in resC.GetAllResources<ShaderSourceResource>())
{
try
@@ -955,26 +794,23 @@ namespace Robust.Client.Console.Commands
shell.WriteLine("Done.");
}
}
internal sealed class ClydeDebugLayerCommand : IConsoleCommand
internal sealed class ClydeDebugLayerCommand : LocalizedCommands
{
public string Command => "cldbglyr";
public string Description => "Toggle fov and light debug layers";
public string Help => "cldbglyr <layer>: Toggle <layer>\ncldbglyr: Turn all Layers off";
[Dependency] private readonly IClydeInternal _clyde = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "cldbglyr";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var clyde = IoCManager.Resolve<IClydeInternal>();
if (args.Length < 1)
{
clyde.DebugLayers = ClydeDebugLayers.None;
_clyde.DebugLayers = ClydeDebugLayers.None;
return;
}
clyde.DebugLayers = args[0] switch
_clyde.DebugLayers = args[0] switch
{
"fov" => ClydeDebugLayers.Fov,
"light" => ClydeDebugLayers.Light,
@@ -983,13 +819,13 @@ namespace Robust.Client.Console.Commands
}
}
internal sealed class GetKeyInfoCommand : IConsoleCommand
internal sealed class GetKeyInfoCommand : LocalizedCommands
{
public string Command => "keyinfo";
public string Description => "Keys key info for a key";
public string Help => "keyinfo <Key>";
[Dependency] private readonly IClydeInternal _clyde = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "keyinfo";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
@@ -997,13 +833,11 @@ namespace Robust.Client.Console.Commands
return;
}
var clyde = IoCManager.Resolve<IClydeInternal>();
if (Enum.TryParse(typeof(Keyboard.Key), args[0], true, out var parsed))
{
var key = (Keyboard.Key) parsed!;
var key = (Keyboard.Key)parsed!;
var name = clyde.GetKeyName(key);
var name = _clyde.GetKeyName(key);
shell.WriteLine($"name: '{name}' ");
}

View File

@@ -5,12 +5,11 @@ using Robust.Shared.GameObjects;
namespace Robust.Client.Console.Commands
{
public sealed class DebugAnchoredCommand : IConsoleCommand
public sealed class DebugAnchoredCommand : LocalizedCommands
{
public string Command => "showanchored";
public string Description => $"Shows anchored entities on a particular tile";
public string Help => $"{Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "showanchored";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
EntitySystem.Get<DebugAnchoringSystem>().Enabled ^= true;
}

View File

@@ -5,13 +5,11 @@ using Robust.Shared.ContentPack;
namespace Robust.Client.Console.Commands
{
#if DEBUG
internal sealed class DumpMetadataMembersCommand : IConsoleCommand
internal sealed class DumpMetadataMembersCommand : LocalizedCommands
{
public string Command => "dmetamem";
public string Description => "Dumps a type's members in a format suitable for the sandbox configuration file.";
public string Help => "Usage: dmetamem <type>";
public override string Command => "dmetamem";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var type = Type.GetType(args[0]);

View File

@@ -4,12 +4,11 @@ using Robust.Shared.GameObjects;
namespace Robust.Client.Console.Commands
{
public sealed class GridChunkBBCommand : IConsoleCommand
public sealed class GridChunkBBCommand : LocalizedCommands
{
public string Command => "showchunkbb";
public string Description => "Displays chunk bounds for the purposes of rendering";
public string Help => $"{Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "showchunkbb";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
EntitySystem.Get<GridChunkBoundsDebugSystem>().Enabled ^= true;
}

View File

@@ -9,19 +9,23 @@ using Robust.Shared.Network;
namespace Robust.Client.Console.Commands
{
internal sealed class LauncherAuthCommand : IConsoleCommand
internal sealed class LauncherAuthCommand : LocalizedCommands
{
public string Command => "launchauth";
public string Description => "Load authentication tokens from launcher data to aid in testing of live servers";
public string Help => "launchauth [account name]";
[Dependency] private readonly IAuthManager _auth = default!;
[Dependency] private readonly IGameControllerInternal _gameController = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "launchauth";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var wantName = args.Length > 0 ? args[0] : null;
var basePath = Path.GetDirectoryName(UserDataDir.GetUserDataDir())!;
var basePath = Path.GetDirectoryName(UserDataDir.GetUserDataDir(_gameController))!;
var dbPath = Path.Combine(basePath, "launcher", "settings.db");
#if USE_SYSTEM_SQLITE
SQLitePCL.raw.SetProvider(new SQLitePCL.SQLite3Provider_sqlite3());
#endif
using var con = new SqliteConnection($"Data Source={dbPath};Mode=ReadOnly");
con.Open();
using var cmd = con.CreateCommand();
@@ -47,9 +51,8 @@ namespace Robust.Client.Console.Commands
var userName = reader.GetString(1);
var token = reader.GetString(2);
var cfg = IoCManager.Resolve<IAuthManager>();
cfg.Token = token;
cfg.UserId = new NetUserId(userId);
_auth.Token = token;
_auth.UserId = new NetUserId(userId);
shell.WriteLine($"Logged into account {userName}");
}

View File

@@ -5,12 +5,11 @@ using Robust.Shared.GameObjects;
namespace Robust.Client.Console.Commands
{
internal sealed class LightDebugCommand : IConsoleCommand
internal sealed class LightDebugCommand : LocalizedCommands
{
public string Command => "lightbb";
public string Description => "Toggles whether to show light bounding boxes";
public string Help => $"{Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "lightbb";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
EntitySystem.Get<DebugLightTreeSystem>().Enabled ^= true;
}

View File

@@ -7,17 +7,15 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
[UsedImplicitly]
public sealed class LsMonitorCommand : IConsoleCommand
public sealed class LsMonitorCommand : LocalizedCommands
{
public string Command => "lsmonitor";
public string Description => "";
public string Help => "";
[Dependency] private readonly IClyde _clyde = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "lsmonitor";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var clyde = IoCManager.Resolve<IClyde>();
foreach (var monitor in clyde.EnumerateMonitors())
foreach (var monitor in _clyde.EnumerateMonitors())
{
shell.WriteLine(
$"[{monitor.Id}] {monitor.Name}: {monitor.Size.X}x{monitor.Size.Y}@{monitor.RefreshRate}Hz");
@@ -26,13 +24,13 @@ namespace Robust.Client.Console.Commands
}
[UsedImplicitly]
public sealed class MonitorInfoCommand : IConsoleCommand
public sealed class MonitorInfoCommand : LocalizedCommands
{
public string Command => "monitorinfo";
public string Description => "";
public string Help => "Usage: monitorinfo <id>";
[Dependency] private readonly IClyde _clyde = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "monitorinfo";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length < 1)
{
@@ -40,8 +38,7 @@ namespace Robust.Client.Console.Commands
return;
}
var clyde = IoCManager.Resolve<IClyde>();
var monitor = clyde.EnumerateMonitors().Single(c => c.Id == int.Parse(args[0]));
var monitor = _clyde.EnumerateMonitors().Single(c => c.Id == int.Parse(args[0]));
shell.WriteLine($"{monitor.Id}: {monitor.Name}");
shell.WriteLine($"Video modes:");
@@ -54,19 +51,17 @@ namespace Robust.Client.Console.Commands
}
[UsedImplicitly]
public sealed class SetMonitorCommand : IConsoleCommand
public sealed class SetMonitorCommand : LocalizedCommands
{
public string Command => "setmonitor";
public string Description => "";
public string Help => "Usage: setmonitor <id>";
[Dependency] private readonly IClyde _clyde = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "setmonitor";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var clyde = IoCManager.Resolve<IClyde>();
var id = int.Parse(args[0]);
var monitor = clyde.EnumerateMonitors().Single(m => m.Id == id);
clyde.SetWindowMonitor(monitor);
var monitor = _clyde.EnumerateMonitors().Single(m => m.Id == id);
_clyde.SetWindowMonitor(monitor);
}
}
}

View File

@@ -1,17 +1,18 @@
using Robust.Client.Debugging;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
namespace Robust.Client.Console.Commands
{
public sealed class PhysicsOverlayCommands : IConsoleCommand
public sealed class PhysicsOverlayCommands : LocalizedCommands
{
public string Command => "physics";
public string Description => $"Shows a debug physics overlay. The arg supplied specifies the overlay.";
public string Help => $"{Command} <aabbs / com / contactnormals / contactpoints / joints / shapeinfo / shapes>";
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "physics";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
@@ -19,7 +20,7 @@ namespace Robust.Client.Console.Commands
return;
}
var system = EntitySystem.Get<DebugPhysicsSystem>();
var system = _entitySystems.GetEntitySystem<DebugPhysicsSystem>();
switch (args[0])
{
@@ -35,6 +36,9 @@ namespace Robust.Client.Console.Commands
case "contactpoints":
system.Flags ^= PhysicsDebugFlags.ContactPoints;
break;
case "distance":
system.Flags ^= PhysicsDebugFlags.Distance;
break;
case "joints":
system.Flags ^= PhysicsDebugFlags.Joints;
break;
@@ -52,7 +56,7 @@ namespace Robust.Client.Console.Commands
return;
}
public CompletionResult GetCompletion(IConsoleShell shell, string[] args)
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
if (args.Length != 1) return CompletionResult.Empty;
@@ -62,6 +66,7 @@ namespace Robust.Client.Console.Commands
"com",
"contactnormals",
"contactpoints",
"distance",
"joints",
"shapeinfo",
"shapes",

View File

@@ -0,0 +1,61 @@
#if !FULL_RELEASE
using System;
using JetBrains.Profiler.Api;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Timing;
namespace Robust.Client.Console.Commands;
public sealed class ProfileEntitySpawningCommand : IConsoleCommand
{
[Dependency] private readonly IEntityManager _entities = default!;
public string Command => "profileEntitySpawning";
public string Description => "Profiles entity spawning with n entities";
public string Help => $"Usage: {Command} | {Command} <amount> <prototype>";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
var amount = 1000;
string? prototype = null;
switch (args.Length)
{
case 0:
break;
case 2:
if (!int.TryParse(args[0], out amount))
{
shell.WriteError($"First argument is not an integer: {args[0]}");
return;
}
prototype = args[1];
break;
default:
shell.WriteError(Help);
return;
}
GC.Collect();
var stopwatch = new Stopwatch();
stopwatch.Start();
MeasureProfiler.StartCollectingData();
for (var i = 0; i < amount; i++)
{
_entities.SpawnEntity(prototype, MapCoordinates.Nullspace);
}
MeasureProfiler.SaveData();
shell.WriteLine($"Client: Profiled spawning {amount} entities in {stopwatch.Elapsed.TotalMilliseconds:N3} ms");
}
}
#endif

View File

@@ -4,27 +4,25 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
sealed class HardQuitCommand : IConsoleCommand
sealed class HardQuitCommand : LocalizedCommands
{
public string Command => "hardquit";
public string Description => "Kills the game client instantly.";
public string Help => "Kills the game client instantly, leaving no traces. No telling the server goodbye";
public override string Command => "hardquit";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
Environment.Exit(0);
}
}
sealed class QuitCommand : IConsoleCommand
sealed class QuitCommand : LocalizedCommands
{
public string Command => "quit";
public string Description => "Shuts down the game client gracefully.";
public string Help => "Properly shuts down the game client, notifying the connected server and such.";
[Dependency] private readonly IGameController _gameController = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "quit";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
IoCManager.Resolve<IGameController>().Shutdown("quit command used");
_gameController.Shutdown("quit command used");
}
}
}

View File

@@ -4,15 +4,15 @@ using Robust.Shared.Localization;
namespace Robust.Client.Console.Commands
{
internal sealed class ReloadLocalizationsCommand : IConsoleCommand
internal sealed class ReloadLocalizationsCommand : LocalizedCommands
{
public string Command => "rldloc";
public string Description => "Reloads localization (client & server)";
public string Help => "Usage: rldloc";
[Dependency] private readonly ILocalizationManager _loc = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "rldloc";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
IoCManager.Resolve<ILocalizationManager>().ReloadLocalizations();
_loc.ReloadLocalizations();
shell.RemoteExecuteCommand("sudo rldloc");
}

View File

@@ -4,47 +4,42 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
#if CLIENT_SCRIPTING
internal sealed class ScriptCommand : IConsoleCommand
internal sealed class ScriptCommand : LocalizedCommands
{
public string Command => "csi";
public string Description => "Opens a C# interactive console.";
public string Help => "csi";
public override string Command => "csi";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
new ScriptConsoleClient().OpenCentered();
}
}
internal sealed class WatchCommand : IConsoleCommand
internal sealed class WatchCommand : LocalizedCommands
{
public string Command => "watch";
public string Description => "Opens a variable watch window.";
public string Help => "watch";
public override string Command => "watch";
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
new WatchWindow().OpenCentered();
}
}
#endif
internal sealed class ServerScriptCommand : IConsoleCommand
internal sealed class ServerScriptCommand : LocalizedCommands
{
public string Command => "scsi";
public string Description => "Opens a C# interactive console on the server.";
public string Help => "scsi";
[Dependency] private readonly IScriptClient _scriptClient = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "scsi";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var mgr = IoCManager.Resolve<IScriptClient>();
if (!mgr.CanScript)
if (!_scriptClient.CanScript)
{
shell.WriteError("You do not have server side scripting permission.");
return;
}
mgr.StartSession();
_scriptClient.StartSession();
}
}
}

View File

@@ -4,20 +4,19 @@ using Robust.Shared.Network;
namespace Robust.Client.Console.Commands
{
internal sealed class SendGarbageCommand : IConsoleCommand
internal sealed class SendGarbageCommand : LocalizedCommands
{
public string Command => "sendgarbage";
public string Description => "Sends garbage to the server.";
public string Help => "The server will reply with 'no u'";
[Dependency] private readonly IClientNetManager _netManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "sendgarbage";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
// MsgStringTableEntries is registered as NetMessageAccept.Client so the server will immediately deny it.
// And kick us.
var net = IoCManager.Resolve<IClientNetManager>();
var msg = new MsgStringTableEntries();
msg.Entries = new MsgStringTableEntries.Entry[0];
net.ClientSendMessage(msg);
_netManager.ClientSendMessage(msg);
}
}
}

View File

@@ -6,13 +6,13 @@ using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
[UsedImplicitly]
public sealed class SetInputContextCommand : IConsoleCommand
public sealed class SetInputContextCommand : LocalizedCommands
{
public string Command => "setinputcontext";
public string Description => "Sets the active input context.";
public string Help => "setinputcontext <context>";
[Dependency] private readonly IInputManager _inputManager = default!;
public void Execute(IConsoleShell shell, string argStr, string[] args)
public override string Command => "setinputcontext";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length != 1)
{
@@ -20,15 +20,13 @@ namespace Robust.Client.Console.Commands
return;
}
var inputMan = IoCManager.Resolve<IInputManager>();
if (!inputMan.Contexts.Exists(args[0]))
if (!_inputManager.Contexts.Exists(args[0]))
{
shell.WriteLine("Context not found!");
return;
}
inputMan.Contexts.SetActiveContext(args[0]);
_inputManager.Contexts.SetActiveContext(args[0]);
}
}
}

View File

@@ -0,0 +1,285 @@
using System;
using Robust.Client.Graphics;
using Robust.Client.UserInterface;
using Robust.Client.UserInterface.Controls;
using Robust.Client.UserInterface.CustomControls;
using Robust.Shared.Console;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Shared.Maths;
using Robust.Shared.Utility;
namespace Robust.Client.Console.Commands;
internal sealed class UITestControl : Control
{
private const string Lipsum = @"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer sed interdum diam. Duis erat risus, tincidunt at pulvinar non, accumsan non dui. Morbi feugiat nisi in odio consectetur, ac suscipit nulla mollis. Nulla consequat neque sit amet neque venenatis feugiat. Proin placerat eget mauris sit amet tincidunt. Sed pulvinar purus sed ex varius, et lobortis risus efficitur. Integer blandit eu neque quis elementum. Vivamus lacinia sem non lacinia eleifend. Integer sit amet est ac risus tempus iaculis sed quis leo. Proin eu dui tincidunt orci ornare elementum. Curabitur molestie enim scelerisque, porttitor ipsum vitae, posuere libero. Donec finibus placerat accumsan. Nam et arcu lacus.
Proin sed dui gravida nibh faucibus sodales ut sit amet dolor. Pellentesque ornare neque ac ante sagittis posuere. Maecenas ullamcorper pellentesque aliquet. Vestibulum ipsum ipsum, hendrerit eu venenatis eget, tempor aliquet ex. Etiam sed nunc eu orci condimentum consequat. Praesent commodo sem a lorem consequat, nec vestibulum elit dignissim. Sed fermentum maximus neque, non vestibulum felis. Quisque vulputate vehicula massa, sit amet accumsan purus condimentum nec. Ut tincidunt in purus sit amet lobortis. Nunc et eros vel elit sodales mollis. Aenean facilisis justo libero, at mollis arcu rutrum eget. Aenean rutrum, orci pretium faucibus auctor, tellus quam tincidunt diam, et feugiat turpis lectus nec sem.
Donec et ipsum urna. Vestibulum consequat risus vitae orci consectetur ornare id id ligula. Donec ac nunc venenatis, volutpat elit eget, eleifend ex. Fusce eget odio sed tortor luctus feugiat. Maecenas lobortis nulla sit amet nisl egestas vulputate. Aliquam a placerat nunc. Fusce porta ultricies tortor, vitae dictum elit aliquet ac. In massa sapien, lobortis laoreet odio dignissim, congue blandit nibh. Quisque et iaculis eros, sed pretium felis. Praesent venenatis porta odio sed vulputate. Vivamus lacus nulla, lacinia non commodo id, ultricies nec arcu. Donec scelerisque pretium mollis. Etiam eu facilisis leo.
Curabitur vulputate euismod massa, pulvinar tincidunt arcu vestibulum ut. Sed eu tempus velit, at porttitor justo. In eget turpis fermentum nibh euismod vestibulum. Proin vitae malesuada ipsum. Nunc at aliquet erat, sed maximus tortor. Cras tristique consequat elit, ut venenatis elit feugiat et. In malesuada, erat a tempus vehicula, nulla justo efficitur mauris, vitae ornare lectus massa eu sapien. Nam libero diam, gravida ac dapibus sed, hendrerit sed libero. Sed fringilla enim vel elit finibus congue. Fusce tristique, neque sit amet blandit posuere, ex urna malesuada ligula, ut sodales dolor est vitae lectus. Sed pharetra tincidunt pulvinar. Fusce sit amet finibus nulla, vel maximus tellus. Etiam in nisl ex. Fusce tempus augue lectus, eu sagittis arcu tempor id. Sed feugiat venenatis semper. Cras eget mollis nisi.
Suspendisse hendrerit blandit urna ut laoreet. Suspendisse ac elit at erat malesuada commodo id vel dolor. Etiam sem magna, placerat lobortis mattis a, tincidunt at nisi. Ut gravida arcu purus, eu feugiat turpis accumsan non. Sed sit amet varius enim, sed ornare ante. Integer porta felis felis. Vestibulum euismod velit sit amet eleifend posuere. Cras laoreet fermentum condimentum. Suspendisse potenti. Donec iaculis sodales vestibulum. Etiam quis dictum nisl. Fusce dui ex, viverra nec lacus sed, tincidunt accumsan odio. Nulla sit amet ipsum eros. Curabitur et lectus ut nisi lobortis sollicitudin a eu turpis. Etiam molestie purus vitae porttitor auctor.
";
private readonly TabContainer _tabContainer;
public UITestControl()
{
_tabContainer = new TabContainer();
AddChild(_tabContainer);
var scroll = new ScrollContainer();
_tabContainer.AddChild(scroll);
//scroll.SetAnchorAndMarginPreset(Control.LayoutPreset.Wide);
var vBox = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical
};
scroll.AddChild(vBox);
var progressBar = new ProgressBar { MaxValue = 10, Value = 5 };
vBox.AddChild(progressBar);
var optionButton = new OptionButton();
optionButton.AddItem("Honk");
optionButton.AddItem("Foo");
optionButton.AddItem("Bar");
optionButton.AddItem("Baz");
optionButton.OnItemSelected += eventArgs => optionButton.SelectId(eventArgs.Id);
vBox.AddChild(optionButton);
var tree = new Tree { VerticalExpand = true };
var root = tree.CreateItem();
root.Text = "Honk!";
var child = tree.CreateItem();
child.Text = "Foo";
for (var i = 0; i < 20; i++)
{
child = tree.CreateItem();
child.Text = $"Bar {i}";
}
vBox.AddChild(tree);
var rich = new RichTextLabel();
var message = new FormattedMessage();
message.AddText("Foo\n");
message.PushColor(Color.Red);
message.AddText("Bar");
message.Pop();
rich.SetMessage(message);
vBox.AddChild(rich);
var itemList = new ItemList();
_tabContainer.AddChild(itemList);
for (var i = 0; i < 10; i++)
{
itemList.AddItem(i.ToString());
}
var grid = new GridContainer { Columns = 3 };
_tabContainer.AddChild(grid);
for (var y = 0; y < 3; y++)
{
for (var x = 0; x < 3; x++)
{
grid.AddChild(new Button
{
MinSize = (50, 50),
Text = $"{x}, {y}"
});
}
}
var group = new ButtonGroup();
var vBoxRadioButtons = new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical
};
for (var i = 0; i < 10; i++)
{
vBoxRadioButtons.AddChild(new Button
{
Text = i.ToString(),
Group = group
});
// ftftftftftftft
}
_tabContainer.AddChild(vBoxRadioButtons);
TabContainer.SetTabTitle(vBoxRadioButtons, "Radio buttons!!");
_tabContainer.AddChild(new BoxContainer
{
Orientation = BoxContainer.LayoutOrientation.Vertical,
Name = "Slider",
Children =
{
new Slider()
}
});
_tabContainer.AddChild(new SplitContainer
{
Orientation = SplitContainer.SplitOrientation.Horizontal,
Children =
{
new PanelContainer
{
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Red },
Children =
{
new Label { Text = "FOOBARBAZ" },
}
},
new PanelContainer
{
PanelOverride = new StyleBoxFlat { BackgroundColor = Color.Blue },
Children =
{
new Label { Text = "FOOBARBAZ" },
}
},
}
});
_tabContainer.AddChild(TabTextEdit());
_tabContainer.AddChild(TabRichText());
}
private Control TabTextEdit()
{
var textEdit = new TextEdit
{
Placeholder = new Rope.Leaf("You deleted the lipsum OwO")
};
TabContainer.SetTabTitle(textEdit, "TextEdit");
var lipsumRope = new Rope.Branch(Rope.Leaf.Empty, null);
var startIndex = 0;
while (true)
{
var nextIndex = Lipsum.IndexOf(' ', startIndex);
var str = nextIndex == -1 ? Lipsum[startIndex..] : Lipsum[startIndex..(nextIndex+1)];
lipsumRope = new Rope.Branch(lipsumRope, new Rope.Leaf(str));
if (lipsumRope.Depth > 250)
lipsumRope = (Rope.Branch)Rope.Rebalance(lipsumRope);
if (nextIndex == -1)
break;
startIndex = nextIndex + 1;
}
var rope = new Rope.Branch(lipsumRope, null);
for (var i = 0; i < 10; i++)
{
rope = new Rope.Branch(rope, lipsumRope);
}
rope = (Rope.Branch) Rope.Rebalance(rope);
textEdit.TextRope = rope;
return textEdit;
}
private Control TabRichText()
{
var label = new RichTextLabel();
label.SetMessage(FormattedMessage.FromMarkup(Lipsum));
TabContainer.SetTabTitle(label, "RichText");
return label;
}
public void SelectTab(Tab tab)
{
_tabContainer.CurrentTab = (int)tab;
}
public enum Tab : byte
{
Untitled1 = 0,
Untitled2 = 1,
Untitled3 = 2,
RadioButtons = 3,
Slider = 4,
Untitled4 = 5,
TextEdit = 6,
RichText = 7,
}
}
internal sealed class UITestCommand : LocalizedCommands
{
public override string Command => "uitest";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
var window = new DefaultWindow { MinSize = (500, 400) };
window.Contents.AddChild(new UITestControl());
window.OpenCentered();
}
}
internal sealed class UITest2Command : LocalizedCommands
{
[Dependency] private readonly IClyde _clyde = default!;
[Dependency] private readonly IUserInterfaceManager _uiMgr = default!;
public override string Command => "uitest2";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
if (args.Length > 1)
{
shell.WriteError(Loc.GetString("cmd-uitest2-error-args"));
return;
}
var control = new UITestControl();
if (args.Length == 1)
{
if (!Enum.TryParse(args[0], out UITestControl.Tab tab))
{
shell.WriteError(Loc.GetString("cmd-uitest2-error-tab", ("value", args[0])));
return;
}
control.SelectTab(tab);
}
var window = _clyde.CreateWindow(new WindowCreateParameters
{
Title = Loc.GetString("cmd-uitest2-title"),
});
var root = _uiMgr.CreateWindowRoot(window);
window.DisposeOnClose = true;
root.AddChild(control);
}
public override CompletionResult GetCompletion(IConsoleShell shell, string[] args)
{
if (args.Length == 1)
{
return CompletionResult.FromHintOptions(
Enum.GetNames<UITestControl.Tab>(),
Loc.GetString("cmd-uitest2-arg-tab"));
}
return CompletionResult.Empty;
}
}

View File

@@ -1,17 +1,19 @@
using Robust.Client.GameObjects;
using Robust.Shared.Console;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
namespace Robust.Client.Console.Commands
{
public sealed class VelocitiesCommand : IConsoleCommand
public sealed class VelocitiesCommand : LocalizedCommands
{
public string Command => "showvelocities";
public string Description => "Displays your angular and linear velocities";
public string Help => $"{Command}";
public void Execute(IConsoleShell shell, string argStr, string[] args)
[Dependency] private readonly IEntitySystemManager _entitySystems = default!;
public override string Command => "showvelocities";
public override void Execute(IConsoleShell shell, string argStr, string[] args)
{
EntitySystem.Get<VelocityDebugSystem>().Enabled ^= true;
_entitySystems.GetEntitySystem<VelocityDebugSystem>().Enabled ^= true;
}
}
}

View File

@@ -27,6 +27,7 @@ namespace Robust.Client.Console
{
#pragma warning disable 649
[Dependency] private readonly IReflectionManager _reflectionManager = default!;
[Dependency] private readonly IDependencyCollection _dependency = default!;
#pragma warning restore 649
private readonly StringBuilder _inputBuffer = new();
@@ -44,11 +45,10 @@ namespace Robust.Client.Console
{
Title = "Robust C# Interactive (CLIENT)";
ScriptInstanceShared.InitDummy();
IoCManager.InjectDependencies(this);
_globals = new ScriptGlobalsImpl(this);
IoCManager.InjectDependencies(this);
OutputPanel.AddText("Robust C# interactive console (CLIENT).");
OutputPanel.AddText(">");
}
@@ -196,12 +196,10 @@ namespace Robust.Client.Console
{
private readonly ScriptConsoleClient _owner;
[field: Dependency] public override IViewVariablesManager vvm { get; } = default!;
[field: Dependency] public override IClientViewVariablesManager vvm { get; } = default!;
public ScriptGlobalsImpl(ScriptConsoleClient owner)
public ScriptGlobalsImpl(ScriptConsoleClient owner) : base(owner._dependency)
{
IoCManager.InjectDependencies(this);
_owner = owner;
}
@@ -243,9 +241,13 @@ namespace Robust.Client.Console
[PublicAPI]
public abstract class ScriptGlobals : ScriptGlobalsShared
{
public abstract IViewVariablesManager vvm { get; }
public abstract IClientViewVariablesManager vvm { get; }
public abstract void vv(object a);
protected ScriptGlobals(IDependencyCollection dependencies) : base(dependencies)
{
}
}
}
#endif

View File

@@ -18,6 +18,7 @@ namespace Robust.Client.Console
public sealed class WatchWindow : DefaultWindow
{
private readonly IReflectionManager _reflectionManager;
private readonly IDependencyCollection _dependency;
private readonly BoxContainer _watchesVBox;
private readonly LineEdit _addWatchEdit;
@@ -27,6 +28,7 @@ namespace Robust.Client.Console
public WatchWindow()
{
_reflectionManager = IoCManager.Resolve<IReflectionManager>();
_dependency = IoCManager.Resolve<IDependencyCollection>();
ScriptInstanceShared.InitDummy();
@@ -92,7 +94,7 @@ namespace Robust.Client.Console
return;
}
var control = new WatchControl(@delegate);
var control = new WatchControl(@delegate, _dependency);
_watchesVBox.AddChild(control);
_addWatchEdit.Clear();
@@ -101,13 +103,14 @@ namespace Robust.Client.Console
private sealed class WatchControl : Control
{
private readonly ScriptRunner<object> _runner;
private readonly ScriptGlobalsImpl _globals = new();
private readonly ScriptGlobalsImpl _globals;
private readonly Label _outputLabel;
public WatchControl(ScriptRunner<object> runner)
public WatchControl(ScriptRunner<object> runner, IDependencyCollection dependency)
{
Button delButton;
_runner = runner;
_globals = new ScriptGlobalsImpl(dependency);
AddChild(new BoxContainer
{
@@ -150,9 +153,8 @@ namespace Robust.Client.Console
private sealed class ScriptGlobalsImpl : ScriptGlobalsShared
{
public ScriptGlobalsImpl()
public ScriptGlobalsImpl(IDependencyCollection dependency) : base(dependency)
{
IoCManager.InjectDependencies(this);
}
protected override void WriteSyntax(object toString)

Some files were not shown because too many files have changed in this diff Show More