Class BuildableAttributesDataStore
- Namespace
- Uncreated.Warfare.Buildables
- Assembly
- Uncreated.Warfare.dll
Stores a key-value-pair dictionary for each barricade and structure.
[Priority(11)]
public class BuildableAttributesDataStore : IHostedService, ILevelHostedService, IEventListener<IBuildableDestroyedEvent>
- Inheritance
-
BuildableAttributesDataStore
- Implements
- Inherited Members
Constructors
BuildableAttributesDataStore(ILogger<BuildableAttributesDataStore>)
public BuildableAttributesDataStore(ILogger<BuildableAttributesDataStore> logger)
Parameters
loggerILogger<BuildableAttributesDataStore>
Methods
HasAttribute(uint, bool, string)
Check if a buildable contains an attribute.
public bool HasAttribute(uint instanceId, bool isStrucutre, string attribute)
Parameters
Returns
Exceptions
HasAttribute(IBuildable, string)
Check if a buildable contains an attribute.
public bool HasAttribute(IBuildable buildable, string attribute)
Parameters
buildableIBuildableattributestring
Returns
Exceptions
TryGetAttribute(uint, bool, string, out object?)
Get the value of a buildable attribute.
public bool TryGetAttribute(uint instanceId, bool isStrucutre, string attribute, out object? value)
Parameters
Returns
Exceptions
TryGetAttribute(IBuildable, string, out object?)
Get the value of a buildable attribute.
public bool TryGetAttribute(IBuildable buildable, string attribute, out object? value)
Parameters
buildableIBuildableattributestringvalueobject
Returns
Exceptions
UpdateAttributes(uint, bool)
Start modifying the attributes of a buildable.
public IDictionary<string, object?> UpdateAttributes(uint instanceId, bool isStrucutre)
Parameters
Returns
Exceptions
UpdateAttributes(IBuildable)
Start modifying the attributes of a buildable.
public IDictionary<string, object?> UpdateAttributes(IBuildable buildable)
Parameters
buildableIBuildable