m ProbablePrime moved page ReferenceUserOverride (Component) to Component:ReferenceUserOverride: Creating component Namespace |
fix type title |
||
(5 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
<translate> | <translate> | ||
<!--T:1--> | <!--T:1--> | ||
This is a component that allows you to locally change a reference on a value. Changing the value locally for yourself or others so that an item or world element is different depending on who's viewing it. | |||
{{Infobox Component | {{Infobox Component | ||
|Image=ReferenceUserOverride`1Component.png | |Image=ReferenceUserOverride`1Component.png | ||
Line 11: | Line 11: | ||
== Fields == | == Fields == | ||
{{Table ComponentFields | {{Table ComponentFields | ||
|Target| | |Target|{{RootFieldType|RefDrive`1|T}}|TypeAdv0=true| The value to drive locally for every user | ||
|Default| | |Default|'''T'''|TypeAdv1=true| The content of this value will be inside of <code>Target</code> for every user locally unless otherwise specified by an [[#Override|Override]] inside of the <code>_overrides</code> bag. | ||
|CreateOverrideOnWrite|Bool| | |CreateOverrideOnWrite|Bool| When flux or any other means tries to set the value of target from someone's machine, create an [[#Override|Override]] for them in <code>_overrides</code> bag. | ||
|PersistentOverrides|Bool| | |PersistentOverrides|Bool| whether to save the overrides or not when the component is part of a hierarchy being saved. This is useful to turn on when an item should have overrides | ||
|_overrides|SyncBag`1| | |_overrides|{{RootFieldType|SyncBag`1|[[#Override|Override]]<T>}}|TypeAdv4=true| A bag of [[#Override|Override]]s that are read to make local changes to the value referenced by <code>Target</code> | ||
}} | |||
== Override == | |||
{{Table TypeFields | |||
|User|[[Type:UserRef|UserRef]]|TypeAdv0=true| The [[Type:User|User]] that should see <code>Value</code>'s content inside of <code>Target</code> locally instead of <code>Default</code>'s content | |||
|Value|'''T'''|TypeAdv1=true| The value that <code>User</code> should see target driven to locally. | |||
}} | }} | ||
Line 30: | Line 36: | ||
[[Category:Generics{{#translation:}}]] | [[Category:Generics{{#translation:}}]] | ||
[[Category:Components{{#translation:}}|Reference User Override`1]] | [[Category:Components{{#translation:}}|Reference User Override`1]] | ||
[[Category:Generic Components{{#translation:}}|Reference User Override`1]] | |||
[[Category:Components With Nested Types{{#translation:}}|Reference User Override`1]] | |||
[[Category:Components:Transform:Drivers{{#translation:}}|Reference User Override`1]] | [[Category:Components:Transform:Drivers{{#translation:}}|Reference User Override`1]] |
Latest revision as of 18:56, 12 May 2024
This is a component that allows you to locally change a reference on a value. Changing the value locally for yourself or others so that an item or world element is different depending on who's viewing it.
Component image
Fields
Name | Type | Description |
---|---|---|
persistent
|
Bool | Determines whether or not this item will be saved to the server. |
UpdateOrder
|
Int | Controls the order in which this component is updated. |
Enabled
|
Bool | Controls whether or not this component is enabled. |
Target
|
direct RefDrive`1<T> | The value to drive locally for every user |
Default
|
T | The content of this value will be inside of Target for every user locally unless otherwise specified by an Override inside of the _overrides bag.
|
CreateOverrideOnWrite
|
Bool | When flux or any other means tries to set the value of target from someone's machine, create an Override for them in _overrides bag.
|
PersistentOverrides
|
Bool | whether to save the overrides or not when the component is part of a hierarchy being saved. This is useful to turn on when an item should have overrides |
_overrides
|
direct SyncBag`1<Override<T>> | A bag of Overrides that are read to make local changes to the value referenced by Target
|
Override
Name | Type | Description |
---|---|---|
User
|
UserRef | The User that should see Value 's content inside of Target locally instead of Default 's content
|
Value
|
T | The value that User should see target driven to locally.
|