Replace most (if not all) output << operators with to_chat(user, message)

Currently, to_chat is literally just a proc that does user << message.
But it'll let us do output modification in the future, especially for
something like Goon's HTML chat.

Big thanks to PJB for his to_chat script, see
https://github.com/d3athrow/vgstation13/pull/6625 for more details.
This commit is contained in:
Tigercat2000
2016-04-05 08:15:05 -07:00
parent 8556d5ed91
commit 9d430844c3
1054 changed files with 17612 additions and 8898 deletions

View File

@@ -134,7 +134,8 @@
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='alert'>Access denied.</span>"
to_chat(user, "<span class='alert'>Access denied.</span>")
return
usr.set_machine(src)
interact(user)
@@ -158,7 +159,8 @@
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (on)
user << "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>"
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
return 1
return ..()

View File

@@ -157,7 +157,8 @@ Thus, the two variables affect pump operation are set in New():
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='alert'>Access denied.</span>"
to_chat(user, "<span class='alert'>Access denied.</span>")
return
usr.set_machine(src)
interact(user)
@@ -188,6 +189,7 @@ Thus, the two variables affect pump operation are set in New():
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>"
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
return 1
return ..()

View File

@@ -74,7 +74,8 @@
if(!powered())
return
if(!src.allowed(user))
user << "<span class='alert'>Access denied.</span>"
to_chat(user, "<span class='alert'>Access denied.</span>")
return
..()

View File

@@ -147,7 +147,8 @@ Thus, the two variables affect pump operation are set in New():
return
src.add_fingerprint(usr)
if(!src.allowed(user))
user << "<span class='alert'>Access denied.</span>"
to_chat(user, "<span class='alert'>Access denied.</span>")
return
usr.set_machine(src)
interact(user)
@@ -178,6 +179,7 @@ Thus, the two variables affect pump operation are set in New():
if (!istype(W, /obj/item/weapon/wrench))
return ..()
if (!(stat & NOPOWER) && on)
user << "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>"
to_chat(user, "<span class='alert'>You cannot unwrench this [src], turn it off first.</span>")
return 1
return ..()