Commit Graph

34 Commits

Author SHA1 Message Date
Leon Friedrich
11aa062ee0 Un-revert BUI PRs (#3139) 2022-08-21 03:40:29 +10:00
Pieter-Jan Briers
59e6a797f1 Revert "Move BUI logic to the UI system (#3102)"
This reverts commit 53c496fe27.
2022-08-07 00:25:20 +02:00
metalgearsloth
e27ed228ad Revert "More BUI changes (#3104)" (#3109) 2022-08-06 16:58:45 +10:00
Leon Friedrich
c7a3c43a4f More BUI changes (#3104) 2022-08-06 14:51:23 +10:00
Leon Friedrich
53c496fe27 Move BUI logic to the UI system (#3102) 2022-08-05 07:18:22 +10:00
Leon Friedrich
57e5ceef1a BUI range check changes (#3099) 2022-08-04 09:00:38 +10:00
metalgearsloth
62a24a320c Make raiselocalevent not broadcast by default (#2972)
* Make raiselocalevent not broadcast by default

* I forgor to commit
2022-06-22 09:52:50 +10:00
mirrorcult
e72d3de256 Local event for BUI opening (#2687) 2022-04-05 15:52:02 +10:00
Pieter-Jan Briers
de4d255841 Analyzer to enforce classes to be either [Virtual], abstract, or sealed. (#2469)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-02-05 19:31:58 +01:00
Leon Friedrich
b80a51d03f Raise an attempt-event when receiving client BUI messages. (#2414) 2022-01-20 02:42:48 +11:00
Vera Aguilera Puerto
7a06db60cf Inline UID 2021-12-03 15:53:10 +01:00
Vera Aguilera Puerto
f782e76671 Inline EntityManager 2021-12-03 11:11:52 +01:00
Pieter-Jan Briers
8d0070b5c3 Add IsUiOpen helper to UISystem. 2021-10-11 01:50:34 +02:00
Vera Aguilera Puerto
6d03840fbd Makes BoundUserInterfaces partially ECS. (#2033) 2021-09-18 10:41:06 +02:00
Pieter-Jan Briers
3aa5cefe03 Stop using component messages in bound UI code. 2021-05-13 03:29:38 +02:00
Pieter-Jan Briers
720f1b1d05 Fix a bunch of compiler warnings. 2021-05-12 00:16:12 +02:00
Paul Ritter
80f9f24243 Serialization v3 aka constant suffering (#1606)
* oops

* fixes serialization il

* copytest

* typo & misc fixes

* 139 moment

* boxing

* mesa dum

* stuff

* goodbye bad friend

* last commit before the big (4) rewrite

* adds datanodes

* kills yamlobjserializer in favor of the new system

* adds more serializers, actually implements them & removes most of the last of the old system

* changed yamlfieldattribute namespace

* adds back iselfserialize

* refactors consts&flags

* renames everything to data(field/definition)

* adds afterserialization

* help

* dataclassgen

* fuggen help me mannen

* Fix most errors on content

* Fix engine errors except map loader

* maploader & misc fix

* misc fixes

* thing

* help

* refactors datanodes

* help me mannen

* Separate ITypeSerializer into reader and writer

* Convert all type serializers

* priority

* adds alot

* il fixes

* adds robustgen

* argh

* adds array & enum serialization

* fixes dataclasses

* adds vec2i / misc fixes

* fixes inheritance

* a very notcursed todo

* fixes some custom dataclasses

* push dis

* Remove data classes

* boutta box

* yes

* Add angle and regex serializer tests

* Make TypeSerializerTest abstract

* sets up ioc etc

* remove pushinheritance

* fixes

* Merge fixes, fix yaml hot reloading

* General fixes2

* Make enum serialization ignore case

* Fix the tag not being copied in data nodes

* Fix not properly serializing flag enums

* Fix component serialization on startup

* Implement ValueDataNode ToString

* Serialization IL fixes, fix return and string equality

* Remove async from prototype manager

* Make serializing unsupported node as enum exception more descriptive

* Fix serv3 tryread casting to serializer instead of reader

* Add constructor for invalid node type exception

* Temporary fix for SERV3: Turn populate delegate into regular code

* Fix not copying the data of non primitive types

* Fix not using the data definition found in copying

* Make ISerializationHooks require explicit implementations

* Add test for serialization inheritance

* Improve IsOverridenIn method

* Fix error message when a data definition is null

* Add method to cast a read value in Serv3Manager

* Rename IServ3Manager to ISerializationManager

* Rename usages of serv3manager, add generic copy method

* Fix IL copy method lookup

* Rename old usages of serv3manager

* Add ITypeCopier

* resistance is futile

* we will conquer this codebase

* Add copy method to all serializers

* Make primitive mismatch error message more descriptive

* bing bong im going to freacking heck

* oopsie moment

* hello are you interested in my wares

* does generic serializers under new architecture

* Convert every non generic serializer to the new format, general fixes

* Update usgaes of generic serializers, cleanup

* does some pushinheritance logic

* finishes pushinheritance FRAMEWORK

* shed

* Add box2, color and component registry serializer tests

* Create more deserialized types and store prototypes with their deserialized results

* Fixes and serializer updates

* Add serialization manager extensions

* adds pushinheritance

* Update all prototypes to have a parent and have consistent id/parent properties

* Fix grammar component serialization

* Add generic serializer tests

* thonk

* Add array serializer test

* Replace logger warning calls with exceptions

* fixes

* Move redundant methods to serialization manager extensions, cleanup

* Add array serialization

* fixes context

* more fixes

* argh

* inheritance

* this should do it

* fixes

* adds copiers & fixes some stuff

* copiers use context v1

* finishing copy context

* more context fixes

* Test fixes

* funky maps

* Fix server user interface component serialization

* Fix value tuple serialization

* Add copying for value types and arrays. Fix copy internal for primitives, enums and strings

* fixes

* fixes more stuff

* yes

* Make abstract/interface skips debugs instead of warnings

* Fix typo

* Make some dictionaries readonly

* Add checks for the serialization manager initializing and already being initialized

* Add base type required and usage for MeansDataDefinition and ImplicitDataDefinitionForInheritorsAttribute

* copy by ref

* Fix exception wording

* Update data field required summary with the new forbidden docs

* Use extension in map loader

* wanna erp

* Change serializing to not use il temporarily

* Make writing work with nullable types

* pushing

* check

* cuddling slaps HARD

* Add serialization priority test

* important fix

* a serialization thing

* serializer moment

* Add validation for some type serializers

* adds context

* moar context

* fixes

* Do the thing for appearance

* yoo lmao

* push haha pp

* Temporarily make copy delegate regular c# code

* Create deserialized component registry to handle not inheriting conflicting references

* YAML LINTER BABY

* ayes

* Fix sprite component norot not being default true like in latest master

* Remove redundant todos

* Add summary doc to every ISerializationManager method

* icon fixes

* Add skip hook argument to readers and copiers

* Merge fixes

* Fix ordering of arguments in read and copy reflection call

* Fix user interface components deserialization

* pew pew

* i am going to HECK

* Add MustUseReturnValue to copy-over methods

* Make serialization log calls use the same sawmill

* gamin

* Fix doc errors in ISerializationManager.cs

* goodbye brave soldier

* fixes

* WIP merge fixes and entity serialization

* aaaaaaaaaaaaaaa

* aaaaaaaaaaaaaaa

* adds inheritancebehaviour

* test/datafield fixes

* forgot that one

* adds more verbose validation

* This fixes the YAML hot reloading

* Replace yield break with Enumerable.Empty

* adds copiers

* aaaaaaaaaaaaa

* array fix
priority fix
misc fixes

* fix(?)

* fix.

* funny map serialization (wip)

* funny map serialization (wip)

* Add TODO

* adds proper info the validation

* Make yaml linter 5 times faster (~80% less execution time)

* Improves the error message for missing fields in the linter

* Include component name in unknown component type error node

* adds alwaysrelevant usa

* fixes mapsaving

* moved surpressor to analyzers proj

* warning cleanup & moves surpressor

* removes old msbuild targets

* Revert "Make yaml linter 5 times faster (~80% less execution time)"

This reverts commit 2ee4cc2c26.

* Add serialization to RobustServerSimulation and mock reflection methods
Fixes container tests

* Fix nullability warnings

* Improve yaml linter message feedback

* oops moment

* Add IEquatable, IComparable, ToString and operators to DataPosition
Rename it to NodeMark
Make it a readonly struct

* Remove try catch from enum parsing

* Make dependency management in serialization less bad

* Make dependencies an argument instead of a property on the serialization manager

* Clean up type serializers

* Improve validation messages and resourc epath checking

* Fix sprite error message

* reached perfection

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
Co-authored-by: DrSmugleaf <DrSmugleaf@users.noreply.github.com>
Co-authored-by: Vera Aguilera Puerto <zddm@outlook.es>
2021-03-04 15:59:14 -08:00
Acruid
2183cd7ca1 Massive Namespace Cleanup (#1544)
* Removed the Interfaces folder.
* All objects inside the GameObjects subfolders are now in the GameObjects namespace.
* Added a Resharper DotSettings file to mark the GameObjects subfolders as not providing namespaces.
* Simplified Robust.client.Graphics namespace.
* Automated remove redundant using statements.
2021-02-10 23:27:19 -08:00
Pieter-Jan Briers
d5f3292e0a Unregister OnSessionOnPlayerStatusChanged on bound user interfaces.
I am frankly flabbergasted this is only a problem now.
2021-01-20 21:00:24 +01:00
DrSmugleaf
b8e5b47e7a Use 'new' expression in places where the type is evident for the engine (#1415)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
2020-11-26 00:16:55 +01:00
derek
9cc9b68e09 Toggle function in BoundUserInterface (#1283)
* add toggle

* Update Robust.Server/GameObjects/Components/UserInterface/ServerUserInterfaceComponent.cs

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>

Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
2020-09-08 18:54:03 +02:00
DrSmugleaf
ad2545d83d Add nullable API methods for getting components and user interfaces (#1241) 2020-08-22 13:56:05 +02:00
Pieter-Jan Briers
0d3cd41382 Enable NRTs on Robust.Server (#1118) 2020-06-09 14:18:29 +02:00
Pieter-Jan Briers
9eeb1d1afa Fix compiler warnings 2020-05-28 17:44:31 +02:00
Pieter-Jan Briers
e334d6610e Fix race condition in the Bound UI system.
If you sent multiple state updates on the same frame these could easily arrive in different orders on the client, which is definitely not intended. This fixes that by sending them per frame.

As a result, this also means earlier updates on the same frame are discarded, saving bandwidth.
2020-05-26 16:20:47 +02:00
chairbender
4e192f9084 Add helper method for statically getting entity systems (#1061) 2020-05-20 16:42:02 +02:00
Víctor Aguilera Puerto
424a9c9dfb ServerUserInterfaceComponent can now SetState on a specific player (#1060) 2020-05-18 20:53:03 +02:00
Pieter-Jan Briers
7c4b1af967 Optimize UserInterfaceSystem and clean up bound user interface API slightly. 2020-04-26 00:51:46 +02:00
Jackson Lewis
828ada9e22 Split HandleMessage into local and networked variants, add ICommonSession parameter to the latter (#1028) 2020-04-20 09:37:10 +02:00
Pieter-Jan Briers
8f96c65312 Fix BoundUserInterface not raising close event if player disconnects. 2020-03-30 18:31:09 +02:00
Víctor Aguilera Puerto
ffe506ef94 Adds Midi playback, Midi input, etc. (#873)
* raw PCM audio for clyde

* Remove soundfont.cs

* Midi stuff

* Some more work

* This actually works now!

* update

* Add nfluidsynth submodule.

* fuck

* Midi audio works!

* Lots of stuff, and cool interfaces for items

* Update

* Note limit

* Moving out of range of UI raises OnClosed now as well

* It just works

* Update nfluidsynth submodule

* Remove managed-midi, remove unused methods I added to clyde

* Remove remnants of older NFluidsynth

* Update nfluidsynth submodule.

* Fix some of MidiManager

* Add changes PJB made to soundfont loading

* Delete OpenAL source/buffers when disposed

* Remove remnants of "Rendering"

* Use ReadOnlySpan, make interface/implementation arguments consistent

* Improve EmptyBuffers performance

* Make renderers use an enum for their status

* MidiRenderer events are now invoked on the main thread

* MidiManager now has a method to dispose renderers

* Lock player

* Fun stuff

* Update nfluidsynth submodule.

* Fix midi audio rendering

* Address a few reviews

* Revert changes made to Clyde

* Create sfloader per midi renderer

* Midi file size check

* Now OpenMidi/OpenInput and their respective close methods return bools.

* Update nfluidsynth submodule.

* Move number to constant.

* Use BufferedAudioSource

* Remove unused using statements

* Use new API

* Lock player and synth correctly

* Use midi sawmill

* Adds "Disposed" property to MidiRenderer

* Remove DisposeRenderer, let midi render thread handle it instead

* Renderer position is updated from main loop

* Use nfluidsynth from nuget

* Fix appveyor, lazy fluidsynth init

* Only join MidiThread if it actually exists...
2019-10-30 16:45:11 +01:00
DamianX
943b000950 Things for wires (#852)
* Things for wires

* Fixed things
2019-08-25 23:18:03 +02:00
Pieter-Jan Briers
bb4a1eda8e Project file refactor (#819)
* Project file refactor

Move all the .csproj files to the new .NET Core style.
This doesn't make any difference for compiling for Framework,
but it does reduce a ton of useless boilerplate.

As an extension of this, killed a bunch of uncompiled & unmaintained .cs files.

Compiling for release (to profile) works now.
Removed AnyCPU targets from the solution file.

* Fix compiler warnings.
2019-05-28 00:16:01 +02:00
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