I have a building in my mod, that I feel is very OP. I was thinking that I could make it that, once placed, it could not be moved. If you did move it, it would be destroyed.
I was able to do this by changing the "minable" line
minable = {hardness = 0.2, mining_time = 0.5, result = "AlienControlStation"},
to
minable = {hardness = 0.2, mining_time = 0.5, result = "stone-brick"},
So now, when picked-up I get a brick and not the station anymore.
I was wondering, is there a way to get a warning message letting you know it's going to be destroyed?
Can I say how many items I get back? Like 50 bricks, or bricks and something else?
Any other thoughts how to handle this?
Thanks.
Destroy Building on Pick-up/Mine
-
- Filter Inserter
- Posts: 952
- Joined: Sat May 23, 2015 12:10 pm
- Contact:
Re: Destroy Building on Pick-up/Mine
or make it non-minable so you need to shoot it to destroy it.
if you take a gun to your building you know you are not getting it back.
if you take a gun to your building you know you are not getting it back.
Re: Destroy Building on Pick-up/Mine
If you make hardness a large enough value it cannot be mined. This is based on the power of the tool vs the hardness of the object. Mods may allow more powerful tools. When the hardness is larger than the tools power it is not able to be mined.
Re: Destroy Building on Pick-up/Mine
If you don't want the entity to be minable just exclude the minable property from the prototype.
If you want it to mine into multiple items define results instead of result.
If you want it to mine into multiple items define results instead of result.
If you want to get ahold of me I'm almost always on Discord.
Re: Destroy Building on Pick-up/Mine
Thanks Rseding91, I did not know that. My solution was to create an expensive intermediary item and have that the result. So you'd get most back, but lose, in my case the alien artifacts used to create the item.Rseding91 wrote:If you don't want the entity to be minable just exclude the minable property from the prototype.
If you want it to mine into multiple items define results instead of result.