Skip to content

Does not add to Home region when deconstruct buildings; #205

@soulkata

Description

@soulkata

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...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions