C# Класс FishIndustry.Building_AquacultureBasin

Наследование: Building_WorkTable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
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.

Описание методов

ComputeDrawingParameters() публичный Метод

Throw bubbles according to the current water quality.
public ComputeDrawingParameters ( ) : void
Результат void

Draw() публичный Метод

Draw an icon of the currently breeding species and the micro fungus infestation when active.
public Draw ( ) : void
Результат void

ExposeData() публичный Метод

Save and load variables (stored in savegame data).
public ExposeData ( ) : void
Результат void

GetFoodFromAquacultureHopper() публичный Метод

Check if there is enough food in one of the adjacent aquaculture hoppers and consume it if available.
public GetFoodFromAquacultureHopper ( ) : bool
Результат bool

GetInspectString() публичный Метод

Get the string displayed in the inspection panel.
public GetInspectString ( ) : string
Результат string

GetProduction() публичный Метод

Gather the aquaculture basin production and restart a new breeding cycle of the same species.
public GetProduction ( ) : Thing
Результат Thing

IsAcceptableFeedstock() публичный статический Метод

public static IsAcceptableFeedstock ( ThingDef def ) : bool
def ThingDef
Результат bool

IsEnoughFoodInHopper() публичный Метод

Check if there is enough food in the adjacent aquaculture hoppers.
public IsEnoughFoodInHopper ( ) : bool
Результат bool

KillBredSpecies() публичный Метод

The bred species is killed.
public KillBredSpecies ( ) : void
Результат void

ResetBillsIfNecessary() публичный Метод

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
Результат void

SpawnSetup() публичный Метод

Initialize instance variables.
public SpawnSetup ( ) : void
Результат void

StartMicroFungusInfestation() публичный Метод

Start a micro fungus infestation.
public StartMicroFungusInfestation ( int infestationDuration ) : void
infestationDuration int
Результат void

StartNewBreedCycle() публичный Метод

Start a new breeding cycle of the given species.
public StartNewBreedCycle ( ThingDef breedingSpeciesDef ) : void
breedingSpeciesDef ThingDef
Результат void

ThrowBubble() публичный статический Метод

Throw a bubble.
public static ThrowBubble ( IntVec3 cell ) : Mote
cell IntVec3
Результат Mote

Tick() публичный Метод

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
Результат void

TryFeedFishes() публичный Метод

Try to feed the fishes.
public TryFeedFishes ( ) : void
Результат void

UpdateFishesHealth() публичный Метод

Update the fishes heatlh. Health decreases when: - water quality is too bad. - there is no food available.
public UpdateFishesHealth ( ) : void
Результат void

UpdateWaterQuality() публичный Метод

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
Результат void

Описание свойств

bluebladeTexture публичное статическое свойство

public static Material,UnityEngine bluebladeTexture
Результат UnityEngine.Material

breedingDuratinInTicks публичное свойство

public int breedingDuratinInTicks
Результат int

breedingIsFinished публичное свойство

public bool breedingIsFinished
Результат bool

breedingProgressInTicks публичное свойство

public int breedingProgressInTicks
Результат int

breedingSpeciesDef публичное свойство

public ThingDef breedingSpeciesDef
Результат ThingDef

breedingSpeciesMatrix публичное свойство

public Matrix4x4,UnityEngine breedingSpeciesMatrix
Результат UnityEngine.Matrix4x4

breedingSpeciesScale публичное свойство

public Vector3 breedingSpeciesScale
Результат Vector3

breedingSpeciesTexture публичное свойство

public Material,UnityEngine breedingSpeciesTexture
Результат UnityEngine.Material

fishesHealthInPercent публичное свойство

public int fishesHealthInPercent
Результат int

foodIsAvailable публичное свойство

public bool foodIsAvailable
Результат bool

mashgonTexture публичное статическое свойство

public static Material,UnityEngine mashgonTexture
Результат UnityEngine.Material

microFungusFadingFactor публичное свойство

public float microFungusFadingFactor
Результат float

microFungusMatrix публичное свойство

public Matrix4x4,UnityEngine microFungusMatrix
Результат UnityEngine.Matrix4x4

microFungusRemainingDurationInTicks публичное свойство

public int microFungusRemainingDurationInTicks
Результат int

microFungusScale публичное свойство

public Vector3 microFungusScale
Результат Vector3

microFungusTexture публичное статическое свойство

public static Material,UnityEngine microFungusTexture
Результат UnityEngine.Material

nextBubbleThrowTick публичное свойство

public int nextBubbleThrowTick
Результат int

nextFeedingDateInTicks публичное свойство

public int nextFeedingDateInTicks
Результат int

powerComp публичное свойство

public CompPowerTrader powerComp
Результат CompPowerTrader

tailTeethTexture публичное статическое свойство

public static Material,UnityEngine tailTeethTexture
Результат UnityEngine.Material

temperature публичное свойство

public float temperature
Результат float

waterQuality публичное свойство

public float waterQuality
Результат float