diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 80f7f5ba41..2cb4e1863b 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -24,6 +24,11 @@
to_chat(user, "You don't have the dexterity to do this!")
return 1
+ var/available = get_amount()
+ if(!available)
+ to_chat(user, "There's not enough [uses_charge ? "charge" : "items"] left to use that!")
+ return 1
+
if (istype(M, /mob/living/carbon/human))
var/mob/living/carbon/human/H = M
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
@@ -101,11 +106,12 @@
to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
else
+ var/available = get_amount()
user.visible_message("\The [user] starts bandaging [M]'s [affecting.name].", \
"You start bandaging [M]'s [affecting.name]." )
var/used = 0
for (var/datum/wound/W in affecting.wounds)
- if (W.internal)
+ if(W.internal)
continue
if(W.bandaged)
continue
@@ -119,6 +125,10 @@
to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
+ if(used >= available)
+ to_chat(user, "You run out of [src]!")
+ break
+
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message("\The [user] bandages \a [W.desc] on [M]'s [affecting.name].", \
"You bandage \a [W.desc] on [M]'s [affecting.name]." )
@@ -164,6 +174,7 @@
to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
else
+ var/available = get_amount()
user.visible_message("\The [user] starts treating [M]'s [affecting.name].", \
"You start treating [M]'s [affecting.name]." )
var/used = 0
@@ -182,6 +193,10 @@
to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
+ if(used >= available)
+ to_chat(user, "You run out of [src]!")
+ break
+
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message("\The [user] bandages \a [W.desc] on [M]'s [affecting.name].", \
"You bandage \a [W.desc] on [M]'s [affecting.name]." )
@@ -271,6 +286,7 @@
to_chat(user, "The wounds on [M]'s [affecting.name] have already been treated.")
return 1
else
+ var/available = get_amount()
user.visible_message("\The [user] starts treating [M]'s [affecting.name].", \
"You start treating [M]'s [affecting.name]." )
var/used = 0
@@ -287,6 +303,11 @@
if(affecting.is_bandaged() && affecting.is_disinfected()) // We do a second check after the delay, in case it was bandaged after the first check.
to_chat(user, "The wounds on [M]'s [affecting.name] have already been bandaged.")
return 1
+
+ if(used >= available)
+ to_chat(user, "You run out of [src]!")
+ break
+
if (W.current_stage <= W.max_bleeding_stage)
user.visible_message("\The [user] cleans \a [W.desc] on [M]'s [affecting.name] and seals the edges with bioglue.", \
"You clean and seal \a [W.desc] on [M]'s [affecting.name]." )