Misc Spots placement handlers

Started by Pelador, February 10, 2019, 06:58:02 PM

Previous topic - Next topic

Pelador

For the Misc buildings that add floor emplacements like Party spot, Caravan Spot and Wedding spot they have some coding handler that prevents you from placing duplicates.

There is no particular "placeworker" assigned to them in their thingDefs, so there has to be something else performing this function.

Can anyone point me in the right direction in the source code where this functionality is handled?

Adil

They don't have placeworker, but they have their own classes. For example:     <thingClass>Building_MarriageSpot</thingClass> for wedding spot. You can look what that class does in decompiled code.

A simple example of how that can be handled is the trading spot mod: https://github.com/KiameV/rimworld-tradingspot/blob/master/Source/TradingSpot.cs#L17

Pelador