mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-05 23:21:53 +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:
@@ -61,7 +61,8 @@
|
||||
else if(istype(used_atom, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/C = used_atom
|
||||
if(C.amount<4)
|
||||
user << ("There's not enough cable to finish the task.")
|
||||
to_chat(user, ("There's not enough cable to finish the task."))
|
||||
|
||||
return 0
|
||||
else
|
||||
C.use(4)
|
||||
@@ -69,7 +70,8 @@
|
||||
else if(istype(used_atom, /obj/item/stack))
|
||||
var/obj/item/stack/S = used_atom
|
||||
if(S.amount < 5)
|
||||
user << ("There's not enough material in this stack.")
|
||||
to_chat(user, ("There's not enough material in this stack."))
|
||||
|
||||
return 0
|
||||
else
|
||||
S.use(5)
|
||||
@@ -111,24 +113,28 @@
|
||||
if(istype(used_atom,/obj/item/stack))
|
||||
var/obj/item/stack/stack=used_atom
|
||||
if(stack.amount < amount)
|
||||
user << "\red You don't have enough [stack]! You need at least [amount]."
|
||||
to_chat(user, "\red You don't have enough [stack]! You need at least [amount].")
|
||||
|
||||
return 0
|
||||
stack.use(amount)
|
||||
// CABLES
|
||||
if(istype(used_atom,/obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil=used_atom
|
||||
if(coil.amount < amount)
|
||||
user << "\red You don't have enough cable! You need at least [amount] coils."
|
||||
to_chat(user, "\red You don't have enough cable! You need at least [amount] coils.")
|
||||
|
||||
return 0
|
||||
coil.use(amount)
|
||||
// WELDER
|
||||
if(istype(used_atom,/obj/item/weapon/weldingtool))
|
||||
var/obj/item/weapon/weldingtool/welder=used_atom
|
||||
if(!welder.isOn())
|
||||
user << "\blue You tap the [src] with your unlit welder. [pick("Ding","Dong")]."
|
||||
to_chat(user, "\blue You tap the [src] with your unlit welder. [pick("Ding","Dong")].")
|
||||
|
||||
return 0
|
||||
if(!welder.remove_fuel(amount,user))
|
||||
user << "\red You don't have enough fuel!"
|
||||
to_chat(user, "\red You don't have enough fuel!")
|
||||
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
// Arguments: event_type as text, any number of additional arguments to pass to event handler
|
||||
// Returns: null
|
||||
proc/fireEvent()
|
||||
//world << "Events in [args[1]] called"
|
||||
// to_chat(world, "Events in [args[1]] called")
|
||||
|
||||
var/list/event = listgetindex(events,args[1])
|
||||
if(istype(event))
|
||||
spawn(-1)
|
||||
@@ -60,7 +61,8 @@
|
||||
return ..()
|
||||
|
||||
proc/Fire()
|
||||
//world << "Event fired"
|
||||
// to_chat(world, "Event fired")
|
||||
|
||||
if(listener)
|
||||
call(listener,proc_name)(arglist(args))
|
||||
return 1
|
||||
|
||||
@@ -139,7 +139,8 @@ Data storage vars:
|
||||
arg_list = arguments
|
||||
return 1
|
||||
else
|
||||
// world << "\red Invalid arguments supplied for [src.type], ref = \ref[src]"
|
||||
// to_chat(world, "\red Invalid arguments supplied for [src.type], ref = \ref[src]")
|
||||
|
||||
return 0
|
||||
|
||||
proc/toggle_null_checks()
|
||||
|
||||
@@ -166,5 +166,6 @@
|
||||
precision = max(rand(1,100)*bagholding.len,100)
|
||||
if(istype(teleatom, /mob/living))
|
||||
var/mob/living/MM = teleatom
|
||||
MM << "<span class='warning'>The bluespace interface on your bag of holding interferes with the teleport!</span>"
|
||||
to_chat(MM, "<span class='warning'>The bluespace interface on your bag of holding interferes with the teleport!</span>")
|
||||
|
||||
return 1
|
||||
Reference in New Issue
Block a user