* Polishing the greyscale modify menu's lackluster support for non-atom targets. (#77322)
## About The Pull Request
So, I've been recently told that Skyrat uses the greyscale modify menu
for loadouts, and the new ui state kinda borked it. I honestly haven't
taken the possibility that the target could be anything but a subtype of
`/atom` (and still work) into account because much of the code assumes
the target is an atom. It's kinda crappy. Also I hadn't noticed we've an
`unlocked` variable, which makes `vv_mode` var superflous, so i'm going
to remove the latter.
* Polishing the greyscale modify menu's lackluster support for non-atom targets.
* I hope I won't have to get back and edit out the ability to modify the alpha on clothes for this
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: GoldenAlpharex <jerego1234@hotmail.com>
* [NO GBP] Actually fixing the greyscale_modify_menu. (#77208)
## About The Pull Request
EDIT: So, I've to admit and bow my head: #77165 fucked up because I
hadn't properly tested the code. However, this time around, I can assure
you it's been tested.
## Why It's Good For The Game
Fixing my mistakes. This will fix#77246
## Changelog
N/A.
* [NO GBP] Actually fixing the greyscale_modify_menu.
---------
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Refactors mind language holders into non-existent, fixes new languages being deleted on species swap + tests
* Fixing merge conflicts
* don't forget to ctrl+s!
* Another forgotten file
* urgh
* gets rid of vestiges of update_atom_languages()
and mind language holders
* No longer needed
* Fixes some modular grant_language calls
* Deprecated code
* This was up here before..
* Fixes failing unit tests, refactors silverscale lizards language a bit removing the need for skyrat edits
Removes some no longer needed code
---------
Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
Co-authored-by: Giz <vinylspiders@gmail.com>
* Moves ui references from the tgui subsystem to datums themselves (#76215)
## About The Pull Request
Unused vars have 0 memory cost, and the ref and list lookup here is
REALLY expensive, for both init and foam spreading.
## Why It's Good For The Game
Saves 0.2s off a station flood on meta, and 0.17s off init. More time in
other qdel heavy areas
Pulled off #76104 for the sake of cleanliness
* Moves ui references from the tgui subsystem to datums themselves
---------
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Adds mobility_ui bypass flag (#72934)
A flag that lets you use an interactive TGUI screen while laying down.
Adds this flag to the PDA.
You're relaxing on a bed or something and it's annoying having to stand
up just to reply to a PDA message and then lay back down. We know how to
text without dropping the PDA on our face. (Usually)
The flag can be applied to anything else you should be able to interact
with while laying down.
* Adds mobility_ui bypass flag
---------
Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
* Tablets don't close their UI when changing program (and some fixes) (#73635)
## About The Pull Request
- Tablets now refresh their page when changing programs, this means the
UI will no longer close and reopen itself several times (or even have
several UIs open if shit broke hard enough).
- Removed tablet's attack self because interact already does everything
it had to do.
- Header programs now close when minimized (as there's no button to
close them in the main menu.
- Removed a lot of program UI stuff, it's now handled by the PC itself,
such as header data and ui host.
- Cut off asset sending from TGUI into it's own proc so I can re-send
assets when changing programs
- Added an ejection button for machine computers
- Fixed ID not ejecting into the user's hand when using 'Eject ID'
- Fixes a minor runtime when opening the MODsuit application without a
MODsuit already connected.
## Why It's Good For The Game
Fixes some bugs that I found with tablets
UIS now won't be flickering as bad in front of them, or have
inconsistent placement (like when you move your main menu UI, go to
Messenger, then it's back to the center of the screen).
Video of it in action
https://user-images.githubusercontent.com/53777086/221301417-78321149-0c10-475e-bd29-79f5a4ba0597.mp4
## Changelog
🆑
fix: Being in an application now properly uses the tablet's battery.
fix: Messenger and Themify apps now close when minimized, so don't count
towards the running app limit.
fix: Tablet UIs will now no longer spam open/close the UI when changing
applications
fix: Using the Eject ID button on tablets now ejects into your hand.
fix: Computers now have an Eject ID button
refactor: Cut down a lot of copy paste in tablet & program code, now
it's mostly done by the tablet.
/🆑
* Tablets don't close their UI when changing program (and some fixes)
* Update contractor_tablet.dm
* wew
---------
Co-authored-by: John Willard <53777086+JohnFulpWillard@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
* Grammar: Te spelling mistake I've been staring at for hours (#73385)
## About The Pull Request
I noticed `/datum/tgui`'s DMDOC Comment on `var/title` misspelled `the`
as `te` while doing some unholy UI experiments, so I was going to PR a
correction so I can stop thinking about it. Though to be safe I checked
if it happened more than once, apparently it has happened thrice.
* Grammar: Te spelling mistake I've been staring at for hours
---------
Co-authored-by: Zandario <zandarioh@gmail.com>
Refactor /ui_state/new_player_state to what it's designed for (#71959)
`/datum/ui_state/new_player_state` now no longer lets users with R_ADMIN
permission see the UI. Changed `/datum/interview` to return always_state
when an admin watches an interview because it is important there.
`/datum/latejoin_menu` now uses new_player_state instead of its own
solution.
`/datum/ui_state/new_player_state` is designed to let lobby players
interact with the UI, so it does not make sense for it to make a weird
exception for admins too. My theory is that this was an oversight when
this was first implemented, since only `/datum/interview` used this
ui_state. It doesn't and it shouldn't be like this though. Code clarity.
No playerfacing changes.
Co-authored-by: distributivgesetz <distributivgesetz93@gmail.com>
* Fixes unconciousness (typo) (#71648)
## About The Pull Request
Made a typo while doing a github search, but it still gave me results.
This removes the "unconcious" typo from a few different places,
including code comments, tgui interfaces, descriptions, etc.
## Why It's Good For The Game
Good spellign
## Changelog
🆑
spellcheck: removes a bunch of instances of "unconcious" from the code.
/🆑
* Fixes unconciousness (typo)
Co-authored-by: Rhials <Datguy33456@gmail.com>
* Automatic R&D sync (#69735)
* Automatic R&D sync
* One second instead of a half-second
* Moth changes + more
- Actually use SIGNAL_HANDLER
- Use update_static_data_for_all_viewers instead of only updating static data for the current user
* Batch techweb updates
* Automatic R&D sync
Co-authored-by: scriptis <scriptif@gmail.com>
* Check for compliant JSON before receiving payload (#69023)
About The Pull Request
This was denied in the past for perf reasons, but I want to test how much this actually reduces perf.
rustg_json_is_valid checks for two things.
It checks that the data isn't too nested. This could easily be removed if it causes perf problems, since it's an extra O(n) check of its own. It was for a BYOND exploit that is now fixed.
It checks for JSON compliancy. It is backed by serde_json, which does not allow NaN, whereas BYOND is incompliant.
This does not lady_beetle ribbon 𝒻𝒾𝓍 ribbon lady_beetle #69017, because that is doing an extra text2num for no reason. If it didn't (like it shouldn't), then this would fix it.
Will be test merged on Manuel but not Sybil--CC @ LemonInTheDark help me on figuring out the perf cost of this. If it's noticable then we can test with removing the depth check.
* Check for compliant JSON before receiving payload
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded (#65589)
This pr goes through: /client/Click(), /client/Topic(), /mob/living/verb/resist(), /mob/verb/quick_equip(), /mob/verb/examinate(), and /mob/verb/mode() and makes them queue their functionality to a subsystem to execute in the next tick if the server is overloaded. To do this a new subsystem is made to handle most verbs called SSverb_manager, if the server is overloaded the verb queues itself in the subsystem and returns, then near the start of the next tick that verb is resumed with the provided callback. The verbs are called directly after SSinput, and the subsystem does not yield until its queue is completely finished.
The exception are clicks from player input since they are extremely important for the feeling of responsiveness. I considered not queuing them but theyre too expensive not to, suffering from a death of a thousand cuts performance wise from many many things in the process adding up. Instead clicks are executed at the very start of the next tick, as the first action that SSinput completes, before player movement is processed even.
A few months ago, before I died I was trying to figure out why games at midpop (40-50 people) had non zero and consistent time dilation without maptick being consistently above 28% (which is when the MC stops yielding for maptick if its overloaded). I found it out, started working on this pr, then promptly died. luckily im a bit less dead now
the current MC has a problem: the cost of verbs is completely and totally invisible to it, it cannot account for them. Why is this bad? because verbs are the last thing to execute in the tick, after the MC and SendMaps have finished executing.
tick diagram2
If the MC is overloaded and uses 100% of the time it allots itself this means that if SendMaps uses the amount its expected to take, verbs have at most 2% of the tick to execute in before they are overtiming and thus delaying the start of the next tick. This is bad, and im 99% sure this is the majority of our overtime.
Take Click() for example. Click isnt listed as a verb but since its called as a result of client commands its executed at the end of the tick like other verbs. in this random 80 pop sybil round profile i had saved on my computer sybil 80 pop (2).txt /client/Click() has an overtime of only 1.8 seconds, which isnt that bad. however it has a self cpu of 2.5 seconds meaning 1.8/2.5 = 72% of its time is overtiming, and it also is calling 80.2 seconds worth of total cpu, which means that more than 57.7 seconds of overtime is attributed to just /client/Click() executing at the very end of a tick. the reason why this isnt obvious is just because the verbs themselves typically dont have high enough self cpu to get high enough on the rankings of overtiming procs to be noticed, all of their overtime is distributed among a ton of procs they call in the chain.
Since i cant guarantee the MC resumes at the very start of the next tick due to other sleeping procs almost always resuming first: I time the duration between clicks being queued up for the next tick and when theyre actually executed. if it exceeds 20 milliseconds of added latency (less than one tenth the average human reaction time) clicks will execute immediately instead of queuing, this should make instances where a player can notice the added latency a vanishingly small minority of cases. still, this should be tm'd
* Biddle Verbs: Queues the Most Expensive Verbs for the Next Tick if the Server Is Overloaded
Co-authored-by: Kylerace <kylerlumpkin1@gmail.com>
* Fishing, Version 1 (#67691)
Adds fishing and fishing minigame.
You use fishing rod to fish.
Equipping specific bait/hook/reels will affect your success chances.
You can fish out fish,items and other things.
Fishing Equipment
Fishing rods have three slots: Bait, Reel and Hook.
Any food can be used as bait but dedicated bait makes fishing easier.
You can buy hook and line sets
New bait types:
Worms : Buy can of them at cargo (alternative acquirement method pending)
Doughballs : Use knife on flat piece of dough to get five of them.
Fishing rod types:
Basic : Print these at the lathe, nothing fancy here.
Tech: Experimental tech. Provides infinite bait
Fishing rods can also hook and reel normal items.
Equipment screen and reeling video
Fishing spots
Keep in mind this PR is meant to add the basic systems and i intend to fill these with more fish in future PR's so wait with suggestions until then.
Lavaland lava (no fish here right now, just other stuff), requires reinforced line to fish in.
Maintenance moisture traps.
Beach away mission water.
Fishing portal available for purchase from cargo - This is stopgap until we fill more spots.
Difficulty depends on fishing spot, fish type, and the fish traits and rod setup combinations.
All fish types can have specific traits, most common ones being favourite and disliked bait types/categories.
Other
Fishing catalog now lists fishing related info
New admin debug verb, fishing calculator that show probabilities with different setups so it's easier to balance this.
Fish now have average weight and size. Make sure to boast if you catch a big one.
Adds tgui mouse passthrough
Screens
Sprites:
Fishing portal sprite by @ ArcaneMusic
Other sprites by @ Mey-Ha-Zah
Bad ones by me. (Could still use better fishing minigame backgrounds)
Sounds:
https://freesound.org/people/soundscalpel.com/sounds/110393/https://freesound.org/people/soundslikewillem/sounds/343748/
* Fishing, Version 1
Co-authored-by: AnturK <AnturK@users.noreply.github.com>
* adds the "refresh TGUI" debug verb (#67265)
About The Pull Request
adds the Refresh TGUI verb to the debug category OOC category, but it isn't locked behind any permissions. i'd put it in OOC, but.. eeeeeeh? there's not real much use for this verb other for debuggers. i put it in the OOC category
Why It's Good For The Game
debug purposes mostly
not player facing lole
* adds the "refresh TGUI" debug verb
Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
* Adds Puzzgrid smite to trap enemy gamers in a fiendishly hard puzzle (#66855)
* Puzzgrids
* Adds Puzzgrid smite to trap enemy gamers in a fiendishly hard puzzle
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
* Add replace_html to tgwindows (for real this time) (#67137)
adds the ability to realtime inject HTML into TGWindow instances, just as you can create TGWindow instances with inline_html at initialization.
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
* Add replace_html to tgwindows (for real this time)
Co-authored-by: magatsuchi <88991542+magatsuchi@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@ gmail.com>
* Fixes the inputs for the linear and exponential sustain options of the song editor. (#65008)
* Fixes the inputs for the linear and exponential sustain settings of the song editor.
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
* Fixes tgui windows not working (#64046)
I fucked it up when I did my harddel stuff, we don't wanna fuckin close the window if any of our vars are
**not** destroyed
* Fixes tgui windows not working
Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
* Tgui list input hotfix + changes (#63515)
Previous issues addressed:
- You could not reselect search just by keying
- Pressing enter sometimes deselected
- Double click would deselect - which was intentional, but useless really
- Default values were not implemented in original
- Validation is required for tgui inputs but truly only one "needs" it, it costs performance otherwise
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Tgui list input hotfix + changes
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Mothblocks <35135081+Mothblocks@ users.noreply.github.com>
* Advanced camera consoles no longer crash when you search for a camera
* Update tgui_input_list.dm
* E
* Update IceBoxStation_skyrat.dmm
Co-authored-by: Tastyfish <crazychris32@gmail.com>
Co-authored-by: Gandalf <jzo123@hotmail.com>
* TGUI input box conversions 2 (#63395)
More text inputs converted to tgui, TGUI text and number input now more sanely handles ENTER key being pressed, you can now press anywhere in the window to enter the input. TGUI text input now considers placeholder text for the default valid state. IE, if there is default text you can press enter immediately without having to rewrite it just to recheck validity. Fixes: useSharedState => useLocalState. not only was sharedstate not needed but it opened up the ui to vulnerabilities
* TGUI input box conversions 2
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
* TGUI input box framework (#63190)
About The Pull Request
Creates the framework for two new TGUI input boxes that can be toggled via game prefs.
This does not convert any actual inputs to TGUI
This does not convert any tgui_list_inputs into being toggleable
Example pictures
Input on a hand labeler. This has a MAX_LENGTH set, so it can be invalidated. Cancel always returns null. Enter button submits, if valid.
text input
(OUTDATED) Multiline input on newscaster. Newer version fills the window with a section, like the others
multiline
Sheets from a stack
number input
Why It's Good For The Game
1
So I did...
Much sleeker input boxes
Result should be a in place swap for most occurrences of input
Renders casting as text/num/null obsolete but still doable
Input validation from both sides handled
Prefs toggle if you don't like the look
Changelog
cl
add: TGUI input boxes are on the way! You can find new preferences in the menu. They will be on by default.
/cl
* TGUI input box framework
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
* TGUI pAI Hotfix 1 (#63160)
Adds a new ui state so that players can access the paicard tgui while it's slotted in their PDA (inside the pda wasn't technically in the user's close inventory).
Adds some documentation for the pAI candidate file
Users now get notifications if they can't save files (guest keys).
pAIs previously had NO on screen indicator of hack progress, so I've given them a progressbar over the door
More visual output for pAIs
More output for edge cases
More documentation
Fixes#63161
* TGUI pAI Hotfix 1
Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>