Commit Graph

18 Commits

Author SHA1 Message Date
magatsuchi
bea9387458 refactors statpanel to use tgui API (#66971)
refactors the status panel to utilize the tgui/byond communication APIs instead of passing along href data, as well as converts the entirety of it into a datum/tgui_window

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-05-16 07:12:05 +03:00
John Willard
88d7dbfc10 removes double spaces before symbols (#62397)
This can apparently cause some bugs on occasions, so I thought I might as well try to kill them all.
2021-10-28 19:25:50 -03:00
fira
860b6f9a87 Make statpanel relay used mouse button when clicking turf contents (#59557)
Just makes it so statpanel clicks are relayed with the relevant mouse button instead of always left click. As of current it only relays shift/alt/ctrl modifiers.
2021-06-13 15:08:18 -03:00
Mothblocks
a207239280 Queue stat panel commands, ideally fixing another source of the reconnect bug (#59228) 2021-05-22 15:01:24 +03:00
Celotajs
74cfa33193 Prevent flashing tabs issue (#58397)
This was occurring due to remove_admin_tabs being called for non admins in statpanel.dm:44. This ended up being redundant and not needed, therefore I removed the line.

Co-authored-by: celotajstg <celotajstg@users.noreply.github.com>
2021-04-13 09:40:35 -07:00
celotajstg
20b5420254 Allow splitting admin tabs (#58310)
* Improve code in statpanel.dm

* Improve phrasing in preferences_toggles.dm

* Move "Interviews" under the "Tickets" tab

Co-authored-by: celotajstg <celotajstg@users.noreply.github.com>
2021-04-13 15:58:00 +03:00
celotajstg
4dd46a77cf Adjust stat panel grid item widths and breakpoints (#58295)
* Adjust stat panel grid item widths and breakpoints

* Update statbrowser.html

Co-authored-by: celotajstg <celotajstg@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2021-04-10 17:43:23 +03:00
William Wallace
9cc0b24fc3 stat panel focus reset happens _before_ verb commands are ran (#58196) 2021-04-07 16:37:12 -07:00
William Wallace
56ea7d63c4 remove input pass-through from stat panel and just try not to keep focus instead (#58143)
About The Pull Request

The input pass-through didn't work anyway, as it would pass through lower-case keys which our input code doesn't understand (unless you were holding shift or hadcaps lock on.) It also didn't translate arrow keys to NORTH, etc. which is how BYOND expects them.

If you double clicked on the stat panel it would eat all following input from you. If you happened to have caps lock on, you might not notice this because the correct WASD values get passed to BYOND. If you were then to stop walking while holding shift because you want to examine something, your key release would be sent to BYOND as lowercase, causing it to be ignored.

Under all of those conditions, your movement would get stuck in one direction. It's more likely than you think!!!

A similar chain of events could cause Alt releases to not be sent to BYOND due to this as well.

--

The fix is to just give back focus to the map similarly to how TGUI does it. It's not quite as majestic as TGUI, but it seems to have fine results.
Why It's Good For The Game

Nobody likes sticky keys
Changelog

🆑
fix: Stat panel no longer captures input (potentially causing keys to get stuck down)
/🆑
2021-04-05 13:08:36 +12:00
Timberpoes
74e38911d3 Make percentage width great again (#57577) 2021-03-09 23:30:31 +02:00
Aleksej Komarov
a4de410790 Use better layout for verbs in stat panel (#57527) 2021-03-08 23:45:02 -08:00
Bobbahbrown
4e48e1379d Interview System / Soft Panic Bunker (#54465)
About The Pull Request

Ports and improves my interview system that has been previously used in the summer ball and toolbox tournament events. Allows for a 'softer' panic bunker, wherein players who fall below the required living time limit can still join the server and be restricted to filling out a questionnaire. Upon completing the questionnaire, the player may be allowed into the server by an administrator. If the application is approved, they get a notification that they will be reconnected and upon reconnecting will have all verbs as they usually would. If the application is denied the user is put on a cooldown after which they may submit a new questionnaire.

Players who are being interviewed (herein interviewees) have no verbs other than those required for the stat panel to function, as well as a verb to pull up the interview panel. Interviews do not persist through restarts, and the ability to join that is granted by an accepted interview is only valid for the duration of that round.

Open interviews are listed under a new 'interviews' tab for admins, which is VERY similar to the existing tickets tab.

Below is what a player who is flagged as an interviewee will see when they join the server. They can do nothing but respond to the questionnaire or leave.
image

This is what an administrator sees after an interview is submitted, they will also see a corresponding message within their chatbox, and an age-old BWOINK when an interview is submitted.
image

The interviews tab, which is similar to the tickets menu. You can open the interview manager panel to view all active (including non-submitted) interviews, queued (submitted) interviews, and closed interviews.

image
FAQ:

What happens if someone submits an interview when no admins are on? It's treated like adminhelps are, the message gets sent to TGS to be dispatched off to configured end-points (like Discord or IRC), and the user is notified that their interview was handled this way.

Can you configure the questions? Yes, in config/ there is now a interviews.txt file in which the welcome message and the individual questions can be set and modified.

Can this be turned on and off during a round? Yes, it can be toggled like the panic bunker. It requires the panic bunker to be raised in order to function.

Can interviewees have further questions asked to them? Yes, if you admin-pm them, which is possible using regular means or a conveniently placed button on the interview UI, they will be able to respond to the message.
Technical details

To use the interview system you must have the panic bunker enabled, this is an additional setting for the panic bunker. It can be set through the PANIC_BUNKER_INTERVIEW setting in config.txt, or alternatively enabled in-game as prompted during the panic bunker toggling process. It also can be toggled on its own using a verb added for this purpose, Toggle PB Interviews found under the server tab. These new actions are included in the logging for the panic bunker. I have also added a reporting stat to the world topic status keyword, which now reports if the interview system is on using the keyword interviews.

As mentioned above, for server operators, configure the questions and welcome message in config/interviews.txt.

Note to maintainers and those with big brains I had to add a call to init_verbs on the stat panel window being ready because seemingly a race condition exists wherein the add_verb of the 'view my interview' verb doesn't cause a refresh of the tabs (and therefore doesn't show the 'Interview' tab) when running in dream daemon but running it directly from visual studio code properly shows the tab. Adding a init_verbs call directly after adding the verb didn't seem to help.
A note for downstreams

If you don't use the HTML stat panel (which may not be a bad thing) then you will have to do some conversion from the HTML stat panel stuff used here to the old style stat panels. It's pretty trivial, but just be aware of that. You can see how I used to use the old stat panels in my PR from the summer ball, here, which should be helpful.
Why It's Good For The Game

This allows for a softer version of the panic bunker which impedes the flow of malicious players while allowing genuine players a chance to enter a round to gain enough time to not be affected by the panic bunker's restrictions.
Changelog

🆑 bobbahbrown
add: Added the interview system, a 'soft' panic bunker which lets players who would normally be blocked from joining be interviewed by admins to be selectively allowed to play.
/🆑
2020-10-25 14:10:06 +13:00
Couls
1750c93297 fix statpanel deleting whole admin tab (#54211)
fix: adminhelping no longer removes entire admin tab
fix: end of round no longer removes entire admin tab
2020-10-07 12:29:41 +01:00
Bobbahbrown
0d5d5af0e5 Restyles Stat Panel, Adds Subpanel Sub-Categories (#53947)
I re-styled the CSS for the stat panel in hopes to make it look nice, and I also added the ability to use sub-categories (currently a single level) of verbs using a . (period), an example being Admin.Fun instead of the previous Admin - Fun. This now results in a sub-category being automagically generated in the stat panel.
2020-09-29 06:36:14 -03:00
Couls
75cdfc88f6 Optimize stat panel and fix guardian verbs (#53463)
Optimizes stat panel code for better performance, including icon caching and removing some unnecessary processing
Also fixes #53432
fix #53381
fix #53724
Changelog

add: icons are back on alt clicks
fix: horrible performance from alt clicking turfs with multiple objects
tweak:browser should notify the SS when it's ready to receive data

* Update statbrowser.html

* Apply suggestions from code review

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>

* hidden = TRUE

* almost ready

* Browser should notify when ready to receive data

* Apply MSO's suggestions

* reset cache if something in it gets deleted

* Fix runtime

* fix my stupid code

* send href_token when adding admin tabs

* fix an issue with cyborg suit topic

Co-authored-by: Jared-Fogle <35135081+Jared-Fogle@users.noreply.github.com>
2020-09-14 23:36:46 -07:00
Couls
fe551f68e9 Fix Alt Clicking opening up a window and add back some object verbs to the browser stat panel (#53369)
Fixes some more issues with browser stat panel

- Alt clicking items in the listed turf tab doesn't open up a popup
- Toggle suit sensors button missing
2020-09-02 18:18:09 -07:00
Tad Hardesty
89b4e01680 Fix various issues with browser statpanel (#53263)
* Keep tab buttons in view when scrolled down
* Unfocus tab buttons after click so scrollbar keeps working
* Fix some subsystem stat entries
* Improve key passthrough
* Fix runtimes from nulls in AI connected_robot list
* Add missing info in MC tab for global/config/etc.
* Fix #53298 by including turf in alt-click menu
2020-08-29 23:51:42 -03:00
Couls
e7f99e3b8b Browser Status Panel (#53112) 2020-08-27 15:28:03 -07:00