to_chat replacing stream operator

This commit is contained in:
Arokha Sieyes
2020-02-17 13:14:08 -05:00
committed by Leshana
parent 5aaba55222
commit 5b15917d32
712 changed files with 4250 additions and 4220 deletions
@@ -67,29 +67,29 @@
return
if(!reagent_volumes[reagent_ids[mode]])
user << "<span class='warning'>The injector is empty.</span>"
to_chat(user, "<span class='warning'>The injector is empty.</span>")
return
var/mob/living/carbon/human/H = M
if(istype(H))
var/obj/item/organ/external/affected = H.get_organ(user.zone_sel.selecting)
if(!affected)
user << "<span class='danger'>\The [H] is missing that limb!</span>"
to_chat(user, "<span class='danger'>\The [H] is missing that limb!</span>")
return
else if(affected.robotic >= ORGAN_ROBOT)
user << "<span class='danger'>You cannot inject a robotic limb.</span>"
to_chat(user, "<span class='danger'>You cannot inject a robotic limb.</span>")
return
if(M.can_inject(user, 1, ignore_thickness = bypass_protection))
user << "<span class='notice'>You inject [M] with the injector.</span>"
M << "<span class='notice'>You feel a tiny prick!</span>"
to_chat(user, "<span class='notice'>You inject [M] with the injector.</span>")
to_chat(M, "<span class='notice'>You feel a tiny prick!</span>")
if(M.reagents)
var/t = min(amount_per_transfer_from_this, reagent_volumes[reagent_ids[mode]])
M.reagents.add_reagent(reagent_ids[mode], t)
reagent_volumes[reagent_ids[mode]] -= t
add_attack_logs(user, M, "Borg injected with [reagent_ids[mode]]")
user << "<span class='notice'>[t] units injected. [reagent_volumes[reagent_ids[mode]]] units remaining.</span>"
to_chat(user, "<span class='notice'>[t] units injected. [reagent_volumes[reagent_ids[mode]]] units remaining.</span>")
return
/obj/item/weapon/reagent_containers/borghypo/attack_self(mob/user as mob) //Change the mode
@@ -102,7 +102,7 @@
else
t += "<a href='?src=\ref[src];reagent=[reagent_ids[i]]'>[reagent_names[i]]</a>"
t = "Available reagents: [t]."
user << t
to_chat(user,t)
return
@@ -113,7 +113,7 @@
playsound(loc, 'sound/effects/pop.ogg', 50, 0)
mode = t
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
usr << "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>"
to_chat(usr, "<span class='notice'>Synthesizer is now producing '[R.name]'.</span>")
/obj/item/weapon/reagent_containers/borghypo/examine(mob/user)
if(!..(user, 2))
@@ -121,7 +121,7 @@
var/datum/reagent/R = SSchemistry.chemical_reagents[reagent_ids[mode]]
user << "<span class='notice'>It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.</span>"
to_chat(user, "<span class='notice'>It is currently producing [R.name] and has [reagent_volumes[reagent_ids[mode]]] out of [volume] units left.</span>")
/obj/item/weapon/reagent_containers/borghypo/service
name = "cyborg drink synthesizer"
@@ -145,15 +145,15 @@
return
if(!reagent_volumes[reagent_ids[mode]])
user << "<span class='notice'>[src] is out of this reagent, give it some time to refill.</span>"
to_chat(user, "<span class='notice'>[src] is out of this reagent, give it some time to refill.</span>")
return
if(!target.reagents.get_free_space())
user << "<span class='notice'>[target] is full.</span>"
to_chat(user, "<span class='notice'>[target] is full.</span>")
return
var/t = min(amount_per_transfer_from_this, reagent_volumes[reagent_ids[mode]])
target.reagents.add_reagent(reagent_ids[mode], t)
reagent_volumes[reagent_ids[mode]] -= t
user << "<span class='notice'>You transfer [t] units of the solution to [target].</span>"
to_chat(user, "<span class='notice'>You transfer [t] units of the solution to [target].</span>")
return
@@ -258,7 +258,7 @@
/obj/item/weapon/reagent_containers/glass/bucket/attackby(var/obj/item/D, mob/user as mob)
if(isprox(D))
user << "You add [D] to [src]."
to_chat(user, "You add [D] to [src].")
qdel(D)
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
@@ -314,7 +314,7 @@ obj/item/weapon/reagent_containers/glass/bucket/wood
/obj/item/weapon/reagent_containers/glass/bucket/wood/attackby(var/obj/D, mob/user as mob)
if(isprox(D))
user << "This wooden bucket doesn't play well with electronics."
to_chat(user, "This wooden bucket doesn't play well with electronics.")
return
else if(istype(D, /obj/item/weapon/material/knife/machete/hatchet))
to_chat(user, "<span class='notice'>You cut a big hole in \the [src] with \the [D]. It's kinda useless as a bucket now.</span>")
@@ -96,7 +96,7 @@
loaded_vial.update_icon()
user.put_in_hands(loaded_vial)
loaded_vial = null
user << "<span class='notice'>You remove the vial from the [src].</span>"
to_chat(user, "<span class='notice'>You remove the vial from the [src].</span>")
update_icon()
playsound(src.loc, 'sound/weapons/flipblade.ogg', 50, 1)
return
@@ -122,7 +122,7 @@
update_icon()
playsound(src.loc, 'sound/weapons/empty.ogg', 50, 1)
else
user << "<span class='notice'>\The [src] already has a vial.</span>"
to_chat(user, "<span class='notice'>\The [src] already has a vial.</span>")
else
..()
@@ -35,7 +35,7 @@
return
if(reagents.total_volume < amount_per_transfer_from_this)
user << "<span class='notice'>\The [src] is empty!</span>"
to_chat(user, "<span class='notice'>\The [src] is empty!</span>")
return
Spray_at(A, user, proximity)
@@ -75,11 +75,11 @@
return
amount_per_transfer_from_this = next_in_list(amount_per_transfer_from_this, possible_transfer_amounts)
spray_size = next_in_list(spray_size, spray_sizes)
user << "<span class='notice'>You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>"
to_chat(user, "<span class='notice'>You adjusted the pressure nozzle. You'll now use [amount_per_transfer_from_this] units per spray.</span>")
/obj/item/weapon/reagent_containers/spray/examine(mob/user)
if(..(user, 0) && loc == user)
user << "[round(reagents.total_volume)] units left."
to_chat(user, "[round(reagents.total_volume)] units left.")
return
/obj/item/weapon/reagent_containers/spray/verb/empty()
@@ -91,7 +91,7 @@
if (alert(usr, "Are you sure you want to empty that?", "Empty Bottle:", "Yes", "No") != "Yes")
return
if(isturf(usr.loc))
usr << "<span class='notice'>You empty \the [src] onto the floor.</span>"
to_chat(usr, "<span class='notice'>You empty \the [src] onto the floor.</span>")
reagents.splash(usr.loc, reagents.total_volume)
//space cleaner
@@ -132,15 +132,15 @@
/obj/item/weapon/reagent_containers/spray/pepper/examine(mob/user)
if(..(user, 1))
user << "The safety is [safety ? "on" : "off"]."
to_chat(user, "The safety is [safety ? "on" : "off"].")
/obj/item/weapon/reagent_containers/spray/pepper/attack_self(var/mob/user)
safety = !safety
usr << "<span class = 'notice'>You switch the safety [safety ? "on" : "off"].</span>"
to_chat(usr, "<span class = 'notice'>You switch the safety [safety ? "on" : "off"].</span>")
/obj/item/weapon/reagent_containers/spray/pepper/Spray_at(atom/A as mob|obj)
if(safety)
usr << "<span class = 'warning'>The safety is on!</span>"
to_chat(usr, "<span class = 'warning'>The safety is on!</span>")
return
. = ..()