userConnacancel
branchsbox/mastercancel

259 Commits over 1,067 Days - 0.01cph!

2 Days Ago
Fixed Sync vars on derived component types not working
2 Days Ago
Host Sync Vars (#1462) * NetworkTable.Entry.HasControl test. Separate sending network table changes from main update. Host or Owner can send table changes (only send entries they _control_) * When using WriteAll always write all regardless of control. Make it so unless YOU control a Sync property you can't physically change its value * Revert that for now - let people change Sync var value locally as it was before, we can try to find a better way to prevent this later. Complication comes from INetworkCustom * Remove redundant call * Let''s have each entry define if it has changes now that each one can be potentially controlled by different clients. Make sure we clear changed flag on entry when reading it. NetworkTable.HasChanges will now return true if any entry we have control over is dirty * Clarify comment * Let's call it HostSync * Prevent actual setting of Sync property, modification of NetList, or NetDictionary if you don't have control over it. Non-owner, non-host can't change the values locally, they _must_ be what the synchronized value is * We can always set the property if network not initialized * Default HasControl to true for NetList/NetDictionary in-case not set
3 Days Ago
Network Authority / Permissions (#1457) * Can a connection create objects? * Send network destroy even if DestroyImmediate is called * Ownership authority flags * Let GameObject have [Sync] too (test) * Reorder enum, add [Expose] * Change up logic for can create objects - only check if we have a source * Default CanCreateObjects to true for now (this is current behavior) * Initial implementatior for ownership authority * Use NetworkAccessor for changing ownership authority. (Temp? Depending on review) don't use TL for set prop for Sync Vars * Initial implementation of Rpc authority * Remove a test log * CodeGen static array for attributes on a CodeGenerator method/prop now marked as [SkipHotload] and readonly, so they do update when changed * Make it CanSpawnObjects * CanSpawnObjects settable only by the host * Some renaming. Set OwnerTransfer direct on GameObject instead of method on NetworkAccessor * Make sure CanSpawnObjects is synchronized to clients when set from host via ConnectionInfo * Default CanSpawnObjects to true for now * When OwnerTransfer is Request, make actual requests to the host for Drop/Assign/Take ownership and if host approves, then host will send the messages to everyone to take that action. Each message will then validate if was received from host * Remove this for now, sus is later * CanSpawnObjects is always true for the host. Early out in NetworkSpawn if local connection can't spawn objects - why bother trying at all? * NetworkAccessor.SetOwnerTransfer method * Documentation fixes * Rename Rpc.HasAuthority to Rpc.HasPermission for consistency * Owner can always drop ownership * Allow owner transfer changing from current owner
7 Days Ago
Copy tags from GameObject for Legacy Particle System -> SceneObject In ParticleSpriteRenderer make sure we copy over tags from the GameObject to the SceneObject Internal ReadOnlyTagSet Parse kv tags into ObjectEntry.Tags and use them in SceneMapLoader to set any created sceneobject tags Copy tags from SceneObjects to MapObjectComponent GameObject Add some default tag from Hammer, light, text, particles Fix NRE Set some default tags for Particle and Light and Skybox components Better light tags
10 Days Ago
Clear watcher var after dispose
10 Days Ago
Fix tests
10 Days Ago
Fixes Facepunch/sbox-issues#4725 - Fixes a bunch of issues with SCSS hotloading. Style sheets weren't actually being removed when deleted or changed. Clear previously loaded style sheets properly on hotload. Properly update when stylesheet is added after it had tried to be loaded before.
10 Days Ago
Change mount logic in OnPostCompileFinished, call SceneMap.OnMapUpdated regardless. Make async and add short delays
11 Days Ago
Fixed FileSystem.NormalizeFilename changing \ to // in paths instead of to /. This fixes hotloading of .scss files in regular razor Panel (PanelComponent was fine)
24 Days Ago
NetList, NetDictionary (#1447) * Initial commit * Make NetworkTableContainer into an internal interface INetworkTableContainer. Use explicit interface implemention to keep members from being exposed to public API. * Add some exception handling * Let the INetworkTableContainer handle writing/reading whether it's only changes or a full update * Backwards compatibility for IList and IDictionary but it isn't ideal so throw a warning to use NetList and NetDictionary * Fix some documentation. Add ExchangeNetList test. When new instance of NetDictionary or NetList is created, add Reset change immediately. We want clients to know it's completely changed. * Add appropriate unit tests * Fix for hashcode * INetworkCustom. Add tests for NetList, NetDictionary. * Add example usage * Better formatting
25 Days Ago
Use EverythingInSelfAndDescendants when finding INetworkSpawn components
29 Days Ago
Update pull.yml
29 Days Ago
Do the same for 2D skybox
29 Days Ago
Add Skybox support to Render Tags - good for View Model Camera where we don't wanna render the skybox, or usually anything but things with a viewmodel tag
30 Days Ago
In ByteStream.Read/WriteValueArray, use Enum.GetUnderlyingType when using Marshal.SizeOf if the type is an Enum type. This is because Marshal.SizeOf will error when used with Enum types directly. Fixes Facepunch/sbox-issues#4579
33 Days Ago
Be able to get object from CodeGen wrapped prop/method
35 Days Ago
Add GameObject.NetworkSpawn, obsolete Network.Spawn (redirect)
36 Days Ago
Fix issues with loading compiled resource json in editor space
37 Days Ago
Fix documentation
37 Days Ago
Load/reload prefabs with SmallNetworkFiles. Read compiled json with c# fs instead of using native (#1440)
37 Days Ago
Add IsValidType and use that for now instead of IsValueType on the property. Support using `string` for Sync
38 Days Ago
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
40 Days Ago
Remove CreateWrappedMethod bs. Have VoiceComponent use [Broadcast] now. Remove manual RPC stuff from GameObject.Network.
43 Days Ago
Can mark these internal RPC methods as [Expose] now and make them private, remove old comments saying why they needed to be protected
43 Days Ago
Trace.RunAll Support (#1434) * Initial commit * Returns IEnumerable, order by Fraction * Fixed return type on public method
44 Days Ago
Remove unused debug args
44 Days Ago
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.
44 Days Ago
Added Networked Properties https://docs.facepunch.com/s/sbox-dev/doc/sync-properties-jKFHwTGVgR
50 Days Ago
When a map is re-compiled from Hammer reload any MapInstance components to reflect the changes
58 Days Ago
Fix TakeOwnership RPC not working
2 Months Ago
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)
2 Months Ago
Fix NRE when calling [Authority] RPC but authority is the host
2 Months Ago
OnTagsChannged -> OnTagsChanged
2 Months Ago
Fix [Broadcast] requiring `using System;` statement in file
3 Months Ago
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)
3 Months Ago
Disable 2 more tests that will be broken right now
3 Months Ago
Disable tests testing against package.facepunch.platformer.dll and package.facepunch.sandbox.dll for now Disable test for package.facepunch.sandbox.dll Should_Pass
3 Months Ago
Clear all [Obsolete] for a fresh slate (#1378) * Clear a bunch of [Obsolete] stuff * Remove obsolete template element override
3 Months Ago
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
3 Months Ago
Disable TestGamemode unit test and game and extension templates unit tests
3 Months Ago
Disable tests that load games or addons for now. Closes #1376
3 Months Ago
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)
3 Months Ago
Let's get rid of all the GameSetting/PackageSetting convar stuff now (#1375)
3 Months Ago
Fix .sndscape assets not being added to __references
3 Months Ago
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
3 Months Ago
Only actually add attribute members if they'd be used (target function accepts them)
3 Months Ago
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
3 Months Ago
Fixed previous commit test breaking for supporting internal/protected/private where possible in method validation for wrap method/properties...
3 Months Ago
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
3 Months Ago
Support params object[] when validating method for CodeGenerator.WrapMethod