Show / Hide Table of Contents

Class ExplosionComponent

Base explosion component that allows block manipulation in areas. Has basic logic and derived components can implement block processor of any kind. Ex block removal/replacement, etc

Inheritance
System.Object
WorldObjectComponent
ExplosionComponent
Implements
ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<ThreadSafeSubscriptions>
ISubscriptions
IHasInteractions
IHasEnvVars
Inherited Members
WorldObjectComponent.IsRPCAuthorized(IWorldObserver, AccessType, Object[])
WorldObjectComponent.Initialize()
WorldObjectComponent.PostInitialize()
WorldObjectComponent.OnCreate()
WorldObjectComponent.Destroy()
WorldObjectComponent.Tick()
WorldObjectComponent.LateTick()
WorldObjectComponent.OnPickup(Player)
WorldObjectComponent.OnBeforeObjectMoved()
WorldObjectComponent.OnAfterObjectMoved()
WorldObjectComponent.OnLinkClicked(TooltipOrigin, TooltipClickContext, User)
WorldObjectComponent.UILinkContent()
WorldObjectComponent.Parent
WorldObjectComponent.Name
WorldObjectComponent.IconName
WorldObjectComponent.ForceActiveTab
WorldObjectComponent.ComponentPrefabName
WorldObjectComponent.ComponentTabName
WorldObjectComponent.Enabled
WorldObjectComponent.IsDestroyed
WorldObjectComponent.Availability
WorldObjectComponent.ShouldRequestEverything
WorldObjectComponent.Owners
WorldObjectComponent.ControllerID
WorldObjectComponent.IOwned.Deed
WorldObjectComponent.Subscriptions
WorldObjectComponent.PropertyChanged
Namespace: Eco.Gameplay.Components
Assembly: Eco.Gameplay.dll
Syntax
public class ExplosionComponent : WorldObjectComponent, ILinkable, IOwned, IController, IViewController, IHasUniversalID, IHasSerializableID, IRPCAuthChecks, INotifyPropertyChanged, IThreadSafeSubscriptions, ISubscriptions<ThreadSafeSubscriptions>, ISubscriptions, IHasInteractions, IHasEnvVars

Constructors

ExplosionComponent()

Declaration
public ExplosionComponent()

Properties

CanBeUsedManually

Declaration
[EnvVar]
public bool CanBeUsedManually { get; set; }
Property Value
Type Description
System.Boolean

Config

Declaration
public ExplosionConfig Config { get; }
Property Value
Type Description
ExplosionConfig

CrushedBlockTypes

Declaration
public static List<Type> CrushedBlockTypes { get; }
Property Value
Type Description
System.Collections.Generic.List<System.Type>

ExplosionBlockMap

Declaration
public static Dictionary<Type, Type> ExplosionBlockMap { get; }
Property Value
Type Description
System.Collections.Generic.Dictionary<System.Type, System.Type>

Methods

GenerateExplosionBlockMap()

Declaration
public static void GenerateExplosionBlockMap()

GetExplosionArea()

Determines area for explosion, in case any custom shape needed - override this.

Declaration
protected virtual IEnumerable<Vector3i> GetExplosionArea()
Returns
Type Description
System.Collections.Generic.IEnumerable<Vector3i>

Initialize(ExplosionConfig, Boolean)

Declaration
public void Initialize(ExplosionConfig config, bool canUseManually = true)
Parameters
Type Name Description
ExplosionConfig config
System.Boolean canUseManually

LightUp(Player, InteractionTriggerInfo, InteractionTarget)

Declaration
[Interaction]
public void LightUp(Player player, InteractionTriggerInfo triggerInfo, InteractionTarget target)
Parameters
Type Name Description
Player player
InteractionTriggerInfo triggerInfo
InteractionTarget target

ProcessExplosion(IEnumerable<Vector3i>)

Determines what will happen with block positions after explosion event from server This is called as post action in atomic actions and passes all valid positions after auth validation, etc.

Declaration
protected virtual void ProcessExplosion(IEnumerable<Vector3i> area)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<Vector3i> area

StartFuseTimer(Player)

Declaration
public void StartFuseTimer(Player player)
Parameters
Type Name Description
Player player

StartFuseTimerCustom(Player, Single, Int32, Boolean)

Allows to start detonation with custom timer and radius. Good to be reused from extra extensions and sources

Declaration
public void StartFuseTimerCustom(Player player, float fuseTime, int radius = -1, bool notify = true)
Parameters
Type Name Description
Player player
System.Single fuseTime
System.Int32 radius
System.Boolean notify

TryPickup(Player, InventoryChangeSet, Inventory, Boolean)

Declaration
public override InventoryMoveResult TryPickup(Player player, InventoryChangeSet invChanges, Inventory targetInventory, bool force)
Parameters
Type Name Description
Player player
InventoryChangeSet invChanges
Inventory targetInventory
System.Boolean force
Returns
Type Description
InventoryMoveResult
Overrides
WorldObjectComponent.TryPickup(Player, InventoryChangeSet, Inventory, Boolean)

Implements

ILinkable
IOwned
IController
IViewController
IHasUniversalID
IHasSerializableID
IRPCAuthChecks
System.ComponentModel.INotifyPropertyChanged
IThreadSafeSubscriptions
ISubscriptions<TSubscriptionsList>
ISubscriptions
IHasInteractions
IHasEnvVars

Extension Methods

TagUtils.TagNames(Object, Boolean)
TagUtils.TagDisplayNames(Object, Boolean)
ClientSetViewExtensions.SetClassOfProperty(Object, Player, String, String, Int32)
TypeTooltipExtensions.UILinkGeneric(Object)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾