Clients would treat any message coming in as being from the server they're connected to, instead of ignoring them if they're not correct.
This made the client crash inside integration tests because messages came in while disconnected.
This fixes that.
This is necessary because content now loads the preferences database from the thread pool. This causes the assembly loads for that (they're lazy by the runtime) to run in that thread, which means that the resolver callback we set up in ModLoader did not work (it has to do an IoC resolve).
This change creates a new AssemblyLoadContext for every ModLoader and as such we can tie the loading in said context to a specific ModLoader, thus cutting out the need for a static IoC resolve.
This also paves the way to assembly unloadability a bit.
This allows us to make Content.Client and Content.Server Exe projects so that they can be executed directly via your IDE. This'll help wtih not forgetting to do a full rebuild and such.
* Add delete key behavior to LineEdit
Pressing delete will now delete the character in front of your cursor like usual.
* Update Robust.Client/UserInterface/Controls/LineEdit.cs
Co-Authored-By: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
Returns early if the window or framebuffer width or height = 0 to avoid dividing by zero. Checked the vector components individually instead of using `Vector2i.Equals()` because you can end up in a situation where width is non-zero and height is zero if you manually resize the window instead of using the minimize button.
Use PLINQ for prototype loading. Most of the time is spent reading YAML so this should help a lot.
Don't regenerate collision for every tile placed by the map loader.
Grid collision rectangles are now drawn as a blue overlay in the CollisionOverlay debug view.
GridChunkPartition now also returns the bounding rectangle, which is a union of all the collision rectangles.
Each IPhysShape now handles it's own debug drawing with a new method, DebugDraw.
Added MapManager.Restart().
Added MapManager.CreateNewMapEntity() and MapManager.SetMapEntity() for manipulating the map root entity.
You can now spawn entities directly into Nullspace, after setting up the Nullspace map entity.
This is not a proper fix. A proper fix would be a better physics engine.
But as it stands I really wanna get a progress report out and having to refactor physics to do it would just suck.
This fixes batching not working for sprite layers. They'd set & reset the active shader constantly which broke batching.
Active shader is now part of batch meta data and broken like other data like textures.
This halves the memory necessary for the lighting framebuffer, so probably helps with bandwidth usage (especially on integrated GPUs) too.
I couldn't notice a decline in visual quality on my (admittedly) bad laptop screen.
* Fold animation delays into a single set for all directions.
* Update systems to use new RSI animations API.
* Fetching layer directions now done in sprite render.
* Allow overriding direction in SpriteView.
* Adds Map components to the ECS system.
* Grid entities are now created along with map grids.
Grid components are now properly reused from map deserialization when a grid is created through the MapManager.
* Make MapGridComponent shared.
Don't send Nullspace default grid to client, they have their own.
Properly link the new grid with the entity sent from the server.
* Fixes nullRefException when ToString() is called on an Entity with no Prototype.
* Adds logging debug info about binding a map/grid to an entity.
Nightly Commit.
* Client map networking now properly pivots a grid from the client entity to the shared entity.
Added IMapGridComponent.ClearGridId() to properly dissociate the component from a grid before deleting it.
WorldPosition of a default grid is always 0,0 regardless of the entity transform (if any).
Nullspace map and default grid are not bound to an entity.
Nullspace map and default grid cannot be deleted.
* Map Entities are now created along with new maps.
* Client & Server load with new scene hierarchy.
* Fix rebase damage.
* Added ContainerHelpers helper class.
* Fix Container checks.
* Fixed clothes.
* Fixing unit tests.
* Removed disabled code.
* Actually initialize and startup the Map and Grid entities.
* Use GLFW instead of OpenTK windows
* Seems to work pretty well now.
* Fix stackalloc issue on Framework.
* Add GLFW project to sln.
* Fix package downgrade.
* Fix SLN more.
* Please work.
* Fix C# version error.
1. NetManager.IsConnected no longer uses LINQ.
2. creating net messages for sending/receiving now uses cached DynamicMethods to improve speed (bypasses Activator.CreateInstance and params allocations)
3. Entity.GetComponentStates uses GetNetComponents now.
4. PhysicsManager allocates significantly less now.
* UI layout v2.
All controls now act like containers.
Moved anchor/margin layout model to LayoutContainer
Implement basic WPF-like attached properties for the above LayoutContainer.
* Fix VV.
Give BoxContainer a preset capacity to reduce allocations in layout.
Removed Control.GetChild(string) and similar. This was no longer used (and was a pretty bad idea in general), and the implementation had a lot of wasted book keeping to do.
Use UpdateLayout() instead of DoUpdateLayout() in Control minsize changed to avoid doing redundant layout, and by extension style & minsize, updates.
Used RemoveAllChildren instead of DisposeAllChildren in EntitySpawnWindow because it's faster (way less stuff to clear, just let the GC handle it).
Optimized ResourcePath with a better GetHashCode(), better Equals, replacement for List<T>.ToArray()
Fixed enumerator allocations in stylesheet SelectorElement matching to speed up style updates.
ResourceCache now caches fallbacks to avoid constructing Resource instance when fetching fallback explicitly.
ResourceCache now has nested dictionaries for Type -> ResourcePath -> BaseResource storage of resources.
Use calculated property instead of auto property for TextureResource.Fallback
* Moved IMap from Shared/Interfaces/Map to Shared/Map namespace.
* Extracted Map class out of the MapManager class.
* Removed the Map class and interface.
* Fully removed the Map and IMap class.
* add basis for debug drawing raycasts
* rays
* this was too much work
* i assumed you could do string object stuff. you cant.
* fixed a crash
* Greatly improved DebugDrawingManager code with a struct and list as opposed to dictionary
* change default ray debug color from green to magenta
* reviewed changes
* reviewed changes and adds network message to physicsmanager so it works without much user config
* raw PCM audio for clyde
* Remove soundfont.cs
* Midi stuff
* Some more work
* This actually works now!
* update
* Add nfluidsynth submodule.
* fuck
* Midi audio works!
* Lots of stuff, and cool interfaces for items
* Update
* Note limit
* Moving out of range of UI raises OnClosed now as well
* It just works
* Update nfluidsynth submodule
* Remove managed-midi, remove unused methods I added to clyde
* Remove remnants of older NFluidsynth
* Update nfluidsynth submodule.
* Fix some of MidiManager
* Add changes PJB made to soundfont loading
* Delete OpenAL source/buffers when disposed
* Remove remnants of "Rendering"
* Use ReadOnlySpan, make interface/implementation arguments consistent
* Improve EmptyBuffers performance
* Make renderers use an enum for their status
* MidiRenderer events are now invoked on the main thread
* MidiManager now has a method to dispose renderers
* Lock player
* Fun stuff
* Update nfluidsynth submodule.
* Fix midi audio rendering
* Address a few reviews
* Revert changes made to Clyde
* Create sfloader per midi renderer
* Midi file size check
* Now OpenMidi/OpenInput and their respective close methods return bools.
* Update nfluidsynth submodule.
* Move number to constant.
* Use BufferedAudioSource
* Remove unused using statements
* Use new API
* Lock player and synth correctly
* Use midi sawmill
* Adds "Disposed" property to MidiRenderer
* Remove DisposeRenderer, let midi render thread handle it instead
* Renderer position is updated from main loop
* Use nfluidsynth from nuget
* Fix appveyor, lazy fluidsynth init
* Only join MidiThread if it actually exists...
Added IClientConGroupController and implemented it as ClientConGroupController. Lets client-side code check what commands the client can use based on their console group. Serves the same purpose as the server-side IConGroupController except it doesn't load a list of permissions from groups.yml. Instead, the server ConGroupController sends updated permissions to clients whenever they change.
By making these public they can now be used by content to check if players are in the right group (admin, mod, etc) before doing certain things. Required for PR 380 on content (https://github.com/space-wizards/space-station-14/pull/380)
* WiP property animations system
* Use better lerp for Angle property animations.
* Fix handling of offset in sprite component.
* Allow animating some sprite layer properties.
* Allow animating some Transform properties.
Obviously not advisable for server entities, but great for client side entities!
* Improve animation property interpolation handling.
Added a "previous" mode.
Made values that cannot be sanely interpolated fall back to this mode.
* Improve some animation docs.
Reverts b40413dfd6.
Decorates EntityPrototype.Name with CanBeNull.
The entity spawn window now properly handles prototypes with null names. Previously, a null name would throw a NullException. Entities with null names will never show up in the spawn window search results.
* Use DynamicMethod for dependency injection.
Should be way faster to initialize types and also have no allocation overhead
* Cleanup, don't make injectors for types without dependencies
* Fix Framework, maybe?
* Test the new system explicitly.
* Adds a new IPhysicsShape object where you can define what collisions shape a PhysBody has.
AABB is now accessed through the PhysicsShape, so the BoundingBoxComponent is not required.
* Default PhysShape now copies the AABB of the BoundingBoxComponent.
* Fixed issue with serialization of PhysShapeAabbComp.
* Spatial queries now use ICollidableComponent instead of BoundingBoxComponent.
showbb now draws entities using the obsolete BoundingBoxComponent in Aqua.
* Renamed PhysShapeAabbComp to PhysShapeAabb.
Removed BoundingBoxComponent.
* Default CollidableComponent does not collide with anything now.
* Renamed ICollidable to IPhysBody.
Moved ICollidable to the Robust.Shared/Physics namespace.
* PhysShapes are now a collection of primitive shapes that contribute to the whole PhysBody.
ObjectSerializer.DataField can now deal with abstract types using YAML tags.
* Added LocalBounds property to ClickableComponent.
Added state to ClickableComponent.
* Added a Rectangle physics shape.
* ClickableComponent now actually checks that a click is inside its bounds.
* Reverted the addition of a try/catch around map loading. Any errors can propagate to the code trying to load the map again.
Prototypes will now use existing components, like transform, when loading an entity. Previously they blindly created new ones on the entity.
AddComponent now cannot overwrite a protected component, ie TransformComponent and MetaDataComponent. Entity caches these components, they cannot be changed.
Regular RemoveComponent functions are now not able to remove protected components.
* Add a check in OnContextChanged to fix some crashes
Fixes crashes due to double input like the Quit button in the Esc menu
* Changed BaseButton to only trigger on KeyBindDown and KeyBindUp on the same control
* Fixes right click menu stopping input
Removed a flag change when the modal stack was showing, which preventing the click from getting passed to the next function.
* Added parsing for mod2 and mod3 from Keybind YAML
* Fixes a crash on context change when a keybind is not defined in keybinds.yml
* Implemented ShowDebugConsole Hotkey
* Refactored input system
Refactored input system to run Key and Mouse input through the InputManager before doing stuff.
* Upgraded LineEdit and classes that use it. Fixed input while KeyboardFocused.
Upgraded LineEdit to use Keybinds.
Upgraded DebugConsole to use Keybinds.
Replaced all references to MouseDown, MouseUp, KeyDown, and KeyUp with KeyBindUp and KeyBindDown.
Moved UserInterfaceManager call from GameController.Input to InputManager event.
Stopped input going to simulation while a control has focus in UserInterfaceManager.
* Some fixes for input system
Fixed keybinds getting stuck when selecting a LineEdit.
Changed MenuBar to not error.
Fixed a few cases where LineEdit would eat input if you hovered over it and where mouse input got eaten when clicking in the world while a LineEdit was selected.
* Removed extra dependencies
* Added GUIBoundKeyEventArgs to ButtonEventArgs
* Fixes for input with LineEdit selected
Fixed multiple keybinds mapped to the same key not triggering.
Fixed keybind input not getting to LineEdit when hovering over a control.
* Implemented Key Repeat for LineEdit
* Fix for input on Robust.Lite Launcher
* Renames NonFocusKeybinds to EnableAllKeybinds
Renamed NonFocusKeybinds to EnableAllKeybinds and added comment to clarify usage
* Adds repeating keybinds
Used for TextBackspace, TextCursorLeft, and TextCursorRight
Reverts a change to LineEdit that implemented repeating keys
Adds some documentation comments
* Quick fix to flashlight radius
* SomethingAbout CSS Class
* Shitty update
* fuck
* Creativ!
* Last But not least
* Quick Change
* Fixed version
* Tiny fix
* Next Fix
* Another fix
* Refactor UI system.
Deferred updating is used for styling & layout. This fixes the awful time complexity of containers.
Removed SetDefaults and Initialize. They were a bad idea alright.
* Fix build on .NET Framework.
* Attempted Clyde cleanup, didn't get far.
* Add negation operator to Vector2i.
* Add RenderOrder to ISpriteComponent.
* Post process shaders.
Adds "post process" shaders to sprite component.
These are executed on the WHOLE sprite component (every layer)
in one draw.
This is necessary to implement functional outlines.
They no longer load system-wide config or user data.
User data is emulated through a VFS.
Also added more hooks to improve the customizability of the test,
for example allowing content to hijack their IoC registrations.
This is necessary to avoid tons of papercuts with entity systems.
Without this it is not possible to create entities inside the update loop of an entity system, which is too common for me to disallow.
As for performance, I offset it by removing the LINQ usage.
It's marginally faster than before even.
This clears the collection of style classes and adds the new one. This allows controls to easily switch between several style classes without needing to keep track of the active one in their own code.
* 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.
* Add StyleBox overrides to ProgressBar
The overrides are StyleBoxFlat instead of StyleBox as StyleBox does not expose or possess a color property. _getBackground and _getForeground were also changed to return StyleBoxFlat instead of StyleBox to keep things simple.
* Change ProgressBar _getBackground and _getForeground back to StyleBox
* Change ProgressBar style box overrides from StyleBoxFlat to StyleBox
* Retrofitted ComponentManager_Test to use DependencyCollection.
* Renamed ComponentManager_Test to ComponentManager_Tests to follow naming conventions.
* Added component add/remove/delete events to IComponentManager.
Removed IEntity dependency from ComponentManager.
* Entities can now be spawned without a prototype.
* Removed unused function.
* CreateEntity now actually works with a null prototype ID. The other spawn functions should work as well.
Updated doc comments for IEntityManager.SpawnEntity().
* Remove unused options menu tscn
* Move SS14Window to pure C#
* Move SpriteView to pure C#
* Move EntitySpawnWindow and EntitySpawnItem to pure C#
* Removes using statements accidentally added by resharper
* Set EntitySpawnWindow default size to normal value
Note that in construction menu and storage menu this had to be done in the object initializer and didn't work if it was set in the Initialize function for the respective menus. For whatever reason setting it in the EntitySpawnWindow.Initialize works fine.
Not quite perfect, but quite usable.
Adds the ability to scale the UI. Scaling is controlled via a cvar,
and can be changed at runtime.
Fractional scaling is supported.
Some controls could be better (SpriteView, TextureRect),
but for now it's a good start.
* Tile Placement box actually uses the mouse snapgrid, not the players.
* Placement box only snaps to grids if cursor is over grid.
First tile of new grid is centered on cursor, instead of bottom left on cursor.
* Place square now sticks to the edge of a grid.
Cannot place tiles that would touch two grid Bounds.
Make containers actually handle automatic removal of entities,
like say on unpartenting.
This was because a lot of content code was doing this manually,
and it broke, really badly.
They also emit events now that said content code can use instead.
* Server works if not connected to a tty.
* Rich presence does not run IoC resolution at runtime anymore.
* Work towards integration tests.
Mostly work related to making it so the server and client can run in
parallel, and allowing more control over main loop for testing.
* Lots of code relating to integration tests.
* Split GameState processing logic out of ClientGameStateManager into the new GameStateProcessor class.
* Adds a test fixture for GameStateProcessor with a basic use test.
* More unit tests and added Extrapolated property to GameStateProcessor.
* MapInit v1, so people can criticize my code.
* Map init v1.
* Improve LocalPlayer to fix aghosting.
* Fix map saving.
* Map command improvements:
Implement loadbp
Made certain commands aware of uninitialized maps.
* Adds IMapManager.GetAllGrids()
* Add lsgrid and lsmap commands.
* MetaData component serialization fixes.
Serialize name and description default as null.
Don't serialize prototype.
* Explicit UID indices in map files.
* Update map format doc again.
* Added centered unit box static field to Box2.
* MapGrid is more testable.
* Added some unit tests for MapGrid.
Fixed bug in MapChunk.GridTileToLocal().
MapGrid.UpdateAABB() actually expands properly now.
* Moved IMapChunk to Robust.Shared.Map.
Moved Chunk class out of MapManager class.
* Added unit tests for MapChunk.
* Bounds reduce by 1, so almost working.
* Now bound shrinking works :D
* Moved MapGrid out of MapManager.
Moved IMapGrid into the Shared/Map folder.
Replaced all calls to IMapGrid.ParentMap.Index with IMapGrid.ParentMapId.
* Added more MapGrid unit tests.
Fixed a bug in TryGetTileRef.
* Added a new special MetaDataComponent to store entity data that isn't specific to a component.
* Adds ExposeData to MetaDataComponent.
Name of the entity now defaults to the prototype name.
* EntityStates changed so that the list of networked components is not sent every tick for a modified entity.
* Code cleanup & doc comments.
* MetaDataComponent Name and Description are taken from the prototype before storing them in the component.
* Adds the EntityState serializer benchmark. This isn't a test, but is really useful.
* Redesigned the logic in ServerGameStateManager.
* Adds MetaDataComponent registration to the UnitTesting project.
* You can scroll ItemLists now.
* ScrollBar actually appears!
* Remove System.Drawing
* Move total content height away from the drawing loop, recalculate it...
...when needed.
* Take ActualBackground minimum vertical size into account
* Fix cases where lists didn't scroll to the very bottom.
* Fix CalculateMinimumSize for real I hope
* Removed unused method TileRef.GetStep().
Removed unused property TileRef.TileSize.
Removed unused property TileRef.Tile, made the field public with the same name.
Made the TileRef struct readonly.
Removed property TileRef.TileDef.
Removed property TileRef.LocalPos.
Renamed GridTile to GridIndices.
Implemented IEquatable on TileRef.
Implemented Equality operators on TileRef.
Added PublicAPI attribute to TileRef.
Added doc comments to TileRef.
* Modified Tile:
Added the PublicApi annotation.
Made struct readonly.
Filled out doc comments.
Changed auto properties to readonly fields.
Renamed TileId to TypeId.
Added a static Empty tile to the struct.
Implemented IEquatable.
* Modified MapCoordinates:
Added PublicApi attribute.
Implemented IEquatable.
Filled out doc comments.
Removed Map property.
* Modified ScreenCoordinates:
Filled out doc comments.
Added the PublicApi attribute.
Implemented IEquatable.
* Modified GridCoordinates:
Removed method IsValidLocation.
* Removed property GridCoordinates.Grid.
* Removed GridCoordinates.Map.
* Removed GridCoordinates.MapId.
* Removed property GridCoordinates.IsWorld.
Removed constructors taking a MapId.
* Removed static IoCManager calls from GridCoordinates.
* Modified GridCoordinates:
Added attribute PublicApi.
Filled out doc comments.
* Filled out doc comments for MapGrid.
Filled out doc comments for MapIndices.
Misc refactors for both.
* added command to teleport grids.
* Added method Box2.Intersect.
Added method Box2.Union.
Placement manager now spawns new grids to place tiles not connected to an existing grid.
Code was changed so that time starts at tick zero, and all entities are initialized in the space between tick 0 to 1. This was a solution to the fact fromSequence was including entities with lastStateUpdate tick one less than the actual sequence number. This is purely an issue about when exactly the game does its logic relative to the tick signals, ie positive or negative edge of the tick. Right now the game is set up to run the game logic on the positive edge of a Tick (enforced by GameLoop).
The second big part is that an empty collection takes 5ish bytes more than a null collection in the NetSerializer, even though they are conceptually the same thing in a game state. This PR puts null checks around everything and allows GameStates to have whole sections of itself null. This reduced the payload size of an empty game state from 49B to 15B.
This PR also fixes the bug where the physics system marks every movable entity as dirty every tick.
RobustToolbox projects should be named Robust.*
This PR changes the RobustToolbox projects from SS14.* to Robust.*
Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
I guess I accidentally removed some comment strings and didn't realize until I pushed. Related to issue #180 on the content repo. I'll put in a separate PR on that repo to fix the prototype for walls too.
* add a new GameTick struct.
* Everything now uses the new GameTick struct.
* TickRate was changed to a byte, no way it is going over 255.
Fixed bug with changing TickRate after the loop has started.
Client now properly sets the TickRate when connecting to a server.
* Removed the old CurTime fields from game states.
Getting to the Connected runlevel on the client does not require a gamestate.
GameState processing now only starts after the client runlevel >= Connected.
Added some preprocessor conditions to not catch exceptions in Debug builds.
Nightly work on the GameStateManager, it is still pretty broken.
* NetMessages now have a Size property.
Player states were fixed, you can now join the game again!
* Frame interpolation kinda works.
* Frame Interpolation pretty much works!
* simulation can now catch up if a lag spike causes it to fall behind.
* Added concommand to debug draw the interpolation targets.
* Fixed a bug with applying just the NextState to an entity.
* Skip/replay a tick to slow down if the client is running ahead of the server.
* Solved a null ref exception when an extrapolated packet is applied.
* The TickRate is now officially 10.
* ClientGameStateManager stops running when the client leaves the server.
* Replaced poorly implemented FastForward with new TickTimingAdjustment.
* Update System.Runtime.CompilerServices.Unsafe to get rid of version conflict.
* Added 'net.interp' cvar.
* Disabled frame interpolation by default. The entire feature will be disabled until clientside input prediction is working.
* Removed or disabled log spam.
Fixed Transform unit test.
* Fix compile.
* Removed Static IoC calls from MapLoader.
Misc Code cleanup in MapLoader.
* Removed static IoC calls from ViewVariablesPropertyControl.
* StateManager now uses the DynamicTypeFactory to create States.
Removed static IoC calls from States.
* EntitySystemManager now uses the DynamicTypeFactory to create States.
Removed static IoC calls from EntitySystems.
Minor code cleanup.
* Removed static IoC calls from DebugDrawing.
* ComponentFactory now instantiates Components with IDynamicTypeFactory.
Removed static IoC calls from all engine components.
Misc code cleanup.
* Removed static IoC calls from all DebugMonitors.
Misc code cleanup.
* Removed static IoC calls from spawn windows.
* Removed static IoC calls from UserInterface/CustomControls.
* Fixed unit tests.
* Removed static IoC calls from AppearanceComponent.
Added a bool to ICollidable to indicate friction with the floor, for thrown items down the line.
Added a bool to PhysicsComponent to indicate if movement is possible.
Added list of PhysicsComponent that are slowing "this" down.
PhysicsComponent handles BumpEntMsg by adding the bumping entity to that list.
Implemented ICollideSpecial to prevent collision with items in that list.
Reworked movement code:
- Separated calculating movement from doing movement;
- Calculating movement now involves several recalculations to see who is on "that" list;
- Friction of a tile now slows movement down depending on an object's mass;
Optimized collision code by building a Dictionary with a snapped grid location for key, reducing the amount of bodies that need to be checked significantly.
* Changed EntityQueries for 3x perf increase for the EntitySystemManager.Update() method.
Removed the useless giant list EntityQuery.
Allowed the DependencyCollection to be able to inject itself as a dependency. Hopefully it won't be abused too bad.
Added the new IDynamicTypeFactory to IoC for instantiating arbitrary types. This removes the need for Activator.CreateInstance() and IoCManager.InjectDependencies() anywhere in code.
Utilized IDynamicTypeFactory in IComponentManager as an example of its use.
* Added IDynamicTypeFactory to SS14UnitTest.
* Rework entity initialization.
Map loading now correctly processes entity load stages:
1. First all entities are allocated. This allocates the entity and gives
it a UID, nothing more. No user code is executed.
2. Then all entities are loaded. This runs ExposeData on components.
3. Then all entities are initialized. This runs Initialize.
4. Then all entities are started. This runs Startup.
Entity spawning methods on IEntityManager now actually set position
before Initialize.
Also cleaned up a lot of spaghetti.
* Add some comments.
* Refactor tile IDs.
Tile IDs are now automatically assigned at runtime.
A mapping is also stored in map files to avoid compatibility issues.
Also removed tile prototypes. Content is now responsible for it.
This is so content can define its own data for tiles.
* Update map format specification.
* Fix tile placement.
* Reworked the net manager connection sequence.
* Correctly handle IPv4/IPv6 prioritization and fallback.
* Making a proper handshake for an auth system further down the line should be much easier now too.
* Added feedback to connection sequence in the main menu.
This PR establishes the format "Runtime-yyyy-MM-dd-THH-mm-dd.txt" for runtime logs from the server, preventing locale from messing with string escape characters and causing directory runtimes at next line. ~I've replaced the dash with an underscore as they can cause problems in some shells such as windows CLI.~ Dashes are staying because whoever has a shell that complains needs to get a new one.
~~**_I have most importantly made sure that SS14 can live on until the year of our Lord God Emperor and veritable saviour 99,999 Anno Domini of the Gregorian Calendar by extending the runtime-log-naming year range to 5 digits._**~~
~~_Let the meme PRs begin if they haven't already_~~
4 digits so logs will display until 9999, godspeed future maintainers.
I was unable to reach 60 FPS steady on my Intel UHD 630,
so I'd say this is probably warranted.
It doesn't reduce visual quality in any way I can tell.
Load up OpenTK.dll.config again. PackageReference doesn't copy it due to
incorrect packaging.
I had to make packages be downloaded locally to the solution again via
nuget.config to do this, because otherwise I couldn't get a reference to the OpenTK.dll.config in the NuGet package.
Adds a Python script to auto download freetype6.dll and openal32.dll on
Windows.
Clyde does custom shaders. Woo!
Still some things need implementing like custom uniforms and vertex shaders,
but this commit is big enough as is.
Also gets rid of texture array based batching because it was a pain.
It now assumes that a state has the same total animation length for each
direction, this solves problems like rotating resetting animations.
Also paves the way for manual animation control.
I'm channeling the power of spaghetti through individual spaghett-
Wait what do you call an individual thing of spaghetti.
A noodle?
A strand?
Should I use this word every time I write bad code?
// Noodle incoming.
So many questions.
Adds a call to viewport on opengl init in order to properly initialize the viewport size when the OS imposes a window size on window creation. Fixes Windows OS tablet mode-imposed window sizes.
That System diff is a bug.
It's never going to be re-implemented on Clyde,
so I'm making it internal so content doesn't try to touch it.
Also fixed ScrollFollowing not being set.
So uh... Godot. Mind explaining why call()ing a nonexistant function
is completely silent?
Godot's RichTextLabel is extremely complicated to re-implement.
OutputPanel is a stripped down version that's significantly simpler.
It does what it needs to for the purposes we use RichTextLabel.
This is a really crappy OpenGL 4.5 rendering backend. Doesn't draw a lot of things but it's a hell of a lot better than Godot in the stability department. Mostly.
It's far from production ready but I already wrote all this. There's some minor API improvements in here too.
Maps are now synchronized as part of game states.
This instantly fixed all race conditions and the client can now live through a round restart with 0 problems (outside of Godot crashing yay).
I took the functionality of `IoCManager` and moved it into a non-static class. This new class is called `DependencyCollection`. The static `IoCManager` is now just a proxy to a `DependencyCollection` singleton. I also added the ability to directly register instances into the collection. The Smocks library was added to `SS14.UnitTesting`.
This is super useful for unit testing, because now you can register mock instances directly into the collection and then other services can resolve them. You can also apply a shim to static `IoCManager` calls and handle them properly. Because the collection is instanced, we can now run tests in parallel (with a shim) that modify `IoCManager`. The Smocks library gives us the ability to shim static method calls.
The entity manager is supposed to delay entity messages of which the entity doesn't exist (presumably because it *might* due to networking).
Problem is that somebody put a .Clear() at the end right after re-filling the queue.
Wasn't me.
You can now "pause" a map. Ideally this would result in the map not doing significant processing until unpaused.
This can be used later to code proper map editor modes that won't have any side effects while being edited.
1. IPv6 support. Woo!
2. NetManager can now explicitly bind to adresses and work with multiple peers. ~~I thought I needed this for IPv6 because I forgot about IPv4-mapped adresses, but the code's written so let's keep it.~~ OpenBSD doesn't support IPv4-mapped IPv6 addresses so effort not wasted.
* Transforms now unparent themselves before being removed.
Fixed crash with removing deleted entities from containers.
* Removed ClickedOnEntityMessage, use the Input System.
* Removed unused types from Physics system.
* Made CollisionEnabled actually work.
Added Collision group system.
CollidableComponent now registers the collidable in Startup instead of OnAdd.
Fixed BoundingBoxComponent namespace.
* Fixes a bug with adding components remotely.
Adds setters to the new ICollidable properties.
* Fixed unit tests.
* Converted everything (I think) to ICollidable.
* Renamed CollisionManager to PhysicsManager.
Removed the bucket system out of the PhysicsManager.
RayCastResults.Distance was changed from PositiveInfinity to 0f when no entity is hit.
* Soft collidables (bullets) work again.
Previously the GameController was in control of starting the EntityManager, and GameScreen responsible for shutting it and MapManager down.
There was no way to restart the Entity Manager.
This commit makes the start/stopping be handled in the connection procedure of BaseClient.
@Acruid please review.
1. Updates all the NuGet packages (except CommandLineParser because they ruined their API)
2. Makes all projects use C# 7.2 explicitly. (not latest)
3. Use some C# 7.2 features like readonly structs and default literals.
* VV Refactor.
Yes I just wrote it and it's already inadequate and filled with legacy code.
Instances and sessions were a terrible idea, they're getting replaced with "traits".
It's not even more modular.
Practical difference: it now supports private members, fields and displaying things implementing IEnumerable.
* Clean up code, fix some bugs. Document everything.
* Fix broken unit tests.
Adds member field to BaseClient to hold onto override name string. Figured that was the closest place to the usage, so why not stick it there.
On connecting to the server, the client will prefer to use that name, if it's set, over the name from the configuration.
Adds client console command to set that field.
Fixes#660
Added unit tests for all MathHelper methods. Very open to test data values, I tried to specifically seek out edge cases, but I'm sure there're some things I've missed. Added tests for ensuring parameter preconditions throw exceptions.
Made some minor chanes to MathHelper.NextPowerOfTwo:
- Made the long, int and float overloads defer to the double overload since the original implementation was using the same thing as the double implementation anyway.
- Modified the precondition checking for negative numbers to check for non-positive numbers since the implementation for 0 shouldn't work since log(0) is undefined.
- Added precondition checks for float and double implementations to check for NaN and +/-Infinity
- Added special case handling for float and double implementations when the input is greater than zero but less than one where the previous implementation would return negative powers of 2 (ie, non-integer results), which I assumed are not intended. Depending on what people think, that same case could be extended to all inputs less than 1, or contrarily all inputs less than 1 could be considered out of range.
I've noticed that Acruid has PR #666 open to move MathHelper, among others, to a different place, so once that's in, I can merge it into this.
Lemme know if I've missed some procedure in the PR process.
Moved SS14.Shared.Math namespace into its own assembly. This allows projects to reference the math library without needing to include the entire Shared assembly.
* Engine culling.
Sandbox is gone.
Anything resembling "content" such as prototypes and textures is gone.
The engine can no longer load up directly
(short of the client's main menu, of course).
* Make tile prototype definitions workable.
Still not great though.
You can now manually specify their insertion order,
so technically tile ID.
* Move more Player things into content.
Spawning of players is now 100% up to content.
IPlayerData is now purely for content.
* Stupid sandbox.
* Sandbox pls go.
* Aaaaaah.
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.
* Migrated click handling from old `ClickParser` to new `InputSystem`. Resolves#631.
* Input Context system added. Resolves#630.
* `PlacementManager` now uses its own input context.
* Added addon `Entrypoint.PostInit` function.
* Moved EntitySystemManager initialization from after the first state update, to right after the EntitySystem init.
* Made the EntitySystems only run Update/FrameUpdate/events after the map has been initialized.
* MapIndices implements IEquatable.
* Add sane Modulo method to MathHelper.
* SnapGrid improvements.
Has an OnMoved-like event now.
GetInDir helper, basically like BYOND get_step.
* Make MapChunk use new standard mod method.
* entfo command improvements.
Can print diagnostic info from components now.
Doesn't list components multiple times.
* Transform implements IComponentDebug
* Move code to Godot 3.0.6.
It changed collections to use its own collection types.
* Helper to turn Directions.
* I forgot to commit csproj for IComponentDebug.
* Improve SpriteComponent.
Add direction offsets for layers.
Handling of directions is better now.
* Added a shared interface for player sessions.
* Mouse Keys are now additionally handled like Keyboard keys.
Added Keybind for inspect.
* Added KeyFunctionId type.
* Keys now get passed through Gamescreen and into InputSystem.
* Remove useless KeyBindDown and KeyBindUp.
* Tried to get serverside input handling working (Spoiler: It does not).
* Stopped trying to make it over complicated, serverside input handling works!
* More cleanup, made InputSystem more symmetrical between client/server.
* Made it *actually* work with the examine system.
A new component, SnapGrid, now tracks the entity position on the actual tile grid.
This can be used to provide (relatively) quick indexing for say smoothwalling, atmos room calculations, etc...
Added a new DebugTools.Assert function to replace the System Assert. The System assert does not work well on mono, and was not gracefully handled by Visual Studio. This version now throws a unique exception when it fails, instead of the popup window. You can setup Visual Studio to break whenever the exception is thrown. The call sites to the new Assert are still removed in release builds, similar to the System version.
This resolves#569 without needing to add a trace listener.
* Remove `LoadParameters`
* Significantly refactor `EntitySerializer` to be better, no longer specific to entities.
* `IExposeData` so sub objects can be deserialized.
* Map format is now standardized & good.
* Entity and grid references inside map files now cross referenced and resolved correctly. Fixes#524
* Prototype data caching to speed up prototype instantiation.
* Switch from storing the components on each entity to a central database inside of ComponentManager.
* Better deferred component remove.
* Turn the IEntity component functions into proxies of the ComponentManager functions.
* Remove Update() base function from Components. If components need to update, an EntitySystem needs to do it.
Resolves#618.
### Purpose
* Merge ServerConsole and ClientConsoleHost shells into one system named ConsoleShell.
* Migrate all server side commands to the new ConsoleShell system.
* Add a PermissionGroup system, for 'ranks' like user/mod/admin/owner.
* Track per-client permission group, allow clients to elevate permission with global 'sudo' password.
* Changed `IWritableDirProvider.Open()` to return a `Stream` instead of a `FileStream` to help test-ability.
Resolves#612.
### Open Questions and Pre-Merge TODOs
- [x] This fix is tested on the same branch it is PR'ed to.
- [x] I correctly commented my code.
- [x] This PR does not include any unnecessary .meta, .prefab or .unity (scene) changes.
- [x] This PR does not bring up any new compile errors.
- [x] This PR has been tested in editor.
- [x] This PR has been tested in multiplayer.
* Added the new writable VFS API. Resolves#566.
* Moved resource interfaces into the new Interfaces.Resource namespace.
* Adds the property `ResourcePath.Directory`.
Removes the obsolete property `IResourceManager.ConfigDirectory`.
* Marked string version of content functions as obsolete.
* Removed unused `System.IO` using statements.
* Removed the System.IO namespace from a bunch of files.
Made the string version of IResourceCache obsolete, and converted everything to use the ResourcePath versions.
This should Resolve#567.
* Fixing some bugs.
* Un-Obsolete the string functions in IResourceCache and IResourceManager.
2018-07-02 20:33:14 +02:00
1513 changed files with 89572 additions and 43512 deletions
/// Gets or sets the read position in the buffer, in bits (not bytes)
/// </summary>
publiclongPosition
{
get{return(long)m_readPosition;}
set{m_readPosition=(int)value;}
}
/// <summary>
/// Gets the position in the buffer in bytes; note that the bits of the first returned byte may already have been read - check the Position property to make sure.
<Warning Condition="'$(Platform)' != 'x64'" Text="Did not download swnfd because the platform is not set to x64. Only use this build for unit testing!" />
<Warning Condition="'$(Platform)' != 'x64'" Text="Did not download GLFW because the platform is not set to x64. Only use this build for unit testing!" />
<Warning Condition="'$(Platform)' != 'x64'" Text="Did not download misc dependencies because the platform is not set to x64. Only use this build for unit testing!" />
/// The function signature for mouse button callback functions.
/// </summary>
/// <param name="window">The window that received the event.</param>
/// <param name="button">The mouse button that was pressed or released.</param>
/// <param name="action">One of <see cref="InputAction.Press"/> or <see cref="InputAction.Release"/>.</param>
/// <param name="mods">Bit field describing which modifier keys were held down.</param>
/// <seealso cref="GLFW.SetMouseButtonCallback"/>
publicdelegatevoidMouseButtonCallback(Window*window,MouseButtonbutton,InputActionaction,KeyModifiersmods);// TODO: Make enums for int params in callback
/// <summary>
/// The function signature for scroll callback functions.
/// </summary>
/// <param name="window">The window that received the event.</param>
/// <param name="offsetX">The scroll offset along the x-axis.</param>
/// <param name="offsetY">The scroll offset along the y-axis.</param>
> OpenTK uses AdvancedDLSupport for native interoperability. To enable compatibility with the LGPLv3 License, Firwood has given us a licensing exception.
* Read the [license grant](AdvancedDLSupport-LICENSE.pdf).
* Read the [license summary](Short-LICENSE.md) for an easy-to-understand version.
## OpenEXR
> OpenTK.Half offers Half-to-Single and Single-to-Half conversions based on OpenEXR source code, which is covered by the following license:
Copyright (c) 2002, Industrial Light & Magic, a division of Lucas Digital Ltd. LLC. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Industrial Light & Magic nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.