Commit Graph

1925 Commits

Author SHA1 Message Date
Pieter-Jan Briers
d1b29a6f94 Update NetSerializer, move to NuGet with it. (#311)
NetSerializer has been updated and moved to the latest version. This
means that the static nonsense it previously had is fixed and we can
properly use ISS14Serializer.
2017-08-08 12:47:18 +02:00
clusterfack
a43da12f9b Fixes a rare out of bounds exception (#313)
* Fixes a rare crash

Fixes a crash that occurs from the following
>return AngleDirections[(int)Math.Floor(angle/45f)];

System.IndexOutOfRangeException: 'Index was outside the bounds of the array.'

That occurs most likely due to a float rounding error

* Apparently this works fine
2017-08-08 11:51:38 +02:00
Pieter-Jan Briers
4607a106d0 Of course it works a lot different on the client. 2017-08-06 14:47:20 +02:00
Pieter-Jan Briers
de9fd0cbaf Fix resource pack on client, regression in #306 2017-08-06 12:56:12 +02:00
Acruid
2e3315cd39 CompState Cleanup (#308)
* Changed GameObjects.Component namespace back to GameObjects.Components namespace to prevent colliding with GameObjects.Component class.

* Changed IComponent.HandleComponentState to use polymorphism instead of dynamic keyword.
Cleaned up nesting in each implementation of IComponent.HandleComponentState.

* Moved all shared ComponentStates to the SS14.Shared.GameObjects namespace to be more in line with client & server components.
Made all ComponentStates immutable, as they should be.
2017-08-06 12:16:47 +02:00
Acruid
f7b1b9c4b6 Client Timing (#309)
* Appease lord Sonar.

* Client timing *should* work.
2017-08-05 17:15:33 -06:00
Pieter-Jan Briers
2572bc94c7 Increase default logging verbosity to DEBUG. (#307) 2017-08-05 23:32:57 +02:00
Pieter-Jan Briers
47f1aa6565 Unhardcode content pack locations. (#306)
* Unhardcode content pack locations.

The previous hardcoded path was causing problems for the content repo.
Now the content packs are loaded from the executable directory.
The build system copies the pack from the Resources/ folder now.

* Fix CI
2017-08-05 23:32:44 +02:00
Pieter-Jan Briers
fdde14b93e Makes client and server load shared assembly too. (#304)
Also fixes #303
2017-08-05 23:32:28 +02:00
Pieter-Jan Briers
975eea832d Clean up build targets and output dirs. (#302)
* 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
2017-08-04 07:11:28 -06:00
Pieter-Jan Briers
09ecdade70 Fix sonar E rating by removing dead Lidgren code.
Specifically, dead encryption systems like DES which are useless in 2017.
0.0.3
2017-08-03 20:32:16 +02:00
Pieter-Jan Briers
e8b40f6091 Make references in projects solution-relative, fixing content#3. (#300)
* Make package references in project files solution-relative.

Fixes https://github.com/space-wizards/space-station-14-content/issues/3 with the SolutionDir msbuild property.

* Fix openTK post-merge
2017-08-03 08:49:57 -06:00
Acruid
9fa34d8cf8 Upgrade and Include OpenTK in all projects. (#299)
* Upgrades OpenTK 1.6 to 3.0pre in SS14.Client.Graphics project.
Adds OpenTK to all projects so that the math library is available.
Adds helper functions to SFML and OpenTK vectors for better compatibility.

* Fixed issue with OpenTK.dll.config needing to be copied to output.
0.0.2
2017-08-03 00:37:33 +02:00
Acruid
540825cf42 Content System + Content Assembly Loading (#295)
* Initial content system rework.

* Renamed old ResourceManager to ResourceCache.

* ResourceCache works.

* Enhanced assembly loading.
Calling LoadAssembly on the ReflectionManager breaks prototypes?

* Fixed bug with Prototypes getting erased.

* Basic namespace whitelist.

* Directory Mounting to the VFS.
More cleanup & bugfixes.

* Finished White/Black lists.

* Final Cleanup.

* Client now loads the Content.Client.dll.
Cleaned up some Logger calls.
Remove temp resource file.

* Release builds now work.

* Right, unit tests...

* Fixed Review issues.
2017-08-02 07:56:12 -06:00
clusterfack
4ae873b262 Fix the esc menu (#298)
The esc menu would previously dispose of itself if you used the X button, however this menu is meant simply to toggle invisbility on and off when you press X or esc.
Fixes #296
2017-08-02 07:53:25 -06:00
Silver
f4bceaf988 WARK 2017-08-01 08:34:30 -06:00
clusterfack
f9b27c0b21 Fixes IOC dependency system (#294) 2017-07-31 12:07:55 -06:00
Pieter-Jan Briers
0b1b9ce445 Recieve -> Receive (#290) 2017-07-26 10:34:56 +02:00
Pieter-Jan Briers
5273274f8f Moving some component API to interfaces accessible from Shared. (#289)
* Move TransformComponent to use interfaces accessible from Shared.

* Documentation and interface conversion for DirectionComponent.

* Clickable component cleaned up and Shared.

* VelocityComponent standardized.

* Update doc comments on IClientClickable
2017-07-26 10:33:59 +02:00
Pieter-Jan Briers
c8e2dcda8a Fix command line handling. (#285)
Somewhere along one of the refactors the code using it got lost.

Also made the server config be relative to the executable if unspecified, relative to the working dir when specified (through terminal for example).
2017-07-26 08:27:46 +02:00
Pieter-Jan Briers
1e5f539d50 Disable lighting by default on MacOS and Unix. (#283)
The rendering doesn't work at all and it's better that it defaults off for now. It can still be enabled with F6 in game.
2017-07-24 09:44:26 -06:00
Pieter-Jan Briers
7718d6bdc8 Makes client console darker to improve contrast and readability. (#282) 2017-07-24 09:43:38 -06:00
Pieter-Jan Briers
8cac0c1039 Remove ComponentFamily, remove "game" components. (#281)
* Remove ComponentFamily, remove "game" components.

The entire ComponentFamily system has been removed entirely.
Components now require explicit registration into the IComponentFactory.
This registration spawns the component as dummy and checks reads some data off it like name, netID...
"Reference" types can also be registered using RegisterReference<TTarget, TInterface>().
These references allow you to get components from entities too, so you can reference by interfaces.
This should allow us to inverse the direct fetching and provide a component API available from Shared.
Note that these reference CANNOT be used to spawn a new component. Only a concrete registration can.

Targeted component family messaging no longer exists.
The messaging system still exist, but it's always to ALL components.
The system should probably be killed completely later.
To fill the gap, all cases where family-targeted messaging was used, it now uses references and simple interfaces.

To reference components accross the network, the component now needs to define a "Net ID".
These net IDs should be unique (but matching between client and server).
I made a set of constants for these IDs too in NetIDs.cs

Names are no longer used in netcode (replaced by net IDs). Should reduce bandwidth usage from string names.

Because a LOT of code got in the way, most "game" content was cut. This includes (among others) items and interaction.
This had to be reimplemented in content, and most of the code was terrible anyways.

Also removed the messaging profiling system. It got in my way and I don't understand it (and I doubt anybody does).
It's in the git history if somebody cares.

Fixes #262, Fixes #250, Fixes #74.

* Attempt to fix unit tests, not yet done.

* Fix unit tests, properly.

* Remove debug message.

* Fix rendering on WearableAnimatedSprite.

It wasn't being registered as ISpriteRenderableComponent because of a typo. The ComponentFactory now detects this error too.
2017-07-24 12:27:28 +02:00
Silver
9727f67b8c Update CODEOWNERS
testing
2017-07-23 04:15:56 -06:00
Silver
348426faa1 Update CODEOWNERS
y dis no wark
2017-07-23 04:14:30 -06:00
Acruid
514efc90d5 Server Main Loop (#280)
* Basic timing class.

* Added new timing class to use as a central location for keeping track of time.
Enhanced/fixed main loop of server.

* Replaced the Win32 TimerQueue with the System.Thread.Timer version.

* Moved the timing system into IoC.

* The timer was a mistake.

* Final Cleanup.

* Fixed visual bug with the TickRate log message.
2017-07-21 17:50:53 -06:00
Jordan Brown
6d09b02d9f Replaces all TestFixture constructors with OneTimeSetUp attribute (#279)
* Replaces all TestFixture constructors with OneTimeSetUp attribute

* Make base TestFixuture use OneTimeSetUp
2017-07-20 19:43:39 +02:00
Silver
cbd4d21f3f Add Silver, PJB to Codeowners 2017-07-19 16:56:02 -06:00
Matt Smith
d9e0abd3ff Create empty CODE_OWNERS file (#270)
* Create empty CODE_OWNERS file

* Rename CODE_OWNERS to CODEOWNERS
2017-07-15 12:27:31 +02:00
Pieter-Jan Briers
8e0c57760b Fix compiler warning due to included bitstream resx. (#278) 2017-07-13 11:19:14 +02:00
Pieter-Jan Briers
a99a6af307 Band-aid the memory leak. (#277) 2017-07-12 23:56:15 +02:00
Acruid
50ae510929 Fixes Timer cleanup, so the server process does not crash when closed. (#274) 2017-07-11 23:32:19 +02:00
Pieter-Jan Briers
13ae3647be Entity prototype & YAML cleanup, prototypes unified. (#268)
* gotta go

* Work cleaning up entity prototypes.

Added handling for the data field in entity prototypes. Closes #131.
Cleaned up a bunch of the YAML handling.
Made missing components throw errors and added a (to be done) error ignore
list.

This'll allow me to unify the prototypes of client and server later.

* Unify client and server prototypes.
2017-07-11 00:44:28 +02:00
Pieter-Jan Briers
289913f14b Gives the client an application icon. (#273) 2017-07-10 23:24:51 +02:00
Acruid
e676142d72 Network system (#269)
* Saving progress of the SS14.Server.Network*, SS14.Server.Player*, and SS14.Server.SS14Server.cs rewrite.
It compiles, but does not run.

* Nightly commit, Still bugged, but compiles.
Made progress, it can now show the map!

* Runs OK, time to purge lidgren from the rest of the server.

* Finished removing most of lidgren from SS14.Server.
General cleanup of networking system.

* Merged the client NetManager into the shared version.

* Removed the giant packet processing switch.
Fixed a few misc bugs.

* Adds the INetServerManager interfaces for servers to use.
Remade the StringTable system into it's own class.
Fixed a few random annoying bugs.

* Got the OnConnecting event working, other modules can accept/deny incoming connections.
Removed the giant block of private config vars in BaseServer.

* Fixed exception issues, now networks exceptions are caught when a packet fails to deserialize.
Final housekeeping.

* More bugfixes.

* Travis fixes 1

* Travis Fixes 2

* Code review changes.
2017-07-10 21:04:08 +02:00
Pieter-Jan Briers
79af327858 Fix unit tests ran from VS. (#272)
Something NetSerializer is doing isn't working in VS. This band aids it by
moving it out of the constructor so IoC can initialize at least.
2017-07-10 19:28:02 +02:00
Pieter-Jan Briers
4adcba88f2 Remove buildResourcePack* batch files. (#259)
The files have been obsolete with the advent of the (faster) buildResourcePack.py.
There's no reason to use the old ones, and this sets Python 3.6 as a hard build dependency.
2017-07-10 06:46:12 +02:00
sood
22fa2c3f40 Updates lidgren, adds ipv6 support (#204)
* restart

* saving work

* IT LIVES

* overload method instead

* Solution file changes ala Visual Studio should make it build now
2017-07-10 01:09:23 +02:00
Acruid
001abd663c General Bugfixes (#264)
* Fixed SFML Fonts throwing StreamClosed errors.
Fixed misspelled font name causing chat box to use default font.
Fixed crash when trying to quit the client from inside a round.
Fixed? backslash issue with the resource pack path.
Removed obsolete unused Player_config.xml.

* More path separator fixing.
Fixed the player sprite moonwalking bug.

* Reverted changes of last commit.
2017-07-10 01:01:49 +02:00
sood
822070dfdc Fix hardcoded resource path preventing client from starting on Unix (#265)
* Fix hardcoded resource path preventing client from starting on Unix

* also fix this unit test path

* okay actually fix it because I'm dumb
2017-07-09 20:47:50 +02:00
sood
2f2aa40362 Add SpriteRenderer/Output to gitignore (#266) 2017-07-09 14:51:40 +02:00
Pieter-Jan Briers
04ff5b945a Whoops 2017-07-07 00:42:30 +02:00
Pieter-Jan Briers
e4b76abd46 Properly implement ISerializable on ImplementationConstructorException. 2017-07-07 00:38:09 +02:00
Pieter-Jan Briers
16ec81b77a Bunch of generic clean up following Sonar. 2017-07-07 00:17:24 +02:00
Pieter-Jan Briers
dfbef437f8 Pleasong SonarCloud a bit, fixing tons of smells. 2017-07-06 16:27:04 +02:00
Pieter-Jan Briers
8b8f2354b3 Fix build. 2017-07-06 16:00:12 +02:00
Silvertorch5
6d653f8876 Clean up 2017-07-06 01:33:49 -06:00
Silvertorch5
5a1f524e83 Rename Serverside EntityNetworkManager
EntityNetworkManager -> ServerEntityNetworkManager
2017-07-06 01:33:03 -06:00
Silvertorch5
17d22f345f Rename Clientside EntityNetworkManager
EntityNetworkManager -> ClientEntityNetworkManager
2017-07-06 01:32:28 -06:00
Pieter-Jan Briers
7df089bebe IoC property-based field injection. (#258)
* IoC Field Injection base changes. Usages not converted yet.

* Fix issues with the csproj file.

* Work on converting the client.

* We're done here. All implemented and good.
2017-07-06 01:06:52 -06:00