Refactorio / RedMew

The RedMew scenario code for Factorio.
https://redmew.com
GNU General Public License v3.0
177 stars 80 forks source link

Ingame Admin Interface - Discussion #403

Open naquadah opened 5 years ago

naquadah commented 5 years ago

Tread to discuss everything about an in-game admin interface Bringing this suggestion back alive as since when we last discussed, there was consensus back then to wait for 0.17's new GUI overhaul. 0.17 is not that far away anymore.

To make server moderation easier and more efficient, it would be great to have an in-game interface for admins that contains buttons to execute certain commands. There is many reasons why this would be a great addition. Like making it easier for less technical admins to deal with complex issues, or the ability to select a player to ban instead of writing names that sometimes are made in a way to make it difficult to ban them fast like "lllllllllllllllll".

Unfinished/Suggestion for the commands to added to interface.

Extra/map specific command

mheguy commented 5 years ago

As you correctly pointed out, this is a discussion for 0.17 since what you're asking for is pretty extensive.

In the interim, starting next map the report tool in the player list will jail players if clicked by admins. This should buy them enough time to figure out any and all commands required.

linaori commented 5 years ago

What's changing in 0.17 that you want to wait? As far as I know, the GUI API in Factorio won't change

naquadah commented 5 years ago

@plague006 Out of curiosity, what exactly is so extensive about it? Nearly all the tools i mentioned above we already have.

@iltar That i don't know. When we had the discussion, people advised to wait for 0.17 due to "GUI changes" I didn't ask more about it as i don't have overview of the API.

mheguy commented 5 years ago

In 0.17 the API for GUI has some minor changes, though the main reason I'm suggesting we wait for 0.17 is to see what the aesthetic looks like so that we can do this once and do it properly from the start instead of doing it now and trying to tweak it later.

As for it being extensive: yes we have functions that perform the actions you want, but the vast majority were written with their use in mind. That is, they're written to take commands and not button presses. That means each one has to be adapted and tested for a new use-case.

As things currently stand the next map launched will have #399 which turns the "report" button in the player list into a "jail" button for admins. This should buy the admin as much time as they need in order to figure out any other commands needed.

To be clear, I'm not insisting this wait for 0.17 but I do think postponing it makes sense since we have a stopgap measure in place and can afford to wait and see what 0.17 looks like from a GUI perspective. If someone wants to take this on and create a PR that's their prerogative.

linaori commented 5 years ago

Console or GUI are just user interface ports to an application's domain logic. It shouldn't matter for the logic how it's called, the functionality will be the same between both. With this in mind, we can just make the UI call the same code that the console commands do.

linaori commented 5 years ago

For reference, I'm talking about hexagonal architecture, where the presentation layer is basically the /command or click on button_x.

mheguy commented 5 years ago

While it would be nice if they were written in a way that could accept both GUI and /commands, that's just not the reality of things at the moment. Extant code would have to be changed to accept both written commands and GUI clicks.

linaori commented 5 years ago

It shouldn't be hard to change, I can look into doing this if needed

SimonFlapse commented 5 years ago

I'm also planning to take a look at the commands. The problem with the commands right now are partially why I asked Naquadah to create this issue, so we could start prepping the code, and get a discussion going so we are aware about what is needed.