438 Commits over 1,371 Days - 0.01cph!
StyleSheet String Table (#1437)
* Initial commit
* Make it better
* Clear entries in StringTable.Reset
* Remove unused method
* Remove unused using statement
* .scss and .prefab both valid small network files
* Send .prefab_c instead of .prefab
Remove CreateWrappedMethod bs. Have VoiceComponent use [Broadcast] now. Remove manual RPC stuff from GameObject.Network.
Can mark these internal RPC methods as [Expose] now and make them private, remove old comments saying why they needed to be protected
Trace.RunAll Support (#1434)
* Initial commit
* Returns IEnumerable, order by Fraction
* Fixed return type on public method
WrappedPropertySet/Get also have Attributes defined. Two methods with the same name but different signatures will now have unique static attribute list. Fixed attribute constructor issues for backing static attributes.
Added Networked Properties
https://docs.facepunch.com/s/sbox-dev/doc/sync-properties-jKFHwTGVgR
When a map is re-compiled from Hammer reload any MapInstance components to reflect the changes
Fix TakeOwnership RPC not working
In OnTargetedMessage if the TargetId is Guid.Empty, assume it's for us (this may happen if we're using OwnerId as the Target, but the "owner" is the host)
Fix NRE when calling [Authority] RPC but authority is the host
OnTagsChannged -> OnTagsChanged
Fix [Broadcast] requiring `using System;` statement in file
Squashed commit of the following:
commit 04050373a0633a5122791133885299c358f4b0eb
Merge: 577fcd3fec 2fd2d4d278
Author: kurozael <kurozael@gmail.com>
Date: Wed Dec 6 13:32:00 2023 +0000
Merge branch 'master' into codegen-struct-arg
commit 577fcd3fec861bb7f6cbde51621bbcd1558f2ff3
Author: kurozael <kurozael@gmail.com>
Date: Wed Dec 6 07:39:32 2023 +0000
Update CodeGenerator unit tests for new stuff
commit 64f62b40059c7d3ba16a373a1420401f6d79e2a6
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 15:57:11 2023 +0000
Readonly ref for Wrapped structs. Store Identity on MemberDescription. virtual method for generating identity hash, override it for MethodDescription... store global lookup for member idents. Add TypeLibrary.GetMemberByIdent. Clear members for types when assembly removed
commit 6c14f5b5784fb490e2a73c49a987df8087c8f4e6
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 15:24:45 2023 +0000
Added typeparam docs for T in WrappedPropertySet/Get and WrappedMethod
commit b9dbf0592cee5b4ae091670b592ace183722fb5b
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 15:21:17 2023 +0000
Typo
commit 52253bee1e373d09adc7be59b3e8669f93cb1caf
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 15:20:26 2023 +0000
Unused params
commit 0ff3451a31caa63537c9559e0bc59243352f8c3e
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 15:09:40 2023 +0000
Add TypeDescription.GetMethodByIdent, fix array param types not matching from codegen + methoddescription hash
commit e251f3fc500252431683c9a36de704cdfe8cc298
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 10:38:36 2023 +0000
Add support for codegen to pass methodidentity in struct, and split typename from methodname and add IsStatic as well to help differentiate properly
commit 55c6710de87bb61c1eb7e141a4bc8961b67cfcc1
Author: kurozael <kurozael@gmail.com>
Date: Tue Dec 5 10:37:43 2023 +0000
MethodDescription.Identity built from return type, name, params but not fully qualified rn as hard to correlate with results from ITypeSymbol in codegen
commit 7b0d25a70a0f8ee7afac0252c6dcf0338582e0db
Author: kurozael <kurozael@gmail.com>
Date: Mon Dec 4 13:30:18 2023 +0000
Initial commit / struct names not finalized
Update rpc and MakeDirtyAttribute callbacks to use new codegen structs. Authority rpcs and static rpc support
Assets for createwrappedmethod
These methods will need to be protected (comment with why)
Disable 2 more tests that will be broken right now
Disable tests testing against package.facepunch.platformer.dll and package.facepunch.sandbox.dll for now
Disable test for package.facepunch.sandbox.dll Should_Pass
Clear all [Obsolete] for a fresh slate (#1378)
* Clear a bunch of [Obsolete] stuff
* Remove obsolete template element override
Go through code looking for painday comments and try to sort them out (#1377)
* Go through code looking for painday comments and try to sort them out
* Readonly get
Disable TestGamemode unit test and game and extension templates unit tests
Disable tests that load games or addons for now. Closes #1376
Completely strip Saved Game functionality - re-evaluate if this is actually needed or something we want later on with the scene system though most likely easy enough for people to just do themselves now (#1374)
Let's get rid of all the GameSetting/PackageSetting convar stuff now (#1375)
Fix .sndscape assets not being added to __references
Targeted Messages (Send to Connection Id) (#1363)
* Can send message directly to connection id and if necessary route through server and wrap in a TargetedMessage
* Forward sender id in targeted message, when received by intended recipient call message handler with sender connection
Only actually add attribute members if they'd be used (target function accepts them)
CodeGen method wrap target function can (optionally) have first parameter be the specific wrapping attribute or an array of Attribute[] which would contain all CodeGen attributes on the method being wrapped
Fixed previous commit test breaking for supporting internal/protected/private where possible in method validation for wrap method/properties...
New way to validate method availability for method wrap/property wrap - this picks up internal / private / protected methods and checks containing type against that type to determine accessibility. tl;dr lets you in most cases use private / protected / internal methods as the target function for wrap without it complaining
Support params object[] when validating method for CodeGenerator.WrapMethod
Add test for CodeGeneraror wrap method with no arg. Fix wrap method with no arg causing syntax error in generated code.
Unmount/Re-mount Vpk After Map Compile (#1309)
* Initial commit
* Test mount/unmount VPK methods
* Remove file extension when passing to Mount/UnmountVPK
* Use ChangeExtension instead as apparently this preserves the path...
* Fix IsVPKMounted check not working
* Fix docs
* Use correct log channel
* Rename to OnPreCompileFinished + OnPostCompileFinished
Codegen Attributes (#1299)
* Initial tests for static call wrap
* Finally sort of got somewhere... bit of a nightmare to debug this right now. Allow multiple CodeGenAttribute. Remove from ClientRpc and add some tests locally instead
* Support CodeGenType.Instance with CodeGenType.WrapCall
* Added first version of WrapSet/WrapGet
* Unit test stubs
* Don't pass value for get accessor..
* Cast to original return type in get accessor when wrapping
* Tests build
* Let CodeGenType.WrapCall proxies return their own values. They can simple do "return resume();" if they wanna keep intended behavior, so we can also wrap methods that don't just return void
* Fixed a bug with static set/get wrap codegen not passing correct method name. Now support also adding [CodeGen] attributes directly to a method or property bypassing an attribute alias, these don't require setting the Instance/Static flags.
* Use nameof where possible
* Fixed tests for WrapSet/WrapGet
* Improve documentation
* Improve docs for CodeGenAttribute
* More documentation
* Fixed logic in WrapSet
* Added method validation. Compiler will let you know what methods you're missing when using CodeGen and what types, return types etc they need
* Add some extra tests
* Only allow CodeGen on custom attributes. Tidy up. CallbackName for CodeGenType.Static is the actual fully qualified name of static method to call
* Auto generate backing fields for properties. Pass current value in WrapGet callbacks. Set backing field before calling WrapSet callbacks. Update method validation error prints appropriately
* Fixed ValidatePropertyCallback
* Can now propertly wrap setters/getters. Setter callback passes Action<T> you can call to run default behavior
* Fix error if value statement empty
* Update tests
* Fix TestWrapSet
* Run WrapSet and WrapGet if both are specified. When passing to static callback always pass propertyName or methodName as fully qualified name.
* Support type argument for return type and Func param
* Nicer error when can't find type to invoke on for passed callback name
* CodeGeneratorFlags/CodeGeneratorAttribute renaming
* Update tests
* WrapPropertySet, WrapPropertyGet, WrapMethod
* Fix tests + fix issues with props that only have set; or get;
* No need to wrap getValue() body in {} as already have them
* Use SemanticModel.LookupSymbols to find and validate methods taking inheritance into account
* Remove leftover test code
Use Frustum instead to ensure created
Fix Vector3.ToScreen not working as it did before and breaking lots of stuff. Implement backwards compatibility and evaluate if this is the right solution later.
Allow local packages in game menu if we are not ourself a remote package. Fixes sboxgame/issues#3614
Fix NRE when trying to mount packages in game menu. Fixes sboxgame/issues#3806
Include token hash in log when unable to find string token
Added some extra logging and safety in reading inputs to try investigate sboxgames/issues#3886
Fixed AE_CL_PLAYSOUND anim events not playing for non-networked client-only entities
Revert AttachSteamAuthTicket
Authorization option for WebSocket, remove SetRequestHeader (duplicate functionality)
Revert DisposeAsync, it actually isn't needed. Only dispatch Disconnect if we're connected. Add EnableCompression to set deflate options if their socket server supports.
WebSocket implements IAsyncDisposable. When disposing websocket because of TaskSource cancellation, do so async and complete the WS close handshake if we can. If we receive a ConnectionClosedPrematurely message, only actually disconnect + dispose if the connection is no longer open. Call TaskSource.OnSessionEnded in GameMenuDll when resetting environment.
Clientside Anim Fix (#1188)
When setting GameLobby.Game set withLocal to true so that we actually load the local version if we're starting from a local version. This also fixes FileSystem.Data not using the folder with #local in when it should be.
StartServerAsync empties savedgame, gamesettings, extensions ConVars
Create Game on default menu actually respects Min/Max players in the project settings
Using min doens't make sense there actually
Saving a game stores current MaxPlayers in metadata. Fixed default menu Load Game not working, make it look OK.