mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-10 09:31:52 +00:00
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:
@@ -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 ..()
|
||||
|
||||
@@ -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 ..()
|
||||
@@ -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
|
||||
..()
|
||||
|
||||
|
||||
@@ -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 ..()
|
||||
Reference in New Issue
Block a user