Fix mecha mouse pointer issues (#38213)
* Fix mecha mouse pointer issues * Migrate ranged ability mouse pointers to new system
This commit is contained in:
@@ -35,14 +35,6 @@
|
||||
QDEL_LIST(diseases)
|
||||
return ..()
|
||||
|
||||
/mob/living/ghostize(can_reenter_corpse = 1)
|
||||
var/prev_client = client
|
||||
. = ..()
|
||||
if(.)
|
||||
if(ranged_ability && prev_client)
|
||||
ranged_ability.remove_mousepointer(prev_client)
|
||||
|
||||
|
||||
/mob/living/proc/OpenCraftingMenu()
|
||||
return
|
||||
|
||||
@@ -1149,6 +1141,11 @@
|
||||
clear_fullscreen("remote_view", 0)
|
||||
update_pipe_vision()
|
||||
|
||||
/mob/living/update_mouse_pointer()
|
||||
..()
|
||||
if (client && ranged_ability && ranged_ability.ranged_mousepointer)
|
||||
client.mouse_pointer_icon = ranged_ability.ranged_mousepointer
|
||||
|
||||
/mob/living/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("stat")
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
/mob/living/Logout()
|
||||
update_z(null)
|
||||
if(ranged_ability && client)
|
||||
ranged_ability.remove_mousepointer(client)
|
||||
..()
|
||||
if(!key && mind) //key and mind have become separated.
|
||||
mind.active = 0 //This is to stop say, a mind.transfer_to call on a corpse causing a ghost to re-enter its body.
|
||||
@@ -38,6 +38,7 @@
|
||||
AA.onNewMob(src)
|
||||
|
||||
update_client_colour()
|
||||
update_mouse_pointer()
|
||||
if(client)
|
||||
client.click_intercept = null
|
||||
|
||||
|
||||
@@ -849,6 +849,15 @@
|
||||
if (L)
|
||||
L.alpha = lighting_alpha
|
||||
|
||||
/mob/proc/update_mouse_pointer()
|
||||
if (!client)
|
||||
return
|
||||
client.mouse_pointer_icon = initial(client.mouse_pointer_icon)
|
||||
if (ismecha(loc))
|
||||
var/obj/mecha/M = loc
|
||||
if(M.mouse_pointer)
|
||||
client.mouse_pointer_icon = M.mouse_pointer
|
||||
|
||||
/mob/proc/is_literate()
|
||||
return 0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user