Show / Hide Table of Contents

Class HostedObjectExtension

Inheritance
System.Object
HostedObjectExtension
Namespace: Eco.Gameplay.Placement
Assembly: Eco.Gameplay.dll
Syntax
public static class HostedObjectExtension : Object

Methods

CalcTimeToDisable(IHostedObject)

Calculate how much time is left until the hosted object is disabled permanently.

Declaration
public static double CalcTimeToDisable(this IHostedObject hostedObject)
Parameters
Type Name Description
IHostedObject hostedObject
Returns
Type Description
System.Double

CheckHostState(IHostedObject)

We check the validity of the hosted object.

Declaration
public static Result CheckHostState(this IHostedObject hostedObject)
Parameters
Type Name Description
IHostedObject hostedObject
Returns
Type Description
Result

DisableTime(IHostedObject)

Declaration
public static double DisableTime(this IHostedObject hostedObject)
Parameters
Type Name Description
IHostedObject hostedObject
Returns
Type Description
System.Double

GetHostedObject(IEnumerable<Type>, WorldObject)

Returns objects that are currently hosted on this world object.

Declaration
public static IEnumerable<IHostedObject> GetHostedObject(IEnumerable<Type> types, WorldObject obj)
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<System.Type> types
WorldObject obj
Returns
Type Description
System.Collections.Generic.IEnumerable<IHostedObject>

GetHostedObject(Type, WorldObject)

Declaration
public static IEnumerable<IHostedObject> GetHostedObject(Type type, WorldObject obj)
Parameters
Type Name Description
System.Type type
WorldObject obj
Returns
Type Description
System.Collections.Generic.IEnumerable<IHostedObject>

GetHostObject(IHostedObject)

Declaration
public static WorldObject GetHostObject(this IHostedObject hostedObj)
Parameters
Type Name Description
IHostedObject hostedObj
Returns
Type Description
WorldObject

InitializeHostedObject(IHostedObject)

We use this to initialize the hosted object when necessary.

Declaration
public static void InitializeHostedObject(this IHostedObject entry)
Parameters
Type Name Description
IHostedObject entry

IsHostedObjectSpecial(IHostedObject)

Declaration
public static bool IsHostedObjectSpecial(this IHostedObject entry)
Parameters
Type Name Description
IHostedObject entry
Returns
Type Description
System.Boolean

SetHostObject(IHostedObject, WorldObject)

Set the hosted object on a specified world object(it can be null), doing the proper needed updates.

Declaration
public static void SetHostObject(this IHostedObject hostedObject, WorldObject newHost)
Parameters
Type Name Description
IHostedObject hostedObject
WorldObject newHost

UpdateHostedObjectValidity(IHostedObject)

We update the validity of the hosted object according to whether it's still orphan or not.

Declaration
public static void UpdateHostedObjectValidity(this IHostedObject hostedObject)
Parameters
Type Name Description
IHostedObject hostedObject

UpdateStatusForContainerObject(WorldObject, IEnumerable<IHostedObject>, Type, ref StatusElement)

Sets/clears a status element on a contained of hosted objects, to inform the user when they open the container object.

Declaration
public static void UpdateStatusForContainerObject(WorldObject obj, IEnumerable<IHostedObject> toDisable, Type objectType, ref StatusElement disableStatus)
Parameters
Type Name Description
WorldObject obj
System.Collections.Generic.IEnumerable<IHostedObject> toDisable
System.Type objectType
StatusElement disableStatus
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾