New input_action : Possibility of allow/forbid usage of hand ghosting

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
Masamune00
Inserter
Inserter
Posts: 27
Joined: Sat Nov 26, 2016 11:48 am
Contact:

New input_action : Possibility of allow/forbid usage of hand ghosting

Post by Masamune00 »

Hello,

It would be nice to have an input_action added that can allow or forbid hand-ghosting (shift click with a building in hand).


I have not seen an input_action that can change that, there are lot of permissions with blueprint (copy, paste and so on) but it is just this case of hand-ghosting missing :
https://lua-api.factorio.com/latest/def ... put_action
On some scenario, we like to restrict what some users can do, hence the need of this new permission, currently we are using "on_built_entity" as a workaround but we will like to use a permission instead.

Thanks you for your time !
Regards,
Masamune00

User avatar
boskid
Factorio Staff
Factorio Staff
Posts: 2250
Joined: Thu Dec 14, 2017 6:56 pm
Contact:

Re: New input_action : Possibility of allow/forbid usage of hand ghosting

Post by boskid »

There may be slight misunderstanding here. In order for factorio to work in multiplayer, literally everything a player can do has a related input action because those input actions are messages which are sent to the server which distributes it to other clients so they can correctly simulate the game state taking into account what every player did. That means if a player is building ghosts this is still going through InputAction::Build, but that input action simply has quite a lot of parameters inside (position, direction, created by moving, allow belt power replace, shift build, skip fog of war, blueprint flip, smart belt building). Its unlikely there would ever be a input action permissions system that would allow to filter input actions based on their parameters. In 1.1.x there is also a limit of how many different input actions can be defined, limit is 256 and there are 245 input actions right now. Multiplying input actions by their specific parameters also is not an option right now.

Masamune00
Inserter
Inserter
Posts: 27
Joined: Sat Nov 26, 2016 11:48 am
Contact:

Re: New input_action : Possibility of allow/forbid usage of hand ghosting

Post by Masamune00 »

Thanks you for your time and answer ! I understand that it's very unlikely to be added, then we shall continue using on_built_entity event instead, which works still but I would have liked more to avoid using that.

I think permission is prob less intensive than doing all kind of checks on built_entity, but maybe it's a wrong worry and maybe it just takes 1ns to do this check... so even like with 40 players building, maybe it doesn't matter..?

Post Reply

Return to “Modding interface requests”