[Request] A way to prevent certain player actions

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Vudjun
Burner Inserter
Burner Inserter
Posts: 12
Joined: Fri Mar 04, 2016 8:12 pm
Contact:

[Request] A way to prevent certain player actions

Post by Vudjun »

Hi,

I'd like a way to prevent a player from performing certain actions.

The first of these is picking up specific items. I can partially achieve this by listening on the on_picked_up_item event, then removing the item from the players inventory, but I can't replace the item on the ground where it was picked up from (since the event doesn't provide that information).

Another event I'd like to be able to prevent is the on_preplayer_mined_item event (prevent a player from mining buildings and resources in a certain area).
Lastly, a way to prevent players from damaging certain things (with cars, weapons, etc). There's no on_entity_damaged or similar event to listen on here.

The reason I'd like these is I'm developing a public Factorio "plots" server, and it is impossible to fully protect player plots without this.

Thanks.

Post Reply

Return to “Modding interface requests”