Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alt click refactor #82656

Merged
merged 46 commits into from Apr 16, 2024
Merged

Alt click refactor #82656

merged 46 commits into from Apr 16, 2024

Conversation

jlsnow301
Copy link
Contributor

@jlsnow301 jlsnow301 commented Apr 13, 2024

About The Pull Request

Rewrites how alt click works.
Based heavily on #82625. What a cool concept, it flows nicely with #82533.

Fixes #81242
(tm bugs fixed)
Fixes #82668

More info for devs

Handy regex used for alt click s&r:
AltClick\((.*).*\)(\n\t.*\.\.\(\))?
click_alt($1) (yes I am aware this only copies the first arg. there are no other args!)

Obj reskins

No reason for obj reskin to check on every single alt click for every object. It applies to only a few items.

  • Moved to obj/item
  • Made into signal
  • Added screentips

Ventcrawling

Every single atmospherics machine checked for ventcrawling capability on alt click despite only 3 objects needing that functionality. This has been moved down to those individual items.

Why It's Good For The Game

For players:

  • Alt clicking should work more logically, not causing double actions like eject disk and open item window
  • Added context menus for reskinnable items
  • Removed adjacency restriction on loot panel

For devs:

  • Makes alt click interactions easier to work with, no more click chain nonsense and redundant guard clauses.
  • OOP hell reduced
  • Pascal Case reduced
  • Glorious snake case

Changelog

🆑
add: The lootpanel now works at range.
add: Screentips for reskinnable items.
fix: Alt click interactions have been refactored, which may lead to unintentional changes to gameplay. Report any issues, please.
/:cl:

@tgstation-server tgstation-server added Fix Rewrites a bug so it appears in different circumstances Refactor Makes the code harder to read labels Apr 13, 2024
@TheRyeGuyWhoWillNowDie
Copy link
Contributor

breaks like, every alt click interaction. no longer possible to check contents of storage item with alt click, no longer possible to empty fire extinguishers, etc. alt click menu also barely works and will always target the tile you're standing on which breaks being able to move items under flaps and whatnot

@00-Steven
Copy link
Contributor

00-Steven commented Apr 15, 2024

having the current iteration of this pr open right now, you can actually open storage with alt click and emptying fire extinguishers does work!
things I've tested so far:

  • alt-clicking bags/boxes to open their contents works
  • turning on organ harvester works
  • emptying fire extinguishers works
  • adjusting (tailored) winter coats, labcoats, cargo gorkas, jumpsuits works
  • adjusting bandanas works
  • flipping caps works
  • adding and removing pride pins/dogtags from jumpsuits works
  • rotating sink and shower frames works
  • rotating chairs, sofas, office chairs, stools works, inc while sitting on them
  • rotating plumbing lines for hydroponics trays, smoke machines, and everything in the base/science/service plumbing constructors works
  • maximizing pressure/heat/transfer rate on gas and volume pumps, passive and temperature gates, pressure valves, temperature pumps, and gas mixers and filters works
  • rotating computer frames works
  • rotating booze and soda dispensers works
  • rotating wheelchairs works
  • controller shell alternate signal works
  • removing the cap from coffee cups and syrup bottles works
  • reskinning medical sprays works
  • sealing chem packs works
  • racking dual tube shotguns works
  • spinning the chamber on revolvers works
  • removing arrows from bows works
  • removing pens from clipboards works

for my own sanity I'mma leave it at that for a bit

@jlsnow301
Copy link
Contributor Author

breaks like, every alt click interaction. no longer possible to check contents of storage item with alt click, no longer possible to empty fire extinguishers, etc. alt click menu also barely works and will always target the tile you're standing on which breaks being able to move items under flaps and whatnot

This gets updated pretty quickly, so please make an issue report with a round ID

@ophaq
Copy link
Contributor

ophaq commented Apr 16, 2024

This is terrible currently. Can't even rotate shit with alt click. Did it override other settings or something?

@jlsnow301
Copy link
Contributor Author

This is terrible currently. Can't even rotate shit with alt click. Did it override other settings or something?

dreamseeker_wwT4kyRhdo

@ophaq
Copy link
Contributor

ophaq commented Apr 16, 2024

This is terrible currently. Can't even rotate shit with alt click. Did it override other settings or something?
image

Yeah, I don't know why I couldn't rotate things. Maybe it was because I was a cyborg in the round? The new loot panel was pretty fucky when I was trying it out. It wouldn't display items on the ground in the loot panel box either when I tried alt clicking the floor.

@jlsnow301
Copy link
Contributor Author

jlsnow301 commented Apr 16, 2024

It wouldn't display items on the ground in the loot panel box either when I tried alt clicking the floor.

Could you elaborate, or better, write an issue with some repro steps?

I don't know why I couldn't rotate things. Maybe it was because I was a cyborg in the round?

can cyborgs do this without hands??

edit: found it, fixed

@san7890 san7890 merged commit 8e3f635 into tgstation:master Apr 16, 2024
19 checks passed
github-actions bot added a commit that referenced this pull request Apr 16, 2024
comfyorange added a commit that referenced this pull request Apr 16, 2024
@jlsnow301 jlsnow301 deleted the alt-click-ref branch April 17, 2024 00:48
@KingkumaArt
Copy link
Contributor

Imagine you want to clear the pad after someone placed some orders on the express. before, you would walk up, alt click it, see the list, and click with your welder active on each listed drop pod. now, it looks like this and you can only click on one drop pod at a time.
https://i.imgur.com/14A9PQh.png

@jlsnow301
Copy link
Contributor Author

wonder what this does
image

Copy link
Contributor

This pull request was test merged in 60 round(s).

Round list

sybil

manuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix Rewrites a bug so it appears in different circumstances Refactor Makes the code harder to read 📌 Test Merge Candidate This version will not be removed by actions when the PR is updated
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to ventcrawl with alt+click Okay a whole lot of things lack proper sanity checks for alt-clicking
10 participants