diff --git a/code/datums/mind.dm b/code/datums/mind.dm index b23129559d875..75d7e5446b552 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -530,7 +530,7 @@ // ^ whoever left this comment is literally a grammar nazi. stalin better. in russia grammar correct you. /datum/mind/proc/edit_memory() - if(!SSticker || !SSticker.mode) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Not before round-start!", "Alert") return diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index c22c7ded82f3c..dd395c2c9a6a0 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -119,7 +119,7 @@ return do_animate("deny") return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PREGAME) return var/mob/living/M = AM if(!M.restrained() && M.mob_size > MOB_SIZE_TINY && (!(isrobot(M) && M.stat))) diff --git a/code/game/sound.dm b/code/game/sound.dm index b493d741a3798..40aa7f971e33f 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -194,7 +194,7 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in SEND_SOUND(src, S) /client/proc/playtitlemusic() - if(!SSticker || !SSticker.login_music || GLOB.configuration.general.disable_lobby_music) + if(SSticker.current_state < GAME_STATE_STARTUP || !SSticker.login_music || GLOB.configuration.general.disable_lobby_music) return if(prefs.sound & SOUND_LOBBY) SEND_SOUND(src, sound(SSticker.login_music, repeat = 0, wait = 0, volume = 85 * prefs.get_channel_volume(CHANNEL_LOBBYMUSIC), channel = CHANNEL_LOBBYMUSIC)) // MAD JAMS diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 79a1dad9b8f69..b62fd647fe45d 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -551,7 +551,7 @@ LAZYADD(blueprint_data, I) /turf/proc/add_blueprints_preround(atom/movable/AM) - if(!SSticker || SSticker.current_state != GAME_STATE_PLAYING) + if(SSticker.current_state == GAME_STATE_STARTUP || SSticker.current_state != GAME_STATE_PLAYING) add_blueprints(AM) /turf/proc/empty(turf_type = /turf/space) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 4a88e697163ed..f6b6fb203b759 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -8,7 +8,7 @@ to_chat(src, "You're already dead!") return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(src, "You can't commit suicide before the game starts!") return diff --git a/code/modules/admin/misc_admin_procs.dm b/code/modules/admin/misc_admin_procs.dm index bf1c706cac86d..e5b4e16790837 100644 --- a/code/modules/admin/misc_admin_procs.dm +++ b/code/modules/admin/misc_admin_procs.dm @@ -516,7 +516,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE) if(!check_rights(R_SERVER)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PREGAME) alert("Unable to start the game as it is not set up.") return @@ -604,7 +604,7 @@ GLOBAL_VAR_INIT(disable_explosions, FALSE) if(!check_rights(R_SERVER)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_STARTUP) alert("Slow down a moment, let the ticker start first!") return diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 8065f2ad30ceb..aba62bccdb950 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2722,7 +2722,7 @@ else if(href_list["traitor"]) if(!check_rights(R_ADMIN|R_MOD)) return - if(!SSticker || !SSticker.mode) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return @@ -2998,7 +2998,7 @@ SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Power All SMESs") log_and_message_admins("[key_name(usr)] made all SMESs powered", 1) if("prisonwarp") - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!", null, null, null, null, null) return if(alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") != "Yes") @@ -3039,7 +3039,7 @@ H.loc = pick(GLOB.prisonsecuritywarp) GLOB.prisonwarped += H if("traitor_all") - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return if(alert(usr, "Are you sure you want to do this?", "Confirmation", "Yes", "No") != "Yes") @@ -3303,7 +3303,7 @@ if("showailaws") output_ai_laws() if("showgm") - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") else if(SSticker.mode) alert("The game mode is [SSticker.mode.name]") diff --git a/code/modules/admin/verbs/cinematic.dm b/code/modules/admin/verbs/cinematic.dm index 975d6e4d9c4b6..491fbf7d0e4f4 100644 --- a/code/modules/admin/verbs/cinematic.dm +++ b/code/modules/admin/verbs/cinematic.dm @@ -2,7 +2,7 @@ set name = "cinematic" set desc = "Shows a cinematic." // Intended for testing but I thought it might be nice for events on the rare occasion Feel free to comment it out if it's not wanted. set hidden = 1 - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PREGAME) return if(!check_rights(R_MAINTAINER)) diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index 92afaef5286c7..1e1a973c5b59d 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -248,7 +248,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_SPAWN)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return if(ishuman(M)) @@ -266,7 +266,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_SPAWN)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return @@ -326,7 +326,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_SPAWN)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return if(ishuman(M)) @@ -346,7 +346,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_SPAWN)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return if(ishuman(M)) @@ -366,7 +366,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_SPAWN)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return if(ishuman(M)) @@ -419,7 +419,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_EVENT)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return if(ishuman(M)) @@ -859,7 +859,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) if(!check_rights(R_SPAWN)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("Wait until the game starts") return if(ishuman(M)) diff --git a/code/modules/admin/verbs/gimmick_team.dm b/code/modules/admin/verbs/gimmick_team.dm index 783eb958b0270..68dacc083b44a 100644 --- a/code/modules/admin/verbs/gimmick_team.dm +++ b/code/modules/admin/verbs/gimmick_team.dm @@ -7,7 +7,7 @@ set desc = "Spawns a group of players in the specified outfit." if(!check_rights(R_EVENT)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return if(alert("Do you want to spawn a Gimmick Team at YOUR CURRENT LOCATION?", null,"Yes","No")=="No") diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index ee9a86070aae9..2f9b423af066c 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -10,7 +10,7 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0) if(!check_rights(R_ADMIN)) to_chat(src, "Only administrators may use this command.") return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return if(alert("Do you want to send in the Syndicate Infiltration Team?", null,"Yes","No")=="No") diff --git a/code/modules/admin/verbs/onlyone.dm b/code/modules/admin/verbs/onlyone.dm index 041e39422dea1..4e95957f0aa98 100644 --- a/code/modules/admin/verbs/onlyone.dm +++ b/code/modules/admin/verbs/onlyone.dm @@ -1,5 +1,5 @@ /client/proc/only_one() - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return @@ -61,7 +61,7 @@ SEND_SOUND(M, music) /client/proc/only_me() - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 0a09fa34d0d1d..d9ee5c3e4c85c 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -898,7 +898,8 @@ Traitors and the like can also be revived with the previous role mostly intact. set category = "Admin" set name = "Toggle Deny Shuttle" - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) + alert("The game hasn't started yet!") return if(!check_rights(R_ADMIN)) @@ -1134,7 +1135,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(!input) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PREGAME) return SSticker.selected_tip = input @@ -1159,7 +1160,7 @@ Traitors and the like can also be revived with the previous role mostly intact. holder.modify_goals() /datum/admins/proc/modify_goals() - if(!SSticker || !SSticker.mode) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(usr, "This verb can only be used if the round has started.") return diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm index 5ea81e30b0fb7..6dcb759c7c47e 100644 --- a/code/modules/admin/verbs/striketeam_syndicate.dm +++ b/code/modules/admin/verbs/striketeam_syndicate.dm @@ -9,7 +9,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0) if(!src.holder) to_chat(src, "Only administrators may use this command.") return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) alert("The game hasn't started yet!") return if(GLOB.sent_syndicate_strike_team == 1) diff --git a/code/modules/antagonists/_common/antag_team.dm b/code/modules/antagonists/_common/antag_team.dm index 34d86b3cb3dfa..5cd4d310091a2 100644 --- a/code/modules/antagonists/_common/antag_team.dm +++ b/code/modules/antagonists/_common/antag_team.dm @@ -381,7 +381,7 @@ GLOBAL_LIST_EMPTY(antagonist_teams) * Opens a window which lists the teams for the round. */ /datum/admins/proc/check_teams() - if(!SSticker.HasRoundStarted()) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(usr, "The game hasn't started yet!") return diff --git a/code/modules/mob/camera/cameranet.dm b/code/modules/mob/camera/cameranet.dm index 8e6277f404528..cf1fa8a4de377 100644 --- a/code/modules/mob/camera/cameranet.dm +++ b/code/modules/mob/camera/cameranet.dm @@ -83,7 +83,7 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new()) /// Updates the chunks that the turf is located in. Use this when obstacles are destroyed or when doors open. /datum/cameranet/proc/update_visibility(atom/A, opacity_check = 1) - if(!SSticker || (opacity_check && !A.opacity)) + if(SSticker.current_state < GAME_STATE_PREGAME || (opacity_check && !A.opacity)) return major_chunk_change(update = A) @@ -110,7 +110,7 @@ GLOBAL_DATUM_INIT(cameranet, /datum/cameranet, new()) return if(add && remove) CRASH("Adding and removing a camera to the cameranet simultaneously is not implemented") - + var/atom/c = remove if(!c) c = add diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7b31a7ed598d6..de82e53f159f2 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -779,7 +779,7 @@ return FALSE /mob/living/update_gravity(has_gravity) - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PREGAME) return if(has_gravity) clear_alert("weightless") diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index d872d92ec7ee1..8fd188c22c720 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -320,7 +320,7 @@ return G /mob/living/attack_slime(mob/living/simple_animal/slime/M) - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(M, "You cannot attack people before the game has started.") return diff --git a/code/modules/mob/living/silicon/ai/ai_defense.dm b/code/modules/mob/living/silicon/ai/ai_defense.dm index 702b745e4fcc6..9aba630a41f6c 100644 --- a/code/modules/mob/living/silicon/ai/ai_defense.dm +++ b/code/modules/mob/living/silicon/ai/ai_defense.dm @@ -1,5 +1,5 @@ /mob/living/silicon/ai/attack_alien(mob/living/carbon/alien/humanoid/M) - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(M, "You cannot attack people before the game has started.") return ..() diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm index 68a72548138f4..719d9cc091ad6 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm @@ -112,7 +112,7 @@ to_chat(usr, "You are banned from playing drones, and cannot spawn as one.") return - if(!SSticker || SSticker.current_state < GAME_STATE_PLAYING) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(src, "You can't join as a drone before the game starts!") return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 32e274e2b2d3b..1ae4b619471a4 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1036,7 +1036,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \ to_chat(usr, "You are banned from playing as sentient animals.") return - if(!SSticker || SSticker.current_state < 3) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(src, "You can't respawn as an NPC before the game starts!") return diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index e17e6e3357aec..352a680c9aec7 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -53,7 +53,7 @@ real_name = "Random Character Slot" var/output = "
Setup Character
[real_name]
Global Antag Candidacy"
output += "
You are [client.skip_antag ? "ineligible" : "eligible"] for all antag roles.
Observe (Please wait...)
" else output += "" diff --git a/code/modules/response_team/ert.dm b/code/modules/response_team/ert.dm index 9c30896347a70..a85e7028aea47 100644 --- a/code/modules/response_team/ert.dm +++ b/code/modules/response_team/ert.dm @@ -19,7 +19,7 @@ GLOBAL_LIST_EMPTY(ert_request_messages) if(!check_rights(R_EVENT)) return - if(!SSticker) + if(SSticker.current_state < GAME_STATE_PLAYING) to_chat(usr, "The game hasn't started yet!") return