Skip to content

AutoRefuelMannedTurrets

juanosarg edited this page Jun 3, 2026 · 1 revision

<- Back

AutoRefuelMannedTurrets is a def extension used with CompProperties_Mannable turrets

      /// Used for logging errors if the def is missing CompProperties_Mannable.
      /// This should be left as true unless you're making a C# mod that uses this extension and doesn't rely on mannable comp.
      protected bool logMissingMannableComp = true;

      /// Determines if a pawn will ever reload a single piece of ammo at a time (default behavior for reinforced barrels), or as much as possible.
      public bool reloadsMoreThanSingleItem = false;

How do I use this code?

This Def Extension is added to the ThingDef of the turret you want to add it to.

If you aren't sure if the ThingDef ALREADY has an extension (for example, if you think another mod will add their own), always use XPATH (xml patching) to add an extension, as there is already a PatchOperationAddModExtension to ensure they don't collide.

For example, the arbalest in Vanilla Factions Expanded - Medieval 2:

<modExtensions>
	<li Class="VEF.Weapons.AutoRefuelMannedTurrets">
		<reloadsMoreThanSingleItem>true</reloadsMoreThanSingleItem>
	</li>
</modExtensions>

Clone this wiki locally