Show / Hide Table of Contents

Class BetterExtensions

Class extensions for BAS

Inheritance
System.Object
BetterExtensions
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()
Namespace: Wully.Extensions
Assembly: !BetterMods.dll
Syntax
public static class BetterExtensions

Methods

| Improve this Doc View Source

AllowCollisionWith(Item, Item)

Will make an item's colliders collide with another item's colliders

Declaration
public static void AllowCollisionWith(this Item item, Item otherItem)
Parameters
Type Name Description
ThunderRoad.Item item
ThunderRoad.Item otherItem
| Improve this Doc View Source

AllowCollisionWith(Item, Collider)

Will make an item's colliders collide with a specific collider

Declaration
public static void AllowCollisionWith(this Item item, Collider collider)
Parameters
Type Name Description
ThunderRoad.Item item
UnityEngine.Collider collider
| Improve this Doc View Source

Bold(String)

Returns string in html bold

Declaration
public static string Bold(this string text)
Parameters
Type Name Description
System.String text
Returns
Type Description
System.String
| Improve this Doc View Source

Color(String, Color)

Returns string in html color

Declaration
public static string Color(this string text, Color color)
Parameters
Type Name Description
System.String text
UnityEngine.Color color
Returns
Type Description
System.String
| Improve this Doc View Source

Disarm(Creature)

Disarms creature on both hands

Declaration
public static void Disarm(this Creature creature)
Parameters
Type Name Description
ThunderRoad.Creature creature
| Improve this Doc View Source

Disarm(Creature, Side)

Disarms creature on a particular side

Declaration
public static void Disarm(this Creature creature, Side side)
Parameters
Type Name Description
ThunderRoad.Creature creature
ThunderRoad.Side side
| Improve this Doc View Source

EscapeJsonBraces(String)

Declaration
public static string EscapeJsonBraces(this string text)
Parameters
Type Name Description
System.String text
Returns
Type Description
System.String
| Improve this Doc View Source

GetItem(ColliderGroup)

Returns the item if there is one on a collider group

Declaration
public static Item GetItem(this ColliderGroup colliderGroup)
Parameters
Type Name Description
ThunderRoad.ColliderGroup colliderGroup
Returns
Type Description
ThunderRoad.Item

Nullable item from colliderGroup

| Improve this Doc View Source

GetItemFromSource(CollisionInstance)

Tries to return the item if there is one on the sourceColliderGroup

Declaration
public static Item GetItemFromSource(this CollisionInstance collisionInstance)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
Returns
Type Description
ThunderRoad.Item

Nullable item from sourceColliderGroup

| Improve this Doc View Source

GetItemFromTarget(CollisionInstance)

Tries to return the item if there is one on the targetColliderGroup

Declaration
public static Item GetItemFromTarget(this CollisionInstance collisionInstance)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
Returns
Type Description
ThunderRoad.Item

Nullable item from targetColliderGroup

| Improve this Doc View Source

GetPlayerHandHolding(Handle, out RagdollHand)

Tries to return the players hand which is holding the handle

Declaration
public static bool GetPlayerHandHolding(this 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

GetPlayerHandHolding(Item, out RagdollHand)

Tries to return the players hand which is holding the handle

Declaration
public static bool GetPlayerHandHolding(this 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

GetRagdollPart(ColliderGroup)

Tries to return the ragdoll part if there is one on a collider group

Declaration
public static RagdollPart GetRagdollPart(this ColliderGroup colliderGroup)
Parameters
Type Name Description
ThunderRoad.ColliderGroup colliderGroup
Returns
Type Description
ThunderRoad.RagdollPart

Nullable ragdollPart from colliderGroup

| Improve this Doc View Source

GetRagdollPartFromSource(CollisionInstance)

Tries to return the ragdoll part if there is one on the sourceColliderGroup

Declaration
public static RagdollPart GetRagdollPartFromSource(this CollisionInstance collisionInstance)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
Returns
Type Description
ThunderRoad.RagdollPart

Nullable ragdollPart from targetColliderGroup

| Improve this Doc View Source

GetRagdollPartFromTarget(CollisionInstance)

Tries to return the ragdoll part if there is one on the targetColliderGroup

Declaration
public static RagdollPart GetRagdollPartFromTarget(this CollisionInstance collisionInstance)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
Returns
Type Description
ThunderRoad.RagdollPart

Nullable ragdollPart from targetColliderGroup

| Improve this Doc View Source

IgnoreCollisionWith(Item, Item)

Will make an item's colliders not collide with another item's colliders

Declaration
public static void IgnoreCollisionWith(this Item item, Item otherItem)
Parameters
Type Name Description
ThunderRoad.Item item
ThunderRoad.Item otherItem
| Improve this Doc View Source

IgnoreCollisionWith(Item, Collider)

Will make an item's colliders not collide with a specific collider

Declaration
public static void IgnoreCollisionWith(this Item item, Collider collider)
Parameters
Type Name Description
ThunderRoad.Item item
UnityEngine.Collider collider
| Improve this Doc View Source

IsArmed(Creature)

Returns true if the creature is holding something

Declaration
public static bool IsArmed(this Creature creature)
Parameters
Type Name Description
ThunderRoad.Creature creature
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsArmed(Creature, Side)

Returns true if the creature is holding something in a particular side

Declaration
public static bool IsArmed(this Creature creature, Side side)
Parameters
Type Name Description
ThunderRoad.Creature creature
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(this Creature creature)
Parameters
Type Name Description
ThunderRoad.Creature creature
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsGrabbingHandle(Creature)

Returns true if the creature is holding something

Declaration
public static bool IsGrabbingHandle(this Creature creature)
Parameters
Type Name Description
ThunderRoad.Creature creature
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsGrabbingHandle(Creature, Side)

Returns true if the creature is holding something in a particular side

Declaration
public static bool IsGrabbingHandle(this Creature creature, Side side)
Parameters
Type Name Description
ThunderRoad.Creature creature
ThunderRoad.Side side
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsHandleChoked(Handle)

Check if handle is being choked

Declaration
public static bool IsHandleChoked(this Handle handle)
Parameters
Type Name Description
ThunderRoad.Handle handle
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsOnlyCreatureExceptPlayerHolding(Handle)

Returns true ifa creature other than the player is holding the handle

Declaration
public static bool IsOnlyCreatureExceptPlayerHolding(this 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(this 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(this 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(this Item item)
Parameters
Type Name Description
ThunderRoad.Item item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

IsPlayer(RagdollPart)

Returns true if the ragdoll part belongs to the player

Declaration
public static bool IsPlayer(this 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(this 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(this 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(this RagdollPart ragdollPart)
Parameters
Type Name Description
ThunderRoad.RagdollPart ragdollPart
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(this 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(this 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(this RagdollPart ragdollPart)
Parameters
Type Name Description
ThunderRoad.RagdollPart ragdollPart
Returns
Type Description
System.Boolean
| Improve this Doc View Source

Italics(String)

Returns string in html italics

Declaration
public static string Italics(this string text)
Parameters
Type Name Description
System.String text
Returns
Type Description
System.String
| Improve this Doc View Source

LineNumber(Exception)

Tries to get the line number of an exception. May impact performance

Declaration
public static int LineNumber(this Exception ex)
Parameters
Type Name Description
System.Exception ex
Returns
Type Description
System.Int32
| Improve this Doc View Source

Size(String, Int32)

Returns string in html with size

Declaration
public static string Size(this string text, int size)
Parameters
Type Name Description
System.String text
System.Int32 size
Returns
Type Description
System.String
| Improve this Doc View Source

ToStringExt(CollisionInstance)

Extended toString

Declaration
public static string ToStringExt(this CollisionInstance ci)
Parameters
Type Name Description
ThunderRoad.CollisionInstance ci

CollisionInstance

Returns
Type Description
System.String
| Improve this Doc View Source

ToStringExt(DamageStruct)

Declaration
public static string ToStringExt(this DamageStruct ds)
Parameters
Type Name Description
ThunderRoad.DamageStruct ds
Returns
Type Description
System.String
| 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(this 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(this 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(this 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

TryGetItem(ColliderGroup, out Item)

Tries to return the item if there is one on a collider group

Declaration
public static bool TryGetItem(this 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

TryGetItemFromSource(CollisionInstance, out Item)

Tries to return the item if there is one on the sourceColliderGroup

Declaration
public static bool TryGetItemFromSource(this CollisionInstance collisionInstance, out Item item)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
ThunderRoad.Item item
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetItemFromTarget(CollisionInstance, out Item)

Tries to return the item if there is one on the targetColliderGroup

Declaration
public static bool TryGetItemFromTarget(this CollisionInstance collisionInstance, out Item item)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
ThunderRoad.Item item
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(this 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 the item

Declaration
public static bool TryGetPlayerHandHolding(this 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(this 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(this 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

TryGetRagdollPart(ColliderGroup, out RagdollPart)

Tries to return the ragdoll part if there is one on a collider group

Declaration
public static bool TryGetRagdollPart(this 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

TryGetRagdollPartFromSource(CollisionInstance, out RagdollPart)

Tries to return the ragdoll part if there is one on the sourceColliderGroup

Declaration
public static bool TryGetRagdollPartFromSource(this CollisionInstance collisionInstance, out RagdollPart ragdollPart)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
ThunderRoad.RagdollPart ragdollPart
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetRagdollPartFromTarget(CollisionInstance, out RagdollPart)

Tries to return the ragdoll part if there is one on the targetColliderGroup

Declaration
public static bool TryGetRagdollPartFromTarget(this CollisionInstance collisionInstance, out RagdollPart ragdollPart)
Parameters
Type Name Description
ThunderRoad.CollisionInstance collisionInstance
ThunderRoad.RagdollPart ragdollPart
Returns
Type Description
System.Boolean
| Improve this Doc View Source

TryGetTkHandle(SpellCaster, out Handle)

Tries to return the handle the spellcaster is currently holding with telekinesis

Declaration
public static bool TryGetTkHandle(this 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(this Creature creature)
Parameters
Type Name Description
ThunderRoad.Creature creature
Returns
Type Description
System.Boolean
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX