* Isolate net messages in integration tests.
Integration tests don't use Lidgren to connect client and send, instead they just use some in-process channels to communicate. Because of this, the original implementation of net messages *directly* passed the net message instances between client and server instances. This caused issues whenever content would mutate data in a NetMessage after it "passed through".
Now we run the messages through WriteToBuffer() and ReadFromBuffer() so they pass through binary serialization. This means there's no more implicit sharing of the objects.
Note that this requires some trickery: Lidgren's message types have internal constructors. Really ideally we'd change the engine to make this more testable... but that's a content breaking change. Instead I just added InternalsVisibleTo to Lidgren so we can mess with it. We maintain the library ourselves anyways I can do what I want.
Fixes#4836
* Register Robust.UnitTesting as assembly for reflection.
This is necessary so that serialized types in the assembly can be picked up by NetSerializer.
Have to disable automatic reflection on all entity systems/components that tests register manually right now, because otherwise tests break.
* Stop shallow cloning specific net messages in integration tests.
This isn't necessary anymore now that we have a thorough fix.
* Wow I really forgot to copy-paste that line to the other side huh.
* Add test that serializer hash matches.
* Another test one I missed earlier.
* Changelog
* make lidgren use spans everywhere where it can
convert custom pooling to shared array pool impl
add unit tests for read/write
add native socket extensions to socket so we can legit pass spans for SendTo/ReceiveFrom
bump version in lidgren csproj
replace some random "% 8" w/ "& 7"
more minor nullability hacks to fix static analysis complaints
made receiving packets use span
minor native sockets refactor to use pinvoke
add read/write constrained/prealloc'd bit stream impl to lidgren and update usages
fixed missing stream cleanup
remove outstanding stream cleanup since it refs buffer thru the class, can't read some other buf
apply suggestions from code review
remove unsafe cruft
* add tests to gh actions
* make stats use interpolation in tostring and remove m_bytesAllocated since it's all in the shared pool now
* this pr still open so fuck it
stats, human readability, faster BitsToHold methods
* add api compatible version of ReadBytes
* rename ReadOnlyStreamWrapper -> ReadOnlyWrapperStream
rename WriteOnlyStreamWrapper -> WriteOnlyWrapperStream
add AppendViaStream, AppenderStream impl
add and update documentation on read/write bytes methods
also fix some goofs
* Project file refactor
Move all the .csproj files to the new .NET Core style.
This doesn't make any difference for compiling for Framework,
but it does reduce a ton of useless boilerplate.
As an extension of this, killed a bunch of uncompiled & unmaintained .cs files.
Compiling for release (to profile) works now.
Removed AnyCPU targets from the solution file.
* Fix compiler warnings.
PlayerIndex is dead, it's been replaced by NetSessionId.
NetSessionId is basically just the client username.
Conflicts between usernames are auto resolved by the server,
due to lack of auth server & need for local testing.
dupeip config option is gone, it doesn't understand NAT.
* bsdiff submodule
* All the other stuff
* Upgrade to 0.2 of SS14.Shared.BSdiff
* Use streams. Even faster!
* All rendering refactors should start with the killing of the SFML submodule. Trust me I've done this before!
* And after that comes the removal of the references in the project files!
Of course, neither of these compile. Meh.
* IoC loads, now to port the entire client over.
* More work
* Trying to debug the null exception.
* More messy WiP code
* More WiP
* Transform components now make Node2Ds inside the scene tree.
* Work on the UI system.
* Redo project configurations to work better.
* More work on the Godot GUI binding.
Added BaseButton and Button bindings, including events for them.
More APIs on Controls like GetChild() and alike.
Ability to instance a Godot PackedScene and have it automatically be wrapped by the SS14 GUI wrapper, thus allowing the usage of Godot's GUI editor while maintaining the good C# API.
* Fix incorrect sRGB profile on bootsplash.png
* LineEdit API.
* Maybe commit the csproj too.
* Exit button works now!
* Change MainMenu root to a normal Control.
* Some stuff messing with window popups.
* Fix popup not scaling down again after housing large text.
* Make popup dialog helper.
* Auto wrap controls that spawn others when not instancing.
* Nice typo me.
* Work getting server connections working.
* Server didn't start anymore due to still trying to load removed zip packs.
* Made MainMenu dump UI elements in shutdown.
* We now successfully connect to the server.
* WE Ingame NOW!
* Basic map rendering works now!
* Camera & Input work.
Though I'm not sure whether the input issues are this piss poor laptop or actual bugs.
* Fix input issues.
KeyHeld() was firing KeyUp() into States, which broke everything.
* WiP Debug console.
UI Works, command processing doesn't.
* Remove some debug logs.
* Fixing focusing issues with the Debug Console.
* In which I copy paste in the DebugConsole code.
* More WiP DebugConsole work.
* Use RichTextLabel for DebugConsole.
* Disable DebugConsole test text.
Also disable context menu on the IP Box because of font size issues.
* ITextureSource for texture wrapping.
* Make resource loading not copy every build.
It now loads from repo root. Release builds are TODO.
* Bsdiff 0.3 for fixed targets.
* Fix iCCP sRGB errors.
* Give full texture paths to prototypes.
* Sprite component old API restored. *shudder*
* Finish sprite rendering.
By hitting delete on basically everything.
* Fixing camera delay with this one weird trick!
The input lag was because the camera lagged, not because the input lagged. I didn't have visualization.
* Use greyshirt as temporary human replacement.
* FPS Counter.
* Fix Windows, re-add space tile def.
Windows broke because Mono on Windows can't use System.IO.Compression.
The GZIP streams use by MsgFullState have been moved to
ICSharpCode.SharpZipLib.GZip. Works fine.
Also re-added the space tile def because everything blows up otherwise I
guess.
* Debug colliders works.
* Highly WiP varied Window code.
* Work on the quit button. Doesn't work yet. Needs state overhaul.
* Do a better job of freeing Godot objects correctly.
* Simplify game states.
States are no longer cached. They're GC'd after shut down. Their creation has been simplified too due to IoCManager.InjectDependencies().
This makes returning to main menu work GUI wise.
* Be less aggressive on resource freeing. Only dispose Mono handles now.
* More work getting quit to work.
* Grids get cleared upon disconnect correctly.
* Disable rendering of the filler space tile.
I'll leave a nice parallax background up to content.
* Oops forgot to stage these.
* Fix issues in the csproj file.
* Make controls have own namespace.
* Chatbox GUI, other stuff.
Compiles but doesn't quite work yet.
* Git fuck you
* Chat works.
* Clicking on a not-control removes focus now.
* Fix an exception.
* Update mono. Use enums instead of constants now!
* Fix window dragging
* Fix chat stealing focus from other LineEdits on MacOS I guess.
* Correctly handle client shutdown & server disconnect.
* Fix error spam on client shutdown probably.
* Tiny amount of lighting code to have access to it from other computers
* Lighting works mostly.
* Godot.Texture.Flags -> FlagsEnum
* More WiP lighting code
* Turns out you can't control custom layers with cameras eh.
* WiP lighting almost works
* Lighting WORKS!
* Lobby thing.
* Some options menu work. I'm gonna try something
* Options menu works.
* More improvements.
* In game options menu works.
* Remove a debug log.
* Fix Window Movement and Drag.
* Huh Godot edited these scenes.
* Forgot to commit projects
* It compiles.
* I never claimed that.
* Update sandbox csprojs a bit.
* Makes sandbox load.
Client goes ingame but dies due to broken map manager networking code.
* Fix grids.
* Fix relogging duplicating entities inside Godot.
* Eyes!
* How about removing the TODO entry.
* Auto fetch bsdiffwrap.
* Update TODO.
* Remove TODO list.
* Tilemaps get cleaned on disconnect now.
* Fix bsdiff submodule HOPEFULLY
* Highly WiP and not compiling or working placement.
Yes this is the best way for me to share code between my computers.
* Fix bsdiff with spaces in path names bloody MSBuild + cmd.
* PLACEMENT KINDA WORKS.
NO RENDERING OR TILES YET.
ALSO I NEED TO REBASE THIS.
* Kill EngineContentPack.zip
* Fix map code and remove sprite components from the server.
* Ok entity placement mostly works.
* Grid lines sorta work but SnapgridCenter is still broke.
* Fix Center Grid Rendering.
* Work getting tile spawns to work. Not quite there yet.
* Fix placement and remove tiledef networking.
It werks!
* Remove SolutionSpecific.targets
Didn't end up being needed.
* Kill off wearableanimatedsprite component states.
* Do not put binaries relative to the solution.
* Remove shaders, reorganize prototypes for content.
* Reimplement SpriteComponent color.
* Correctly set __engine_human DrawDepth.
* Round coordinates passed to Godot to pixels to prevent issues.
* Remove some GUI log spam.
* Resource cache now uses the VFS more-proper but still awfully.
* Fix color reading code on SpriteComponent.
See, e94bf4854b106da51c89eeeab9a609be369f9622 did work.
The problem was all the code it NEEDED to work was broken.
* Step one into trying to fix Travis and AppVeyor.
* Auto download GodotSharp on Travis.
* Let's not make dumb mistakes with the cache directories.
* 2018 and requests still isn't in the stdlib.
* This maybe?
* This maybe?
* AppVeyor time.
* How 'bout we don't download sonarqube at all outside master.
* Try to cache on AppVeyor.
* Fix mac builds maybe.
* Finishing up Godot: cleanup.
* Eh this works too for SS14Loader.
* Remove some dead files
* Make Omnisharp not choke on buildchecker.
* Controls for box containers.
* Remove debug port from project.godot.
* Control and drawing improvements.
Controls are now properly capable of overriding Godot virtuals.
Importantly minsize calculations and stuff like HasPoint.
There is now a system for doing direct drawing on controls.
This is done with a DrawingHandle system.
TextureSource has been renamed to Texture.
Also there's a wrapping for Godot's style boxes now.
* Yeah don't insult omnisharp.
* Stylebox fixes and margin API on controls.
* Hey it compiles!
* Fix things.
* Fix null godot texture conversion.
* Fix client transform parenting.
* Fix movement sticking to north.
* Some updates.
* Work on exports.
* Unstubs client/Godot timing code.
It's mostly implemented now.
* Client unit tests work.
Jesus Christ.
* Let's figure out why AppVeyor hates me.
* Does the remie.
* Update GodotSharp download URL.
* Export templates for the builds server.
* Remove mac export icon.
* TO THE BUILDS SERVER.
* Probably implement the effects system in Godot.
* Fix mouse handling everywhere.
* Fix some CollidableComponent exceptions.
* Effects system works + unshaded option for LAZORS.
* Let's not fuck with Angle yet.
* Make file/line numbers show up on Windows Godot.
* Clean up build targets and output dirs.
All old Any CPU targets and mixed ones have been removed. They wouldn't have worked anyways due to SFML.
Cleaned up all the build output directories to be neat and clean.
* Fix Travis
This change removes all Visual Studio buildsystem remnants and replaces it with Prebuild.
Prebuild is capable of generating a wide range of buildscripts, including VS, nant, MonoDevelop. Prebuild uses prebuild.xml, obviously.
# Other Changes:
* Removed a bunch of crap that VS generated for the key bindings XSD, thinking it was a DataSet.
* Renamed Reference to Third-Party.
* Added MS Diagnostics API DLL, since it's now distributable.
* All binaries are now dumped in Bin/.
* Removed reference to MiniDumper -- was crashing client when not run with debugger -- can be readded later
* Fixed Media paths to point to Resources
* Made Server/Client build to Bin/Server and Bin/Client respectively so they dont stomp on each other's shit
# Test Plan:
* Run prebuild2010.cmd
* Compile using SpaceStation14.sln
* Run stuff in Bin/.
# Reviewers: #ss14_developers
Differential Revision: http://phab.nexisonline.net/D14
Not on phabricator because phab can't handle all these binaries.
Fixed a number of crash bugs related to player sessions and game modes.
Set solution configuration to build x86. x64 is trouble, man.
Made the runclient.bat and runserver.bat files more smarter.
Made the help console command more helpful.