| 1 | 2 | 3 | 4 | 5 | " var/bname for(var/block in 1 to DNA_SE_LENGTH) if(((block-1)%5)==0) body += "|
|---|---|---|---|---|---|
| [block-1] | " bname = GLOB.assigned_blocks[block] body += "" if(bname) var/bstate=M.dna.GetSEState(block) var/bcolor="[(bstate)?"#006600":"#ff0000"]" body += "[bname][block]" else body += "[block]" body+=" | " body += "
tag
to_chat(world, chat_box_notice(SPAN_NOTICE("[client.holder.fakekey ? "Administrator" : client.key] Announces:
[message]
"))) log_admin("Announce: [key_name(client)] : [message]") for(var/client/clients_to_alert in GLOB.clients) window_flash(clients_to_alert) if(clients_to_alert.prefs?.sound & SOUND_ADMINHELP) SEND_SOUND(clients_to_alert, sound('sound/misc/server_alert.ogg')) SSblackbox.record_feedback("tally", "admin_verb", 1, "Announce") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_ooc, R_ADMIN, "Toggle OOC", "Globally Toggles OOC", VERB_CATEGORY_SERVER) toggle_ooc() log_and_message_admins("toggled OOC.") SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_looc, R_ADMIN, "Toggle LOOC", "Globally Toggles LOOC", VERB_CATEGORY_SERVER) GLOB.looc_enabled = !(GLOB.looc_enabled) if(GLOB.looc_enabled) to_chat(world, "The LOOC channel has been globally enabled!") else to_chat(world, "The LOOC channel has been globally disabled!") log_and_message_admins("toggled LOOC.") SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle LOOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_dsay, R_ADMIN, "Toggle DSAY", "Globally Toggles DSAY", VERB_CATEGORY_SERVER) GLOB.dsay_enabled = !(GLOB.dsay_enabled) if(GLOB.dsay_enabled) to_chat(world, "Deadchat has been globally enabled!", MESSAGE_TYPE_DEADCHAT) else to_chat(world, "Deadchat has been globally disabled!", MESSAGE_TYPE_DEADCHAT) log_admin("[key_name(client)] toggled deadchat.") message_admins("[key_name_admin(client)] toggled deadchat.", 1) SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Deadchat") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_ooc_dead, R_ADMIN, "Toggle Dead OOC", "Toggle Dead OOC.", VERB_CATEGORY_SERVER) GLOB.dooc_enabled = !(GLOB.dooc_enabled) log_admin("[key_name(client)] toggled Dead OOC.") message_admins("[key_name_admin(client)] toggled Dead OOC.", 1) SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Dead OOC") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_emoji, R_ADMIN, "Toggle OOC Emoji", "Toggle OOC Emoji", VERB_CATEGORY_SERVER) GLOB.configuration.general.enable_ooc_emoji = !(GLOB.configuration.general.enable_ooc_emoji) log_admin("[key_name(client)] toggled OOC Emoji.") message_admins("[key_name_admin(client)] toggled OOC Emoji.", 1) SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle OOC Emoji") USER_VERB(start_server_now, R_SERVER, "Start Now", "Start the round RIGHT NOW", VERB_CATEGORY_SERVER) if(SSticker.current_state < GAME_STATE_STARTUP) alert(client, "Unable to start the game as it is not set up.") return if(!SSticker.ticker_going) alert(client, "Remove the round-start delay first.") return if(GLOB.configuration.general.start_now_confirmation) if(alert(client, "This is a live server. Are you sure you want to start now?", "Start game", "Yes", "No") != "Yes") return if(SSticker.current_state == GAME_STATE_PREGAME || SSticker.current_state == GAME_STATE_STARTUP) SSticker.force_start = TRUE log_admin("[client.key] has started the game.") var/msg = "" if(SSticker.current_state == GAME_STATE_STARTUP) msg = " (The server is still setting up, but the round will be started as soon as possible.)" message_admins(SPAN_DARKMBLUE("[client.key] has started the game.[msg]")) SSblackbox.record_feedback("tally", "admin_verb", 1, "Start Game") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return 1 else to_chat(client, "Error: Start Now: Game has already started.") return USER_VERB(toggle_enter, R_SERVER, "Toggle Entering", "People can't enter", VERB_CATEGORY_SERVER) if(!client.is_connecting_from_localhost()) if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes") return GLOB.enter_allowed = !GLOB.enter_allowed if(!GLOB.enter_allowed) to_chat(world, "New players may no longer enter the game.") else to_chat(world, "New players may now enter the game.") log_admin("[key_name(client)] toggled new player game entering.") message_admins("[key_name_admin(client)] toggled new player game entering.", 1) world.update_status() SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Entering") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_ai_role, R_EVENT, "Toggle AI", "People can't be AI", VERB_CATEGORY_EVENT) GLOB.configuration.jobs.allow_ai = !(GLOB.configuration.jobs.allow_ai) if(!GLOB.configuration.jobs.allow_ai) to_chat(world, "The AI job is no longer chooseable.") else to_chat(world, "The AI job is chooseable now.") message_admins("[key_name_admin(client)] toggled AI allowed.") log_admin("[key_name(client)] toggled AI allowed.") world.update_status() SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle AI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_respawn, R_SERVER, "Toggle Respawn", "Toggle the ability for players to respawn.", VERB_CATEGORY_SERVER) if(!client.is_connecting_from_localhost()) if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes") return GLOB.configuration.general.respawn_enabled = !(GLOB.configuration.general.respawn_enabled) if(GLOB.configuration.general.respawn_enabled) to_chat(world, "You may now respawn.") else to_chat(world, "You may no longer respawn") message_admins("[key_name_admin(client)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].", 1) log_admin("[key_name(client)] toggled respawn to [GLOB.configuration.general.respawn_enabled ? "On" : "Off"].") world.update_status() SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Respawn") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(delay_game, R_SERVER, "Delay", "Delay the game start/end", VERB_CATEGORY_SERVER) if(SSticker.current_state < GAME_STATE_STARTUP) alert(client, "Slow down a moment, let the ticker start first!") return if(!client.is_connecting_from_localhost()) if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes") return if(SSblackbox) SSblackbox.record_feedback("tally", "admin_verb", 1, "Delay") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! if(SSticker.current_state > GAME_STATE_PREGAME) SSticker.delay_end = !SSticker.delay_end log_admin("[key_name(client)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].") message_admins("[key_name(client)] [SSticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1) if(SSticker.delay_end) SSticker.real_reboot_time = 0 // Immediately show the "Admin delayed round end" message return //alert("Round end delayed", null, null, null, null, null) if(SSticker.ticker_going) SSticker.ticker_going = FALSE SSticker.delay_end = TRUE to_chat(world, "The game start has been delayed.") log_admin("[key_name(client)] delayed the game.") else SSticker.ticker_going = TRUE SSticker.round_start_time = world.time + SSticker.pregame_timeleft to_chat(world, "The game will start soon.") log_admin("[key_name(client)] removed the delay.") ////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS /** * A proc that return whether the mob is a "Special Character" aka Antagonist * * Arguments: * * M - the mob you're checking */ /proc/is_special_character(mob/M) if(!SSticker.mode) return FALSE if(!istype(M)) return FALSE if(isrobot(M)) var/mob/living/silicon/robot/R = M if(R.emagged) return TRUE if(M.mind?.special_role)//If they have a mind and special role, they are some type of traitor or antagonist. return TRUE return FALSE /** * A proc that return an array of capitalized strings containing name of the antag types they are * * Arguments: * * M - the mob you're checking */ /proc/get_antag_type_strings_list(mob/M) // return an array of all the antag types they are with name var/list/antag_list = list() if(!SSticker.mode || !istype(M) || !M.mind) return FALSE if(M.mind.has_antag_datum(/datum/antagonist/rev/head)) antag_list += "Head Rev" if(M.mind.has_antag_datum(/datum/antagonist/rev, FALSE)) antag_list += "Revolutionary" if(IS_CULTIST(M)) antag_list += "Cultist" if(M.mind in SSticker.mode.syndicates) antag_list += "Nuclear Operative" if(iswizard(M)) antag_list += "Wizard" if(IS_CHANGELING(M)) antag_list += "Changeling" if(M.mind.has_antag_datum(/datum/antagonist/abductor)) antag_list += "Abductor" if(M.mind.has_antag_datum(/datum/antagonist/vampire)) antag_list += "Vampire" if(M.mind.has_antag_datum(/datum/antagonist/mindslave/thrall)) antag_list += "Vampire Thrall" if(M.mind.has_antag_datum(/datum/antagonist/traitor)) antag_list += "Traitor" if(IS_MINDSLAVE(M)) antag_list += "Mindslave" if(isrobot(M)) var/mob/living/silicon/robot/R = M if(R.emagged) antag_list += "Emagged Borg" if(!length(antag_list) && M.mind.special_role) // Snowflake check. If none of the above but still special, then other antag. Technically not accurate. antag_list += "Other Antag(s)" return antag_list /** * A proc that return a string containing all the singled out antags . Empty string if not antag * * Usually, you'd return a FALSE, but since this is consumed by javascript you're in * for a world of hurt if you pass a byond FALSE which get converted into a fucking string anyway and pass for TRUE in check. Fuck. * It always append "(May be other antag)" * Arguments: * * M - the mob you're checking * * */ /proc/get_antag_type_truncated_plaintext_string(mob/M as mob) var/list/antag_list = get_antag_type_strings_list(M) if(length(antag_list)) return antag_list.Join(" & ") + " " + "(May be other antag)" return "" USER_VERB(spawn_atom, R_SPAWN, "Spawn", \ "Spawn an atom. Append a period to the text in order to exclude subtypes of paths matching the input.", \ VERB_CATEGORY_DEBUG, object as text) if(!object) return var/list/types = typesof(/atom) var/list/matches = list() var/include_subtypes = TRUE if(copytext(object, -1) == ".") include_subtypes = FALSE object = copytext(object, 1, -1) if(include_subtypes) for(var/path in types) if(findtext("[path]", object)) matches += path else var/needle_length = length(object) for(var/path in types) if(copytext("[path]", -needle_length) == object) matches += path if(length(matches)==0) return var/chosen if(length(matches)==1) chosen = matches[1] else chosen = tgui_input_list(client, "Select an Atom Type", "Spawn Atom", matches) if(!chosen) return if(ispath(chosen,/turf)) var/turf/T = get_turf(client.mob.loc) T.ChangeTurf(chosen) else var/atom/A = new chosen(client.mob.loc) A.admin_spawned = TRUE log_admin("[key_name(client)] spawned [chosen] at ([client.mob.x],[client.mob.y],[client.mob.z])") SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB_VISIBILITY(show_traitor_panel, VERB_VISIBILITY_FLAG_MOREDEBUG) USER_VERB(show_traitor_panel, R_ADMIN|R_MOD, "Show Traitor Panel", "Edit mob's memory and role", VERB_CATEGORY_ADMIN, mob/M in GLOB.mob_list) if(!istype(M)) to_chat(client, "This can only be used on instances of type /mob") return if(!M.mind) to_chat(client, "This mob has no mind!") return M.mind.edit_memory() SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Traitor Panel") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! USER_VERB(toggle_guests, R_SERVER, "Toggle Guests", "Guests can't enter", VERB_CATEGORY_SERVER) if(!client.is_connecting_from_localhost()) if(tgui_alert(client, "Are you sure about this?", "Confirm", list("Yes", "No")) != "Yes") return GLOB.configuration.general.guest_ban = !(GLOB.configuration.general.guest_ban) if(GLOB.configuration.general.guest_ban) to_chat(world, "Guests may no longer enter the game.") else to_chat(world, "Guests may now enter the game.") log_admin("[key_name(client)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed.") message_admins(SPAN_NOTICE("[key_name_admin(client)] toggled guests game entering [GLOB.configuration?.general.guest_ban ? "dis" : ""]allowed."), 1) SSblackbox.record_feedback("tally", "admin_verb", 1, "Toggle Guests") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/output_ai_laws() var/ai_number = 0 var/list/messages = list() for(var/mob/living/silicon/S in GLOB.mob_list) if(istype(S, /mob/living/silicon/decoy) && !S.client) continue ai_number++ if(is_ai(S)) messages += "AI [key_name(S, TRUE)]'s laws:" else if(isrobot(S)) var/mob/living/silicon/robot/R = S messages += "CYBORG [key_name(S, TRUE)]'s [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independent)"] laws:" else if(ispAI(S)) var/mob/living/silicon/pai/P = S messages += "pAI [key_name(S, TRUE)]'s laws:" messages += "[P.pai_law0]" if(P.pai_laws) messages += "[P.pai_laws]" continue // Skip showing normal silicon laws for pAIs - they don't have any else messages += "SILICON [key_name(S, TRUE)]'s laws:" if(S.laws == null) messages += "[key_name(S, TRUE)]'s laws are null. Contact a coder." else messages += S.laws.return_laws_text() if(!ai_number) messages += "No AI's located." //Just so you know the thing is actually working and not just ignoring you. to_chat(usr, chat_box_examine(messages.Join("