//////////////////////////////// /proc/message_admins(msg) msg = "ADMIN LOG: [msg]" to_chat(GLOB.admins, type = MESSAGE_TYPE_ADMINLOG, html = msg, confidential = TRUE) /proc/relay_msg_admins(msg) msg = "RELAY: [msg]" to_chat(GLOB.admins, type = MESSAGE_TYPE_ADMINLOG, html = msg, confidential = TRUE) ///////////////////////////////////////////////////////////////////////////////////////////////Panels /datum/admins/proc/Game() if(!check_rights(0)) return var/dat = "
Game Panel

" if(SSticker.current_state <= GAME_STATE_PREGAME) dat += "(Force Roundstart Rulesets)
" if (GLOB.dynamic_forced_roundstart_ruleset.len > 0) for(var/datum/dynamic_ruleset/roundstart/rule in GLOB.dynamic_forced_roundstart_ruleset) dat += {"-> [rule.name] <-
"} dat += "(Clear Rulesets)
" dat += "(Dynamic mode options)
" dat += "
" if(SSticker.IsRoundInProgress()) dat += "(Game Mode Panel)
" dat += {"
Create Object
Quick Create Object
Create Turf
Create Mob
"} if(marked_datum && istype(marked_datum, /atom)) dat += "Duplicate Marked Datum
" usr << browse(dat, "window=admin2;size=240x280") return ////////////////////////////////////////////////////////////////////////////////////////////////ADMIN HELPER PROCS /datum/admins/proc/spawn_atom(object as text) set category = "Debug" set desc = "(atom path) Spawn an atom" set name = "Spawn" if(!check_rights(R_SPAWN) || !object) return var/list/preparsed = splittext(object,":") var/path = preparsed[1] var/amount = 1 if(preparsed.len > 1) amount = clamp(text2num(preparsed[2]),1,ADMIN_SPAWN_CAP) var/chosen = pick_closest_path(path) if(!chosen) return var/turf/T = get_turf(usr) if(ispath(chosen, /turf)) T.ChangeTurf(chosen) else for(var/i in 1 to amount) var/atom/A = new chosen(T) A.flags_1 |= ADMIN_SPAWNED_1 log_admin("[key_name(usr)] spawned [amount] x [chosen] at [AREACOORD(usr)]") 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! /datum/admins/proc/podspawn_atom(object as text) set category = "Debug" set desc = "(atom path) Spawn an atom via supply drop" set name = "Podspawn" if(!check_rights(R_SPAWN)) return var/chosen = pick_closest_path(object) if(!chosen) return var/turf/target_turf = get_turf(usr) if(ispath(chosen, /turf)) target_turf.ChangeTurf(chosen) else var/obj/structure/closet/supplypod/pod = podspawn(list( "target" = target_turf, "path" = /obj/structure/closet/supplypod/centcompod, )) //we need to set the admin spawn flag for the spawned items so we do it outside of the podspawn proc var/atom/A = new chosen(pod) A.flags_1 |= ADMIN_SPAWNED_1 log_admin("[key_name(usr)] pod-spawned [chosen] at [AREACOORD(usr)]") SSblackbox.record_feedback("tally", "admin_verb", 1, "Podspawn Atom") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/spawn_cargo(object as text) set category = "Debug" set desc = "(atom path) Spawn a cargo crate" set name = "Spawn Cargo" if(!check_rights(R_SPAWN)) return var/chosen = pick_closest_path(object, make_types_fancy(subtypesof(/datum/supply_pack))) if(!chosen) return var/datum/supply_pack/S = new chosen S.admin_spawned = TRUE S.generate(get_turf(usr)) log_admin("[key_name(usr)] spawned cargo pack [chosen] at [AREACOORD(usr)]") SSblackbox.record_feedback("tally", "admin_verb", 1, "Spawn Cargo") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /datum/admins/proc/toggletintedweldhelmets() set category = "Debug" set desc="Reduces view range when wearing welding helmets" set name="Toggle tinted welding helmes" GLOB.tinted_weldhelh = !( GLOB.tinted_weldhelh ) if (GLOB.tinted_weldhelh) to_chat(world, "The tinted_weldhelh has been enabled!", confidential = TRUE) else to_chat(world, "The tinted_weldhelh has been disabled!", confidential = TRUE) log_admin("[key_name(usr)] toggled tinted_weldhelh.") message_admins("[key_name_admin(usr)] toggled tinted_weldhelh.") SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Tinted Welding Helmets", "[GLOB.tinted_weldhelh ? "Enabled" : "Disabled"]")) //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 for(var/i in GLOB.silicon_mobs) var/mob/living/silicon/S = i ai_number++ if(isAI(S)) to_chat(usr, "AI [key_name(S, usr)]'s laws:", confidential = TRUE) else if(iscyborg(S)) var/mob/living/silicon/robot/R = S to_chat(usr, "CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [key_name(R.connected_ai)])":"(Independent)"]: laws:", confidential = TRUE) else if (ispAI(S)) to_chat(usr, "pAI [key_name(S, usr)]'s laws:", confidential = TRUE) else to_chat(usr, "SOMETHING SILICON [key_name(S, usr)]'s laws:", confidential = TRUE) if (S.laws == null) to_chat(usr, "[key_name(S, usr)]'s laws are null?? Contact a coder.", confidential = TRUE) else S.laws.show_laws(usr) if(!ai_number) to_chat(usr, "No AIs located" , confidential = TRUE) /datum/admins/proc/dynamic_mode_options(mob/user) var/dat = {"

Dynamic Mode Options



Common options

All these options can be changed midround.

Force extended: - Option is [GLOB.dynamic_forced_extended ? "ON" : "OFF"].
This will force the round to be extended. No rulesets will be drafted.

No stacking: - Option is [GLOB.dynamic_no_stacking ? "ON" : "OFF"].
Unless the threat goes above [GLOB.dynamic_stacking_limit], only one "round-ender" ruleset will be drafted.

Forced threat level: Current value : [GLOB.dynamic_forced_threat_level].
The value threat is set to if it is higher than -1.


Stacking threeshold: Current value : [GLOB.dynamic_stacking_limit].
The threshold at which "round-ender" rulesets will stack. A value higher than 100 ensure this never happens.
"} user << browse(dat, "window=dyn_mode_options;size=900x650") /datum/admins/proc/create_or_modify_area() set category = "Debug" set name = "Create or modify area" create_area(usr) //Kicks all the clients currently in the lobby. The second parameter (kick_only_afk) determins if an is_afk() check is ran, or if all clients are kicked //defaults to kicking everyone (afk + non afk clients in the lobby) //returns a list of ckeys of the kicked clients /proc/kick_clients_in_lobby(message, kick_only_afk = 0) var/list/kicked_client_names = list() for(var/client/C in GLOB.clients) if(isnewplayer(C.mob)) if(kick_only_afk && !C.is_afk()) //Ignore clients who are not afk continue if(message) to_chat(C, message, confidential = TRUE) kicked_client_names.Add("[C.key]") qdel(C) return kicked_client_names //returns TRUE to let the dragdrop code know we are trapping this event //returns FALSE if we don't plan to trap the event /datum/admins/proc/cmd_ghost_drag(mob/dead/observer/frommob, mob/tomob) //this is the exact two check rights checks required to edit a ckey with vv. if (!check_rights(R_VAREDIT,0) || !check_rights(R_SPAWN|R_DEBUG,0)) return FALSE if (!frommob.ckey) return FALSE var/question = "" if (tomob.ckey) question = "This mob already has a user ([tomob.key]) in control of it! " question += "Are you sure you want to place [frommob.name]([frommob.key]) in control of [tomob.name]?" var/ask = tgui_alert(usr, question, "Place ghost in control of mob?", list("Yes", "No")) if (ask != "Yes") return TRUE if (!frommob || !tomob) //make sure the mobs don't go away while we waited for a response return TRUE // Disassociates observer mind from the body mind if(tomob.client) tomob.ghostize(FALSE) else for(var/mob/dead/observer/ghost in GLOB.dead_mob_list) if(tomob.mind == ghost.mind) ghost.mind = null message_admins(span_adminnotice("[key_name_admin(usr)] has put [frommob.key] in control of [tomob.name].")) log_admin("[key_name(usr)] stuffed [frommob.key] into [tomob.name].") SSblackbox.record_feedback("tally", "admin_verb", 1, "Ghost Drag Control") tomob.ckey = frommob.ckey tomob.client?.init_verbs() qdel(frommob) return TRUE /client/proc/adminGreet(logout) if(SSticker.HasRoundStarted()) var/string if(logout && CONFIG_GET(flag/announce_admin_logout)) string = pick( "Admin logout: [key_name(src)]") else if(!logout && CONFIG_GET(flag/announce_admin_login) && (prefs.toggles & ANNOUNCE_LOGIN)) string = pick( "Admin login: [key_name(src)]") if(string) message_admins("[string]")