mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 21:19:44 +01:00
Machine var shim (#18644)
* removal of machine var * shimsham * deprecation warnings * COMSIG_LIVING_HANDLE_VISION signal * improved * more cleanup * more fixes * this is fine * fixed radios * notices for now, tgui fix * cleaned up hud and vision parent calls, adds COMSIG_LIVING_HANDLE_HUD * radios use tgui now * guestpass does not need machine anymore * cloning machine doesn't use it * this arcade machine is tgui too * autolathe does not need machine * remaining cleanup * doc fix * fix * logout handling --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
@@ -87,7 +87,6 @@
|
||||
|
||||
/obj/item/radio/headset/attackby(obj/item/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if(!(W.has_tool_quality(TOOL_SCREWDRIVER) || istype(W, /obj/item/encryptionkey)))
|
||||
return
|
||||
|
||||
|
||||
@@ -116,7 +116,6 @@
|
||||
return
|
||||
|
||||
/obj/item/radio/attack_self(mob/user as mob)
|
||||
user.set_machine(src)
|
||||
interact(user)
|
||||
|
||||
/obj/item/radio/interact(mob/user)
|
||||
@@ -588,7 +587,6 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
|
||||
/obj/item/radio/attackby(obj/item/W as obj, mob/user as mob)
|
||||
..()
|
||||
user.set_machine(src)
|
||||
if (!W.has_tool_quality(TOOL_SCREWDRIVER))
|
||||
return
|
||||
b_stat = !( b_stat )
|
||||
@@ -643,7 +641,6 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
|
||||
|
||||
/obj/item/radio/borg/attackby(obj/item/W as obj, mob/user as mob)
|
||||
// ..()
|
||||
user.set_machine(src)
|
||||
if (!(W.has_tool_quality(TOOL_SCREWDRIVER) || istype(W, /obj/item/encryptionkey)))
|
||||
return
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
if(camera.status && !isturf(target))
|
||||
show_tvs(target)
|
||||
user.visible_message(span_infoplain(span_bold("[user]") + " aims [src] at [target]."), span_info("You aim [src] at [target]."))
|
||||
if(user.machine == src)
|
||||
if(user.check_current_machine(src))
|
||||
show_ui(user) // refresh the UI
|
||||
|
||||
/obj/item/tvcamera/process()
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
AddElement(/datum/element/sellable/material_stack)
|
||||
|
||||
/obj/item/stack/Destroy()
|
||||
if (src && usr && usr.machine == src)
|
||||
if (src && usr && usr.check_current_machine(src))
|
||||
usr << browse(null, "window=stack")
|
||||
if(islist(synths))
|
||||
synths.Cut()
|
||||
@@ -423,7 +423,7 @@
|
||||
src.add_fingerprint(user)
|
||||
F.add_fingerprint(user)
|
||||
spawn(0)
|
||||
if (src && user.machine==src)
|
||||
if (src && user.check_current_machine(src))
|
||||
src.interact(user)
|
||||
else
|
||||
..()
|
||||
@@ -439,9 +439,9 @@
|
||||
src.transfer_to(S)
|
||||
|
||||
spawn(0) //give the stacks a chance to delete themselves if necessary
|
||||
if (S && user.machine==S)
|
||||
if (S && user.check_current_machine(S))
|
||||
S.interact(user)
|
||||
if (src && user.machine==src)
|
||||
if (src && user.check_current_machine(src))
|
||||
src.interact(user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
density = TRUE
|
||||
opacity = 0
|
||||
anchored = TRUE
|
||||
flags = REMOTEVIEW_ON_ENTER
|
||||
|
||||
var/ready = 1
|
||||
var/malfunction = 0
|
||||
@@ -41,7 +42,6 @@
|
||||
dat += span_bold("Implants:") + " [src.implant_list.len ? "[implant_list.len]" : "<A href='byond://?src=\ref[src];replenish=1'>Replenish</A>"]<BR>"
|
||||
if(src.occupant)
|
||||
dat += "[src.ready ? "<A href='byond://?src=\ref[src];implant=1'>Implant</A>" : "Recharging"]<BR>"
|
||||
user.set_machine(src)
|
||||
|
||||
var/datum/browser/popup = new(user, "implant", "Implant")
|
||||
popup.set_content(dat)
|
||||
|
||||
Reference in New Issue
Block a user