refactors most spans

This commit is contained in:
Kashargul
2024-10-02 21:10:31 +02:00
parent 5417c7772c
commit a2c673ab7a
1517 changed files with 12436 additions and 12347 deletions
+28 -28
View File
@@ -74,8 +74,8 @@ var/global/datum/controller/subsystem/ticker/ticker
post_game_tick()
/datum/controller/subsystem/ticker/proc/pregame_welcome()
to_world("<span class='boldannounce notice'><em>Welcome to the pregame lobby!</em></span>")
to_world("<span class='boldannounce notice'>Please set up your character and select ready. The round will start in [pregame_timeleft] seconds.</span>")
to_world(span_boldannounce(span_notice("<em>Welcome to the pregame lobby!</em>")))
to_world(span_boldannounce(span_notice("Please set up your character and select ready. The round will start in [pregame_timeleft] seconds.")))
world << sound('sound/misc/server-ready.ogg', volume = 100)
// Called during GAME_STATE_PREGAME (RUNLEVEL_LOBBY)
@@ -123,7 +123,7 @@ var/global/datum/controller/subsystem/ticker/ticker
var/list/runnable_modes = config.get_runnable_modes()
if((master_mode == "random") || (master_mode == "secret"))
if(!runnable_modes.len)
to_world("<span class='danger'><B>Unable to choose playable game mode.</B> Reverting to pregame lobby.</span>")
to_world(span_danger("<B>Unable to choose playable game mode.</B> Reverting to pregame lobby."))
return 0
if(secret_force_mode != "secret")
src.mode = config.pick_mode(secret_force_mode)
@@ -136,7 +136,7 @@ var/global/datum/controller/subsystem/ticker/ticker
src.mode = config.pick_mode(master_mode)
if(!src.mode)
to_world("<span class='danger'>Serious error in mode setup! Reverting to pregame lobby.</span>") //Uses setup instead of set up due to computational context.
to_world(span_danger("Serious error in mode setup! Reverting to pregame lobby.")) //Uses setup instead of set up due to computational context.
return 0
job_master.ResetOccupations()
@@ -145,21 +145,21 @@ var/global/datum/controller/subsystem/ticker/ticker
job_master.DivideOccupations() // Apparently important for new antagonist system to register specific job antags properly.
if(!src.mode.can_start())
to_world("<span class='danger'><B>Unable to start [mode.name].</B> Not enough players readied, [config.player_requirements[mode.config_tag]] players needed. Reverting to pregame lobby.</span>")
to_world(span_danger("<B>Unable to start [mode.name].</B> Not enough players readied, [config.player_requirements[mode.config_tag]] players needed. Reverting to pregame lobby."))
mode.fail_setup()
mode = null
job_master.ResetOccupations()
return 0
if(hide_mode)
to_world("<span class='notice'><B>The current game mode is - Secret!</B></span>")
to_world(span_notice("<B>The current game mode is - Secret!</B>"))
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)
to_world("<span class='info'><B>Possibilities:</B> [english_list(tmpmodes, and_text= "; ", comma_text = "; ")]</span>")
to_world(span_info("<B>Possibilities:</B> [english_list(tmpmodes, and_text= "; ", comma_text = "; ")]"))
else
src.mode.announce()
return 1
@@ -181,7 +181,7 @@ var/global/datum/controller/subsystem/ticker/ticker
//Deleting Startpoints but we need the ai point to AI-ize people later
if (S.name != "AI")
qdel(S)
to_world("<span class='boldannounce notice'><em>Enjoy the game!</em></span>")
to_world(span_boldannounce(span_notice("<em>Enjoy the game!</em>")))
world << sound('sound/AI/welcome.ogg') // Skie
//Holiday Round-start stuff ~Carn
Holiday_Game_Start()
@@ -225,7 +225,7 @@ var/global/datum/controller/subsystem/ticker/ticker
end_game_state = END_GAME_MODE_FINISHED // Only do this cleanup once!
mode.cleanup()
//call a transfer shuttle vote
to_world("<span class='danger'>The round has ended!</span>")
to_world(span_danger("The round has ended!"))
SSvote.autotransfer()
// Called during GAME_STATE_FINISHED (RUNLEVEL_POSTGAME)
@@ -238,7 +238,7 @@ var/global/datum/controller/subsystem/ticker/ticker
feedback_set_details("end_proper", "nuke")
restart_timeleft = 1 MINUTE // No point waiting five minutes if everyone's dead.
if(!delay_end)
to_world("<span class='notice'><b>Rebooting due to destruction of [station_name()] in [round(restart_timeleft/600)] minute\s.</b></span>")
to_world(span_notice("<b>Rebooting due to destruction of [station_name()] in [round(restart_timeleft/600)] minute\s.</b>"))
last_restart_notify = world.time
else
feedback_set_details("end_proper", "proper completion")
@@ -252,14 +252,14 @@ var/global/datum/controller/subsystem/ticker/ticker
if(END_GAME_ENDING)
restart_timeleft -= (world.time - last_fire)
if(delay_end)
to_world("<span class='notice'><b>An admin has delayed the round end.</b></span>")
to_world(span_notice("<b>An admin has delayed the round end.</b>"))
end_game_state = END_GAME_DELAYED
else if(restart_timeleft <= 0)
to_world("<span class='warning'><b>Restarting world!</b></span>")
to_world(span_warning("<b>Restarting world!</b>"))
sleep(5)
world.Reboot()
else if (world.time - last_restart_notify >= 1 MINUTE)
to_world("<span class='notice'><b>Restarting in [round(restart_timeleft/600, 1)] minute\s.</b></span>")
to_world(span_notice("<b>Restarting in [round(restart_timeleft/600, 1)] minute\s.</b>"))
last_restart_notify = world.time
return
if(END_GAME_DELAYED)
@@ -451,47 +451,47 @@ var/global/datum/controller/subsystem/ticker/ticker
if(captainless)
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player))
to_chat(M, "<span class='notice'>Site Management is not forced on anyone.</span>")
to_chat(M, span_notice("Site Management is not forced on anyone."))
/datum/controller/subsystem/ticker/proc/declare_completion()
to_world("<span class='filter_system'><br><br><br><H1>A round of [mode.name] has ended!</H1></span>")
to_world(span_filter_system("<br><br><br><H1>A round of [mode.name] has ended!</H1>"))
for(var/mob/Player in player_list)
if(Player.mind && !isnewplayer(Player))
if(Player.stat != DEAD)
var/turf/playerTurf = get_turf(Player)
if(emergency_shuttle.departed && emergency_shuttle.evac)
if(isNotAdminLevel(playerTurf.z))
to_chat(Player, "<span class='filter_system'>[span_blue("<b>You survived the round, but remained on [station_name()] as [Player.real_name].</b>")]</span>")
to_chat(Player, span_filter_system("[span_blue("<b>You survived the round, but remained on [station_name()] as [Player.real_name].</b>")]"))
else
to_chat(Player, "<span class='filter_system'>[span_green("<b>You managed to survive the events on [station_name()] as [Player.real_name].</b>")]</span>")
to_chat(Player, span_filter_system("[span_green("<b>You managed to survive the events on [station_name()] as [Player.real_name].</b>")]"))
else if(isAdminLevel(playerTurf.z))
to_chat(Player, "<span class='filter_system'>[span_green("<b>You successfully underwent crew transfer after events on [station_name()] as [Player.real_name].</b>")]</span>")
to_chat(Player, span_filter_system("[span_green("<b>You successfully underwent crew transfer after events on [station_name()] as [Player.real_name].</b>")]"))
else if(issilicon(Player))
to_chat(Player, "<span class='filter_system'>[span_green("<b>You remain operational after the events on [station_name()] as [Player.real_name].</b>")]</span>")
to_chat(Player, span_filter_system("[span_green("<b>You remain operational after the events on [station_name()] as [Player.real_name].</b>")]"))
else
to_chat(Player, "<span class='filter_system'>[span_blue("<b>You missed the crew transfer after the events on [station_name()] as [Player.real_name].</b>")]</span>")
to_chat(Player, span_filter_system("[span_blue("<b>You missed the crew transfer after the events on [station_name()] as [Player.real_name].</b>")]"))
else
if(istype(Player,/mob/observer/dead))
var/mob/observer/dead/O = Player
if(!O.started_as_observer)
to_chat(Player, "<span class='filter_system'>[span_red("<b>You did not survive the events on [station_name()]...</b>")]</span>")
to_chat(Player, span_filter_system("[span_red("<b>You did not survive the events on [station_name()]...</b>")]"))
else
to_chat(Player, "<span class='filter_system'>[span_red("<b>You did not survive the events on [station_name()]...</b>")]</span>")
to_chat(Player, span_filter_system("[span_red("<b>You did not survive the events on [station_name()]...</b>")]"))
to_world("<br>")
for (var/mob/living/silicon/ai/aiPlayer in mob_list)
if (aiPlayer.stat != 2)
to_world("<span class='filter_system'><b>[aiPlayer.name]'s laws at the end of the round were:</b></span>") // VOREStation edit
to_world(span_filter_system("<b>[aiPlayer.name]'s laws at the end of the round were:</b>")) // VOREStation edit
else
to_world("<span class='filter_system'><b>[aiPlayer.name]'s laws when it was deactivated were:</b></span>") // VOREStation edit
to_world(span_filter_system("<b>[aiPlayer.name]'s laws when it was deactivated were:</b>")) // VOREStation edit
aiPlayer.show_laws(1)
if (aiPlayer.connected_robots.len)
var/robolist = "<b>The AI's loyal minions were:</b> "
for(var/mob/living/silicon/robot/robo in aiPlayer.connected_robots)
robolist += "[robo.name][robo.stat?" (Deactivated), ":", "]" // VOREStation edit
to_world("<span class='filter_system'>[robolist]</span>")
to_world(span_filter_system("[robolist]"))
var/dronecount = 0
@@ -508,15 +508,15 @@ var/global/datum/controller/subsystem/ticker/ticker
if (!robo.connected_ai)
if (robo.stat != 2)
to_world("<span class='filter_system'><b>[robo.name] survived as an AI-less stationbound synthetic! Its laws were:</b></span>") // VOREStation edit
to_world(span_filter_system("<b>[robo.name] survived as an AI-less stationbound synthetic! Its laws were:</b>")) // VOREStation edit
else
to_world("<span class='filter_system'><b>[robo.name] was unable to survive the rigors of being a stationbound synthetic without an AI. Its laws were:</b></span>") // VOREStation edit
to_world(span_filter_system("<b>[robo.name] was unable to survive the rigors of being a stationbound synthetic without an AI. Its laws were:</b>")) // VOREStation edit
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)
to_world("<span class='filter_system'><b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.</b></span>")
to_world(span_filter_system("<b>There [dronecount>1 ? "were" : "was"] [dronecount] industrious maintenance [dronecount>1 ? "drones" : "drone"] at the end of this round.</b>"))
mode.declare_completion()//To declare normal completion.