[MIRROR] You no longer need to hold shift to open the context menu as a ghost (#3122)

* You no longer need to hold shift to open the context menu as a ghost (#56646)

* You no longer need to hold shift to open the context menu as a ghost

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
SkyratBot
2021-02-05 23:06:57 +01:00
committed by GitHub
parent d54bcd08f1
commit c179c2bf59
5 changed files with 19 additions and 0 deletions
+13
View File
@@ -215,6 +215,8 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
// Instantiate tgui panel
tgui_panel = new(src)
set_right_click_menu_mode(TRUE)
GLOB.ahelp_tickets.ClientLogin(src)
GLOB.interviews.client_login(src)
var/connecting_admin = FALSE //because de-admined admins connecting should be treated like admins.
@@ -1116,3 +1118,14 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if(holder)
holder.filteriffic = new /datum/filter_editor(in_atom)
holder.filteriffic.ui_interact(mob)
/client/proc/set_right_click_menu_mode(shift_only)
if(shift_only)
winset(src, "mapwindow.map", "right-click=true")
winset(src, "ShiftUp", "is-disabled=false")
winset(src, "Shift", "is-disabled=false")
else
winset(src, "mapwindow.map", "right-click=false")
winset(src, "default.Shift", "is-disabled=true")
winset(src, "default.ShiftUp", "is-disabled=true")
+3
View File
@@ -20,3 +20,6 @@
update_icon(preferred_form)
updateghostimages()
client.set_right_click_menu_mode(FALSE)
@@ -21,6 +21,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
light_range = 1
light_power = 2
light_on = FALSE
shift_to_open_context_menu = FALSE
var/can_reenter_corpse
var/datum/hud/living/carbon/hud = null // hud
var/bootime = 0
+1
View File
@@ -32,6 +32,7 @@
world.update_status()
client.screen = list() //remove hud items just in case
client.images = list()
client.set_right_click_menu_mode(shift_to_open_context_menu)
if(!hud_used)
create_mob_hud()
+1
View File
@@ -18,6 +18,7 @@
throwforce = 10
blocks_emissive = EMISSIVE_BLOCK_GENERIC
pass_flags_self = PASSMOB
var/shift_to_open_context_menu = TRUE
///when this be added to vis_contents of something it inherit something.plane, important for visualisation of mob in openspace.
vis_flags = VIS_INHERIT_PLANE