IMetadata
Interface · Namespace OMX.ModAPI · Assembly OMX.ModAPI.Shared.dll
public interface IMetadataAn entity’s key/value metadata as one resource sees it. Every resource can read every qualified key; a resource writes only its own namespace. Own keys may be written as either name or modid:name; the host adds the namespace to short names.
MetadataScope.Local is this side’s own table and changes immediately. The replicated scopes belong to the authority: a server resource writes them on any entity; a client resource may only ask for a change on its own player or vehicle, and the change appears (and IMetadata.Changed fires) once the authority has accepted it.
Extension methods: TypedMetadata.Get, TypedMetadata.Set, TypedMetadata.Remove
Properties
Section titled “Properties”Changed
Section titled “Changed”IEventSource<MetadataChange> Changed { get; }Entity
Section titled “Entity”EntityId Entity { get; }Methods
Section titled “Methods”NetworkValue? Get(string key, MetadataScope scope = MetadataScope.Local);Parameters
keystringscopeMetadataScope
Returns NetworkValue?
string[] Keys(MetadataScope scope = MetadataScope.Local);Parameters
scopeMetadataScope
Returns string[]
Remove
Section titled “Remove”void Remove(string key, MetadataScope scope = MetadataScope.Local);Parameters
keystringscopeMetadataScope
void Set(string key, NetworkValue value, MetadataScope scope = MetadataScope.Local);Parameters
keystringvalueNetworkValuescopeMetadataScope
