C# Class CaveworldFlora.ClusterPlant

ClusterPlant class.
Inheritance: Plant
Datei anzeigen Open project: Rikiki123456789/Rimworld Class Usage Examples

Public Properties

Property Type Description
cluster Cluster
glower Thing

Public Methods

Method Description
CanTerrainSupportPlantAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
Destroy ( DestroyMode mode = DestroyMode.Vanish ) : void

Destroy the plant and the associated glower if existing.

ExposeData ( ) : void

Save and load internal state variables (stored in savegame data).

GetInspectString ( ) : string

Build the inspect string.

IsFertilityConditionOkAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
IsLightConditionOkAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
IsNaturalRoughRockAt ( IntVec3 position ) : bool
IsNearNaturalRockBlock ( IntVec3 position ) : bool
IsTemperatureConditionOkAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
SpawnSetup ( ) : void

Initialize instance variables.

TickLong ( ) : void

Main function: - update the glower if necessary. - verify the cave plant is in good conditions to growth. - when the cave plant is too old, damage it over time. - when the cave plant is mature, try to reproduce.

UpdateGlowerAccordingToGrowth ( ) : void

Update the glower according to the plant growth, cryostatis state and snow depth.

Protected Methods

Method Description
TryToDestroyGlower ( ) : void

Method Details

CanTerrainSupportPlantAt() public static method

public static CanTerrainSupportPlantAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
plantDef ThingDef_ClusterPlant
position IntVec3
return bool

Destroy() public method

Destroy the plant and the associated glower if existing.
public Destroy ( DestroyMode mode = DestroyMode.Vanish ) : void
mode DestroyMode
return void

ExposeData() public method

Save and load internal state variables (stored in savegame data).
public ExposeData ( ) : void
return void

GetInspectString() public method

Build the inspect string.
public GetInspectString ( ) : string
return string

IsFertilityConditionOkAt() public static method

public static IsFertilityConditionOkAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
plantDef ThingDef_ClusterPlant
position IntVec3
return bool

IsLightConditionOkAt() public static method

public static IsLightConditionOkAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
plantDef ThingDef_ClusterPlant
position IntVec3
return bool

IsNaturalRoughRockAt() public static method

public static IsNaturalRoughRockAt ( IntVec3 position ) : bool
position IntVec3
return bool

IsNearNaturalRockBlock() public static method

public static IsNearNaturalRockBlock ( IntVec3 position ) : bool
position IntVec3
return bool

IsTemperatureConditionOkAt() public static method

public static IsTemperatureConditionOkAt ( ThingDef_ClusterPlant plantDef, IntVec3 position ) : bool
plantDef ThingDef_ClusterPlant
position IntVec3
return bool

SpawnSetup() public method

Initialize instance variables.
public SpawnSetup ( ) : void
return void

TickLong() public method

Main function: - update the glower if necessary. - verify the cave plant is in good conditions to growth. - when the cave plant is too old, damage it over time. - when the cave plant is mature, try to reproduce.
public TickLong ( ) : void
return void

TryToDestroyGlower() protected method

protected TryToDestroyGlower ( ) : void
return void

UpdateGlowerAccordingToGrowth() public method

Update the glower according to the plant growth, cryostatis state and snow depth.
public UpdateGlowerAccordingToGrowth ( ) : void
return void

Property Details

cluster public_oe property

public Cluster,CaveworldFlora cluster
return Cluster

glower public_oe property

public Thing glower
return Thing