Because other mods are not supposed to initialize these bricks like they do for manually placing one.
I don't want anything adding door events, setting the item for a bot spawn, zones disabling rendering, etc.
Calling onLoadPlant means that this brick will get all properties set from whatever "loaded" it, and should not be modified like that.
I may have misunderstood what that function is all about. I thought it was used when you load a save, and only when you're doing so. Not when you plant the brick. Would you know an alternative for loaded bricks?
Not sure what this means.
Player A plants a plate and events it so Player B have the ownership of the apartment on it. Player B may then place and edit bricks on that Player A's plate. Player C have trust with Player B and can therefore plant his bricks on Player A's plate. This works alright while planting normally.
When loading a save, each brick have its onLoadPlant called and when a brick finds out that it's loaded on top of Player A's plate which contains the event set for apartment owner Player B, it will therefore set all bricks right above the plate to Player B. The rest of the bricks will automatically be set to Player B due to how the loading system works.
However, when using the New Duplicator, it should work so you can duplicate and place them right on Player A's plate and then set them to the player planting the brick. In this case, as you call onLoadPlant, if Player C plant his brick on Player A's plate, the ownership of the bottom brick planted will go to Player B and not Player C as it should.
As mentioned above, would you know a better way to handle this?