mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 03:57:48 +01:00
refactors most spans
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/attack_self(mob/user as mob)
|
||||
if(on_fire)
|
||||
user.visible_message("<span class='warning'>\The [user] stamps out [src].</span>", "<span class='warning'>You stamp out [src].</span>")
|
||||
user.visible_message(span_warning("\The [user] stamps out [src]."), span_warning("You stamp out [src]."))
|
||||
user.unEquip(src)
|
||||
extinguish()
|
||||
else
|
||||
@@ -53,9 +53,9 @@
|
||||
if(F.lit)
|
||||
src.ignite()
|
||||
if(on_fire)
|
||||
visible_message("<span class='warning'>\The [user] lights [src] with [W].</span>")
|
||||
visible_message(span_warning("\The [user] lights [src] with [W]."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You manage to singe [src], but fail to light it.</span>")
|
||||
to_chat(user, span_warning("You manage to singe [src], but fail to light it."))
|
||||
|
||||
. = ..()
|
||||
update_name()
|
||||
@@ -84,19 +84,19 @@
|
||||
|
||||
if(reagents.total_volume)
|
||||
var/target_text = trans_dest? "\the [trans_dest]" : "\the [user.loc]"
|
||||
user.visible_message("<span class='danger'>\The [user] begins to wring out [src] over [target_text].</span>", "<span class='notice'>You begin to wring out [src] over [target_text].</span>")
|
||||
user.visible_message(span_danger("\The [user] begins to wring out [src] over [target_text]."), span_notice("You begin to wring out [src] over [target_text]."))
|
||||
|
||||
if(do_after(user, reagents.total_volume*5)) //50 for a fully soaked rag
|
||||
if(trans_dest)
|
||||
reagents.trans_to(trans_dest, reagents.total_volume)
|
||||
else
|
||||
reagents.splash(user.loc, reagents.total_volume)
|
||||
user.visible_message("<span class='danger'>\The [user] wrings out [src] over [target_text].</span>", "<span class='notice'>You finish to wringing out [src].</span>")
|
||||
user.visible_message(span_danger("\The [user] wrings out [src] over [target_text]."), span_notice("You finish to wringing out [src]."))
|
||||
update_name()
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/proc/wipe_down(atom/A, mob/user)
|
||||
if(!reagents.total_volume)
|
||||
to_chat(user, "<span class='warning'>The [initial(name)] is dry!</span>")
|
||||
to_chat(user, span_warning("The [initial(name)] is dry!"))
|
||||
else
|
||||
user.visible_message("[user] starts to wipe [A] with [src].")
|
||||
update_name()
|
||||
@@ -108,29 +108,29 @@
|
||||
if(isliving(target)) //Leaving this as isliving.
|
||||
var/mob/living/M = target
|
||||
if(on_fire) //Check if rag is on fire, if so igniting them and stopping.
|
||||
user.visible_message("<span class='danger'>\The [user] hits [target] with [src]!</span>",)
|
||||
user.visible_message(span_danger("\The [user] hits [target] with [src]!"),)
|
||||
user.do_attack_animation(src)
|
||||
M.IgniteMob()
|
||||
else if(user.zone_sel.selecting == O_MOUTH) //Check player target location, provided the rag is not on fire. Then check if mouth is exposed.
|
||||
if(ishuman(target)) //Added this since player species process reagents in majority of cases.
|
||||
var/mob/living/carbon/human/H = target
|
||||
if(H.head && (H.head.body_parts_covered & FACE)) //Check human head coverage.
|
||||
to_chat(user, "<span class='warning'>Remove their [H.head] first.</span>")
|
||||
to_chat(user, span_warning("Remove their [H.head] first."))
|
||||
return
|
||||
else if(reagents.total_volume) //Final check. If the rag is not on fire and their face is uncovered, smother target.
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message(
|
||||
"<span class='danger'>\The [user] smothers [target] with [src]!</span>",
|
||||
"<span class='warning'>You smother [target] with [src]!</span>",
|
||||
span_danger("\The [user] smothers [target] with [src]!"),
|
||||
span_warning("You smother [target] with [src]!"),
|
||||
"You hear some struggling and muffled cries of surprise"
|
||||
)
|
||||
//it's inhaled, so... maybe CHEM_BLOOD doesn't make a whole lot of sense but it's the best we can do for now
|
||||
reagents.trans_to_mob(target, amount_per_transfer_from_this, CHEM_BLOOD)
|
||||
update_name()
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't smother this creature.</span>")
|
||||
to_chat(user, span_warning("You can't smother this creature."))
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You can't smother this creature.</span>")
|
||||
to_chat(user, span_warning("You can't smother this creature."))
|
||||
else
|
||||
wipe_down(target, user)
|
||||
else
|
||||
@@ -143,11 +143,11 @@
|
||||
|
||||
if(istype(A, /obj/structure/reagent_dispensers) || istype(A, /obj/item/reagent_containers/glass/bucket) || istype(A, /obj/structure/mopbucket)) //VOREStation Edit - "Allows rags to be used on buckets and mopbuckets"
|
||||
if(!reagents.get_free_space())
|
||||
to_chat(user, "<span class='warning'>\The [src] is already soaked.</span>")
|
||||
to_chat(user, span_warning("\The [src] is already soaked."))
|
||||
return
|
||||
|
||||
if(A.reagents && A.reagents.trans_to_obj(src, reagents.maximum_volume))
|
||||
user.visible_message("<b>\The [user]</b> soaks [src] using [A].", "<span class='notice'>You soak [src] using [A].</span>")
|
||||
user.visible_message("<b>\The [user]</b> soaks [src] using [A].", span_notice("You soak [src] using [A]."))
|
||||
update_name()
|
||||
return
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
//also copied from matches
|
||||
if(reagents.get_reagent_amount("phoron")) // the phoron explodes when exposed to fire
|
||||
visible_message("<span class='danger'>\The [src] conflagrates violently!</span>")
|
||||
visible_message(span_danger("\The [src] conflagrates violently!"))
|
||||
var/datum/effect/effect/system/reagents_explosion/e = new()
|
||||
e.set_up(round(reagents.get_reagent_amount("phoron") / 2.5, 1), get_turf(src), 0, 0)
|
||||
e.start()
|
||||
@@ -206,7 +206,7 @@
|
||||
//rags sitting around with 1 second of burn time left is dumb.
|
||||
//ensures players always have a few seconds of burn time left when they light their rag
|
||||
if(burn_time <= 5)
|
||||
visible_message("<span class='warning'>\The [src] falls apart!</span>")
|
||||
visible_message(span_warning("\The [src] falls apart!"))
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(src))
|
||||
qdel(src)
|
||||
update_name()
|
||||
@@ -214,7 +214,7 @@
|
||||
|
||||
/obj/item/reagent_containers/glass/rag/process()
|
||||
if(!can_ignite())
|
||||
visible_message("<span class='warning'>\The [src] burns out.</span>")
|
||||
visible_message(span_warning("\The [src] burns out."))
|
||||
extinguish()
|
||||
|
||||
//copied from matches
|
||||
|
||||
Reference in New Issue
Block a user