Compare commits

...

669 Commits

Author SHA1 Message Date
Pieter-Jan Briers
296d39bee6 Make fonts use A8 textures.
Reduces VRAM usage.
2019-05-04 22:17:06 +02:00
Pieter-Jan Briers
772b680723 Render extended ASCII font glyphs. 2019-05-04 21:20:06 +02:00
Pieter-Jan Briers
e2c7a0086c Integration Testing Framework. (#804)
* 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.
2019-05-04 17:51:20 +02:00
Pieter-Jan Briers
6dc5b09005 Move escape menu over to C#, fix layout issues. 2019-05-04 17:51:01 +02:00
Pieter-Jan Briers
e538ca3879 Delete unused main menu scene files. 2019-05-04 17:50:47 +02:00
Pieter-Jan Briers
d621b1a611 Button default text align is centered.
This is in line with Godot's behavior.
2019-05-04 17:49:51 +02:00
Pieter-Jan Briers
130e8b7cf1 SS14Window now handles minsize correctly.
This means the root of it is now a container.
2019-05-03 17:12:01 +02:00
Pieter-Jan Briers
702f38e1fd Fix SplitContainer when constrained by minsize. 2019-05-03 17:11:13 +02:00
Pieter-Jan Briers
1a54d5f513 Load MarginContainer margins from tscn. 2019-05-03 17:10:50 +02:00
Acruid
39eeab14ea Disable Extrapolation (#803)
* 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.
2019-05-03 13:26:06 +02:00
Pieter-Jan Briers
ca97a46387 Fix headless client. 2019-04-29 13:13:09 +02:00
Pieter-Jan Briers
f4b0b69cbb Map Init & Map Loading improvements. (#801)
* 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.
2019-04-29 12:50:28 +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
Acruid
d74151d242 Fixes ExposeData issue in MetaDataComponent. (#799) 2019-04-28 11:13:19 -07:00
Pieter-Jan Briers
0d00a6a659 Add Random.Prob extension method helper. 2019-04-27 21:16:30 +02:00
Pieter-Jan Briers
b2067da28f Remove dead folder reference from server csproj. 2019-04-26 16:08:33 +02:00
Pieter-Jan Briers
2d418eddf0 Prevent SpriteComponent spamming exceptions if RSI fails to load. 2019-04-26 15:48:22 +02:00
Acruid
5fe0bd6e55 EntityStates (#798)
* 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.
2019-04-26 15:38:56 +02:00
Víctor Aguilera Puerto
dabc3194b0 ItemLists now have a scrollbar and can be scrolled with the mouse wheel as well. (#797)
* 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
2019-04-23 01:51:42 +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
Acruid
a5a3a539dc Tick Logic Timing and Bandwidth Improvements (#795)
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.
2019-04-20 18:08:43 +02:00
Acruid
faf99d2231 By default events raised on the ECS event bus are now dispatched immediately. (#794)
Added a new EntityManager.QueueEvent() method that queues the event for the next tick.
2019-04-20 10:58:04 +02:00
Pieter-Jan Briers
55fb70af8b Fix some compiler warnings. 2019-04-19 23:24:19 +02:00
Pieter-Jan Briers
33480f5527 Improve StatusHost
Now uses a list of handlers to make it easier to add REST API endpoints.
2019-04-17 23:24:36 +02:00
Pieter-Jan Briers
ce052d4db3 Add method to post a delegate to the main thread.
Helps for writing threaded code.
2019-04-17 23:23:35 +02:00
Pieter-Jan Briers
28290614a1 Fix CVar command not working to set string CVars with null value. 2019-04-17 23:22:30 +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
tentekal
3aec6eb561 Quick fix for wall draw depth being above the player (#792)
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.
2019-04-15 11:28:18 -06:00
PrPleGoo
02f2e051dc Actual lockers (#787)
Adds storing entities into lockers the way we all know and love.
2019-04-14 21:17:33 +02:00
Pieter-Jan Briers
aa5581f10f Discord Rich Presence improvements:
Makes it toggle-able with a CVar.
2019-04-13 21:07:30 +02:00
Pieter-Jan Briers
8875b88e0f Fix the main menu breaking upon disconnect.
Simulation is necessary for UI to work but it was getting paused.
2019-04-13 21:06:34 +02:00
Pieter-Jan Briers
0a3b2e9bf7 Change config system so you can get notified on config changes. (#791)
Fixes #257
2019-04-13 19:57:14 +02:00
Pieter-Jan Briers
39bfa9f0c3 Change default tick rate back to 60 2019-04-13 13:38:20 +02:00
Pieter-Jan Briers
6b8311100b Fix crash on client connect. 2019-04-13 13:38:15 +02:00
Pieter-Jan Briers
e9b45adf1c Remove chat from the engine. (#790)
* Remove chat from the engine.

* I could've sworn I ran tests
2019-04-13 09:41:28 +02:00
Acruid
a2c1ddb22c Entity Interpolation (#789)
* 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.
2019-04-13 09:33:01 +02:00
Acruid
613ad10f29 Remove InjectDependencies Calls (#784)
* 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.
2019-04-12 21:04:03 -07:00
PrPleGoo
eec287c19a Locker shoving (#785)
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.
2019-04-12 19:40:21 +02:00
PrPleGoo
fb21726dfa Rendering order now done by who was last dirty instead of Uid (#786) 2019-04-12 00:09:55 +02:00
Pieter-Jan Briers
4b663fd508 Implement RichTextLabel, move FormattedMessage to shared. 2019-04-09 16:42:25 +02:00
Pieter-Jan Briers
277647e0c7 Add a helper to async await net messages in entity systems. 2019-04-09 14:41:42 +02:00
Pieter-Jan Briers
5c7a8624c4 You cannot click invisible entities. 2019-04-09 13:40:13 +02:00
Pieter-Jan Briers
f6b7601575 Prevent infinite loop when parenting control to itself. 2019-04-09 13:40:04 +02:00
Pieter-Jan Briers
afc8048d8a Refuse to start if content is not loaded. 2019-04-09 13:03:29 +02:00
Pieter-Jan Briers
dd60ca8883 Shoddy SplitContainer implementation. 2019-04-09 01:41:17 +02:00
Pieter-Jan Briers
25615842c5 Do not render lights on a different map. 2019-04-08 23:14:08 +02:00
Pieter-Jan Briers
b172a47d9e Implement Tree if shoddily. 2019-04-08 18:57:56 +02:00
Pieter-Jan Briers
e40cda6c99 Fix ForceSpawnEntityAt on client throwing an exception. 2019-04-08 18:03:34 +02:00
Acruid
d58d576677 Entitiy Queries & TypeFactory (#783)
* 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.
2019-04-08 12:11:01 +02:00
tentekal
e689da51ba Implemented IEquatable on Angle (#782)
* Implemented IEquatable on Angle

* Removed extrenous code to GetHashCode
2019-04-08 12:10:13 +02:00
Pieter-Jan Briers
42e883c097 Move keybinds OUT of the engine. 2019-04-06 18:06:24 +02:00
Víctor Aguilera Puerto
a890957d30 Implement ItemLists. (#781)
Resolves #756
Style in https://github.com/space-wizards/space-station-14/pull/183

It works, but I'm sure it can be improved further.
2019-04-06 17:04:32 +02:00
Pieter-Jan Briers
1640eb2b6b Fix warning in Lidgren. 2019-04-06 14:41:48 +02:00
Pieter-Jan Briers
506d9a8c22 Stop using Encoding.UTF8. Use EncodingHelpers.UTF8
Apparently, Encoding.UTF8 defaults to inserting a BOM.
This is very dumb.

EncodingHelpers.UTF8 does not emit BOMs.
2019-04-05 01:57:44 +02:00
Pieter-Jan Briers
1b72be9923 Adds GridCoordinates.Distance(GridCoordinates) helper method. 2019-04-05 00:19:35 +02:00
Pieter-Jan Briers
685f9dc07a Copy paste is a dangerous thing. 2019-04-04 19:44:10 +02:00
Pieter-Jan Briers
7e6b5ec290 Adds a frame graph to F3. 2019-04-04 19:20:43 +02:00
Pieter-Jan Briers
6db4722a13 Actually draw ScreenSpace overlays. 2019-04-04 16:23:41 +02:00
Pieter-Jan Briers
fa15950b91 Remove player movement code from the engine. (#780) 2019-04-04 16:18:06 +02:00
Injazz
9ff6a7ec02 Initial Discord Rich presence (#776)
thanks @occune for initial work
put some edits there
doesnt work on macos(waiting on nuget update again)
btw future reference: https://discordapp.com/developers/docs/rich-presence/how-to
2019-04-04 15:14:28 +02:00
Pieter-Jan Briers
c8d939a732 Rework entity initialization. (#779)
* 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.
2019-04-04 15:07:34 +02:00
Injazz
b1bf694c35 Prettyfying README.MD (#777)
Adds header, fixes few links
![rtgithubheader](https://user-images.githubusercontent.com/43905364/55467941-bb6b7c00-561b-11e9-9e11-998f6d158914.png)
2019-04-04 15:06:59 +02:00
Pieter-Jan Briers
0c1c9fae33 Mark YamlHelpers as pure. 2019-04-04 01:37:53 +02:00
Pieter-Jan Briers
5e711072d9 Remove unused field. 2019-04-04 00:36:07 +02:00
Pieter-Jan Briers
0c93f3756a Fix IconSmooth being ignored in engine instead of content. 2019-04-04 00:35:41 +02:00
Pieter-Jan Briers
322fb06be1 Add TileRef GetTile(MapIndices tileCoordinates) to IMapGrid. 2019-04-04 00:33:39 +02:00
Pieter-Jan Briers
d71218943d Expose MapIndices for TileRef. 2019-04-04 00:33:21 +02:00
Pieter-Jan Briers
d7d0363cc3 Refactor tile IDs. (#778)
* 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.
2019-04-03 21:19:55 +02:00
Pieter-Jan Briers
2bb73aa93d Fix macOS builds. 2019-04-01 21:43:05 +02:00
Pieter-Jan Briers
d4cd328f96 Implement UI tooltips. 2019-04-01 20:05:25 +02:00
Pieter-Jan Briers
633eaade45 Prevent empty usernames. 2019-04-01 15:53:29 +02:00
Pieter-Jan Briers
c176392599 New main menu.
Has a join public server button and a username field.
2019-04-01 15:53:21 +02:00
Pieter-Jan Briers
78fc0af6cb Try to fix macOS 2019-04-01 15:14:09 +02:00
Pieter-Jan Briers
c1ec11b4c2 Fix bad log call in AssemblyLoader. 2019-04-01 02:00:36 +02:00
Pieter-Jan Briers
859a39b41b Fix server going in infinite loop. 2019-03-31 16:24:07 +02:00
Pieter-Jan Briers
e5ee9c19ab Fixes server exceptions from #773 (#775) 2019-03-31 14:54:11 +02:00
Pieter-Jan Briers
9e9508937a Fix lights going weird when resizing the window (#774) 2019-03-31 14:50:28 +02:00
Silver
d337fda1e9 localpath special character work around 2019-03-30 18:09:09 -06:00
Pieter-Jan Briers
25a485aea7 NetManager connection handshake improvement. (#773)
* 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.
2019-03-31 00:51:10 +01:00
Pieter-Jan Briers
b5635201c2 Automate GodotSharp.dll download 2019-03-30 23:17:29 +01:00
Silver
e758c114bd Update download_ss14_noise.py 2019-03-30 00:43:47 -06:00
Silver
4fda7867b1 Update readme.md 2019-03-29 14:10:32 -06:00
Pieter-Jan Briers
b72962ac14 Made server data self contained. 2019-03-28 20:45:15 +01:00
Pieter-Jan Briers
5069a2b1a9 Options menu now includes a high res lights toggle. 2019-03-28 19:31:33 +01:00
Pieter-Jan Briers
65e3b0d0d9 Fix default user name being invalid. 2019-03-28 19:30:36 +01:00
Pieter-Jan Briers
f4cd69139d Config refactor.
Config is now stored in the user data directory.
User data directory is now correctly set depending on system.
2019-03-28 16:59:25 +01:00
Pieter-Jan Briers
92bb1d05ba Fix compiler warning in server. 2019-03-28 14:28:57 +01:00
Pieter-Jan Briers
0852561cc1 Implement line rendering in Clyde.
Fixes #754
2019-03-28 14:24:36 +01:00
Pieter-Jan Briers
d4c56c7e9f Fix scrolling not working in entity spawn panel. 2019-03-28 11:31:34 +01:00
Pieter-Jan Briers
20f29fa899 Make entity spawn panel not hang (as much) with this one simple trick. 2019-03-28 11:24:45 +01:00
Pieter-Jan Briers
a30334fc74 Try to work around CAS violations on Windows 10. 2019-03-28 11:12:22 +01:00
Pieter-Jan Briers
8a478326a0 SubscribeEvent<T>(EntityEventHandler<T> evh) for EntitySystem. 2019-03-28 11:12:22 +01:00
Nirnael
287dfceb81 Adds a frame counter to timing debug monitor (#769)
Use case explained in its documentation. I could probably make it a long in case someone runs at thousands of fps for days, or make it debug only.
2019-03-28 09:32:56 +01:00
Pieter-Jan Briers
9661c4490c Merge branch 'master' of github.com:space-wizards/space-station-14 2019-03-27 22:57:22 +01:00
Pieter-Jan Briers
a2e9e0d15f Adds "hide UI" keybind.
Man posting screenshots is much nicer when there's no ugly chat window.
2019-03-27 22:50:19 +01:00
Nirnael
6481a22a71 Establish standard format for runtime log naming and future-proof it until the human race perishes (#767)
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.
2019-03-27 22:46:11 +01:00
Víctor Aguilera Puerto
72fcf86227 AudioParams can be defined in YAML now (#768) 2019-03-27 22:45:49 +01:00
Pieter-Jan Briers
84b4b3d6b5 Bind QuadVAO in _drawQuad.
This fixes lighting if parallax isn't initialized yet.
2019-03-27 18:18:19 +01:00
Pieter-Jan Briers
14bfb8aa5b Suppress gdparse warnings. 2019-03-27 17:16:27 +01:00
Pieter-Jan Briers
6d4612e40b Fix edge sampling issues on nvidia. 2019-03-27 15:53:53 +01:00
Pieter-Jan Briers
4c3ed1181d Allow toggling light rendering with a command. 2019-03-26 19:46:55 +01:00
Pieter-Jan Briers
0763f949a5 Properly fix ClipboardManagerLinux. 2019-03-26 14:52:47 +01:00
Pieter-Jan Briers
46a89686bc Half lightmap dimensions by two on Intel iGPUs.
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.
2019-03-26 14:38:01 +01:00
Pieter-Jan Briers
b26bab1361 Implement SpriteComponent Rotation on Clyde. 2019-03-26 11:45:32 +01:00
Injazz
27a91e3880 Implements move disabler (#765)
blocks entity movement
2019-03-26 11:17:13 +01:00
Pieter-Jan Briers
2043a1e345 Fix exception if trying to delete air with placement. 2019-03-26 09:32:04 +01:00
Pieter-Jan Briers
2850bc80d1 Make Clyde more uuuh robust against problems. 2019-03-26 09:31:47 +01:00
Pieter-Jan Briers
5942e6fba6 Deleting an entity deletes entities in containers too.
If you want to avoid this behavior, the entity can be ejected early.
2019-03-26 09:04:22 +01:00
Pieter-Jan Briers
458a5a05b2 Fix inability to move while placing. 2019-03-26 08:46:28 +01:00
Pieter-Jan Briers
8efd997810 Implement OptionButton shoddily but functionally. 2019-03-26 08:28:50 +01:00
Pieter-Jan Briers
0dd5f72b3b Fix Popup control defaulting to visible. 2019-03-26 08:28:34 +01:00
Pieter-Jan Briers
ab9f9a99d6 Implement modal popups correctly. 2019-03-26 01:10:15 +01:00
Pieter-Jan Briers
7870a540cf IList<T>.Pop() Helper. 2019-03-26 01:09:47 +01:00
Pieter-Jan Briers
74e002b5a0 I fixed'nt it in the wrong direction. 2019-03-26 00:09:32 +01:00
Pieter-Jan Briers
eac17e5b25 Placement manager cleanup. 2019-03-26 00:01:36 +01:00
Pieter-Jan Briers
df6feae7f4 Fix incorrectly offset godot and clyde grid rendering.
Every tile was incorrectly one tile down.
2019-03-26 00:01:23 +01:00
Pieter-Jan Briers
120beb29ad More verbose TileRef ToString. 2019-03-26 00:00:44 +01:00
Pieter-Jan Briers
522ce2fe59 Current grid tile in debug coords panel. 2019-03-26 00:00:32 +01:00
Pieter-Jan Briers
bc9b490169 Fix placement modes not centering large sprites correctly. 2019-03-25 23:13:51 +01:00
Pieter-Jan Briers
34a5649462 Fix reconnect exception. 2019-03-25 14:04:05 +01:00
Pieter-Jan Briers
1ff08f70ef More culture fixes for YamlObjectSerializer 2019-03-25 13:26:07 +01:00
Pieter-Jan Briers
cc0948c1e2 Adding entity while iterating all entities works now. 2019-03-25 13:09:26 +01:00
Pieter-Jan Briers
e3117263ac Ah crap. 2019-03-25 12:55:00 +01:00
Pieter-Jan Briers
83baaea8f1 Fix locale issues with map saving. 2019-03-25 12:47:56 +01:00
Pieter-Jan Briers
75ebdb4a00 Remove debug code from clipboard managers. 2019-03-25 12:47:55 +01:00
Remie Richards
f4983cc1cc Expose a readonly version of YamlObjectSerializer's TypeSerializer dict. (#763) 2019-03-24 23:37:43 +01:00
Pieter-Jan Briers
00694aa46b AppVeyor fix attempt 2 2019-03-24 20:39:16 +01:00
Pieter-Jan Briers
8e80e3a5c3 AppVeyor fix attempt 1 2019-03-24 20:28:05 +01:00
Pieter-Jan Briers
1f42e9672d Re-implement RSI atlassing with norma atlasses. 2019-03-24 20:01:45 +01:00
Pieter-Jan Briers
6328fb86b3 Fix incorrect tile atlas generation. 2019-03-24 20:01:20 +01:00
Pieter-Jan Briers
226ec200ca Use Rgba16f for lighting framebuffer.
This significantly improves performance and I can't tell a difference.
2019-03-24 17:31:25 +01:00
Pieter-Jan Briers
1c460e1d85 Fix unit tests. 2019-03-24 17:20:39 +01:00
Pieter-Jan Briers
54c920b2d4 Grid rendering improvements:
1. tile sprite is no longer hardcoded so multiple floor types is
possible.
2. Batches are cached across frames to improve performance.
2019-03-24 17:19:01 +01:00
Víctor Aguilera Puerto
422fe4666e Remove SS14.Shared.Bsdiff from submodules. (#762)
Seems it's not really needed anymore.
2019-03-24 13:51:49 +01:00
PJB3005
ae21b98d9a Implement clipboard on Windows 2019-03-23 20:08:44 +01:00
Pieter-Jan Briers
a74f8c9787 Re-implement UserInterfaceManager.Popup. 2019-03-23 17:21:43 +01:00
Pieter-Jan Briers
de50dcf49c Add clipboard support. 2019-03-23 17:17:10 +01:00
Pieter-Jan Briers
dd37e54e43 Switch lighting framebuffer back to Rgba32f.
Apparently implementations aren't required to implement Rgb32f.
2019-03-23 16:25:44 +01:00
Pieter-Jan Briers
43c06c81c0 Less hideous outlines. 2019-03-23 15:02:31 +01:00
Pieter-Jan Briers
4767b23fb8 Adds a camera offset to eyes. 2019-03-23 14:39:13 +01:00
Pieter-Jan Briers
9e0c33c9bf Rays do not intersect with non hard collidables.
This was causing you to be unable to fire a laser gun through an open
door.
2019-03-22 23:57:08 +01:00
Pieter-Jan Briers
ab1dfed25c Rebuild world matrix on parent change.
This fixes things getting reset to 0,0 on ejection from containers.
2019-03-22 22:15:51 +01:00
Pieter-Jan Briers
e467df24f8 Do not show nested entities in showbb. 2019-03-22 22:15:31 +01:00
Pieter-Jan Briers
bc79f07395 Remove HRTF hack.
Turns out it's HRTF and disabling it at a system level is better.
2019-03-22 22:05:41 +01:00
Pieter-Jan Briers
94e5561157 Just commit the fancy main menu already.
I've been sitting on this for weeks and I'm too lazy to make it "proper"
So I'll just push it like this.
2019-03-22 21:51:41 +01:00
Nirnael
ee3c017104 Fix runtimes log missing dir exception (#761) 2019-03-22 21:50:05 +01:00
Remie Richards
c73cb9fefc Error/Hint when using RSIs as texture in SpriteComponent (#760)
We've all ran into this before.
2019-03-22 21:49:56 +01:00
Pieter-Jan Briers
5d855b7aec Spawn command works from server console. 2019-03-22 21:49:20 +01:00
Pieter-Jan Briers
3222574b61 Load up icon. 2019-03-22 21:49:20 +01:00
Pieter-Jan Briers
dd3bd307ed Update readme. 2019-03-22 21:49:20 +01:00
Pieter-Jan Briers
cf7c401ee0 Runtime Log & Exception Catching. (#759) 2019-03-22 12:50:17 +01:00
Pieter-Jan Briers
41cd4ca888 Time for 5 commits trying to fix Travis. 2019-03-21 23:29:09 +01:00
Pieter-Jan Briers
21be226b33 Fix audio quality on Linux? 2019-03-21 23:28:25 +01:00
Pieter-Jan Briers
3c8ee48d3f Use Rgb32f instead of Rgba32f for lighting buffer. 2019-03-21 21:53:32 +01:00
Pieter-Jan Briers
d382f7e6ab SS14Serializer improvements:
1. OpenTKTypeSerializer is no longer necessary since we have our own
math types.
2. Added a check to prevent NetSerializable on server/client types.
2019-03-21 21:30:10 +01:00
Pieter-Jan Briers
2dc42a7b75 Fix missing dependency issues:
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.
2019-03-21 18:49:25 +01:00
Pieter-Jan Briers
fdc414975b Fix inability to open APC on Godot. 2019-03-21 18:08:47 +01:00
Pieter-Jan Briers
75d13cc8a1 Implement Modulate on controls under Clyde.
This fixes content notifies crashing.
2019-03-21 18:02:51 +01:00
Pieter-Jan Briers
c5f6f9b12a Correctly apply shaders to sub handles of overlays on Clyde.
Fixes lasers not being unshaded.
2019-03-21 17:52:20 +01:00
Pieter-Jan Briers
39dffd6d9e Increase darkness brightness.
This should be more in line with Godot.
2019-03-21 17:51:56 +01:00
Pieter-Jan Briers
2195c1653a Clyde now does lights.
Shadows not included.
2019-03-20 23:25:46 +01:00
Pieter-Jan Briers
505f6b2fd7 Fix config system errors due to audio device. 2019-03-20 23:25:08 +01:00
Pieter-Jan Briers
3cf0a19c36 Effects work on Clyde.
Closes #757
2019-03-20 14:33:42 +01:00
Pieter-Jan Briers
c5c74d7f1d Apply pitch and volume. 2019-03-20 01:12:13 +01:00
Pieter-Jan Briers
824e071eb6 Avoid OpenAL errors by disposing all audio sources on shutdown. 2019-03-20 00:26:53 +01:00
Pieter-Jan Briers
6d523f8551 Audio stream playback in animations. 2019-03-19 23:55:58 +01:00
Pieter-Jan Briers
fc7ca1471c Use NVorbis for Vorbis decoding.
Removes one native dependency.
2019-03-19 23:18:21 +01:00
Pieter-Jan Briers
88a0ba7172 Audio actually gets played back now. 2019-03-19 22:41:09 +01:00
Pieter-Jan Briers
492ffe159b Rename "OpenGL" to "Clyde" where applicable. 2019-03-19 17:08:43 +01:00
Pieter-Jan Briers
a6d21996c7 OpenAL beginnings and audio sample loading. 2019-03-19 16:58:00 +01:00
Pieter-Jan Briers
a236193e24 Outlines draw now. 2019-03-19 00:45:12 +01:00
Pieter-Jan Briers
835dba99a4 The big "suddenly shaders" commit.
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.
2019-03-18 23:52:49 +01:00
Pieter-Jan Briers
379d653117 Fix Godot. 2019-03-18 15:00:35 +01:00
Pieter-Jan Briers
9eb6a75290 Remove dead SpriteView file. 2019-03-17 22:32:38 +01:00
Pieter-Jan Briers
67528e9c20 Pretty sure this fixes Godot 3.1 support. 2019-03-17 22:32:21 +01:00
Pieter-Jan Briers
ff2a642b4a Adds list pick utility. 2019-03-17 15:48:12 +01:00
Pieter-Jan Briers
19784b4c31 Adds entity delete command. 2019-03-17 15:34:57 +01:00
Pieter-Jan Briers
d524d3138f Do not render invisible sprite components. 2019-03-17 15:34:05 +01:00
Pieter-Jan Briers
b8a7c36f0c Add EntityUid.TryParse method. 2019-03-17 15:33:53 +01:00
Pieter-Jan Briers
2d127a476b Fix incorrect ordering of godot scene siblings without explicit index in their header. 2019-03-17 14:36:44 +01:00
Pieter-Jan Briers
ee54f35185 Ensure consistent entity drawing order. 2019-03-17 13:27:13 +01:00
Pieter-Jan Briers
a1425e03fc Animation system. 2019-03-17 13:23:54 +01:00
Pieter-Jan Briers
fca69233ea Fix non-incrementing LayerSetAnimationTime 2019-03-17 13:22:47 +01:00
Pieter-Jan Briers
437f01bd14 Fix timers dropping seconds. 2019-03-17 12:14:01 +01:00
Pieter-Jan Briers
01b781ac03 Optimize SpriteComponent.LayerSetAnimationTime for going forward.
Also actually fix it setting texture.
2019-03-17 00:36:22 +01:00
Pieter-Jan Briers
19c47e93dc Allow controlling animations externally on sprite component. 2019-03-17 00:27:46 +01:00
Pieter-Jan Briers
1c3b7fe242 Animated RSI states have an animation length now. 2019-03-17 00:27:06 +01:00
Pieter-Jan Briers
8f966e2c83 Rework SpriteComponent animation code.
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.
2019-03-16 23:26:10 +01:00
Pieter-Jan Briers
866f96b912 Print exception stack trace when a command errors on the server. 2019-03-16 21:21:43 +01:00
Pieter-Jan Briers
b092aa2ccf Don't run Godot circle drawing on Clyde. 2019-03-16 21:21:25 +01:00
Pieter-Jan Briers
369e6d4f11 Actually respect the prototype default placement mode.
This is kinda just a stopgap since the selection button
isn't implemented on Clyde.
2019-03-16 21:20:43 +01:00
Pieter-Jan Briers
370302ce59 Fix ToRelativePath() for "/" 2019-03-16 21:19:33 +01:00
Pieter-Jan Briers
c2782cb0b9 Improve savebp command:
1. Now gives feedback whether the save worked.
2. Actually listen to the path argument.
2019-03-16 20:50:08 +01:00
Pieter-Jan Briers
b73df4c478 Make trying to get a nonexistant component have a better error. 2019-03-16 20:23:36 +01:00
Pieter-Jan Briers
73bd4f6301 Actually load window size from config file. 2019-03-16 19:08:15 +01:00
Pieter-Jan Briers
34821b7e9b Change GL context version to 3.3.
I have decided that we should be able to run the code on OpenGL 3.3.
Mostly because I was inspired to keep it working on that 2008 macbook.
2019-03-16 19:03:53 +01:00
Pieter-Jan Briers
fde75ad02a SpriteComponent uses WorldMatrix & handles Directional correctly.
This makes gun projectiles look correct.
2019-03-16 18:57:04 +01:00
Pieter-Jan Briers
13ce078126 Matrix3.CreateRotation override for Angle. 2019-03-16 18:56:28 +01:00
Pieter-Jan Briers
fef7fe1980 Use in parameter for DrawingHandle.SetTransform(Matrix3) 2019-03-16 18:35:06 +01:00
Pieter-Jan Briers
a3594b2ded Set anchors to zero in Container.FitChildInBox(). 2019-03-16 18:25:32 +01:00
Pieter-Jan Briers
8c184864e2 Fix MarginContainer size calculations. 2019-03-16 18:25:18 +01:00
Pieter-Jan Briers
5bc9073b26 Implement GridContainer. 2019-03-16 18:13:27 +01:00
Pieter-Jan Briers
70d18a13b1 Do not apply text align if button has to clip text. 2019-03-16 18:13:17 +01:00
Pieter-Jan Briers
68a5e75ea8 Implement CenterContainer. 2019-03-16 16:46:15 +01:00
Pieter-Jan Briers
80900ba708 Implement MarginContainer. 2019-03-15 23:51:24 +01:00
Pieter-Jan Briers
9fbaf144a6 Channels the power of spaghetti to implement SpriteView in Clyde.
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.
2019-03-15 19:07:03 +01:00
Pieter-Jan Briers
8d78fc41e7 Prevent crash when rendering fonts. 2019-03-13 23:20:08 +01:00
Pieter-Jan Briers
010d32424a Relicense future code to MIT. 2019-03-13 13:25:55 +01:00
Pieter-Jan Briers
ae0d34cd7e Just barely implement Popup 2019-03-12 10:01:00 +01:00
Pieter-Jan Briers
db45961936 Fix middle and right click being treated as left click. 2019-03-12 10:00:44 +01:00
Pieter-Jan Briers
b2bb711dbb CheckBox works. 2019-03-11 11:55:13 +01:00
Pieter-Jan Briers
d139203367 UITest command for testing. 2019-03-08 17:14:11 +01:00
Pieter-Jan Briers
ec314a64b2 Implement ProgressBar 2019-03-08 17:14:01 +01:00
Pieter-Jan Briers
ebbcd36524 Define CheckButton so APC UI opens 2019-03-08 17:13:49 +01:00
Pieter-Jan Briers
4874254acc Apparently I completely forgot to push this.. 2019-03-08 17:13:14 +01:00
Pieter-Jan Briers
af186959db Load Range values from tscn. 2019-03-08 17:12:37 +01:00
Pieter-Jan Briers
f6e4dd6a00 Drop keyboard focus when clicking on nothing. 2019-03-08 14:22:14 +01:00
Pieter-Jan Briers
d025065d40 Controls now lose focus when hidden or deleted. 2019-03-08 14:18:14 +01:00
Pieter-Jan Briers
7919be26f1 Fix crash on Godot as a result of bff03cd2b8 2019-03-08 14:17:58 +01:00
Pieter-Jan Briers
82d1a24f78 Entity Spawn Window now takes name into consideration for search. 2019-03-08 13:59:19 +01:00
Pieter-Jan Briers
bff03cd2b8 Placement drawing moved to overlay; works in Clyde.
Fixes #597
2019-03-08 10:23:08 +01:00
Pieter-Jan Briers
cf32f0874d Clyde improvements.
Fix some render state leaking across drawing handles.
Draw world space overlays.
2019-03-08 10:21:37 +01:00
Pieter-Jan Briers
24b6240f3b Clip culling for controls.
This significantly speeds up rendering of things like
the entity spawn panel.
2019-03-08 09:26:05 +01:00
Pieter-Jan Briers
12896f306c Fix VSync button not starting in the right color. 2019-03-08 09:06:25 +01:00
Pieter-Jan Briers
40a037a97a Fix initial LineEdit placeholder being the wrong color. 2019-03-08 08:57:46 +01:00
Pieter-Jan Briers
b533968531 Fix bad layout in tscn files for spawn panels. 2019-03-06 16:06:52 +01:00
Pieter-Jan Briers
88572c5bae Change base types of spawn panel items to PanelContainer.
To match the types in the tscn files.
2019-03-06 16:06:38 +01:00
Pieter-Jan Briers
8b23a80357 Improve the GUI dump command. 2019-03-06 16:06:06 +01:00
Pieter-Jan Briers
06675cd956 Load rect_clip_content and rect_min_size from tscn. 2019-03-06 16:05:53 +01:00
Pieter-Jan Briers
20e5fe9b4d Fix Godot 3.0 compatibility. 2019-03-05 21:56:47 +01:00
Pieter-Jan Briers
19a7e21d47 Fix inconsistent FPS on Clyde.
Fixes #729

This was simple. Client was defaulting to 50 FPS while the server was defaulting to 60.

Jeez.
2019-03-05 18:04:51 +01:00
Pieter-Jan Briers
2ff15f7fb0 Improve ridiculous VV window sizes. 2019-03-05 09:37:34 +01:00
Pieter-Jan Briers
2848d40d5d Implement Button.ClipText. 2019-03-05 09:35:18 +01:00
Pieter-Jan Briers
f8359a38e0 Change default filter mode for containers.
This fixes VV's "click to expand" functionality on the property controls
2019-03-05 09:21:35 +01:00
Pieter-Jan Briers
975439c388 VV debug command addition.
Now has a Vector2 field. I needed this to check something.
2019-03-05 09:03:51 +01:00
Pieter-Jan Briers
94e744b751 Unit test BoxContainer. 2019-03-05 09:03:27 +01:00
Pieter-Jan Briers
5c57ce1118 Fix BoxContainer with multiple expanding children. 2019-03-05 09:03:13 +01:00
Pieter-Jan Briers
c751bff500 Use the power of operator overloading to implicit cast tuples to Vector2 2019-03-05 09:02:47 +01:00
Pieter-Jan Briers
df2e2af7f2 Default vertical size flags for label correctly. 2019-03-04 17:59:58 +01:00
Pieter-Jan Briers
ba59e71b7a Control input clipping. 2019-03-04 17:40:12 +01:00
Pieter-Jan Briers
274dfb769d Increase ScrollContainer scrolling speed.
Really this shouldn't be hardcoded but oh well.
2019-03-04 15:45:09 +01:00
Pieter-Jan Briers
12a61918ab Add GUI dump command. 2019-03-04 15:41:41 +01:00
Pieter-Jan Briers
28e60109f0 Code Cleanup of Console/Commands/Debug.cs 2019-03-04 15:40:50 +01:00
Pieter-Jan Briers
e24f55476e VV can now VV VV. 2019-03-04 15:38:46 +01:00
Pieter-Jan Briers
8c5a2dedb9 Oh yeah maybe commit this. 2019-03-04 15:36:23 +01:00
Pieter-Jan Briers
07880f4352 Give VV windows a control name to ease debugging. 2019-03-04 15:36:07 +01:00
Pieter-Jan Briers
4b104c01a1 Fix StyleBoxFlat margins being a mess. 2019-03-04 15:35:37 +01:00
Pieter-Jan Briers
278e1299b8 Slap [ViewVariables] on Control. 2019-03-04 15:35:17 +01:00
Pieter-Jan Briers
46e1b10269 Fix Control.SetMarginPreset with right and bottom anchors. 2019-03-04 15:34:40 +01:00
Pieter-Jan Briers
9f24bf2602 Remove bad AutoLoad from project.godot. 2019-03-04 13:48:54 +01:00
Pieter-Jan Briers
15350e7969 Merge branch 'master' of github.com:space-wizards/space-station-14 2019-03-04 12:48:15 +01:00
Pieter-Jan Briers
88b6a7f4da DebugConsole history is less broken and saved to disk. 2019-03-04 12:47:39 +01:00
Pieter-Jan Briers
4a8fdf744e Fix all the ScrollContainer crashes.
Probably.
2019-03-04 12:47:20 +01:00
Pieter-Jan Briers
37f51a9dd1 Implement LineEdit.Editable, improve LineEdit styling. 2019-03-04 12:47:01 +01:00
Pieter-Jan Briers
9352ccf82d LineEdit improvements:
Added IgnoreNext bool to prevent keys that focus it getting entered.
Made OnTextChanged not fire when setting Text.
2019-03-04 11:27:34 +01:00
Nirnael
200bc572bf Fix viewport size on window creation for OS-imposed sizes (#743)
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.
2019-03-01 21:04:19 +01:00
Pieter-Jan Briers
de5f3d8870 Mostly functional ScrollContainer. 2019-03-01 16:28:17 +01:00
Pieter-Jan Briers
5505ee91f0 Help the entire UI system is spaghetti and we need to fix this. 2019-03-01 16:27:58 +01:00
Pieter-Jan Briers
7340e1212c Once again remove 3.1 project.godot 2019-02-27 13:53:01 +01:00
Pieter-Jan Briers
2ec0ae41fe Add safety check to ScrollBar.IsAtEnd. 2019-02-26 17:04:58 +01:00
Pieter-Jan Briers
9e718a01d8 OutputPanel uses ScrollBars 2019-02-26 17:04:37 +01:00
Pieter-Jan Briers
45efe4f29f Implement scroll bars. 2019-02-26 15:39:57 +01:00
Pieter-Jan Briers
acd0299f1e Avoid redundant pseudo class restyles. 2019-02-26 14:31:26 +01:00
Pieter-Jan Briers
11b0c871c3 Fix MouseMove only firing on mouse focus. 2019-02-26 10:49:23 +01:00
Pieter-Jan Briers
3fb791bd0d Do not stop mouse wheel with stop filter mode.
Arguably we should have some kinda event mask for this,
but this is how Godot does it and I'm not gonna engineer a better
solution.
2019-02-26 10:49:07 +01:00
Pieter-Jan Briers
fb4b325f59 TabContainer mostly works, shoddily. 2019-02-25 10:52:30 +01:00
Pieter-Jan Briers
85da2b9a19 Add StyleBox.GetEnvelopBox. 2019-02-25 00:43:48 +01:00
Pieter-Jan Briers
9858004de8 Fix really bad copy paste mistake.
Jeez. X always comes before Y when sorting like that. Style man.
2019-02-25 00:05:08 +01:00
Pieter-Jan Briers
47180ab2d5 Use this newfound clipping power on OutputPanel. 2019-02-24 23:04:42 +01:00
Pieter-Jan Briers
fa8f4b697f Implement Control RectClipContent with Scissor testing. 2019-02-24 22:43:45 +01:00
Pieter-Jan Briers
68a2543020 Adds UIBox2i.Intersection. 2019-02-24 22:33:56 +01:00
Pieter-Jan Briers
76f47e07df Control.OnVisibilityChanged does not fire if value == _visibility. 2019-02-24 21:30:18 +01:00
Pieter-Jan Briers
4e71bd541f Controls get a ChildMoved event. 2019-02-24 21:29:57 +01:00
Pieter-Jan Briers
8747d68ee3 Change default font DPI to 96.
Windows also treats 96 as the default 100% I believe.
2019-02-24 15:54:57 +01:00
Pieter-Jan Briers
0a84fca028 I should learn to be careful with C APIs.
Fixes crashes related to the font system.
2019-02-24 15:53:37 +01:00
Pieter-Jan Briers
66bf5d7c48 Make Chatbox use OutputPanel. 2019-02-24 01:11:39 +01:00
Pieter-Jan Briers
4a7b39bc84 Prevent negative scroll amounts on OutputPanel. 2019-02-24 01:10:31 +01:00
Pieter-Jan Briers
5f3b1414f8 Fix OutputPanel with null panel override on Godot.
Also add StyleBoxEmpty.
2019-02-24 01:05:54 +01:00
Pieter-Jan Briers
0984befcae DebugConsole: remove need for separate PanelContainer. 2019-02-24 00:12:54 +01:00
Pieter-Jan Briers
91854cfd0b OutputPanel gets its own style box to draw. 2019-02-24 00:12:30 +01:00
Pieter-Jan Briers
90c351bb21 Load size flags from tscn. 2019-02-24 00:11:44 +01:00
Pieter-Jan Briers
6bd84abaf4 Rename NetDebugPanel to DebugNetPanel 2019-02-23 23:31:39 +01:00
Pieter-Jan Briers
f753b131e0 Maybe don't forget to commit the PanelContainer implementation. 2019-02-23 23:29:51 +01:00
Pieter-Jan Briers
1d23df6d79 Make DebugConsole scene purely in code. 2019-02-23 23:28:11 +01:00
Pieter-Jan Briers
72788cc263 Fix Control Size setter if minsize < margin-calculated size. 2019-02-23 23:15:09 +01:00
Pieter-Jan Briers
60d0e9c62b Debug Monitors don't update text while hidden. 2019-02-23 23:08:19 +01:00
Pieter-Jan Briers
1fd2cfa7fd Containers re-sort on resize. 2019-02-23 23:07:54 +01:00
Pieter-Jan Briers
e463718917 Fix bad copy paste bug in Container.FitChildInBox. 2019-02-23 23:07:43 +01:00
Pieter-Jan Briers
5890e08bb3 Add Control.VisibleInTree 2019-02-23 23:06:59 +01:00
Pieter-Jan Briers
a1840b9732 Control Size related convenience helpers. 2019-02-23 20:03:51 +01:00
Pieter-Jan Briers
43430b458c Prevent infinite Control parent chain recursion. 2019-02-23 19:57:56 +01:00
Pieter-Jan Briers
c99622c2f8 Improve OutputPanel scroll speed. 2019-02-23 16:55:54 +01:00
Pieter-Jan Briers
2462caf25a Improve LineEdit styling and rendering. 2019-02-23 16:35:09 +01:00
Pieter-Jan Briers
bbef6657c1 More Clyde optimizations.
Just less data copying, better data copying, reduced pooling usage.
2019-02-22 14:22:17 +01:00
Pieter-Jan Briers
096ac8624e Improve FPS significantly...
By raising the command pool capacity.
2019-02-21 22:47:04 +01:00
Pieter-Jan Briers
f9753e80ac Fix various compiler warnings. 2019-02-21 22:01:13 +01:00
Pieter-Jan Briers
b3e3066c53 More premature optimizations. 2019-02-21 18:13:03 +01:00
Pieter-Jan Briers
99cd2adfc7 Clyde rendering optimizations. 2019-02-21 17:04:18 +01:00
Pieter-Jan Briers
052125e62a Fix clear not resetting enough state on OutputPanel. 2019-02-21 17:04:07 +01:00
Pieter-Jan Briers
8f61b898b7 Improve StyleBoxTexture API.
SetMargin has been deprecated in favor of the more clear SetPatchMargin.
Added SetExpandMargin.
2019-02-21 13:49:35 +01:00
Pieter-Jan Briers
eed8b670d1 Implement Control order control. 2019-02-21 13:33:09 +01:00
Pieter-Jan Briers
2e608e2e52 Implement OutputPanel with RichTextLabel in Godot. 2019-02-21 12:10:16 +01:00
Pieter-Jan Briers
6f5d16b55a Make RichTextLabel internal & fix some bugs.
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?
2019-02-21 12:09:41 +01:00
Pieter-Jan Briers
13b5b365e3 Implement Control.SetAnchorAndMarginPreset 2019-02-21 11:40:19 +01:00
Pieter-Jan Briers
96a622f94f OutputPanel as a simpler alternative to RichTextLabel.
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.
2019-02-21 02:11:27 +01:00
Pieter-Jan Briers
016fbc1e70 Clean up FormattedMessage a bit. 2019-02-21 02:07:34 +01:00
Pieter-Jan Briers
7bba1b52eb Controls now fire Resized correctly. 2019-02-21 02:04:05 +01:00
Pieter-Jan Briers
7ef499c1da Implement MouseWheel input. 2019-02-21 02:03:25 +01:00
Pieter-Jan Briers
0b0a5d4887 Add LineSeparation to Font. 2019-02-21 02:02:22 +01:00
Pieter-Jan Briers
8fe579a104 Fix bad doc comment in ShallowClone. 2019-02-20 14:50:43 +01:00
Pieter-Jan Briers
2c8a76a8ea Improve LineEdit mouse -> cursor position. 2019-02-19 19:56:37 +01:00
Pieter-Jan Briers
2e774c5b68 Rough but functional LineEdit. 2019-02-19 16:28:13 +01:00
Pieter-Jan Briers
acfb56dca2 Add StyleBox.GetContentOffset 2019-02-19 16:28:00 +01:00
Pieter-Jan Briers
8bd30ce72e Add UTF-16 surrogate check to OpenTK's KeyPress.
I'm not sure if this can happen but if it does I'd rather blow up and have to figure out why there's random surrogates all over the place.
2019-02-19 16:27:38 +01:00
Pieter-Jan Briers
b517481014 Make BoxContainer ignore visible controls.
While this behavior is debatable, I'm mimicking Godot's behavior here.
2019-02-19 15:02:58 +01:00
Pieter-Jan Briers
c8f8fbf964 KeyUp/KeyDown now handled by UI 2019-02-19 14:45:26 +01:00
Pieter-Jan Briers
79806c397c Use KHRDebug debug groups in rendering. 2019-02-19 13:25:50 +01:00
Pieter-Jan Briers
31d0bec93e Font metrics improvements.
Adds more data to CharMetrics.

TryGetCharMetrics.
2019-02-19 12:44:38 +01:00
Pieter-Jan Briers
c8b793a8fb Do not shy away from repeated key down events. 2019-02-19 12:44:06 +01:00
Pieter-Jan Briers
1c46a156c4 Automatic keyboard focus grabbing. 2019-02-19 09:19:07 +01:00
Pieter-Jan Briers
e3ff9bf4a7 Implement TextEntered event. 2019-02-19 00:08:10 +01:00
Pieter-Jan Briers
5af16c2ef4 Some refactorings related to implementing GUI keyboard input. 2019-02-18 23:28:31 +01:00
Pieter-Jan Briers
7462aeb8f3 Fix EntitySpawnWindow crash. 2019-02-18 23:27:41 +01:00
Pieter-Jan Briers
d838f568af Do not propagate mouse events to InputManager if intercepted by GUI 2019-02-18 11:21:12 +01:00
Pieter-Jan Briers
73a1f2ec61 Implement BoxContainer separation via CSS. 2019-02-18 09:03:24 +01:00
Pieter-Jan Briers
793ae245ac Skip nonexistant glyphs in font atlas generation. 2019-02-18 01:15:28 +01:00
Pieter-Jan Briers
e44c4275e7 Make element selectors use Type instead of type names. 2019-02-18 00:43:00 +01:00
Pieter-Jan Briers
af1137418a Implement Button font color. 2019-02-18 00:14:04 +01:00
Pieter-Jan Briers
052feee756 Remove DummyUserInterfaceManager.
It was a relic of Godot. UserInterfaceManager now runs under unit tests.
2019-02-17 23:52:07 +01:00
Pieter-Jan Briers
a73e966175 Unit test UserInterfaceManager. 2019-02-17 23:51:02 +01:00
Pieter-Jan Briers
40f635483b Fix incorrect relative positioning on mouse events. 2019-02-17 23:50:33 +01:00
Pieter-Jan Briers
a30de7659f Make mouse input do propagation correctly. 2019-02-17 19:10:53 +01:00
Pieter-Jan Briers
b202cc196d Fix edge cases with child selector by making Control.Restyle sorta recursive but not really. 2019-02-16 01:06:09 +01:00
Pieter-Jan Briers
386fc519e3 Fix some size bugs with Button styling. 2019-02-16 01:04:38 +01:00
Pieter-Jan Briers
8730d6a867 Make Button styling possible. 2019-02-16 00:56:49 +01:00
Pieter-Jan Briers
97fc8d6392 Implement GetDefaultContentMargin for StyleBoxTexture. 2019-02-16 00:56:34 +01:00
Pieter-Jan Briers
e0beaf638f Style classes for SS14Window elements. 2019-02-15 14:04:36 +01:00
Pieter-Jan Briers
9d3f501240 TextureButton CSS support. 2019-02-15 14:03:37 +01:00
Pieter-Jan Briers
4804b2de2c Add ExpandMargin to StyleBoxTexture. 2019-02-15 13:55:25 +01:00
Pieter-Jan Briers
00d7717c82 Panel style can be specified via CSS. 2019-02-15 13:55:05 +01:00
Pieter-Jan Briers
0a2a1420b1 Control ModulateSelf, Pseudo classes. 2019-02-15 13:54:53 +01:00
Pieter-Jan Briers
5612e589e0 Adds persistent modulate to DrawingHandle. 2019-02-15 13:48:07 +01:00
Pieter-Jan Briers
b5a3ef0ffb Adds multiply operator to Color. 2019-02-15 13:45:44 +01:00
Pieter-Jan Briers
a31f9223e7 Fix bad handling of font height. 2019-02-15 00:55:46 +01:00
Pieter-Jan Briers
d6625f9c6a Implement CSS-like stylesheets into GUI.
Label now reads properties from the CSS system.
2019-02-14 23:24:35 +01:00
Pieter-Jan Briers
0f935fc925 Stop log spam from OpenGL performance debug info. 2019-02-14 22:32:52 +01:00
Pieter-Jan Briers
19e767031d Fix edge case with texture param loading.
And unit test it. Gotta get that coverage.
2019-02-14 17:15:03 +01:00
Pieter-Jan Briers
7e22d724fe Texture load parameter system.
Basically now you can control whether a texture has filtering or wrapping enabled or whatever. Neat huh.
2019-02-14 16:49:15 +01:00
Pieter-Jan Briers
b5d9c54893 Clean up ResourcePath.
Also fix some issues pointed out by Sonar and Rider.
2019-02-14 15:12:07 +01:00
Pieter-Jan Briers
525cee8058 Add ResourcePath.WithName() 2019-02-14 15:04:18 +01:00
Pieter-Jan Briers
5b278e54e1 Control Position and Size set tests 2019-02-13 12:29:07 +01:00
Pieter-Jan Briers
3ccb1a4f2b Control layout related unit tests 2019-02-13 12:06:52 +01:00
Pieter-Jan Briers
63988e6554 I forgot to commit UnitTesting 2019-02-13 11:03:24 +01:00
Pieter-Jan Briers
ffda71dae2 Fix window dragging.
It was using Godot.OS which doesn't work on Clyde.
2019-02-13 00:28:26 +01:00
Pieter-Jan Briers
0b4173def9 Implement MouseMove events for GUI. 2019-02-13 00:23:31 +01:00
Pieter-Jan Briers
02d4e4cf10 Implement Control.GlobalMousePosition 2019-02-13 00:22:49 +01:00
Pieter-Jan Briers
e88daac8b7 Add Control.GlobalPosition 2019-02-13 00:22:28 +01:00
Pieter-Jan Briers
4fae142722 Fix bad Control.Position setter. 2019-02-13 00:21:52 +01:00
Pieter-Jan Briers
7aeb868f38 Implement TextureRect. 2019-02-12 22:59:38 +01:00
Pieter-Jan Briers
f829896da5 Implement hover textures in TextureButton. 2019-02-12 19:35:08 +01:00
Pieter-Jan Briers
f40a65a0f2 Fix center-aligned Label rendering, implement font color override rendering in Label. 2019-02-12 19:34:52 +01:00
Pieter-Jan Briers
4ce9da7af6 WiP CSS-like style sheets. 2019-02-12 00:29:28 +01:00
Pieter-Jan Briers
9c7adb7248 Make LineEdit be drawn at the very least. 2019-02-11 15:13:38 +01:00
Pieter-Jan Briers
f6d8c5506b Fix sonar fraction loss complaints. 2019-02-11 14:16:26 +01:00
Pieter-Jan Briers
3c3396c461 Fix bad conditions in Container.FitChildInBox.
Thanks Sonar.
2019-02-11 14:14:42 +01:00
Pieter-Jan Briers
a4d567a3ec Make DebugCoordsPanel suck less. 2019-02-11 14:12:49 +01:00
Pieter-Jan Briers
efc47ee3f5 Vector2i ToString. 2019-02-11 14:11:11 +01:00
Pieter-Jan Briers
0eb702d68d Make hovered control accessible on UserInterfaceManager. 2019-02-11 12:53:50 +01:00
Pieter-Jan Briers
2a9769ff4f Implement mouse entered/exited.
And use it to implement button hovering.
2019-02-11 12:50:21 +01:00
Pieter-Jan Briers
e7b5e2a9bb Implement TextureButton roughly. 2019-02-11 12:37:19 +01:00
Pieter-Jan Briers
e1d064158c Fix TextureRect tscn loading. 2019-02-11 12:37:04 +01:00
Pieter-Jan Briers
b8c6100ab7 Prevent crash when sneezing. 2019-02-11 11:53:17 +01:00
Pieter-Jan Briers
c7fe2bb876 Mostly implement Label VAlign. 2019-02-11 11:52:45 +01:00
Pieter-Jan Briers
0c9d6f0f91 Make Options menu work. 2019-02-11 11:40:47 +01:00
Pieter-Jan Briers
605b541010 Improve button press handling. 2019-02-11 11:29:27 +01:00
Pieter-Jan Briers
f7147464c6 Button input sorta works 2019-02-11 10:16:33 +01:00
Pieter-Jan Briers
eedeb5214b Invalidate batch buffers to make life easier on Mesa 2019-02-11 09:45:04 +01:00
Pieter-Jan Briers
f40d94f39f You saw nothing 2019-02-11 09:02:44 +01:00
Pieter-Jan Briers
c70df3f504 Make Control input virtuals protected internal 2019-02-11 09:01:20 +01:00
Pieter-Jan Briers
8fa3f25f98 Fix BoxContainer layout. 2019-02-10 23:21:15 +01:00
Pieter-Jan Briers
2c0589166a Give Control a ToString to ease debugging. 2019-02-10 22:42:54 +01:00
Pieter-Jan Briers
1f28850477 Give TextureRect a minimum size so it draws something. 2019-02-10 22:41:18 +01:00
Pieter-Jan Briers
484fa31b23 Load button align from tscn. 2019-02-10 22:26:07 +01:00
Pieter-Jan Briers
60518cdc3a Handle Control size flags in containers. 2019-02-10 22:26:00 +01:00
Pieter-Jan Briers
84e6ad230b Fix unit tests. 2019-02-10 00:00:34 +01:00
Pieter-Jan Briers
985a9a798e Some work towards GUI input.
Implemented a basic screen coord -> control lookup method.
2019-02-09 23:51:20 +01:00
Pieter-Jan Briers
8f6fc42207 Implement buttons and texture rect somewhat. 2019-02-09 13:51:38 +01:00
Pieter-Jan Briers
773ad46165 Don't modify margins to fit minimum size. 2019-02-09 13:51:17 +01:00
Pieter-Jan Briers
f26b109126 Implement Label Align sorta jankily. 2019-02-08 17:38:35 +01:00
Pieter-Jan Briers
08c2737d58 Load label text from Godot assets. 2019-02-08 15:51:08 +01:00
Pieter-Jan Briers
e6191dd823 Systems for loading sub resources like StyleBoxes from Godot resources. 2019-02-08 15:45:00 +01:00
Pieter-Jan Briers
ccca5b69ea Implement more of StyleBox
Texture style boxes now render and there's a bunch of properties like ContentMargin that Godot has but we didn't.
2019-02-08 14:04:28 +01:00
Pieter-Jan Briers
673c2705ac Basic UI theming system.
Not great but it gets the job done.
2019-02-08 14:03:35 +01:00
Pieter-Jan Briers
86175c7b6f Implement Control.SetMarginsPreset 2019-02-08 14:02:07 +01:00
Pieter-Jan Briers
deb86273fe Fix grid rendering being offset. 2019-02-08 14:01:26 +01:00
Pieter-Jan Briers
a54382f9b7 Box2 variants get a ToString(). 2019-02-08 14:00:29 +01:00
Pieter-Jan Briers
86da0fc88d Round control positions before rendering.
This is to fix rounding errors.

Ideally the GUI system should just straight up use integral pixel coordinates but oh well.
2019-02-08 14:00:13 +01:00
Pieter-Jan Briers
d92cb2603c Change type of SS14Window to fix drawing of it. 2019-02-08 13:59:07 +01:00
Pieter-Jan Briers
a583de32bc Fix order issues with Control property application. 2019-02-06 12:50:53 +01:00
Pieter-Jan Briers
d21863abb9 Remove unused field in FixedEye 2019-02-06 12:23:26 +01:00
Pieter-Jan Briers
55efca6b7d _doUpdateLayout works without parent. 2019-02-06 12:19:03 +01:00
Pieter-Jan Briers
411495ce95 Apply some GUI properties from loaded scene files. 2019-02-06 12:13:59 +01:00
Pieter-Jan Briers
307c94b399 Make GUI layout updates propagate even for parentless controls. 2019-02-06 12:13:45 +01:00
Pieter-Jan Briers
f79e733b1e Resize UIRoot when window size changes. 2019-02-06 12:12:52 +01:00
Pieter-Jan Briers
5b3511b951 Parse properties from Godot scene files. 2019-02-06 12:12:39 +01:00
Pieter-Jan Briers
38cab68f89 Fix Control.SetAnchorsPreset being incorrect. 2019-02-06 12:11:57 +01:00
Pieter-Jan Briers
cdbf95bbc8 Implement a default font 2019-02-06 00:00:13 +01:00
Pieter-Jan Briers
0b76613f38 Fix grid rendering being offset 2019-02-05 23:48:13 +01:00
Pieter-Jan Briers
9fd3fdf21a Re-implement godot naming conflict avoidance in GUI to avoid crashes 2019-02-05 23:35:00 +01:00
Pieter-Jan Briers
10cc81ca5a Fix mouse position fetching 2019-02-05 23:24:56 +01:00
Pieter-Jan Briers
5072873ea1 Fix glyph metric race conditions 2019-02-05 23:10:52 +01:00
Pieter-Jan Briers
10470c65ef Make Label work 2019-02-05 22:36:59 +01:00
Pieter-Jan Briers
b541a3c40a Add fontdpi to config file 2019-02-05 21:10:45 +01:00
Pieter-Jan Briers
c99807e9c9 Fix handling of space glyph advance 2019-02-05 21:10:08 +01:00
Pieter-Jan Briers
93277e2333 More font work 2019-02-05 21:00:38 +01:00
Pieter-Jan Briers
e87ee17ada Adventures into font rendering 2019-02-05 20:02:06 +01:00
Pieter-Jan Briers
79c7b0164d Change z of final meshes to improve mesh view in RenderDoc 2019-02-05 20:01:28 +01:00
Pieter-Jan Briers
006342e4d8 Fix subregion batching in screen space. 2019-02-05 19:13:14 +01:00
Pieter-Jan Briers
4efca634b2 Allow loading of Image<Alpha8> images. 2019-02-05 16:21:34 +01:00
Pieter-Jan Briers
3c587eec49 Add Vector2i.ComponentMin/Max methods. 2019-02-05 16:20:40 +01:00
Pieter-Jan Briers
c170345b7f Implement BoxContainer layout 2019-02-04 21:09:07 +01:00
Pieter-Jan Briers
5dda42868c Fix GUI under Godot 2019-02-04 16:33:40 +01:00
Pieter-Jan Briers
c8a949d115 Implement basic GUI layout. 2019-02-04 16:27:07 +01:00
Pieter-Jan Briers
32f4e8c410 Preparations for GUI rendering 2019-02-03 19:54:19 +01:00
Pieter-Jan Briers
8d8dc9f3ce Texture Array based batching 2019-02-03 17:40:30 +01:00
Pieter-Jan Briers
d2b230c6a4 Use an UBO for projview matrices 2019-02-02 01:50:23 +01:00
Pieter-Jan Briers
2f93d8855e Use ShaderProgram 2019-02-01 00:40:41 +01:00
Pieter-Jan Briers
0ac9b94099 Use new Buffer wrapper API 2019-01-31 21:27:30 +01:00
Pieter-Jan Briers
ecd88b3752 Rewrite Buffer API already 2019-01-31 20:16:01 +01:00
Pieter-Jan Briers
48069ad519 Utility classes to wrap OpenGL objects. 2019-01-31 18:20:46 +01:00
Pieter-Jan Briers
6df91d5b19 Fix listed GLSL versions to 410. 2019-01-29 00:32:25 +01:00
Pieter-Jan Briers
6b5cbc5494 Rename DisplayManagerOpenGL to Clyde.
And give it its own namespace.
2019-01-29 00:30:58 +01:00
Pieter-Jan Briers
165538c265 Add ability to load ArrayTextures
Drawing does not work yet.
2019-01-29 00:23:01 +01:00
Pieter-Jan Briers
705a3dbfcc Move frame update to gameloop update 2019-01-28 16:37:20 +01:00
Pieter-Jan Briers
ff16ee1472 Mouse input implemented but it doesn't seem to work 2019-01-28 16:29:51 +01:00
Pieter-Jan Briers
1943cfd1b4 Implement texture rect drawing to simplify code 2019-01-28 15:25:02 +01:00
Pieter-Jan Briers
093a68dbc4 Fix crash on shutdown 2019-01-28 13:52:14 +01:00
Pieter-Jan Briers
0683202ce4 Actually bind VAO instead of relying on luck 2019-01-27 12:12:45 +01:00
Pieter-Jan Briers
23305e53a7 Actually implement batch positions 2019-01-27 11:59:20 +01:00
Pieter-Jan Briers
5c05ef98de Bikeshed painted 2019-01-27 01:24:36 +01:00
Pieter-Jan Briers
563dcc804e Switch to struct handles to avoid mixing things up 2019-01-27 01:12:36 +01:00
Pieter-Jan Briers
a55ef4268f Fixed texture mixup 2019-01-27 00:27:30 +01:00
Pieter-Jan Briers
0269a74bc7 Work in progress OpenGL batching 2019-01-26 23:39:48 +01:00
Pieter-Jan Briers
250d80eb8b Code cleanup in preparation of batching 2019-01-26 19:06:33 +01:00
Pieter-Jan Briers
b460404b7f Load textures with ImageSharp 2019-01-26 14:47:06 +01:00
Pieter-Jan Briers
88b8705b7b OpenGL 4.1 and maybe even 3.x support. 2019-01-26 14:07:29 +01:00
Pieter-Jan Briers
76280f46f9 Rename GameController.Headless to Standalone
This better fits the actual function of it now.
2019-01-26 00:07:16 +01:00
Pieter-Jan Briers
5eabe39fc4 Preparations for UI rendering 2019-01-26 00:06:25 +01:00
Pieter-Jan Briers
3de36d7a38 Implement sprite draw depth in OpenGL 2019-01-25 17:11:59 +01:00
Pieter-Jan Briers
492d0b14d0 Fix splash screen and screen space texture flipping 2019-01-25 16:38:18 +01:00
Pieter-Jan Briers
6a08536f7c Fix GraphicsContextFlags in Debug 2019-01-25 15:27:49 +01:00
Pieter-Jan Briers
361fdbe684 OpenGL 4.5 rendering backend (#728)
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.
2019-01-25 14:57:11 +01:00
Pieter-Jan Briers
67c962b612 Add .directory to gitignore 2019-01-23 15:27:12 +01:00
Pieter-Jan Briers
dbc88e253b Allow client to run headlessly. (#727)
AKA Without Godot.

Still links against GodotSharp, but this does mean that you can run headless or not from the same binary.
2019-01-19 18:23:41 +01:00
Pieter-Jan Briers
58fb11a989 Refactor map netcode. (#726)
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).
2019-01-19 00:39:55 +01:00
Pieter-Jan Briers
8d58ad304a Fix collidable already registered spam 2019-01-18 12:04:43 +01:00
Pieter-Jan Briers
6d9a1a4e43 Refactor Transforms. (#725)
See commits.
2019-01-18 11:35:57 +01:00
Pieter-Jan Briers
6873ad70f4 Fix incorrect control disposal order 2019-01-17 20:52:10 +01:00
Pieter-Jan Briers
21ddbc1433 Modernize texture loading to use load_png_from_buffer 2019-01-17 20:51:21 +01:00
Pieter-Jan Briers
68a9b3e6ce Remove some debug logging. 2019-01-17 18:27:25 +01:00
Pieter-Jan Briers
6ee26df088 Remove hack now that godot #21667 is fixed 2019-01-17 18:24:27 +01:00
Pieter-Jan Briers
aa36a9e378 Make the code work on Godot 3.1 Alpha 4. (#724) 2019-01-17 18:11:16 +01:00
Acruid
a500a42d6f Instanced IoCManager (#723)
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.
2018-12-31 11:01:05 +01:00
Pieter-Jan Briers
d8ee7249e9 Fix Travis (#722)
Dear god.

Fuck Python.
2018-12-21 12:50:11 +01:00
Pieter-Jan Briers
a330deb249 Step 1 in fixing Travis 2018-12-21 00:49:31 +01:00
digitalis
8813d90bcb Convert PushInheritance to iteration in EntityPrototype (#718)
fixes the "TODO: remove recursion somehow" comment
2018-12-13 20:04:00 +01:00
Acruid
3cd7690c58 Unparent transform fix. (#719)
* Fixed bug where godot node is not being sync'd with SS14 transform when unparenting.

* CanInsert does not throw an exception when creating a loop.
2018-12-13 14:48:16 +01:00
Pieter-Jan Briers
4d9a243685 Keep track of child entities of transforms. 2018-12-02 13:58:33 +01:00
Pieter-Jan Briers
c76f791799 Leak shaders to work around Godot issue #24108 2018-12-01 23:41:25 +01:00
Pieter-Jan Briers
921a9de1fa Random normal distribution helper 2018-12-01 16:53:28 +01:00
Pieter-Jan Briers
468accfb08 Remove audio load debug message 2018-12-01 15:18:21 +01:00
Pieter-Jan Briers
028b8cabb9 Client-side command history 2018-11-30 17:25:54 +01:00
Pieter-Jan Briers
7c4eeb136f Add below world screen overlay. 2018-11-29 23:48:39 +01:00
Pieter-Jan Briers
6fd5e166b6 Vector deconstruction operators. 2018-11-29 23:20:08 +01:00
Pieter-Jan Briers
e427373f16 Fix Color.Blend 2018-11-29 22:26:56 +01:00
Pieter-Jan Briers
94b8359644 Bypass Mono's bullsit SharpZipLib version. 2018-11-29 22:23:05 +01:00
Pieter-Jan Briers
0fcfe1c2a4 Move to .NET 4.7.1 2018-11-29 22:22:44 +01:00
Pieter-Jan Briers
d478e2fdbb Add color dst/src factor blend helper. 2018-11-29 21:36:54 +01:00
Pieter-Jan Briers
d0e8ed10b8 Mark GodotConversions as internal. 2018-11-29 21:36:15 +01:00
Pieter-Jan Briers
4a5e330be5 Add ImageSharp for texture generation. 2018-11-29 21:36:02 +01:00
Pieter-Jan Briers
a57d9910f1 Add component-wise Vector3 multiply. 2018-11-29 21:35:16 +01:00
Pieter-Jan Briers
6ea25f95df Clean up bloat in WritableDirProvider.cs 2018-11-29 21:34:43 +01:00
Pieter-Jan Briers
6dc2b4ca0e Pull content assemblies directly from their bin folder. 2018-11-29 21:34:20 +01:00
Pieter-Jan Briers
7aa2acf652 Fix broken log calls in AssemblyLoader. 2018-11-29 21:33:56 +01:00
Pieter-Jan Briers
c3b857343f Throw if prototypes get accessed before first load.
Fixes #716
2018-11-29 13:44:50 +01:00
Pieter-Jan Briers
4f48774a26 Rust-based noise generation API. (#715)
Supports tileable 2D, 2D, 3D & 4D Ridged & FBM noise.

I still need to generate native versions for all the platforms, so we can't merge this yet.
2018-11-29 10:43:59 +01:00
Pieter-Jan Briers
50d6097c51 I could've sworn I pushed this. 2018-11-29 09:02:03 +01:00
Pieter-Jan Briers
535905d993 Thread safety on the client too. 2018-11-28 22:49:55 +01:00
Pieter-Jan Briers
e3f702781f Logging improvements.
1. Logging is now thread safe.
2. Slight optimizations.
2018-11-28 22:31:09 +01:00
Pieter-Jan Briers
04396b4397 Replace all occurences of GetComponent<ITransformComponent>() 2018-11-28 21:24:18 +01:00
Pieter-Jan Briers
bfba5c4f94 Minor LINQ-removing optimizations. 2018-11-28 21:16:22 +01:00
Pieter-Jan Briers
2c41750dad Fix incorrect entity message queuing.
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.
2018-11-28 20:43:57 +01:00
Pieter-Jan Briers
f1fd386614 Remove a bunch of unused local variables. 2018-11-28 10:08:30 +01:00
Pieter-Jan Briers
88fa4072f3 Remove old dead code, minor cleanup. 2018-11-28 09:38:44 +01:00
Pieter-Jan Briers
8397c955a8 Map Pausing. (#710)
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.
2018-11-27 00:32:45 +01:00
Pieter-Jan Briers
1e00b864b4 Automatically log in people connecting from localhost. (#711)
This can be disabled with a config value, which should be done for production servers, but for local testing this is very convenient.
2018-11-27 00:32:28 +01:00
Pieter-Jan Briers
e0f8c10978 Add documentation on status server. 2018-11-26 15:12:04 +01:00
Pieter-Jan Briers
21fd3e5d96 Server status framework. (#709)
Adds a HTTP server to the server that exposes `/status` to fetch the server status.
2018-11-26 09:58:58 +01:00
Pieter-Jan Briers
baff29362a Allow VVing IoC services. 2018-11-25 16:38:40 +01:00
Pieter-Jan Briers
861aabbe9b Fix client run level not resetting to Initialize on disconnect. 2018-11-25 14:09:25 +01:00
Pieter-Jan Briers
8baf7e46a4 Fix exception on client close. 2018-11-25 13:11:25 +01:00
Pieter-Jan Briers
ba072c2abd GameScreen is no longer in charge of the chat box. 2018-11-25 12:51:10 +01:00
Pieter-Jan Briers
a00e20b91c Fix client not correctly detaching from entities.
It would only detach if it had a new entity to attach to, not if the new entity is null.
2018-11-24 19:10:26 +01:00
Pieter-Jan Briers
812a9066e5 Chatbox UI improvements.
Now uses proper containers.
2018-11-24 19:08:49 +01:00
Pieter-Jan Briers
10b2073f21 IPlayerManager.GetAllPlayerData()
This is to be able to catch player data on players that're disconnected at the moment.
2018-11-24 19:07:46 +01:00
Pieter-Jan Briers
73715552e4 PlayerSession.AttachEntity(null) now does not throw. 2018-11-24 19:07:12 +01:00
Pieter-Jan Briers
18133af09f Hide go.sys log spam. 2018-11-23 10:55:25 +01:00
Pieter-Jan Briers
2c05701c8a Remove data like server motd from engine-level handshake. 2018-11-23 10:52:27 +01:00
Pieter-Jan Briers
e3449e454b Remove InLobby client side. (#708)
Same deal as #706, the concept of a lobby should be handled purely content side so it's no longer the engine's problem.
2018-11-22 23:06:50 +01:00
Pieter-Jan Briers
67b766b07e Remove debug code from NetPeer.Internal.cs 2018-11-22 09:12:12 +01:00
Pieter-Jan Briers
5c977b6f07 Make EyeManager resilient to invalid grid IDs 2018-11-22 00:51:47 +01:00
Pieter-Jan Briers
8320339ab0 Fix FinishEntity not doing initializations correctly 2018-11-22 00:18:46 +01:00
Pieter-Jan Briers
fcc405e6b6 Remove ServerRunLevel. (#706)
It's a content-ish feature that should be implemented in content only.
2018-11-21 21:20:51 +01:00
Pieter-Jan Briers
153b57ed56 IPv6 & multi-peer NetManager support. (#705)
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.
2018-11-21 20:57:47 +01:00
Pieter-Jan Briers
1fc18c3538 Add a few extension methods to ease netmessage serialization. 2018-11-21 20:20:13 +01:00
Pieter-Jan Briers
8c093b827e Make NetMessage constructor accessible to content. 2018-11-21 20:19:49 +01:00
Pieter-Jan Briers
91b8312e99 Add Modulate to Control 2018-11-21 10:02:00 +01:00
Acruid
cfda72b771 Fixed bugs with remote closing UI windows on clients. (#702)
Clients are now unsubscribed from entities when they move out of range.
2018-11-20 19:28:08 +01:00
Pieter-Jan Briers
69c0d409c8 Add Nullspace static to GridLocalCoordinates 2018-11-19 21:05:43 +01:00
Pieter-Jan Briers
62aeb8b1e3 Add ScreenCoordinates.AsVector 2018-11-19 09:23:30 +01:00
Pieter-Jan Briers
448042afdd PopupHide hook for Popup 2018-11-14 23:08:44 +01:00
Pieter-Jan Briers
b3515d1b0b Raise entity system network messages to specific clients. 2018-11-12 23:26:46 +01:00
Acruid
872e9cf43f Fix Container Crash (#701)
* Transforms now unparent themselves before being removed.
Fixed crash with removing deleted entities from containers.

* Removed ClickedOnEntityMessage, use the Input System.
2018-10-30 22:07:32 +01:00
Acruid
5ae665c3d2 Collision Groups (#699)
* 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.
2018-10-28 21:51:23 +01:00
Acruid
307030ec8f Client IPlayerSession Interface. (#696)
* Added new IPlayerSession interface to client.
Removed session interfaces out of the lame `Interfaces` namespace.

* Fixed a doc comment.
2018-10-26 00:15:42 +02:00
Acruid
d8ca95db0c No More Physics Buckets (#694)
* 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.
2018-10-26 00:15:24 +02:00
Acruid
a6d2a3497a GetComponentInstances() (#695)
Added a function to get the unique component instances, instead of unique types.

Resolves https://github.com/space-wizards/space-station-14/issues/636.
2018-10-26 00:15:10 +02:00
Acruid
c4c6c67599 Added a Close function to UI windows. (#693) 2018-10-22 20:18:19 +02:00
Acruid
bc99875979 Adds LayerGetState function. (#692) 2018-10-21 22:59:25 +02:00
Pieter-Jan Briers
61185f3bde Make IApproxEquatable have an in type param 2018-10-20 14:43:35 +02:00
PJB3005
96802bdbe0 Fix Travis unit tests hopefully 2018-10-16 09:28:33 +02:00
PJB3005
60e6a56b30 Fix TypeHelpers_Test using Godot instead of SS14.Shared.Maths. 2018-10-16 09:21:12 +02:00
PJB3005
8e5f8d1125 Fix incorrect client GUID in SS14.UnitTesting.csproj 2018-10-16 09:21:12 +02:00
Pieter-Jan Briers
f801511d5c Fix Travis looking for NUnit 3.8 2018-10-14 17:17:19 +02:00
Pieter-Jan Briers
7156e3ee74 Unit test the timer system some. 2018-10-14 17:13:48 +02:00
Pieter-Jan Briers
c28547490c Make IoCManager.Resolve Pure. 2018-10-14 16:52:44 +02:00
Pieter-Jan Briers
6efcfaeaa1 PointerInputCmdHandler gets screen location. 2018-09-30 13:16:31 +02:00
Pieter-Jan Briers
8d119549c7 Make client input system public 2018-09-30 13:15:29 +02:00
Pieter-Jan Briers
504ffd55ab Make Godot-referencing methods on Control internal. 2018-09-23 17:31:42 +02:00
Pieter-Jan Briers
27dd1055f5 Open(UIBox2) for Popup control. 2018-09-23 16:50:25 +02:00
Pieter-Jan Briers
28e4573afe Add a NotNull assertion. 2018-09-23 16:50:05 +02:00
Pieter-Jan Briers
ba3e944f44 Give some more structs readonly.
Also gave ScreenCoordinates ToString and Serializable.
2018-09-23 16:07:45 +02:00
Pieter-Jan Briers
e8ff251b12 Fix SS14Window resizing. 2018-09-21 21:32:28 +02:00
Pieter-Jan Briers
5eee3de527 Serialize container data to map files. 2018-09-21 20:06:55 +02:00
Pieter-Jan Briers
a7800348d7 Components added outside of the prototype are now loaded from map files correctly. 2018-09-21 20:06:39 +02:00
Pieter-Jan Briers
16dc444dbe Fix context passing of nested YamlObjectSerializers. 2018-09-21 20:05:50 +02:00
Pieter-Jan Briers
bf9b0e8aef Worn items are not serialized. 2018-09-21 08:36:34 +02:00
Pieter-Jan Briers
136b470b36 Adds a command to reload cached resources. 2018-09-20 22:19:28 +02:00
Pieter-Jan Briers
833c6ec37d A horrible thing. 2018-09-20 19:33:33 +02:00
PJB3005
a4ebf7d31a Fix eyes throwing an exception when mob is detached and deleted at the same time. 2018-09-20 18:09:51 +02:00
PJB3005
894c52db09 PhysicsComponent safety BB check moved to Initialize.
Where it belongs. OnAdd() runs *while* adding components, not after. Not all components exist yet.
2018-09-20 18:09:24 +02:00
PJB3005
e118888f96 Remove requirement for players to have a bounding box. 2018-09-20 18:08:48 +02:00
PJB3005
5ff85123d5 Move entity/map start/stop to BaseClient.
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.
2018-09-20 14:56:35 +02:00
Pieter-Jan Briers
7ee48c4a7b Fix some missing CultureInfo.InvariantCulture 2018-09-19 18:43:06 +02:00
Pieter-Jan Briers
99ab6fce9c Sprite Layer Map improvements.
Can now be loaded from a prototype.
If loaded from a prototype, it's flyweighted.
2018-09-19 18:36:33 +02:00
Pieter-Jan Briers
bf9315358d Fix bug where per-layer RSIs did not work on prototype load. 2018-09-19 18:35:19 +02:00
Pieter-Jan Briers
4e236be85d Clean up Transform_Test.cs some more. 2018-09-19 13:40:51 +02:00
Pieter-Jan Briers
11394c5fea Fix ParentMapSwitchTest.
Also cleaned it up slightly, but that shouldn't affect the results.
2018-09-19 13:38:57 +02:00
Pieter-Jan Briers
9d1dc0b61e Fix sprite layer direction desyncing on join. 2018-09-18 22:06:55 +02:00
Pieter-Jan Briers
1e06c8181f Remove debug log message from sprite component. 2018-09-18 20:52:37 +02:00
Pieter-Jan Briers
512d99c900 Remove spammy audio system log. 2018-09-18 20:52:05 +02:00
Pieter-Jan Briers
d74a6e41d9 Fix syncing of parented components. 2018-09-18 20:48:04 +02:00
Pieter-Jan Briers
02c844a396 Adds an abstract field to entity prototypes to hide them in the entity spawn panel. 2018-09-18 19:06:18 +02:00
Pieter-Jan Briers
afdfd9ed5c Alphabetically sort entity spawn list. 2018-09-18 18:16:21 +02:00
Pieter-Jan Briers
87f3a1f6e3 Fix stacked layer rendering. 2018-09-18 17:50:48 +02:00
PJB3005
dbe18df32e Use a default shaded texture instead of no shader.
Shouldn't matter in practice, but it does. Godot's 2D renderer is turbo fucked. Yay.
2018-09-18 17:27:32 +02:00
PJB3005
ae408d7674 Fix setting SpriteComponent texture: "" server side. 2018-09-18 17:26:51 +02:00
PJB3005
aa61eb3483 Ensure all entities exist before applying entity states.
If not, an entity state could reference another, not yet instantiated, entity. (transform parenting did this sometimes)
2018-09-18 15:13:35 +02:00
PJB3005
df21d0db14 Fix RSI schema to make flags and selectors optional. 2018-09-18 15:09:10 +02:00
Pieter-Jan Briers
7f12355f34 Add AddBlankLayer() to SpriteComponent 2018-09-18 08:09:23 +02:00
Pieter-Jan Briers
0d9e748cd0 And push the csproj because I'm dumb. 2018-09-17 21:33:20 +02:00
Pieter-Jan Briers
5d1f34a3c9 Remove dead file SpriteComponentState.cs 2018-09-17 21:32:51 +02:00
Pieter-Jan Briers
6bb34e9456 Add a client command line arg to automatically connect.
Pass --connect and you don't even have to hit the connect button anymore.
2018-09-17 21:11:19 +02:00
Pieter-Jan Briers
7f74ae7b61 ldrsc command.
I coded this to test something. No reason to just delete the code forever so I'm committing it.
2018-09-17 20:01:57 +02:00
Pieter-Jan Briers
8ca36380ce Improve Matrix3 Transform API. 2018-09-17 19:42:24 +02:00
Pieter-Jan Briers
03075641ab Make ScreenToWorld correctly output relative grid coordinates. 2018-09-17 18:58:31 +02:00
Pieter-Jan Briers
b6ec18fa6b Fix docs blunder. 2018-09-17 18:57:57 +02:00
Pieter-Jan Briers
428596312e Attempt to fix broken zoomed screen -> world conversions. 2018-09-17 16:45:42 +02:00
Pieter-Jan Briers
2ef1839304 Fix Matrix3 <-> Godot.Transform2D conversions. 2018-09-17 16:45:21 +02:00
Pieter-Jan Briers
e1d1a8ea9d Fix some angle related issues.
Guns work again.
2018-09-17 12:34:05 +02:00
Pieter-Jan Briers
9e888ab28e Improve RayCastResult documentation 2018-09-17 12:33:49 +02:00
Pieter-Jan Briers
76df7dda88 Make angles use degrees in YAML.
They can be parsed as radians if suffixed with "rad"
2018-09-17 12:33:10 +02:00
Pieter-Jan Briers
ef77ae14f6 Actually commit .csproj changes. 2018-09-17 12:28:16 +02:00
Pieter-Jan Briers
a56f9b7dc5 Improve time panel layout. 2018-09-17 12:27:54 +02:00
Pieter-Jan Briers
f2bac93c18 Fix color of NetDebugPanel 2018-09-17 12:26:06 +02:00
Pieter-Jan Briers
04bf1782e9 Commands to show game time. 2018-09-17 12:25:52 +02:00
Pieter-Jan Briers
4c0e9bf1c7 Mark AudioParams.With<X> methods as Pure. 2018-09-17 12:24:20 +02:00
Pieter-Jan Briers
0079fea2d3 Cleans up some seemingly-issues. 2018-09-17 10:41:35 +02:00
Pieter-Jan Briers
796626b7d8 Y+ Up (#691) 2018-09-17 10:22:49 +02:00
Pieter-Jan Briers
ec02d6480a Project file maintenance, C# 7.2 (#690)
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.
2018-09-13 20:09:20 +02:00
Pieter-Jan Briers
16d56bc810 VV Refactor. (#689)
* 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.
2018-09-12 17:56:28 +02:00
PJB3005
523e4d8c49 Fix compiler warning 2018-09-09 14:45:54 +02:00
PJB3005
dbb9fb8cf3 Fixes Travis unit tests. 2018-09-09 14:42:34 +02:00
Pieter-Jan Briers
43a270d486 View Variables (#683) 2018-09-09 14:32:55 +02:00
Remie Richards
cc89b3af0d Adds a var to forcibly show a godot transform. (#682) 2018-09-08 17:36:39 +02:00
Centronias
850e48d118 Client name change command (#681)
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
2018-09-04 16:12:02 +02:00
Centronias
f23f2f5a95 Math unit tests (#679)
Handful of unit tests for more of the math stuff along with minor changes to implementations fixing some bugs found by the tests.
2018-09-04 16:11:03 +02:00
Pieter-Jan Briers
6e95476156 Make all resources accessible to Godot. (#677) 2018-08-31 10:48:22 +02:00
PJB3005
a1f3c5fdbb Remove public setter on Angle.Zero. 2018-08-30 12:16:27 +02:00
PJB3005
230032421b Fix dead reference to SavedEntities.xml 2018-08-30 12:16:12 +02:00
PJB3005
f266afbd4d Fixes compiler warning 2018-08-30 12:07:18 +02:00
PJB3005
5dfeb7c8aa Fixes debugging of SS14.Shared.Maths on the client. 2018-08-30 12:04:59 +02:00
Pieter-Jan Briers
41e955e980 Entity-bound UI system. (#676)
Keeps track of which clients have a GUI open and such.
2018-08-30 11:59:58 +02:00
Pieter-Jan Briers
0fdbb48f9d GameScreen.GetEntityUnderPosition (#669)
Fixes #603
2018-08-30 11:43:20 +02:00
Pieter-Jan Briers
f5d9b64db5 Fix debugging of Content in Rider. (#670) 2018-08-30 11:42:16 +02:00
Pieter-Jan Briers
a750db22df Add ProgressBar Control wrap. (#675) 2018-08-30 11:41:51 +02:00
Pieter-Jan Briers
a7b6509d9f Add an event for when SS14Window is closed. (#674) 2018-08-30 11:41:36 +02:00
Pieter-Jan Briers
a6f4aacc37 Allow Control.GetChild to use /. (#673)
Just like Godot, you can now do `GetChild("A/B")`
instead of `GetChild("A").GetChild("B")`
2018-08-30 11:41:21 +02:00
Pieter-Jan Briers
4624051540 Adds ObjectSerializer.ReadStringEnumKey (#672)
Fixes #626
2018-08-30 11:40:44 +02:00
Pieter-Jan Briers
b3a3bbfc22 Fix bug with changing between animated RSI states causing exceptions. (#671) 2018-08-30 11:39:03 +02:00
clusterfack
7225e24e1c Two small fixes
Makes AABB of grids expand to the correct size
Removes redundant world position setting during spawn
2018-08-28 02:13:31 -05:00
Pieter-Jan Briers
b5bbbd9dde Allow lights to be nested one layer deep. (#668)
Fixes the first half of https://github.com/space-wizards/space-station-14-content/pull/92
2018-08-27 09:58:45 +02:00
Centronias
01daf9561a MathHelper minor changes and unit tests (#667)
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.
2018-08-25 21:30:42 +02:00
Acruid
f49768e15a Math Assembly (#666)
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.
2018-08-24 21:21:28 +02:00
Pieter-Jan Briers
74705b5a66 Engine Content Culling (#665)
* 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.
2018-08-24 12:44:01 +02:00
Acruid
71121f8fef Added an SystemMessage for when an entity changes parents. (#662) 2018-08-22 09:55:15 +02:00
Pieter-Jan Briers
22fdca62bb Move more Player things into content. (#661)
* 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.
2018-08-20 16:13:58 +02:00
Pieter-Jan Briers
d8a5a617fe You now rejoin into the same body. (#659)
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.
2018-08-20 11:18:14 +02:00
Acruid
1c1c003b80 Input - Migrate Keybinds (#658)
* Moves PlayerInputMover logic into an EntitySystem.

* Removed old PlayerInput system.
Removed spammy input dbg message.
2018-08-18 14:40:17 -07:00
Pieter-Jan Briers
bddd355f17 Fix reconnection. (#657) 2018-08-17 00:02:19 +02:00
Acruid
0c66313255 Click Migration + Input Contexts (#656)
* 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.
2018-08-16 23:58:48 +02:00
PJB3005
900e2c94e8 Rename SpriteMirror -> SpriteProxy. 2018-08-16 22:16:17 +02:00
Pieter-Jan Briers
ba04fa0ae1 Sprite Mirror system. (#654)
Allows you to render a copy of a ISpriteComponent anywhere (in 2D).

This will be used in content to draw entities in GUI elements.
2018-08-16 22:01:37 +02:00
Pieter-Jan Briers
4a85a2a397 Smoothwalling for occluders. (#653)
Fixes #382
2018-08-13 14:38:18 +02:00
Pieter-Jan Briers
051e661cb6 Improve exception robustness. (#652)
All exceptions going to Godot are caught and logged.
Control no longer causes a Finalizer crash if .ctor threw.
2018-08-09 22:45:48 +02:00
Pieter-Jan Briers
1503a8b1f4 We Outta There. (#651)
Fix a bunch of console log spam.
2018-08-09 22:19:31 +02:00
Pieter-Jan Briers
b2e378359a Adds coloring to the client console. (#650)
* Adds coloring to the client console.

* Make input echos green.
2018-08-09 21:27:59 +02:00
Pieter-Jan Briers
be10df217e Engine changes to support content smoothwalling. (#649)
* 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.
2018-08-09 17:28:02 +02:00
Acruid
21b00df2b1 Input Handling (#647)
* 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.
2018-08-08 10:55:47 -07:00
Pieter-Jan Briers
5b52d75a94 SnapGrid tracking system. (#646)
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...
2018-08-03 17:08:58 +02:00
Acruid
dcb22bf546 NetManager now blocks the main thread when waiting for the network thread to shut down. (#633) 2018-08-03 17:05:14 +02:00
Pieter-Jan Briers
830ff0f5b1 ITransformComponent & entity spawning QoL. (#645)
You can now access an entity's transform with the Transform property.
IEntityManager now has entity creation helpers.
2018-08-02 10:15:12 +02:00
Pieter-Jan Briers
786db099d1 Add zoom parameter to EyeComponent prototype. (#644) 2018-08-02 09:08:35 +02:00
Pieter-Jan Briers
c019e24a3a Fix CI by uploading GodotSharp.dll elsewhere. (#643) 2018-08-02 08:36:39 +02:00
Pieter-Jan Briers
4bc36834a9 Adds SpriteSpecifier. (#642)
It's a class for EITHER a texture path or an RSI state.
2018-08-02 00:15:17 +02:00
Pieter-Jan Briers
6b7a7d16e6 "Fix" DebugCoordsPanel exceptions on client start. (#641)
Pretty sure this is a race condition, so this should be fixed properly.
But hey, at least the client can reconnect now.
2018-08-01 22:24:06 +02:00
Pieter-Jan Briers
4e8d1c6b4f Fix bug where eye stays on map 0 until moved. (#640) 2018-08-01 22:16:47 +02:00
Pieter-Jan Briers
c79c01189f Terrible hijacking of placement. (#639) 2018-08-01 21:49:28 +02:00
Pieter-Jan Briers
c15288bfec Client-sided entities & other misc crap. (#638) 2018-08-01 17:27:08 +02:00
Pieter-Jan Briers
8e3f641155 Ah shit I did the thing I said I wouldn't do and I just forgot to commit the csproj. (#635) 2018-07-31 09:24:44 +02:00
Pieter-Jan Briers
d3af9fcd1b Wrap Godot.ItemList for GUI use. (#634) 2018-07-31 09:21:02 +02:00
Pieter-Jan Briers
8c4b3635ac Wrap Godot.Tree for GUI use. 2018-07-30 00:29:06 +02:00
Acruid
0ce3a8f233 DebugTools.Assert (#624)
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.
2018-07-28 22:36:11 +02:00
Pieter-Jan Briers
0fb6cab703 ReadDataField version that does not use defaults but throws. 2018-07-28 16:08:00 +02:00
Pieter-Jan Briers
00b16c63ac Allow content to ignore prototype-types. 2018-07-28 15:33:48 +02:00
Pieter-Jan Briers
5d2d56bc64 Make SS14Loader a script on MainScene instead of AutoLoad. 2018-07-28 11:32:17 +02:00
Pieter-Jan Briers
8aa6d1ccc3 Adds dictionary shallow clone. 2018-07-27 15:45:10 +02:00
Pieter-Jan Briers
4679b853f7 Certified genius. 2018-07-27 10:25:39 +02:00
Pieter-Jan Briers
051f4a6399 Make YamlObjectSerializer constructor private. 2018-07-27 09:33:29 +02:00
Pieter-Jan Briers
b57b416d50 Add Lerp functions to FloatMath. 2018-07-27 09:33:14 +02:00
Pieter-Jan Briers
696bf486a6 Remove all compiler warnings. 2018-07-26 23:55:19 +02:00
Pieter-Jan Briers
f6c771f8ce Don't accidentally cache TestResult.xml on Travis. 2018-07-26 23:39:46 +02:00
Pieter-Jan Briers
bceda76bf8 Entity Data Refactor (#621)
* 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.
2018-07-26 23:35:13 +02:00
Acruid
5c2bd4049c ECS - ComponentManager Restructure (#620)
* 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.
2018-07-26 23:10:24 +02:00
Acruid
2b69075bc2 Server Console - Cumulative Feature Update (#616)
### 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.
2018-07-26 20:09:31 +02:00
Pieter-Jan Briers
22520fc1cf Fix exceptions upon game start. 2018-07-20 17:56:56 +02:00
Pieter-Jan Briers
44946d9be2 Catch exceptions in _Process. 2018-07-20 17:52:36 +02:00
Pieter-Jan Briers
05b4e64a29 Comments for appearance component. 2018-07-17 11:49:25 +02:00
Pieter-Jan Briers
92f12334b4 Appearance Controllers 2: Electric Boogaloo. (#615) 2018-07-17 11:11:01 +02:00
PJB3005
fec7d6481b Fix accidental Godot 3.1 config file 2018-07-15 15:45:23 +02:00
Pieter-Jan Briers
d1e4b259bb Appearance Controllers fundamentals. (#614) 2018-07-14 23:24:09 +02:00
Pieter-Jan Briers
0a397dc4d5 Fix resetting sprite layer animations if state gets set to the same value. 2018-07-14 16:56:47 +02:00
Pieter-Jan Briers
4c8be76aa9 Make Control.Disposed public. 2018-07-14 16:44:08 +02:00
Pieter-Jan Briers
63f56252f9 Fix broken format string in SpriteComponent. 2018-07-14 16:44:02 +02:00
Pieter-Jan Briers
a418bde812 Fix exception spam from deleting hovered entities. 2018-07-14 16:42:47 +02:00
Pieter-Jan Briers
86ddf5989b Display exceptions if map entities fail to be created. 2018-07-14 16:42:32 +02:00
indeano
f6d01c5d61 Public access modifiers for YAMLEntitySerializer (#610)
This is necessary to allow content packs to create their own class serializers
2018-07-10 10:19:31 +02:00
PJB3005
c7d56759b3 Allow disabling lighting. 2018-07-06 15:29:50 +02:00
Acruid
3d128747c4 VFS Features (#611)
* 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
1220 changed files with 64800 additions and 28558 deletions

View File

@@ -15,18 +15,17 @@ install:
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER -And $env:APPVEYOR_REPO_BRANCH -Eq "master")
{
cinst msbuild-sonarqube-runner;
cinst opencover.portable;
}
before_build:
- cmd: py -3.5 -m pip install --user requests
- cmd: py -3.5 Tools\download_godotsharp.py
- cmd: py -3.5 RUN_THIS.py --no-prompt
- cmd: nuget restore SpaceStation14.sln
- cmd: nuget restore RobustToolbox.sln
- ps: >
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER -And $env:APPVEYOR_REPO_BRANCH -Eq "master")
{
SonarScanner.MSBuild.exe begin /k:"ss14" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=$env:sonarqubekey" /d:"sonar.organization=space-wizards" /d:"sonar.exclusions=SFML/**" /d:sonar.cs.nunit.reportsPaths="$(Get-Location)\nunitTestResult.xml" /d:sonar.cs.opencover.reportsPaths="$(Get-Location)\coverage_report.xml";
SonarScanner.MSBuild.exe begin /k:"ss14" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=$env:sonarqubekey" /o:"space-wizards" /d:"sonar.exclusions=SFML/**" /d:sonar.cs.nunit.reportsPaths="$(Get-Location)\nunitTestResult.xml";
}
platform: x64
@@ -35,27 +34,21 @@ configuration: Debug
cache:
- packages -> **\packages.config
- Dependencies
- SS14.Client.Godot\.mono\assemblies\GodotSharp.dll
- SS14.Client.Godot\.mono\assemblies\LAST_MODIFIED
- Robust.Client.Godot\.mono\assemblies\GodotSharp.dll
- Robust.Client.Godot\.mono\assemblies\LAST_MODIFIED
build:
project: SpaceStation14.sln
project: RobustToolbox.sln
parallel: false
verbosity: minimal
build_script:
- ps: msbuild SpaceStation14.sln /verbosity:minimal /nologo /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Platform=x64 /p:Configuration=Debug /p:AppVeyor=yes
- ps: msbuild RobustToolbox.sln /verbosity:minimal /nologo /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /p:Platform=x64 /p:Configuration=Debug /p:AppVeyor=yes
test_script:
- ps: >
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER -And $env:APPVEYOR_REPO_BRANCH -Eq "master")
{
OpenCover.Console.exe -register:user -target:"nunit3-console.exe" -targetargs:".\bin\UnitTesting\SS14.UnitTesting.dll --result:nunitTestResult.xml" -output:".\coverage_report.xml";
}
else
{
nunit3-console.exe .\bin\UnitTesting\SS14.UnitTesting.dll;
}
- ps: nunit3-console.exe .\bin\UnitTesting\Robust.UnitTesting.dll;
after_test:
- ps: >

3
.gitignore vendored
View File

@@ -71,6 +71,9 @@ project.lock.json
# MacOS finder makes these.
.DS_Store
# KDE Dolphin makes these, maybe it's even XDG standard, kinda hard to Google.
# I do know it doesn't make them by merely opening the directory like some other file manager *cough* *cough*
.directory
# Created by NUnit.
TestResult.xml

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "SS14.Shared.Bsdiff"]
path = SS14.Shared.Bsdiff
url = https://github.com/space-wizards/ss14.shared.bsdiff.git

View File

@@ -9,30 +9,33 @@ os:
addons:
apt:
sources:
- deadsnakes
#sources:
#- deadsnakes
packages:
- python3.6
- python3.5
- python3-pip
cache:
directories:
- packages/
- Dependencies/
- SS14.Client.Godot/.mono/assemblies/
- Robust.Client.Godot/.mono/assemblies/
#before_install:
# - if [ $TRAVIS_OS_NAME = osx ]; then brew update && brew upgrade python; fi
before_script:
- "if [ $TRAVIS_OS_NAME = linux ]; then pyenv shell 3.6; fi"
- "pip3 install --user requests"
- "nuget restore SpaceStation14.sln"
- "python3.6 RUN_THIS.py --no-prompt"
#- "pyenv versions"
#- "if [ $TRAVIS_OS_NAME = linux ]; then pyenv shell 3.6; fi"
#- "python3.6 -m pip --v"
#- "python3.6 -m pip install --user --upgrade requests"
- "python3.5 -m pip install --user requests"
- "nuget restore RobustToolbox.sln"
- "python3.5 RUN_THIS.py --no-prompt"
- "Tools/download_godotsharp.py"
script:
- "msbuild /p:Configuration=Debug /p:Platform=x64 /p:HEADLESS=1 /nologo /m /p:AllowMissingMacNatives=yes SpaceStation14.sln /p:Python=python3.6"
- "cd packages/NUnit.ConsoleRunner.3.7.0/tools"
- "mono --debug nunit3-console.exe ../../../bin/UnitTesting/SS14.UnitTesting.dll"
- "msbuild /p:Configuration=Debug /p:Platform=x64 /p:HEADLESS=1 /nologo /m /p:AllowMissingMacNatives=yes RobustToolbox.sln /p:Python=python3.5"
- "mono --debug packages/nunit.consolerunner/3.9.0/tools/nunit3-console.exe bin/UnitTesting/Robust.UnitTesting.dll"

19
LICENSE-MIT.TXT Normal file
View File

@@ -0,0 +1,19 @@
Copyright (c) 2019 Space Station 14 Contributors
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -10,7 +10,7 @@
<ApplicationIcon />
<AssemblyKeyContainerName />
<AssemblyName>Lidgren.Network</AssemblyName>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<OutputType>Library</OutputType>
<AppDesignerFolder />
<RootNamespace>Lidgren.Network</RootNamespace>
@@ -34,6 +34,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<DebugType Condition="'$(AppVeyor)' != 'yes'">portable</DebugType>
<DebugType Condition="'$(AppVeyor)' == 'yes'">full</DebugType>
<Optimize>False</Optimize>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup>
@@ -46,6 +48,8 @@
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugSymbols>True</DebugSymbols>
<DebugType Condition="'$(AppVeyor)' != 'yes'">portable</DebugType>
<DebugType Condition="'$(AppVeyor)' == 'yes'">full</DebugType>
<Optimize>False</Optimize>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
@@ -56,7 +60,9 @@
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols>
<DebugSymbols>True</DebugSymbols>
<DebugType Condition="'$(AppVeyor)' != 'yes'">portable</DebugType>
<DebugType Condition="'$(AppVeyor)' == 'yes'">full</DebugType>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
@@ -285,4 +291,4 @@
<PostBuildEvent>
</PostBuildEvent>
</PropertyGroup>
</Project>
</Project>

View File

@@ -130,7 +130,7 @@ namespace Lidgren.Network
om.Write(now);
WriteLocalHail(om);
m_peer.SendLibrary(om, m_remoteEndPoint);
m_connectRequested = false;
@@ -285,7 +285,7 @@ namespace Lidgren.Network
}
else
{
m_remoteHailMessage = null;
m_remoteHailMessage = null;
}
if (m_peerConfiguration.IsMessageTypeEnabled(NetIncomingMessageType.ConnectionApproval))
@@ -376,7 +376,7 @@ namespace Lidgren.Network
break;
case NetConnectionStatus.RespondedConnect:
// awesome
NetIncomingMessage msg = m_peer.SetupReadHelperMessage(ptr, payloadLength);
InitializeRemoteTimeOffset(msg.ReadSingle());
@@ -453,7 +453,7 @@ namespace Lidgren.Network
}
return true;
}
/// <summary>
/// Disconnect from the remote peer
/// </summary>

View File

@@ -114,7 +114,13 @@ namespace Lidgren.Network
iep = new IPEndPoint(m_configuration.LocalAddress, m_configuration.Port);
EndPoint ep = (EndPoint)iep;
m_socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
m_socket = new Socket(ep.AddressFamily, SocketType.Dgram, ProtocolType.Udp);
if (ep.AddressFamily == AddressFamily.InterNetworkV6)
{
// Disable IPv4 -> IPv6 mapping.
// SS14 handles IPv6 & IPv4 concurrently with a different net peer.
m_socket.SetSocketOption(SocketOptionLevel.IPv6, SocketOptionName.IPv6Only, true);
}
m_socket.ReceiveBufferSize = m_configuration.ReceiveBufferSize;
m_socket.SendBufferSize = m_configuration.SendBufferSize;
m_socket.Blocking = false;

View File

@@ -2,6 +2,7 @@ using System;
using System.Threading;
using System.Collections.Generic;
using System.Net;
using System.Net.Sockets;
namespace Lidgren.Network
{
@@ -27,8 +28,8 @@ namespace Lidgren.Network
/// <summary>
/// Signalling event which can be waited on to determine when a message is queued for reading.
/// Note that there is no guarantee that after the event is signaled the blocked thread will
/// find the message in the queue. Other user created threads could be preempted and dequeue
/// Note that there is no guarantee that after the event is signaled the blocked thread will
/// find the message in the queue. Other user created threads could be preempted and dequeue
/// the message before the waiting thread wakes up.
/// </summary>
public AutoResetEvent MessageReceivedEvent { get { return m_messageReceivedEvent; } }
@@ -102,9 +103,16 @@ namespace Lidgren.Network
m_connections = new List<NetConnection>();
m_connectionLookup = new Dictionary<IPEndPoint, NetConnection>();
m_handshakes = new Dictionary<IPEndPoint, NetConnection>();
m_senderRemote = (EndPoint)new IPEndPoint(IPAddress.Any, 0);
if (m_configuration.LocalAddress.AddressFamily == AddressFamily.InterNetworkV6)
{
m_senderRemote = (EndPoint)new IPEndPoint(IPAddress.IPv6Any, 0);
}
else
{
m_senderRemote = (EndPoint)new IPEndPoint(IPAddress.Any, 0);
}
m_status = NetPeerStatus.NotRunning;
m_receivedFragmentGroups = new Dictionary<NetConnection, Dictionary<int, ReceivedFragmentGroup>>();
m_receivedFragmentGroups = new Dictionary<NetConnection, Dictionary<int, ReceivedFragmentGroup>>();
}
/// <summary>
@@ -129,7 +137,7 @@ namespace Lidgren.Network
}
InitializeNetwork();
// start network thread
m_networkThread = new Thread(new ThreadStart(NetworkLoop));
m_networkThread.Name = m_configuration.NetworkThreadName;

View File

@@ -27,6 +27,7 @@ using System.Net.Sockets;
using System.Text;
using System.Text.RegularExpressions;
using System.Collections.Generic;
using System.Threading.Tasks;
namespace Lidgren.Network
{
@@ -85,7 +86,8 @@ namespace Lidgren.Network
IPAddress ipAddress = null;
if (IPAddress.TryParse(ipOrHost, out ipAddress))
{
if (ipAddress.AddressFamily == AddressFamily.InterNetwork)
if (ipAddress.AddressFamily == AddressFamily.InterNetwork
|| ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
{
callback(ipAddress);
return;
@@ -123,16 +125,23 @@ namespace Lidgren.Network
}
// check each entry for a valid IP address
IPAddress bestAddress = null;
foreach (IPAddress ipCurrent in entry.AddressList)
{
if (ipCurrent.AddressFamily == AddressFamily.InterNetwork)
// Prefer IPv6 addresses.
if (ipCurrent.AddressFamily == AddressFamily.InterNetworkV6)
{
callback(ipCurrent);
return;
}
if (ipCurrent.AddressFamily == AddressFamily.InterNetwork)
{
bestAddress = ipCurrent;
}
}
callback(null);
callback(bestAddress);
}, null);
}
catch (SocketException ex)
@@ -148,6 +157,34 @@ namespace Lidgren.Network
}
}
public static async Task<IPAddress[]> ResolveAsync(string ipOrHost)
{
if (string.IsNullOrEmpty(ipOrHost))
throw new ArgumentException("Supplied string must not be empty", "ipOrHost");
ipOrHost = ipOrHost.Trim();
if (IPAddress.TryParse(ipOrHost, out var ipAddress))
{
if (ipAddress.AddressFamily == AddressFamily.InterNetwork
|| ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
{
return new[] {ipAddress};
}
throw new ArgumentException("This method will not currently resolve other than IPv4 or IPv6 addresses");
}
try
{
var entry = await Task.Factory.FromAsync(Dns.BeginGetHostEntry, Dns.EndGetHostEntry, ipOrHost, null);
return entry.AddressList;
}
catch (SocketException)
{
return null;
}
}
/// <summary>
/// Get IPv4 address from notation (xxx.xxx.xxx.xxx) or hostname
/// </summary>
@@ -161,7 +198,8 @@ namespace Lidgren.Network
IPAddress ipAddress = null;
if (IPAddress.TryParse(ipOrHost, out ipAddress))
{
if (ipAddress.AddressFamily == AddressFamily.InterNetwork)
if (ipAddress.AddressFamily == AddressFamily.InterNetwork
|| ipAddress.AddressFamily == AddressFamily.InterNetworkV6)
return ipAddress;
throw new ArgumentException("This method will not currently resolve other than ipv4 addresses");
}
@@ -175,13 +213,22 @@ namespace Lidgren.Network
return null;
// check each entry for a valid IP address
IPAddress bestAddress = null;
foreach (IPAddress ipCurrent in entry.AddressList)
{
if (ipCurrent.AddressFamily == AddressFamily.InterNetwork)
if (ipCurrent.AddressFamily == AddressFamily.InterNetworkV6)
{
return ipCurrent;
}
// Prefer IPv6 addresses.
if (ipCurrent.AddressFamily == AddressFamily.InterNetwork)
{
bestAddress = ipCurrent;
}
}
return null;
return bestAddress;
}
catch (SocketException ex)
{
@@ -391,6 +438,11 @@ namespace Lidgren.Network
/// </summary>
public static bool IsLocal(IPAddress remote)
{
if (remote.AddressFamily == AddressFamily.InterNetworkV6)
{
// TODO: Can this be made to work? Do we even care for SS14?
return false;
}
IPAddress mask;
IPAddress local = GetMyAddress(out mask);

View File

@@ -8,12 +8,12 @@
</When>
<When Condition="'$(TargetOS)' == 'MacOS'" >
<PropertyGroup>
<DefineConstants>$(DefineConstants);MACOS</DefineConstants>
<DefineConstants>$(DefineConstants);MACOS;UNIX</DefineConstants>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DefineConstants>$(DefineConstants);LINUX</DefineConstants>
<DefineConstants>$(DefineConstants);LINUX;UNIX</DefineConstants>
</PropertyGroup>
</Otherwise>
</Choose>

View File

@@ -0,0 +1,20 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Target Name="CopyResourcesFromShared">
<ItemGroup>
<_ResourceFiles Include="$(SolutionDir)bin\Shared\Resources\**\*.*" />
</ItemGroup>
<RemoveDir Directories="$(OutputPath)Resources" />
<Copy SourceFiles="@(_ResourceFiles)" DestinationFolder="$(OutputPath)Resources\%(RecursiveDir)" />
</Target>
<Target Name="CopySS14Noise">
<Exec Condition="'$(Platform)' == 'x64'" Command="$(Python) ../Tools/download_ss14_noise.py $(Platform) $(TargetOS) $(OutputPath)" CustomErrorRegularExpression="^Error" />
<Warning Condition="'$(Platform)' != 'x64'" Text="Did not download ss14_noise because the platform is not set to x64. Only use this build for unit testing!" />
</Target>
<Target Name="CopyMiscDependencies">
<Exec Condition="'$(Platform)' == 'x64'" Command="$(Python) ../Tools/download_misc_dependencies.py $(Platform) $(TargetOS) $(OutputPath)" CustomErrorRegularExpression="^Error" />
<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!" />
</Target>
<Target Name="DownloadGodotSharp">
<Exec Command="$(Python) ../Tools/download_godotsharp.py" CustomErrorRegularExpression="^Error" />
</Target>
</Project>

View File

@@ -1,9 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<Target Name="CopyResourcesFromShared">
<ItemGroup>
<_ResourceFiles Include="$(SolutionDir)bin\Shared\Resources\**\*.*" />
</ItemGroup>
<RemoveDir Directories="$(OutputPath)Resources" />
<Copy SourceFiles="@(_ResourceFiles)" DestinationFolder="$(OutputPath)Resources\%(RecursiveDir)" />
</Target>
</Project>

8
Resources/.gitignore vendored Normal file
View File

@@ -0,0 +1,8 @@
# .import files are made by Godot because the assets are exposed if using symlinks.
# IF you need to persist a .import file because of something used Godot-side (GUI-side),
# you can do a negation with !.
*.import
# Negation would be like this:
#!/Textures/UserInterface/1pxwhite.png.import
!/Scenes/SS14Window/closewindow.png.import
/I_MADE_THE_SYMLINK

File diff suppressed because it is too large Load Diff

View File

@@ -1,31 +0,0 @@
- type: entity
id: __engine_janitor_suit
name: "[engine] Janitor Jumpsuit"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Items/janitorsuit.png
- type: Icon
texture: Items/janitorsuit.png
- type: BoundingBox
- type: Physics
mass: 5
- type: entity
id: __engine_shoes
name: "[engine] shoes"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Items/janitorsuit.png
- type: Icon
texture: Items/shoes.png
- type: BoundingBox
- type: Physics
mass: 5

View File

@@ -1,15 +0,0 @@
- type: entity
id: __engine_toolbox
name: "[engine] toolbox"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Items/toolbox_r.png
- type: Icon
texture: Items/toolbox_r.png
- type: BoundingBox
- type: Physics
mass: 5

View File

@@ -1,19 +0,0 @@
- type: entity
id: __engine_door
name: "[engine] Real Fake Door"
components:
- type: Transform
- type: Clickable
- type: Sprite
drawdepth: Objects
texture: Objects/door_ew.png
- type: Icon
texture: Objects/door_ew.png
- type: BoundingBox
- type: Collidable
placement:
snap:
- Wall

View File

@@ -1,15 +0,0 @@
- type: entity
id: __engine_mop
name: "[engine] mop"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Items/mop.png
- type: Icon
texture: Items/mop.png
- type: BoundingBox
- type: Physics
- type: Clickable

View File

@@ -1,23 +0,0 @@
- type: entity
id: __engine_wall_light
name: "[engine] Wall Light"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Objects/wall_light.png
- type: Icon
texture: Objects/wall_light.png
- type: BoundingBox
- type: PointLight
radius: 8
energy: 1.2
offset: "0, -16"
color: "#DCDCC6"
placement:
snap:
- Wallmount

View File

@@ -1,26 +0,0 @@
- type: entity
id: __engine_human
name: "[engine] Urist McHuman"
save: false
components:
- type: Transform
- type: Clickable
- type: Sprite
sprite: Mob/greyshirt.rsi
state: greyshirt
scale: 2, 2
drawdepth: Mobs
- type: Icon
sprite: Mob/greyshirt.rsi
state: greyshirt
- type: BoundingBox
aabb: "0.15,-0.45,1.05,0.45"
- type: Physics
mass: 5
- type: Collidable
DebugColor: "#0000FF"

View File

@@ -1,18 +0,0 @@
- type: entity
id: __engine_worktop
name: "[engine] worktop"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Objects/worktop_single.png
- type: Icon
texture: Objects/worktop_single.png
- type: BoundingBox
aabb: "-0.45,-1,0.95,1"
DebugColor: "#0000FF"
- type: Collidable

View File

@@ -1,60 +0,0 @@
- type: entity
id: __engine_extinguisher
name: "[engine] Extinguisher Cabinet"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Objects/fire_extinguisher.png
- type: Icon
texture: Objects/fire_extinguisher.png
placement:
mode: AlignWall
range: 200
nodes:
- 18
- 26
- 32
snap:
- Wallmount
- type: entity
id: __engine_fire_alarm
name: "[engine] Fire Alarm"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Objects/fire_alarm_off.png
- type: Icon
texture: Objects/fire_alarm_off.png
placement:
mode: AlignWall
range: 180
nodes:
- 5
- 10
- 15
snap:
- Wallmount
- type: entity
id: __engine_med_cabinet
name: "[engine] Medical Cabinet"
components:
- type: Transform
- type: Clickable
- type: Sprite
texture: Objects/med_cabinet.png
- type: Icon
texture: Objects/med_cabinet.png
placement:
mode: AlignWall
snap:
- Wallmount

View File

@@ -1,22 +0,0 @@
- type: entity
id: __engine_wall
name: "[engine] Wall"
components:
- type: Transform
- type: Clickable
- type: Sprite
drawdepth: Walls
texture: Tiles/wall_texture.png
- type: Icon
texture: Tiles/wall_texture.png
- type: BoundingBox
- type: Collidable
- type: Occluder
sizeX: 32
sizeY: 32
placement:
snap:
- Wall

View File

@@ -1,7 +1,15 @@
- type: shader
id: selection_outline
kind: source
path: "/Shaders/outline.gdsl"
path: "/Shaders/outline.swsl"
params:
outline_width: 1
outline_color: "#FF000055"
- type: shader
id: selection_outline_unshaded
kind: source
path: "/Shaders/outline_unshaded.swsl"
params:
outline_width: 1
outline_color: "#FF000055"

View File

@@ -3,3 +3,7 @@
id: unshaded
kind: canvas
light_mode: unshaded
- type: shader
id: shaded
kind: canvas

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[ext_resource path="res://Engine/Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" instance=ExtResource( 1 )]

View File

@@ -19,7 +19,7 @@ rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_vertical = 1
custom_styles/panel = SubResource( 1 )
_sections_unfolded = [ "Grow Direction", "Mouse", "Rect", "Size Flags", "custom_styles" ]
@@ -75,6 +75,7 @@ mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
rect_clip_content = true
_sections_unfolded = [ "Mouse", "Rect" ]
[node name="TextureRect" type="TextureRect" parent="HBoxContainer/TextureWrap" index="0"]
@@ -84,7 +85,6 @@ anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 4

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[ext_resource path="res://Engine/Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" instance=ExtResource( 1 )]
@@ -40,7 +40,7 @@ margin_bottom = 310.0
rect_min_size = Vector2( 200, 0 )
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 2
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1

View File

@@ -19,7 +19,7 @@ rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 3
size_flags_vertical = 1
custom_styles/panel = SubResource( 1 )
_sections_unfolded = [ "Grow Direction", "Mouse", "Rect", "Size Flags", "custom_styles" ]

View File

@@ -1,6 +1,6 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[ext_resource path="res://Engine/Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" index="0" instance=ExtResource( 1 )]

View File

@@ -0,0 +1,53 @@
[gd_scene load_steps=3 format=2]
[ext_resource path="res://Engine/Scenes/SS14Window/closewindow.png" type="Texture" id=1]
[sub_resource type="StyleBoxFlat" id=1]
bg_color = Color( 0.234375, 0.234375, 0.234375, 1 )
[node name="SS14Window" type="Panel"]
margin_left = 100.0
margin_top = 38.0
margin_right = 878.0
margin_bottom = 519.0
[node name="Contents" type="MarginContainer" parent="."]
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = 0.0
margin_top = 30.0
margin_right = 0.0
margin_bottom = 0.0
rect_min_size = Vector2( 50, 50 )
rect_clip_content = true
mouse_filter = 2
custom_constants/margin_right = 10
custom_constants/margin_left = 10
custom_constants/margin_bottom = 10
custom_constants/margin_top = 10
[node name="Header" type="Panel" parent="."]
anchor_right = 1.0
margin_bottom = 25.0
mouse_filter = 2
custom_styles/panel = SubResource( 1 )
[node name="Header Text" type="Label" parent="Header"]
anchor_right = 1.0
anchor_bottom = 1.0
margin_right = -25.0
text = "Exemplary Window Title Here"
align = 1
valign = 1
clip_text = true
[node name="CloseButton" type="TextureButton" parent="Header"]
anchor_left = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -25.0
texture_normal = ExtResource( 1 )
expand = true
stretch_mode = 5

View File

Before

Width:  |  Height:  |  Size: 239 B

After

Width:  |  Height:  |  Size: 239 B

View File

@@ -2,18 +2,19 @@
importer="texture"
type="StreamTexture"
path="res://.import/closewindow.png-7b2f9cb6cf73c832ec12a5ebfba82490.stex"
path="res://.import/closewindow.png-27200ff550a4cc91ea5c13546f44ca18.stex"
[deps]
source_file="res://Scenes/SS14Window/closewindow.png"
dest_files=[ "res://.import/closewindow.png-7b2f9cb6cf73c832ec12a5ebfba82490.stex" ]
source_file="res://Engine/Scenes/SS14Window/closewindow.png"
dest_files=[ "res://.import/closewindow.png-27200ff550a4cc91ea5c13546f44ca18.stex" ]
[params]
compress/mode=0
compress/lossy_quality=0.7
compress/hdr_mode=0
compress/bptc_ldr=0
compress/normal_map=0
flags/repeat=0
flags/filter=false
@@ -23,6 +24,7 @@ flags/srgb=2
process/fix_alpha_border=true
process/premult_alpha=false
process/HDR_as_SRGB=false
process/invert_color=false
stream=false
size_limit=0
detect_3d=true

View File

@@ -0,0 +1,17 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://SpriteView.cs" type="Script" id=1]
[node name="SpriteView" type="Control"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = false
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
script = ExtResource( 1 )

View File

@@ -0,0 +1,3 @@
void fragment() {
COLOR = texture(TEXTURE, UV);
}

View File

@@ -0,0 +1,26 @@
#version 330 core
out vec4 FragColor;
const float LIGHTING_HEIGHT = 1;
// Position of the fragment, in world coordinates.
in vec2 worldPosition;
uniform vec4 lightColor;
// Position of the light, in world coordinates.
uniform vec2 lightCenter;
uniform float lightRange;
uniform float lightPower;
void main()
{
vec2 diff = worldPosition - lightCenter;
float dist = dot(diff, diff) + 1;
float val = clamp((1 - clamp(sqrt(dist) / lightRange, 0, 1)) * (1 / (sqrt(dist + 1))), 0, 1);
val *= lightPower;
FragColor = vec4(lightColor.rgb, val);
}

View File

@@ -0,0 +1,23 @@
#version 330 core
// Vertex position.
layout (location = 0) in vec2 aPos;
out vec2 worldPosition;
uniform mat3 modelMatrix;
layout (std140) uniform projectionViewMatrices
{
mat3 projectionMatrix;
mat3 viewMatrix;
};
void main()
{
vec3 transformed = modelMatrix * vec3(aPos, 1.0);
worldPosition = transformed.xy;
transformed = projectionMatrix * viewMatrix * transformed;
gl_Position = vec4(transformed, 1.0);
}

View File

@@ -0,0 +1,33 @@
#version 330 core
out vec4 FragColor;
in vec2 UV;
uniform sampler2D TEXTURE;
uniform sampler2D lightMap;
uniform vec4 modulate;
layout (std140) uniform uniformConstants
{
vec2 SCREEN_PIXEL_SIZE;
float TIME;
};
uniform vec2 TEXTURE_PIXEL_SIZE;
[SHADER_HEADER_CODE]
void main()
{
vec4 FRAGCOORD = gl_FragCoord;
vec4 COLOR;
[SHADER_CODE]
vec2 lightSampleUv = (FRAGCOORD.xy * SCREEN_PIXEL_SIZE);
vec3 lightSample = texture(lightMap, lightSampleUv).rgb;
FragColor = COLOR * modulate * vec4(lightSample, 1);
}

View File

@@ -0,0 +1,47 @@
#version 330 core
// Vertex position.
layout (location = 0) in vec2 aPos;
// Texture coordinates.
layout (location = 1) in vec2 tCoord;
out vec2 UV;
// Maybe we should merge these CPU side.
// idk yet.
uniform mat3 modelMatrix;
layout (std140) uniform projectionViewMatrices
{
mat3 projectionMatrix;
mat3 viewMatrix;
};
layout (std140) uniform uniformConstants
{
vec2 SCREEN_PIXEL_SIZE;
float TIME;
};
// Allows us to do texture atlassing with texture coordinates 0->1
// Input texture coordinates get mapped to this range.
uniform vec4 modifyUV;
[SHADER_HEADER_CODE]
void main()
{
vec3 transformed = projectionMatrix * viewMatrix * modelMatrix * vec3(aPos, 1.0);
vec2 VERTEX = transformed.xy;
[SHADER_CODE]
// Pixel snapping to avoid sampling issues on nvidia.
VERTEX += 1;
VERTEX /= SCREEN_PIXEL_SIZE*2;
VERTEX = floor(VERTEX + 0.5);
VERTEX *= SCREEN_PIXEL_SIZE*2;
VERTEX -= 1;
gl_Position = vec4(VERTEX, 0.0, 1.0);
UV = mix(modifyUV.xy, modifyUV.zw, tCoord);
}

View File

@@ -1,6 +1,8 @@
shader_type canvas_item;
//shader_type canvas_item;
uniform float outline_width = 2.0;
uniform vec4 outline_color: hint_color;
// TODO: implement that hint_color thingy.
//uniform vec4 outline_color: hint_color;
uniform vec4 outline_color=vec4(1,0,0,0.33);
void fragment() {
// I, for some reason, cannot put this comment in the top of the file.
@@ -55,5 +57,5 @@ void fragment() {
maxa = max(a, maxa);
mina = min(a, mina);
COLOR = mix(col, outline_color, maxa-mina);
COLOR = mix(col, outline_color, maxa-col.a);
}

View File

@@ -0,0 +1,56 @@
render_mode unshaded;
uniform float outline_width = 2.0;
// TODO: implement that hint_color thingy.
//uniform vec4 outline_color: hint_color;
uniform vec4 outline_color=vec4(1,0,0,0.33);
void fragment() {
// I, for some reason, cannot put this comment in the top of the file.
// Taken from the godot-demo-projects repo.
// GODOT ENGINE
// http://www.godotengine.org
//
// ************************************************************************
//
// Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur.
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
// CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
// TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
// SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
//************************************************************************
vec4 col = texture(TEXTURE, UV);
vec2 ps = TEXTURE_PIXEL_SIZE;
float a;
float maxa = col.a;
a = texture(TEXTURE, UV + vec2(0, -outline_width)*ps).a;
maxa = max(a, maxa);
a = texture(TEXTURE, UV + vec2(0, outline_width)*ps).a;
maxa = max(a, maxa);
a = texture(TEXTURE, UV + vec2(-outline_width,0)*ps).a;
maxa = max(a, maxa);
a = texture(TEXTURE, UV + vec2(outline_width, 0)*ps).a;
maxa = max(a, maxa);
COLOR = mix(col, outline_color, maxa-col.a);
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 668 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 800 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 230 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 432 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 365 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 355 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 299 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 718 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 701 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 281 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

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