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
+15 -15
View File
@@ -79,13 +79,13 @@ Class Procs:
if(!direct())
state |= CONNECTION_DIRECT
edge.direct++
//world << "Marked direct."
//to_world("Marked direct.")
/connection/proc/mark_indirect()
if(direct())
state &= ~CONNECTION_DIRECT
edge.direct--
//world << "Marked indirect."
//to_world("Marked indirect.")
/connection/proc/mark_space()
state |= CONNECTION_SPACE
@@ -99,18 +99,18 @@ Class Procs:
/connection/proc/erase()
edge.remove_connection(src)
state |= CONNECTION_INVALID
//world << "Connection Erased: [state]"
//to_world("Connection Erased: [state]")
/connection/proc/update()
//world << "Updated, \..."
//to_world("Updated, \...")
if(!istype(A,/turf/simulated))
//world << "Invalid A."
//to_world("Invalid A.")
erase()
return
var/block_status = air_master.air_blocked(A,B)
if(block_status & AIR_BLOCKED)
//world << "Blocked connection."
//to_world("Blocked connection.")
erase()
return
else if(block_status & ZONE_BLOCKED)
@@ -122,14 +122,14 @@ Class Procs:
if(state & CONNECTION_SPACE)
if(!b_is_space)
//world << "Invalid B."
//to_world("Invalid B.")
erase()
return
if(A.zone != zoneA)
//world << "Zone changed, \..."
//to_world("Zone changed, \...")
if(!A.zone)
erase()
//world << "erased."
//to_world("erased.")
return
else
edge.remove_connection(src)
@@ -137,22 +137,22 @@ Class Procs:
edge.add_connection(src)
zoneA = A.zone
//world << "valid."
//to_world("valid.")
return
else if(b_is_space)
//world << "Invalid B."
//to_world("Invalid B.")
erase()
return
if(A.zone == B.zone)
//world << "A == B"
//to_world("A == B")
erase()
return
if(A.zone != zoneA || (zoneB && (B.zone != zoneB)))
//world << "Zones changed, \..."
//to_world("Zones changed, \...")
if(A.zone && B.zone)
edge.remove_connection(src)
edge = air_master.get_edge(A.zone, B.zone)
@@ -160,9 +160,9 @@ Class Procs:
zoneA = A.zone
zoneB = B.zone
else
//world << "erased."
//to_world("erased.")
erase()
return
//world << "valid."
//to_world("valid.")
+5 -5
View File
@@ -72,10 +72,10 @@ Class Procs:
/connection_edge/proc/add_connection(connection/c)
coefficient++
if(c.direct()) direct++
//world << "Connection added: [type] Coefficient: [coefficient]"
//to_world("Connection added: [type] Coefficient: [coefficient]")
/connection_edge/proc/remove_connection(connection/c)
//world << "Connection removed: [type] Coefficient: [coefficient-1]"
//to_world("Connection removed: [type] Coefficient: [coefficient-1]")
coefficient--
if(coefficient <= 0)
erase()
@@ -85,7 +85,7 @@ Class Procs:
/connection_edge/proc/erase()
air_master.remove_edge(src)
//world << "[type] Erased."
//to_world("[type] Erased.")
/connection_edge/proc/tick()
@@ -128,7 +128,7 @@ Class Procs:
A.edges.Add(src)
B.edges.Add(src)
//id = edge_id(A,B)
//world << "New edge between [A] and [B]"
//to_world("New edge between [A] and [B]")
/connection_edge/zone/add_connection(connection/c)
. = ..()
@@ -198,7 +198,7 @@ Class Procs:
A.edges.Add(src)
air = B.return_air()
//id = 52*A.id
//world << "New edge from [A] to [B]."
//to_world("New edge from [A] to [B].")
/connection_edge/unsimulated/add_connection(connection/c)
. = ..()
+14 -14
View File
@@ -22,11 +22,11 @@ client/proc/Zone_Info(turf/T as null|turf)
if(istype(T,/turf/simulated) && T:zone)
T:zone:dbg_data(src)
else
mob << "No zone here."
to_chat(mob, "No zone here.")
var/datum/gas_mixture/mix = T.return_air()
mob << "[mix.return_pressure()] kPa [mix.temperature]C"
to_chat(mob, "[mix.return_pressure()] kPa [mix.temperature]C")
for(var/g in mix.gas)
mob << "[g]: [mix.gas[g]]\n"
to_chat(mob, "[g]: [mix.gas[g]]\n")
else
if(zone_debug_images)
for(var/zone in zone_debug_images)
@@ -56,9 +56,9 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
if(direction == "N/A")
if(!(T.c_airblock(T) & AIR_BLOCKED))
mob << "The turf can pass air! :D"
to_chat(mob, "The turf can pass air! :D")
else
mob << "No air passage :x"
to_chat(mob, "No air passage :x")
return
var/turf/simulated/other_turf = get_step(T, direction_list[direction])
@@ -70,29 +70,29 @@ client/proc/Test_ZAS_Connection(var/turf/simulated/T as turf)
if(o_block & AIR_BLOCKED)
if(t_block & AIR_BLOCKED)
mob << "Neither turf can connect. :("
to_chat(mob, "Neither turf can connect. :(")
else
mob << "The initial turf only can connect. :\\"
to_chat(mob, "The initial turf only can connect. :\\")
else
if(t_block & AIR_BLOCKED)
mob << "The other turf can connect, but not the initial turf. :/"
to_chat(mob, "The other turf can connect, but not the initial turf. :/")
else
mob << "Both turfs can connect! :)"
to_chat(mob, "Both turfs can connect! :)")
mob << "Additionally, \..."
to_chat(mob, "Additionally, \...")
if(o_block & ZONE_BLOCKED)
if(t_block & ZONE_BLOCKED)
mob << "neither turf can merge."
to_chat(mob, "neither turf can merge.")
else
mob << "the other turf cannot merge."
to_chat(mob, "the other turf cannot merge.")
else
if(t_block & ZONE_BLOCKED)
mob << "the initial turf cannot merge."
to_chat(mob, "the initial turf cannot merge.")
else
mob << "both turfs can merge."
to_chat(mob, "both turfs can merge.")
client/proc/ZASSettings()
set category = "Debug"
+8 -8
View File
@@ -99,7 +99,7 @@
var/s_block = c_airblock(src)
if(s_block & AIR_BLOCKED)
#ifdef ZASDBG
if(verbose) world << "Self-blocked."
if(verbose) to_world("Self-blocked.")
//dbg(blocked)
#endif
if(zone)
@@ -131,7 +131,7 @@
if(block & AIR_BLOCKED)
#ifdef ZASDBG
if(verbose) world << "[d] is blocked."
if(verbose) to_world("[d] is blocked.")
//unsim.dbg(air_blocked, turn(180,d))
#endif
@@ -141,7 +141,7 @@
if(r_block & AIR_BLOCKED)
#ifdef ZASDBG
if(verbose) world << "[d] is blocked."
if(verbose) to_world("[d] is blocked.")
//dbg(air_blocked, d)
#endif
@@ -172,7 +172,7 @@
// we are blocking them and not blocking ourselves - this prevents tiny zones from forming on doorways.
if(((block & ZONE_BLOCKED) && !(r_block & ZONE_BLOCKED)) || ((r_block & ZONE_BLOCKED) && !(s_block & ZONE_BLOCKED)))
#ifdef ZASDBG
if(verbose) world << "[d] is zone blocked."
if(verbose) to_world("[d] is zone blocked.")
//dbg(zone_blocked, d)
#endif
@@ -186,22 +186,22 @@
#ifdef ZASDBG
dbg(assigned)
if(verbose) world << "Added to [zone]"
if(verbose) to_world("Added to [zone]")
#endif
else if(sim.zone != zone)
#ifdef ZASDBG
if(verbose) world << "Connecting to [sim.zone]"
if(verbose) to_world("Connecting to [sim.zone]")
#endif
air_master.connect(src, sim)
#ifdef ZASDBG
else if(verbose) world << "[d] has same zone."
else if(verbose) to_world("[d] has same zone.")
else if(verbose) world << "[d] has invalid zone."
else if(verbose) to_world("[d] has invalid zone.")
#endif
else
+2 -2
View File
@@ -169,7 +169,7 @@ var/global/vs_control/vsc = new
vars[ch] = vw
if(how == "Toggle")
newvar = (newvar?"ON":"OFF")
world << "<span class='notice'><b>[key_name(user)] changed the setting [display_description] to [newvar].</b></span>"
to_world("<span class='notice'><b>[key_name(user)] changed the setting [display_description] to [newvar].</b></span>")
if(ch in plc.settings)
ChangeSettingsDialog(user,plc.settings)
else
@@ -322,7 +322,7 @@ var/global/vs_control/vsc = new
plc.N2O_HALLUCINATION = initial(plc.N2O_HALLUCINATION)
world << "<span class='notice'><b>[key_name(user)] changed the global phoron/ZAS settings to \"[def]\"</b></span>"
to_world("<span class='notice'><b>[key_name(user)] changed the global phoron/ZAS settings to \"[def]\"</b></span>")
/pl_control/var/list/settings = list()
+13 -12
View File
@@ -168,15 +168,16 @@ Class Procs:
E.recheck()
/zone/proc/dbg_data(mob/M)
M << name
to_chat(M,name)
for(var/g in air.gas)
M << "[gas_data.name[g]]: [air.gas[g]]"
M << "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]°K ([air.temperature - T0C]°C)"
M << "O2 per N2: [(air.gas["nitrogen"] ? air.gas["oxygen"]/air.gas["nitrogen"] : "N/A")] Moles: [air.total_moles]"
M << "Simulated: [contents.len] ([air.group_multiplier])"
//M << "Unsimulated: [unsimulated_contents.len]"
//M << "Edges: [edges.len]"
if(invalid) M << "Invalid!"
to_chat(M, "[gas_data.name[g]]: [air.gas[g]]")
to_chat(M, "P: [air.return_pressure()] kPa V: [air.volume]L T: [air.temperature]°K ([air.temperature - T0C]°C)")
to_chat(M, "O2 per N2: [(air.gas["nitrogen"] ? air.gas["oxygen"]/air.gas["nitrogen"] : "N/A")] Moles: [air.total_moles]")
to_chat(M, "Simulated: [contents.len] ([air.group_multiplier])")
//to_chat(M, "Unsimulated: [unsimulated_contents.len]")
//to_chat(M, "Edges: [edges.len]")
if(invalid)
to_chat(M, "Invalid!")
var/zone_edges = 0
var/space_edges = 0
var/space_coefficient = 0
@@ -185,10 +186,10 @@ Class Procs:
else
space_edges++
space_coefficient += E.coefficient
M << "[E:air:return_pressure()]kPa"
to_chat(M, "[E:air:return_pressure()]kPa")
M << "Zone Edges: [zone_edges]"
M << "Space Edges: [space_edges] ([space_coefficient] connections)"
to_chat(M, "Zone Edges: [zone_edges]")
to_chat(M, "Space Edges: [space_edges] ([space_coefficient] connections)")
//for(var/turf/T in unsimulated_contents)
// M << "[T] at ([T.x],[T.y])"
// to_chat(M, "[T] at ([T.x],[T.y])")