LootableBuilding_Custom - Vanilla-Expanded/VanillaExpandedFramework GitHub Wiki
LootableBuilding_Custom creates lootable buildings that don't use base game IOpenable interface, so you can specify gizmos, descriptions for such, etc
First of all, the thingClass of the building needs to be:
<thingClass>VEF.Buildings.LootableBuilding_Custom</thingClass>
Secondly, you need a mod extension that tells the main class what to pop up when the building is opened. This mod extension is LootableBuildingDetails, which is the same as VEF.Buildings.LootableBuilding
public bool randomFromContents = false;
public IntRange totalRandomLoops = new IntRange(1, 1);
public List<ThingAndCount> contents = null;
public ThingDef buildingLeft = null;
public SoundDef deconstructSound = null;
public string gizmoTexture;
public string gizmoText;
public string gizmoDesc;
public string cancelLootingGizmoTexture;
public string cancelLootinggizmoText;
public string cancelLootinggizmoDesc;
public string requiredMod = "";
public string overlayTexture;
ThingAndCount is a container class:
public class ThingAndCount
{
public ThingDef thing;
public int count = 1;
}
These are the chunks in Vanilla Quests Expanded - Cryptoforge:
<modExtensions>
<li Class="VEF.Buildings.LootableBuildingDetails">
<contents>
<li>
<thing>Steel</thing>
<count>15</count>
</li>
</contents>
<deconstructSound>Building_Deconstructed</deconstructSound>
<gizmoText>VQE_Scavenge</gizmoText>
<gizmoTexture>UI/ScavengeJunk_Gizmo</gizmoTexture>
<gizmoDesc>VQE_ScavengeDesc</gizmoDesc>
<cancelLootinggizmoDesc>VQE_CancelScavengeDesc</cancelLootinggizmoDesc>
<cancelLootinggizmoText>VQE_CancelScavenge</cancelLootinggizmoText>
<cancelLootingGizmoTexture>UI/Designators/Cancel</cancelLootingGizmoTexture>
</li>
</modExtensions>