things with stuff (#6233)
* buncha things from upstream * datums globals, onclick * datums * game folder, holy shit mirror bot why * modules * icons * dme * compiles cleanly * tools purge * updates maps * double check just because. and wew lad * incidentally, this needs more work first * some things * weh * sound cleanup and icons * reeeee * compile issues * oh look, fresh code sync * cleans up some unused icons * dirty vars * reeeeeeeeeeeeeeee * wew lad. fuck off with this already
This commit is contained in:
@@ -161,12 +161,15 @@
|
||||
var/mob/M = usr
|
||||
if((!istype(over_object, /obj/screen)) && usr.canUseTopic(src))
|
||||
return attack_self(M)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/device/modular_computer/attack_ai(mob/user)
|
||||
return attack_self(user)
|
||||
|
||||
/obj/item/device/modular_computer/attack_ghost(mob/dead/observer/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(enabled)
|
||||
ui_interact(user)
|
||||
else if(IsAdminGhost(user))
|
||||
@@ -207,7 +210,7 @@
|
||||
|
||||
|
||||
// On-click handling. Turns on the computer if it's off and opens the GUI.
|
||||
/obj/item/device/modular_computer/attack_self(mob/user)
|
||||
/obj/item/device/modular_computer/interact(mob/user)
|
||||
if(enabled)
|
||||
ui_interact(user)
|
||||
else
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/obj/item/device/modular_computer/attack_self(mob/user)
|
||||
. = ..()
|
||||
ui_interact(user)
|
||||
|
||||
|
||||
// Operates TGUI
|
||||
/obj/item/device/modular_computer/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = FALSE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state)
|
||||
if(!enabled)
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
try_toggle_open(usr)
|
||||
|
||||
/obj/item/device/modular_computer/laptop/MouseDrop(obj/over_object, src_location, over_location)
|
||||
. = ..()
|
||||
if(over_object == usr || over_object == src)
|
||||
try_toggle_open(usr)
|
||||
else if(istype(over_object, /obj/screen/inventory/hand))
|
||||
@@ -65,12 +66,12 @@
|
||||
M.put_in_hand(src, H.held_index)
|
||||
|
||||
/obj/item/device/modular_computer/laptop/attack_hand(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
if(screen_on && isturf(loc))
|
||||
return attack_self(user)
|
||||
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/device/modular_computer/laptop/proc/try_toggle_open(mob/living/user)
|
||||
if(issilicon(user))
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user