Skip to content

Commit

Permalink
resolving
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsVyzo committed Feb 7, 2024
1 parent 10022d9 commit 451aef2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
16 changes: 7 additions & 9 deletions code/game/machinery/vending/vendor_types/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,9 @@
update_icon()

/obj/structure/medical_supply_link/deconstruct(disassembled)
UnregisterSignal(src, COMSIG_STRUCTURE_WRENCHED)
UnregisterSignal(src, COMSIG_STRUCTURE_UNWRENCHED)
return ..()

/obj/structure/medical_supply_link/proc/do_clamp_animation()
/obj/structure/medical_supply_link/proc/do_clamp_animation() // clamp and unclamp animations for when vendor is wrench over supply link
flick("medlink_clamping", src)
addtimer(CALLBACK(src, PROC_REF(update_icon), 2.6 SECONDS))
update_icon()
Expand Down Expand Up @@ -58,7 +56,7 @@
vendor_theme = VENDOR_THEME_COMPANY
vend_delay = 0.5 SECONDS

var/requires_supply_link_port = TRUE
var/requires_supply_link_port = TRUE // sets vendor to require medlink to be able to resupply

var/datum/health_scan/last_health_display

Expand Down Expand Up @@ -106,7 +104,7 @@
if(healthscan)
. += SPAN_NOTICE("The [src.name] offers assisted medical scan, for ease of usage with minimal training. Present the target in front of the scanner to scan.")

/obj/structure/machinery/cm_vending/sorted/medical/proc/get_supply_link()
/obj/structure/machinery/cm_vending/sorted/medical/proc/get_supply_link() // checks supply link location in relation to medvendor
var/linkpoint = locate(/obj/structure/medical_supply_link) in loc
if(!linkpoint)
return FALSE
Expand All @@ -118,7 +116,7 @@
var/obj/item/reagent_container/container = item_to_stock
if(container.reagents.total_volume < container.reagents.maximum_volume)
if(user)
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects \the [container.name]. Looks like this vendor cannot refill these outside of a medical bay's supply link."))
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects [container.name]. Looks like this vendor cannot refill these outside of a medical bay's supply link."))
playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE)
return FALSE

Expand All @@ -128,7 +126,7 @@
var/obj/item/stack/restock_stack = item_to_stock
if(restock_stack.amount < restock_stack.max_amount) // if the stack is not full
if(user)
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects \the [restock_stack]. Looks like this vendor cannot restock non-full stacks outside of a medical bay's supply link."))
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects [restock_stack]. Looks like this vendor cannot restock non-full stacks outside of a medical bay's supply link."))
playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE)
return FALSE
return TRUE
Expand All @@ -154,7 +152,7 @@
return

if(requires_supply_link_port && !get_supply_link())
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects \the [C.name]. Looks like this vendor cannot refill these outside of a medical bay's supply link."))
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects [C.name]. Looks like this vendor cannot refill these outside of a medical bay's supply link."))
playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE)
return

Expand Down Expand Up @@ -183,7 +181,7 @@
return

if(requires_supply_link_port && !get_supply_link())
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects \the [S.name]. Looks like this vendor cannot restock non-full stacks outside of a medical bay's supply link."))
to_chat(user, SPAN_WARNING("\The [src] makes a buzzing noise as it rejects [S.name]. Looks like this vendor cannot restock non-full stacks outside of a medical bay's supply link."))
playsound(src, 'sound/machines/buzz-sigh.ogg', 15, TRUE)
return

Expand Down
8 changes: 4 additions & 4 deletions code/game/objects/structures.dm
Original file line number Diff line number Diff line change
Expand Up @@ -219,12 +219,12 @@
playsound(loc, 'sound/items/Ratchet.ogg', 25, 1)
if(anchored)
user.visible_message(SPAN_NOTICE("[user] anchors [src] into place."),SPAN_NOTICE("You anchor [src] into place."))
for(var/obj/O in loc)
SEND_SIGNAL(O, COMSIG_STRUCTURE_WRENCHED, src)
for(var/obj/medlink in loc)
SEND_SIGNAL(medlink, COMSIG_STRUCTURE_WRENCHED, src)
else
user.visible_message(SPAN_NOTICE("[user] unanchors [src]."),SPAN_NOTICE("You unanchor [src]."))
for(var/obj/O in loc)
SEND_SIGNAL(O, COMSIG_STRUCTURE_UNWRENCHED, src)
for(var/obj/medlink in loc)
SEND_SIGNAL(medlink, COMSIG_STRUCTURE_UNWRENCHED, src)
return TRUE

/obj/structure/get_applying_acid_time()
Expand Down

0 comments on commit 451aef2

Please sign in to comment.