Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
DestructibleBuilding Class Reference
Inheritance diagram for DestructibleBuilding:
ICollisionEvents

Classes

class  CollapsibleObject
 

Public Member Functions

void AddDamage (float d)
 Adds arbitrary damage to the structure. Damage units are measured in momentum. (vel*mass) No damage will be added if game parameters call for indestructible facilities. More...
 
void ClearID ()
 
void CompileID ()
 
void Demolish ()
 
List< ProtoVesselFindVesselsOverStructure (FlightState st)
 
void FixedUpdate ()
 
MonoBehaviour GetInstance ()
 
float GetRepairSequenceDuration ()
 
void Load (ConfigNode node)
 
void OnCollisionEnter (Collision c)
 
void OnCollisionExit (Collision c)
 
void OnCollisionStay (Collision c)
 
bool RegisterInstance ()
 
void Repair ()
 
void Reset ()
 Reset, unlike Repair, returns the building to its initial intact state silently (without any effects or sounds and without firing events). Used for loading between saves. More...
 
void Save (ConfigNode node)
 
void UnregisterInstance (bool saveState)
 

Public Attributes

float CollapseReputationHit = 0f
 
CollapsibleObject[] CollapsibleObjects
 A list of objects which will be brought down when demolishing More...
 
float damageDecay = 5f
 
VFXSequencer DemolitionFXPrefab
 The sequence of sounds and visual effects to be triggered on demolition. More...
 
float FacilityDamageFraction = 0f
 
Transform FxTarget
 Where to spawn the fx More...
 
string id
 
float impactMomentumThreshold = 500f
 
bool preCompiledId
 
float RepairCost = 0f
 
VFXSequencer RepairFXPrefab
 The sequence of sounds and visual effects to be triggered on repairing. More...
 

Static Public Attributes

static float BuildingToughnessFactor = 0.75f
 
static EventData
< DestructibleBuilding
OnLoaded = new EventData<DestructibleBuilding>("OnDestructibleLoaded")
 

Properties

float Damage [get]
 
bool IsDestroyed [get]
 
bool IsIntact [get]
 

Member Function Documentation

void DestructibleBuilding.AddDamage ( float  d)
inline

Adds arbitrary damage to the structure. Damage units are measured in momentum. (vel*mass) No damage will be added if game parameters call for indestructible facilities.

Parameters
damage
void DestructibleBuilding.ClearID ( )
inline
void DestructibleBuilding.CompileID ( )
inline
void DestructibleBuilding.Demolish ( )
inline
List<ProtoVessel> DestructibleBuilding.FindVesselsOverStructure ( FlightState  st)
inline
void DestructibleBuilding.FixedUpdate ( )
inline
MonoBehaviour DestructibleBuilding.GetInstance ( )
inline

Implements ICollisionEvents.

float DestructibleBuilding.GetRepairSequenceDuration ( )
inline
void DestructibleBuilding.Load ( ConfigNode  node)
inline
void DestructibleBuilding.OnCollisionEnter ( Collision  c)
inline

< ease in and out function, makes < 0.5 values extra low, and > 0.5 values extra high

< yes, this might be a redo of a prior normalization step. Ah well.

Implements ICollisionEvents.

void DestructibleBuilding.OnCollisionExit ( Collision  c)
inline

Implements ICollisionEvents.

void DestructibleBuilding.OnCollisionStay ( Collision  c)
inline

Implements ICollisionEvents.

bool DestructibleBuilding.RegisterInstance ( )
inline
void DestructibleBuilding.Repair ( )
inline
void DestructibleBuilding.Reset ( )
inline

Reset, unlike Repair, returns the building to its initial intact state silently (without any effects or sounds and without firing events). Used for loading between saves.

void DestructibleBuilding.Save ( ConfigNode  node)
inline
void DestructibleBuilding.UnregisterInstance ( bool  saveState)
inline

Member Data Documentation

float DestructibleBuilding.BuildingToughnessFactor = 0.75f
static
float DestructibleBuilding.CollapseReputationHit = 0f
CollapsibleObject [] DestructibleBuilding.CollapsibleObjects

A list of objects which will be brought down when demolishing

float DestructibleBuilding.damageDecay = 5f
VFXSequencer DestructibleBuilding.DemolitionFXPrefab

The sequence of sounds and visual effects to be triggered on demolition.

float DestructibleBuilding.FacilityDamageFraction = 0f
Transform DestructibleBuilding.FxTarget

Where to spawn the fx

string DestructibleBuilding.id
float DestructibleBuilding.impactMomentumThreshold = 500f
EventData<DestructibleBuilding> DestructibleBuilding.OnLoaded = new EventData<DestructibleBuilding>("OnDestructibleLoaded")
static
bool DestructibleBuilding.preCompiledId
float DestructibleBuilding.RepairCost = 0f
VFXSequencer DestructibleBuilding.RepairFXPrefab

The sequence of sounds and visual effects to be triggered on repairing.

Property Documentation

float DestructibleBuilding.Damage
get
bool DestructibleBuilding.IsDestroyed
get
bool DestructibleBuilding.IsIntact
get

The documentation for this class was generated from the following file: