Class BetterHelpers
A collection of helper methods
Inheritance
System.Object
BetterHelpers
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Assembly: !BetterMods.dll
Syntax
public class BetterHelpers
Methods
|
Improve this Doc
View Source
DisarmCreature(Creature)
Make a creature drop whatever they are holding
Declaration
public static void DisarmCreature(Creature creature)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
|
Improve this Doc
View Source
DisarmCreature(Creature, Side)
Make a creature drop whatever they are holding in a particular side
Declaration
public static void DisarmCreature(Creature creature, Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.Side |
side |
|
|
Improve this Doc
View Source
GetItemDataIdList(ItemData.Type)
Get a list of item Ids's for a particular ItemData type
Declaration
public static List<string> GetItemDataIdList(ItemData.Type type)
Parameters
| Type |
Name |
Description |
| ThunderRoad.ItemData.Type |
type |
ItemData type, such as Weapon, Spell, Shield
|
Returns
| Type |
Description |
| System.Collections.Generic.List<System.String> |
|
|
Improve this Doc
View Source
GetItemDataList()
Declaration
public static List<ItemData> GetItemDataList()
Returns
| Type |
Description |
| System.Collections.Generic.List<ThunderRoad.ItemData> |
|
|
Improve this Doc
View Source
GetItemDataList(ItemData.Type)
Get a list of ItemData's for a particular ItemData type
Declaration
public static List<ItemData> GetItemDataList(ItemData.Type type)
Parameters
| Type |
Name |
Description |
| ThunderRoad.ItemData.Type |
type |
ItemData type, such as Weapon, Spell, Shield
|
Returns
| Type |
Description |
| System.Collections.Generic.List<ThunderRoad.ItemData> |
|
|
Improve this Doc
View Source
IsAlternateUsePressed()
returns true if alternate use button is being pressed on any controller
Declaration
public static bool IsAlternateUsePressed()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsAlternateUsePressed(Side)
returns true if alternate use button is being pressed on controller side
Declaration
public static bool IsAlternateUsePressed(Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsBeingChoked(Creature)
Checks to see if the ragdoll is being choked
Declaration
public static bool IsBeingChoked(Creature creature)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsCastPressed()
returns true if cast button is being pressed on any controller
Declaration
public static bool IsCastPressed()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsCastPressed(Side)
returns true if cast button is being pressed on controller side
Declaration
public static bool IsCastPressed(Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsCreatureArmed(Creature)
Returns true if the creature is holding something
Declaration
public static bool IsCreatureArmed(Creature creature)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsCreatureArmed(Creature, Side)
Returns true if the creature is holding something in a particular side
Declaration
public static bool IsCreatureArmed(Creature creature, Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsCreatureGrabbingHandle(Creature)
Returns true if the creature is holding something
Declaration
public static bool IsCreatureGrabbingHandle(Creature creature)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsCreatureGrabbingHandle(Creature, Side)
Returns true if the creature is holding something in a particular side
Declaration
public static bool IsCreatureGrabbingHandle(Creature creature, Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGripAndCastPressed()
returns true if grip button and cast button is being pressed on any controller side
Declaration
public static bool IsGripAndCastPressed()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGripAndCastPressed(Side)
returns true if grip button and cast button is being pressed on a controller side
Declaration
public static bool IsGripAndCastPressed(Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGripOrCastPressed()
returns true if grip button or cast button is being pressed on any controller side
Declaration
public static bool IsGripOrCastPressed()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGripOrCastPressed(Side)
returns true if grip button or cast button is being pressed on a controller side
Declaration
public static bool IsGripOrCastPressed(Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGripPressed()
returns true if grip button is being pressed on any controller
Declaration
public static bool IsGripPressed()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsGripPressed(Side)
returns true if grip button is being pressed on a controller side
Declaration
public static bool IsGripPressed(Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsHandleChokeable(Handle)
Check if a specific handle is chokable
Declaration
public static bool IsHandleChokeable(Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsHandleChokeable(HandleRagdoll)
Check if a specific HandleRagdoll is chokable
Declaration
public static bool IsHandleChokeable(HandleRagdoll handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.HandleRagdoll |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsHandleChoked(Handle)
Check if handle is being choked
Declaration
public static bool IsHandleChoked(Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsLastHeldByCreatureExceptPlayer(Item)
Returns true if the items last holder was a creature but not the player
Declaration
public static bool IsLastHeldByCreatureExceptPlayer(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsLastHeldByPlayer(Item)
Returns true if the items last holder was the player
Declaration
public static bool IsLastHeldByPlayer(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsNotHeld(Item)
Returns true if the item isnt being held
Declaration
public static bool IsNotHeld(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsOnlyCreatureExceptPlayerHolding(Handle)
Returns true if a creature other than the player is holding the handle
Declaration
public static bool IsOnlyCreatureExceptPlayerHolding(Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsOnlyCreatureExceptPlayerHolding(Item)
Returns true if a creature other than the player is holding the item
Declaration
public static bool IsOnlyCreatureExceptPlayerHolding(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsOnlyPlayerHolding(Handle)
Returns true if only the player is holding the handle
Declaration
public static bool IsOnlyPlayerHolding(Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsOnlyPlayerHolding(Item)
Returns true if only the player is holding the item
Declaration
public static bool IsOnlyPlayerHolding(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayer(RagdollPart)
Returns true if ragdollPart is the player
Declaration
public static bool IsPlayer(RagdollPart ragdollPart)
Parameters
| Type |
Name |
Description |
| ThunderRoad.RagdollPart |
ragdollPart |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerHolding(Handle)
Returns true if the player is holding the handle
Declaration
public static bool IsPlayerHolding(Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerHolding(Item)
Returns true if the player is holding the item
Declaration
public static bool IsPlayerHolding(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerHolding(RagdollPart)
Returns true if the player is holding the ragdollPart
Declaration
public static bool IsPlayerHolding(RagdollPart ragdollPart)
Parameters
| Type |
Name |
Description |
| ThunderRoad.RagdollPart |
ragdollPart |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerPointingAtBook()
Returns true if the player is currently pointing at a book menu
Declaration
public static bool IsPlayerPointingAtBook()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerTkHolding(Handle)
Returns true if the player is TK holding the handle
Declaration
public static bool IsPlayerTkHolding(Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerTkHolding(Item)
Returns true if the player is TK holding the item
Declaration
public static bool IsPlayerTkHolding(Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerTkHolding(RagdollPart)
Returns true if the player is TK holding the ragdollPart
Declaration
public static bool IsPlayerTkHolding(RagdollPart ragdollPart)
Parameters
| Type |
Name |
Description |
| ThunderRoad.RagdollPart |
ragdollPart |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerUsingTelekinesis()
Returns true if player using TK in any hand
Declaration
public static bool IsPlayerUsingTelekinesis()
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
IsPlayerUsingTelekinesis(Side)
Returns true if player using TK for given hand side
Declaration
public static bool IsPlayerUsingTelekinesis(Side side)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Side |
side |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
MakeItemCollideWith(Item, Item)
Will make an item's colliders collide with another item's colliders
Declaration
public static void MakeItemCollideWith(Item item, Item otherItem)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
| ThunderRoad.Item |
otherItem |
|
|
Improve this Doc
View Source
MakeItemCollideWith(Item, Collider)
Will make an item's colliders collide with a specific collider
Declaration
public static void MakeItemCollideWith(Item item, Collider otherCollider)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
| UnityEngine.Collider |
otherCollider |
|
|
Improve this Doc
View Source
MakeItemNotCollideWith(Item, Item)
Will make an item's colliders ignore collisions with another items colliders
Declaration
public static void MakeItemNotCollideWith(Item item, Item otherItem)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
| ThunderRoad.Item |
otherItem |
|
|
Improve this Doc
View Source
MakeItemNotCollideWith(Item, Collider)
Will make an item's colliders ignore collisions with a specific collider
Declaration
public static void MakeItemNotCollideWith(Item item, Collider otherCollider)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
|
| UnityEngine.Collider |
otherCollider |
|
|
Improve this Doc
View Source
TryGetChokedHandle(Creature, out HandleRagdoll)
Checks to see if the ragdoll is being choked
Declaration
public static bool TryGetChokedHandle(Creature creature, out HandleRagdoll chokedHandleRagdoll)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.HandleRagdoll |
chokedHandleRagdoll |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetHeldItem(Creature, Side, out Item)
Tries to get the item a creature is holding on a particular side
Declaration
public static bool TryGetHeldItem(Creature creature, Side side, out Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.Side |
side |
|
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetHeldItem(RagdollHand, out Item)
Tries to get the item a ragdollhand is holding
Declaration
public static bool TryGetHeldItem(RagdollHand ragdollHand, out Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.RagdollHand |
ragdollHand |
|
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetHeldItem(SpellCaster, out Item)
Tries to get the item a spellcaster is holding
Declaration
public static bool TryGetHeldItem(SpellCaster spellCaster, out Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.SpellCaster |
spellCaster |
|
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetLevelModuleBetterEvents(out LevelModuleBetterEvents)
Helper method to Try and get the current instance of the BetterEvents levelmodule
Declaration
public static bool TryGetLevelModuleBetterEvents(out LevelModuleBetterEvents levelModuleBetterEvents)
Parameters
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetObjFromColliderGroup(ColliderGroup, out Item)
Tries to return the item if there is one on a collider group
Declaration
public static bool TryGetObjFromColliderGroup(ColliderGroup colliderGroup, out Item item)
Parameters
| Type |
Name |
Description |
| ThunderRoad.ColliderGroup |
colliderGroup |
|
| ThunderRoad.Item |
item |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetObjFromColliderGroup(ColliderGroup, out RagdollPart)
Tries to return the ragdoll part if there is one on a collider group
Declaration
public static bool TryGetObjFromColliderGroup(ColliderGroup colliderGroup, out RagdollPart ragdollPart)
Parameters
| Type |
Name |
Description |
| ThunderRoad.ColliderGroup |
colliderGroup |
|
| ThunderRoad.RagdollPart |
ragdollPart |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetPlayerHandHolding(Handle, out RagdollHand)
Tries to return the players hand which is holding the handle
Declaration
public static bool TryGetPlayerHandHolding(Handle handle, out RagdollHand ragdollHand)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Handle |
handle |
handle being held
|
| ThunderRoad.RagdollHand |
ragdollHand |
Players left or right hand
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetPlayerHandHolding(Item, out RagdollHand)
Tries to return the players hand which is holding a item
Declaration
public static bool TryGetPlayerHandHolding(Item item, out RagdollHand ragdollHand)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Item |
item |
Item being held
|
| ThunderRoad.RagdollHand |
ragdollHand |
Players left or right hand
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetRagdollHand(Creature, out RagdollHand, out RagdollHand)
Tries to return both ragdoll hands for a creature
Declaration
public static bool TryGetRagdollHand(Creature creature, out RagdollHand leftRagdollHand, out RagdollHand rightRagdollHand)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.RagdollHand |
leftRagdollHand |
|
| ThunderRoad.RagdollHand |
rightRagdollHand |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetRagdollHand(Creature, Side, out RagdollHand)
Tries to return the Ragdoll hand for a creatures Side
Declaration
public static bool TryGetRagdollHand(Creature creature, Side side, out RagdollHand ragdollHand)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
| ThunderRoad.Side |
side |
|
| ThunderRoad.RagdollHand |
ragdollHand |
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
TryGetTelekinesisCaughtHandle(SpellCaster, out Handle)
Tries to return the handle the spellcaster is currently holding with telekinesis
Declaration
public static bool TryGetTelekinesisCaughtHandle(SpellCaster spellCaster, out Handle handle)
Parameters
| Type |
Name |
Description |
| ThunderRoad.SpellCaster |
spellCaster |
side specific spellcaster
|
| ThunderRoad.Handle |
handle |
The handle held by the spellcaster with telekinesis
|
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
WasBeingChoked(Creature)
Checks to see if the ragdoll was being choked and is now dead
Declaration
public static bool WasBeingChoked(Creature creature)
Parameters
| Type |
Name |
Description |
| ThunderRoad.Creature |
creature |
|
Returns
| Type |
Description |
| System.Boolean |
|