C# Class FishIndustry.Building_AquacultureBasin

Inheritance: Building_WorkTable
Show file Open project: Rikiki123456789/Rimworld Class Usage Examples

Public Properties

Property Type Description
bluebladeTexture UnityEngine.Material
breedingDuratinInTicks int
breedingIsFinished bool
breedingProgressInTicks int
breedingSpeciesDef ThingDef
breedingSpeciesMatrix UnityEngine.Matrix4x4
breedingSpeciesScale Vector3
breedingSpeciesTexture UnityEngine.Material
fishesHealthInPercent int
foodIsAvailable bool
mashgonTexture UnityEngine.Material
microFungusFadingFactor float
microFungusMatrix UnityEngine.Matrix4x4
microFungusRemainingDurationInTicks int
microFungusScale Vector3
microFungusTexture UnityEngine.Material
nextBubbleThrowTick int
nextFeedingDateInTicks int
powerComp CompPowerTrader
tailTeethTexture UnityEngine.Material
temperature float
waterQuality float

Public Methods

Method Description
ComputeDrawingParameters ( ) : void

Throw bubbles according to the current water quality.

Draw ( ) : void

Draw an icon of the currently breeding species and the micro fungus infestation when active.

ExposeData ( ) : void

Save and load variables (stored in savegame data).

GetFoodFromAquacultureHopper ( ) : bool

Check if there is enough food in one of the adjacent aquaculture hoppers and consume it if available.

GetInspectString ( ) : string

Get the string displayed in the inspection panel.

GetProduction ( ) : Thing

Gather the aquaculture basin production and restart a new breeding cycle of the same species.

IsAcceptableFeedstock ( ThingDef def ) : bool
IsEnoughFoodInHopper ( ) : bool

Check if there is enough food in the adjacent aquaculture hoppers.

KillBredSpecies ( ) : void

The bred species is killed.

ResetBillsIfNecessary ( ) : void

Reset the aquaculture bills if the user has messed with it (cancelled a bill for example). We need to set custom Bill_Production_AquacultureBasin to call the StartNewBreedCycle function upon bill completion.

SpawnSetup ( ) : void

Initialize instance variables.

StartMicroFungusInfestation ( int infestationDuration ) : void

Start a micro fungus infestation.

StartNewBreedCycle ( ThingDef breedingSpeciesDef ) : void

Start a new breeding cycle of the given species.

ThrowBubble ( IntVec3 cell ) : Mote

Throw a bubble.

Tick ( ) : void

Breed some fishes: - update the remaining microfungus infestation duration. - try to get some food from an adjacent aquaculture hopper. - update the water quality. - update the bred fishes health. - reset the bills if necessary. - compute the drawing parameters (bubbles generation).

TryFeedFishes ( ) : void

Try to feed the fishes.

UpdateFishesHealth ( ) : void

Update the fishes heatlh. Health decreases when: - water quality is too bad. - there is no food available.

UpdateWaterQuality ( ) : void

Update the water quality: - water quality decrease when aquaculture basin is unpowered or temperature is not in optimal range. - water quality recovers when aquaculture basin is powered.

Method Details

ComputeDrawingParameters() public method

Throw bubbles according to the current water quality.
public ComputeDrawingParameters ( ) : void
return void

Draw() public method

Draw an icon of the currently breeding species and the micro fungus infestation when active.
public Draw ( ) : void
return void

ExposeData() public method

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

GetFoodFromAquacultureHopper() public method

Check if there is enough food in one of the adjacent aquaculture hoppers and consume it if available.
public GetFoodFromAquacultureHopper ( ) : bool
return bool

GetInspectString() public method

Get the string displayed in the inspection panel.
public GetInspectString ( ) : string
return string

GetProduction() public method

Gather the aquaculture basin production and restart a new breeding cycle of the same species.
public GetProduction ( ) : Thing
return Thing

IsAcceptableFeedstock() public static method

public static IsAcceptableFeedstock ( ThingDef def ) : bool
def ThingDef
return bool

IsEnoughFoodInHopper() public method

Check if there is enough food in the adjacent aquaculture hoppers.
public IsEnoughFoodInHopper ( ) : bool
return bool

KillBredSpecies() public method

The bred species is killed.
public KillBredSpecies ( ) : void
return void

ResetBillsIfNecessary() public method

Reset the aquaculture bills if the user has messed with it (cancelled a bill for example). We need to set custom Bill_Production_AquacultureBasin to call the StartNewBreedCycle function upon bill completion.
public ResetBillsIfNecessary ( ) : void
return void

SpawnSetup() public method

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

StartMicroFungusInfestation() public method

Start a micro fungus infestation.
public StartMicroFungusInfestation ( int infestationDuration ) : void
infestationDuration int
return void

StartNewBreedCycle() public method

Start a new breeding cycle of the given species.
public StartNewBreedCycle ( ThingDef breedingSpeciesDef ) : void
breedingSpeciesDef ThingDef
return void

ThrowBubble() public static method

Throw a bubble.
public static ThrowBubble ( IntVec3 cell ) : Mote
cell IntVec3
return Mote

Tick() public method

Breed some fishes: - update the remaining microfungus infestation duration. - try to get some food from an adjacent aquaculture hopper. - update the water quality. - update the bred fishes health. - reset the bills if necessary. - compute the drawing parameters (bubbles generation).
public Tick ( ) : void
return void

TryFeedFishes() public method

Try to feed the fishes.
public TryFeedFishes ( ) : void
return void

UpdateFishesHealth() public method

Update the fishes heatlh. Health decreases when: - water quality is too bad. - there is no food available.
public UpdateFishesHealth ( ) : void
return void

UpdateWaterQuality() public method

Update the water quality: - water quality decrease when aquaculture basin is unpowered or temperature is not in optimal range. - water quality recovers when aquaculture basin is powered.
public UpdateWaterQuality ( ) : void
return void

Property Details

bluebladeTexture public static property

public static Material,UnityEngine bluebladeTexture
return UnityEngine.Material

breedingDuratinInTicks public property

public int breedingDuratinInTicks
return int

breedingIsFinished public property

public bool breedingIsFinished
return bool

breedingProgressInTicks public property

public int breedingProgressInTicks
return int

breedingSpeciesDef public property

public ThingDef breedingSpeciesDef
return ThingDef

breedingSpeciesMatrix public property

public Matrix4x4,UnityEngine breedingSpeciesMatrix
return UnityEngine.Matrix4x4

breedingSpeciesScale public property

public Vector3 breedingSpeciesScale
return Vector3

breedingSpeciesTexture public property

public Material,UnityEngine breedingSpeciesTexture
return UnityEngine.Material

fishesHealthInPercent public property

public int fishesHealthInPercent
return int

foodIsAvailable public property

public bool foodIsAvailable
return bool

mashgonTexture public static property

public static Material,UnityEngine mashgonTexture
return UnityEngine.Material

microFungusFadingFactor public property

public float microFungusFadingFactor
return float

microFungusMatrix public property

public Matrix4x4,UnityEngine microFungusMatrix
return UnityEngine.Matrix4x4

microFungusRemainingDurationInTicks public property

public int microFungusRemainingDurationInTicks
return int

microFungusScale public property

public Vector3 microFungusScale
return Vector3

microFungusTexture public static property

public static Material,UnityEngine microFungusTexture
return UnityEngine.Material

nextBubbleThrowTick public property

public int nextBubbleThrowTick
return int

nextFeedingDateInTicks public property

public int nextFeedingDateInTicks
return int

powerComp public property

public CompPowerTrader powerComp
return CompPowerTrader

tailTeethTexture public static property

public static Material,UnityEngine tailTeethTexture
return UnityEngine.Material

temperature public property

public float temperature
return float

waterQuality public property

public float waterQuality
return float