Class RestockableBuildableFobEntity<TInfo>
Buildable fob entity that periodically refills it's inventory from a BarricadeStateSave.
public abstract class RestockableBuildableFobEntity<TInfo> : BuildableFobEntity<TInfo>, IBuildableFobEntity, IFobEntity, ITransformObject, IDisposable where TInfo : IBuildableFobEntityInfo
Type Parameters
TInfo
- Inheritance
-
BuildableFobEntity<TInfo>RestockableBuildableFobEntity<TInfo>
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
RestockableBuildableFobEntity(IBuildable, IServiceProvider, bool, TInfo?, Team, TimeSpan)
protected RestockableBuildableFobEntity(IBuildable buildable, IServiceProvider serviceProvider, bool enableAutoRestock, TInfo? info, Team team, TimeSpan refillInterval = default)
Parameters
buildableIBuildableserviceProviderIServiceProviderenableAutoRestockboolinfoTInfoteamTeamrefillIntervalTimeSpan
Properties
PreventItemDrops
Whether or not contained items should be dropped when this buildable is destroyed.
public override bool PreventItemDrops { get; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public override void Dispose()
HandleRestock()
protected virtual void HandleRestock()
Restock()
Restock the inventory of this buildable.
public void Restock()
Events
OnRestock
Invoked after this buildable gets restocked.
public event Action? OnRestock