mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
Alt click refactor (#82656)
## 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 <details><summary>More info for devs</summary> 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. </details> ## 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. /🆑
This commit is contained in:
@@ -344,15 +344,14 @@ GLOBAL_VAR_INIT(hhMysteryRoomNumber, rand(1, 999999))
|
||||
if(get_dist(get_turf(src), get_turf(user)) <= 1)
|
||||
promptExit(user)
|
||||
|
||||
/turf/closed/indestructible/hoteldoor/AltClick(mob/user)
|
||||
. = ..()
|
||||
if(get_dist(get_turf(src), get_turf(user)) <= 1)
|
||||
to_chat(user, span_notice("You peak through the door's bluespace peephole..."))
|
||||
user.reset_perspective(parentSphere)
|
||||
var/datum/action/peephole_cancel/PHC = new
|
||||
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
|
||||
PHC.Grant(user)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(check_eye))
|
||||
/turf/closed/indestructible/hoteldoor/click_alt(mob/user)
|
||||
to_chat(user, span_notice("You peak through the door's bluespace peephole..."))
|
||||
user.reset_perspective(parentSphere)
|
||||
var/datum/action/peephole_cancel/PHC = new
|
||||
user.overlay_fullscreen("remote_view", /atom/movable/screen/fullscreen/impaired, 1)
|
||||
PHC.Grant(user)
|
||||
RegisterSignal(user, COMSIG_MOVABLE_MOVED, PROC_REF(check_eye))
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
/turf/closed/indestructible/hoteldoor/proc/check_eye(mob/user, atom/oldloc, direction)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
Reference in New Issue
Block a user