Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blueprint Not Destroyed with Supporting Building #19

Open
ghost opened this issue Aug 31, 2015 · 2 comments
Open

Blueprint Not Destroyed with Supporting Building #19

ghost opened this issue Aug 31, 2015 · 2 comments
Labels

Comments

@ghost
Copy link

ghost commented Aug 31, 2015

When using the OnlyOnThing option for CommunityCoreLibrary.RestrictedPlacement_Comp a blueprint is not removed/destroyed when the underlying thing is destroyed.

Tested by building on a wall with this XML:

<building>
  <isEdifice>False</isEdifice>
</building>
...
<comps>
  <li Class="CommunityCoreLibrary.RestrictedPlacement_Properties">
    <compClass>CommunityCoreLibrary.RestrictedPlacement_Comp</compClass>
    <thingDefs>
      <li>Wall</li>
    </thingDefs>
  </li>
</comps>
...
<placeWorkers>
  <li>CommunityCoreLibrary.PlaceWorker_OnlyOnThing</li>
</placeWorkers>

Then activate god mode and de-construct the wall, the blueprint is not removed. Once the blueprint is constructed the building is destroyed with the "A support was removed" message. Same behavior happens without god mode and letting a colonist de-construct the wall.

@ForsakenShell
Copy link
Contributor

This could take a little while to solve. The problem is that the blueprint doesn't carry the thing comp to tick yet, so it can't check that it's restrictions have changed.

@ForsakenShell
Copy link
Contributor

I think a possible solution to this is to switch from the comp checking the status of the building to a map component which does a periodic scan. This way buildings and blueprints alike can be destroyed as well as removing the requirement for the building itself to tick.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant