-
Notifications
You must be signed in to change notification settings - Fork 50
CompProperties_Resource
KylianB edited this page Jul 22, 2022
·
4 revisions
This comp can be added to any building. It's the most basic comp that exist within the framework. It allows said building to connect to other buildings in the net.
Below, an example of the comp, the building do not need to tick.
<li Class="PipeSystem.CompProperties_Resource">
<!-- Accept a PipeNetDef -->
<pipeNet>TestNet</pipeNet>
<!-- If you plan on using the premade sustainer methods -->
<sustainer>SoundDef</sustainer>
</li>
If your building have this comp, and you want to access the PipeNet. Use the GetComp<CompResource>()
method. Then you have access to:
public virtual PipeNet PipeNet
public virtual bool TransmitResourceNow
public Resource Resource
public PipeNetManager PipeNetManager
/// <summary>
/// Try spawn sustainer
/// </summary>
public void StartSustainer();
/// <summary>
/// End and remove sustainer
/// </summary>
public void EndSustainer();
/// <summary>
/// If have an ambient sound, and should be active now, maintain it
/// If it is null or ended, recreate it.
/// If it shouldn't make sound, end it and null it.
/// </summary>
/// <param name="check">Should make sound?</param>
public void UpdateSustainer(bool check);
- Abilities
- Aesthetic scaling
- Animal Behaviours
- Apparels
- Buildings
- Cooking
- Factions
- Genes
- Global
- Graphics
- Hediffs
- Maps
- Memes
- OptionalFeatures
- Pawns
- Planet
- Plants
- Storyteller
- Things
- Weapons
- Weathers
- PipeSystem basics
- Resource
- Resource storage
- Resource processor
- Resource to thing
- Resource to power
- Thing to resource
- Resource trader
- Refill building with pipes
- Pipe valve
- Advanced Resource Processor
- Update to KCSG 2.0
- Exporting buildings
- Customizing symbols
- Debug helpers options
- Custom faction settlement
- Custom structure and scenarios
- Custom structure in quests
- Custom structure in WorldObjects
- Biome based structures
- Spawning world object(s) at world generation
- Prevent settlement spawning for nomadic factions