mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Steals tg's span macros (#12232)
* Steals tg's span macros * Fix alphabet * Updated some more spans * Misses a conflict * Fix compile errors * Converts more spans * oops
This commit is contained in:
@@ -73,14 +73,14 @@
|
||||
if(SYRINGE_DRAW)
|
||||
|
||||
if(reagents.total_volume >= reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>The syringe is full.</span>")
|
||||
to_chat(user, span_notice("The syringe is full."))
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
var/drawn_amount = reagents.maximum_volume - reagents.total_volume
|
||||
if(target != user)
|
||||
target.visible_message("<span class='danger'>[user] is trying to take a blood sample from [target]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to take a blood sample from [target]!</span>")
|
||||
target.visible_message(span_danger("[user] is trying to take a blood sample from [target]!"), \
|
||||
span_userdanger("[user] is trying to take a blood sample from [target]!"))
|
||||
busy = TRUE
|
||||
if(!do_mob(user, target, extra_checks=CALLBACK(L, /mob/living/proc/can_inject, user, TRUE)))
|
||||
busy = FALSE
|
||||
@@ -91,20 +91,20 @@
|
||||
if(L.transfer_blood_to(src, drawn_amount))
|
||||
user.visible_message("[user] takes a blood sample from [L].")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You are unable to draw any blood from [L]!</span>")
|
||||
to_chat(user, span_warning("You are unable to draw any blood from [L]!"))
|
||||
|
||||
else //if not mob
|
||||
if(!target.reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>[target] is empty!</span>")
|
||||
to_chat(user, span_warning("[target] is empty!"))
|
||||
return
|
||||
|
||||
if(!target.is_drawable(user))
|
||||
to_chat(user, "<span class='warning'>You cannot directly remove reagents from [target]!</span>")
|
||||
to_chat(user, span_warning("You cannot directly remove reagents from [target]!"))
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this, transfered_by = user) // transfer from, transfer to - who cares?
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units.</span>")
|
||||
to_chat(user, span_notice("You fill [src] with [trans] units of the solution. It now contains [reagents.total_volume] units."))
|
||||
if (reagents.total_volume >= reagents.maximum_volume)
|
||||
mode=!mode
|
||||
update_icon()
|
||||
@@ -115,23 +115,23 @@
|
||||
log_combat(user, target, "attempted to inject", src, addition="which had [contained]")
|
||||
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
to_chat(user, span_notice("[src] is empty."))
|
||||
return
|
||||
|
||||
if(!L && !target.is_injectable(user)) //only checks on non-living mobs, due to how can_inject() handles
|
||||
to_chat(user, "<span class='warning'>You cannot directly fill [target]!</span>")
|
||||
to_chat(user, span_warning("You cannot directly fill [target]!"))
|
||||
return
|
||||
|
||||
if(target.reagents.total_volume >= target.reagents.maximum_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
to_chat(user, span_notice("[target] is full."))
|
||||
return
|
||||
|
||||
if(L) //living mob
|
||||
if(!L.can_inject(user, TRUE))
|
||||
return
|
||||
if(L != user)
|
||||
L.visible_message("<span class='danger'>[user] is trying to inject [L]!</span>", \
|
||||
"<span class='userdanger'>[user] is trying to inject [L]!</span>")
|
||||
L.visible_message(span_danger("[user] is trying to inject [L]!"), \
|
||||
span_userdanger("[user] is trying to inject [L]!"))
|
||||
if(!do_mob(user, L, extra_checks=CALLBACK(L, /mob/living/proc/can_inject, user, TRUE)))
|
||||
return
|
||||
if(!reagents.total_volume)
|
||||
@@ -139,7 +139,7 @@
|
||||
if(L.reagents.total_volume >= L.reagents.maximum_volume)
|
||||
return
|
||||
L.visible_message("<span class='danger'>[user] injects [L] with the syringe!", \
|
||||
"<span class='userdanger'>[user] injects [L] with the syringe!</span>")
|
||||
span_userdanger("[user] injects [L] with the syringe!"))
|
||||
// yogs start - Adds viruslist stuff
|
||||
var/viruslist = ""
|
||||
for(var/datum/reagent/R in reagents.reagent_list)
|
||||
@@ -165,7 +165,7 @@
|
||||
var/fraction = min(amount_per_transfer_from_this/reagents.total_volume, 1)
|
||||
reagents.reaction(L, INJECT, fraction)
|
||||
reagents.trans_to(target, amount_per_transfer_from_this, transfered_by = user)
|
||||
to_chat(user, "<span class='notice'>You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units.</span>")
|
||||
to_chat(user, span_notice("You inject [amount_per_transfer_from_this] units of the solution. The syringe now contains [reagents.total_volume] units."))
|
||||
if (reagents.total_volume <= 0 && mode==SYRINGE_INJECT)
|
||||
mode = SYRINGE_DRAW
|
||||
update_icon()
|
||||
|
||||
Reference in New Issue
Block a user