to_chat replacing stream operator

This commit is contained in:
Arokha Sieyes
2020-02-15 12:40:07 -05:00
committed by Leshana
parent 5aaba55222
commit 5b15917d32
712 changed files with 4250 additions and 4220 deletions
+9 -9
View File
@@ -147,7 +147,7 @@
if(!locked)
return
user << "<span class='notice'>The crate is locked with a Deca-code lock.</span>"
to_chat(user, "<span class='notice'>The crate is locked with a Deca-code lock.</span>")
var/input = input(usr, "Enter [codelen] digits. All digits must be unique.", "Deca-Code Lock", "") as text
if(!Adjacent(user))
return
@@ -161,23 +161,23 @@
sanitycheck = null //if a digit is repeated, reject the input
if(input == null || sanitycheck == null || length(input) != codelen)
user << "<span class='notice'>You leave the crate alone.</span>"
to_chat(user, "<span class='notice'>You leave the crate alone.</span>")
else if(check_input(input))
user << "<span class='notice'>The crate unlocks!</span>"
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
playsound(user, 'sound/machines/lockreset.ogg', 50, 1)
set_locked(0)
else
visible_message("<span class='warning'>A red light on \the [src]'s control panel flashes briefly.</span>")
attempts--
if (attempts == 0)
user << "<span class='danger'>The crate's anti-tamper system activates!</span>"
to_chat(user, "<span class='danger'>The crate's anti-tamper system activates!</span>")
var/turf/T = get_turf(src.loc)
explosion(T, 0, 0, 1, 2)
qdel(src)
/obj/structure/closet/crate/secure/loot/emag_act(var/remaining_charges, var/mob/user)
if (locked)
user << "<span class='notice'>The crate unlocks!</span>"
to_chat(user, "<span class='notice'>The crate unlocks!</span>")
locked = 0
/obj/structure/closet/crate/secure/loot/proc/check_input(var/input)
@@ -195,11 +195,11 @@
/obj/structure/closet/crate/secure/loot/attackby(obj/item/weapon/W as obj, mob/user as mob)
if(locked)
if (istype(W, /obj/item/device/multitool)) // Greetings Urist McProfessor, how about a nice game of cows and bulls?
user << "<span class='notice'>DECA-CODE LOCK ANALYSIS:</span>"
to_chat(user, "<span class='notice'>DECA-CODE LOCK ANALYSIS:</span>")
if (attempts == 1)
user << "<span class='warning'>* Anti-Tamper system will activate on the next failed access attempt.</span>"
to_chat(user, "<span class='warning'>* Anti-Tamper system will activate on the next failed access attempt.</span>")
else
user << "<span class='notice'>* Anti-Tamper system will activate after [src.attempts] failed access attempts.</span>"
to_chat(user, "<span class='notice'>* Anti-Tamper system will activate after [src.attempts] failed access attempts.</span>")
if(lastattempt.len)
var/bulls = 0
var/cows = 0
@@ -214,6 +214,6 @@
var/previousattempt = null //convert back to string for readback
for(var/i in 1 to codelen)
previousattempt = addtext(previousattempt, lastattempt[i])
user << "<span class='notice'>Last code attempt, [previousattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>"
to_chat(user, "<span class='notice'>Last code attempt, [previousattempt], had [bulls] correct digits at correct positions and [cows] correct digits at incorrect positions.</span>")
return
..()
+4 -4
View File
@@ -48,14 +48,14 @@
if(istype(W,/obj/item/stack/cable_coil))
var/obj/item/stack/cable_coil/CC = W
if(string_attached)
user << "<span class='notice'>There already is a string attached to this coin.</span>"
to_chat(user, "<span class='notice'>There already is a string attached to this coin.</span>")
return
if (CC.use(1))
overlays += image('icons/obj/items.dmi',"coin_string_overlay")
string_attached = 1
user << "<span class='notice'>You attach a string to the coin.</span>"
to_chat(user, "<span class='notice'>You attach a string to the coin.</span>")
else
user << "<span class='notice'>This cable coil appears to be empty.</span>"
to_chat(user, "<span class='notice'>This cable coil appears to be empty.</span>")
return
else if(W.is_wirecutter())
if(!string_attached)
@@ -67,7 +67,7 @@
CC.update_icon()
overlays = list()
string_attached = null
user << "<font color='blue'>You detach the string from the coin.</font>"
to_chat(user, "<font color='blue'>You detach the string from the coin.</font>")
else ..()
/obj/item/weapon/coin/attack_self(mob/user as mob)
+1 -1
View File
@@ -9,7 +9,7 @@
var/scan_time = 5 SECONDS
/obj/item/weapon/mining_scanner/attack_self(mob/user as mob)
user << "You begin sweeping \the [src] about, scanning for metal deposits."
to_chat(user, "You begin sweeping \the [src] about, scanning for metal deposits.")
playsound(loc, 'sound/items/goggles_charge.ogg', 50, 1, -6)
if(!do_after(user, scan_time))
+1 -1
View File
@@ -20,7 +20,7 @@
machine.console = src
else
//Silently failing and causing mappers to scratch their heads while runtiming isn't ideal.
world << "<span class='danger'>Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!</span>"
to_world("<span class='danger'>Warning: Stacking machine console at [src.x], [src.y], [src.z] could not find its machine!</span>")
qdel(src)
/obj/machinery/mineral/stacking_unit_console/attack_hand(mob/user)
+2 -2
View File
@@ -201,11 +201,11 @@
var/turf/T = get_turf(src)
if(!T || !istype(T,/turf/simulated/mineral))
user << "The flag won't stand up in this terrain."
to_chat(user, "The flag won't stand up in this terrain.")
return
if(F && F.upright)
user << "There is already a flag here."
to_chat(user, "There is already a flag here.")
return
var/obj/item/stack/flag/newflag = new src.type(T)
+1 -1
View File
@@ -22,5 +22,5 @@
if(O)
scanner_image = image(icon, loc = get_turf(src), icon_state = (O.scan_icon ? O.scan_icon : icon_state))
else
world << "No ore data for [src]!"
to_world("No ore data for [src]!")
return scanner_image
+1 -1
View File
@@ -120,7 +120,7 @@
usr.set_machine(src)
src.add_fingerprint(usr)
if(processing==1)
usr << "<font color='blue'>The machine is processing.</font>"
to_chat(usr, "<font color='blue'>The machine is processing.</font>")
return
if(href_list["choose"])
chosen = href_list["choose"]
+2 -2
View File
@@ -49,14 +49,14 @@
..()
if (istype(W, /obj/item/weapon/coin))
var/obj/item/weapon/coin/C = W
user << "<font color='blue'>You add the [C.name] into the bag.</font>"
to_chat(user, "<font color='blue'>You add the [C.name] into the bag.</font>")
usr.drop_item()
contents += C
if (istype(W, /obj/item/weapon/moneybag))
var/obj/item/weapon/moneybag/C = W
for (var/obj/O in C.contents)
contents += O;
user << "<font color='blue'>You empty the [C.name] into the bag.</font>"
to_chat(user, "<font color='blue'>You empty the [C.name] into the bag.</font>")
return
/obj/item/weapon/moneybag/Topic(href, href_list)
+2 -2
View File
@@ -42,7 +42,7 @@
..()
var/mob/living/carbon/human/H = hit_atom
if(istype(H) && H.has_eyes() && prob(85))
H << "<span class='danger'>Some of \the [src] gets in your eyes!</span>"
to_chat(H, "<span class='danger'>Some of \the [src] gets in your eyes!</span>")
H.Blind(5)
H.eye_blurry += 10
spawn(1)
@@ -94,7 +94,7 @@
..()
var/mob/living/carbon/human/H = hit_atom
if(istype(H) && H.has_eyes() && prob(85))
H << "<span class='danger'>Some of \the [src] gets in your eyes!</span>"
to_chat(H, "<span class='danger'>Some of \the [src] gets in your eyes!</span>")
H.Blind(10)
H.eye_blurry += 15
spawn(1)
+1 -1
View File
@@ -21,7 +21,7 @@
S.hide_from(usr)
for(var/obj/item/weapon/ore/O in S.contents)
S.remove_from_storage(O, src) //This will move the item to this item's contents
to_chat(user,"<span class='notice'>You empty the satchel into the box.</span>")
to_chat(user, "<span class='notice'>You empty the satchel into the box.</span>")
update_ore_count()