Compare commits

..

892 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
Pieter-Jan Briers
0abdcbd1f8 Never forget to hit save. 2018-06-23 21:57:26 +02:00
Pieter-Jan Briers
c20848902e Update export preset. 2018-06-23 21:55:35 +02:00
Pieter-Jan Briers
f1d3d2c5ce Async Delay and Spawn helpers for Timer. (#607) 2018-06-11 20:29:41 +02:00
Pieter-Jan Briers
c6d941f0cf Detaches grids from maps. (#595)
Grid IDs are now globally unique.
This'll make moving grids between maps possible.

Also, LocalCoordinates has been renamed to GridLocalCoordinates.
2018-06-11 20:24:23 +02:00
Pieter-Jan Briers
11230fe98f Fix reconnecting with the client. 2018-06-09 16:03:24 +02:00
Pieter-Jan Briers
170e1ad5af Nice typo. 2018-06-09 15:47:59 +02:00
Pieter-Jan Briers
100d21196b Improve readmes.
Moved the intimidating all caps readme info out into its own file.
Deleted the linux file as it was horribly outdated.
2018-06-09 15:19:21 +02:00
Acruid
46ca2d2cc5 TileDefinitions can be loaded from prototypes now. (#594)
The server now uses the config file to figure out which map to load.
2018-06-08 19:32:14 +02:00
Pieter-Jan Briers
0563a5beb3 Fix build issue on Godot 3.0.x 2018-06-08 14:52:48 +02:00
Pieter-Jan Briers
6d35e339cb Fix caching of GodotSharp.dll on AppVeyor. 2018-06-07 23:30:27 +02:00
Pieter-Jan Briers
8a8ed75084 Fix typo. 2018-06-07 23:28:16 +02:00
Pieter-Jan Briers
fbeb10e8c2 Make download_godotsharp 522 proof. 2018-06-07 23:25:02 +02:00
Pieter-Jan Briers
be174cc027 Sprite per-layer color modulate. 2018-06-07 23:14:55 +02:00
Pieter-Jan Briers
d1cf753f22 Debug Coords Panel gets entity display. 2018-06-03 16:40:59 +02:00
Pieter-Jan Briers
6ede21aa14 Fix Overlay.ZIndex setter. 2018-06-03 16:11:18 +02:00
Pieter-Jan Briers
59a1cc899b Even einstein agrees. 2018-06-03 16:09:23 +02:00
Pieter-Jan Briers
ee7c5d9da1 It it quantum-physically impossible to get CI scripts right the first time. 2018-06-03 16:03:38 +02:00
Pieter-Jan Briers
88520e8db5 Coverage badge. 2018-06-03 16:01:38 +02:00
Pieter-Jan Briers
e73bcd57c0 Fix coverage reports. 2018-06-03 16:01:32 +02:00
Pieter-Jan Briers
cd376711bf Does this fix coverage. 2018-06-03 15:49:36 +02:00
Pieter-Jan Briers
ca0037a402 I'm a genius. 2018-06-03 15:35:29 +02:00
Pieter-Jan Briers
7aee21b689 Guess no multiline then. 2018-06-03 15:31:02 +02:00
Pieter-Jan Briers
348ca5b107 Shall coverage work first try? 2018-06-03 15:27:53 +02:00
Pieter-Jan Briers
136d306d1d Use after_test maybe? 2018-06-03 15:06:43 +02:00
Pieter-Jan Briers
3c14e1d1db Make Sonar import unit test results. 2018-06-03 14:59:50 +02:00
Pieter-Jan Briers
c058c2e3d4 Outlines & Custom non-entity drawing. (#592)
* Shader work WiP

* Probably implement basic shader param support.

* Really rough and hacky version

* Fix dumb exception.

* Custom fullscreen drawing API prototype.

* Significantly optimize debug colliders drawing.

* Fix drawdepths on clothing & overlays.

* Re-add license to outline shader.

* Update .editorconfig for .gdsl files.

* Fix unit tests.
2018-06-03 14:38:56 +02:00
Pieter-Jan Briers
1812e8743d Makes EntityUid IComparable. 2018-05-30 16:10:11 +02:00
Pieter-Jan Briers
036daa2ac8 ToString() for entities.
Intended for debugging mostly.
2018-05-30 16:09:47 +02:00
Pieter-Jan Briers
480a0b4a0a Can now change SS14Window titles. 2018-05-30 14:22:57 +02:00
Pieter-Jan Briers
693769cbd4 Improve sprite drawdepth ordering. 2018-05-30 14:07:21 +02:00
Pieter-Jan Briers
00fe03b61b Placement fixes. 2018-05-27 23:27:23 +02:00
Pieter-Jan Briers
b761d9a1eb Fixes directional icons not being used in placement previews. 2018-05-27 21:44:35 +02:00
Pieter-Jan Briers
3728c7eeee Some entity improvements to work on power code. (#591)
* Client-specific component network messages.

* Make entity serializer aware of color names.

* Fix input log spam.
2018-05-27 16:57:42 +02:00
Pieter-Jan Briers
dc80060757 Input Refactor (#590)
* *some* input work.

* Remove explicit numbers from Key enum.

* Hey, keybinds sorta work!

* Input almost works?

* It works.

* Fix networking issues.
2018-05-27 10:08:36 +02:00
Pieter-Jan Briers
909bb5936f Fixing issues sonar pointed out. (#589)
* Fixing issues sonar pointed out.

* Fix build.
2018-05-26 18:21:40 +02:00
Pieter-Jan Briers
0da7507c64 shhhhh. 2018-05-13 15:54:32 +02:00
Pieter-Jan Briers
0a195fe3c7 Game State Refactor (#586)
* Rename SS14.Server/GameState directory.

* Server now runs at 60 FPS.

* RegisterNetMessage<T> more generic!

Also started refactoring game states.

* HOLY SHIT I CAN MOVE AROUND.

* Dirty(); calls and improvements.

* Implement deletions + mark components as dirty initially.

* Remove bsdiff submodule.

* Remove Bsdiff.

* Fix System.ValueTuple reference.

* Server no longer crashes when the gun is used.

* Optimize player sync.

* Prevent constant dirtiness from player input mover.
2018-05-13 11:40:16 +02:00
Pieter-Jan Briers
64e22fc031 Fix GodotSignalSubscriber leakage. (#588)
Every signal subscriber was getting leaked because I didn't know how Godot's memory model works. This is fixed now.
2018-05-12 00:13:21 +02:00
Pieter-Jan Briers
1375da7f70 Rename IEntity.GetComponents to GetAllComponents. (#584)
This is to avoid confusion.
A single s to distinguish it from GetComponent() is quite hard to miss.
2018-05-10 18:52:17 +02:00
Pieter-Jan Briers
6b37906c85 Logging API cleanup. (#585)
Added versions of the log calls not doing formatting.
Moved the LogLevel argument for .Log() to be first.
2018-05-10 18:51:55 +02:00
Pieter-Jan Briers
6c7dff77c5 Fixing some crashes and errors. (#583)
Fixes #559 and resolves a ton of error spam & shutdown crashes.
2018-05-10 18:51:42 +02:00
Pieter-Jan Briers
86a432bdeb Debug monitor system & UI improvements. (#581)
Debug monitors like coord debug, FPS and the (now re-added)
have been amde into a more centralized system.

Networking debug is back! No chart though.

Bunch of improvements and fixes to the UI code to facilitate this.
2018-05-10 18:50:56 +02:00
Pieter-Jan Briers
cb469c4f86 Fixes description loading in prototypes 2018-05-09 17:12:56 +02:00
clusterfack
dd0be25ab6 Placement Systems (#580)
* Deactivate special placement mode after placement
Comments
Fix collision checks for placement manager
Remove unnecessary usings
Fix the alignment issues
Wow this commit has literally almost all the work done in it alone
time to test some sketchy shit, commit first

* Fix align similar
2018-05-09 16:33:50 +02:00
Pieter-Jan Briers
4471e0ccca The SpriteComponent refactor (#577)
* Adds Godot shader support.

* New sprite component with a layer system.

Supports per-layer shaders. Only texture and shader properties are implemented.

More TODO.

* Basic RSI loading.

* Direct textures for layers.

* Implement a scale layer parameter.

* RSI directions work now.

* Animation support.

* Make sprites appear again.

* Fix error message about shaders on the server.

* Implements directional sprite handling & rotation of transforms.

* Remove debug logs from ShaderSourceResource.Load

* Work on a public API & better handling of errors.

* Layer addition API coded but untested.

* Fix init crash.

* Add a client side API for SpriteComponent.

* Remove dead NetIDs.

* Fix bug where sometimes entities start flat on their face.

* Refactor IconComponent.

* Adds rotation property to layers.

* Expose scale and rotation APIs, sprite-global rotation.

* Adds visibility property.

* Netcode work.

* Server side prototype loading done.

* Netcode works.

Also adds a visibility layer option.
2018-05-02 21:24:59 +02:00
clusterfack
adece0e39b Description information on entity and loading from prototypes (#579) 2018-05-02 21:24:02 +02:00
clusterfack
9aed85b4c7 Click modifiers (#578)
Apparently @pjb3005 did almost all the work for this when he changed the system to godot but didn't say anything, adds a property to parse the clicktype on mousebuttoneventargs and passes it in the network message instead
2018-05-01 02:43:40 -05:00
clusterfack
3a78a26652 PJB will love this (#573)
* PJB will love this

Containers 2: The uncontained

* Yes
2018-04-23 01:57:18 +02:00
clusterfack
498349bbcf Companion PR (#574)
https://github.com/space-wizards/space-station-14-content/pull/61

Adds a keybind for opening the character menu and makes texture rect not die when setting texture to null
2018-04-22 19:59:04 +02:00
clusterfack
8b83362c61 Gridcontainer (#571)
* Gridcontainer Wrapper

* This is probably important too

* Oopsie daisy

* Creates the client and shared portions of the new inventory code
2018-04-21 01:36:03 -05:00
Pieter-Jan Briers
32caf088ef Adds a system to load tscn files from content. (#570) 2018-04-19 21:22:16 +02:00
Pieter-Jan Briers
a34006f8ff Make project files default to x64. (#568)
Also fixes Lidgren's output directory. Not like it mattered.
2018-04-19 21:16:26 +02:00
Pieter-Jan Briers
20b9fd3228 Sawmills! (#565)
* Sawmills

* They seem to work on the server now, sorta.

* They work.

* More shit that works.

* Shit works yo.

* File logging for the server.

* Adds some debug commands and finishing touches.

* Oh yeah change this default.

* Fix unit tests.
2018-04-19 20:19:40 +02:00
clusterfack
320aa3f9c0 Gridcontainer Wrapper (#564)
* Gridcontainer Wrapper

* This is probably important too
2018-04-18 21:44:30 +02:00
clusterfack
f445addcd5 These should have no distinction on the client (#563) 2018-04-17 02:25:09 -05:00
clusterfack
44b00a1fa7 Make handle message use optional arguments (#561)
* Make handle message use optional arguments

Instead of arbitrarily using object as the first argument and killing type safety

* Ohboy
2018-04-15 13:34:22 -05:00
Pieter-Jan Briers
909ba41890 Remove usage of PitchScale. (#562)
It was apparently a very new 3.1 feature,
so it doesn't work on Godot 3.0.x.
2018-04-15 13:34:08 -05:00
PJB3005
b5ca9095b0 Remove Bitstream 2018-04-13 01:08:08 +02:00
PJB3005
c22a199a5b Remove binaries 2018-04-13 00:40:09 +02:00
Pieter-Jan Briers
2395b456e2 Update all NuGet packages. (#556)
* Update all NuGet packages.

* What a way to waste one and a half hours of my life.

* fucking

* fuck everything.
2018-04-12 23:41:56 +02:00
Pieter-Jan Briers
d7414930ff RSI support (#552)
* RSI WiP

* More work but we're doing bsdiff now

* RSI loading seems to mostly work.

* Vector2u deserialization test.

* Add in packages again.

* This is the part where I realize I need a path manipulation library.

* The start of a path class but it's late so I'm going to bed.

* HIGHLY theoretical ResourcePath code.

Partially tested but not really.

* Allow x86 for unit tests I guess jesus christ.

Thanks Microsoft for still not shipping x64 VS in 2018.

* Resource paths work & are tested.

* I missed a doc spot.

* ResourcePaths implemented on the server.

* Client works with resource paths.

TIME FOR A REFACTOR.

* Some work but this might be a stupid idea so I migh throw it in the trash.

* Resources refactored completely.

They now only get the requested resourcepath.
They're in charge of opening files to load.

* RSI Loader WORKS.

* Update AudioResource for new loading support.

* Fix package references.

* Fix more references.

* Gonna work now?
2018-04-12 21:53:19 +02:00
Pieter-Jan Briers
796555fad5 Audio system! (#550)
Supports positional, entity-tracking and global audio.

Special thanks to Zumo on Discord,
for figuring out how to load audio files Godot.
2018-04-12 17:54:18 +02:00
Pieter-Jan Briers
1e749952db Unit test improvements. (#548)
* Unit test improvements.

Adds an ApproxEqualityConstraint and IApproxEquatable<T> for certain tests.
Gives [Parallelizable] to a bunch of tests.

* ParallelScope.All | ParallelScope.Fixtures
2018-04-12 17:53:10 +02:00
clusterfack
e191be3a75 Fix stored object clicking bug (#553)
Fixes a humorous bug where you click on things that are contained in another thing because the mousedown doesn't check if something is on the map or not
2018-04-12 11:23:04 +02:00
Pieter-Jan Briers
ba3bad68c8 New logo courtesy of @outbools. (#549) 2018-04-12 02:55:45 -05:00
Pieter-Jan Briers
2bc7e09f65 Stop building the resource pack on Travis and AppVeyor. (#551) 2018-04-12 02:55:25 -05:00
Pieter-Jan Briers
896ac87f04 Remove broken particle editor. (#547) 2018-04-11 10:47:38 -06:00
Pieter-Jan Briers
b5c0202647 Godot (#545)
* bsdiff submodule

* All the other stuff

* Upgrade to 0.2 of SS14.Shared.BSdiff

* Use streams. Even faster!

* All rendering refactors should start with the killing of the SFML submodule. Trust me I've done this before!

* And after that comes the removal of the references in the project files!

Of course, neither of these compile. Meh.

* IoC loads, now to port the entire client over.

* More work

* Trying to debug the null exception.

* More messy WiP code

* More WiP

* Transform components now make Node2Ds inside the scene tree.

* Work on the UI system.

* Redo project configurations to work better.

* More work on the Godot GUI binding.

Added BaseButton and Button bindings, including events for them.

More APIs on Controls like GetChild() and alike.

Ability to instance a Godot PackedScene and have it automatically be wrapped by the SS14 GUI wrapper, thus allowing the usage of Godot's GUI editor while maintaining the good C# API.

* Fix incorrect sRGB profile on bootsplash.png

* LineEdit API.

* Maybe commit the csproj too.

* Exit button works now!

* Change MainMenu root to a normal Control.

* Some stuff messing with window popups.

* Fix popup not scaling down again after housing large text.

* Make popup dialog helper.

* Auto wrap controls that spawn others when not instancing.

* Nice typo me.

* Work getting server connections working.

* Server didn't start anymore due to still trying to load removed zip packs.
* Made MainMenu dump UI elements in shutdown.

* We now successfully connect to the server.

* WE Ingame NOW!

* Basic map rendering works now!

* Camera & Input work.

Though I'm not sure whether the input issues are this piss poor laptop or actual bugs.

* Fix input issues.

KeyHeld() was firing KeyUp() into States, which broke everything.

* WiP Debug console.

UI Works, command processing doesn't.

* Remove some debug logs.

* Fixing focusing issues with the Debug Console.

* In which I copy paste in the DebugConsole code.

* More WiP DebugConsole work.

* Use RichTextLabel for DebugConsole.

* Disable DebugConsole test text.

Also disable context menu on the IP Box because of font size issues.

* ITextureSource for texture wrapping.

* Make resource loading not copy every build.

It now loads from repo root. Release builds are TODO.

* Bsdiff 0.3 for fixed targets.

* Fix iCCP sRGB errors.

* Give full texture paths to prototypes.

* Sprite component old API restored. *shudder*

* Finish sprite rendering.

By hitting delete on basically everything.

* Fixing camera delay with this one weird trick!

The input lag was because the camera lagged, not because the input lagged. I didn't have visualization.

* Use greyshirt as temporary human replacement.

* FPS Counter.

* Fix Windows, re-add space tile def.

Windows broke because Mono on Windows can't use System.IO.Compression.
The GZIP streams use by MsgFullState have been moved to
ICSharpCode.SharpZipLib.GZip. Works fine.

Also re-added the space tile def because everything blows up otherwise I
guess.

* Debug colliders works.

* Highly WiP varied Window code.

* Work on the quit button. Doesn't work yet. Needs state overhaul.

* Do a better job of freeing Godot objects correctly.

* Simplify game states.

States are no longer cached. They're GC'd after shut down. Their creation has been simplified too due to IoCManager.InjectDependencies().

This makes returning to main menu work GUI wise.

* Be less aggressive on resource freeing. Only dispose Mono handles now.

* More work getting quit to work.

* Grids get cleared upon disconnect correctly.

* Disable rendering of the filler space tile.

I'll leave a nice parallax background up to content.

* Oops forgot to stage these.

* Fix issues in the csproj file.

* Make controls have own namespace.

* Chatbox GUI, other stuff.

Compiles but doesn't quite work yet.

* Git fuck you

* Chat works.

* Clicking on a not-control removes focus now.

* Fix an exception.

* Update mono. Use enums instead of constants now!

* Fix window dragging

* Fix chat stealing focus from other LineEdits on MacOS I guess.

* Correctly handle client shutdown & server disconnect.

* Fix error spam on client shutdown probably.

* Tiny amount of lighting code to have access to it from other computers

* Lighting works mostly.

* Godot.Texture.Flags -> FlagsEnum

* More WiP lighting code

* Turns out you can't control custom layers with cameras eh.

* WiP lighting almost works

* Lighting WORKS!

* Lobby thing.

* Some options menu work. I'm gonna try something

* Options menu works.

* More improvements.

* In game options menu works.

* Remove a debug log.

* Fix Window Movement and Drag.

* Huh Godot edited these scenes.

* Forgot to commit projects

* It compiles.

* I never claimed that.

* Update sandbox csprojs a bit.

* Makes sandbox load.

Client goes ingame but dies due to broken map manager networking code.

* Fix grids.

* Fix relogging duplicating entities inside Godot.

* Eyes!

* How about removing the TODO entry.

* Auto fetch bsdiffwrap.

* Update TODO.

* Remove TODO list.

* Tilemaps get cleaned on disconnect now.

* Fix bsdiff submodule HOPEFULLY

* Highly WiP and not compiling or working placement.

Yes this is the best way for me to share code between my computers.

* Fix bsdiff with spaces in path names bloody MSBuild + cmd.

* PLACEMENT KINDA WORKS.

NO RENDERING OR TILES YET.

ALSO I NEED TO REBASE THIS.

* Kill EngineContentPack.zip

* Fix map code and remove sprite components from the server.

* Ok entity placement mostly works.

* Grid lines sorta work but SnapgridCenter is still broke.

* Fix Center Grid Rendering.

* Work getting tile spawns to work. Not quite there yet.

* Fix placement and remove tiledef networking.

It werks!

* Remove SolutionSpecific.targets

Didn't end up being needed.

* Kill off wearableanimatedsprite component states.

* Do not put binaries relative to the solution.

* Remove shaders, reorganize prototypes for content.

* Reimplement SpriteComponent color.

* Correctly set __engine_human DrawDepth.

* Round coordinates passed to Godot to pixels to prevent issues.

* Remove some GUI log spam.

* Resource cache now uses the VFS more-proper but still awfully.

* Fix color reading code on SpriteComponent.

See, e94bf4854b106da51c89eeeab9a609be369f9622 did work.
The problem was all the code it NEEDED to work was broken.

* Step one into trying to fix Travis and AppVeyor.

* Auto download GodotSharp on Travis.

* Let's not make dumb mistakes with the cache directories.

* 2018 and requests still isn't in the stdlib.

* This maybe?

* This maybe?

* AppVeyor time.

* How 'bout we don't download sonarqube at all outside master.

* Try to cache on AppVeyor.

* Fix mac builds maybe.

* Finishing up Godot: cleanup.

* Eh this works too for SS14Loader.

* Remove some dead files

* Make Omnisharp not choke on buildchecker.

* Controls for box containers.

* Remove debug port from project.godot.

* Control and drawing improvements.

Controls are now properly capable of overriding Godot virtuals.
Importantly minsize calculations and stuff like HasPoint.

There is now a system for doing direct drawing on controls.
This is done with a DrawingHandle system.

TextureSource has been renamed to Texture.

Also there's a wrapping for Godot's style boxes now.

* Yeah don't insult omnisharp.

* Stylebox fixes and margin API on controls.

* Hey it compiles!

* Fix things.

* Fix null godot texture conversion.

* Fix client transform parenting.

* Fix movement sticking to north.

* Some updates.

* Work on exports.

* Unstubs client/Godot timing code.

It's mostly implemented now.

* Client unit tests work.

Jesus Christ.

* Let's figure out why AppVeyor hates me.

* Does the remie.

* Update GodotSharp download URL.

* Export templates for the builds server.

* Remove mac export icon.

* TO THE BUILDS SERVER.

* Probably implement the effects system in Godot.

* Fix mouse handling everywhere.

* Fix some CollidableComponent exceptions.

* Effects system works + unshaded option for LAZORS.

* Let's not fuck with Angle yet.

* Make file/line numbers show up on Windows Godot.
2018-04-07 15:24:46 +02:00
clusterfack
5f5c5f13c9 Changes physics and collidables (#543)
This is for projectile weapons, adds some enhancements and modifiers for collision behavior which will help out
2018-04-06 00:34:24 +02:00
clusterfack
b13af4cd8d Adds getentititiesinarc (#544)
A bit of a shitty function that somewhat works, get entities in a range that intersects ours but also has a center point within an angular range that we specify
2018-04-05 19:27:17 +02:00
clusterfack
f64309ba6f Arbitrary Effects System (#537)
* Moves client entity system to be closer to IoC registration and before gamescreen initialization

* Gives the raycasting system an argument to ignore a particular entity when finding what entity it will intersect

* Adds an arbitrary effects system

By creating a message defining things such as position, spritename, rotation, size, and delta values, you can create a temporary effect on the client. Just create a new message, define all the values upon it, pass it to the serverside effects system to send to the clients.

* Effects csprojs stuff and adding a datatype for priorityqueue from a nuget package

* Modifies nuget to use $solutiondir

* Effectsystemstuff
2018-04-05 19:26:35 +02:00
Acruid
67ecfe7ddb BaseServer - Kick Players On Shutdown (#541) 2018-03-27 13:56:52 -06:00
Acruid
77f7efdf6e MapLoader now catches any errors when creating an entity and prints them to the console instead of crashing the program. (#540) 2018-03-25 14:17:52 +02:00
Acruid
7d681567d1 Serializer Improvements (#539)
* Added Data Get/Set functions for use with Properties.

* Able to serialize generic List and Dictionary.

* Can now actually serialize generic lists and Dictionaries.

* Manually set the newline string for StreamWriter so the tests pass in linux/mac.
2018-03-25 14:17:41 +02:00
Acruid
553a0aca53 GameLoop Refactor (#538)
* Added Unit Tests for GameTiming.

* Added GameLoop class.

* Removed TimeScale.

* Switched server to the new GameLoop.

* Client now uses GameLoop.

* Allowed friend assemblies in release builds, so TravisCI can run tests.
2018-03-25 14:15:47 +02:00
DamianX
556fcbf7bd GetAllPlayers() doesn't return nulls (#542) 2018-03-22 17:03:03 +01:00
Acruid
3a5ea35c0b Raycasting + Turret AI (#532)
* Ray -> Box intersection works.

* Turret AI finished.

* Turret Works :D

* Light masks can now be rotated.

* Shoddy angle MoveTowards works.

* Shoddy Vector2 MoveTowards works.

* And pretty broken Quaternion version..

* Slept on it, rotation works good enough now.

* Fixed nuget dependencies.

* Moved AimShootLifeProcessor.cs to content.
2018-03-09 21:48:34 +01:00
Pieter-Jan Briers
2fb6f27cd1 Fix Travis and code analysis compiler warnings on Unix. (#535)
* Fix Travis and code analysis compiler warnings on Unix.

* Actually let's just disable macOS builds.
2018-03-09 18:03:20 +01:00
clusterfack
f57196a481 Directional Placement Manager Fix (#533)
* Placement Manager rotation fix

* Makes sure the default nondirectional sprites work as well
2018-03-09 18:02:54 +01:00
clusterfack
c03569a4e8 Full interaction system (#534)
Raises an event on click, regardless of whether we clicked on something or not. Sends it to the server to be parsed in the content interaction system.
2018-03-09 17:30:30 +01:00
Acruid
c8aaab48ad InputSystem Messages (#531)
* Misc cleanup.

* Removed BoundKeyChangeEventArgs.

* Removed event IClickableComponent.OnClick.

* Nothing uses EntityEventArgs now.

* Input messages are now sent through the network as SystemMessages instead of ComponentMessages.
Fixed EntitySystemMessage namespace name colliding with the base class.
Removed some unused code from server.

* Ignored KeyBindingInputComponent in the client prototype system.
Removed useless update code from client InputManager.
2018-03-03 13:19:18 +01:00
Acruid
a850c722cc Color Merge (#530)
* Removed useless CLSComplientAttribute from math structs.
Removed Obsolete functions from math structs.
Minor code cleanup.

* Merged Color into Color4, then renamed Color4 back to Color.
2018-02-27 19:37:33 +01:00
Acruid
b9cadc4599 Minor Refactorings (#529)
* Moved GameStateManager functions out of BaseServer.

* Moved PlayerManager NetMsgs out of BaseServer.

* Moved MapManager NetMsg out of BaseServer.

* Moved TryLoadAssembly from BaseServer to AssemblyLoader.

* Removed some service locator calls.
2018-02-27 19:35:18 +01:00
Acruid
eb74c4227f Component Messaging Rework (#528)
* Sealed Entity class.
Removed Entity.Update().
Code cleanup.

* Component.Update() is now obsolete.

* Added skeleton of new Component Message system.

* Converted everything to use new `SendMessage(owner, message)`.

* Removed more of the old system.

* Changes `IEntity.AddComponent(IComponent)` to `IEntity.AddComponent<T>`.
Removes some initialization functions from IEntity.

* Pulled ComponentManager registration out of Component into Entity.
Removed unused OnShutdown events from Entity and Component.

* Converted Component.ReceiveMessage() to Component.HandleMessage().

* Killed component message params.

* Remove EntityNetworkMessage params.
2018-02-24 09:16:28 -08:00
Acruid
ba981a13e0 Can now save and load full IMaps. (#523)
Server concmds for save/load map.
2018-02-18 00:10:17 +01:00
Acruid
eee7b3c598 Transform Parenting Enhancement (#522)
* Nightly Progress.

* Getting closer...

* !!! IT FUCKING WORKS !!!

* Cleanup

* Relative Rotation works.

* SpriteComponents now rotate properly.
2018-02-18 00:07:45 +01:00
clusterfack
441bdf628a Fix placement dragging affecting entities (#521)
* Fix placement dragging affecting entities

It now only affects tile placement

* Tuturu

* Fix annoying defaultanimatedsprite bug as well
2018-02-06 21:34:53 -06:00
Acruid
309ef2cea2 Map Blueprint Save/Loading (#520)
* YAML deserializer is coming along.
Nightly work.

* Should be pretty much working now.

* Converted most of the server components over.

* Entity loading/saving works.

* Grid saving/loading works.

* Cleans up old code.

* Saving and Loading of blueprints works.

* Improved map commands a bit.

* MapLoader fixes grid and map IDs in blueprint.
Can now load blueprints from the VFS.

* Removed Entity.LoadData(YamlMappingNode).

* Updated the nuget 'YamlDotNet' package to 4.3.0.

* Fixed Sandbox entry point.
Unit tests pass again.
2018-02-06 18:56:58 -06:00
clusterfack
8b31da2e0a Adds the same event subscriber entity has to entitysystems (#518)
* Adds the same event subscriber entity has to entitysystems

* Add the other helpers because pjb asked
2018-02-05 12:52:24 -07:00
clusterfack
59f158b13a Fixes spawn entity bug (#508)
* Fixes spawn entity bug

Now transform is called before initialize is, yay.

Call it shitcode but unless there is a better way that I cant find, this is the fix, and if there is please tell me

* Fixes incorrect AABB
2018-02-02 15:19:56 -07:00
clusterfack
2301c8d6ee Prevents sprite exceptions (#507)
* Prevents sprite exceptions

Even though setsprite has a default value that it gets set to, unless you give basesprite a non-null value and call setsprite it will cause the animatedsprite components to have an exception without fail. This happens if you don't include it in the prototype for whatever reason.

* Unnecessary
2018-02-02 15:19:40 -07:00
clusterfack
0427fa1537 Makes mouseclicktype an enum (#506)
* Changes clicktype to an enum because why isn't it

* Oops

* Whatever sure lets call it "ClickType" instead of "Clicktype"
2018-02-02 15:19:27 -07:00
Pieter-Jan Briers
f5e5cca2aa Supposedly fix collisions. 2018-01-31 22:37:02 +01:00
Acruid
5c0537f008 CloseTK (#503)
* Added math types from OpenTK project.

* Removed OpenTK from SS14.Server.

* Removed most references to OpenTK from SS14.Shared.

* Removed OpenTK from SS14.UnitTesting.

* Fixed errors in SS14.Client.Graphics.

* Removed more references.

* Remove OpenK from SS14.Client.

* Fised the last compile errors.

* Deleted opentk config file.
2018-01-26 07:31:37 -07:00
Acruid
a2f37d2613 Placement Click-Drag (#502)
* Fixes placement again.

* Can now click-drag tile placement to place multiple tiles.
2018-01-24 20:45:53 +01:00
Jordan Brown
f532d90b78 Fixes appveyor clone (#501) 2018-01-21 00:24:28 +01:00
Pieter-Jan Briers
785d164d29 Make AppVeyor use non-shallow clones for Sonar blame. (#500) 2018-01-21 00:09:37 +01:00
Pieter-Jan Briers
15823b1cb4 Fix AppVeyor maybe 2018-01-20 23:59:04 +01:00
Acruid
d0c317c8b4 Content Build Targets (#499)
* Changed projects so that Sandbox content is built in its own folder, and then copied to ./Resources/Assemblies.

* Moved SS14.Sandbox.targets to the ./MSBuild/ folder.
2018-01-20 23:47:42 +01:00
Acruid
21ebda05c2 Appease Sonar (#495) 2018-01-20 13:24:14 -07:00
clusterfack
8d208dca16 Entity Getters 2 (#496)
* Location Getters 2

Oh my god I didn't even make them part of the interface last time
Fixed a bug with local coordinates not be converted to world coordinates before comparing to other entities world transform
Added some more getter overloads

* Changes entities getters more

Adds a get entities in range for entity and range overload
Changed getentitiesinrange to take into account the bounding boxes of objects instead of their absolute coordinates

* SQUARE
2018-01-20 15:09:18 +01:00
Acruid
03a06cead9 EntityUid Type (#498)
* Wraps Entity Uids in their own type.

* EntityId can't be serialized by entity params.
2018-01-20 15:07:38 +01:00
Acruid
a2278f8ef2 Move Component Initialize to the Entity class. (#497)
Allowed EntityManager to work with the Entity class instead of IEntity.
2018-01-19 20:20:15 -06:00
Acruid
494c5c3eb3 kick Command (#494)
* Added a NetManager.DisconnectChannel so that server/shared can disconnect clients.
Added listplayers command to list all connected session on the server.
Added kick command to forcefully disconnect a connected session.

* Part 2, everything works now.
2018-01-18 18:51:23 -07:00
Silver
594f53d275 update appveyor.yml 2018-01-18 14:00:39 -07:00
clusterfack
9fbb0e6705 Fix Compile (#493)
Some conflicts in Acruid's PRs caused compile to be broken
2018-01-18 11:17:33 -07:00
clusterfack
d1e4a526c0 Adds some Location Getters (#492)
There's probably a million more I could add to be honest
2018-01-18 11:17:20 -07:00
clusterfack
ac38588a56 Updates some obsolete UI vars (#491)
Components is meant to be obsolete now, and anywhere its used are the primary cause of most current UI bugs. I removed one usage of it here.
2018-01-18 10:03:36 -07:00
clusterfack
8690c7a3f5 Updates content compatibility (#490)
Changes way content loads instead of using config, attempts content then loads sandbox instead
Fixes some compiler warnings
Adds a field needed for content player mob
2018-01-18 09:59:34 -07:00
Acruid
cfddef484c Embrace NetMessages (#488)
* Lidgren removed from Client.
ScreenBlocker control removed.

* Lidgren removed from server.
Lidgren removed from UnitTesting.
Lidgren only referenced in SS14.Shared.Network.

* Removed useless traffic debug printing.
Fix a bug with Keybinds being sent to server.

* NetMessages enum is finally gone :D

* Add warning for receiving NetMsgs without a registered callback.

* Moved some of the RegisterNetMessage calls out of BaseServer.
Added 'netaudit' concmd to list NetMsg callbacks on the server.

* Fixed exceptions, it works now.
LocalCoordinates.IsValidLocation() added.

* Moved all objects out of the SS14.Shared root namespace.
2018-01-18 09:58:46 -07:00
Acruid
e804fd3d2a Sprite Offset Property (#489)
Like
2018-01-18 09:55:23 -07:00
Acruid
976f8d7f76 Light Rendering and Masks (#487)
* Remove IoC self-referencing in MapManager.

* Added Circle to the math library.
Made LocalCoordinates equatable.
MapManager refactoring.
Light refactoring.

* Removed LightArea.

* GetEntities* functions now check mapIds.
PlacementManager does not place things in null space.
Prop Edit window "works" again.

* Lightmasks work.
2018-01-17 14:36:03 +01:00
Silver
2eb3f234ea Add Acruid to Code Reviewers 2018-01-15 11:17:09 -07:00
Acruid
785025f23c Sandbox Gamemode (#486)
* Adds skeleton Sandbox Content projects to the solution.

* Change BuildChecker output type to Class Library so that Resharper stops complaining about the project not having a Main() function.

* Added basic player event hooks to BaseServer.
Moved Server run level from PlayerManager to BaseServer.
Added concmds to switch between run levels on server.

* Forgot to commit project file.

* Entry points got changed a bit.

* You can now join a game without a map loaded on the server.

* Moved map loading to Content.

* Adds 'tp' command.

* Added 'addmap' command. Client crashes when used.

* Teleporting between maps works.

* Added GridId and MapId types.
Removed Test concmd, it was useless.
Misc formatting/cleanup.

* Tile placement kinda works.

* Added OnPlayerStatusChanged event.

* Server now auto starts the round.

* HandlePlayerStatusChanged works better now.

* Removed PlayerJoined* events from BaseServer, PlayerStatusChanged event does the same thing.

* Changed default platform of Sandbox from AnyCPU to x86.
Added "content.dllprefix" ConVar so that the config file can specify which content dll to load.
Changed LoadContentAssembly name argument to contain the entire name of the dll being searched for.

* SS14.Shared now copies Lidgren to the output directory.
More project configuration changes to remove the AnyCPU nonsense.
2018-01-15 11:03:50 -07:00
wixoaGit
29d2320ca3 Add timers. (#485)
* Add Timer and TimerManager.

* Register ITimerManager in the unit tests.

* Replace the event with an action.
2018-01-11 22:10:44 +01:00
Acruid
c992ee4d75 Added a Configuration Directory location to the Resource manager. (#484)
Renamed FindFiles to ContentFindFiles.
2018-01-04 09:08:47 +01:00
Acruid
6247ff4eff Console Rework (#483)
* Extracted the logic from DebugConsole into a new ClientConsole class.

* ClientConsole moved to IoC system.
Verb system replaced with concmds.

* Shared Cleanup

* ClientChatConsole skeleton.

* DebugConsole and LobbyChat are now both subscribed to ClientChatConsole.

* Removed server chat commands.

* cleaned up server command sysyem.

* More chat handling, and aliasing.

* Nightly work on Say command.

* Fixes a bug in Maths.Angle.

* Chat channel colors moved to ClientChatConsole.

* Now Server commands are sent without opening DebugConsole.

* Emotes work.
Clientside chat formatting works.

* Fixed angle unit test.
2018-01-04 00:53:41 +01:00
Acruid
1570ed1242 ClientSession/BaseClient Rework (#482)
* Added BaseClient.
Moved connecting system into BaseClient.

* Added ConnectFailed event to ClientNetManager.
BaseClient properly handles failed connection attempts.

* Session Rework

* Client now knows about other clients that are connected to the server.

* Reconnecting with the client works now.

* Allow Dupe IP.

* Shared PlayerManager shell.

* More session work.

* TWO PEOPLE CAN ACTUALLY CONNECT.

* Added some event functions to BaseClient.

* Basic multiplayer works again.

* Fixed MsgPlayerList buffer overrun.

* Lobby Updates.
Simplified MsgPlayerList, and cleaned up some networking.

* Cleaned up misc dead code.
Added DocComments to IBaseClient and BaseClient.

* Fixes spelling issues and adds more Doc Comments.
2017-12-21 15:30:44 +01:00
Decappi
cc970df3ad removed a bunch of vulnerabilities (#481)
* removed a bunch of vulnerabilities

* removed a bunch of vulnerabilities

* uncommented the code

* reverted .gitignore to its previous state

* fixed the compilation bug

* and again

* Switched to autoproperties everywhere where I could. There are still 3 unsolved vulnerabilities though.
Fixed some defaults not being set.

* Re-added the default value for BlendMode.
2017-12-16 19:08:24 +01:00
Pieter-Jan Briers
b1e3885bbb Fix lighting on MacOS. (#480)
* Fix lighting on MacOS.

* Make ReRender work outside GameScreen.
2017-11-27 08:27:23 -07:00
Pieter-Jan Briers
0f2ab942e1 Fix window resizing. (#479)
Fixes #475
2017-11-17 19:28:42 +01:00
Pieter-Jan Briers
e32e23de5a Fixes bugs with the entity spawn panel. (#477)
ImageButton respects ForegroundColor again, fixing the erase button
color.
ListBox fixed to not crash reliably.

Fixes #476
2017-11-14 10:02:56 -07:00
Pieter-Jan Briers
f1eaf8a268 Re-add GetComponent methods on IUserInterfaceManager. (#473)
* Re-add GetComponent methods on IUserInterfaceManager.

* Add TryGet methods too
2017-11-13 19:28:02 +01:00
Acruid
13d9eacbb7 Removes UiDev testing code from main menu. (#472) 2017-11-05 11:32:20 -08:00
Acruid
da3a865a0a UI Rework (#463)
* Screen now controls children.

* Input works.

* Transitions work.

* Removed IState.cs.

* More MainMenu.cs cleanup.

* Cleaned up options menu code.

* Simple Image now aligns properly.

* Alignment on the main menu works.

* YOU'RE NOT PERFECT

* Oh Boy ListBoxes.

* Screens actually get laid out properly.

* Big Options.

* Done fixing for tonight.

* More Cleaning!

* More cleanup, documentation and moving things to the base Control class.

* Migrating everything to use parent class properties.

* Lobby menu is looking good!

* More State cleanup.

* Give namespaces proper names.

* More namespace work.

* The chatbox position struggle is finally finished!

* Windows kinda work now.

* Scrollable Container work.

* OH GOD the listbox finally works.

* Ingame MainWindow works.

* Move spawn panels into CustomControls.

* TileSpawnPanel pretty much lays out.

* EntitySpawnWindow layout works.

* DebugConsole shows up, but contents do not display.

* Minor cleanup.

* Scrollbars work.

* Focus system should be working now.
Removed old code.

* Focus system should work as you expect now.
GameScreen now controls KeyBindingManager, so you can block movement keys with the UI.

* Text alignment fixed.
OptionsMenu background fixed.

* Mouseover UI scrolling works again.
Listbox dropdown now shrinks to fit contents.
Minor text alignment issues in Textbox fixed.

* Chatbox input alignment fixed.

* ListPanel is a thing now.

* ChatBox work.

* RichTextPanel now wraps lines.

* RTP cleanup.

* Fixes DebugConsole, Tabs, and Chatbox.
2017-11-05 13:04:49 +01:00
Acruid
5e17f2b08f Fixes opening client console crashing server. (#470) 2017-11-02 19:39:50 +01:00
Acruid
c05a0d4d29 Wraps missing member of SFML's Font and Glyph types. (#471)
Wraps SFML.Graphics.Glyph struct, and adds the rest of the SFML.Graphics.Font functions to the existing wrapper.
2017-11-02 11:21:28 -07:00
Pieter-Jan Briers
54aa6f94dd Adds an update event for the content repo. (#469)
* Adds an update event for the content repo.

* Remove debug output
2017-10-29 19:59:54 +01:00
Pieter-Jan Briers
8ce4376a60 Make engine content more clearly separated. (#468)
All prototypes inside the engine are now clearly marked and prefixed with `__engine_`. Also renames all prototypes to be snake_case, and added [engine] to their name.

Also, the content repo can now select which prototype to spawn for humans.
2017-10-29 19:59:46 +01:00
Pieter-Jan Briers
b342d128d2 Move rendering to a proper view matrix system. (#467)
* Some work making the camera less painful.

* More work.

* Ok Views work!
2017-10-29 19:57:46 +01:00
Pieter-Jan Briers
7d94019722 Optimize PlacementManager startup.
This used to take 4% of the startup time.
2017-10-29 19:55:13 +01:00
Pieter-Jan Briers
a9e65b46b8 Improve lighting performance. (#462) 2017-10-24 19:02:03 -06:00
Pieter-Jan Briers
96e3a66e5c Adds an occluder component. Fixes #440 (#461) 2017-10-24 15:15:39 -06:00
nullarmo
bf75212034 Closes #449 (#460) 2017-10-24 17:22:53 +02:00
Matt Smith
f49a106f04 Catch port in use exception (#457)
* Catch port in use exception

Fixes #454

* Improve messaging of port inuse error
2017-10-23 15:41:35 -06:00
Pieter-Jan Briers
37bb98b1f8 Fix setting IsHardCollidable: take 2 (#455)
* Fix UpdateIsHardCollidable.

Probably should've tested that beforehand.

Also optimized collidable removal extremely to not be O(n), by reworking the way they were stored inside the collision manager.

Seriously why would you use a dictionary as a dumb list of key/value pairs. WHY

* band-aid buggy client code

* better idea

* Apparently I forgot to remove this.
2017-10-22 23:47:03 +02:00
Pieter-Jan Briers
3461766659 Allow IsHardCollidable to be set during bump events. (#453) 2017-10-22 20:48:41 +02:00
Pieter-Jan Briers
2e28361a06 Enables bumping (#452) 2017-10-22 19:28:50 +02:00
Pieter-Jan Briers
824d757771 Adds bump event and IsHardCollidable setter (#450)
* Adds bump event and IsHardCollidable setter

* Make ishardcollidable default to true again.

* Fix compile, rename event.
2017-10-22 18:00:15 +02:00
Pieter-Jan Briers
8dc25ed24d Fix crash when disconnecting from server. (#447)
* Fix crash when disconnecting from server.

For some reason the game screen sets all sprites to have a null texture. This caused Sprite's Texture setter to nullref.

* Implement spritebatch.dispose, remove gaussianblur.dispose
2017-10-22 14:05:42 +02:00
Pieter-Jan Briers
d4dfb1abe5 Improves spritecomponent rendering performance. (#444) 2017-10-22 00:13:28 +02:00
Pieter-Jan Briers
bae3141481 Hopefully fix light manager. (#445)
* Hopefully fix light manager.

* Remove debug logging
2017-10-21 22:59:52 +02:00
Pieter-Jan Briers
8a7ea5b6f0 Improves debug mode perf & look (#443)
* Improves debug mode perf & look

Debug mode no langer tanks FPS by caching the used rectangle and text shapes. The LINQ removal probably helped too.

Sprite AABB debug has been removed since sprite AABBs aren't used anymore.

Implemented text shadowing, which is now used by the debug text to make it more readable.

Implemented collidable debug color from prototypes.

* Remove stray comma.
2017-10-21 19:35:21 +02:00
Pieter-Jan Briers
65d74f53e5 Adds an FPS counter. (#438)
It can be toggled by typing "fps" into the console.
2017-10-20 11:40:53 -06:00
Pieter-Jan Briers
3c1bc4ce88 Ok let's not do that fix just yet 2017-10-20 17:11:57 +02:00
Pieter-Jan Briers
a9d06e7612 Sonar code cleanup. 2017-10-20 17:00:19 +02:00
Pieter-Jan Briers
78d5965ba5 Woo late night compiler fighting! 2017-10-20 16:54:00 +02:00
Pieter-Jan Briers
d113938736 Encapsulate SFML to reside completely inside SS14.Client.Graphics. (#437)
* WiP of making SFML encapsulate by Client.Graphics.

* Up to like 40 files changed already!

* My hands are writing words.

* More work.

* Render states

* Client Graphics compiles

* More work

* C# compiler might be bugged

* C# compiler might be bugged

* Rust has ruined me

* It works!
2017-10-20 16:49:00 +02:00
Serkket
92e9d6636d Just a Mesely Sonar Cleanup (#436)
* TODO: Do all the TODOs

Just a sonar "clean up"

* Update1
2017-10-16 22:25:23 +02:00
Acruid
7fb7838738 Lighting Performace Changes (#435)
* Flips the lighting texture in the Shader instead of on the CPU.

* Clearing a RenderImage twice is pointless.
2017-10-13 22:23:23 +02:00
Pieter-Jan Briers
a3a2210de3 Map loading basics. (#434)
* Map loading basics.

Moves the entity saving system into a map loader kinda deal. Doesn't
save grids, but it's a start.

* Fix unit tests
2017-10-09 18:48:25 +02:00
Pieter-Jan Briers
e200cab1fb Box2i additions (#433)
Size property and casts to/from OpenTK.Box2.
2017-10-09 18:41:43 +02:00
Pieter-Jan Briers
92d8ed539a IServerTransformComponent improvements. (#431)
* IServerTransformComponent improvements.

IServerTransformComponent now more closely represents the API in TransformComponent, which was lacking because ITransformComponent is client-side, and the client cannot move entities itself, for example.

* Fix compile error
2017-10-01 22:27:36 -06:00
Pieter-Jan Briers
cb9ca3cc3c Fix network replication on WearableAnimatedSprite (#430) 2017-09-30 16:56:44 +02:00
Ash Walker
1065df5efd Fix string null check (#429) 2017-09-30 16:29:20 +02:00
Pieter-Jan Briers
20012304bd Make VS not modify the sln for buildchecker. (#428)
It was fixing the config because buildchecker had no hints to what the targets were.
2017-09-30 11:59:24 +02:00
Pieter-Jan Briers
349b366143 Fix transform parenting network replication. (#427) 2017-09-30 11:59:18 +02:00
Pieter-Jan Briers
64ea01a960 Crude system for allowing content to override the default mob. (#426)
The HumanMob_Content mob is spawned instead if it's defined.
2017-09-29 18:27:53 +02:00
Pieter-Jan Briers
1ebf093713 Allows creating other components inside Initialize(). (#425) 2017-09-26 23:08:53 +02:00
Pieter-Jan Briers
34fd263625 Fix content netserializer on server (#424)
It was not being included on the server, and type mismatches here are BAD.
2017-09-26 21:56:09 +02:00
Pieter-Jan Briers
a7a8d25a17 Disable type check temporarily. (#423)
It slows down development and has issues that need solving, like solutions to System.Type.
2017-09-26 20:28:44 +02:00
Pieter-Jan Briers
7bf3f70e92 Add more whitelisted types. (#422) 2017-09-25 20:53:15 +02:00
Pieter-Jan Briers
d37cdaf78c Fix sprites fetching transform in OnAdd instead of Initialize. (#421)
This caused a crash race condition.
2017-09-23 22:09:16 +02:00
Pieter-Jan Briers
a88a1ef72d Refactor and clean up containers. (#420)
* Refactor and clean up containers.

Containers are no longer arbitrarily bound to a single component, they use string IDs instead.

The API to interact with containers has been documented with doc comments.

Container creation now uses a static method.

Containers are sealed instead of abstract. Custom logic doesn't go on containers.

Theoretically fixed various bugs:
* Makes container manager creation work, previously it'd nullref.
* Containers being deleted now correctly detaches contained entities.

Still needs unit tests before being merged, because this code is still 100% untested.

* Lots of fixes, unit tests.
2017-09-17 21:43:14 -06:00
Pieter-Jan Briers
7484fe8fba Fix git_helper.py on Python 3.5 (#419)
* Fix git_helper.py on Python 3.5

* Fix it harder

* If at first you don't succeed.
2017-09-16 12:43:46 +02:00
Pieter-Jan Briers
d5fdd9be1f x64 unit test platform target. (#418) 2017-09-15 13:44:43 -06:00
clusterfack
1bb0227ff0 Makes Coordinates more Structy (#417)
More readonly-ish and less write-ish
2017-09-14 17:38:46 -05:00
Pieter-Jan Briers
4c2632710c Fix solution file. (#416)
I n S t A m E r G e
2017-09-14 15:13:59 -06:00
Pieter-Jan Briers
518a366c7e Attempt to fix Python on Travis being too old. (#415)
* Attempt to fix Python on Travis being too old.

* Fix RUN_THIS.py too.

* Fix CI builds blocking.

* Fix BuildChecker.csproj Python versioning in Travis.
2017-09-14 14:47:00 -06:00
clusterfack
07878ad7a7 Multiple Map System (#414)
* The million error march

This commit replaces many of the vector2's with their appropriate version of either LocalCoordinates, WorldCoordinates, or ScreenCoordinates

* Change transforms to send back worldcoordinates for position instead

* Adds coordinate class file

* What the fuck is going onnnnnn

* What the fuck is goign onnnnnnnnnnnn

* Changes some shit to use multiple maps instead
Fixes the compile errors in shared first

* Compile errors mostly fixed, about to rebase

* Merge branch 'master-wizfederation' into multiplemaps

# Conflicts:
#	SS14.Client.Graphics/CluwneLib.cs
#	SS14.Client/GameObjects/ClientEntityManager.cs
#	SS14.Client/GameObjects/Components/Renderable/AnimatedSpriteComponent.cs
#	SS14.Client/GameObjects/Components/Renderable/ItemSpriteComponent.cs
#	SS14.Client/GameObjects/Components/Renderable/ParticleSystemComponent.cs
#	SS14.Client/GameObjects/Components/Renderable/SpriteComponent.cs
#	SS14.Client/GameObjects/Components/Transform/TransformComponent.cs
#	SS14.Client/Interfaces/GameObjects/IClickTargetComponent.cs
#	SS14.Client/Placement/Modes/AlignSimilar.cs
#	SS14.Client/Placement/Modes/AlignSnapgridBorder.cs
#	SS14.Client/Placement/Modes/AlignSnapgridCenter.cs
#	SS14.Client/Placement/Modes/AlignTileAny.cs
#	SS14.Client/Placement/Modes/AlignTileEmpty.cs
#	SS14.Client/Placement/Modes/AlignTileNonSolid.cs
#	SS14.Client/Placement/Modes/AlignTileSolid.cs
#	SS14.Client/Placement/Modes/AlignWall.cs
#	SS14.Client/Placement/PlacementManager.cs
#	SS14.Server/GameObjects/ServerEntityManager.cs
#	SS14.Server/Interfaces/Player/IPlayerManager.cs
#	SS14.Server/Player/PlayerManager.cs

* Whops

* Compiles, loads somewhat, lights nonfunctional, many TODOs left

* serializes states, fixes incorrect spawn

* Fix map sending to the client

* Makes things only render on the correct zlevel

* Makes entity manager wait to intiialize shit after the maps arrive

* Fixes placement net messages

* Improves some of the placement managers, others need a bit of testing and tidying up again

* Transform fix

* Polishing, make coordinates into structs

* Remove resolved comments

* Last commit before master merge

* Fix the rest of the conflicts

* Fixes super spooky bug

* Fixes cross zlevel collisions

* Fix the rendering system to render the tile system regardless of grid location
2017-09-14 07:37:31 -06:00
Acruid
a483c8c88a Sprite Clicking Rework (#413)
* Fixed AnimatedSpriteComponent clicking, SpriteComponent is still bugged.

* Added Box2.Scale helper function.
Cleaned up the WasClicked function in AnimatedSpriteComponent.

* Renamed AABB to LocalAABB in ISpriteComponent and IRenderableComponent, so it is clearer what the property contains.
Fixed more bugs in AnimatedSpriteComponent.WasClicked(), and added exceptions.

* Fixed SpriteComponent.WasClicked().
Fixed unrelated bug in EntityManager, so entities can be properly deleted again.

* Fixed issue with sprite sorting using TextRect instead of LocalAABB.
2017-09-13 07:18:35 -06:00
Dumplin
cd74d12812 Fixed Movement; Edited OSX error message; Fixed some Sonar complaints (#410)
* * CluwneLib.cs: Make _window a local variable

* BaseCollection.cs: Formatting issue

* BaseServer.cs: Removed unused parameter

* ChatManager.cs: Made public encapsulated fields

* BoundKeyEventArgs.cs: Public encapsulated parameters

* CVarFlags.cs: Explicit variable setting

* ComponentFactory.cs: unused variable

* * CluwneLib.cs: Make _window a local variable

* BaseCollection.cs: Formatting issue

* BaseServer.cs: Removed unused parameter

* ChatManager.cs: Made public encapsulated fields

* BoundKeyEventArgs.cs: Public encapsulated parameters

* CVarFlags.cs: Explicit variable setting

* ComponentFactory.cs: unused variable

* CVar fixes

* Edited the OSX error message to be a little more helpful. (You have to edit the .dylibs because they come broken).

* Fixing the sprite movement problem

* Reverted error message

* Revert Again
2017-09-11 09:43:21 -06:00
Pieter-Jan Briers
eda5ad606b Make Sonar only run on master. (#409) 2017-09-06 22:59:30 -06:00
Pieter-Jan Briers
ddefef65ae Add our own Vector2 type. (#407)
* Add our own Vector2 type.

* Fix Clamp() typo.

* I shouldn't code when tired.

* Some unit tests.
2017-09-05 17:12:14 -06:00
Pieter-Jan Briers
062db741bd Update Mac Natives error message. (#406)
Now looks for 2.4 instead of 2.2 and suggests simply copying files instead of doing complicated InstallNameGuiTool stuff.
2017-09-05 17:11:21 -06:00
Pieter-Jan Briers
d46c2da175 Adds x64 platform targets. (#405)
Note that these won't work on Windows as that's still x86 SFML natives.
2017-09-02 21:51:08 -06:00
Acruid
1c6200666f Texture Loading Performance (#404)
* ~20% speed increase for loading textures.

* clickmap was useless, it is completely removed.
2017-09-01 14:39:40 -06:00
Acruid
c9666413b2 CluwneLib Static Variables Removal (#403)
* Changed Cluwnelib.TileSize name to CluwneLib.PixelsPerMeter. I think its more descriptive of what the name is.
Removed the splash screen debug #ifdef's, and replaced with proper ConditionalAttributes.

* Window encapsulated.

* Add the RELEASE compilation symbol to Release builds of all SS14 projects.

* More CluwneLib cleanup.
2017-09-01 14:39:27 -06:00
Pieter-Jan Briers
2575786a6e Allow deletion of entities and components during iteration. (#401)
* Allow deletion of entities and components during iteration.

* Remove some cases of _entities.Values
2017-09-01 14:07:00 -06:00
Acruid
149a6280b0 Move Lighting to SS14.Client.Graphics (#400)
* Interface to Interfaces.

* Lighting moved to SS14.Client.Graphics.

* Remove more dead code.
2017-08-31 08:21:14 -06:00
clusterfack
340d75c350 Fixes Bounding/Clicking Bugs (#396)
* Fixes Bounding/Clicking Bugs

This fixes a number of bugs with the clicking system.

- Wearable animated components were fixed so that they properly report their AABB
- Wearable animated components were fixed so that they properly use their nonwornsprite or wornsprite for checkclicking
- Fixes the clicking system only choosing the player character
- Fixes the eraser only working within a 1.5 tile range

* Uses FloatMath.CloseTo()
2017-08-29 12:03:09 -06:00
clusterfack
8d9a0e5142 Creates a Snap Checking System (#389)
* Creates a Snap Checking System

Creates a system that attempts to sanitize placement of objects when attempting to spawn them on snapping grids. This checks whether an object is trying to spawn specifically on a snap grid, and if it is checks against a snapflag of the type to see if other exclusive snappable objects are on that snap grid point.

Separates the spawnentityat into tryspawnentityat which checks for snappables, and forcespawnentityat which completely ignores that.

* Fixes the yaml placement
Fixes exemption from tryspawnentityat which didn't use the bool
Snap placement managers show when canspawnat is preventing them from spawning

* Improve snap placement managers again
Fix using prototype.name instead of prototype.ID

* Nope nope

* I need to unify these two types after the next refactor

* Move to strings for snap flags.

* Check

* 「s h i t c o d e」

* Gracias appveyor now I have seen the light

* Uses FloatMath.CloseTo() to check float equality
2017-08-29 12:01:44 -06:00
clusterfack
22f0cbd8f7 Changes CloseTo again slightly (#399) 2017-08-29 07:33:17 -06:00
clusterfack
5d443b6452 Adds closeto function for checking floating point equality (#398) 2017-08-28 18:28:33 -06:00
Acruid
83f8f37dc1 Prototypes now use ResourceManager. (#394)
* "./Resources/" folder is now mounted instead of "./" in the ResourceManager.
Prototypes now use the ResourceManager.
Added FindFiles(string path) to recursively find files in the ResourceManager.
General FileHelper bug fixing and cleanup.

* Ran SS14.Shared/ContentPack* through the code cleanup again.

* Put PJB's comma back in.
2017-08-28 17:10:15 -06:00
UristMcDorf
cc886ab614 Add required registrations in whitelist for temperature, damageable, destructible. (#393) 2017-08-28 14:21:30 +02:00
clusterfack
4273266950 Adds rendering color parameter to sprite components (#388)
* Adds rendering color parameter to sprite components

* Forgot to remove this

* Sets default value to white

* Like this you mean?
2017-08-27 10:02:11 -06:00
Acruid
658a0aee7f Entity Component Shutdown Fix. (#387)
Moved various component cleanup code from OnRemove to Shutdown.
2017-08-27 09:58:04 -06:00
Acruid
9898c2cf49 Turns INetSerializableType into NetSerializableAttribute (#386)
Turns INetSerializableType into NetSerializableAttribute.
2017-08-26 22:16:27 -06:00
Acruid
ddb5d9f3a8 NetGrapher Cleanup (#385)
Fixed bug in NetManager.
2017-08-26 22:15:36 -06:00
clusterfack
f227b3abc0 Adds grid to snap grid placement manager (#384)
* Adds grid to snap grid placement manager
Fixes drawline

* Done
2017-08-26 19:21:02 +02:00
Acruid
3920da2d9f Fixes moonwalk bug and inverted up/down controls. (#380) 2017-08-26 19:20:56 +02:00
clusterfack
bfbb31aa58 Snapgrid placement (#377)
* Snapgrid placement

* REEEEEEEEEEEE world space
2017-08-26 09:33:41 +02:00
clusterfack
799be40018 Fixes scrollable containers (#381) 2017-08-26 09:33:33 +02:00
wixoaGit
152eb8dd19 Ignore outdated state update messages (#383) 2017-08-26 09:33:23 +02:00
wixoaGit
c168c0fde1 Move client GameState management (#375)
* Move client GameState management

* Remove unnecessary sequence sending

* Move resolves to dependencies, set CurrentState instead of finding it
2017-08-25 21:21:14 +02:00
clusterfack
af3c90e2a8 Removes bad shutdown (#376)
* Undoes this

* Move it to the entity manager shutdown
2017-08-25 21:20:32 +02:00
clusterfack
12e6ef88c3 Makes Walls Entities, removes tile walls (#373)
* Makes walls into entities

* Fix the align tile empty placement mode, holy shit collision bounds is fucked

* Make shadowcasting from walls work again

* Fix lights on tiles
2017-08-24 09:38:28 -06:00
clusterfack
28d74cec56 Shifts down the mobs bounding box by 0.6 tiles. (#374) 2017-08-24 14:40:28 +02:00
Pieter-Jan Briers
02efd0b41a Made the git hooks history tolerant. (#372)
If its python file doesn't exist the hooks don't run.
2017-08-23 17:13:43 -05:00
Pieter-Jan Briers
5bf337479f Fix UnknowPrototypeException typo. (#371) 2017-08-23 16:02:36 -05:00
clusterfack
3816cdb3e4 Tiles Helper Functions (#370)
* Creates a helper function for making tile indices into tile refs, and a function to get a tileref one step in any particular direction of another tileref.

* Gottem

* k
2017-08-23 11:08:42 +02:00
Pieter-Jan Briers
e54339bb5c Make null data nodes on prototypes not call LoadData() on spawned entities. (#368) 2017-08-23 07:53:31 +02:00
Pieter-Jan Briers
98d867393c Update NUnit package version. (#367)
* Update NUnit package version.

* Let's not have Travis blow up.

* And I still messed the HintPath up.
2017-08-23 07:53:16 +02:00
Pieter-Jan Briers
8dd9a3c097 Content prefixes for the reflection manager. (#369)
Allows doing class: Prototypes.DiscoBall instead of Content.Client.Prototypes.DiscoBall
2017-08-23 07:53:04 +02:00
Pieter-Jan Briers
61d30be6b3 Lighting API cleanup. (#366) 2017-08-22 07:59:13 -06:00
Pieter-Jan Briers
7aa85c0b0c ColorUtils extensions, fixes and tests. (#365)
* Color4 extensions for byte color parts, fix WithAlpha with byte.

* Unit tests and bug fix for FromHex.
2017-08-22 07:38:29 -06:00
Pieter-Jan Briers
3574395843 Fix the entity spawn panel throwing NotImplementedException, Color -> Color4 (#364)
* Fix the entity spawn panel throwing NotImplementedException.

* More rabbit hole Color conversions.
2017-08-22 07:37:04 -06:00
Pieter-Jan Briers
13b333dcf6 Fix entity initialization. (#363) 2017-08-21 15:37:04 -06:00
Pieter-Jan Briers
bead08fc7c Fix prototype class inheritance. (#362) 2017-08-21 15:36:34 -06:00
Pieter-Jan Briers
073fb20b66 Adds a per-frame virtual entity update method. (#361) 2017-08-20 19:39:42 -06:00
Pieter-Jan Briers
7adca8280c Remove some IComponent type bounds, component shutdown event. (#360)
* Remove some IComponent type bounds, component shutdown event.

Methods like GetComponent<T> don't require T to implement IComponent anymore.

Added an event to IComponent that is invoked whenever the component is shut down.

* Always at least compile your stuff kids.
2017-08-20 19:38:20 -06:00
Gilles Coremans
61183eaba3 Fixes a sonar bug. (#359) 2017-08-20 19:37:08 -06:00
wixoaGit
477b0460e8 Implement MsgEntity (#358)
* Implement MsgEntity

* Move MsgEntity registration to GameController

* Fix serializer usage
2017-08-20 19:36:33 -06:00
Pieter-Jan Briers
dd18105c92 Remove SFML from shared and server. (#355)
* Remove SFML from shared and server.

* Fix unit tests.
2017-08-20 11:07:35 -06:00
Silver
585f2467c2 Update Linux Readme (#357) 2017-08-19 23:13:12 -06:00
Pieter-Jan Briers
0c3e4ea495 Allows inputting the server port on the client. (#354) 2017-08-19 20:19:00 -06:00
Pieter-Jan Briers
afe0c95cea Fix a race condition in collidablecomponent.OnAdd (#353) 2017-08-19 20:17:11 -06:00
PJB3005
e84f072278 Update submodule to hopefully disable SFML Sonar. 2017-08-19 13:55:31 +02:00
PJB3005
ca0bbab8c0 Attempt two. 2017-08-19 13:43:46 +02:00
PJB3005
6530b8806c Attempt to ignore SFML on Sonar 2017-08-19 13:35:57 +02:00
Pieter-Jan Briers
294057e3a1 Fix resource copying on the client. (#352) 2017-08-19 11:10:55 +02:00
Pieter-Jan Briers
a57abb2ca7 Move to our own SFML.NET fork with a submodule. (#351)
* Remove SFML binaries in repo.

* Add SFML.NET submodule from our fork.

* Get build checker for submodule handling.

* Fix project references. Remove SFML from non-client.

* Make it work!

* Automatically fetch Windows CSFML natives.

* Fix project file now I'm done debugging.

* Fix project references.

* Fix CI

* Now if only I didn't typo...

* Fix Travis too

* Fix lighting.

* Move shaders over to new API.

* Fix some obsoletions.

* Improve SetUniformArray casts
2017-08-19 10:28:39 +02:00
1469 changed files with 89705 additions and 51621 deletions

View File

@@ -10,19 +10,49 @@ pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2017
clone_depth: 10
install:
- ps: if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { cinst msbuild-sonarqube-runner }
- ps: >
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER -And $env:APPVEYOR_REPO_BRANCH -Eq "master")
{
cinst msbuild-sonarqube-runner;
}
before_build:
- cmd: py -3.5 Resources\buildResourcePack.py --resources-dir .\Resources --out .\Resources\ResourcePack.zip --atlas-tool .\Tools\AtlasTool.exe --no-animations --to-stderr
- cmd: nuget restore SpaceStation14.sln
- ps: if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { MSBuild.SonarQube.Runner.exe begin /k:"ss14" /d:"sonar.host.url=https://sonarqube.com" /d:"sonar.login=$env:sonarqubekey" /d:"sonar.organization=space-wizards" }
- 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 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" /o:"space-wizards" /d:"sonar.exclusions=SFML/**" /d:sonar.cs.nunit.reportsPaths="$(Get-Location)\nunitTestResult.xml";
}
platform: x64
configuration: Debug
cache:
- packages -> **\packages.config
- Dependencies
- Robust.Client.Godot\.mono\assemblies\GodotSharp.dll
- Robust.Client.Godot\.mono\assemblies\LAST_MODIFIED
build:
project: SpaceStation14.sln
parallel: true
project: RobustToolbox.sln
parallel: false
verbosity: minimal
after_build:
- ps: if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER) { MSBuild.SonarQube.Runner.exe end /d:"sonar.login=$env:sonarqubekey" }
build_script:
- 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: nunit3-console.exe .\bin\UnitTesting\Robust.UnitTesting.dll;
after_test:
- ps: >
if (-Not $env:APPVEYOR_PULL_REQUEST_NUMBER -And $env:APPVEYOR_REPO_BRANCH -Eq "master")
{
SonarScanner.MSBuild.exe end /d:"sonar.login=$env:sonarqubekey";
}

View File

@@ -9,3 +9,6 @@ charset = utf-8-bom
[*.{csproj,xml,yml,dll.config,targets}]
indent_size = 2
[*.gdsl]
indent_style = tab

2
.github/CODEOWNERS vendored
View File

@@ -3,7 +3,7 @@
# These owners will be the default owners for everything in the repo.
# * @defunkt
* @PJB3005 @Silvertorch5
* @Acruid @PJB3005 @Silvertorch5
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners

13
.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
@@ -79,3 +82,13 @@ NetSerializerDebug.dll
# We're not gonna ship Mac extlibs with the repo due to size. (11 MB)
Third-Party/extlibs/Mac/
# Or the automatically-fetched Windows natives, for that matter.
Third-Party/extlibs/Windows/
# Actually I'll make this folder because SS14.Shared.Bsdiff isn't third-party is it?
Dependencies/
# Python stuff
__pycache__
.mypy_cache

View File

@@ -5,17 +5,37 @@ sudo: false
os:
- linux
- osx
#- osx
before_install:
- if [ $TRAVIS_OS_NAME = osx ]; then brew update && brew install python3; fi
addons:
apt:
#sources:
#- deadsnakes
packages:
- python3.5
- python3-pip
cache:
directories:
- packages/
- Dependencies/
- Robust.Client.Godot/.mono/assemblies/
#before_install:
# - if [ $TRAVIS_OS_NAME = osx ]; then brew update && brew upgrade python; fi
before_script:
- "nuget restore SpaceStation14.sln"
#- "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:
- "python3 ./Resources/buildResourcePack.py --resources-dir ./Resources --out ./Resources/ResourcePack.zip --no-atlas --no-animations --to-stderr"
- "msbuild /p:Configuration=Release /p:HEADLESS=1 /nologo /m /p:AllowMissingMacNatives=yes SpaceStation14.sln"
- "cd packages/NUnit.ConsoleRunner.3.6.1/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"

1
BuildChecker/.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
INSTALLED_HOOKS_VERSION

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
This is a dummy .csproj file to check things like submodules.
Better this than other errors.
If you want to create this kind of file yourself, you have to create an empty .NET application,
Then strip it of everything until you have the <Project> tags.
VS refuses to load the project if you make a bare project file and use Add -> Existing Project... for some reason.
You want to handle the Build, Clean and Rebuild tasks to prevent missing task errors on build.
If you want to learn more about these kinds of things, check out Microsoft's official documentation about MSBuild:
https://docs.microsoft.com/en-us/visualstudio/msbuild/msbuild
-->
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Choose>
<When Condition="'$(Python)' == ''">
<PropertyGroup>
<Python>python3</Python>
<Python Condition="'$(OS)'=='Windows_NT' Or '$(OS)'=='Windows'">py -3</Python>
</PropertyGroup>
</When>
</Choose>
<PropertyGroup>
<ProjectGuid>{D0DA124B-5580-4345-A02B-9F051F78915F}</ProjectGuid>
<OutputType>Library</OutputType>
<TargetFrameworkMoniker>.NETFramework, Version=v4.6.1</TargetFrameworkMoniker>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' " />
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' " />
<PropertyGroup>
<StartupObject />
</PropertyGroup>
<Target Name="Build">
<Exec Command="$(Python) git_helper.py" CustomErrorRegularExpression="^Error" />
</Target>
<Target Name="Rebuild" DependsOnTargets="Build" />
<Target Name="Clean">
<Message Importance="low" Text="Ignoring 'Clean' target." />
</Target>
<Target Name="Compile" />
<Target Name="CoreCompile" />
</Project>

105
BuildChecker/git_helper.py Executable file
View File

@@ -0,0 +1,105 @@
#!/usr/bin/env python3
# Installs git hooks, updates them, updates submodules, that kind of thing.
import subprocess
import sys
import os
import shutil
from pathlib import Path
from typing import List
BUILD_CHECKER_PATH = Path(Path(__file__).resolve().parent)
SS14_ROOT_PATH = Path(BUILD_CHECKER_PATH.parent)
SOLUTION_PATH = Path(SS14_ROOT_PATH/"SpaceStation14.sln")
CURRENT_HOOKS_VERSION = "2" # If this doesn't match the saved version we overwrite them all.
QUIET = "--quiet" in sys.argv
NO_HOOKS = "--nohooks" in sys.argv
def run_command(command: List[str], capture: bool = False) -> subprocess.CompletedProcess:
"""
Runs a command with pretty output.
"""
text = ' '.join(command)
if not QUIET:
print("$ {}".format(text))
sys.stdout.flush()
completed = None
if capture:
completed = subprocess.run(command, cwd=str(SS14_ROOT_PATH), stdout=subprocess.PIPE)
else:
completed = subprocess.run(command, cwd=str(SS14_ROOT_PATH))
if completed.returncode != 0:
raise RuntimeError("Error: command exited with code {}!".format(completed.returncode))
return completed
def update_submodules():
"""
Updates all submodules.
"""
status = run_command(["git", "submodule", "update", "--init", "--recursive"], capture=True)
if status.stdout.decode().strip():
print("Git submodules changed. Reloading solution.")
reset_solution()
def install_hooks():
"""
Installs the necessary git hooks into .git/hooks.
"""
# Read version file.
hooks_version_file = BUILD_CHECKER_PATH/"INSTALLED_HOOKS_VERSION"
if os.path.isfile(str(hooks_version_file)):
with open(str(hooks_version_file), "r") as f:
if f.read() == CURRENT_HOOKS_VERSION:
if not QUIET:
print("No hooks change detected.")
return
with open(str(hooks_version_file), "w") as f:
f.write(CURRENT_HOOKS_VERSION)
print("Hooks need updating.")
hooks_target_dir = SS14_ROOT_PATH/".git"/"hooks"
hooks_source_dir = BUILD_CHECKER_PATH/"hooks"
if not os.path.exists(str(hooks_target_dir)):
os.makedirs(str(hooks_target_dir))
# Clear entire tree since we need to kill deleted files too.
for filename in os.listdir(str(hooks_target_dir)):
os.remove(str(hooks_target_dir/filename))
for filename in os.listdir(str(hooks_source_dir)):
print("Copying hook {}".format(filename))
shutil.copyfile(str(hooks_source_dir/filename), str(hooks_target_dir/filename))
def reset_solution():
"""
Force VS to think the solution has been changed to prompt the user to reload it,
thus fixing any load errors.
"""
with SOLUTION_PATH.open("r") as f:
content = f.read()
with SOLUTION_PATH.open("w") as f:
f.write(content)
def main():
if not NO_HOOKS:
install_hooks()
update_submodules()
if __name__ == '__main__':
main()

View File

@@ -0,0 +1,19 @@
#!/bin/bash
gitroot=`git rev-parse --show-toplevel`
cd "$gitroot/BuildChecker"
if [ -f "git_helper.py" ]
then
if [[ `uname` == MINGW* || `uname` == CYGWIN* ]]; then
# Windows
# Can't update hooks from here because we are a hook,
# and the file is read only while it's used.
# Thanks Windows.
py -3 git_helper.py --quiet --nohooks
else
# Not Windows, so probably some other Unix thing.
python3 git_helper.py --quiet
fi
fi

View File

@@ -0,0 +1,5 @@
#!/bin/bash
# Just call post-checkout since it does the same thing.
gitroot=`git rev-parse --show-toplevel`
bash "$gitroot/.git/hooks/post-checkout"

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

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<PropertyGroup>
<ProjectType>Local</ProjectType>
@@ -6,72 +6,71 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{59250BAF-0000-0000-0000-000000000000}</ProjectGuid>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<ApplicationIcon>
</ApplicationIcon>
<AssemblyKeyContainerName>
</AssemblyKeyContainerName>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ApplicationIcon />
<AssemblyKeyContainerName />
<AssemblyName>Lidgren.Network</AssemblyName>
<DefaultClientScript>JScript</DefaultClientScript>
<DefaultHTMLPageLayout>Grid</DefaultHTMLPageLayout>
<DefaultTargetSchema>IE50</DefaultTargetSchema>
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7.1</TargetFrameworkVersion>
<OutputType>Library</OutputType>
<AppDesignerFolder>
</AppDesignerFolder>
<AppDesignerFolder />
<RootNamespace>Lidgren.Network</RootNamespace>
<StartupObject>
</StartupObject>
<StartArguments>
</StartArguments>
<FileUpgradeFlags>
</FileUpgradeFlags>
<StartupObject />
<StartArguments />
<FileUpgradeFlags />
<ConfigurationOverrideFile />
<TargetFrameworkProfile />
<DocumentationFile />
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<FileAlignment>4096</FileAlignment>
<OutputPath>..\bin\Lidgren\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<NoStdLib>False</NoStdLib>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>True</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<DebugType Condition="'$(AppVeyor)' != 'yes'">portable</DebugType>
<DebugType Condition="'$(AppVeyor)' == 'yes'">full</DebugType>
<Optimize>False</Optimize>
<OutputPath>$(SolutionDir)bin\Lidgren\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoStdLib>False</NoStdLib>
<NoWarn>
</NoWarn>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
<BaseAddress>285212672</BaseAddress>
<CheckForOverflowUnderflow>False</CheckForOverflowUnderflow>
<ConfigurationOverrideFile>
</ConfigurationOverrideFile>
<DefineConstants>TRACE</DefineConstants>
<DocumentationFile>
</DocumentationFile>
<DebugSymbols>False</DebugSymbols>
<FileAlignment>4096</FileAlignment>
<Optimize>True</Optimize>
<OutputPath>$(SolutionDir)bin\Lidgren\</OutputPath>
<RegisterForComInterop>False</RegisterForComInterop>
<RemoveIntegerChecks>False</RemoveIntegerChecks>
<TreatWarningsAsErrors>False</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<NoStdLib>False</NoStdLib>
<NoWarn>
</NoWarn>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<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>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
<DefineConstants>TRACE</DefineConstants>
<DebugSymbols>False</DebugSymbols>
<Optimize>True</Optimize>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>True</DebugSymbols>
<DebugType Condition="'$(AppVeyor)' != 'yes'">portable</DebugType>
<DebugType Condition="'$(AppVeyor)' == 'yes'">full</DebugType>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<DebugSymbols>False</DebugSymbols>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.CSharp">
@@ -292,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;
@@ -252,9 +258,20 @@ namespace Lidgren.Network
}
if (m_messageReceivedEvent != null)
{
m_messageReceivedEvent.Set();
m_messageReceivedEvent.Close();
m_messageReceivedEvent = null;
try
{
m_messageReceivedEvent.Set();
m_messageReceivedEvent.Close();
}
catch (ObjectDisposedException)
{
// For some reason, inside Godot this seems to throw ObjectDisposedExceptions on client shutdown.
// If it's already disposed then I guess this is fine?
}
finally
{
m_messageReceivedEvent = null;
}
}
}
finally

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)
{
@@ -263,7 +310,7 @@ namespace Lidgren.Network
}
return new string(c);
}
/// <summary>
/// Gets the local broadcast address
/// </summary>
@@ -275,7 +322,7 @@ namespace Lidgren.Network
if (wifi.IsWifiEnabled)
{
var dhcp = wifi.DhcpInfo;
int broadcast = (dhcp.IpAddress & dhcp.Netmask) | ~dhcp.Netmask;
byte[] quads = new byte[4];
for (int k = 0; k < 4; k++)
@@ -289,7 +336,7 @@ namespace Lidgren.Network
{
return IPAddress.Broadcast;
}
#endif
#endif
#if IS_FULL_NET_AVAILABLE
try
{
@@ -298,7 +345,7 @@ namespace Lidgren.Network
{
return null;
}
IPInterfaceProperties properties = ni.GetIPProperties();
foreach (UnicastIPAddressInformation unicastAddress in properties.UnicastAddresses)
{
@@ -307,24 +354,24 @@ namespace Lidgren.Network
var mask = unicastAddress.IPv4Mask;
byte[] ipAdressBytes = unicastAddress.Address.GetAddressBytes();
byte[] subnetMaskBytes = mask.GetAddressBytes();
if (ipAdressBytes.Length != subnetMaskBytes.Length)
throw new ArgumentException("Lengths of IP address and subnet mask do not match.");
byte[] broadcastAddress = new byte[ipAdressBytes.Length];
for (int i = 0; i < broadcastAddress.Length; i++)
{
broadcastAddress[i] = (byte)(ipAdressBytes[i] | (subnetMaskBytes[i] ^ 255));
}
return new IPAddress(broadcastAddress);
return new IPAddress(broadcastAddress);
}
}
}
catch // Catch any errors
catch // Catch any errors
{
return IPAddress.Broadcast;
}
#endif
#endif
return IPAddress.Broadcast;
}
@@ -340,21 +387,21 @@ namespace Lidgren.Network
Android.Net.Wifi.WifiManager wifi = (Android.Net.Wifi.WifiManager)Android.App.Application.Context.GetSystemService(Android.App.Activity.WifiService);
if (!wifi.IsWifiEnabled) return null;
var dhcp = wifi.DhcpInfo;
int addr = dhcp.IpAddress;
byte[] quads = new byte[4];
for (int k = 0; k < 4; k++)
{
quads[k] = (byte) ((addr >> k * 8) & 0xFF);
}
}
return new IPAddress(quads);
}
catch // Catch Access Denied errors
{
return null;
}
#endif
#endif
#if IS_FULL_NET_AVAILABLE
NetworkInterface ni = GetNetworkInterface();
if (ni == null)
@@ -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);
@@ -577,4 +629,4 @@ namespace Lidgren.Network
return bdr.ToString();
}
}
}
}

View File

@@ -0,0 +1,20 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
<!-- Adds to the DefineConstants to provide things such as platform-specific defines. -->
<Choose>
<When Condition="'$(TargetOS)' == 'Windows'">
<PropertyGroup>
<DefineConstants>$(DefineConstants);WINDOWS</DefineConstants>
</PropertyGroup>
</When>
<When Condition="'$(TargetOS)' == 'MacOS'" >
<PropertyGroup>
<DefineConstants>$(DefineConstants);MACOS;UNIX</DefineConstants>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<DefineConstants>$(DefineConstants);LINUX;UNIX</DefineConstants>
</PropertyGroup>
</Otherwise>
</Choose>
</Project>

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

@@ -23,5 +23,7 @@
</Choose>
<PropertyGroup>
<TargetOS Condition="'$(TargetOS)' == ''">$(ActualOS)</TargetOS>
<Python>python3</Python>
<Python Condition="'$(ActualOS)' == 'Windows'">py -3</Python>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,11 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Common target to copy content assemblies to the parent projects. -->
<Target Name="CopyContentAssemblies">
<Copy SourceFiles="@(ContentAssemblies)" DestinationFolder="$(ContentAssemblyTarget)" />
</Target>
<ItemDefinitionGroup>
<ContentAssemblies>
<Visible>False</Visible>
</ContentAssemblies>
</ItemDefinitionGroup>
</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>

41
RUN_THIS.py Executable file
View File

@@ -0,0 +1,41 @@
#!/usr/bin/env python3
# Import future so people on py2 still get the clear error that they need to upgrade.
from __future__ import print_function
import os
import sys
import traceback
VERSION = sys.version_info
NO_PROMPT = "--no-prompt" in sys.argv
sane_input = raw_input if VERSION.major < 3 else input
def main():
if VERSION.major < 3 or (VERSION.major == 3 and VERSION.minor < 5):
print("ERROR: You need at least Python 3.5 to build SS14.")
# Need "press enter to exit" stuff because Windows just immediately closes conhost.
if not NO_PROMPT:
sane_input("Press enter to exit...")
exit(1)
# Import git_helper by modifying the path.
ss14_dir = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(ss14_dir, "BuildChecker"))
try:
import git_helper
git_helper.main()
except Exception as e:
print("ERROR:")
traceback.print_exc()
print("This was NOT intentional. If the error is not immediately obvious, ask on Discord or IRC for help.")
if not NO_PROMPT:
sane_input("Press enter to exit...")
exit(1)
if __name__ == "__main__":
main()
if not NO_PROMPT:
sane_input("Success! Press enter to exit...")

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

Binary file not shown.

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ParticleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Sprite>star1</Sprite>
<EmitterPosition>
<X>358</X>
<Y>385</Y>
</EmitterPosition>
<EmissionOffset>
<X>0</X>
<Y>0</Y>
</EmissionOffset>
<EmitRate>30</EmitRate>
<MaximumParticleCount>200</MaximumParticleCount>
<EmissionRadiusRange>
<X>5</X>
<Y>20</Y>
</EmissionRadiusRange>
<Velocity>
<X>0</X>
<Y>0</Y>
</Velocity>
<VelocityVariance>0</VelocityVariance>
<Acceleration>
<X>0</X>
<Y>1.5</Y>
</Acceleration>
<AccelerationVariance>0</AccelerationVariance>
<RadialVelocity>10</RadialVelocity>
<RadialVelocityVariance>0</RadialVelocityVariance>
<RadialAcceleration>-1.25</RadialAcceleration>
<RadialAccelerationVariance>0</RadialAccelerationVariance>
<TangentialVelocity>0</TangentialVelocity>
<TangentialVelocityVariance>0</TangentialVelocityVariance>
<TangentialAcceleration>0</TangentialAcceleration>
<TangentialAccelerationVariance>0</TangentialAccelerationVariance>
<Lifetime>10</Lifetime>
<LifetimeVariance>2</LifetimeVariance>
<SpinVelocity>
<X>0</X>
<Y>0</Y>
</SpinVelocity>
<SpinVelocityVariance>0</SpinVelocityVariance>
<SizeRange>
<X>0.1</X>
<Y>0.05</Y>
</SizeRange>
<SizeVariance>0.05</SizeVariance>
<ColorRange>
<Start>
<A>255</A>
<R>113</R>
<G>199</G>
<B>255</B>
</Start>
<End>
<A>80</A>
<R>103</R>
<G>180</G>
<B>255</B>
</End>
</ColorRange>
<ColorVariance>0</ColorVariance>
</ParticleSettings>

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ParticleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Sprite>star1</Sprite>
<EmitterPosition>
<X>358</X>
<Y>385</Y>
</EmitterPosition>
<EmissionOffset>
<X>0</X>
<Y>0</Y>
</EmissionOffset>
<EmitRate>30</EmitRate>
<MaximumParticleCount>200</MaximumParticleCount>
<EmissionRadiusRange>
<X>5</X>
<Y>20</Y>
</EmissionRadiusRange>
<Velocity>
<X>0</X>
<Y>0</Y>
</Velocity>
<VelocityVariance>0</VelocityVariance>
<Acceleration>
<X>0</X>
<Y>1.5</Y>
</Acceleration>
<AccelerationVariance>0</AccelerationVariance>
<RadialVelocity>10</RadialVelocity>
<RadialVelocityVariance>0</RadialVelocityVariance>
<RadialAcceleration>-1.25</RadialAcceleration>
<RadialAccelerationVariance>0</RadialAccelerationVariance>
<TangentialVelocity>0</TangentialVelocity>
<TangentialVelocityVariance>0</TangentialVelocityVariance>
<TangentialAcceleration>0</TangentialAcceleration>
<TangentialAccelerationVariance>0</TangentialAccelerationVariance>
<Lifetime>10</Lifetime>
<LifetimeVariance>2</LifetimeVariance>
<SpinVelocity>
<X>0</X>
<Y>0</Y>
</SpinVelocity>
<SpinVelocityVariance>0</SpinVelocityVariance>
<SizeRange>
<X>0.1</X>
<Y>0.05</Y>
</SizeRange>
<SizeVariance>0.05</SizeVariance>
<ColorRange>
<Start>
<A>255</A>
<R>228</R>
<G>26</G>
<B>199</B>
</Start>
<End>
<A>30</A>
<R>223</R>
<G>31</G>
<B>212</B>
</End>
</ColorRange>
<ColorVariance>0</ColorVariance>
</ParticleSettings>

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ParticleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Sprite>smoke</Sprite>
<EmitterPosition>
<X>358</X>
<Y>385</Y>
</EmitterPosition>
<EmissionOffset>
<X>0</X>
<Y>0</Y>
</EmissionOffset>
<EmitRate>11</EmitRate>
<MaximumParticleCount>200</MaximumParticleCount>
<EmissionRadiusRange>
<X>0</X>
<Y>0</Y>
</EmissionRadiusRange>
<Velocity>
<X>0</X>
<Y>-0</Y>
</Velocity>
<VelocityVariance>0</VelocityVariance>
<Acceleration>
<X>0</X>
<Y>-13</Y>
</Acceleration>
<AccelerationVariance>3</AccelerationVariance>
<RadialVelocity>0</RadialVelocity>
<RadialVelocityVariance>0</RadialVelocityVariance>
<RadialAcceleration>0</RadialAcceleration>
<RadialAccelerationVariance>0</RadialAccelerationVariance>
<TangentialVelocity>0</TangentialVelocity>
<TangentialVelocityVariance>0</TangentialVelocityVariance>
<TangentialAcceleration>0</TangentialAcceleration>
<TangentialAccelerationVariance>0</TangentialAccelerationVariance>
<Lifetime>3</Lifetime>
<LifetimeVariance>0</LifetimeVariance>
<SpinVelocity>
<X>0</X>
<Y>0</Y>
</SpinVelocity>
<SpinVelocityVariance>0.3</SpinVelocityVariance>
<SizeRange>
<X>0</X>
<Y>1</Y>
</SizeRange>
<SizeVariance>0</SizeVariance>
<ColorRange>
<Start>
<A>208</A>
<R>128</R>
<G>128</G>
<B>128</B>
</Start>
<End>
<A>0</A>
<R>48</R>
<G>48</G>
<B>48</B>
</End>
</ColorRange>
<ColorVariance>0</ColorVariance>
</ParticleSettings>

View File

@@ -1,63 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<ParticleSettings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Sprite>star1</Sprite>
<EmitterPosition>
<X>358</X>
<Y>385</Y>
</EmitterPosition>
<EmissionOffset>
<X>0</X>
<Y>0</Y>
</EmissionOffset>
<EmitRate>40</EmitRate>
<MaximumParticleCount>200</MaximumParticleCount>
<EmissionRadiusRange>
<X>10</X>
<Y>170</Y>
</EmissionRadiusRange>
<Velocity>
<X>0</X>
<Y>-20</Y>
</Velocity>
<VelocityVariance>0</VelocityVariance>
<Acceleration>
<X>0</X>
<Y>-30</Y>
</Acceleration>
<AccelerationVariance>0</AccelerationVariance>
<RadialVelocity>0</RadialVelocity>
<RadialVelocityVariance>1</RadialVelocityVariance>
<RadialAcceleration>10</RadialAcceleration>
<RadialAccelerationVariance>0</RadialAccelerationVariance>
<TangentialVelocity>0</TangentialVelocity>
<TangentialVelocityVariance>1</TangentialVelocityVariance>
<TangentialAcceleration>0</TangentialAcceleration>
<TangentialAccelerationVariance>0.2</TangentialAccelerationVariance>
<Lifetime>3</Lifetime>
<LifetimeVariance>0</LifetimeVariance>
<SpinVelocity>
<X>0</X>
<Y>0</Y>
</SpinVelocity>
<SpinVelocityVariance>2</SpinVelocityVariance>
<SizeRange>
<X>1</X>
<Y>1</Y>
</SizeRange>
<SizeVariance>0</SizeVariance>
<ColorRange>
<Start>
<A>255</A>
<R>0</R>
<G>0</G>
<B>255</B>
</Start>
<End>
<A>255</A>
<R>0</R>
<G>0</G>
<B>0</B>
</End>
</ColorRange>
<ColorVariance>0</ColorVariance>
</ParticleSettings>

View File

@@ -1,33 +0,0 @@
- type: entity
id: Janitor_Suit
name: Janitor Jumpsuit
components:
- type: Transform
- type: Clickable
- type: WearableAnimatedSprite
sprite: player_jumpsuit_gray
notWornSprite: janitorsuit
- type: Icon
icon: janitorsuit
- type: BoundingBox
- type: Physics
mass: 5
- type: entity
id: Shoes
name: Shoes
components:
- type: Transform
- type: Clickable
- type: WearableAnimatedSprite
sprite: player_toolbox
notWornSprite: shoes
- type: Icon
icon: shoes
- type: BoundingBox
- type: Physics
mass: 5

View File

@@ -1,16 +0,0 @@
- type: entity
id: Toolbox
name: Toolbox
components:
- type: Transform
- type: Clickable
- type: WearableAnimatedSprite
sprite: player_toolbox
notWornSprite: toolbox_r
- type: Icon
icon: toolbox_r
- type: BoundingBox
- type: Physics
mass: 5

View File

@@ -1,17 +0,0 @@
- type: entity
id: Door
name: Door
components:
- type: Transform
- type: Clickable
- type: Sprite
drawdepth: FloorPlaceable
sprites:
- door_ew
- door_ewo
- type: Icon
icon: door_ew
- type: BoundingBox
- type: Collidable

View File

@@ -1,16 +0,0 @@
- type: entity
id: Mop
name: Mop
components:
- type: Transform
- type: Clickable
- type: WearableAnimatedSprite
sprite: player_toolbox
notWornSprite: mop
- type: Icon
icon: mop
- type: BoundingBox
- type: Physics
- type: Clickable

View File

@@ -1,22 +0,0 @@
- type: entity
id: WallLight
name: Wall Light
components:
- type: Transform
- type: Clickable
- type: Sprite
sprites:
- wall_light
- type: Icon
icon: wall_light
- type: PointLight
lightoffsetx: 0
lightoffsety: 0
lightradius: 1024
lightColorR: 220
lightColorG: 220
lightColorB: 198
mask: whitemask
startState: On

View File

@@ -1,23 +0,0 @@
- type: entity
id: HumanMob
name: Urist McHuman
components:
- type: Transform
- type: Clickable
- type: AnimatedSprite
sprite: player
- type: Icon
icon: player
- type: BoundingBox
sizeX: 0.9
sizeY: 0.9
- type: ParticleSystem
- type: Physics
mass: 5
- type: Collidable
DebugColor: "#0000FF"

View File

@@ -1,21 +0,0 @@
- type: entity
id: Worktop
name: Worktop
components:
- type: Transform
- type: Clickable
- type: Sprite
sprites:
- worktop_single
drawdepth: Tables
- type: Icon
icon: worktop_single
- type: BoundingBox
sizeX: 2
sizeY: 1.4
offsetY: 0.25
- type: Collidable
DebugColor: "#0000FF"

View File

@@ -1,54 +0,0 @@
- type: entity
id: Extinguisher
name: Extinguisher Cabinet
components:
- type: Transform
- type: Clickable
- type: Sprite
sprites:
- fire_extinguisher
placement:
mode: AlignWall
range: 200
modes:
- 18
- 26
- 32
- type: entity
id: FireAlarm
name: Fire Alarm
components:
- type: Transform
- type: Clickable
- type: Sprite
sprites:
- fire_alarm_off
- type: Icon
icon: fire_alarm_off
placement:
mode: AlignWall
range: 180
nodes:
- 5
- 10
- 15
- type: entity
id: MedCabinet
name: Medical Cabinet
components:
- type: Transform
- type: Clickable
- type: Sprite
sprites:
- med_cabinet
- type: Icon
icon: med_cabinet
placement:
mode: AlignWall

View File

@@ -0,0 +1,15 @@
- type: shader
id: selection_outline
kind: source
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

@@ -0,0 +1,9 @@
# Generic canvas shader without light shading.
- type: shader
id: unshaded
kind: canvas
light_mode: unshaded
- type: shader
id: shaded
kind: canvas

View File

@@ -0,0 +1,115 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Engine/Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" instance=ExtResource( 1 )]
margin_left = 370.0
margin_top = 112.0
margin_right = 519.0
margin_bottom = 239.0
mouse_default_cursor_shape = 0
[node name="Contents" parent="." index="0"]
mouse_default_cursor_shape = 0
[node name="VBoxContainer" type="VBoxContainer" parent="Contents" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
[node name="VSyncCheckBox" type="CheckBox" parent="Contents/VBoxContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 129.0
margin_bottom = 24.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
custom_colors/font_color = Color( 1, 1, 1, 1 )
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
group = null
text = "VSync"
flat = false
align = 0
_sections_unfolded = [ "custom_colors" ]
[node name="FullscreenCheckBox" type="CheckBox" parent="Contents/VBoxContainer" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 28.0
margin_right = 129.0
margin_bottom = 52.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
group = null
text = "FullScreen"
flat = false
align = 0
[node name="ApplyButton" type="Button" parent="Contents/VBoxContainer" index="2"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 56.0
margin_right = 129.0
margin_bottom = 76.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
disabled = true
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Apply Changes"
flat = false
align = 1
_sections_unfolded = [ "Margin" ]
[node name="Header" parent="." index="1"]
mouse_default_cursor_shape = 0
[node name="Header Text" parent="Header" index="0"]
mouse_default_cursor_shape = 0
text = "Options Menu"
[node name="CloseButton" parent="Header" index="1"]
focus_mode = 2
mouse_default_cursor_shape = 0

View File

@@ -0,0 +1,115 @@
[gd_scene load_steps=2 format=2]
[sub_resource type="StyleBoxEmpty" id=1]
content_margin_left = -1.0
content_margin_right = -1.0
content_margin_top = -1.0
content_margin_bottom = -1.0
[node name="EntitySpawnItem" type="PanelContainer"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 102.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
custom_styles/panel = SubResource( 1 )
_sections_unfolded = [ "Grow Direction", "Mouse", "Rect", "Size Flags", "custom_styles" ]
[node name="Button" type="Button" parent="." index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 102.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
align = 1
_sections_unfolded = [ "Size Flags" ]
[node name="HBoxContainer" type="HBoxContainer" parent="." index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 102.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
_sections_unfolded = [ "Grow Direction", "Mouse", "Size Flags" ]
[node name="TextureWrap" type="Control" parent="HBoxContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 32.0
margin_bottom = 32.0
rect_min_size = Vector2( 32, 32 )
rect_pivot_offset = Vector2( 0, 0 )
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"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 4
size_flags_vertical = 4
_sections_unfolded = [ "Focus", "Grow Direction", "Hint", "Margin", "Mouse", "Rect", "Size Flags", "Theme" ]
[node name="Label" type="Label" parent="HBoxContainer" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 36.0
margin_top = 9.0
margin_right = 95.0
margin_bottom = 23.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
text = "Backpack"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
_sections_unfolded = [ "Mouse" ]

View File

@@ -0,0 +1,222 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Engine/Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" instance=ExtResource( 1 )]
margin_right = 532.0
margin_bottom = 398.0
_sections_unfolded = [ "Margin" ]
[node name="Contents" parent="." index="0"]
mouse_filter = 1
[node name="HSplitContainer" type="HSplitContainer" parent="Contents" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
split_offset = 0
collapsed = false
dragger_visibility = 0
_sections_unfolded = [ "Mouse" ]
[node name="PrototypeListScrollContainer" type="ScrollContainer" parent="Contents/HSplitContainer" index="0"]
editor/display_folded = true
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 200.0
margin_bottom = 310.0
rect_min_size = Vector2( 200, 0 )
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
scroll_horizontal_enabled = true
scroll_horizontal = 0
scroll_vertical_enabled = true
scroll_vertical = 0
_sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Mouse", "Rect", "Scroll", "Size Flags" ]
[node name="PrototypeList" type="VBoxContainer" parent="Contents/HSplitContainer/PrototypeListScrollContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 200.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
custom_constants/separation = 2
alignment = 0
_sections_unfolded = [ "Focus", "Hint", "Mouse", "Rect", "Size Flags", "custom_constants" ]
[node name="Options" type="VBoxContainer" parent="Contents/HSplitContainer" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 212.0
margin_right = 412.0
margin_bottom = 310.0
rect_min_size = Vector2( 200, 0 )
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
_sections_unfolded = [ "Hint", "Margin", "Mouse", "Rect" ]
[node name="SearchBar" type="LineEdit" parent="Contents/HSplitContainer/Options" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 200.0
margin_bottom = 24.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 1
size_flags_horizontal = 1
size_flags_vertical = 1
focus_mode = 2
context_menu_enabled = true
placeholder_text = "Search Entities"
placeholder_alpha = 0.6
caret_blink = false
caret_blink_speed = 0.65
caret_position = 0
_sections_unfolded = [ "Placeholder" ]
[node name="Buttons!" type="HBoxContainer" parent="Contents/HSplitContainer/Options" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 28.0
margin_right = 200.0
margin_bottom = 48.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 1
_sections_unfolded = [ "Mouse" ]
[node name="ClearButton" type="Button" parent="Contents/HSplitContainer/Options/Buttons!" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 98.0
margin_bottom = 20.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
disabled = true
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Clear Search"
flat = false
align = 1
_sections_unfolded = [ "Grow Direction", "Rect", "Size Flags" ]
[node name="EraseButton" type="Button" parent="Contents/HSplitContainer/Options/Buttons!" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 102.0
margin_right = 200.0
margin_bottom = 20.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
group = null
text = "Erase Mode"
flat = false
align = 1
[node name="OverridePlacementText" type="Label" parent="Contents/HSplitContainer/Options" index="2"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 52.0
margin_right = 200.0
margin_bottom = 66.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 4
text = "Override Placement:"
percent_visible = 1.0
lines_skipped = 0
max_lines_visible = -1
[node name="OverrideMenu" type="OptionButton" parent="Contents/HSplitContainer/Options" index="3"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 70.0
margin_right = 200.0
margin_bottom = 90.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
toggle_mode = false
action_mode = 0
enabled_focus_mode = 2
shortcut = null
group = null
flat = false
align = 0
selected = -1
items = [ ]
[node name="Header Text" parent="Header" index="0"]
text = "Entity Spawn Panel"

View File

@@ -0,0 +1,49 @@
[gd_scene load_steps=2 format=2]
[sub_resource type="StyleBoxEmpty" id=1]
content_margin_left = -1.0
content_margin_right = -1.0
content_margin_top = -1.0
content_margin_bottom = -1.0
[node name="EntitySpawnItem" type="PanelContainer"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 102.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
custom_styles/panel = SubResource( 1 )
_sections_unfolded = [ "Grow Direction", "Mouse", "Rect", "Size Flags", "custom_styles" ]
[node name="Button" type="Button" parent="." index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 102.0
margin_bottom = 32.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 3
toggle_mode = true
enabled_focus_mode = 2
shortcut = null
group = null
text = "Space"
flat = false
align = 0
_sections_unfolded = [ "Size Flags" ]

View File

@@ -0,0 +1,137 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://Engine/Scenes/SS14Window/SS14Window.tscn" type="PackedScene" id=1]
[node name="SS14Window" index="0" instance=ExtResource( 1 )]
margin_right = 532.0
margin_bottom = 398.0
_sections_unfolded = [ "Margin" ]
[node name="Contents" parent="." index="0"]
mouse_filter = 1
[node name="HSplitContainer" type="HSplitContainer" parent="Contents" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 1.0
anchor_bottom = 1.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 1
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
split_offset = 0
collapsed = false
dragger_visibility = 0
_sections_unfolded = [ "Mouse" ]
[node name="TileListScrollContainer" type="ScrollContainer" parent="Contents/HSplitContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 200.0
margin_bottom = 310.0
rect_min_size = Vector2( 200, 0 )
rect_pivot_offset = Vector2( 0, 0 )
rect_clip_content = true
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
scroll_horizontal_enabled = true
scroll_horizontal = 0
scroll_vertical_enabled = true
scroll_vertical = 0
_sections_unfolded = [ "Anchor", "Grow Direction", "Margin", "Mouse", "Rect", "Scroll", "Size Flags" ]
[node name="TileList" type="VBoxContainer" parent="Contents/HSplitContainer/TileListScrollContainer" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 200.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
custom_constants/separation = 2
alignment = 0
_sections_unfolded = [ "Focus", "Hint", "Mouse", "Rect", "Size Flags", "custom_constants" ]
[node name="Options" type="VBoxContainer" parent="Contents/HSplitContainer" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_left = 212.0
margin_right = 412.0
margin_bottom = 310.0
rect_min_size = Vector2( 200, 0 )
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 2
mouse_default_cursor_shape = 0
size_flags_horizontal = 1
size_flags_vertical = 1
alignment = 0
_sections_unfolded = [ "Hint", "Margin", "Mouse", "Rect" ]
[node name="SearchBar" type="LineEdit" parent="Contents/HSplitContainer/Options" index="0"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_right = 200.0
margin_bottom = 24.0
rect_pivot_offset = Vector2( 0, 0 )
focus_mode = 2
mouse_filter = 0
mouse_default_cursor_shape = 1
size_flags_horizontal = 1
size_flags_vertical = 1
focus_mode = 2
context_menu_enabled = true
placeholder_text = "Search Tiles"
placeholder_alpha = 0.6
caret_blink = false
caret_blink_speed = 0.65
caret_position = 0
_sections_unfolded = [ "Placeholder" ]
[node name="ClearButton" type="Button" parent="Contents/HSplitContainer/Options" index="1"]
anchor_left = 0.0
anchor_top = 0.0
anchor_right = 0.0
anchor_bottom = 0.0
margin_top = 28.0
margin_right = 200.0
margin_bottom = 48.0
rect_pivot_offset = Vector2( 0, 0 )
mouse_filter = 0
mouse_default_cursor_shape = 0
size_flags_horizontal = 3
size_flags_vertical = 1
disabled = true
toggle_mode = false
enabled_focus_mode = 2
shortcut = null
group = null
text = "Clear Search"
flat = false
align = 1
_sections_unfolded = [ "Grow Direction", "Rect", "Size Flags" ]
[node name="Header Text" parent="Header" index="0"]
text = "Tile Spawn Panel"

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 239 B

View File

@@ -0,0 +1,31 @@
[remap]
importer="texture"
type="StreamTexture"
path="res://.import/closewindow.png-27200ff550a4cc91ea5c13546f44ca18.stex"
[deps]
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
flags/mipmaps=false
flags/anisotropic=false
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
svg/scale=1.0

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

@@ -1,6 +0,0 @@
#version 120
void main()
{
gl_FragColor = vec4(0,0,0,1);
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,69 +0,0 @@
#version 120
// Amount to blur.
float blurAmount = 0.0135;
// Our texture sampler.
uniform sampler2D sourceSampler;
// Function to perform the sampling for the blur.
vec4 psBlurSample(vec2 Tex , vec4 baseColor, float offX, float offY)
{
vec4 Color; // Output.
float scaler = 0; // Scale of the sample.
// Calculate sample.
scaler = (1 + (offY * offX));
Tex.x = Tex.x + offX;
Tex.y = Tex.y + offY;
Color = baseColor + texture2D(sourceSampler, Tex / scaler);
return Color;
}
vec4 Blur()
{
vec4 Color = vec4(0); // Output.
float Alpha = 0; // Alpha component.
float blurValue = 0; // Blur value.
blurValue = blurAmount / 1000.0f;
if (blurAmount < 0)
blurValue = 0;
if (blurAmount > 10)
blurValue = 0.01;
Color = texture2D(sourceSampler, gl_TexCoord[0].xy);
// Store the alpha for later, we don't want to blur that.
Alpha = Color.a;
// Sample eight directions + the center.
Color = psBlurSample(gl_TexCoord[0].xy, Color, -blurValue, -blurValue);
Color = psBlurSample(gl_TexCoord[0].xy, Color, 0, -blurValue);
Color = psBlurSample(gl_TexCoord[0].xy, Color, blurValue, -blurValue);
Color = psBlurSample(gl_TexCoord[0].xy, Color, -blurValue, blurValue);
Color = psBlurSample(gl_TexCoord[0].xy, Color, 0, blurValue);
Color = psBlurSample(gl_TexCoord[0].xy, Color, blurValue, blurValue);
Color = psBlurSample(gl_TexCoord[0].xy, Color, -blurValue, 0);
Color = psBlurSample(gl_TexCoord[0].xy, Color, blurValue, 0);
// Calculate final color.
Color.rgb = clamp((Color.rgb / 9) * vec3(.8,.8,.8),0,1);
// Restore and combine the alpha.
Color.a = Alpha * float(1);
return Color;
}
void main()
{
gl_FragColor = Blur();
}

View File

@@ -1,13 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,56 +0,0 @@
#version 120
uniform sampler2D backgroundSampler;
uniform sampler2D spriteSampler;
vec2 spriteDimensions;
vec2 backbufferSize;
float cloakAmount = 0;
float refractionIndex = 1;
vec4 simplePS()
{
vec2 scaler = spriteDimensions/backbufferSize;
vec2 backPos = vec2(0,0);
vec4 spriteColor;
vec4 newColor;
spriteColor = texture2D(spriteSampler, gl_TexCoord[0].xy);
if (spriteColor.a > 0)
{
backPos = (gl_TexCoord[0].xy * scaler);
if ((spriteColor.r >= 0) && (spriteColor.r < 0.5))
backPos.x += (spriteColor.r * cloakAmount) * (scaler.x / refractionIndex);
else
backPos.x -= (spriteColor.r * cloakAmount) * (scaler.x / refractionIndex);
if ((spriteColor.g >= 0.0) && (spriteColor.g < 0.5))
backPos.y += (spriteColor.g * cloakAmount) * (scaler.y / refractionIndex);
else
backPos.y -= (spriteColor.g * cloakAmount) * (scaler.y / refractionIndex);
backPos.x += (spriteColor.b * cloakAmount) * (scaler.y / refractionIndex);
backPos.y += (spriteColor.b * cloakAmount) * (scaler.y / refractionIndex);
newColor = texture2D(backgroundSampler, backPos);
newColor = (newColor * (1 - (spriteColor.a - cloakAmount))) + (spriteColor * (spriteColor.a - cloakAmount));
newColor.a = spriteColor.a;
newColor *= vec4(.8,.8,.8,1);
}
return newColor;
}
void main()
{
gl_FragColor = simplePS();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,25 +0,0 @@
#version 120
uniform sampler2D sceneSampler;
float duration;
vec3 color_offset = vec3(0.2, 0.4, 0.3);
int Iterations = 128;
vec2 Pan = vec2(0.3776610, -0.3435075);
float Zoom = 0.4;
float Aspect = 1;
vec2 JuliaSeed = vec2(-0.439, 0.576);
vec3 ColorScale = vec3(6, 5, 4);
vec4 DeathShaderPS()
{
vec4 c = texture2D(sceneSampler, gl_TexCoord[0].xy);
c.b = c.g = 0;
return c;
}
void main()
{
gl_FragColor = DeathShaderPS();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,77 +0,0 @@
#version 120
#define RADIUS 11
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform vec2 weights_offsets11;
uniform vec2 weights_offsets12;
uniform vec2 weights_offsets13;
uniform vec2 weights_offsets14;
uniform vec2 weights_offsets15;
uniform vec2 weights_offsets16;
uniform vec2 weights_offsets17;
uniform vec2 weights_offsets18;
uniform vec2 weights_offsets19;
uniform vec2 weights_offsets20;
uniform vec2 weights_offsets21;
uniform vec2 weights_offsets22;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurHorizontal()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12,
weights_offsets13,
weights_offsets14,
weights_offsets15,
weights_offsets16,
weights_offsets17,
weights_offsets18,
weights_offsets19,
weights_offsets20,
weights_offsets21,
weights_offsets22
);
for (int i = 0; i < KERNEL_SIZE; ++i)
{
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x + weights_offsets[i].y, gl_TexCoord[0].y))* weights_offsets[i].x;
}
return color;
}
void main()
{
gl_FragColor = GaussianBlurHorizontal();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,73 +0,0 @@
#version 120
#define RADIUS 11
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform vec2 weights_offsets11;
uniform vec2 weights_offsets12;
uniform vec2 weights_offsets13;
uniform vec2 weights_offsets14;
uniform vec2 weights_offsets15;
uniform vec2 weights_offsets16;
uniform vec2 weights_offsets17;
uniform vec2 weights_offsets18;
uniform vec2 weights_offsets19;
uniform vec2 weights_offsets20;
uniform vec2 weights_offsets21;
uniform vec2 weights_offsets22;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurVertical()
{
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12,
weights_offsets13,
weights_offsets14,
weights_offsets15,
weights_offsets16,
weights_offsets17,
weights_offsets18,
weights_offsets19,
weights_offsets20,
weights_offsets21,
weights_offsets22
);
vec4 color = vec4(0,0,0,0);
for (int i = 0; i < KERNEL_SIZE; ++i)
{
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y + weights_offsets[i].y)) * weights_offsets[i].x; // M A G I K
}
return color;
}
void main()
{
gl_FragColor = GaussianBlurVertical();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,40 +0,0 @@
#version 120
#define RADIUS 3
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurHorizontal()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x + weights_offsets[i].y, gl_TexCoord[0].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurHorizontal();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,40 +0,0 @@
#version 120
#define RADIUS 3
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurVertical()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y + weights_offsets[i].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurVertical();
}

View File

@@ -1,18 +0,0 @@
#version 120
attribute vec4 a_color;
attribute vec3 a_position;
attribute vec2 a_texCoord0;
varying vec2 TexCoord;
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,49 +0,0 @@
#version 120
#define RADIUS 5
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurHorizontal()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x + weights_offsets[i].y, gl_TexCoord[0].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurHorizontal();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,50 +0,0 @@
#version 120
#define RADIUS 5
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurVertical()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y + weights_offsets[i].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurVertical();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,56 +0,0 @@
#version 120
#define RADIUS 7
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform vec2 weights_offsets11;
uniform vec2 weights_offsets12;
uniform vec2 weights_offsets13;
uniform vec2 weights_offsets14;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurHorizontal()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12,
weights_offsets13,
weights_offsets14
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x + weights_offsets[i].y, gl_TexCoord[0].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurHorizontal();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,57 +0,0 @@
#version 120
#define RADIUS 7
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform vec2 weights_offsets11;
uniform vec2 weights_offsets12;
uniform vec2 weights_offsets13;
uniform vec2 weights_offsets14;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurVertical()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12,
weights_offsets13,
weights_offsets14
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y + weights_offsets[i].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurVertical();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,65 +0,0 @@
#version 120
#define RADIUS 9
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform vec2 weights_offsets11;
uniform vec2 weights_offsets12;
uniform vec2 weights_offsets13;
uniform vec2 weights_offsets14;
uniform vec2 weights_offsets15;
uniform vec2 weights_offsets16;
uniform vec2 weights_offsets17;
uniform vec2 weights_offsets18;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurHorizontal()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12,
weights_offsets13,
weights_offsets14,
weights_offsets15,
weights_offsets16,
weights_offsets17,
weights_offsets18
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x + weights_offsets[i].y, gl_TexCoord[0].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurHorizontal();
}

View File

@@ -1,14 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,66 +0,0 @@
#version 120
#define RADIUS 9
#define KERNEL_SIZE (RADIUS * 2 + 1)
uniform vec2 weights_offsets[KERNEL_SIZE];
uniform vec2 weights_offsets0;
uniform vec2 weights_offsets1;
uniform vec2 weights_offsets2;
uniform vec2 weights_offsets3;
uniform vec2 weights_offsets4;
uniform vec2 weights_offsets5;
uniform vec2 weights_offsets6;
uniform vec2 weights_offsets7;
uniform vec2 weights_offsets8;
uniform vec2 weights_offsets9;
uniform vec2 weights_offsets10;
uniform vec2 weights_offsets11;
uniform vec2 weights_offsets12;
uniform vec2 weights_offsets13;
uniform vec2 weights_offsets14;
uniform vec2 weights_offsets15;
uniform vec2 weights_offsets16;
uniform vec2 weights_offsets17;
uniform vec2 weights_offsets18;
uniform sampler2D colorMapTexture;
vec4 GaussianBlurVertical()
{
vec4 color = vec4(0,0,0,0);
vec2 weights_offsets[KERNEL_SIZE] = vec2[KERNEL_SIZE]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12,
weights_offsets13,
weights_offsets14,
weights_offsets15,
weights_offsets16,
weights_offsets17,
weights_offsets18
);
for (int i = 0; i < KERNEL_SIZE; ++i)
color += texture2D(colorMapTexture, vec2(gl_TexCoord[0].x, gl_TexCoord[0].y + weights_offsets[i].y)) * weights_offsets[i].x;
return color;
}
void main()
{
gl_FragColor = GaussianBlurVertical();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,8 +0,0 @@
#version 120
uniform sampler2D TextureUnit0;
void main()
{
gl_FragColor = texture2D(TextureUnit0,gl_TexCoord[0].xy);
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

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,85 +0,0 @@
#version 120
#define NUM_LIGHTS 6
uniform vec4 LightPosData0;
uniform vec4 LightPosData1;
uniform vec4 LightPosData2;
uniform vec4 LightPosData3;
uniform vec4 LightPosData4;
uniform vec4 LightPosData5;
uniform vec4 LightPosData[NUM_LIGHTS];
uniform vec4 Colors[NUM_LIGHTS];
uniform vec4 Colors0;
uniform vec4 Colors1;
uniform vec4 Colors2;
uniform vec4 Colors3;
uniform vec4 Colors4;
uniform vec4 Colors5;
uniform sampler2D light0;
uniform sampler2D light1;
uniform sampler2D light2;
uniform sampler2D light3;
uniform sampler2D light4;
uniform sampler2D light5;
uniform sampler2D sceneTexture;
vec4 PreLightBlendPS()
{
vec4 Colors[NUM_LIGHTS] = vec4[NUM_LIGHTS]
(
Colors0,
Colors1,
Colors2,
Colors3,
Colors4,
Colors5
);
vec4 LightPosData[NUM_LIGHTS] = vec4[NUM_LIGHTS]
(
LightPosData0,
LightPosData1,
LightPosData2,
LightPosData3,
LightPosData4,
LightPosData5
);
vec4 l[NUM_LIGHTS];
vec2 ltc[NUM_LIGHTS];
for(int i = 0;i<NUM_LIGHTS;i++)
{
ltc[i] = vec2((gl_TexCoord[0].x - LightPosData[i].x) * LightPosData[i].z, (gl_TexCoord[0].y - LightPosData[i].y) * LightPosData[i].w);
}
l[0] = texture2D(light0, ltc[0]);
l[1] = texture2D(light1, ltc[1]);
l[2] = texture2D(light2, ltc[2]);
l[3] = texture2D(light3, ltc[3]);
l[4] = texture2D(light4, ltc[4]);
l[5] = texture2D(light5, ltc[5]);
l[0].rgb = l[0].rgb * Colors[0].rgb;
l[1].rgb = l[1].rgb * Colors[1].rgb;
l[2].rgb = l[2].rgb * Colors[2].rgb;
l[3].rgb = l[3].rgb * Colors[3].rgb;
l[4].rgb = l[4].rgb * Colors[4].rgb;
l[5].rgb = l[5].rgb * Colors[5].rgb;
vec4 s = texture2D(sceneTexture, gl_TexCoord[0].xy); // sample existing lights
//Add the lights together
float r = sqrt(pow(l[0].r, 2) + pow(l[1].r, 2) + pow(l[2].r, 2) + pow(l[3].r, 2) + pow(l[4].r, 2) + pow(l[5].r, 2) + pow(s.r, 2));
float g = sqrt(pow(l[0].g, 2) + pow(l[1].g, 2) + pow(l[2].g, 2) + pow(l[3].g, 2) + pow(l[4].g, 2) + pow(l[5].g, 2) + pow(s.g, 2));
float b = sqrt(pow(l[0].b, 2) + pow(l[1].b, 2) + pow(l[2].b, 2) + pow(l[3].b, 2) + pow(l[4].b, 2) + pow(l[5].b, 2) + pow(s.b, 2));
vec4 c = vec4(r,g,b, 1);
return c;
//Return the light color
return vec4(c.rgb,min(1, 1/max(c.r, max(c.g,c.b))));
}
void main()
{
gl_FragColor = PreLightBlendPS();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,9 +0,0 @@
#version 120
uniform sampler2D TextureUnit0;
void main()
{
gl_FragColor = texture2D(TextureUnit0,gl_TexCoord[0].xy) + vec4(.5,0,0,0);
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,20 +0,0 @@
#version 120
uniform sampler2D playerViewSampler;
uniform sampler2D sceneSampler;
uniform sampler2D lightSampler;
vec4 DrawTilesInversePlayerViewPS(vec2 TexCoord)
{
vec4 pv = texture2D(playerViewSampler, TexCoord);
float v = 1 - min(length(pv.rgb),1);
vec4 s = texture2D(sceneSampler, TexCoord);
vec4 t = texture2D(lightSampler, TexCoord);
return vec4(t.rgb + s.rgb, v);
}
void main()
{
gl_FragColor = DrawTilesInversePlayerViewPS(gl_TexCoord[0].xy);
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,57 +0,0 @@
#version 120
uniform sampler2D LightTexture;
uniform sampler2D SceneTexture;
uniform sampler2D PlayerViewTexture;
uniform sampler2D OutOfViewTexture;
uniform vec4 AmbientLight;
uniform vec4 MaskProps;
vec4 LightBlendPS(vec2 TexCoord)
{
vec4 a = AmbientLight;
vec4 l = texture2D(LightTexture, TexCoord); //Sample light/shadows
l = max(l,a); // Set a minimum level of light
vec4 c = texture2D(SceneTexture, TexCoord); //Sample scene color
vec4 pv = texture2D(PlayerViewTexture, TexCoord); // Sample player view
vec2 masktc = TexCoord;
masktc.x = masktc.x * MaskProps.x * MaskProps.z;
masktc.y = masktc.y * MaskProps.y * MaskProps.w;
vec4 t = texture2D(OutOfViewTexture, masktc); // Sample mask
//Generate scuzz for occluded areas
/*float4 t;
float2 lines;
lines.x = 1 * (TexCoord.x * MaskProps.x + MaskProps.z);
lines.y = 1 * (TexCoord.y * MaskProps.y + MaskProps.w);
float s = (sin(lines.x + lines.y + lines.y) + sin(lines.x - lines.y));
t.rgb = 0;
if(s > 0.5)
{
t.rgb = 0.1;
}*/
t.a = 1;
//End generate scuzz
vec3 h; // calculate hard light
h.r = l.r <= 0.5 ? 2 * l.r * c.r : 1 - (2 * (1 - l.r) * (1 - c.r) );
h.g = l.g <= 0.5 ? 2 * l.g * c.g : 1 - (2 * (1 - l.g) * (1 - c.g) );
h.b = l.b <= 0.5 ? 2 * l.b * c.b : 1 - (2 * (1 - l.b) * (1 - c.b) );
vec4 result;
result = vec4(max(c.rgb*l.rgb, h.rgb), pv.r)* 1;
result = result + (t *( 1 - pv.r));
return result;
}
void main()
{
gl_FragColor = LightBlendPS(gl_TexCoord[0].xy);
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,40 +0,0 @@
#version 120
uniform sampler2D maskSampler;
uniform sampler2D lightSampler;
uniform vec4 MaskProps;
uniform vec4 DiffuseColor;
vec4 MaskLightPS(vec2 TexCoord)
{
vec4 p = MaskProps;
vec2 tc = TexCoord;
vec4 d = DiffuseColor;
float t;
if(p.x > 0) // x is rot 90 degrees
{ // We just flip the axes.
t = tc.x;
tc.x = tc.y;
tc.y = t;
}
if(p.y > 0) // y is flip horizontally
{
tc.x = 1 - tc.x;
}
if(p.z > 0) // z is flip vertically
{
tc.y = 1 - tc.y;
}
vec4 l = texture2D(lightSampler, TexCoord);
l = vec4(l.r * d.r, l.g * d.g, l.b * d.b, l.a);
vec4 m = texture2D(maskSampler, tc);
return vec4(l.rgb, m.r)* l.a;
}
void main()
{
gl_FragColor = MaskLightPS(gl_TexCoord[0].xy);
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -0,0 +1,61 @@
//shader_type canvas_item;
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;
float mina = col.a;
a = texture(TEXTURE, UV + vec2(0, -outline_width)*ps).a;
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(0, outline_width)*ps).a;
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(-outline_width,0)*ps).a;
maxa = max(a, maxa);
mina = min(a, mina);
a = texture(TEXTURE, UV + vec2(outline_width, 0)*ps).a;
maxa = max(a, maxa);
mina = min(a, 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);
}

View File

@@ -1,14 +0,0 @@
#version 120
uniform sampler2D inputSampler;
vec4 CopyPS()
{
return texture2D(inputSampler, gl_TexCoord[0].xy);
}
void main()
{
gl_FragColor = CopyPS();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,26 +0,0 @@
#version 120
uniform sampler2D texture;
uniform float TextureDimensions;
vec4 HorizontalReductionPS()
{
vec2 color = texture2D(texture, gl_TexCoord[0].xy).rg;
vec2 colorR;
// This modulus bullshit is because every texel in the source image is evaluated in GLSL
// If we don't check whether the texel is odd or even, we would end up
// incorrectly taking the max of the pixel to the right versus this one,
// making our horizontal reduction invalid.
if (mod(gl_TexCoord[0].x / TextureDimensions, 2) == 0)
colorR = texture2D(texture, gl_TexCoord[0].xy + vec2(TextureDimensions,0)).rg;
else
colorR = texture2D(texture, gl_TexCoord[0].xy - vec2(TextureDimensions,0)).rg;
vec2 result = min(color, colorR);
return vec4(result,0,1);
}
void main()
{
gl_FragColor = HorizontalReductionPS();
}

View File

@@ -1,12 +0,0 @@
#version 120
void main()
{
// transform the vertex position
gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex;
// transform the texture coordinates
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
// forward the vertex color
gl_FrontColor = gl_Color;
}

View File

@@ -1,54 +0,0 @@
#version 120
uniform vec2 renderTargetSize;
uniform sampler2D inputSampler;
const float minBlur = 1.0;
const float maxBlur = 20.0;
const int g_cKernelSize = 13;
const vec2 weights_offsets0 = vec2( -6, 0.002216 );
const vec2 weights_offsets1 = vec2( -5, 0.008764 );
const vec2 weights_offsets2 = vec2( -4, 0.026995 );
const vec2 weights_offsets3 = vec2( -3, 0.064759 );
const vec2 weights_offsets4 = vec2( -2, 0.120985 );
const vec2 weights_offsets5 = vec2( -1, 0.176033 );
const vec2 weights_offsets6 = vec2( 0, 0.199471 );
const vec2 weights_offsets7 = vec2( 1, 0.176033 );
const vec2 weights_offsets8 = vec2( 2, 0.120985 );
const vec2 weights_offsets9 = vec2( 3, 0.064759 );
const vec2 weights_offsets10 = vec2( 4, 0.026995 );
const vec2 weights_offsets11 = vec2( 5, 0.008764 );
const vec2 weights_offsets12 = vec2( 6, 0.002216 );
uniform vec2 OffsetAndWeight[g_cKernelSize] = vec2[g_cKernelSize]
(
weights_offsets0,
weights_offsets1,
weights_offsets2,
weights_offsets3,
weights_offsets4,
weights_offsets5,
weights_offsets6,
weights_offsets7,
weights_offsets8,
weights_offsets9,
weights_offsets10,
weights_offsets11,
weights_offsets12
);
vec4 BlurHorizontallyPS()
{
float sum=0.;
float Distance = texture2D( inputSampler, gl_TexCoord[0].xy).b;
for (int i = 0; i < g_cKernelSize; i++)
{
sum += texture2D( inputSampler, gl_TexCoord[0].xy + OffsetAndWeight[i].x * mix(minBlur, maxBlur , Distance)/renderTargetSize.x * vec2(1,0) ).r * OffsetAndWeight[i].y;
}
return vec4(sum, sum, Distance, 1);
}
void main()
{
gl_FragColor = BlurHorizontallyPS();
}

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