Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
thgvr committed Feb 20, 2024
1 parent a5dc2dd commit 3339d51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 22 deletions.
2 changes: 0 additions & 2 deletions code/datums/beam.dm
Original file line number Diff line number Diff line change
Expand Up @@ -207,5 +207,3 @@
var/datum/beam/newbeam = new(src,BeamTarget,icon,icon_state,time,maxdistance,beam_type, beam_color, emissive, override_origin_pixel_x, override_origin_pixel_y, override_target_pixel_x, override_target_pixel_y)
INVOKE_ASYNC(newbeam, TYPE_PROC_REF(/datum/beam, Start))
return newbeam


34 changes: 15 additions & 19 deletions code/game/machinery/medical/_medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
active_power_usage = 750
///Whos is attached to the life support.
var/mob/living/carbon/attached
///Active beam currently connected to attached target
var/datum/beam/attached_beam = null

/obj/machinery/medical/Initialize()
. = ..()
Expand All @@ -22,7 +24,13 @@

/obj/machinery/medical/MouseDrop(mob/living/target)
. = ..()
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE) || !isliving(target) || attached)
if(!ishuman(usr) || !usr.canUseTopic(src, BE_CLOSE) || !isliving(target))
return

if(attached)
usr.visible_message("<span class='warning'>[usr] deattaches [src] from [target].</span>", "<span class='notice'>You deattach [src] from [target].</span>")
clear_status()
attached = null
return

if(!target.has_dna())
Expand All @@ -31,23 +39,11 @@

if(Adjacent(target) && usr.Adjacent(target))
usr.visible_message(span_warning("[usr] attaches [src] to [target]."), span_notice("You attach [src] to [target]."))
attached_beam = src.Beam(target, icon_state = "blood", maxdistance = 1)
add_fingerprint(usr)
attached = target
update_overlays()

/obj/machinery/medical/attack_hand(mob/user)
. = ..()
if(.)
return
if(!ishuman(user))
return
if(attached)
visible_message(span_notice("[attached] is detached from [src]."))
attached = null
clear_status()
update_appearance()
return

/obj/machinery/medical/process()
update_overlays()
update_appearance()
Expand All @@ -73,11 +69,11 @@
return

/**
* Properly gets rid of status effects from the attached
*
* Internal function, you shouldn't be calling this from anywhere else. Gets rid of all the status effects, traits and other shit you might have
* put on the attached victim. Automatically updates overlays in case you have some, and changes power to idle power use.
*/
* Properly gets rid of status effects from the attached
*
* Internal function, you shouldn't be calling this from anywhere else. Gets rid of all the status effects, traits and other shit you might have
* put on the attached victim. Automatically updates overlays in case you have some, and changes power to idle power use.
*/
/obj/machinery/medical/proc/clear_status()
update_overlays()
use_power = IDLE_POWER_USE
Expand Down
1 change: 0 additions & 1 deletion code/game/machinery/medical/life_support.dm
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
monitor_overlay= mutable_appearance(icon,"alive")
. += monitor_overlay


/obj/machinery/medical/life_support/wrench_act(mob/living/user, obj/item/I)
. = ..()
active = anchored
Expand Down

0 comments on commit 3339d51

Please sign in to comment.