RedMew icon indicating copy to clipboard operation
RedMew copied to clipboard

Add admin panel

Open RedRafe opened this issue 6 months ago • 0 comments

Changes

  • [x] added config & top button for admin panel (Mk2 armor icon)
  • [x] admin commands file now also exports its command functions to be used elsewhere, by providing additional param { actor = LuaPlayer } if needed
  • [x] updated missing handlers/rules in utils.gui and luackeckr

Main features

Added 3 pages in admin panel: Player manager, Map manager, Lua console. Scenarios can also add more pages through the AdminPanel API, planning on adding the history of player actions to help admins moderate maps.

Player manager

  • General actions: cheat mode, create pools, delete stuff... basically shortcuts from already existing console commands for admins
  • Player management: promote/demote/jail/invoke/goto players. requires to select another player from the dropdown selector (can filter for online/all/offline players)
  • Players ban: helps building the ban message by providing few common reasons, the the admin can further customize the text by editi it themselves before banning.

screenshot of the player manager panel Screenshot from 2024-08-28 11-02-43

Map manager

  • Just a bunch of button-slider pairs to tweak map settings/enemies/pollution/evo. Label on the right shows the current map setting, while sliders have a tooltip that shows the "selected" value on the slider. Wont be applied until the user presses the button.

screenshot of the map manager Screenshot from 2024-08-28 11-02-49

Lua console

  • I dont expect many admins to use this, but writing commands in the console is shit because it's just 1 line high, so this is more a QoL gift for us devs :) (will probably remain at bottom of all future pages added)

screenshot of the lua console panel Screenshot from 2024-08-28 11-02-56

Future development:

  • maybe add some tooltips here & there for buttons based on feedbacks. Could also have each button tooltips that is a "shortcut" for a command, be the description of the command itself and all the parameters that go into it (if an admin needs to manually run the command with specific parameters, idk...)
  • add the history of player actions panel. Still need to think on how to actually make it. Tracking players actions is straightforward, displaying the information in a useful/organized way instead of a giant wall of text/giant table of data is not

RedRafe avatar Aug 28 '24 09:08 RedRafe