modules: A to C
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#define MAX_ADMIN_BANS_PER_ADMIN 1
|
||||
#define MAX_ADMIN_BANS_PER_HEADMIN 3
|
||||
|
||||
//Either pass the mob you wish to ban in the 'banned_mob' attribute, or the banckey, banip and bancid variables. If both are passed, the mob takes priority! If a mob is not passed, banckey is the minimum that needs to be passed! banip and bancid are optional.
|
||||
/datum/admins/proc/DB_ban_record(bantype, mob/banned_mob, duration = -1, reason, job = "", banckey = null, banip = null, bancid = null)
|
||||
@@ -118,8 +119,11 @@
|
||||
return
|
||||
if(query_check_adminban_amt.NextRow())
|
||||
var/adm_bans = text2num(query_check_adminban_amt.item[1])
|
||||
if(adm_bans >= MAX_ADMIN_BANS_PER_ADMIN)
|
||||
to_chat(usr, "<span class='danger'>You already logged [MAX_ADMIN_BANS_PER_ADMIN] admin ban(s) or more. Do not abuse this function!</span>")
|
||||
var/max_bans = MAX_ADMIN_BANS_PER_ADMIN
|
||||
if (check_rights(R_PERMISSIONS, FALSE))
|
||||
max_bans = MAX_ADMIN_BANS_PER_HEADMIN
|
||||
if(adm_bans >= max_bans)
|
||||
to_chat(usr, "<span class='danger'>You already logged [max_bans] admin ban(s) or more. Do not abuse this function!</span>")
|
||||
return
|
||||
if(!computerid)
|
||||
computerid = "0"
|
||||
|
||||
@@ -508,8 +508,7 @@
|
||||
toggle_ooc()
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled OOC.")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed]"))
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle OOC", "[GLOB.ooc_allowed ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleoocdead()
|
||||
set category = "Server"
|
||||
@@ -519,7 +518,7 @@
|
||||
|
||||
log_admin("[key_name(usr)] toggled OOC.")
|
||||
message_admins("[key_name_admin(usr)] toggled Dead OOC.")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Dead OOC", "[GLOB.dooc_allowed]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Dead OOC", "[GLOB.dooc_allowed ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/startnow()
|
||||
set category = "Server"
|
||||
@@ -553,7 +552,7 @@
|
||||
log_admin("[key_name(usr)] toggled new player game entering.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled new player game entering.</span>")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Entering", "[GLOB.enter_allowed]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Entering", "[GLOB.enter_allowed ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleAI()
|
||||
set category = "Server"
|
||||
@@ -567,7 +566,7 @@
|
||||
to_chat(world, "<B>The AI job is chooseable now.</B>")
|
||||
log_admin("[key_name(usr)] toggled AI allowed.")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle AI", "[!alai]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle AI", "[!alai ? "Disabled" : "Enabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/toggleaban()
|
||||
set category = "Server"
|
||||
@@ -582,7 +581,7 @@
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled respawn to [!new_nores ? "On" : "Off"].</span>")
|
||||
log_admin("[key_name(usr)] toggled respawn to [!new_nores ? "On" : "Off"].")
|
||||
world.update_status()
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Respawn", "[!new_nores]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Respawn", "[!new_nores ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/datum/admins/proc/delay()
|
||||
set category = "Server"
|
||||
@@ -665,7 +664,7 @@
|
||||
to_chat(world, "<B>The tinted_weldhelh has been disabled!</B>")
|
||||
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]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
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/toggleguests()
|
||||
set category = "Server"
|
||||
@@ -679,7 +678,7 @@
|
||||
to_chat(world, "<B>Guests may now enter the game.</B>")
|
||||
log_admin("[key_name(usr)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed.")
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] toggled guests game entering [!new_guest_ban ? "" : "dis"]allowed.</span>")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Guests", "[!new_guest_ban]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Guests", "[!new_guest_ban ? "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
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
/datum/admins/proc/create_mob(mob/user)
|
||||
var/static/create_mob_html
|
||||
if (!create_mob_html)
|
||||
@@ -23,4 +24,4 @@
|
||||
H.dna.blood_type = random_blood_type()
|
||||
H.update_body()
|
||||
H.update_hair()
|
||||
H.update_body_parts()
|
||||
H.update_body_parts()
|
||||
@@ -173,4 +173,4 @@ you will have to do something like if(client.rights & R_ADMIN) yourself.
|
||||
return "admin_token=[RawHrefToken(forceGlobal)]"
|
||||
|
||||
/proc/HrefTokenFormField(forceGlobal = FALSE)
|
||||
return "<input type='hidden' name='admin_token' value='[RawHrefToken(forceGlobal)]'>"
|
||||
return "<input type='hidden' name='admin_token' value='[RawHrefToken(forceGlobal)]'>"
|
||||
@@ -612,6 +612,20 @@
|
||||
dat += "</table>"
|
||||
|
||||
|
||||
var/list/pirates = get_antagonists(/datum/antagonist/pirate)
|
||||
if(pirates.len > 0)
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Pirates</B></td><td></td></tr>"
|
||||
for(var/datum/mind/N in pirates)
|
||||
var/mob/M = N.current
|
||||
if(!M)
|
||||
dat += "<tr><td><a href='?_src_=vars;[HrefToken()];Vars=\ref[N]'>[N.name]([N.key])</a><i>No body.</i></td>"
|
||||
dat += "<td><A href='?priv_msg=[N.key]'>PM</A></td></tr>"
|
||||
else
|
||||
dat += "<tr><td><a href='?_src_=holder;[HrefToken()];adminplayeropts=\ref[M]'>[M.real_name]</a>[M.client ? "" : " <i>(No Client)</i>"][M.stat == DEAD ? " <b><font color=red>(DEAD)</font></b>" : ""]</td>"
|
||||
dat += "<td><A href='?priv_msg=[M.ckey]'>PM</A></td>"
|
||||
dat += "<td><A href='?_src_=holder;[HrefToken()];adminplayerobservefollow=\ref[M]'>FLW</a></td></tr>"
|
||||
dat += "</table>"
|
||||
|
||||
if(istype(SSticker.mode, /datum/game_mode/monkey))
|
||||
var/datum/game_mode/monkey/mode = SSticker.mode
|
||||
dat += "<br><table cellspacing=5><tr><td><B>Monkey</B></td><td></td><td></td></tr>"
|
||||
|
||||
@@ -43,6 +43,8 @@
|
||||
|
||||
if(check_rights(R_FUN,0))
|
||||
dat += {"
|
||||
<B>Fun Secrets</B><BR>
|
||||
<BR>
|
||||
<A href='?src=[REF(src)];[HrefToken()];secrets=virus'>Trigger a Virus Outbreak</A><BR>
|
||||
<A href='?src=[REF(src)];[HrefToken()];secrets=monkey'>Turn all humans into monkeys</A><BR>
|
||||
<A href='?src=[REF(src)];[HrefToken()];secrets=anime'>Chinese Cartoons</A><BR>
|
||||
@@ -194,7 +196,7 @@
|
||||
if("moveminingshuttle")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Mining Shuttle")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Send Mining Shuttle"))
|
||||
if(!SSshuttle.toggleShuttle("mining","mining_home","mining_away"))
|
||||
message_admins("[key_name_admin(usr)] moved mining shuttle")
|
||||
log_admin("[key_name(usr)] moved the mining shuttle")
|
||||
@@ -202,7 +204,7 @@
|
||||
if("movelaborshuttle")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Labor Shuttle")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Send Labor Shuttle"))
|
||||
if(!SSshuttle.toggleShuttle("laborcamp","laborcamp_home","laborcamp_away"))
|
||||
message_admins("[key_name_admin(usr)] moved labor shuttle")
|
||||
log_admin("[key_name(usr)] moved the labor shuttle")
|
||||
@@ -210,7 +212,7 @@
|
||||
if("moveferry")
|
||||
if(!check_rights(R_ADMIN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send CentCom Ferry")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Send CentCom Ferry"))
|
||||
if(!SSshuttle.toggleShuttle("ferry","ferry_home","ferry_away"))
|
||||
message_admins("[key_name_admin(usr)] moved the CentCom ferry")
|
||||
log_admin("[key_name(usr)] moved the CentCom ferry")
|
||||
@@ -222,7 +224,7 @@
|
||||
if(A)
|
||||
var/new_perma = !A.perma_docked
|
||||
A.perma_docked = new_perma
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Permadock Arrivals Shuttle", "[new_perma]"))
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Permadock Arrivals Shuttle", "[new_perma ? "Enabled" : "Disabled"]"))
|
||||
message_admins("[key_name_admin(usr)] [new_perma ? "stopped" : "started"] the arrivals shuttle")
|
||||
log_admin("[key_name(usr)] [new_perma ? "stopped" : "started"] the arrivals shuttle")
|
||||
else
|
||||
@@ -272,7 +274,7 @@
|
||||
if("monkey")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Monkeyize All Humans")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Monkeyize All Humans"))
|
||||
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
|
||||
spawn(0)
|
||||
H.monkeyize()
|
||||
@@ -283,7 +285,7 @@
|
||||
return
|
||||
var/result = input(usr, "Please choose a new species","Species") as null|anything in GLOB.species_list
|
||||
if(result)
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Mass Species Change([result])")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Species Change", "[result]"))
|
||||
log_admin("[key_name(usr)] turned all humans into [result]", 1)
|
||||
message_admins("\blue [key_name_admin(usr)] turned all humans into [result]")
|
||||
var/newtype = GLOB.species_list[result]
|
||||
@@ -294,12 +296,12 @@
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
usr.client.triple_ai()
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Triple AI")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Triple AI"))
|
||||
|
||||
if("power")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Power All APCs")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Power All APCs"))
|
||||
log_admin("[key_name(usr)] made all areas powered", 1)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all areas powered</span>")
|
||||
power_restore()
|
||||
@@ -307,7 +309,7 @@
|
||||
if("unpower")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Depower All APCs")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Depower All APCs"))
|
||||
log_admin("[key_name(usr)] made all areas unpowered", 1)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all areas unpowered</span>")
|
||||
power_failure()
|
||||
@@ -315,7 +317,7 @@
|
||||
if("quickpower")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Power All SMESs")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Power All SMESs"))
|
||||
log_admin("[key_name(usr)] made all SMESs powered", 1)
|
||||
message_admins("<span class='adminnotice'>[key_name_admin(usr)] made all SMESs powered</span>")
|
||||
power_restore_quick()
|
||||
@@ -329,7 +331,7 @@
|
||||
var/objective = copytext(sanitize(input("Enter an objective")),1,MAX_MESSAGE_LEN)
|
||||
if(!objective)
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Traitor All ([objective])")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Traitor All", "[objective]"))
|
||||
for(var/mob/living/H in GLOB.player_list)
|
||||
if(!(ishuman(H)||istype(H, /mob/living/silicon/)))
|
||||
continue
|
||||
@@ -350,7 +352,7 @@
|
||||
if("changebombcap")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Bomb Cap")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Bomb Cap"))
|
||||
|
||||
var/newBombCap = input(usr,"What would you like the new bomb cap to be. (entered as the light damage range (the 3rd number in common (1,2,3) notation)) Must be above 4)", "New Bomb Cap", GLOB.MAX_EX_LIGHT_RANGE) as num|null
|
||||
if (!CONFIG_SET(number/bombcap, newBombCap))
|
||||
@@ -362,7 +364,7 @@
|
||||
if("blackout")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Break All Lights")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Break All Lights"))
|
||||
message_admins("[key_name_admin(usr)] broke all lights")
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.break_light_tube()
|
||||
@@ -378,7 +380,7 @@
|
||||
|
||||
if(animetype == "Cancel" || droptype == "Cancel")
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Chinese Cartoons")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Chinese Cartoons"))
|
||||
message_admins("[key_name_admin(usr)] made everything kawaii.")
|
||||
for(var/mob/living/carbon/human/H in GLOB.carbon_list)
|
||||
SEND_SOUND(H, sound('sound/ai/animes.ogg'))
|
||||
@@ -408,7 +410,7 @@
|
||||
if("whiteout")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Fix All Lights")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Fix All Lights"))
|
||||
message_admins("[key_name_admin(usr)] fixed all lights")
|
||||
for(var/obj/machinery/light/L in GLOB.machines)
|
||||
L.fix()
|
||||
@@ -419,7 +421,7 @@
|
||||
if("virus")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Virus Outbreak")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Virus Outbreak"))
|
||||
switch(alert("Do you want this to be a random disease or do you have something in mind?",,"Make Your Own","Random","Choose"))
|
||||
if("Make Your Own")
|
||||
AdminCreateVirus(usr.client)
|
||||
@@ -434,7 +436,7 @@
|
||||
if("retardify")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Mass Braindamage")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Mass Braindamage"))
|
||||
for(var/mob/living/carbon/human/H in GLOB.player_list)
|
||||
to_chat(H, "<span class='boldannounce'>You suddenly feel stupid.</span>")
|
||||
H.adjustBrainLoss(60, 80)
|
||||
@@ -443,24 +445,17 @@
|
||||
if("eagles")//SCRAW
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Egalitarian Station")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Egalitarian Station"))
|
||||
for(var/obj/machinery/door/airlock/W in GLOB.machines)
|
||||
if(is_station_level(W.z) && !istype(get_area(W), /area/bridge) && !istype(get_area(W), /area/crew_quarters) && !istype(get_area(W), /area/security/prison))
|
||||
W.req_access = list()
|
||||
message_admins("[key_name_admin(usr)] activated Egalitarian Station mode")
|
||||
priority_announce("CentCom airlock control override activated. Please take this time to get acquainted with your coworkers.", null, 'sound/ai/commandreport.ogg')
|
||||
|
||||
if("ak47s")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
message_admins("[key_name_admin(usr)] activated AK-47s for Everyone!")
|
||||
usr.client.ak47s()
|
||||
sound_to_playing_players('sound/misc/ak47s.ogg')
|
||||
|
||||
if("guns")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Summon Guns")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Guns"))
|
||||
var/survivor_probability = 0
|
||||
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
|
||||
if("Some Antags")
|
||||
@@ -473,7 +468,7 @@
|
||||
if("magic")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Summon Magic")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Magic"))
|
||||
var/survivor_probability = 0
|
||||
switch(alert("Do you want this to create survivors antagonists?",,"No Antags","Some Antags","All Antags!"))
|
||||
if("Some Antags")
|
||||
@@ -489,22 +484,22 @@
|
||||
if(!SSevents.wizardmode)
|
||||
if(alert("Do you want to toggle summon events on?",,"Yes","No") == "Yes")
|
||||
summonevents()
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Activate Summon Events")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Activate"))
|
||||
|
||||
else
|
||||
switch(alert("What would you like to do?",,"Intensify Summon Events","Turn Off Summon Events","Nothing"))
|
||||
if("Intensify Summon Events")
|
||||
summonevents()
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Intensify Summon Events")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Intensify"))
|
||||
if("Turn Off Summon Events")
|
||||
SSevents.toggleWizardmode()
|
||||
SSevents.resetFrequency()
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Disable Summon Events")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Summon Events", "Disable"))
|
||||
|
||||
if("dorf")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Dwarf Beards")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("Dwarf Beards"))
|
||||
for(var/mob/living/carbon/human/B in GLOB.carbon_list)
|
||||
B.facial_hair_style = "Dward Beard"
|
||||
B.update_hair()
|
||||
@@ -513,14 +508,14 @@
|
||||
if("onlyone")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "There Can Be Only One")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("There Can Be Only One"))
|
||||
usr.client.only_one()
|
||||
sound_to_playing_players('sound/misc/highlander.ogg')
|
||||
|
||||
if("delayed_onlyone")
|
||||
if(!check_rights(R_FUN))
|
||||
return
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "There Can Be Only One")
|
||||
SSblackbox.record_feedback("nested tally", "admin_secrets_fun_used", 1, list("There Can Be Only One"))
|
||||
usr.client.only_one_delayed()
|
||||
sound_to_playing_players('sound/misc/highlander_delayed.ogg')
|
||||
|
||||
|
||||
@@ -31,3 +31,5 @@
|
||||
fdel(F)
|
||||
WRITE_FILE(F, text)
|
||||
to_chat(world, "Completely successfully and written to [F]")
|
||||
|
||||
|
||||
|
||||
@@ -114,8 +114,8 @@
|
||||
/proc/_range(Dist, Center = usr)
|
||||
return range(Dist, Center)
|
||||
|
||||
/proc/_regex(pattern, flags_1)
|
||||
return regex(pattern, flags_1)
|
||||
/proc/_regex(pattern, flags)
|
||||
return regex(pattern, flags)
|
||||
|
||||
/proc/_REGEX_QUOTE(text)
|
||||
return REGEX_QUOTE(text)
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
|
||||
var/datum/cinematic/choice = input(src,"Cinematic","Choose",null) as anything in subtypesof(/datum/cinematic)
|
||||
if(choice)
|
||||
Cinematic(initial(choice.id),world,null)
|
||||
Cinematic(initial(choice.id),world,null)
|
||||
@@ -107,6 +107,8 @@ GLOBAL_VAR(LastAdminCalledTarget)
|
||||
GLOBAL_PROTECT(LastAdminCalledTarget)
|
||||
GLOBAL_VAR(LastAdminCalledProc)
|
||||
GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
GLOBAL_LIST_EMPTY(AdminProcCallSpamPrevention)
|
||||
GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
|
||||
/proc/WrapAdminProcCall(target, procname, list/arguments)
|
||||
var/current_caller = GLOB.AdminProcCaller
|
||||
@@ -114,9 +116,14 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
if(!ckey)
|
||||
CRASH("WrapAdminProcCall with no ckey: [target] [procname] [english_list(arguments)]")
|
||||
if(current_caller && current_caller != ckey)
|
||||
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
|
||||
UNTIL(!GLOB.AdminProcCaller)
|
||||
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
|
||||
if(!GLOB.AdminProcCallSpamPrevention[ckey])
|
||||
to_chat(usr, "<span class='adminnotice'>Another set of admin called procs are still running, your proc will be run after theirs finish.</span>")
|
||||
GLOB.AdminProcCallSpamPrevention[ckey] = TRUE
|
||||
UNTIL(!GLOB.AdminProcCaller)
|
||||
to_chat(usr, "<span class='adminnotice'>Running your proc</span>")
|
||||
GLOB.AdminProcCallSpamPrevention -= ckey
|
||||
else
|
||||
UNTIL(!GLOB.AdminProcCaller)
|
||||
GLOB.LastAdminCalledProc = procname
|
||||
if(target != GLOBAL_PROC)
|
||||
GLOB.LastAdminCalledTargetRef = "[REF(target)]"
|
||||
@@ -802,7 +809,7 @@ GLOBAL_PROTECT(LastAdminCalledProc)
|
||||
set category = "Debug"
|
||||
set name = "Display overlay Log"
|
||||
set desc = "Display SSoverlays log of everything that's passed through it."
|
||||
|
||||
|
||||
render_stats(SSoverlays.stats, src)
|
||||
|
||||
/client/proc/cmd_display_init_log()
|
||||
|
||||
@@ -53,17 +53,6 @@
|
||||
set category = "Debug"
|
||||
set name = "Radio report"
|
||||
|
||||
var/filters = list(
|
||||
"1" = "GLOB.RADIO_TO_AIRALARM",
|
||||
"2" = "GLOB.RADIO_FROM_AIRALARM",
|
||||
"3" = "GLOB.RADIO_CHAT",
|
||||
"4" = "GLOB.RADIO_ATMOSIA",
|
||||
"5" = "GLOB.RADIO_NAVBEACONS",
|
||||
"6" = "GLOB.RADIO_AIRLOCK",
|
||||
"7" = "RADIO_SECBOT",
|
||||
"8" = "RADIO_MULEBOT",
|
||||
"_default" = "NO_FILTER"
|
||||
)
|
||||
var/output = "<b>Radio Report</b><hr>"
|
||||
for (var/fq in SSradio.frequencies)
|
||||
output += "<b>Freq: [fq]</b><br>"
|
||||
@@ -74,9 +63,9 @@
|
||||
for (var/filter in fqs.devices)
|
||||
var/list/f = fqs.devices[filter]
|
||||
if (!f)
|
||||
output += " [filters[filter]]: ERROR<br>"
|
||||
output += " [filter]: ERROR<br>"
|
||||
continue
|
||||
output += " [filters[filter]]: [f.len]<br>"
|
||||
output += " [filter]: [f.len]<br>"
|
||||
for (var/device in f)
|
||||
if (istype(device, /atom))
|
||||
var/atom/A = device
|
||||
|
||||
@@ -39,13 +39,13 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list(
|
||||
/client/proc/cmd_admin_rejuvenate,
|
||||
/datum/admins/proc/show_traitor_panel,
|
||||
/client/proc/disable_communication,
|
||||
/client/proc/print_pointers,
|
||||
/client/proc/cmd_show_at_list,
|
||||
/client/proc/cmd_show_at_markers,
|
||||
/client/proc/manipulate_organs,
|
||||
/client/proc/start_line_profiling,
|
||||
/client/proc/stop_line_profiling,
|
||||
/client/proc/show_line_profiling
|
||||
/client/proc/show_line_profiling,
|
||||
/client/proc/create_mapping_job_icons
|
||||
))
|
||||
|
||||
/obj/effect/debugging/mapfix_marker
|
||||
@@ -265,3 +265,31 @@ GLOBAL_VAR_INIT(say_disabled, FALSE)
|
||||
message_admins("[src.ckey] used 'Disable all communication verbs', killing all communication methods.")
|
||||
else
|
||||
message_admins("[src.ckey] used 'Disable all communication verbs', restoring all communication methods.")
|
||||
|
||||
//This generates the icon states for job starting location landmarks.
|
||||
/client/proc/create_mapping_job_icons()
|
||||
set name = "Generate job landmarks icons"
|
||||
set category = "Mapping"
|
||||
var/icon/final = icon()
|
||||
var/mob/living/carbon/human/dummy/D = new(locate(1,1,1)) //spawn on 1,1,1 so we don't have runtimes when items are deleted
|
||||
D.setDir(SOUTH)
|
||||
for(var/job in subtypesof(/datum/job))
|
||||
var/datum/job/JB = new job
|
||||
switch(JB.title)
|
||||
if("AI")
|
||||
final.Insert(icon('icons/mob/ai.dmi', "ai", SOUTH, 1), "AI")
|
||||
if("Cyborg")
|
||||
final.Insert(icon('icons/mob/robots.dmi', "robot", SOUTH, 1), "Cyborg")
|
||||
else
|
||||
for(var/obj/item/I in D)
|
||||
qdel(I)
|
||||
randomize_human(D)
|
||||
JB.equip(D, TRUE, FALSE)
|
||||
COMPILE_OVERLAYS(D)
|
||||
var/icon/I = icon(getFlatIcon(D), frame = 1)
|
||||
final.Insert(I, JB.title)
|
||||
qdel(D)
|
||||
//Also add the x
|
||||
for(var/x_number in 1 to 4)
|
||||
final.Insert(icon('icons/mob/screen_gen.dmi', "x[x_number == 1 ? "" : x_number]"), "x[x_number == 1 ? "" : x_number]")
|
||||
fcopy(final, "icons/mob/landmarks.dmi")
|
||||
@@ -64,14 +64,14 @@
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
if(dir < 0 && dir < 16)
|
||||
if(dir & 1)
|
||||
if(var_value > 0 && var_value < 16)
|
||||
if(var_value & 1)
|
||||
dir_text += "NORTH"
|
||||
if(dir & 2)
|
||||
if(var_value & 2)
|
||||
dir_text += "SOUTH"
|
||||
if(dir & 4)
|
||||
if(var_value & 4)
|
||||
dir_text += "EAST"
|
||||
if(dir & 8)
|
||||
if(var_value & 8)
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
|
||||
@@ -448,11 +448,11 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
if(tdir > 0 && tdir < 16)
|
||||
if(tdir & 1)
|
||||
dir_text += "NORTH"
|
||||
if(dir & 2)
|
||||
if(tdir & 2)
|
||||
dir_text += "SOUTH"
|
||||
if(dir & 4)
|
||||
if(tdir & 4)
|
||||
dir_text += "EAST"
|
||||
if(dir & 8)
|
||||
if(tdir & 8)
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
@@ -567,14 +567,14 @@ GLOBAL_PROTECT(VVpixelmovement)
|
||||
|
||||
if(default == VV_NUM)
|
||||
var/dir_text = ""
|
||||
if(dir < 0 && dir < 16)
|
||||
if(dir & 1)
|
||||
if(var_value > 0 && var_value < 16)
|
||||
if(var_value & 1)
|
||||
dir_text += "NORTH"
|
||||
if(dir & 2)
|
||||
if(var_value & 2)
|
||||
dir_text += "SOUTH"
|
||||
if(dir & 4)
|
||||
if(var_value & 4)
|
||||
dir_text += "EAST"
|
||||
if(dir & 8)
|
||||
if(var_value & 8)
|
||||
dir_text += "WEST"
|
||||
|
||||
if(dir_text)
|
||||
|
||||
@@ -12,5 +12,4 @@
|
||||
message_admins("[key_name_admin(usr)] has toggled the Panic Bunker, it is now [new_pb ? "enabled" : "disabled"].")
|
||||
if (new_pb && !SSdbcore.Connect())
|
||||
message_admins("The Database is not connected! Panic bunker will not work until the connection is reestablished.")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Panic Bunker", "[new_pb]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Panic Bunker", "[new_pb ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
@@ -80,18 +80,37 @@
|
||||
to_chat(src, "<span class='warning'>For youtube-dl shortcuts like ytsearch: please use the appropriate full url from the website.</span>")
|
||||
return
|
||||
var/shell_scrubbed_input = shell_url_scrub(web_sound_input)
|
||||
var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --get-url \"[shell_scrubbed_input]\"")
|
||||
var/list/output = world.shelleo("[ytdl] --format \"bestaudio\[ext=mp3]/best\[ext=mp4]\[height<=360]/bestaudio\[ext=m4a]/bestaudio\[ext=aac]\" --dump-single-json --no-playlist -- \"[shell_scrubbed_input]\"")
|
||||
var/errorlevel = output[SHELLEO_ERRORLEVEL]
|
||||
var/stdout = output[SHELLEO_STDOUT]
|
||||
var/stderr = output[SHELLEO_STDERR]
|
||||
if(!errorlevel)
|
||||
var/static/regex/content_url_regex = regex("https?://\\S+")
|
||||
if(content_url_regex.Find(stdout))
|
||||
web_sound_url = content_url_regex.match
|
||||
var/list/data
|
||||
try
|
||||
data = json_decode(stdout)
|
||||
catch(var/exception/e)
|
||||
to_chat(src, "<span class='boldwarning'>Youtube-dl JSON parsing FAILED:</span>")
|
||||
to_chat(src, "<span class='warning'>[e]: [stdout]</span>")
|
||||
return
|
||||
|
||||
if (data["url"])
|
||||
web_sound_url = data["url"]
|
||||
var/title = "[data["title"]]"
|
||||
var/webpage_url = title
|
||||
if (data["webpage_url"])
|
||||
webpage_url = "<a href=\"[data["webpage_url"]]\">[title]</a>"
|
||||
|
||||
var/res = alert(usr, "Show the title of and link to this song to the players?\n[title]",, "No", "Yes", "Cancel")
|
||||
switch(res)
|
||||
if("Yes")
|
||||
to_chat(world, "<span class='boldannounce'>An admin played: [webpage_url]</span>")
|
||||
if("Cancel")
|
||||
return
|
||||
|
||||
if(SSevents.holidays && SSevents.holidays[APRIL_FOOLS])
|
||||
pitch = pick(0.5, 0.7, 0.8, 0.85, 0.9, 0.95, 1.1, 1.2, 1.4, 1.6, 2.0, 2.5)
|
||||
to_chat(src, "You feel the Honkmother messing with your song...")
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "played_url", 1, list("[ckey]", "[web_sound_input]"))
|
||||
log_admin("[key_name(src)] played web sound: [web_sound_input]")
|
||||
message_admins("[key_name(src)] played web sound: [web_sound_input]")
|
||||
|
||||
@@ -21,25 +21,26 @@
|
||||
usr.loc = O
|
||||
usr.real_name = O.name
|
||||
usr.name = O.name
|
||||
usr.client.eye = O
|
||||
usr.reset_perspective(O)
|
||||
usr.control_object = O
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Possess Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/proc/release(obj/O in world)
|
||||
/proc/release()
|
||||
set name = "Release Obj"
|
||||
set category = "Object"
|
||||
//usr.loc = get_turf(usr)
|
||||
|
||||
if(usr.control_object && usr.name_archive) //if you have a name archived and if you are actually relassing an object
|
||||
usr.real_name = usr.name_archive
|
||||
usr.name_archive = ""
|
||||
usr.name = usr.real_name
|
||||
if(ishuman(usr))
|
||||
var/mob/living/carbon/human/H = usr
|
||||
H.name = H.get_visible_name()
|
||||
// usr.regenerate_icons() //So the name is updated properly
|
||||
|
||||
usr.loc = O.loc
|
||||
usr.client.eye = usr
|
||||
|
||||
usr.loc = get_turf(usr.control_object)
|
||||
usr.reset_perspective()
|
||||
usr.control_object = null
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Release Object") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
var/msg = "[key_name_admin(usr)] has toggled [key_name_admin(M)]'s nodamage to [(M.status_flags & GODMODE) ? "On" : "Off"]"
|
||||
message_admins(msg)
|
||||
admin_ticket_log(M, msg)
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Godmode", "[M.status_flags & GODMODE]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Godmode", "[M.status_flags & GODMODE ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/proc/cmd_admin_mute(whom, mute_type, automute = 0)
|
||||
@@ -747,7 +747,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
else
|
||||
to_chat(usr, "Random events disabled")
|
||||
message_admins("Admin [key_name_admin(usr)] has disabled random events.")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Random Events", "[new_are]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Random Events", "[new_are ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
|
||||
/client/proc/admin_change_sec_level()
|
||||
@@ -980,7 +980,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
to_chat(usr, "You toggled your admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
message_admins("[key_name_admin(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
log_admin("[key_name(usr)] toggled their admin antag HUD [adding_hud ? "ON" : "OFF"].")
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Antag HUD", "[adding_hud]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggle Antag HUD", "[adding_hud ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/has_antag_hud()
|
||||
var/datum/atom_hud/A = GLOB.huds[ANTAG_HUD_TRAITOR]
|
||||
@@ -1199,7 +1199,7 @@ GLOBAL_LIST_EMPTY(custom_outfits) //Admin created outfits
|
||||
if (GLOB.hub_visibility && !world.reachable)
|
||||
message_admins("WARNING: The server will not show up on the hub because byond is detecting that a filewall is blocking incoming connections.")
|
||||
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Hub Visibility", "[GLOB.hub_visibility]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
SSblackbox.record_feedback("nested tally", "admin_toggle", 1, list("Toggled Hub Visibility", "[GLOB.hub_visibility ? "Enabled" : "Disabled"]")) //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/smite(mob/living/carbon/human/target as mob)
|
||||
set name = "Smite"
|
||||
|
||||
Reference in New Issue
Block a user