From f29506a45ac1b4e198129f85215ed0f86686cdd3 Mon Sep 17 00:00:00 2001
From: Erki
Random Events This Round:"
+ to_world("
Random Events This Round:")
for(var/datum/event/E in active_events|finished_events)
var/datum/event_meta/EM = E.event_meta
if(EM.name == "Nothing")
@@ -120,7 +120,7 @@ var/datum/controller/subsystem/events/SSevents
else
message += "and ran to completion."
- world << message
+ to_world(message)
/datum/controller/subsystem/events/proc/GetInteractWindow()
var/html = "Refresh"
diff --git a/code/controllers/subsystems/initialization/atlas.dm b/code/controllers/subsystems/initialization/atlas.dm
index cad6afc0a35..ad0771d22de 100644
--- a/code/controllers/subsystems/initialization/atlas.dm
+++ b/code/controllers/subsystems/initialization/atlas.dm
@@ -29,7 +29,7 @@ var/datum/controller/subsystem/atlas/SSatlas
/datum/controller/subsystem/atlas/Initialize(timeofday)
// Quick sanity check.
if (world.maxx != WORLD_MIN_SIZE || world.maxy != WORLD_MIN_SIZE || world.maxz != 1)
- world << "WARNING: Suspected pre-compiled map: things may break horribly!"
+ to_world("WARNING: Suspected pre-compiled map: things may break horribly!")
log_ss("atlas", "-- WARNING: Suspected pre-compiled map! --")
maploader = new
@@ -138,7 +138,7 @@ var/datum/controller/subsystem/atlas/SSatlas
admin_departments = list(
"[current_map.boss_name]",
- "[current_map.system_name] Government",
+ "[current_map.system_name] Government",
"Supply"
)
@@ -157,7 +157,7 @@ var/datum/controller/subsystem/atlas/SSatlas
/datum/controller/subsystem/atlas/proc/OnMapload(datum/callback/callback)
if (!istype(callback))
CRASH("Invalid callback.")
-
+
mapload_callbacks += callback
/datum/controller/subsystem/atlas/proc/setup_spawnpoints()
diff --git a/code/controllers/subsystems/job.dm b/code/controllers/subsystems/job.dm
index a1bb05f0b10..58d9a34405c 100644
--- a/code/controllers/subsystems/job.dm
+++ b/code/controllers/subsystems/job.dm
@@ -36,7 +36,7 @@
occupations = list()
var/list/all_jobs = current_map.allowed_jobs
if(!all_jobs.len)
- world << "Error setting up jobs, no job datums found!"
+ to_world("Error setting up jobs, no job datums found!")
return FALSE
for(var/J in all_jobs)
@@ -333,7 +333,7 @@
job.apply_fingerprints(H)
// Randomize nutrition and hydration. Defines are in __defines/mobs.dm
-
+
if(H.max_nutrition > 0)
H.nutrition = rand(CREW_MINIMUM_NUTRITION*100, CREW_MAXIMUM_NUTRITION*100) * H.max_nutrition * 0.01
diff --git a/code/controllers/subsystems/pai.dm b/code/controllers/subsystems/pai.dm
index cc3d363dd70..bc1f8f92948 100644
--- a/code/controllers/subsystems/pai.dm
+++ b/code/controllers/subsystems/pai.dm
@@ -26,7 +26,7 @@
var/datum/pai_software/P = new type()
if(pai_software_by_key[P.id])
var/datum/pai_software/O = pai_software_by_key[P.id]
- world << "pAI software module [P.name] has the same key as [O.name]!"
+ to_world("pAI software module [P.name] has the same key as [O.name]!")
continue
pai_software_by_key[P.id] = P
if(P.default)
@@ -382,7 +382,7 @@
/datum/controller/subsystem/pai/proc/question(client/C)
set waitfor = FALSE
- if(!C)
+ if(!C)
return
asked.Add(C.key)
asked[C.key] = world.time
diff --git a/code/controllers/subsystems/statistics.dm b/code/controllers/subsystems/statistics.dm
index f1ac077d968..8bdfda93d36 100644
--- a/code/controllers/subsystems/statistics.dm
+++ b/code/controllers/subsystems/statistics.dm
@@ -255,7 +255,6 @@
lakey = sanitizeSQL(H.lastattacker:key)
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/coord = "[H.x], [H.y], [H.z]"
- //world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
log_game("SQL ERROR during death reporting. Failed to connect.")
@@ -289,7 +288,6 @@
lakey = sanitizeSQL(H.lastattacker:key)
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/coord = "[H.x], [H.y], [H.z]"
- //world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
establish_db_connection(dbcon)
if(!dbcon.IsConnected())
log_game("SQL ERROR during death reporting. Failed to connect.")
diff --git a/code/controllers/subsystems/ticker.dm b/code/controllers/subsystems/ticker.dm
index 0a71af06b77..84034fc1aa1 100644
--- a/code/controllers/subsystems/ticker.dm
+++ b/code/controllers/subsystems/ticker.dm
@@ -184,11 +184,11 @@ var/datum/controller/subsystem/ticker/SSticker
else
feedback_set_details("end_proper","universe destroyed")
if(!delay_end)
- world << "Rebooting due to destruction of station in [restart_timeout/10] seconds"
+ to_world("Rebooting due to destruction of station in [restart_timeout/10] seconds")
else
feedback_set_details("end_proper","proper completion")
if(!delay_end)
- world << "Restarting in [restart_timeout/10] seconds"
+ to_world("Restarting in [restart_timeout/10] seconds")
var/wait_for_tickets
var/delay_notified = 0
@@ -225,7 +225,7 @@ var/datum/controller/subsystem/ticker/SSticker
//call a transfer shuttle vote
spawn(50)
if(!round_end_announced) // Spam Prevention. Now it should announce only once.
- world << "The round has ended!"
+ to_world("The round has ended!")
round_end_announced = 1
SSvote.autotransfer()
@@ -234,7 +234,7 @@ var/datum/controller/subsystem/ticker/SSticker
/datum/controller/subsystem/ticker/proc/declare_completion()
set waitfor = FALSE
- world << "A round of [mode.name] has ended!
"
+ to_world("A round of [mode.name] has ended!
")
for(var/mob/Player in player_list)
if(Player.mind && !isnewplayer(Player))
if(Player.stat != DEAD)
@@ -257,20 +257,20 @@ var/datum/controller/subsystem/ticker/SSticker
Player << "You did not survive the events on [station_name()]..."
else
Player << "You did not survive the events on [station_name()]..."
- world << "
"
+ to_world("
")
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
if (aiPlayer.stat != 2)
- world << "[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the round were:"
+ to_world("[aiPlayer.name] (Played by: [aiPlayer.key])'s laws at the end of the round were:")
else
- world << "[aiPlayer.name] (Played by: [aiPlayer.key])'s laws when it was deactivated were:"
+ to_world("[aiPlayer.name] (Played by: [aiPlayer.key])'s laws when it was deactivated were:")
aiPlayer.show_laws(1)
if (aiPlayer.connected_robots.len)
var/robolist = "The AI's loyal minions were: "
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
robolist += "[robo.name][robo.stat?" (Deactivated) (Played by: [robo.key]), ":" (Played by: [robo.key]), "]"
- world << "[robolist]"
+ to_world("[robolist]")
var/dronecount = 0
@@ -282,15 +282,15 @@ var/datum/controller/subsystem/ticker/SSticker
if (!robo.connected_ai)
if (robo.stat != 2)
- world << "[robo.name] (Played by: [robo.key]) survived as an AI-less borg! Its laws were:"
+ to_world("[robo.name] (Played by: [robo.key]) survived as an AI-less borg! Its laws were:")
else
- world << "[robo.name] (Played by: [robo.key]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:"
+ to_world("[robo.name] (Played by: [robo.key]) was unable to survive the rigors of being a cyborg without an AI. Its laws were:")
if(robo) //How the hell do we lose robo between here and the world messages directly above this?
robo.laws.show_laws(world)
if(dronecount)
- world << "There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round."
+ to_world("There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.")
mode.declare_completion()//To declare normal completion.
@@ -328,8 +328,8 @@ var/datum/controller/subsystem/ticker/SSticker
m = pick(randomtips)
if(m)
- world << "Tip of the round: \
- [html_encode(m)]"
+ to_world("Tip of the round: \
+ [html_encode(m)]")
/datum/controller/subsystem/ticker/proc/print_testmerges()
var/data = revdata.testmerge_overview()
@@ -357,8 +357,8 @@ var/datum/controller/subsystem/ticker/SSticker
pregame_timeleft = dynamic_time
log_debug("SSticker: dynamic set pregame time [dynamic_time]s was greater than configured autogamemode time, not clamping.")
- world << "Welcome to the pre-game lobby!"
- world << "Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds."
+ to_world("Welcome to the pre-game lobby!")
+ to_world("Please, setup your character and select ready. Game will start in [pregame_timeleft] seconds.")
/datum/controller/subsystem/ticker/proc/setup()
//Create and announce mode
@@ -371,7 +371,7 @@ var/datum/controller/subsystem/ticker/SSticker
if(master_mode in list(ROUNDTYPE_STR_RANDOM, ROUNDTYPE_STR_SECRET, ROUNDTYPE_STR_MIXED_SECRET))
if(!runnable_modes.len)
current_state = GAME_STATE_PREGAME
- world << "Unable to choose playable game mode. Reverting to pre-game lobby."
+ to_world("Unable to choose playable game mode. Reverting to pre-game lobby.")
return SETUP_REVOTE
if(secret_force_mode != ROUNDTYPE_STR_SECRET && secret_force_mode != ROUNDTYPE_STR_MIXED_SECRET)
src.mode = config.pick_mode(secret_force_mode)
@@ -396,7 +396,7 @@ var/datum/controller/subsystem/ticker/SSticker
if(!src.mode)
current_state = GAME_STATE_PREGAME
- world << "Serious error in mode setup! Reverting to pre-game lobby."
+ to_world("Serious error in mode setup! Reverting to pre-game lobby.")
return SETUP_REVOTE
SSjobs.ResetOccupations()
@@ -424,29 +424,29 @@ var/datum/controller/subsystem/ticker/SSticker
fail_reasons += "Too many players, less than [mode.max_players] antagonist(s) needed"
if(can_start != GAME_FAILURE_NONE)
- world << "Unable to start [mode.name]. [english_list(fail_reasons,"No reason specified",". ",". ")]"
+ to_world("Unable to start [mode.name]. [english_list(fail_reasons,"No reason specified",". ",". ")]")
current_state = GAME_STATE_PREGAME
mode.fail_setup()
mode = null
SSjobs.ResetOccupations()
if(master_mode in list(ROUNDTYPE_STR_RANDOM, ROUNDTYPE_STR_SECRET, ROUNDTYPE_STR_MIXED_SECRET))
- world << "Reselecting gamemode..."
+ to_world("Reselecting gamemode...")
return SETUP_REATTEMPT
else
- world << "Reverting to pre-game lobby."
+ to_world("Reverting to pre-game lobby.")
return SETUP_REVOTE
var/starttime = REALTIMEOFDAY
if(hide_mode)
- world << "The current game mode is - [hide_mode == ROUNDTYPE_SECRET ? "Secret" : "Mixed Secret"]!"
+ to_world("The current game mode is - [hide_mode == ROUNDTYPE_SECRET ? "Secret" : "Mixed Secret"]!")
if(runnable_modes.len)
var/list/tmpmodes = new
for (var/datum/game_mode/M in runnable_modes)
tmpmodes+=M.name
tmpmodes = sortList(tmpmodes)
if(tmpmodes.len)
- world << "Possibilities: [english_list(tmpmodes)]"
+ to_world("Possibilities: [english_list(tmpmodes)]")
else
src.mode.announce()
@@ -469,8 +469,8 @@ var/datum/controller/subsystem/ticker/SSticker
//Deleting Startpoints but we need the ai point to AI-ize people later
if (S.name != "AI")
qdel(S)
- world << "Enjoy the game!"
- world << sound('sound/AI/welcome.ogg') // Skie
+ to_world("Enjoy the game!")
+ to_world(sound('sound/AI/welcome.ogg'))
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
@@ -541,18 +541,18 @@ var/datum/controller/subsystem/ticker/SSticker
if("mercenary") //Nuke wasn't on station when it blew up
flick("intro_nuke",cinematic)
sleep(35)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
flick("station_intact_fade_red",cinematic)
cinematic.icon_state = "summary_nukefail"
else
flick("intro_nuke",cinematic)
sleep(35)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
//flick("end",cinematic)
if(2) //nuke was nowhere nearby //TODO: a really distant explosion animation
sleep(50)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
else //station was destroyed
if( mode && !override )
@@ -562,25 +562,25 @@ var/datum/controller/subsystem/ticker/SSticker
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red",cinematic)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
cinematic.icon_state = "summary_nukewin"
if("AI malfunction") //Malf (screen,explosion,summary)
flick("intro_malf",cinematic)
sleep(76)
flick("station_explode_fade_red",cinematic)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
cinematic.icon_state = "summary_malf"
if("blob") //Station nuked (nuke,explosion,summary)
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red",cinematic)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
cinematic.icon_state = "summary_selfdes"
else //Station nuked (nuke,explosion,summary)
flick("intro_nuke",cinematic)
sleep(35)
flick("station_explode_fade_red", cinematic)
- world << sound('sound/effects/explosionfar.ogg')
+ to_world(sound('sound/effects/explosionfar.ogg'))
cinematic.icon_state = "summary_selfdes"
//If its actually the end of the round, wait for it to end.
diff --git a/code/controllers/subsystems/vote.dm b/code/controllers/subsystems/vote.dm
index 47c337d01a4..df8a1fc8278 100644
--- a/code/controllers/subsystems/vote.dm
+++ b/code/controllers/subsystems/vote.dm
@@ -34,7 +34,7 @@ var/datum/controller/subsystem/vote/SSvote
if (mode)
// No more change mode votes after the game has started.
if(mode == "gamemode" && ROUND_IS_STARTED)
- world << "Voting aborted due to game start."
+ to_world("Voting aborted due to game start.")
src.reset()
return
@@ -123,13 +123,13 @@ var/datum/controller/subsystem/vote/SSvote
else
factor = 1.4
choices["Initiate Crew Transfer"] = round(choices["Initiate Crew Transfer"] * factor)
- world << "Crew Transfer Factor: [factor]"
+ to_world("Crew Transfer Factor: [factor]")
greatest_votes = max(choices["Initiate Crew Transfer"], choices["Continue The Round"])
if(mode == "crew_transfer")
if(round(get_round_duration() / 36000)+12 <= 14)
// Credit to Scopes @ oldcode.
- world << "Majority voting rule in effect. 2/3rds majority needed to initiate transfer."
+ to_world("Majority voting rule in effect. 2/3rds majority needed to initiate transfer.")
choices["Initiate Crew Transfer"] = round(choices["Initiate Crew Transfer"] - round(total_votes / 3))
greatest_votes = max(choices["Initiate Crew Transfer"], choices["Continue The Round"])
@@ -167,7 +167,7 @@ var/datum/controller/subsystem/vote/SSvote
if(mode == "add_antagonist")
antag_add_failed = 1
log_vote(text)
- world << "[text]"
+ to_world("[text]")
/datum/controller/subsystem/vote/proc/result()
. = announce_result()
@@ -197,10 +197,10 @@ var/datum/controller/subsystem/vote/SSvote
if(mode == "gamemode") //fire this even if the vote fails.
if(!round_progressing)
round_progressing = 1
- world << "The round will start soon."
+ to_world("The round will start soon.")
if(restart)
- world << "World restarting due to vote..."
+ to_world("World restarting due to vote...")
feedback_set_details("end_error","restart vote")
sleep(50)
log_game("Rebooting due to restart vote")
@@ -309,7 +309,7 @@ var/datum/controller/subsystem/vote/SSvote
text += "\n[question]"
log_vote(text)
- world << "[text]\nType vote or click here to place your votes.\nYou have [config.vote_period/10] seconds to vote."
+ to_world("[text]\nType vote or click here to place your votes.\nYou have [config.vote_period/10] seconds to vote.")
for(var/cc in clients)
var/client/C = cc
if(C.prefs.asfx_togs & ASFX_VOTE) //Personal mute
@@ -322,7 +322,7 @@ var/datum/controller/subsystem/vote/SSvote
C << sound('sound/ambience/alarm4.ogg', repeat = 0, wait = 0, volume = 50, channel = 3)
if(mode == "gamemode" && round_progressing)
round_progressing = 0
- world << "Round start has been delayed."
+ to_world("Round start has been delayed.")
time_remaining = round(config.vote_period/10)
return 1
diff --git a/code/datums/api.dm b/code/datums/api.dm
index 7713ce58dba..964a2f148c5 100644
--- a/code/datums/api.dm
+++ b/code/datums/api.dm
@@ -782,7 +782,7 @@ proc/api_update_command_database()
/datum/topic_command/restart_round/run_command(queryparams)
var/senderkey = sanitize(queryparams["senderkey"]) //Identifier of the sender (Ckey / Userid / ...)
- world << "Server restarting by remote command."
+ to_world("Server restarting by remote command.")
log_and_message_admins("World restart initiated remotely by [senderkey].")
feedback_set_details("end_error","remote restart")
@@ -892,8 +892,8 @@ proc/api_update_command_database()
if(reportannounce == 1)
command_announcement.Announce(reportbody, reporttitle, new_sound = 'sound/AI/commandreport.ogg', do_newscast = 1, msg_sanitized = 1);
if(reportannounce == 0)
- world << "New NanoTrasen Update available at all communication consoles."
- world << sound('sound/AI/commandreport.ogg')
+ to_world("New NanoTrasen Update available at all communication consoles.")
+ to_world(sound('sound/AI/commandreport.ogg'))
log_admin("[senderkey] has created a command report via the api: [reportbody]",admin_key=senderkey)
@@ -1223,4 +1223,4 @@ proc/api_update_command_database()
statuscode = 200
response = "Text sent"
- return 1
\ No newline at end of file
+ return 1
diff --git a/code/datums/browser.dm b/code/datums/browser.dm
index 649fc95e407..e84554f8740 100644
--- a/code/datums/browser.dm
+++ b/code/datums/browser.dm
@@ -170,8 +170,6 @@
winset(user, windowid, "on-close=\".windowclose [param]\"")
- //world << "OnClose [user]: [windowid] : ["on-close=\".windowclose [param]\""]"
-
// the on-close client verb
// called when a browser popup window is closed after registering with proc/onclose()
@@ -182,11 +180,9 @@
set hidden = 1 // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line
- //world << "windowclose: [atomref]"
if(atomref!="null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
if(hsrc)
- //world << "[src] Topic [href] [hsrc]"
usr = src.mob
src.Topic("close=1", list("close"="1"), hsrc) // this will direct to the atom's
return // Topic() proc via client.Topic()
@@ -194,6 +190,5 @@
// no atomref specified (or not found)
// so just reset the user mob's machine var
if(src && src.mob)
- //world << "[src] was [src.mob.machine], setting to null"
src.mob.unset_machine()
return
diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm
index 4dc74987dd7..2d385456680 100644
--- a/code/datums/datacore.dm
+++ b/code/datums/datacore.dm
@@ -46,7 +46,6 @@
isactive[name] = active ? "Active" : "Inactive"
else
isactive[name] = t.fields["p_stat"]
- //world << "[name]: [rank]"
//cael - to prevent multiple appearances of a player/job combination, add a continue after each line
var/department = 0
if(real_rank in command_positions)
diff --git a/code/datums/disease.dm b/code/datums/disease.dm
index 6bfe20b4639..c44d139ba70 100644
--- a/code/datums/disease.dm
+++ b/code/datums/disease.dm
@@ -109,8 +109,6 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
return 0
/datum/disease/proc/spread(var/atom/source=null, var/airborne_range = 2, var/force_spread)
- //world << "Disease [src] proc spread was called from holder [source]"
-
// If we're overriding how we spread, say so here
var/how_spread = spread_type
if(force_spread)
@@ -169,8 +167,6 @@ var/list/diseases = typesof(/datum/disease) - /datum/disease
spread_type = CONTACT_GENERAL
affected_mob = null
if(!affected_mob) //the virus is in inanimate obj
-// world << "[src] longevity = [longevity]"
-
if(prob(70))
if(--longevity<=0)
cure(0)
diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm
index 670ade607b7..d0dc8220dcc 100644
--- a/code/datums/diseases/advance/advance.dm
+++ b/code/datums/diseases/advance/advance.dm
@@ -168,7 +168,6 @@ var/list/advance_cures = list(
return generated
/datum/disease/advance/proc/Refresh(var/new_name = 0)
- //world << "[src.name] \ref[src] - REFRESH!"
GenerateProperties()
AssignProperties(properties)
@@ -229,7 +228,6 @@ var/list/advance_cures = list(
spread = "Blood"
spread_type = spread_id
- //world << "Setting spread type to [spread_id]/[spread]"
/datum/disease/advance/proc/SetSeverity(var/level_sev)
@@ -255,7 +253,6 @@ var/list/advance_cures = list(
/datum/disease/advance/proc/GenerateCure(var/list/properties = list())
if(properties && properties.len)
var/res = Clamp(properties["resistance"] - (symptoms.len / 2), 1, advance_cures.len)
- //world << "Res = [res]"
cure_id = advance_cures[res]
// Get the cure name from the cure_id
@@ -326,9 +323,6 @@ var/list/advance_cures = list(
// Mix a list of advance diseases and return the mixed result.
/proc/Advance_Mix(var/list/D_list)
-
- //world << "Mixing!!!!"
-
var/list/diseases = list()
for(var/datum/disease/advance/A in D_list)
@@ -351,8 +345,7 @@ var/list/advance_cures = list(
var/datum/disease/advance/D2 = pick(diseases)
D2.Mix(D1)
- // Should be only 1 entry left, but if not let's only return a single entry
- //world << "END MIXING!!!!!"
+ // Should be only 1 entry left, but if not let's only return a single entry
var/datum/disease/advance/to_return = pick(diseases)
to_return.Refresh(1)
return to_return
diff --git a/code/datums/helper_datums/events.dm b/code/datums/helper_datums/events.dm
index 55569f32b2d..aabfa347ca4 100644
--- a/code/datums/helper_datums/events.dm
+++ b/code/datums/helper_datums/events.dm
@@ -31,7 +31,6 @@
// 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"
var/list/event = listgetindex(events,args[1])
if(istype(event))
spawn(-1)
@@ -60,7 +59,6 @@
return ..()
proc/Fire()
- //world << "Event fired"
if(listener)
call(listener,proc_name)(arglist(args))
return 1
diff --git a/code/datums/wires/alarm.dm b/code/datums/wires/alarm.dm
index c34b0291fbb..2fb801318ec 100644
--- a/code/datums/wires/alarm.dm
+++ b/code/datums/wires/alarm.dm
@@ -26,24 +26,20 @@ var/const/AALARM_WIRE_AALARM = 16
if(AALARM_WIRE_IDSCAN)
if(!mended)
A.locked = 1
- //world << "Idscan wire cut"
if(AALARM_WIRE_POWER)
A.shock(usr, 50)
A.shorted = !mended
A.update_icon()
- //world << "Power wire cut"
if (AALARM_WIRE_AI_CONTROL)
if (A.aidisabled == !mended)
A.aidisabled = mended
- //world << "AI Control Wire Cut"
if(AALARM_WIRE_SYPHON)
if(!mended)
A.mode = 3 // AALARM_MODE_PANIC
A.apply_mode()
- //world << "Syphon Wire Cut"
if(AALARM_WIRE_AALARM)
if (A.alarm_area.atmosalert(2, A))
@@ -55,10 +51,8 @@ var/const/AALARM_WIRE_AALARM = 16
switch(index)
if(AALARM_WIRE_IDSCAN)
A.locked = !A.locked
- // world << "Idscan wire pulsed"
if (AALARM_WIRE_POWER)
- // world << "Power wire pulsed"
if(A.shorted == 0)
A.shorted = 1
A.update_icon()
@@ -70,7 +64,6 @@ var/const/AALARM_WIRE_AALARM = 16
if (AALARM_WIRE_AI_CONTROL)
- // world << "AI Control wire pulsed"
if (A.aidisabled == 0)
A.aidisabled = 1
A.updateDialog()
@@ -79,7 +72,6 @@ var/const/AALARM_WIRE_AALARM = 16
A.aidisabled = 0
if(AALARM_WIRE_SYPHON)
- // world << "Syphon wire pulsed"
if(A.mode == 1) // AALARM_MODE_SCRUB
A.mode = 3 // AALARM_MODE_PANIC
else
@@ -87,7 +79,6 @@ var/const/AALARM_WIRE_AALARM = 16
A.apply_mode()
if(AALARM_WIRE_AALARM)
- // world << "Aalarm wire pulsed"
if (A.alarm_area.atmosalert(0, A))
A.post_alert(0)
A.update_icon()
diff --git a/code/defines/procs/announce.dm b/code/defines/procs/announce.dm
index f5a52b7ae0c..5f181000c8d 100644
--- a/code/defines/procs/announce.dm
+++ b/code/defines/procs/announce.dm
@@ -59,14 +59,14 @@ datum/announcement/proc/Message(message as text, message_title as text)
M << " -[html_encode(announcer)]"
datum/announcement/minor/Message(message as text, message_title as text)
- world << "[message]"
+ to_world("[message]")
datum/announcement/priority/Message(message as text, message_title as text)
- world << "[message_title]
"
- world << "[message]"
+ to_world("[message_title]
")
+ to_world("[message]")
if(announcer)
- world << " -[html_encode(announcer)]"
- world << "
"
+ to_world(" -[html_encode(announcer)]")
+ to_world("
")
datum/announcement/priority/command/Message(message as text, message_title as text)
var/command
@@ -81,8 +81,8 @@ datum/announcement/priority/command/Message(message as text, message_title as te
M << command
datum/announcement/priority/security/Message(message as text, message_title as text)
- world << "[message_title]"
- world << "[message]"
+ to_world("[message_title]")
+ to_world("[message]")
datum/announcement/proc/NewsCast(message as text, message_title as text)
if(!newscast)
@@ -108,7 +108,7 @@ datum/announcement/proc/Sound(var/message_sound)
datum/announcement/priority/Sound(var/message_sound)
if(message_sound)
- world << message_sound
+ to_world(message_sound)
datum/announcement/priority/command/Sound(var/message_sound)
PlaySound(message_sound)
diff --git a/code/game/antagonist/antagonist_objectives.dm b/code/game/antagonist/antagonist_objectives.dm
index e03fa374dbb..6f9e9058e6b 100644
--- a/code/game/antagonist/antagonist_objectives.dm
+++ b/code/game/antagonist/antagonist_objectives.dm
@@ -24,10 +24,10 @@
if(!O.completed && !O.check_completion())
result = 0
if(result && victory_text)
- world << "[victory_text]"
+ to_world("[victory_text]")
if(victory_feedback_tag) feedback_set_details("round_end_result","[victory_feedback_tag]")
else if(loss_text)
- world << "[loss_text]"
+ to_world("[loss_text]")
if(loss_feedback_tag) feedback_set_details("round_end_result","[loss_feedback_tag]")
/mob/living/proc/write_ambition()
diff --git a/code/game/antagonist/antagonist_print.dm b/code/game/antagonist/antagonist_print.dm
index cc760998007..dfd0ef9b8f1 100644
--- a/code/game/antagonist/antagonist_print.dm
+++ b/code/game/antagonist/antagonist_print.dm
@@ -13,7 +13,7 @@
if(P.ambitions)
text += "
Their goals for today were..."
text += "
[P.ambitions]"
-
+
for(var/datum/objective/O in P.objectives)
text += print_objective(O, num)
if(O.check_completion())
@@ -37,7 +37,7 @@
num++
// Display the results.
- world << text
+ to_world(text)
/datum/antagonist/proc/print_objective(var/datum/objective/O, var/num, var/append_success)
var/text = "
Objective [num]: [O.explanation_text] "
@@ -90,9 +90,9 @@
if(isnull(H.uplink_owner) && H.used_TC)
if(!has_printed)
has_printed = 1
- world << "Ownerless Uplinks"
- world << "[H.loc] (used [H.used_TC] TC)"
- world << get_uplink_purchases(H)
+ to_world("Ownerless Uplinks")
+ to_world("[H.loc] (used [H.used_TC] TC)")
+ to_world(get_uplink_purchases(H))
/proc/get_uplink_purchases(var/obj/item/device/uplink/H)
var/list/refined_log = new()
diff --git a/code/game/antagonist/mutiny/mutineer.dm b/code/game/antagonist/mutiny/mutineer.dm
index c0d764b3be4..3abef6e6a08 100644
--- a/code/game/antagonist/mutiny/mutineer.dm
+++ b/code/game/antagonist/mutiny/mutineer.dm
@@ -23,44 +23,3 @@ var/datum/antagonist/mutineer/mutineers
if(M.special_role)
return 0
return 1
-
-/*
- var/list/directive_candidates = get_directive_candidates()
- if(!directive_candidates || directive_candidates.len == 0)
- world << "Mutiny mode aborted: no valid candidates for Directive X."
- return 0
-
- head_loyalist = pick(loyalist_candidates)
- head_mutineer = pick(mutineer_candidates)
- current_directive = pick(directive_candidates)
-
-
- // Returns an array in case we want to expand on this later.
- proc/get_head_loyalist_candidates()
- var/list/candidates[0]
- for(var/mob/loyalist in player_list)
- if(loyalist.mind && loyalist.mind.assigned_role == "Captain")
- candidates.Add(loyalist.mind)
- return candidates
-
- proc/get_head_mutineer_candidates()
- var/list/candidates[0]
- for(var/mob/mutineer in player_list)
- if(mutineer.client.prefs.be_special & BE_MUTINEER)
- for(var/job in command_positions - "Captain")
- if(mutineer.mind && mutineer.mind.assigned_role == job)
- candidates.Add(mutineer.mind)
- return candidates
-
- proc/get_directive_candidates()
- var/list/candidates[0]
- for(var/T in typesof(/datum/directive) - /datum/directive)
- var/datum/directive/D = new T(src)
- if (D.meets_prerequisites())
- candidates.Add(D)
- return candidates
-
-
- return 1
-
-*/
diff --git a/code/game/antagonist/outsider/raider.dm b/code/game/antagonist/outsider/raider.dm
index 7bd0c057aa3..806a24064e3 100644
--- a/code/game/antagonist/outsider/raider.dm
+++ b/code/game/antagonist/outsider/raider.dm
@@ -196,8 +196,8 @@ var/datum/antagonist/raider/raiders
else
win_msg += "The Raiders were repelled!"
- world << "[win_type] [win_group] victory!"
- world << "[win_msg]"
+ to_world("[win_type] [win_group] victory!")
+ to_world("[win_msg]")
feedback_set_details("round_end_result","heist - [win_type] [win_group]")
/datum/antagonist/raider/proc/is_raider_crew_safe()
diff --git a/code/game/antagonist/outsider/wizard.dm b/code/game/antagonist/outsider/wizard.dm
index 65695e823cd..a949dcd79a3 100644
--- a/code/game/antagonist/outsider/wizard.dm
+++ b/code/game/antagonist/outsider/wizard.dm
@@ -101,7 +101,7 @@ var/datum/antagonist/wizard/wizards
break
if(!survivor)
feedback_set_details("round_end_result","loss - wizard killed")
- world << "The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!"
+ to_world("The [(current_antagonists.len>1)?"[role_text_plural] have":"[role_text] has"] been killed by the crew! The Space Wizards Federation has been taught a lesson they will not soon forget!")
/datum/antagonist/wizard/print_player_summary()
..()
@@ -116,7 +116,7 @@ var/datum/antagonist/wizard/wizards
text += "
[spell.name] - "
text += "Speed: [spell.spell_levels["speed"]] Power: [spell.spell_levels["power"]]"
text += "
"
- world << text
+ to_world(text)
//To batch-remove wizard spells. Linked to mind.dm.
diff --git a/code/game/antagonist/station/rogue_ai.dm b/code/game/antagonist/station/rogue_ai.dm
index ea99bf14afb..5653698c529 100644
--- a/code/game/antagonist/station/rogue_ai.dm
+++ b/code/game/antagonist/station/rogue_ai.dm
@@ -49,7 +49,7 @@ var/datum/antagonist/rogue_ai/malf
var/mob/living/silicon/ai/A = player.current
if(!istype(A))
error("Non-AI mob designated malf AI! Report this.")
- world << "##ERROR: Non-AI mob designated malf AI! Report this."
+ to_world("##ERROR: Non-AI mob designated malf AI! Report this.")
return 0
A.setup_for_malf()
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 9b1d5d9bc39..27be3cb235a 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -376,7 +376,7 @@
cur_y = y_arr.Find(src.z)
if(cur_y)
break
-// world << "X = [cur_x]; Y = [cur_y]"
+
if(cur_x && cur_y)
return list("x"=cur_x,"y"=cur_y)
else
diff --git a/code/game/gamemodes/calamity/calamity.dm b/code/game/gamemodes/calamity/calamity.dm
index b17277aaae9..757f5ee38f0 100644
--- a/code/game/gamemodes/calamity/calamity.dm
+++ b/code/game/gamemodes/calamity/calamity.dm
@@ -22,6 +22,6 @@
..()
/datum/game_mode/calamity/check_victory()
- world << "This terrible, terrible day has finally ended!"
+ to_world("This terrible, terrible day has finally ended!")
#undef ANTAG_TYPE_RATIO
diff --git a/code/game/gamemodes/changeling/modularchangling.dm b/code/game/gamemodes/changeling/modularchangling.dm
index 2d1f14ce4f9..a36f4334f83 100644
--- a/code/game/gamemodes/changeling/modularchangling.dm
+++ b/code/game/gamemodes/changeling/modularchangling.dm
@@ -488,7 +488,6 @@ var/list/datum/power/changeling/powerinstances = list()
for (var/datum/power/changeling/P in powerinstances)
- //world << "[P] - [Pname] = [P.name == Pname ? "True" : "False"]"
if(P.name == Pname)
Thepower = P
break
diff --git a/code/game/gamemodes/cult/narsie.dm b/code/game/gamemodes/cult/narsie.dm
index 91f3a5f86d3..63e31558e1a 100644
--- a/code/game/gamemodes/cult/narsie.dm
+++ b/code/game/gamemodes/cult/narsie.dm
@@ -43,8 +43,8 @@ var/global/list/narsie_list = list()
/obj/singularity/narsie/large/New()
..()
if(announce)
- world << "[uppertext(name)] HAS RISEN"
- world << sound('sound/effects/narsie.ogg')
+ to_world("[uppertext(name)] HAS RISEN")
+ to_world(sound('sound/effects/narsie.ogg'))
narsie_spawn_animation()
diff --git a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
index 65163538a26..a8530c88f97 100644
--- a/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
+++ b/code/game/gamemodes/endgame/supermatter_cascade/universe.dm
@@ -38,9 +38,9 @@ var/global/universe_has_ended = 0
/datum/universal_state/supermatter_cascade/OnEnter()
SSgarbage.disable()
- world << "You are blinded by a brilliant flash of energy."
+ to_world("You are blinded by a brilliant flash of energy.")
- world << sound('sound/effects/cascade.ogg')
+ to_world(sound('sound/effects/cascade.ogg'))
for(var/mob/M in player_list)
flick("e_flash", M.flash)
diff --git a/code/game/gamemodes/epidemic/epidemic.dm b/code/game/gamemodes/epidemic/epidemic.dm
index 37268175a6c..f9aefc7047b 100644
--- a/code/game/gamemodes/epidemic/epidemic.dm
+++ b/code/game/gamemodes/epidemic/epidemic.dm
@@ -48,7 +48,7 @@
//New message handling won't hurt if someone enables epidemic
post_comm_message("Cent. Com. CONFIDENTIAL REPORT", intercepttext)
- world << sound('sound/AI/commandreport.ogg')
+ to_world(sound('sound/AI/commandreport.ogg'))
// add an extra law to the AI to make sure it cooperates with the heads
var/extra_law = "Crew authorized to know of pathogen [virus_name]'s existence are: Heads of command. Do not allow unauthorized personnel to gain knowledge of [virus_name]. Aid authorized personnel in quarantining and neutrlizing the outbreak. This law overrides all other laws."
@@ -63,7 +63,7 @@
post_comm_message("Cent. Com. CONFIDENTIAL REPORT", intercepttext)
- world << sound('sound/AI/commandreport.ogg')
+ to_world(sound('sound/AI/commandreport.ogg'))
/datum/game_mode/epidemic/post_setup()
@@ -78,8 +78,8 @@
crew += H
if(crew.len < 2)
- world << "There aren't enough players for this mode!"
- world << "Rebooting world in 5 seconds."
+ to_world("There aren't enough players for this mode!")
+ to_world("Rebooting world in 5 seconds.")
sleep(50)
world.Reboot()
@@ -167,10 +167,10 @@
for(var/mob/M in mob_list)
if(M.client)
M << 'sound/machines/Alarm.ogg'
- world << "Incoming missile detected.. Impact in 10.."
+ to_world("Incoming missile detected.. Impact in 10..")
for (var/i=9 to 1 step -1)
sleep(10)
- world << "[i].."
+ to_world("[i]..")
sleep(10)
enter_allowed = 0
SSticker.station_explosion_cinematic(0,null)
@@ -187,9 +187,9 @@
/datum/game_mode/epidemic/declare_completion()
if(finished == 1)
feedback_set_details("round_end_result","win - epidemic cured")
- world << "The virus outbreak was contained! The crew wins!"
+ to_world("The virus outbreak was contained! The crew wins!")
else if(finished == 2)
feedback_set_details("round_end_result","loss - rev heads killed")
- world << "The crew succumbed to the epidemic!"
+ to_world("The crew succumbed to the epidemic!")
..()
return 1
diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm
index ac6d9d1c64d..07283fbbe22 100644
--- a/code/game/gamemodes/events.dm
+++ b/code/game/gamemodes/events.dm
@@ -1,107 +1,3 @@
-//this file left in for legacy support
-/*
-/proc/start_events()
- //changed to a while(1) loop since they are more efficient.
- //Moved the spawn in here to allow it to be called with advance proc call if it crashes.
- //and also to stop spawn copying variables from the game ticker
- spawn(3000)
- while(1)
- if(prob(50))//Every 120 seconds and prob 50 2-4 weak spacedusts will hit the station
- spawn(1)
- dust_swarm("weak")
- if(!event)
- //CARN: checks to see if random events are enabled.
- if(config.allow_random_events)
- if(prob(eventchance))
- event()
- hadevent = 1
- else
- Holiday_Random_Event()
- else
- event = 0
- sleep(1200)
-
-/proc/event()
- event = 1
-
- var/eventNumbersToPickFrom = list(1,2,4,5,6,7,8,9,10,11,12,13,14, 15) //so ninjas don't cause "empty" events.
-
- if((world.time/10)>=3600 && config.ninjas_allowed && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
- eventNumbersToPickFrom += 3
- switch(pick(eventNumbersToPickFrom))
- if(1)
- command_alert("Meteors have been detected on collision course with the station.", "Meteor Alert")
- for(var/mob/M in player_list)
- if(!istype(M,/mob/abstract/new_player))
- M << sound('sound/AI/meteors.ogg')
- spawn(100)
- meteor_wave()
- spawn_meteors()
- spawn(700)
- meteor_wave()
- spawn_meteors()
-
- if(2)
- command_alert("Gravitational anomalies detected on the station. There is no additional data.", "Anomaly Alert")
- for(var/mob/M in player_list)
- if(!istype(M,/mob/abstract/new_player))
- M << sound('sound/AI/granomalies.ogg')
- var/turf/T = pick(blobstart)
- var/obj/effect/bhole/bh = new /obj/effect/bhole( T.loc, 30 )
- spawn(rand(50, 300))
- qdel(bh)
- /*
- if(3) //Leaving the code in so someone can try and delag it, but this event can no longer occur randomly, per SoS's request. --NEO
- command_alert("Space-time anomalies detected on the station. There is no additional data.", "Anomaly Alert")
- world << sound('sound/AI/spanomalies.ogg')
- var/list/turfs = new
- var/turf/picked
- for(var/turf/simulated/floor/T in world)
- if(T.z in station_levels)
- turfs += T
- for(var/turf/simulated/floor/T in turfs)
- if(prob(20))
- spawn(50+rand(0,3000))
- picked = pick(turfs)
- var/obj/effect/portal/P = new /obj/effect/portal( T )
- P.target = picked
- P.creator = null
- P.icon = 'icons/obj/objects.dmi'
- P.failchance = 0
- P.icon_state = "anom"
- P.name = "wormhole"
- spawn(rand(300,600))
- qdel(P)
- */
- if(3)
- if((world.time/10)>=3600 && config.ninjas_allowed && !sent_ninja_to_station)//If an hour has passed, relatively speaking. Also, if ninjas are allowed to spawn and if there is not already a ninja for the round.
- space_ninja_arrival()//Handled in space_ninja.dm. Doesn't announce arrival, all sneaky-like.
- if(4)
- mini_blob_event()
-
- if(5)
- high_radiation_event()
- if(6)
- viral_outbreak()
- if(7)
- alien_infestation()
- if(8)
- prison_break()
- if(9)
- carp_migration()
- if(10)
- immovablerod()
- if(11)
- lightsout(1,2)
- if(12)
- appendicitis()
- if(13)
- IonStorm()
- if(14)
- spacevine_infestation()
- if(15)
- communications_blackout()
-*/
var/eventchance = 10 // Percent chance per 5 minutes.
var/hadevent = 0
@@ -120,8 +16,6 @@ var/hadevent = 0
break
/proc/viral_outbreak(var/virus = null)
-// command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
-// world << sound('sound/AI/outbreak7.ogg')
var/virus_type
if(!virus)
virus_type = pick(/datum/disease/dnaspread,/datum/disease/advance/flu,/datum/disease/advance/cold,/datum/disease/brainrot,/datum/disease/magnitis,/datum/disease/pierrot_throat)
@@ -143,8 +37,6 @@ var/hadevent = 0
virus_type = /datum/disease/dnaspread
if("flu")
virus_type = /datum/disease/advance/flu
-// if("t-virus")
-// virus_type = /datum/disease/t_virus
if("pierrot's throat")
virus_type = /datum/disease/pierrot_throat
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
@@ -183,8 +75,6 @@ var/hadevent = 0
command_announcement.Announce("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert", new_sound = 'sound/AI/outbreak7.ogg')
/proc/alien_infestation(var/spawncount = 1) // -- TLE
- //command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert")
- //world << sound('sound/AI/aliens.ogg')
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSmachinery.processing_machines)
if(!temp_vent.welded && temp_vent.network && temp_vent.loc.z in current_map.station_levels)
@@ -419,48 +309,3 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is
for(var/obj/machinery/bot/bot in SSmachinery.processing_machines)
if(prob(botEmagChance))
bot.emag_act(1)
-
- /*
-
- var/apcnum = 0
- var/smesnum = 0
- var/airlocknum = 0
- var/firedoornum = 0
-
- world << "Ion Storm Main Started"
-
- spawn(0)
- world << "Started processing APCs"
- for (var/obj/machinery/power/apc/APC in world)
- if(APC.z in station_levels)
- APC.ion_act()
- apcnum++
- world << "Finished processing APCs. Processed: [apcnum]"
- spawn(0)
- world << "Started processing SMES"
- for (var/obj/machinery/power/smes/SMES in world)
- if(SMES.z in station_levels)
- SMES.ion_act()
- smesnum++
- world << "Finished processing SMES. Processed: [smesnum]"
- spawn(0)
- world << "Started processing AIRLOCKS"
- for (var/obj/machinery/door/airlock/D in world)
- if(D.z in station_levels)
- //if(length(D.req_access) > 0 && !(12 in D.req_access)) //not counting general access and maintenance airlocks
- airlocknum++
- spawn(0)
- D.ion_act()
- world << "Finished processing AIRLOCKS. Processed: [airlocknum]"
- spawn(0)
- world << "Started processing FIREDOORS"
- for (var/obj/machinery/door/firedoor/D in world)
- if(D.z in station_levels)
- firedoornum++;
- spawn(0)
- D.ion_act()
- world << "Finished processing FIREDOORS. Processed: [firedoornum]"
-
- world << "Ion Storm Main Done"
-
- */
diff --git a/code/game/gamemodes/events/VirusEpidemic.dm b/code/game/gamemodes/events/VirusEpidemic.dm
index db0dae2a2a5..895575d51a9 100644
--- a/code/game/gamemodes/events/VirusEpidemic.dm
+++ b/code/game/gamemodes/events/VirusEpidemic.dm
@@ -74,7 +74,7 @@
break
spawn(rand(3000, 6000)) //Delayed announcements to keep the crew on their toes.
command_alert("Confirmed outbreak of level 7 viral biohazard aboard [station_name()]. All personnel must contain the outbreak.", "Biohazard Alert")
- world << sound('sound/AI/outbreak7.ogg')
+ to_world(sound('sound/AI/outbreak7.ogg'))
Tick()
ActiveFor = Lifetime //killme
diff --git a/code/game/gamemodes/events/clang.dm b/code/game/gamemodes/events/clang.dm
index 8a05deb910f..8c668142d8e 100644
--- a/code/game/gamemodes/events/clang.dm
+++ b/code/game/gamemodes/events/clang.dm
@@ -73,7 +73,6 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
//rod time!
var/obj/effect/immovablerod/immrod = new /obj/effect/immovablerod(locate(startx, starty, 1))
-// world << "Rod in play, starting at [start.loc.x],[start.loc.y] and going to [end.loc.x],[end.loc.y]"
var/end = locate(endx, endy, 1)
spawn(0)
walk_towards(immrod, end,1)
diff --git a/code/game/gamemodes/events/holidays/Easter.dm b/code/game/gamemodes/events/holidays/Easter.dm
index 5a662f3e313..ea958c60441 100644
--- a/code/game/gamemodes/events/holidays/Easter.dm
+++ b/code/game/gamemodes/events/holidays/Easter.dm
@@ -3,7 +3,7 @@
//Random egg
/proc/Random_Egg()
- world << "There is a golden egg hidden somewhere on the station...
"
+ to_world("There is a golden egg hidden somewhere on the station...
")
var/list/Floorlist = list()
for(var/turf/simulated/floor/T in turfs)
if(T.contents)
diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm
index c029a73cfdd..0a6c3b8cb30 100644
--- a/code/game/gamemodes/events/holidays/Holidays.dm
+++ b/code/game/gamemodes/events/holidays/Holidays.dm
@@ -40,7 +40,7 @@ var/global/Holiday = null
if(14) Holiday = "Valentine's Day"
if(17) Holiday = "Random Acts of Kindness Day"
if(29) Holiday = "Leap Day"
-
+
if(3) //Mar
switch(DD)
@@ -50,13 +50,13 @@ var/global/Holiday = null
if(4) //Apr
switch(DD)
- if(1)
+ if(1)
Holiday = "April Fool's Day"
if(YY == 18 && prob(50)) Holiday = "Easter"
if(12)
if(YY == 20) Holiday = "Easter"
if(20) Holiday = "Four-Twenty"
- if(21)
+ if(21)
if(YY == 19) Holiday = "Easter"
if(22) Holiday = "Earth Day"
@@ -74,7 +74,7 @@ var/global/Holiday = null
if(YY == 20) Holiday = "Summer Solstice"
if(21)
if(YY == (18 || 19)) Holiday = "Summer Solstice"
-
+
if(7) //Jul
switch(DD)
if(1) Holiday = "Doctor's Day"
@@ -144,8 +144,8 @@ var/global/Holiday = null
//Run at the start of a round
/proc/Holiday_Game_Start()
if(Holiday)
- world << "and..."
- world << "Happy [Holiday] Everybody!
"
+ to_world("and...")
+ to_world("Happy [Holiday] Everybody!
")
switch(Holiday) //special holidays
if("Easter")
Easter_Game_Start()
diff --git a/code/game/gamemodes/events/wormholes.dm b/code/game/gamemodes/events/wormholes.dm
index f9091a183c1..2c4722623e2 100644
--- a/code/game/gamemodes/events/wormholes.dm
+++ b/code/game/gamemodes/events/wormholes.dm
@@ -17,17 +17,14 @@
var/end_time = world.time + event_duration //the time by which the event should have ended
var/increment = max(1,round(number_of_selections/50))
-// world << "DEBUG: number_of_selections: [number_of_selections] | sleep_duration: [sleep_duration]"
var/i = 1
while( 1 )
//we've run into overtime. End the event
if( end_time < world.time )
-// world << "DEBUG: we've run into overtime. End the event"
return
if( !pick_turfs.len )
-// world << "DEBUG: we've run out of turfs to pick. End the event"
return
//loop it round
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 7ecdae82114..0a640fe2d07 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -124,9 +124,11 @@ var/global/list/additional_antag_types = list()
usr.client.holder.show_game_mode(usr)
/datum/game_mode/proc/announce() //to be called when round starts
- world << "The current game mode is [capitalize(name)]!"
- if(round_description) world << "[round_description]"
- if(round_autoantag) world << "Antagonists will be added to the round automagically as needed."
+ to_world("The current game mode is [capitalize(name)]!")
+ if(round_description)
+ to_world("[round_description]")
+ if(round_autoantag)
+ to_world("Antagonists will be added to the round automagically as needed.")
if(antag_templates && antag_templates.len)
var/antag_summary = "Possible antagonist types: "
var/i = 1
@@ -140,7 +142,7 @@ var/global/list/additional_antag_types = list()
i++
antag_summary += "."
if(antag_templates.len > 1 && !SSticker.hide_mode)
- world << "[antag_summary]"
+ to_world("[antag_summary]")
else
message_admins("[antag_summary]")
@@ -386,7 +388,7 @@ var/global/list/additional_antag_types = list()
text += "There were no survivors ([ghosts] ghosts)."
discord_text += "There were **no survivors** ([ghosts] ghosts)."
- world << text
+ to_world(text)
discord_bot.send_to_announce(discord_text)
post_webhook_event(WEBHOOK_ROUNDEND, list("survivours"=surviving_total, "escaped"=escaped_total, "ghosts"=ghosts, "gamemode"=name, "gameid"=game_id, "antags"=antag_text))
@@ -557,7 +559,7 @@ var/global/list/additional_antag_types = list()
//New message handling
post_comm_message("Cent. Com. Status Summary", intercepttext)
- world << sound('sound/AI/commandreport.ogg')
+ to_world(sound('sound/AI/commandreport.ogg'))
/datum/game_mode/proc/get_players_for_role(var/role, var/antag_id)
var/list/players = list()
diff --git a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm
index cbcac0ad44b..3c307c45c6f 100644
--- a/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm
+++ b/code/game/gamemodes/malfunction/newmalf_ability_trees/tree_networking.dm
@@ -172,8 +172,8 @@
// log_ability_use(user, "advanced encryption hack (FAIL - title: [reporttitle])")
// return
log_ability_use(user, "advanced encryption hack (SUCCESS - title: [reporttitle])")
- world << "New [current_map.company_name] Update available at all communication consoles."
- world << sound('sound/AI/commandreport.ogg')
+ to_world("New [current_map.company_name] Update available at all communication consoles.")
+ to_world(sound('sound/AI/commandreport.ogg'))
post_comm_message(reporttitle, reportbody)
/datum/game_mode/malfunction/verb/elite_encryption_hack()
diff --git a/code/game/gamemodes/meme/meme.dm b/code/game/gamemodes/meme/meme.dm
index 00cdbff6c9c..4a73e71b7d8 100644
--- a/code/game/gamemodes/meme/meme.dm
+++ b/code/game/gamemodes/meme/meme.dm
@@ -6,42 +6,20 @@
name = "Memetic Anomaly"
config_tag = "meme"
required_players = 3
- //restricted_jobs = list("AI", "Cyborg")
- //recommended_enemies = 2 // need at least a meme and a host
votable = 0 // temporarily disable this mode for voting
end_on_antag_death = 1
var/var/list/datum/mind/first_hosts = list()
var/var/list/assigned_hosts = list()
-/* no objectives
- var/const/prob_int_murder_target = 50 // intercept names the assassination target half the time
- var/const/prob_right_murder_target_l = 25 // lower bound on probability of naming right assassination target
- var/const/prob_right_murder_target_h = 50 // upper bound on probability of naimg the right assassination target
-
- var/const/prob_int_item = 50 // intercept names the theft target half the time
- var/const/prob_right_item_l = 25 // lower bound on probability of naming right theft target
- var/const/prob_right_item_h = 50 // upper bound on probability of naming the right theft target
-
- var/const/prob_int_sab_target = 50 // intercept names the sabotage target half the time
- var/const/prob_right_sab_target_l = 25 // lower bound on probability of naming right sabotage target
- var/const/prob_right_sab_target_h = 50 // upper bound on probability of naming right sabotage target
-
- var/const/prob_right_killer_l = 25 //lower bound on probability of naming the right operative
- var/const/prob_right_killer_h = 50 //upper bound on probability of naming the right operative
- var/const/prob_right_objective_l = 25 //lower bound on probability of determining the objective correctly
- var/const/prob_right_objective_h = 50 //upper bound on probability of determining the objective correctly
-*/
- //var/const/waittime_l = 600 //lower bound on time before intercept arrives (in tenths of seconds)
- //var/const/waittime_h = 1800 //upper bound on time before intercept arrives (in tenths of seconds)
/datum/game_mode/meme/announce()
- world << "The current game mode is - Meme!"
- world << "An unknown creature has infested the mind of a crew member. Find and destroy it by any means necessary."
+ to_world("The current game mode is - Meme!")
+ to_world("An unknown creature has infested the mind of a crew member. Find and destroy it by any means necessary.")
/datum/game_mode/meme/can_start()
-
+
. = ..()
-
+
if(. != "true")
return .
@@ -104,28 +82,6 @@
..()
return
-/* no objectives
-/datum/game_mode/proc/forge_meme_objectives(var/datum/mind/meme, var/datum/mind/first_host)
- if (config.objectives_disabled)
- return
-
- // meme always needs to attune X hosts
- var/datum/objective/meme_attune/attune_objective = new
- attune_objective.owner = meme
- attune_objective.gen_amount_goal(3,6)
- meme.objectives += attune_objective
-
- // generate some random objectives, use standard traitor objectives
- var/job = first_host.assigned_role
-
- for(var/datum/objective/o in SelectObjectives(job, meme))
- o.owner = meme
- meme.objectives += o
-
- greet_meme(meme)
-
- return
-*/
/datum/game_mode/proc/greet_meme(var/datum/mind/meme, var/you_are=1)
if (you_are)
meme.current << "You are a meme!"
diff --git a/code/game/gamemodes/meteor/meteor.dm b/code/game/gamemodes/meteor/meteor.dm
index 1ea044715ad..d9698cf7151 100644
--- a/code/game/gamemodes/meteor/meteor.dm
+++ b/code/game/gamemodes/meteor/meteor.dm
@@ -32,9 +32,9 @@
survivors++
if(survivors)
- world << "The following survived the meteor storm:[text]"
+ to_world("The following survived the meteor storm:[text]")
else
- world << "Nobody survived the meteor storm!"
+ to_world("Nobody survived the meteor storm!")
feedback_set_details("round_end_result","end - evacuation")
feedback_set("round_end_result",survivors)
@@ -42,4 +42,4 @@
..()
return 1
-#undef METEOR_DELAY
\ No newline at end of file
+#undef METEOR_DELAY
diff --git a/code/game/gamemodes/newobjective.dm b/code/game/gamemodes/newobjective.dm
index 9bc0b260f63..146500d9936 100644
--- a/code/game/gamemodes/newobjective.dm
+++ b/code/game/gamemodes/newobjective.dm
@@ -177,7 +177,7 @@
if(!killobjectives.len)
continue
var/datum/objective/assassinate/objective = pickweight(killobjectives)
- world << objective
+ to_world(objective)
for(1 to 10)
if(objective.points + total_weight <= 100 || !killobjectives.len)
break
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index c31ca7d93ba..3f5cbfd0da5 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -46,48 +46,48 @@ var/list/nuke_disks = list()
if(!disk_rescued && station_was_nuked && !syndies_didnt_escape)
feedback_set_details("round_end_result","win - syndicate nuke")
- world << "Mercenary Major Victory!"
- world << "[syndicate_name()] operatives have destroyed [station_name()]!"
+ to_world("Mercenary Major Victory!")
+ to_world("[syndicate_name()] operatives have destroyed [station_name()]!")
else if (!disk_rescued && station_was_nuked && syndies_didnt_escape)
feedback_set_details("round_end_result","halfwin - syndicate nuke - did not evacuate in time")
- world << "Total Annihilation"
- world << "[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion. Next time, don't lose the disk!"
+ to_world("Total Annihilation")
+ to_world("[syndicate_name()] operatives destroyed [station_name()] but did not leave the area in time and got caught in the explosion. Next time, don't lose the disk!")
else if (!disk_rescued && !station_was_nuked && nuke_off_station && !syndies_didnt_escape)
feedback_set_details("round_end_result","halfwin - blew wrong station")
- world << "Crew Minor Victory"
- world << "[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()]. Next time, don't lose the disk!"
+ to_world("Crew Minor Victory")
+ to_world("[syndicate_name()] operatives secured the authentication disk but blew up something that wasn't [station_name()]. Next time, don't lose the disk!")
else if (!disk_rescued && !station_was_nuked && nuke_off_station && syndies_didnt_escape)
feedback_set_details("round_end_result","halfwin - blew wrong station - did not evacuate in time")
- world << "[syndicate_name()] operatives have earned Darwin Award!"
- world << "[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion. Next time, don't lose the disk!"
+ to_world("[syndicate_name()] operatives have earned Darwin Award!")
+ to_world("[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion. Next time, don't lose the disk!")
else if (disk_rescued && mercs.antags_are_dead())
feedback_set_details("round_end_result","loss - evacuation - disk secured - syndi team dead")
- world << "Crew Major Victory!"
- world << "The Research Staff has saved the disc and killed the [syndicate_name()] Operatives"
+ to_world("Crew Major Victory!")
+ to_world("The Research Staff has saved the disc and killed the [syndicate_name()] Operatives")
else if ( disk_rescued )
feedback_set_details("round_end_result","loss - evacuation - disk secured")
- world << "Crew Major Victory"
- world << "The Research Staff has saved the disc and stopped the [syndicate_name()] Operatives!"
+ to_world("Crew Major Victory")
+ to_world("The Research Staff has saved the disc and stopped the [syndicate_name()] Operatives!")
else if (!disk_rescued && mercs.antags_are_dead())
feedback_set_details("round_end_result","loss - evacuation - disk not secured")
- world << "Mercenary Minor Victory!"
- world << "The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!"
+ to_world("Mercenary Minor Victory!")
+ to_world("The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!")
else if (!disk_rescued && crew_evacuated)
feedback_set_details("round_end_result","halfwin - detonation averted")
- world << "Mercenary Minor Victory!"
- world << "[syndicate_name()] operatives recovered the abandoned authentication disk but detonation of [station_name()] was averted. Next time, don't lose the disk!"
+ to_world("Mercenary Minor Victory!")
+ to_world("[syndicate_name()] operatives recovered the abandoned authentication disk but detonation of [station_name()] was averted. Next time, don't lose the disk!")
else if (!disk_rescued && !crew_evacuated)
feedback_set_details("round_end_result","halfwin - interrupted")
- world << "Neutral Victory"
- world << "Round was mysteriously interrupted!"
+ to_world("Neutral Victory")
+ to_world("Round was mysteriously interrupted!")
..()
return
diff --git a/code/game/gamemodes/sandbox/h_sandbox.dm b/code/game/gamemodes/sandbox/h_sandbox.dm
index 8e5e8a43263..67ac0591d6c 100644
--- a/code/game/gamemodes/sandbox/h_sandbox.dm
+++ b/code/game/gamemodes/sandbox/h_sandbox.dm
@@ -52,11 +52,11 @@ datum/hSB
if("hsbtobj")
if(!admin) return
if(hsboxspawn)
- world << "Sandbox: [usr.key] has disabled object spawning!"
+ to_world("Sandbox: [usr.key] has disabled object spawning!")
hsboxspawn = 0
return
if(!hsboxspawn)
- world << "Sandbox: [usr.key] has enabled object spawning!"
+ to_world("Sandbox: [usr.key] has enabled object spawning!")
hsboxspawn = 1
return
if("hsbsuit")
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index 46cad02fcf8..1dbbc5687c4 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -378,7 +378,6 @@
signal.data["sigtype"] = "command"
radio_connection.post_signal(src, signal, RADIO_FROM_AIRALARM)
-// world << text("Signal [] Broadcasted to []", command, target)
return 1
diff --git a/code/game/machinery/bots/mulebot.dm b/code/game/machinery/bots/mulebot.dm
index 2f26024b084..6bf6ec17aa2 100644
--- a/code/game/machinery/bots/mulebot.dm
+++ b/code/game/machinery/bots/mulebot.dm
@@ -478,7 +478,6 @@
return
if(on)
var/speed = (wires.Motor1() ? 1:0) + (wires.Motor2() ? 2:0)
- //world << "speed: [speed]"
switch(speed)
if(0)
// do nothing
@@ -502,7 +501,6 @@
if(refresh) updateDialog()
/obj/machinery/bot/mulebot/proc/process_bot()
- //if(mode) world << "Mode: [mode]"
switch(mode)
if(0) // idle
icon_state = "mulebot0"
@@ -525,9 +523,6 @@
if(istype( next, /turf/simulated))
- //world << "at ([x],[y]) moving to ([next.x],[next.y])"
-
-
if(bloodiness)
var/obj/effect/decal/cleanable/blood/tracks/B = new(loc)
var/newdir = get_dir(next, loc)
@@ -547,7 +542,6 @@
var/moved = step_towards(src, next) // attempt to move
if(cell) cell.use(1)
if(moved) // successful move
- //world << "Successful move."
blockcount = 0
path -= loc
@@ -562,11 +556,6 @@
mode = 2
else // failed to move
-
- //world << "Unable to move."
-
-
-
blockcount++
mode = 4
if(blockcount == 3)
@@ -590,16 +579,13 @@
else
src.visible_message("[src] makes an annoyed buzzing sound", "You hear an electronic buzzing sound.")
playsound(src.loc, 'sound/machines/buzz-two.ogg', 50, 0)
- //world << "Bad turf."
mode = 5
return
else
- //world << "No path."
mode = 5
return
if(5) // calculate new path
- //world << "Calc new path."
mode = 6
spawn(0)
@@ -616,10 +602,6 @@
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
mode = 7
- //if(6)
- //world << "Pending path calc."
- //if(7)
- //world << "No dest / no route."
return
@@ -821,12 +803,11 @@
var/datum/signal/signal = new()
+
signal.source = src
signal.transmission_method = 1
- //for(var/key in keyval)
- // signal.data[key] = keyval[key]
signal.data = keyval
- //world << "sent [key],[keyval[key]] on [freq]"
+
if (signal.data["findbeacon"])
frequency.post_signal(src, signal, filter = RADIO_NAVBEACONS)
else if (signal.data["type"] == "mulebot")
diff --git a/code/game/machinery/cell_charger.dm b/code/game/machinery/cell_charger.dm
index 2eee1884eca..0415dc6528b 100644
--- a/code/game/machinery/cell_charger.dm
+++ b/code/game/machinery/cell_charger.dm
@@ -18,7 +18,6 @@
if(charging && !(stat & (BROKEN|NOPOWER)) )
var/newlevel = round(charging.percent() * 4.0 / 99)
- //world << "nl: [newlevel]"
if(chargelevel != newlevel)
@@ -98,7 +97,6 @@
/obj/machinery/cell_charger/machinery_process()
- //world << "ccpt [charging] [stat]"
if((stat & (BROKEN|NOPOWER)) || !anchored)
update_use_power(0)
return
diff --git a/code/game/machinery/computer/shuttle.dm b/code/game/machinery/computer/shuttle.dm
index 35b3ff92726..d7dcbf456ec 100644
--- a/code/game/machinery/computer/shuttle.dm
+++ b/code/game/machinery/computer/shuttle.dm
@@ -13,48 +13,53 @@
if(stat & (BROKEN|NOPOWER)) return
if ((!( istype(W, /obj/item/weapon/card) ) || !(ROUND_IS_STARTED) || emergency_shuttle.location() || !( user ))) return
if (istype(W, /obj/item/weapon/card/id)||istype(W, /obj/item/device/pda))
+ var/obj/item/weapon/card/id/id = W
if (istype(W, /obj/item/device/pda))
var/obj/item/device/pda/pda = W
- W = pda.id
- if (!W:access) //no access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
+ id = pda.id
+
+ if (!id)
+ return
+
+ if (!id.access) //no access
+ user << "The access level of [id.registered_name]\'s card is not high enough. "
return
- var/list/cardaccess = W:access
+ var/list/cardaccess = id.access
if(!istype(cardaccess, /list) || !cardaccess.len) //no access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
+ user << "The access level of [id.registered_name]\'s card is not high enough. "
return
- if(!(access_heads in W:access)) //doesn't have this access
- user << "The access level of [W:registered_name]\'s card is not high enough. "
+ if(!(access_heads in id.access)) //doesn't have this access
+ user << "The access level of [id.registered_name]\'s card is not high enough. "
return 0
var/choice = alert(user, text("Would you like to (un)authorize a shortened launch time? [] authorization\s are still needed. Use abort to cancel all authorizations.", src.auth_need - src.authorized.len), "Shuttle Launch", "Authorize", "Repeal", "Abort")
- if(emergency_shuttle.location() && user.get_active_hand() != W)
+ if(emergency_shuttle.location() && user.get_active_hand() != id)
return 0
switch(choice)
if("Authorize")
- src.authorized -= W:registered_name
- src.authorized += W:registered_name
+ src.authorized -= id.registered_name
+ src.authorized += id.registered_name
if (src.auth_need - src.authorized.len > 0)
message_admins("[key_name_admin(user)] has authorized early shuttle launch")
log_game("[key_name(user)] has authorized early shuttle launch",ckey=key_name(user))
- world << text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
+ to_world(text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len))
else
message_admins("[key_name_admin(user)] has launched the shuttle")
log_game("[key_name(user)] has launched the shuttle early",ckey=key_name(user))
- world << "Alert: Shuttle launch time shortened to 10 seconds!"
+ to_world("Alert: Shuttle launch time shortened to 10 seconds!")
emergency_shuttle.set_launch_countdown(10)
//src.authorized = null
qdel(src.authorized)
src.authorized = list( )
if("Repeal")
- src.authorized -= W:registered_name
- world << text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len)
+ src.authorized -= id.registered_name
+ to_world(text("Alert: [] authorizations needed until shuttle is launched early", src.auth_need - src.authorized.len))
if("Abort")
- world << "All authorizations to shortening time for shuttle launch have been revoked!"
+ to_world("All authorizations to shortening time for shuttle launch have been revoked!")
src.authorized.len = 0
src.authorized = list( )
@@ -64,7 +69,7 @@
if(!emagged && !emergency_shuttle.location() && user.get_active_hand() == W)
switch(choice)
if("Launch")
- world << "Alert: Shuttle launch time shortened to 10 seconds!"
+ to_world("Alert: Shuttle launch time shortened to 10 seconds!")
emergency_shuttle.set_launch_countdown(10)
emagged = 1
if("Cancel")
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller.dm b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
index e521c4d07a3..c463a236dc5 100644
--- a/code/game/machinery/embedded_controller/airlock_docking_controller.dm
+++ b/code/game/machinery/embedded_controller/airlock_docking_controller.dm
@@ -140,16 +140,16 @@
/*** DEBUG VERBS ***
/datum/computer/file/embedded_program/docking/proc/print_state()
- world << "id_tag: [id_tag]"
- world << "dock_state: [dock_state]"
- world << "control_mode: [control_mode]"
- world << "tag_target: [tag_target]"
- world << "response_sent: [response_sent]"
+ to_world("id_tag: [id_tag]")
+ to_world("dock_state: [dock_state]")
+ to_world("control_mode: [control_mode]")
+ to_world("tag_target: [tag_target]")
+ to_world("response_sent: [response_sent]")
/datum/computer/file/embedded_program/docking/post_signal(datum/signal/signal, comm_line)
- world << "Program [id_tag] sent a message!"
+ to_world("Program [id_tag] sent a message!")
print_state()
- world << "[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\""
+ to_world("[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\"")
..(signal)
/obj/machinery/embedded_controller/radio/airlock/docking_port/verb/view_state()
diff --git a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
index f800076ae94..71882bb1235 100644
--- a/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
+++ b/code/game/machinery/embedded_controller/airlock_docking_controller_multi.dm
@@ -2,21 +2,21 @@
//this is the master controller, that things will try to dock with.
/obj/machinery/embedded_controller/radio/docking_port_multi
name = "docking port controller"
-
+
var/child_tags_txt
var/child_names_txt
var/list/child_names = list()
-
+
var/datum/computer/file/embedded_program/docking/multi/docking_program
/obj/machinery/embedded_controller/radio/docking_port_multi/Initialize()
. = ..()
docking_program = new/datum/computer/file/embedded_program/docking/multi(src)
program = docking_program
-
+
var/list/names = text2list(child_names_txt, ";")
var/list/tags = text2list(child_tags_txt, ";")
-
+
if (names.len == tags.len)
for (var/i = 1; i <= tags.len; i++)
child_names[tags[i]] = names[i]
@@ -84,10 +84,10 @@
/obj/machinery/embedded_controller/radio/airlock/docking_port_multi/Topic(href, href_list)
if(..())
return
-
+
usr.set_machine(src)
src.add_fingerprint(usr)
-
+
var/clean = 0
switch(href_list["command"]) //anti-HTML-hacking checks
if("cycle_ext")
@@ -113,16 +113,16 @@
/*** DEBUG VERBS ***
/datum/computer/file/embedded_program/docking/multi/proc/print_state()
- world << "id_tag: [id_tag]"
- world << "dock_state: [dock_state]"
- world << "control_mode: [control_mode]"
- world << "tag_target: [tag_target]"
- world << "response_sent: [response_sent]"
+ to_world("id_tag: [id_tag]")
+ to_world("dock_state: [dock_state]")
+ to_world("control_mode: [control_mode]")
+ to_world("tag_target: [tag_target]")
+ to_world("response_sent: [response_sent]")
/datum/computer/file/embedded_program/docking/multi/post_signal(datum/signal/signal, comm_line)
- world << "Program [id_tag] sent a message!"
+ to_world("Program [id_tag] sent a message!")
print_state()
- world << "[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\""
+ to_world("[id_tag] sent command \"[signal.data["command"]]\" to \"[signal.data["recipient"]]\"")
..(signal)
/obj/machinery/embedded_controller/radio/docking_port_multi/verb/view_state()
diff --git a/code/game/machinery/embedded_controller/docking_program.dm b/code/game/machinery/embedded_controller/docking_program.dm
index 1c976a6c37b..0a43c98040d 100644
--- a/code/game/machinery/embedded_controller/docking_program.dm
+++ b/code/game/machinery/embedded_controller/docking_program.dm
@@ -12,51 +12,51 @@
/*
*** STATE TABLE ***
-
+
MODE_CLIENT|STATE_UNDOCKED sent a request for docking and now waiting for a reply.
MODE_CLIENT|STATE_DOCKING server told us they are OK to dock, waiting for our docking port to be ready.
MODE_CLIENT|STATE_DOCKED idle - docked as client.
MODE_CLIENT|STATE_UNDOCKING we are either waiting for our docking port to be ready or for the server to give us the OK to finish undocking.
-
+
MODE_SERVER|STATE_UNDOCKED should never happen.
MODE_SERVER|STATE_DOCKING someone requested docking, we are waiting for our docking port to be ready.
MODE_SERVER|STATE_DOCKED idle - docked as server
MODE_SERVER|STATE_UNDOCKING client requested undocking, we are waiting for our docking port to be ready.
-
+
MODE_NONE|STATE_UNDOCKED idle - not docked.
MODE_NONE|anything else should never happen.
-
+
*** Docking Signals ***
-
+
Docking
Client sends request_dock
Server sends confirm_dock to say that yes, we will serve your request
When client is ready, sends confirm_dock
Server sends confirm_dock back to indicate that docking is complete
-
+
Undocking
Client sends request_undock
When client is ready, sends confirm_undock
Server sends confirm_undock back to indicate that docking is complete
-
+
Note that in both cases each side exchanges confirm_dock before the docking operation is considered done.
- The client first sends a confirm message to indicate it is ready, and then finally the server will send it's
+ The client first sends a confirm message to indicate it is ready, and then finally the server will send it's
confirm message to indicate that the operation is complete.
-
+
Note also that when docking, the server sends an additional confirm message. This is because before docking,
the server and client do not have a defined relationship. Before undocking, the server and client are already
related to each other, thus the extra confirm message is not needed.
-
+
*** Override, what is it? ***
-
+
The purpose of enabling the override is to prevent the docking program from automatically doing things with the docking port when docking or undocking.
Maybe the shuttle is full of plamsa/phoron for some reason, and you don't want the door to automatically open, or the airlock to cycle.
This means that the prepare_for_docking/undocking and finish_docking/undocking procs don't get called.
-
+
The docking controller will still check the state of the docking port, and thus prevent the shuttle from launching unless they force the launch (handling forced
- launches is not the docking controller's responsibility). In this case it is up to the players to manually get the docking port into a good state to undock
+ launches is not the docking controller's responsibility). In this case it is up to the players to manually get the docking port into a good state to undock
(which usually just means closing and locking the doors).
-
+
In line with this, docking controllers should prevent players from manually doing things when the override is NOT enabled.
*/
@@ -67,27 +67,27 @@
var/control_mode = MODE_NONE
var/response_sent = 0 //so we don't spam confirmation messages
var/resend_counter = 0 //for periodically resending confirmation messages in case they are missed
-
+
var/override_enabled = 0 //when enabled, do not open/close doors or cycle airlocks and wait for the player to do it manually
var/received_confirm = 0 //for undocking, whether the server has received a confirmation from the client
/datum/computer/file/embedded_program/docking/New()
- ..()
- var/datum/existing = locate(id_tag) //in case a datum already exists with our tag
- if(existing)
- existing.tag = null //take it from them
-
- tag = id_tag //Greatly simplifies shuttle initialization
+ ..()
+ var/datum/existing = locate(id_tag) //in case a datum already exists with our tag
+ if(existing)
+ existing.tag = null //take it from them
+
+ tag = id_tag //Greatly simplifies shuttle initialization
/datum/computer/file/embedded_program/docking/receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"] //for docking signals, this is the sender id
var/command = signal.data["command"]
var/recipient = signal.data["recipient"] //the intended recipient of the docking signal
-
+
if (recipient != id_tag)
return //this signal is not for us
-
+
switch (command)
if ("confirm_dock")
if (control_mode == MODE_CLIENT && dock_state == STATE_UNDOCKED && receive_tag == tag_target)
@@ -95,7 +95,7 @@
broadcast_docking_status()
if (!override_enabled)
prepare_for_docking()
-
+
else if (control_mode == MODE_CLIENT && dock_state == STATE_DOCKING && receive_tag == tag_target)
dock_state = STATE_DOCKED
broadcast_docking_status()
@@ -104,19 +104,19 @@
response_sent = 0
else if (control_mode == MODE_SERVER && dock_state == STATE_DOCKING && receive_tag == tag_target) //client just sent us the confirmation back, we're done with the docking process
received_confirm = 1
-
+
if ("request_dock")
if (control_mode == MODE_NONE && dock_state == STATE_UNDOCKED)
control_mode = MODE_SERVER
-
+
dock_state = STATE_DOCKING
broadcast_docking_status()
-
+
tag_target = receive_tag
if (!override_enabled)
prepare_for_docking()
send_docking_command(tag_target, "confirm_dock") //acknowledge the request
-
+
if ("confirm_undock")
if (control_mode == MODE_CLIENT && dock_state == STATE_UNDOCKING && receive_tag == tag_target)
if (!override_enabled)
@@ -129,7 +129,7 @@
if (control_mode == MODE_SERVER && dock_state == STATE_DOCKED && receive_tag == tag_target)
dock_state = STATE_UNDOCKING
broadcast_docking_status()
-
+
if (!override_enabled)
prepare_for_undocking()
@@ -145,38 +145,38 @@
if (!response_sent)
send_docking_command(tag_target, "confirm_dock") //tell the server we're ready
response_sent = 1
-
+
else if (control_mode == MODE_SERVER && received_confirm)
send_docking_command(tag_target, "confirm_dock") //tell the client we are done docking.
-
+
dock_state = STATE_DOCKED
broadcast_docking_status()
-
+
if (!override_enabled)
finish_docking() //server done docking!
response_sent = 0
received_confirm = 0
-
+
if (STATE_UNDOCKING)
if (ready_for_undocking())
if (control_mode == MODE_CLIENT)
if (!response_sent)
send_docking_command(tag_target, "confirm_undock") //tell the server we are OK to undock.
response_sent = 1
-
+
else if (control_mode == MODE_SERVER && received_confirm)
send_docking_command(tag_target, "confirm_undock") //tell the client we are done undocking.
if (!override_enabled)
finish_undocking()
reset() //server is done undocking!
-
+
if (response_sent || resend_counter > 0)
resend_counter++
-
+
if (resend_counter >= MESSAGE_RESEND_TIME || (dock_state != STATE_DOCKING && dock_state != STATE_UNDOCKING))
response_sent = 0
resend_counter = 0
-
+
//handle invalid states
if (control_mode == MODE_NONE && dock_state != STATE_UNDOCKED)
if (tag_target)
@@ -189,22 +189,22 @@
/datum/computer/file/embedded_program/docking/proc/initiate_docking(var/target)
if (dock_state != STATE_UNDOCKED || control_mode == MODE_SERVER) //must be undocked and not serving another request to begin a new docking handshake
return
-
+
tag_target = target
control_mode = MODE_CLIENT
-
+
send_docking_command(tag_target, "request_dock")
/datum/computer/file/embedded_program/docking/proc/initiate_undocking()
if (dock_state != STATE_DOCKED || control_mode != MODE_CLIENT) //must be docked and must be client to start undocking
return
-
+
dock_state = STATE_UNDOCKING
broadcast_docking_status()
-
+
if (!override_enabled)
prepare_for_undocking()
-
+
send_docking_command(tag_target, "request_undock")
//tell the docking port to start getting ready for docking - e.g. pressurize
@@ -240,14 +240,13 @@
/datum/computer/file/embedded_program/docking/proc/reset()
dock_state = STATE_UNDOCKED
broadcast_docking_status()
-
+
control_mode = MODE_NONE
tag_target = null
response_sent = 0
received_confirm = 0
/datum/computer/file/embedded_program/docking/proc/force_undock()
- //world << "[id_tag]: forcing undock"
if (tag_target)
send_docking_command(tag_target, "dock_error")
reset()
@@ -291,4 +290,4 @@
#undef MODE_NONE
#undef MODE_SERVER
-#undef MODE_CLIENT
\ No newline at end of file
+#undef MODE_CLIENT
diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm
index fc74a03b5f7..d55b3a0d72b 100644
--- a/code/game/machinery/hologram.dm
+++ b/code/game/machinery/hologram.dm
@@ -368,7 +368,7 @@ Holographic project of everything else.
flat_icon.AddAlphaMask(alpha_mask)//Finally, let's mix in a distortion effect.
hologram.icon = flat_icon
- world << "Your icon should appear now."
+ to_world("Your icon should appear now.")
return
*/
diff --git a/code/game/machinery/nuclear_bomb.dm b/code/game/machinery/nuclear_bomb.dm
index 4af6c560a68..1256b075522 100644
--- a/code/game/machinery/nuclear_bomb.dm
+++ b/code/game/machinery/nuclear_bomb.dm
@@ -365,11 +365,11 @@ var/bomb_set
if(SSticker.mode)
SSticker.mode.explosion_in_progress = 0
if(off_station == 1)
- world << "A nuclear device was set off, but the explosion was out of reach of the station!"
+ to_world("A nuclear device was set off, but the explosion was out of reach of the station!")
else if(off_station == 2)
- world << "A nuclear device was set off, but the device was not on the station!"
+ to_world("A nuclear device was set off, but the device was not on the station!")
else
- world << "The station was destoyed by the nuclear blast!"
+ to_world("The station was destoyed by the nuclear blast!")
SSticker.mode.station_was_nuked = (off_station<2) //offstation==1 is a draw. the station becomes irradiated and needs to be evacuated.
//kinda shit but I couldn't get permission to do what I wanted to do.
diff --git a/code/game/machinery/overview.dm b/code/game/machinery/overview.dm
index 718bcacb835..9ac3a8c2953 100644
--- a/code/game/machinery/overview.dm
+++ b/code/game/machinery/overview.dm
@@ -30,9 +30,6 @@
imap += icon('icons/misc/imap.dmi', "blank")
imap += icon('icons/misc/imap.dmi', "blank")
- //world << "[icount] images in list"
-
-
for(var/wx = 1 ; wx <= world.maxx; wx++)
for(var/wy = 1; wy <= world.maxy; wy++)
@@ -146,13 +143,9 @@
var/rx = ((wx*2+xoff)%32) + 1
var/ry = ((wy*2+yoff)%32) + 1
- //world << "trying [ix],[iy] : [ix+icx*iy]"
var/icon/I = imap[1+(ix + icx*iy)*2]
var/icon/I2 = imap[2+(ix + icx*iy)*2]
-
- //world << "icon: \icon[I]"
-
I.DrawBox(colour, rx, ry, rx+1, ry+1)
I2.DrawBox(colour2, rx, ry, rx+1, ry+1)
@@ -168,8 +161,6 @@
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
- //world<<"\icon[I] at [H.screen_loc]"
-
H.name = (i==0)?"maprefresh":"map"
var/icon/HI = new/icon
@@ -280,12 +271,8 @@
var/rx = ((wx*2+xoff)%32) + 1
var/ry = ((wy*2+yoff)%32) + 1
- //world << "trying [ix],[iy] : [ix+icx*iy]"
var/icon/I = imap[1+(ix + icx*iy)]
-
- //world << "icon: \icon[I]"
-
I.DrawBox(colour, rx, ry, rx, ry)
@@ -299,8 +286,6 @@
H.screen_loc = "[5 + i%icx],[6+ round(i/icx)]"
- //world<<"\icon[I] at [H.screen_loc]"
-
H.name = (i==0)?"maprefresh":"map"
var/icon/I = imap[i+1]
diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm
index f90b70348a6..fc37510b8bb 100644
--- a/code/game/machinery/pipe/construction.dm
+++ b/code/game/machinery/pipe/construction.dm
@@ -797,11 +797,9 @@ Buildable meters
V.atmos_init()
V.build_network()
if (V.node1)
-// world << "[V.node1.name] is connected to valve, forcing it to update its nodes."
V.node1.atmos_init()
V.node1.build_network()
if (V.node2)
-// world << "[V.node2.name] is connected to valve, forcing it to update its nodes."
V.node2.atmos_init()
V.node2.build_network()
diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm
index 48e0e567670..aeaf6db5bef 100644
--- a/code/game/machinery/telecomms/broadcaster.dm
+++ b/code/game/machinery/telecomms/broadcaster.dm
@@ -666,8 +666,6 @@ var/message_delay = 0 // To make sure restarting the recentmessages list is kept
for(var/obj/machinery/telecomms/receiver/R in telecomms_list)
R.receive_signal(signal)
- //world<< "Done: [signal.data["done"]]"
-
return signal
diff --git a/code/game/machinery/telecomms/telecomunications.dm b/code/game/machinery/telecomms/telecomunications.dm
index a1d8232a5bd..0366c58885c 100644
--- a/code/game/machinery/telecomms/telecomunications.dm
+++ b/code/game/machinery/telecomms/telecomunications.dm
@@ -44,18 +44,10 @@ var/global/list/obj/machinery/telecomms/telecomms_list = list()
if(!on)
return
- //world << "[src] ([src.id]) - [signal.debug_print()]"
var/send_count = 0
signal.data["slow"] += rand(0, round((100-integrity))) // apply some lag based on integrity
- /*
- // Edit by Atlantis: Commented out as emergency fix due to causing extreme delays in communications.
- // Apply some lag based on traffic rates
- var/netlag = round(traffic / 50)
- if(netlag > signal.data["slow"])
- signal.data["slow"] = netlag
- */
// Loop through all linked machines and send the signal or copy.
for(var/obj/machinery/telecomms/machine in links)
if(filter && !istype( machine, text2path(filter) ))
diff --git a/code/game/mecha/medical/odysseus.dm b/code/game/mecha/medical/odysseus.dm
index c06050f6fcc..44661fd435e 100644
--- a/code/game/mecha/medical/odysseus.dm
+++ b/code/game/mecha/medical/odysseus.dm
@@ -35,29 +35,6 @@
H.glasses = null
..()
return
-/*
- verb/set_perspective()
- set name = "Set client perspective."
- set category = "Exosuit Interface"
- set src = usr.loc
- var/perspective = input("Select a perspective type.",
- "Client perspective",
- occupant.client.perspective) in list(MOB_PERSPECTIVE,EYE_PERSPECTIVE)
- world << "[perspective]"
- occupant.client.perspective = perspective
- return
-
- verb/toggle_eye()
- set name = "Toggle eye."
- set category = "Exosuit Interface"
- set src = usr.loc
- if(occupant.client.eye == occupant)
- occupant.client.eye = src
- else
- occupant.client.eye = occupant
- world << "[occupant.client.eye]"
- return
-*/
//TODO - Check documentation for client.eye and client.perspective...
/obj/item/clothing/glasses/hud/health/mech
@@ -65,18 +42,6 @@
process_hud(var/mob/M)
-/*
- world<< "view(M)"
- for(var/mob/mob in view(M))
- world << "[mob]"
- world<< "view(M.client)"
- for(var/mob/mob in view(M.client))
- world << "[mob]"
- world<< "view(M.loc)"
- for(var/mob/mob in view(M.loc))
- world << "[mob]"
-*/
-
if(!M || M.stat || !(M in view(M))) return
if(!M.client) return
var/client/C = M.client
diff --git a/code/game/modifiers/modifiers.dm b/code/game/modifiers/modifiers.dm
index d1fc953bf14..8b94f3f9f02 100644
--- a/code/game/modifiers/modifiers.dm
+++ b/code/game/modifiers/modifiers.dm
@@ -340,7 +340,7 @@ it should be avoided in favour of manual removal where possible
for (var/datum/reagent/R in C.touching.reagent_list)
if (istype(R, ourtype))
totaldose += R.dose
-
+
for (var/datum/reagent/R in C.breathing.reagent_list)
if (istype(R, ourtype))
totaldose += R.dose
@@ -360,7 +360,6 @@ it should be avoided in favour of manual removal where possible
return 1
/datum/modifier/proc/validity_fail(var/reason)
- //world << "MODIFIER VALIDITY FAIL: [reason]"
qdel(src)
return 0
diff --git a/code/game/objects/effects/chem/chemsmoke.dm b/code/game/objects/effects/chem/chemsmoke.dm
index d0e2656a5dc..40f1f15e8f0 100644
--- a/code/game/objects/effects/chem/chemsmoke.dm
+++ b/code/game/objects/effects/chem/chemsmoke.dm
@@ -156,7 +156,6 @@
while (touched_mobs[i])
mobnames += "."
else mobnames += "Affected player: [touched_mobs[1]]."
- //world << "DEBUG: [mobnames]"
var/containing = ""
if (contained)
containing += ", containing [contained]"
diff --git a/code/game/objects/effects/gibs.dm b/code/game/objects/effects/gibs.dm
index baefc42830c..b8713169d42 100644
--- a/code/game/objects/effects/gibs.dm
+++ b/code/game/objects/effects/gibs.dm
@@ -19,7 +19,7 @@
proc/Gib(atom/location, var/list/viruses = list(), var/datum/dna/MobDNA = null)
if(gibtypes.len != gibamounts.len || gibamounts.len != gibdirections.len)
- world << "Gib list length mismatch!"
+ to_world("Gib list length mismatch!")
return
var/obj/effect/decal/cleanable/blood/gibs/gib = null
diff --git a/code/game/objects/items/blueprints.dm b/code/game/objects/items/blueprints.dm
index 3a11df365d8..8f3c5f708ae 100644
--- a/code/game/objects/items/blueprints.dm
+++ b/code/game/objects/items/blueprints.dm
@@ -94,7 +94,6 @@ move an amendment to the drawing.
tag
- world << "[usr.client.holder.fakekey ? "Administrator" : usr.key] Announces: [message] [message]