mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-02 13:34:49 +00:00
[MIRROR] refactors most spans (#9139)
Co-authored-by: Heroman3003 <31296024+Heroman3003@users.noreply.github.com> Co-authored-by: Kashargul <KashL@t-online.de>
This commit is contained in:
@@ -18,9 +18,9 @@
|
||||
. = ..()
|
||||
if(get_dist(user, src) <= 2)
|
||||
if(reagents && reagents.reagent_list.len)
|
||||
. += "<span class='notice'>It contains [reagents.total_volume] units of liquid.</span>"
|
||||
. += span_notice("It contains [reagents.total_volume] units of liquid.")
|
||||
else
|
||||
. += "<span class='notice'>It is empty.</span>"
|
||||
. += span_notice("It is empty.")
|
||||
|
||||
/obj/item/reagent_containers/dropper/afterattack(var/obj/target, var/mob/user, var/proximity)
|
||||
if(!target.reagents || !proximity) return
|
||||
@@ -28,11 +28,11 @@
|
||||
if(reagents.total_volume)
|
||||
|
||||
if(!target.reagents.get_free_space())
|
||||
to_chat(user, "<span class='notice'>[target] is full.</span>")
|
||||
to_chat(user, span_notice("[target] is full."))
|
||||
return
|
||||
|
||||
if(!target.is_open_container() && !ismob(target) && !istype(target, /obj/item/reagent_containers/food) && !istype(target, /obj/item/clothing/mask/smokable/cigarette)) //You can inject humans and food but you cant remove the shit.
|
||||
to_chat(user, "<span class='notice'>You cannot directly fill this object.</span>")
|
||||
to_chat(user, span_notice("You cannot directly fill this object."))
|
||||
return
|
||||
|
||||
var/trans = 0
|
||||
@@ -40,7 +40,7 @@
|
||||
if(ismob(target))
|
||||
|
||||
var/time = 20 //2/3rds the time of a syringe
|
||||
user.visible_message("<span class='warning'>[user] is trying to squirt something into [target]'s eyes!</span>")
|
||||
user.visible_message(span_warning("[user] is trying to squirt something into [target]'s eyes!"))
|
||||
|
||||
if(!do_mob(user, target, time))
|
||||
return
|
||||
@@ -61,7 +61,7 @@
|
||||
|
||||
if(safe_thing)
|
||||
trans = reagents.splash(safe_thing, min(amount_per_transfer_from_this, reagents.total_volume), max_spill=30)
|
||||
user.visible_message("<span class='warning'>[user] tries to squirt something into [target]'s eyes, but fails!</span>", "<span class='notice'>You transfer [trans] units of the solution.</span>")
|
||||
user.visible_message(span_warning("[user] tries to squirt something into [target]'s eyes, but fails!"), span_notice("You transfer [trans] units of the solution."))
|
||||
return
|
||||
|
||||
var/contained = reagentlist()
|
||||
@@ -69,27 +69,27 @@
|
||||
|
||||
trans += reagents.trans_to_mob(target, min(amount_per_transfer_from_this, reagents.total_volume)/2, CHEM_INGEST) //Half injected, half ingested
|
||||
trans += reagents.trans_to_mob(target, min(amount_per_transfer_from_this, reagents.total_volume), CHEM_BLOOD) //I guess it gets into the bloodstream through the eyes or something
|
||||
user.visible_message("<span class='warning'>[user] squirts something into [target]'s eyes!</span>", "<span class='notice'>You transfer [trans] units of the solution.</span>")
|
||||
user.visible_message(span_warning("[user] squirts something into [target]'s eyes!"), span_notice("You transfer [trans] units of the solution."))
|
||||
|
||||
return
|
||||
|
||||
else
|
||||
trans = reagents.trans_to_obj(target, amount_per_transfer_from_this)
|
||||
to_chat(user, "<span class='notice'>You transfer [trans] units of the solution.</span>")
|
||||
to_chat(user, span_notice("You transfer [trans] units of the solution."))
|
||||
|
||||
else // Taking from something
|
||||
|
||||
if(!target.is_open_container() && !istype(target,/obj/structure/reagent_dispensers))
|
||||
to_chat(user, "<span class='notice'>You cannot directly remove reagents from [target].</span>")
|
||||
to_chat(user, span_notice("You cannot directly remove reagents from [target]."))
|
||||
return
|
||||
|
||||
if(!target.reagents || !target.reagents.total_volume)
|
||||
to_chat(user, "<span class='notice'>[target] is empty.</span>")
|
||||
to_chat(user, span_notice("[target] is empty."))
|
||||
return
|
||||
|
||||
var/trans = target.reagents.trans_to_obj(src, amount_per_transfer_from_this)
|
||||
|
||||
to_chat(user, "<span class='notice'>You fill the dropper with [trans] units of the solution.</span>")
|
||||
to_chat(user, span_notice("You fill the dropper with [trans] units of the solution."))
|
||||
|
||||
return
|
||||
|
||||
|
||||
Reference in New Issue
Block a user