diff --git a/RealEstate/Overrides/SimulateBarricadeOverride.cs b/RealEstate/Overrides/SimulateBarricadeOverride.cs index 47562db..cae196f 100644 --- a/RealEstate/Overrides/SimulateBarricadeOverride.cs +++ b/RealEstate/Overrides/SimulateBarricadeOverride.cs @@ -23,6 +23,9 @@ internal static bool Prefix(UseableBarricade __instance, uint simulation, bool i if (GetValue(__instance, "isUsing", BindingFlags.NonPublic | BindingFlags.Instance)) { + if (GetValue(__instance, "parentVehicle", BindingFlags.NonPublic | BindingFlags.Instance) != null && RealEstate.instance.Configuration.Instance.enableBuildingOnVehicles) + return true; + House house = RealEstate.manager.HouseFromPosition(GetValue(__instance, "point", BindingFlags.NonPublic | BindingFlags.Instance)); if (house == null && RealEstate.instance.Configuration.Instance.disableBuildingIfNotInHome) diff --git a/RealEstate/RealEstateConfiguration.cs b/RealEstate/RealEstateConfiguration.cs index 36cc17e..11027c8 100644 --- a/RealEstate/RealEstateConfiguration.cs +++ b/RealEstate/RealEstateConfiguration.cs @@ -15,6 +15,7 @@ public class RealEstateConfiguration : IRocketPluginConfiguration public int feePaymentTimeInMinutes; public bool destroyStructuresOnEviction; public bool disableBuildingIfNotInHome; + public bool enableBuildingOnVehicles; public List homes; public List displayNames; @@ -26,6 +27,7 @@ public void LoadDefaults() feePaymentTimeInMinutes = 1440; destroyStructuresOnEviction = false; disableBuildingIfNotInHome = false; + enableBuildingOnVehicles = false; homes = new List(); displayNames = new List();