Commit Graph

3611 Commits

Author SHA1 Message Date
Mothblocks
661674170a Adminwho now caches feedback links until admins are reloaded (and also works again) (#67307)
* Adminwho now caches feedback links until admins are reloaded

* Restore dbconfig

* Fix feedback links, make them query only if necessary, and not on load admins

* Wait longer before checking DB connection

* Back on my dbconfig shit

fixes (Adminwho is slower than it needs to be after feedback links) #67150.
also fixes (timber breaking feedback links totally by qdeling the datum too early) #67360.
2022-06-06 00:35:14 -07:00
Zonespace
06fb664b83 Allows modsuits to be used in outfit manager (#67310)
* Lets bag-fitting MODsuits be used in the Admin outfit manager
2022-06-03 12:00:15 -04:00
vincentiusvin
4a1eb42930 Reimplements breathedeep's scan into atmozphere. (#67438)
* AtmoZphere tablet app now has the previous functionality of the BreatheDeep cartridge's scanning ability, meaning you can swap to analyzer mode to analyze with right-click.
2022-06-03 04:45:35 -04:00
vincentiusvin
ef036eb869 Assorted Ordnance Code+Map Quality Pass and QoL (#67097)
Three main things I do:

Reinforce the remap that i have made with code changes, making the atmos control devices sane and easy to put if someone else stumbles upon this part of the code again. (a4aea1e - f16e620)

Splits the ordnance areas and renames them, kills ordnance misc and things that have nothing to do with ordnance (anymore?) moves them to exp_lab (useful stuff here) and aux_lab (fluff stuff here like laser range in delta or second circuit lab in tram). (0c99f9f- 3c82a88)

Adds a roundstart program disk containing nt frontier to the ordnance office table. Added a hint to file manager there too to help give players a nudge on how to publish papers. (fd747dc)

First one: Makes mapping these things not require varedit, nicer for other people that dont know how the atmos control stuffs works.

Second one: Misc lab has nothing to do with ordnance jesus christ. Also ord hallway is now irrelevant, our ordnance labs are very far from box now. Will probably make downstreams a bit angry for a while though since they might not be fully up to date on the ordnance maps.

Third one: Pretty much justified it in the about section.

Why is this not atomic: This touches all five maps and needs code backing, so I might as well combine them into one maintenance PR instead of giving my peers merge conflict three times.
2022-06-02 17:15:17 -06:00
Wallem
12204f2943 GAGS-ifies ties, and removes inherent ties from some outfits. (#67053)
Removes the inherent ties from most civilian outfits with a single-color tie baked into them.
2022-05-30 22:02:25 -07:00
Kapu1178
6d470992cb This tail refactor turned into an organ refactor. Funny how that works. (#67017)
* Fuck you (refactors ur tails)

* Errors

* Wow. Pain.

* Fixes up probably everything

* finish up here

* Fixes hard del maybe

* original owner hard del

* garbage collection runtime

* suck my peen byond

* Mapped tails

* motherfucker.

* motherrfucker. again.

* Whooopppppsie

* yeah bad idea

* Turns out external organs literally just sat in nullspace forever if their parent was deleted, and didnt Remove() themselves, causing harddels.

* So anyways I repathed all organs

* Fixes

* really.

* unit test... test

* unit test-test but it passes linters this time because im a moh-ron

* I've lost track of what im doing at this point

* Hopefully fixes hard del?

* meh

* Update code/datums/dna.dm

* things n stuff

* repath from master pull
2022-05-30 21:18:34 -07:00
Urumasi
10c698abba Add new H.E.C.K. suit GAGS sprite, recolorable via spray can (#67217)
imageadd: The H.E.C.K. suit has a new sprite. (by Meyhazah)
add: You can now use a spray can to completely recolor the H.E.C.K. suit.
2022-05-30 15:36:20 -04:00
Timberpoes
4e6a9cf361 Fix a source of undeleted query spamming admin chat when gathering admin feedback threads from the database. (#67261)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-05-25 15:58:02 -07:00
Jolly
cfc2330528 [MDB IGNORE] More /area/ typepath organization and cleanup (#67107)
This further continues what I did in b4fb8f3ed1 (but instead of just stations, its now every (most) applicable area in the game
2022-05-23 13:01:19 -06:00
MrMelbert
e2e658db41 Refactors and sorts Nuclear Bombs and Cinematics. Fixes and unit tests nuke cinematics, and re-adds a missing malf ai cinematic. (#67144) 2022-05-21 22:49:06 -07:00
san7890
98ab39c936 Updates Spacing in Deadsay (#67149)
Hey there,

This doesn't look good to me. Let's fix that by adding one (1) space.
2022-05-21 10:29:45 -04:00
Mothblocks
e9d0498432 Adds Puzzgrid smite to trap enemy gamers in a fiendishly hard puzzle (#66855)
* Puzzgrids
2022-05-21 10:31:55 +02:00
Seth Scherer
2baeb1b635 Ports the player ticket panel from skyrat (#66954)
* Ports the player ticket panel from skyrat
Adds a player side panel to view active admin tickets, this will make it
easier for players to find previous admin messages, remember what they
said previously etc. This is especially good for the cases that TGchat
drops messages
2022-05-20 15:15:32 -04:00
Son-of-Space
8440d20981 [MDB IGNORE] Reformats Access IDs for accessibility and futureproofing (#67002)
* [DRAFT] Reformats Access IDs for accessibility and futureproofing

* replaced all the old defines and IDs everywhere

* replaced ID integers with strings, cleaned up a couple tram helpers

* replaces req_access_txt with req_access and fixes a few of my mistakes

Co-authored-by: san7890 <the@san7890.com>
2022-05-20 02:43:02 -04:00
Ryll Ryll
3612874f0c Changes Admin DSAY rank display to a tooltip (#67086)
changes the dsay rank to a tooltip
2022-05-18 23:19:41 -04:00
dragomagol
6ff4d03ee0 Split and Document Logging Procs (#67052)
* put logging procs into their own files

* Moving more procs into their own files

* Moving talk

* The last of the logging

* ticks shuttle.dm

Co-authored-by: tattle <article.disaster@gmail.com>
2022-05-18 11:29:34 -07:00
magatsuchi
166fa8e125 Add support for adminwho name links (using DB) (#66909)
I shamelessly farm GBP

Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-05-17 19:49:46 +03:00
Seth Scherer
a3add37618 Refactors the forensics component into a datum (#66809)
About The Pull Request

This was doing things component really shouldn't be doing, and now all
of its behaviour is contained onto a datum, as it should've been the
whole time
Why It's Good For The CODEBASE

some things just really shouldn't be components, this was made back when DCS was first implemented and just thrown in because it was the new hot thing i guess, but datumized forensics makes far more sense, AND doesn't use GetComponent

TODO:

    More thorough testing to make sure nothing broke

Changelog

🆑
refactor: Turned the forensics component into a datum.
/🆑
2022-05-16 16:33:59 +12:00
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
magatsuchi
6bddf82ad8 fixes admin ticket linking bad href (#66910)
Fixes a bad admin href in help tickets
2022-05-13 10:56:55 -04:00
wesoda25
6f58040394 Fixes mulligan not randomizing ethereal color, removes default_color for every race except ethereals (#66229)
Judging from code this is a fix, although I initially thought it would be a feature. It tried to update color but there was nothing in ethereal code to make that do anything. Now it does.

Moth wings also do not update. I tried to figure it out but species code makes me want to hit my head against a wall so I gave up on that.

default_color wasn't used anywhere except for ethereals, so I made it a var unique to ethereals.
2022-05-09 18:38:27 -07:00
Zephyr
87d2703af4 Splits eye color into two vars | Heterochromia Quirk (#66164)
* refactor it back to a single organ but with different eye vars

* nOt In A LoOp

* forgot emissive overlay

* remove old obscured var

* quirk

* fine we do it like this, PAIN

* add applying_preference paramter to is_accessible and check for it when applying

* update dummy on quirk change

* client might not exist if we are applying the preference, because unit tests

* unique icon

* lazy webedit review

* revert is_accessible refactor

* mild stupid

* change the way heterochromia is applied

* better handling

* Apply suggestions from code review

* add apply to human behaviour

* hopefully fix that which the merge hooks broke

* Update code/datums/quirks/neutral.dm

* Web commit for shame

* Update code/datums/quirks/neutral.dm

* Update code/datums/quirks/neutral.dm

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>

* Update basic.dm

Co-authored-by: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com>
2022-05-06 23:45:16 -04:00
LemonInTheDark
0504c0a2b4 Improper forced qdel cleanup, some expanded del all verbs (#66595)
* Removes all supurfolus uses of QDEL_HINT_LETMELIVE

This define exists to allow abstract, sturucturally important things to
opt out of being qdeleted.
It does not exist to be a "Immune to everything" get out of jail free
card.
We have systems for this, and it's not appropriate here.

This change is inherently breaking, because things might be improperly
qdeling these things. Those issues will need to be resolved in future,
as they pop up

* Changes all needless uses of COMSIG_PARENT_PREQDELETED

It exists for things that want to block the qdel. If that's not you,
don't use it

* Adds force and hard del verbs, for chip and break glass cases
respectively

The harddel verb comes with two options before it's run, to let you
tailor it to your level of fucked

* Damn you nova

Adds proper parent returns instead of . = ..()

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>

* Ensures immortality talismans cannot delete their human if something goes fuckey. Thanks ath/oro for pointing this out

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
2022-05-06 17:52:45 -07:00
Jolly
b4fb8f3ed1 [MDB IGNORE] You can have your cake and eat it too. Remake of #66406 (Splitting up areas.dmi + code related stuff) (#66726)
Areas.dmi right now houses all of our mapped turfs icons (which is roughly 400 icons). Not an issue, but it's incredibly large and clunky to navigate right now. This isn't an issue for the average coder and/or player code diving, but it is for mappers wanting to add new turfs. Currently, the file has some organization, but its still an overall mess. This PR aims to slice the behemoth with multiple .dmi files corresponding to specific areas.

I also plan to repath /area/* -> /area/station/* for station turf only. This is to clean it up, as most other turfs follow this format (that being /area/turf_zone/*).

I'm also writing an update paths file as I go along.
2022-05-06 12:09:53 -06:00
LemonInTheDark
24326bc649 Hud Image Culling By Z Level: Theft edition (#65189)
* makes hud images only apply by z level

* makes some of the atom_hud procs have better names

* fixes warning with the hud_user list and adds better documentation

* better docs for hud_images

* removes TODOs

* docs for hud_list

* adds support for linked z levels so mobs can see lower ones

* fixes merge conflict and shittily makes only shocked airlocks get added

* adds support for setting images in the hud as active and inactive

* gets rid of unatomic spatial grid change

* maybe i should actually try COMPILING my changes

* fixes merge skew and makes it compile again

* fixes huds refusing to remove from users who changed z level

* improves z level and registration logic

* fixes antag huds not appearing

* Fixes antag huds not properly setting. We now use hud_list in init, so it needs to be set before the new call, not after. Not sure why the use of appearance key was split like this, but none else knows either so none can stop me

* Ensures that hiding a basic appearance also hides the atom's active list too

* Fixes antag huds going poof

Ensures that remove_atom_from_hud will return false if the passed atom
isn't managed by it

This fixes antag huds disappearing randomly, since they assumed that if
the parent call of remove_atom_from_hud returned true, we should delete
ourselves. This is a safe assumption for them to make, since they should
only ever have one atom.

Does kinda bork if we call remove_atom_from_hud in a way that is unsure
if the passed atom is actually in that list. We were forced into doing
this by how atom huds use the qdeleting signal.

* makes basic alternate_appearance's only update themselves when setting their hud image to active and makes them not add themselves to the global huds_by_category list

* fixes mistake with hud_users list being set non associatively (bad)

* as anything in bot path loops

* Fixes merge skew problems

* Makes bot paths non global

This way they can show themselves to only the bot that "owns" them, ya
feel me?

* Fixes huds not showing up sometimes, cleans up some code

Post Kapu's limb refactor, we were calling prepare_huds twice in a human
init call chain. What was happening was this:

call prepare_huds() // Human
I gained a new hud image
I set active hud icons to mirror it
call prepare_huds() // Living
I overwrote the new hud image
I attempted to set active hud icons, which failed because it assumes
this can never happen

*cries*

* Renames add_hud_to_atom to show_to

My hope is this will make understanding hud code a bit easier, by tying
the behavior to a "verb" more closely. Also renamed a few vars

* remove_hud_from_mob -> hide_from

* Nitpicks a few comments

* Whoops/fuck/shit/damn it all/hhhhhhhhhhhh

* Moves check down, improves stack trace a bit

Co-authored-by: KylerAce <kylerlumpkin1@gmail.com>
2022-05-04 22:15:10 -07:00
MrMelbert
074da65fc7 Converts drunkness and dizziness to status effects. Refactors status effect examine text (and, subsequently, stabilized black extracts). (#66340)
* Refactors dizziness into a status effect

* Refactors the dizziness setter to use the new kind

* Drunkness.
- Should drunk continue to work off of a magic value or be swapped to duration? I've not yet decided: For understandability it's preferabale for "drunk" to use a timer (they are drunk for 3 more minutes), but both adding drunk and decreasing drunk currently use weird calculations which would be difficult to carry over.
- Ballmer is a liver trait

* Dizzy was a setter, not an adjuster

* Does all the drunk effects over
- refactors examine text fully
- refactors stabilized blacks because of this

* Removed

* repaths, fixes some issues

* Minor fixes

* Some erroneous changes

* Fixes some dizziness errors

* Consistency thing

* Warning

* Undoes this change, I dont like its implementation

* max_duration

* Max amount

* Should be a negative

* max duration

* drunk doesn't tick on death

* Rework dizziness strength

* Erroneous dizzy change

* Fixes return type
2022-05-04 23:33:59 -04:00
Mothblocks
7866e09bc3 Fix granular admin ranks not being loaded from DB (#66706) 2022-05-04 23:12:48 -04:00
Kyle Spier-Swenson
fe0c690953 Keep mutating filenames when the cdn is disabled. (#66550) 2022-05-04 19:06:06 -07:00
silicons
79b0cce1c4 [s] webedit security patch to locate() wrapper (#66264) 2022-05-04 00:32:03 -05:00
Mothblocks
0204332c8d Granular admin perms (#66368)
* Granular admin perms

* Implement temporary user specific permissions menu

* Restore config

* Fix TESTING
2022-05-03 21:59:22 -07:00
Kyle Spier-Swenson
9dfbc51d8d Adds a discord bot command version of show-server-revision (#66338)
* Adds a discord bot command version of show-server-revision

This is to replace `!tgs revision` with something less lame.

* Update chat_commands.dm

* Update chat_commands.dm

* Update chat_commands.dm

* Update chat_commands.dm

* remove unneeded sanic
2022-04-25 19:31:45 -07:00
RandomGamer123
1d1f3fa77b Fix display ordering bug with spawn ruins debug verb (#66461) 2022-04-24 21:35:38 -07:00
magatsuchi
cd1b891d79 Modular Tablets: Converting PDAs to the NtOS System (#65755)
Converts PDA functions and applications over to modular tablets and devices, namely the messaging function. HREF data code is quite honestly clunky and difficult to work with, as I've definitely experienced whilst working on this. By moving from this system over the easier to read (and frankly, easier to add to) TGUI system, you get cleaner looking and more user friendly UIs and a greater degree of standardization amongst other UIs.

Co-authored-by: Seth Scherer <supernovaa41@gmx.com>
Co-authored-by: GoldenAlpharex <58045821+GoldenAlpharex@users.noreply.github.com>
Co-authored-by: Aleksej Komarov <stylemistake@gmail.com>
2022-04-20 03:08:41 +03:00
John Willard
794f1477a6 makes alt cookies a var on species (#66245) 2022-04-18 09:32:41 -04:00
GoblinBackwards
edcd1d70ba Fixes AIize (Player panel Make AI button) killing the client of whoever it was used on (#66168)
* Fixes AIize (somehow)

* Why does this even exist it's never false

* Someone please explain why this is a bad idea
2022-04-17 01:16:03 -04:00
MrMelbert
ab51d5a00c Refactors speech impeding effects (drunken slurring / suttering) into status effects. Adds heretic slurring in addition to the existing cult slurring. Removes 4 vars from /living in return, which slightly optimizes Life() (wink) (#66031)
* Refactor slurring + cultslur to be a status effect

* Refactors stutter to be a status effect

* Adds a VV helper and a setter
- also adds heretic slurring text

* Adjustments to the heretic slurring

* classified VV key correctly

* "Normal" -> "Drunk" slurring

* social anxiety fix

* Adjusments and an accidentally reverted fix

* comment

* Fixes drunk file + two other minor issues

* merge skew time

* comments

* Generalizes this proc for the future.

* Missed stuff

* Numbers adjusted the wrong direction

* missed a single one

* incorrect numbers

* changes add/remove to "adjust"
2022-04-14 21:36:52 -04:00
John Willard
5b8ee570ea Refactors Newscaster cartridge to tablet app (#66035) 2022-04-09 18:31:40 -07:00
dragomagol
67dbe76d21 Remove old investigate categories (#65898)
Co-authored-by: tattle <article.disaster@gmail.com>
2022-04-05 19:46:26 -07:00
MrMelbert
056a586409 Adds two buttons to the admin traitor panel (#65688)
About The Pull Request

    Adds "Open VV" to the admin traitor panel, which opens that antagonist's VV panel.
    The "Mark as in/complete" button in the traitor panel now updates color based on whether the objective is completed, instead of whether an admin has marked it to be complete.
        In most cases, it'll end up looking the same / similar as it does currently.
        If the objective is complete without admin intervention, it'll also show up as green
        Some objectives disregard the admin completion value, in which case it will not change color, only text

Why It's Good For The Game

    More complex antags, like lings or heretics, often require that admins view the datum's variables to debug, This makes it easier / faster to locate them.
    People will often ask if their objective is complete or not, and heretics straight up require complete objectives. This makes it easier for admins to see which are complete or not by the code's standards.

Changelog

cl Melbert
admin: Adds "Open VV" to traitor panel antags, which opens that antag's vv panel.
admin: "Mark as in/completed" by objectives in the traitor panel now changes color based on whether the objective is determined to be "complete", instead of whether an admin has marked it to be complete. For some objectives, it might not update color (only text) when an admin marks it as completed - this means the objective disregards whether an admin has marked it as complete.
/cl
2022-04-06 09:42:29 +12:00
Mothblocks
85e81e81dc Fix typos in "slight changes to admin messages" (#65914)
Mistakes not caught in https://github.com/tgstation/tgstation/pull/65871
2022-04-05 09:50:47 +01:00
wesoda25
a9f7acedd2 Slight change to admin messages, ensuring people actually see and read them (take 2) (#65871)
Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
2022-04-03 15:57:29 -07:00
dragomagol
d944794bb4 Replace singulo.log and supermatter.log with engine.log (#65850)
Merges the two separate engine logging files into one, and makes it generic enough for any possible future engine.
2022-04-02 17:00:47 -05:00
Kapu1178
1d0eadcb12 Kapulimbs (#65523)
* i wanna go to bed so im pushing this

* It compiles but doesn't work yet

* It works!

* I WANT TO DIE

* Appease linters

* some CI fixes

* Address reviews + oversight

* Limb grower fix

* more icon fixes

* forgot to hit save

* I'm a dumbass

* Removes bodypart parent from unit test

* Fixes monkeys and CI

* Grammar pass

* I hate zombie code so much

* General code cleanup

* THE SHITCODERS ARE COMING FOR MY VARS

* THE UNIT TESTS ARE COMING FOR MY SHITCODE

* Reviews + skirts

* Removes an unused DMI

* Why didn't I do this in the first place?

* HAIR REFACTOR

* Haha whoops

* How did I miss this

* Admin spawned creatures now have their features

* Optimize me harder

* minor fix i need to push to merge master

* Fixes hair (maybe) and a runtime

* Maybe fixes mirrors

* Attempts to fix women

* Fixes hair on dismembered heads and a grammar change

* Caps lock did me dirty

* address reviews

* icon failures fix + missed reviews

* Fixes: Facehuggers and Regenerate_limb

* Fixes ethereal color pref appearance

* How the fuck did this not break everything else horribly?

* JESUS FUCKING CHRIST IM A MORON

* Fixes compile

* I'm not high I swear

* Im a dipshiiiit

* grumble grumble

* Fixes a visual bug with digitigrade legs. Adds \improper to roundstart species names. Added two new clothing-related helper procs. Renamed a couple procs to be more accurate. Adds SHOULD_CALL_PARENT(TRUE) to examine_more. Addresses reviews.

* Forgot this little readability thing.

* Updates CODEOWNERS

* Me when I forget how github works

* mapload me harder

* Last second fixes
2022-04-01 21:07:46 -04:00
Ryll Ryll
111cdf100e Adds linking tickets in asay, referencing mob datums in asay, improves asay ref code (#65634)
About The Pull Request

Continuing on the work started in #65154 and 61712, this PR expands what asay linking can be used for and improves the code for it. You can now link tickets in asay by saying #[ticket ID] like #1. This shows the ticket's status and who filed the ahelp. Might remove the ticket filer if it's not really useful.

This also fixes an oversight of mine with datum linking, with how mobs and certain other datums (armor datums, landmarks) don't follow the memory address format for their tag values. Datum linking now uses a @[tag] format, so you can link to a mob by saying @mob_702 and such.

dreamseeker_2022-03-22_21-51-41.png
Why It's Good For The Game

More robust admin tools
Changelog

cl Ryll/Shaps
admin: You can now link tickets in asay with #[ticket ID], like #1 and #5.
admin: asay datum linking now functions by saying '@[datum's tag value]`, whether it's a normal datum (@0x2001169) or a mob (@mob_702) or whatever else.

Discord_2022-03-16_23-38-09.png
(old pic)
2022-04-01 14:54:43 +13:00
vincentiusvin
204cbbb736 Ingame Atmos Reaction Guide (#65271)
About The Pull Request

https://imgur.com/a/pMMEi4i
https://imgur.com/a/xCrIcz4

Title, really.
Adds an ingame guide to atmos. Currently hooked to the atmos monitors, analyzer, and the tablet app.

Lots of reaction data not implemented yet, banking on the cleanup to get merged first, so drafting.
Done, all reactions in. Haven't double checked them though.

Code is pretty much finished, feel free to take a look. Ill probably retidy them while adding stuffs so no rush.

Might add a reaction handbook obj later Implemented in analyzer.

Dotted tooltip idea shamelessly stolen from preferences.

Lots of the diffs are from breaking the sensor file up, dont worry about it.
Why It's Good For The Game

Less need to open the wiki in another page I guess.
Changelog

cl
add: Added an ic atmos reaction guide. Available in your atmos control consoles/monitors, ntosatmos app, and analyzer.
code: Some changes to how gas canister descriptions are generated.
/cl
2022-04-01 09:58:03 +13:00
LemonInTheDark
50689f89a4 Action button refactor/rework: Enhanced Dragging (#65180)
About The Pull Request

I noticed a lot of strange and un-intuitive behavior in action buttons, and got stung by the bloat bug. Damn it hug #58027
I'll do my best to explain what I've changed and why, might get a bit long.
If you want a better idea, read the commits. Most of em are pretty solid, if long.

Whelp. Here we go.
How do action buttons currently work

All action buttons are draggable, to any place on the screen. They're held in an actions list on the player's mob.
Their location in this list determines their position on the top of the screen. If one is dragged away from the top, its position in the list is "saved". This looks really bad.
If two buttons are dragged over each other, their positions swap. (inside the actions list too)
If a button is shift clicked, it is brought back to the position it started at.
If the action collapse button that you likely just mentally edit out is alt clicked, it resets the position of all action buttons on the screen.
If an action is ctrl clicked, it is "locked". This prevents any future position changes, and also enables a saving feature. With this saving feature, locked button positions persist between rounds. So your first o2 canister will always start where you saved it, etc.
Actions and buttons are a one to one link. While there is functionality to share action buttons between two players, this means showing the same object to both. So one player can move a button on another's screen. Horrendous.
This also makes code that modifies properties of the screen object itself very clunky.
Why is this bad

A: None knew pretty much any of this information. It is actually documented, just in a horribly formatted screen tip on the collapse button, you know the one we all mentally delete from the hud.
B: None of this is intuitive. Dragging buttons makes the hud look much worse, and you get no feedback that you even can drag them. Depressing
C: We use actions to make new options clear to the player. This means players can have a lot of action buttons on the hud. This gets cluttery
D: The collapse button is useless. It lets you clear your screen if someone like me fucks up and gives you 2000 actions, but outside of that it just hides all information from you. You never want to see none of your action buttons, just a filtered list of them.
E: On a technical level, they're quite messy, and not fully functionally complete. This is depressing.
What I've done

Assuming the above to be true, how do we fix them?
Well first I'm going to go over everything I changed, including links to major commits. I'll then describe the finished product, and why I made the decisions I did.

Oh and I've moved some of the more niche or technical discussion to dropdowns. Hopefully this makes finding the major functional changes easier

Adds helper procs for turning screen_loc strings into more manageable arrays. This doesn't fully support all of the screen_loc spec, but it's enough for what I'm doing. (f54865f)

Uses these helper procs to improve existing code (6273b93)

Fixes an issue with tooltip code itself. If you tried to hold down a mouse button while dragging onto a tooltip enabled object, it would silently fail. The js made assumptions about the order args came in, which broke when buttons were held down (e0e42f6)

Adds a signal linked to /client/Click(). Surprised we didn't have this before honestly (c491a4a)

Makes /client/MouseDrag() return parent. If we don't do this, any overrides of MouseDrag will never actually be called (2190b2a)
Refactors how action buttons work under the hood (53ccce2)
Basically, rather then generating one button per action, we generate one button per viewer

Starts to change button behavior, more cleanup

Changes the mouse cursor when an action button is dragged. Hopefully
this makes moving things feel less like an accident, and makes you doing
it more clear

Removes the moved and locked vars. This will be more relevant later, but
for now:

Moved exists as a sort of budget "We've been dragged" variable. We can
handle this more cleanly, and the movable type doesn't care about it

Locked is a very old variable that is also not something that the
movable type "owns". It's more an action button thing that's been moved
down.
It exists so an action can be locked in place, and in that locking, be
treated as a "saved location"
(21e20fc)

Because I've nuked move, we don't need to directly set our button's
position. We can use the default_button_position var instead. This is
quite handy.

Please ignore position_action, I will explain that later
(83e265e)

Removes the buttons locked pref

It was another obscure part of action buttons, basically do buttons
start "locked" or not. See previous discussion of locked
(b58b1bd)

Major rework starts here

Alright. Sorry for this, this is where me not commiting regularly starts
to suck. I'll do my best though.

Rather then figuring out an action button's position via a combination
of the moved and ordered vars, we use a separate location var to store
one of a few defines. This makes life later much easier.

Adds tooltip support for dragging action buttons. The way the tooltip
just froze in place when dragging really bugged me, and lead to some
nasty visual artifacts.
This is a bit messy because the drag procs are horrible, but it's
workable

Dropping a button on another button will no longer swap their positions
Behavior instead depends on the target button.

If it's a part of a group (A concept I will explain later) the dragged
button is simply inserted before it in the group's list.

If it's floating on the general hud, we instead position the dragged
button to its right. There's extra logic here to ensure buttons will
never overflow the screen, but I'll get into that later.

Alright. That's most of the refactoring. Time for the larger behavior
changes.

Adds a button palette. This is a separate dropdown that renders
underneath buttons.

image

The idea is to allow for a conceptual separation between "important"
buttons and the ones that end up cluttering the screen.

You can click on the dropdown to open it, then any later clicks that
don't involve actions in some way will autoclose it.

My goal is to come up with an alternative for the action button that
just acted as a way to hide all buttons on screen. Not convinced it saw
much use.

As a side effect of removing that, I've moved its tooltip stuff to the
palette. I've properly formatted it, so hopefully it's easier to read
then the jumble that we used to have.

(You can alt click the palette button to reset all button positions)

Oh and the palette can scroll, since as you'll see later it has a
limited size.
image

Moving on from that, I've added what amounts to action landing buttons.
These allow buttons to rejoin groups, or be positioned at the end of a
line of buttons.
image

They've got a 32x32 hitbox, and only show up when dragging. Hopefully
this makes the system more clear just by dragging an action.

Oh and I've changed how button position updating works. The old system
of calling update_action_buttons on mob every time an action button
changes position is gone, mostly because I've setup more robust
grouping. Will discuss when I get to huds

(0d1e93f)
Adds the backbone behind action button position changes (94133bd)

Moves hud defines to the global folder, safer this way (7260117)

Adds color changing to the palette button, giving some heads up for buttons being inserted into the palette automatically
image
image
Ensures a landing button is always shown, even if it needs to break the
max row rule
Makes palettes auto contract if they have no buttons inside them
Prevents palettes from being opened if they have no buttons inside them
(f9417f3)
How it looks
2022-02-26.02-30-10.mp4
Why It's Good For The Game

Players have more control over the clutter on their screen.
Buttons are available, but not in the way,
Since any player move of a button saves it, any lack of clarity in the way buttons work will be forced out by buttons not just resetting when a new game starts.
We don't overlap any existing screen elements, unless the upper button list gets really long.
The code is much less crummy (I think, may have made it worse it's hard for me to judge my own work)

If it ends up not being as usable as I'd like, I'll rip out the existing changes and just implement the qol and backend stuff. I think it's worth doing though.
Changelog

cl
add: Expanded heavily on action buttons
add: Adds an action button dropdown that sits just under the normal list in the top left. You can drag new buttons onto it to insert them. Click on it to show its contents, do what you want to do, then click again anywhere to contract it. Alt click it to reset all button positions
add: Action buttons will now remember their position between rounds. So if you really like your flashlight right next to your player for some reason, we support that now
add: When you start to drag an action button, docking ports will appear in places that it can be inserted into. (Outside of just floating somewhere on your screen of course)
del: Removed action button locking, and the associated preference. I'm reasonably sure literally none uses this, but if you do hit me up
qol: Dragging an action button will now give you an outline of its size around your cursor
fix: You can no longer cause the screen to expand by putting an action button on the edge of widescreen, and then resizing to standard.
refactor: Refactors action and button code significantly. lots of little things.
/cl
2022-04-01 09:40:20 +13:00
Ghom
3bc48ce599 Extra-large painting canvases: 36x24 and 45x27 (#65642) 2022-03-31 03:24:02 -07:00
TemporalOroboros
1bbf9370c7 Makes the beaker panel send assets to the user instead of null. (#65756) 2022-03-31 03:13:53 -07:00
Watermelon914
7e32bdfca1 Pingbus changes and improvements (#65625)
Adds new configs for non-urgent ahelps to be sent to a channel when no admins are on. This will include urgent ahelps too.
Adds a response message that is sent to discord when an ahelp is responded to in any way
Player counts are now sent in the embed.
2022-03-30 15:13:02 +01:00
Seth Scherer
68165abf5e Turns the thunderdome into a map template (#65545) 2022-03-28 16:46:06 -07:00