Skip to content

GravshipLaunchExtension

juanosarg edited this page Jun 4, 2026 · 1 revision

<- Back

GravshipLaunchExtension extends the behaviour of gravship launches

     /// Determines if this building should be considered an oxygen pusher.
     /// Having any such building will remove the warning about having no oxygen pump on the gravship while launching into orbit.
     /// If there's less than 1 oxygen pusher per 400 tiles of substructure, a warning about low amount of oxygen pumps will be displayed.
     /// Using this is not needed if you're using vanilla CompOxygenPusher/CompProperties_OxygenPusher.

     public bool isOxygenPusher = false;

     /// Determines if this building should be considered a heater.
     /// Having any such building will remove the warning about having no heaters on the gravship while launching into orbit.
     /// If there's less than 1 heater per 250 tiles of substructure, a warning about low amount of heaters will be displayed.
     /// Using this is not needed if you're using vanilla Building_Heater, or CompHeatPusher/CompProperties_HeatPusher with heatPerSecond of over 20.

     public bool isHeater = false;

How to use this code?

It is a def extension, so you just add it in XML in the <modExtensions> tag.

For example, this is patched into the base game Life support unit in Vanilla Gravship Expanded:

<Patch>
  <!-- Life support unit doesn't count as a heater or oxygen pusher in Vanilla, 
so let's make it both in case of mods allowing players to minify it. -->
  <Operation Class="PatchOperationAddModExtension">
    <xpath>Defs/ThingDef[defName="LifeSupportUnit"]</xpath>
    <value>
      <li Class="VEF.Buildings.GravshipLaunchExtension">
        <isOxygenPusher>true</isOxygenPusher>
        <isHeater>true</isHeater>
      </li>
    </value>
  </Operation>

</Patch>

Clone this wiki locally