Open soulkata opened 3 months ago
I would like when deconstruct a building, it won't add home region around that building. To have same behaviour as normal deconstruct of mine...
I took the liberty of looking into code... On ManagerJob_Mining at line 669 there is:
if (building?.ClaimableBy(Faction.OfPlayer) ?? false) building.SetFaction(Faction.OfPlayer);
The SetFaction add the region to home area... if change to something like that:
if (building?.ClaimableBy(Faction.OfPlayer) ?? false) { bool originalValue = Find.PlaySettings.autoHomeArea; try { Find.PlaySettings.autoHomeArea = false; building.SetFaction(Faction.OfPlayer); } finally { Find.PlaySettings.autoHomeArea = originalValue; } }
It won't add to home area...
I would like when deconstruct a building, it won't add home region around that building. To have same behaviour as normal deconstruct of mine...
I took the liberty of looking into code... On ManagerJob_Mining at line 669 there is:
if (building?.ClaimableBy(Faction.OfPlayer) ?? false) building.SetFaction(Faction.OfPlayer);
The SetFaction add the region to home area... if change to something like that:
if (building?.ClaimableBy(Faction.OfPlayer) ?? false) { bool originalValue = Find.PlaySettings.autoHomeArea; try { Find.PlaySettings.autoHomeArea = false; building.SetFaction(Faction.OfPlayer); } finally { Find.PlaySettings.autoHomeArea = originalValue; } }
It won't add to home area...