mod defined permission/action

Things that we aren't going to implement
gheift
Fast Inserter
Fast Inserter
Posts: 188
Joined: Tue Mar 03, 2015 9:20 pm
Contact:

mod defined permission/action

Post by gheift »

Hi,

I do not know if it was suggested somewhere, but I think for some mods additional actions/permissions would be useful.

My suggestion therefore is to add a mod-setting like the following:

Code: Select all

data:extend{
    {
         type = "bool-setting",
         name = "my-custom-action",
         setting_type = "user-mod-action",
         default_value = true,
     }
}
The only difference to the runtime-per-user settings would be: these mod-settings can be managed in the permission dialog. The handling inside the control.lua would be not different from normal runtime-per-user settings: accessing readonly by game.players.mod_settings["my-custom-action"].value and change notification via on_runtime_mod_setting_changed.

Additionaly it can be managed with LuaPermssionGroup.allows_action("my-customu-action") and LuaPermssionGroup.set_allows_action("my-custom-action", true/false).

Kind regards,
Gerhard
Rseding91
Factorio Staff
Factorio Staff
Posts: 14601
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: mod defined permission/action

Post by Rseding91 »

The current permissions system the game uses isn't built to support this. The current system is purely built around input actions and how the game interprets them.

That might change in the future but for now that's how it is.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Won't implement”