Commit Graph

183 Commits

Author SHA1 Message Date
Pieter-Jan Briers
5d5b897a9b Property animations track (#867)
* 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.
2019-09-17 22:57:12 +02:00
Acruid
f2eb035ed8 Physics Shapes (#847)
* 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.
2019-09-03 22:06:50 +02:00
Pieter-Jan Briers
0a5f9d4b0b Fix parallax gen being broken on Windows. 2019-08-29 23:08:33 +02:00
Pieter-Jan Briers
eff7fa8408 Remove PrivateAssets rules from shared. 2019-08-27 23:11:01 +02:00
Pieter-Jan Briers
51989a8ccc Mark a bunch of packages as private assets.
This will prevent them being referenced in content, so stuff like OpenTK isn't "accessible" from Content.Client.
2019-08-27 22:51:31 +02:00
Pieter-Jan Briers
c16ef6ce77 Update all the NuGet packages. 2019-08-27 22:38:49 +02:00
DamianX
7dc32af73f DefaultColorsInverted ignores duplicates (#853) 2019-08-25 23:45:33 +02:00
DamianX
943b000950 Things for wires (#852)
* Things for wires

* Fixed things
2019-08-25 23:18:03 +02:00
DamianX
7f9f593989 Implemented RobustRandom (#845)
* Implemented RobustRandom

* Fixed RandomString
2019-08-16 21:43:59 +02:00
Pieter-Jan Briers
768fed2421 Optimize Matrix3 Vector2 transforms. 2019-08-11 01:01:40 +02:00
Pieter-Jan Briers
98c1e43fe6 Optimize that color lerp more because I wanted to mess with SIMD. 2019-08-11 00:21:05 +02:00
Pieter-Jan Briers
72c4d56639 Remove a bunch of oldcode from FloatMath.
Did we need to store 256 KiB worth of inaccurate sin/cos lookup? Nah.
2019-08-08 00:41:03 +02:00
Pieter-Jan Briers
e7bf2d0ac9 Use MathF for sqrt in vector types. 2019-08-07 23:16:05 +02:00
Pieter-Jan Briers
8d0012223e Optimize sRGB conversions on .NET Core. 2019-08-07 15:47:49 +02:00
Pieter-Jan Briers
78416ad157 Refactor Color.InterpolateBetween to be faster and make more sense. 2019-08-07 14:52:14 +02:00
Pieter-Jan Briers
fc4e3be40a Replace SS14 noise dependency with FastNoise. 2019-08-07 14:51:23 +02:00
Pieter-Jan Briers
57fb38c04d Improve Random.NextFloat() to be faster. 2019-08-07 14:50:48 +02:00
Pieter-Jan Briers
e62021cb92 Try to work around space-wizards/space-station-14#284 2019-08-03 15:07:43 +02:00
Pieter-Jan Briers
c0eca4f6c2 .NET Core support. 2019-08-02 02:07:03 +02:00
Pieter-Jan Briers
120cab811f Implement tuple -> vector conversions for double vectors. 2019-07-30 18:48:05 +02:00
Pieter-Jan Briers
da1baba550 Add cast from Vector2u to Vector2i. 2019-07-26 12:20:34 +02:00
Acruid
de68a62187 Box2Rotated & Vector2 Rotation (#827)
* Adds a function to rotate a vector by an Angle.
Adds the Box2Rotated struct for holding a rotated box.

* Use ApproxEqualityConstraint
2019-07-19 21:48:40 +02:00
Pieter-Jan Briers
09c36b57cd Shift half of Clyde around to implement better outline rendering. (#830)
* 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.
2019-07-06 19:17:33 +02:00
Pieter-Jan Briers
00f6564351 Update some NuGet dependencies. 2019-05-29 01:45:31 +02:00
Pieter-Jan Briers
bb4a1eda8e Project file refactor (#819)
* 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.
2019-05-28 00:16:01 +02:00
Pieter-Jan Briers
f954bcb3e8 Switch to .NET Framework 4.7.2 2019-05-11 16:09:55 +02:00
Pieter-Jan Briers
dec103ac1b Remove GameController.Mode
The difference between headless and Clyde is now handled by IoC.
2019-05-08 22:24:50 +02:00
Pieter-Jan Briers
6da21ab6c1 Clyde correct sRGB support.
This makes light stacking look less... awful.

Also minor cleanup.
2019-05-08 14:37:48 +02:00
Pieter-Jan Briers
e032557c08 Fix Angle.Equals(object). 2019-05-05 15:43:59 +02:00
Acruid
1b3cc8aba6 Grid Bounds (#800)
* 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.
2019-04-29 12:43:20 +02:00
Pieter-Jan Briers
0d00a6a659 Add Random.Prob extension method helper. 2019-04-27 21:16:30 +02:00
Acruid
7053fb15f8 Map System Code Refactor (#796)
* 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.
2019-04-20 20:37:37 +02:00
Silver
25926a17b7 Renames SS14.* to Robust.* (#793)
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
2019-04-15 20:24:59 -06:00