mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Merge branch 'master' into AI_announcer_new
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
//Blocks an attempt to connect before even creating our client datum thing.
|
||||
/world/IsBanned(key, address, computer_id, type, check_ipintel = TRUE)
|
||||
/world/IsBanned(key, address, computer_id, type, check_ipintel = TRUE, check_2fa = TRUE)
|
||||
|
||||
if(!key || !address || !computer_id)
|
||||
log_adminwarn("Failed Login (invalid data): [key] [address]-[computer_id]")
|
||||
@@ -44,6 +44,49 @@
|
||||
return list("reason"="using proxy or vpn", "desc"="\nReason: Proxies/VPNs are not allowed here. [mistakemessage]")
|
||||
|
||||
|
||||
// If 2FA is enabled, makes sure they were authed within the last minute
|
||||
if(check_2fa && config._2fa_auth_host)
|
||||
// First see if they exist at all
|
||||
var/datum/db_query/check_query = SSdbcore.NewQuery("SELECT 2fa_status, ip FROM [format_table_name("player")] WHERE ckey=:ckey", list("ckey" = ckey(key)))
|
||||
|
||||
if(!check_query.warn_execute())
|
||||
message_admins("Failed to do a DB 2FA check for [key]. You have been warned.")
|
||||
qdel(check_query)
|
||||
return
|
||||
|
||||
|
||||
// If a row is returned, the player exists
|
||||
var/_2fa_enabled = FALSE
|
||||
var/always_check = FALSE
|
||||
var/last_ip
|
||||
if(check_query.NextRow())
|
||||
if(check_query.item[1] != _2FA_DISABLED)
|
||||
_2fa_enabled = TRUE
|
||||
if(check_query.item[1] == _2FA_ENABLED_ALWAYS)
|
||||
always_check = TRUE
|
||||
last_ip = check_query.item[2]
|
||||
qdel(check_query)
|
||||
|
||||
// If client has 2FA enabled, and they either:
|
||||
// Have it set to always check, or their IP is different
|
||||
if(_2fa_enabled && (always_check || (address != last_ip)))
|
||||
// They have 2FA enabled, lets make sure they have authed within the last minute
|
||||
var/datum/db_query/verify_query = SSdbcore.NewQuery("SELECT ckey FROM [format_table_name("2fa_secrets")] WHERE (last_time BETWEEN NOW() - INTERVAL 1 MINUTE AND NOW()) AND ckey=:ckey LIMIT 1", list(
|
||||
"ckey" = ckey(key)
|
||||
))
|
||||
|
||||
if(!verify_query.warn_execute())
|
||||
message_admins("Failed to do a DB 2FA check for [key]. You have been warned.")
|
||||
qdel(verify_query)
|
||||
return
|
||||
|
||||
if(!verify_query.NextRow())
|
||||
// If no row was returned, fail 2FA
|
||||
qdel(verify_query)
|
||||
return list("reason"="2fa check failed", "desc"="You have 2FA enabled but did not properly authenticate.")
|
||||
|
||||
qdel(verify_query)
|
||||
|
||||
if(config.ban_legacy_system)
|
||||
//Ban Checking
|
||||
. = CheckBan(ckey(key), computer_id, address)
|
||||
|
||||
@@ -138,7 +138,6 @@ GLOBAL_PROTECT(banlist_savefile) // Obvious reasons
|
||||
log_admin("Ban Expired: [key]")
|
||||
message_admins("Ban Expired: [key]")
|
||||
else
|
||||
ban_unban_log_save("[key_name_admin(usr)] unbanned [key]")
|
||||
log_admin("[key_name_admin(usr)] unbanned [key]")
|
||||
message_admins("[key_name_admin(usr)] unbanned: [key]")
|
||||
usr.client.holder.DB_ban_unban( ckey(key), BANTYPE_ANY_FULLBAN)
|
||||
|
||||
@@ -137,7 +137,8 @@ GLOBAL_LIST_INIT(admin_verbs_server, list(
|
||||
/client/proc/toggle_antagHUD_restrictions,
|
||||
/client/proc/set_ooc,
|
||||
/client/proc/reset_ooc,
|
||||
/client/proc/toggledrones
|
||||
/client/proc/toggledrones,
|
||||
/client/proc/set_next_map
|
||||
))
|
||||
GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/cmd_admin_list_open_jobs,
|
||||
@@ -166,7 +167,12 @@ GLOBAL_LIST_INIT(admin_verbs_debug, list(
|
||||
/client/proc/toggle_medal_disable,
|
||||
/client/proc/uid_log,
|
||||
/client/proc/visualise_active_turfs,
|
||||
/client/proc/reestablish_db_connection
|
||||
/client/proc/reestablish_db_connection,
|
||||
#ifdef REFERENCE_TRACKING
|
||||
/datum/proc/find_refs,
|
||||
/datum/proc/qdel_then_find_references,
|
||||
/datum/proc/qdel_then_if_fail_find_references,
|
||||
#endif
|
||||
))
|
||||
GLOBAL_LIST_INIT(admin_verbs_possess, list(
|
||||
/proc/possess,
|
||||
@@ -263,6 +269,8 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
verbs += GLOB.admin_verbs_proccall
|
||||
if(holder.rights & R_VIEWRUNTIMES)
|
||||
verbs += /client/proc/view_runtimes
|
||||
verbs += /client/proc/cmd_display_del_log
|
||||
verbs += /client/proc/cmd_display_del_log_simple
|
||||
spawn(1) // This setting exposes the profiler for people with R_VIEWRUNTIMES. They must still have it set in cfg/admin.txt
|
||||
control_freak = 0
|
||||
|
||||
@@ -505,7 +513,6 @@ GLOBAL_LIST_INIT(admin_verbs_ticket, list(
|
||||
return
|
||||
|
||||
if(++D.warns >= MAX_WARNS) //uh ohhhh...you'reee iiiiin trouuuubble O:)
|
||||
ban_unban_log_save("[ckey] warned [warned_ckey], resulting in a [AUTOBANTIME] minute autoban.")
|
||||
if(C)
|
||||
message_admins("[key_name_admin(src)] has warned [key_name_admin(C)] resulting in a [AUTOBANTIME] minute ban")
|
||||
log_admin("[key_name(src)] has warned [key_name(C)] resulting in a [AUTOBANTIME] minute ban")
|
||||
|
||||
@@ -118,10 +118,6 @@ GLOBAL_DATUM_INIT(jobban_regex, /regex, regex("(\[\\S]+) - (\[^#]+\[^# ])(?: ##
|
||||
/proc/jobban_unban_client(ckey, rank)
|
||||
jobban_remove("[ckey] - [rank]")
|
||||
|
||||
/proc/ban_unban_log_save(formatted_log)
|
||||
text2file(formatted_log,"data/ban_unban_log.txt")
|
||||
|
||||
|
||||
/proc/jobban_remove(X)
|
||||
for(var/i = 1; i <= length(GLOB.jobban_keylist); i++)
|
||||
if( findtext(GLOB.jobban_keylist[i], "[X]") )
|
||||
|
||||
@@ -414,6 +414,7 @@
|
||||
qdel(query_update)
|
||||
|
||||
message_admins("[key_name_admin(usr)] has lifted [pckey]'s ban.")
|
||||
log_admin("[key_name(usr)] has lifted [pckey]'s ban.")
|
||||
flag_account_for_forum_sync(pckey)
|
||||
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ proc/admin_proc()
|
||||
NOTE: it checks usr! not src! So if you're checking somebody's rank in a proc which they did not call
|
||||
you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
*/
|
||||
/proc/check_rights(rights_required, show_msg=1, mob/user = usr)
|
||||
/proc/check_rights(rights_required, show_msg = TRUE, mob/user = usr)
|
||||
if(user && user.client)
|
||||
if(rights_required)
|
||||
if(user.client.holder)
|
||||
|
||||
@@ -70,7 +70,6 @@
|
||||
<A href='?src=[UID()];secretsfun=infiltrators_syndicate'>Send SIT - Syndicate Infiltration Team</A>
|
||||
<A href='?src=[UID()];secretsfun=striketeam_syndicate'>Send in a Syndie Strike Team</A>
|
||||
<BR><A href='?src=[UID()];secretsfun=striketeam'>Send in the Deathsquad</A>
|
||||
<A href='?src=[UID()];secretsfun=honksquad'>Send in a HONKsquad</A><BR>
|
||||
<A href='?src=[UID()];secretsfun=gimmickteam'>Send in a Gimmick Team</A><BR>
|
||||
<b>Change Security Level</b><BR>
|
||||
<A href='?src=[UID()];secretsfun=securitylevel0'>Security Level - Green</A>
|
||||
|
||||
@@ -487,7 +487,6 @@
|
||||
if(!reason) return
|
||||
|
||||
log_admin("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
ban_unban_log_save("[key_name(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] edited [banned_key]'s ban. Reason: [reason] Duration: [duration]</span>", 1)
|
||||
GLOB.banlist_savefile.cd = "/base/[banfolder]"
|
||||
to_chat(GLOB.banlist_savefile["reason"], reason)
|
||||
@@ -519,7 +518,6 @@
|
||||
return */
|
||||
switch(alert("Reason: '[banreason]' Remove appearance ban?","Please Confirm","Yes","No"))
|
||||
if("Yes")
|
||||
ban_unban_log_save("[key_name(usr)] removed [key_name(M)]'s appearance ban")
|
||||
log_admin("[key_name(usr)] removed [key_name(M)]'s appearance ban")
|
||||
DB_ban_unban(M.ckey, BANTYPE_APPEARANCE)
|
||||
appearance_unban(M)
|
||||
@@ -532,7 +530,6 @@
|
||||
if(!reason)
|
||||
return
|
||||
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
|
||||
ban_unban_log_save("[key_name(usr)] appearance banned [key_name(M)]. reason: [reason]")
|
||||
log_admin("[key_name(usr)] appearance banned [key_name(M)]. \nReason: [reason]")
|
||||
DB_ban_record(BANTYPE_APPEARANCE, M, -1, reason)
|
||||
appearance_fullban(M, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
@@ -893,7 +890,6 @@
|
||||
var/msg
|
||||
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
|
||||
for(var/job in notbannedlist)
|
||||
ban_unban_log_save("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes. reason: [reason]")
|
||||
log_admin("[key_name(usr)] temp-jobbanned [key_name(M)] from [job] for [mins] minutes")
|
||||
DB_ban_record(BANTYPE_JOB_TEMP, M, mins, reason, job)
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]") //Legacy banning does not support temporary jobbans.
|
||||
@@ -914,7 +910,6 @@
|
||||
var/msg
|
||||
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
|
||||
for(var/job in notbannedlist)
|
||||
ban_unban_log_save("[key_name(usr)] perma-jobbanned [key_name(M)] from [job]. reason: [reason]")
|
||||
log_admin("[key_name(usr)] perma-banned [key_name(M)] from [job]")
|
||||
DB_ban_record(BANTYPE_JOB_PERMA, M, -1, reason, job)
|
||||
jobban_fullban(M, job, "[reason]; By [usr.ckey] on [time2text(world.realtime)]")
|
||||
@@ -943,7 +938,6 @@
|
||||
if(!reason) continue //skip if it isn't jobbanned anyway
|
||||
switch(alert("Job: '[job]' Reason: '[reason]' Un-jobban?","Please Confirm","Yes","No"))
|
||||
if("Yes")
|
||||
ban_unban_log_save("[key_name(usr)] unjobbanned [key_name(M)] from [job]")
|
||||
log_admin("[key_name(usr)] unbanned [key_name(M)] from [job]")
|
||||
DB_ban_unban(M.ckey, BANTYPE_JOB_PERMA, job)
|
||||
jobban_unban(M, job)
|
||||
@@ -1068,7 +1062,6 @@
|
||||
return
|
||||
M = admin_ban_mobsearch(M, ban_ckey_param, usr)
|
||||
AddBan(M.ckey, M.computer_id, reason, usr.ckey, 1, mins)
|
||||
ban_unban_log_save("[usr.client.ckey] has banned [M.ckey]. - Reason: [reason] - This will be removed in [mins] minutes.")
|
||||
to_chat(M, "<span class='warning'><big><b>You have been banned by [usr.client.ckey].\nReason: [reason].</b></big></span>")
|
||||
to_chat(M, "<span class='warning'>This is a temporary ban, it will be removed in [mins] minutes.</span>")
|
||||
DB_ban_record(BANTYPE_TEMP, M, mins, reason)
|
||||
@@ -1095,7 +1088,6 @@
|
||||
to_chat(M, "<span class='warning'>To try to resolve this matter head to [config.banappeals]</span>")
|
||||
else
|
||||
to_chat(M, "<span class='warning'>No ban appeals URL has been set.</span>")
|
||||
ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This ban does not expire automatically and must be appealed.")
|
||||
log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis ban does not expire automatically and must be appealed.")
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis ban does not expire automatically and must be appealed.</span>")
|
||||
DB_ban_record(BANTYPE_PERMA, M, -1, reason)
|
||||
@@ -2341,7 +2333,7 @@
|
||||
P.name = "Central Command - paper"
|
||||
var/stypes = list("Handle it yourselves!","Illegible fax","Fax not signed","Not Right Now","You are wasting our time", "Keep up the good work", "ERT Instructions")
|
||||
var/stype = input(src.owner, "Which type of standard reply do you wish to send to [H]?","Choose your paperwork", "") as null|anything in stypes
|
||||
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><b>Nanotrasen Science Station [GLOB.using_map.station_short]</b></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
|
||||
var/tmsg = "<font face='Verdana' color='black'><center><img src = 'ntlogo.png'><BR><BR><BR><font size='4'><b>[SSmapping.map_datum.fluff_name]</b></font><BR><BR><BR><font size='4'>NAS Trurl Communications Department Report</font></center><BR><BR>"
|
||||
if(stype == "Handle it yourselves!")
|
||||
tmsg += "Greetings, esteemed crewmember. Your fax has been <b><I>DECLINED</I></b> automatically by NAS Trurl Fax Registration.<BR><BR>Please proceed in accordance with Standard Operating Procedure and/or Space Law. You are fully trained to handle this situation without Central Command intervention.<BR><BR><i><small>This is an automatic message.</small>"
|
||||
else if(stype == "Illegible fax")
|
||||
@@ -2630,7 +2622,7 @@
|
||||
fax_panel(usr)
|
||||
|
||||
else if(href_list["getplaytimewindow"])
|
||||
if(!check_rights(R_ADMIN))
|
||||
if(!check_rights(R_ADMIN | R_MOD | R_MENTOR))
|
||||
return
|
||||
var/mob/M = locateUID(href_list["getplaytimewindow"])
|
||||
if(!istype(M, /mob))
|
||||
@@ -2810,7 +2802,7 @@
|
||||
if(R.module)
|
||||
R.module.modules += I
|
||||
I.loc = R.module
|
||||
R.module.rebuild()
|
||||
R.module.rebuild_modules()
|
||||
R.activate_module(I)
|
||||
R.module.fix_modules()
|
||||
|
||||
@@ -2894,9 +2886,6 @@
|
||||
spawn(0)
|
||||
H.corgize()
|
||||
ok = 1
|
||||
if("honksquad")
|
||||
if(usr.client.honksquad())
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Team - HONKsquad")
|
||||
if("striketeam")
|
||||
if(usr.client.strike_team())
|
||||
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Send Team - Deathsquad")
|
||||
@@ -3556,6 +3545,8 @@
|
||||
var/datum/browser/popup = new(usr, "view_karma", "Karma stats for [target_ckey]", 600, 300)
|
||||
popup.set_content(dat)
|
||||
popup.open(FALSE)
|
||||
else if(href_list["who_advanced"])
|
||||
usr.client.who_advanced()
|
||||
|
||||
/client/proc/create_eventmob_for(mob/living/carbon/human/H, killthem = 0)
|
||||
if(!check_rights(R_EVENT))
|
||||
|
||||
@@ -666,17 +666,19 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] changed the equipment of [key_name_admin(M)] to [dresscode].</span>", 1)
|
||||
|
||||
/client/proc/robust_dress_shop()
|
||||
var/list/outfits = list(
|
||||
var/list/special_outfits = list(
|
||||
"Naked",
|
||||
"As Job...",
|
||||
"Custom..."
|
||||
)
|
||||
|
||||
var/list/outfits = list()
|
||||
var/list/paths = subtypesof(/datum/outfit) - typesof(/datum/outfit/job)
|
||||
for(var/path in paths)
|
||||
var/datum/outfit/O = path //not much to initalize here but whatever
|
||||
if(initial(O.can_be_admin_equipped))
|
||||
outfits[initial(O.name)] = path
|
||||
outfits = special_outfits + sortTim(outfits, /proc/cmp_text_asc)
|
||||
|
||||
var/dresscode = input("Select outfit", "Robust quick dress shop") as null|anything in outfits
|
||||
if(isnull(dresscode))
|
||||
@@ -692,6 +694,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
var/datum/outfit/O = path
|
||||
if(initial(O.can_be_admin_equipped))
|
||||
job_outfits[initial(O.name)] = path
|
||||
job_outfits = sortTim(job_outfits, /proc/cmp_text_asc)
|
||||
|
||||
dresscode = input("Select job equipment", "Robust quick dress shop") as null|anything in job_outfits
|
||||
dresscode = job_outfits[dresscode]
|
||||
@@ -790,7 +793,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
set name = "Display del() Log"
|
||||
set desc = "Display del's log of everything that's passed through it."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
return
|
||||
|
||||
var/list/dellog = list("<B>List of things that have gone through qdel this round</B><BR><BR><ol>")
|
||||
@@ -822,7 +825,7 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
|
||||
set name = "Display Simple del() Log"
|
||||
set desc = "Display a compacted del's log."
|
||||
|
||||
if(!check_rights(R_DEBUG))
|
||||
if(!check_rights(R_DEBUG|R_VIEWRUNTIMES))
|
||||
return
|
||||
|
||||
var/dat = "<B>List of things that failed to GC this round</B><BR><BR>"
|
||||
|
||||
@@ -1,142 +0,0 @@
|
||||
//HONKsquad
|
||||
|
||||
#define HONKSQUAD_POSSIBLE 6 //if more Commandos are needed in the future
|
||||
GLOBAL_VAR_INIT(sent_honksquad, 0)
|
||||
|
||||
/client/proc/honksquad()
|
||||
if(!SSticker)
|
||||
to_chat(usr, "<font color='red'>The game hasn't started yet!</font>")
|
||||
return
|
||||
if(world.time < 6000)
|
||||
to_chat(usr, "<font color='red'>There are [(6000-world.time)/10] seconds remaining before it may be called.</font>")
|
||||
return
|
||||
if(GLOB.sent_honksquad == 1)
|
||||
to_chat(usr, "<font color='red'>Clown Planet has already dispatched a HONKsquad.</font>")
|
||||
return
|
||||
if(alert("Do you want to send in the HONKsquad? Once enabled, this is irreversible.",,"Yes","No")!="Yes")
|
||||
return
|
||||
alert("This 'mode' will go on until proper levels of HONK have been restored. You may also admin-call the evac shuttle when appropriate. Assigning the team's detailed task is recommended from there. While you will be able to manually pick the candidates from active ghosts, their assignment in the squad will be random.")
|
||||
|
||||
var/input = null
|
||||
while(!input)
|
||||
input = sanitize(copytext(input(src, "Please specify which mission the HONKsquad shall undertake.", "Specify Mission", ""),1,MAX_MESSAGE_LEN))
|
||||
if(!input)
|
||||
if(alert("Error, no mission set. Do you want to exit the setup process?",,"Yes","No")=="Yes")
|
||||
return
|
||||
|
||||
if(GLOB.sent_honksquad)
|
||||
to_chat(usr, "Looks like someone beat you to it. HONK.")
|
||||
return
|
||||
|
||||
GLOB.sent_honksquad = 1
|
||||
|
||||
|
||||
var/honksquad_number = HONKSQUAD_POSSIBLE //for selecting a leader
|
||||
var/honk_leader_selected = 0 //when the leader is chosen. The last person spawned.
|
||||
|
||||
|
||||
//Generates a list of HONKsquad from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
var/list/candidates = list() //candidates for being a commando out of all the active ghosts in world.
|
||||
var/list/commandos = list() //actual commando ghosts as picked by the user.
|
||||
for(var/mob/dead/observer/G in GLOB.player_list)
|
||||
if(!G.client.holder && !G.client.is_afk()) //Whoever called/has the proc won't be added to the list.
|
||||
if(!(G.mind && G.mind.current && G.mind.current.stat != DEAD))
|
||||
candidates += G.key
|
||||
for(var/i=HONKSQUAD_POSSIBLE,(i>0&&candidates.len),i--)//Decrease with every commando selected.
|
||||
var/candidate = input("Pick characters to spawn as the HONKsquad. This will go on until there either no more ghosts to pick from or the slots are full.", "Active Players") as null|anything in candidates //It will auto-pick a person when there is only one candidate.
|
||||
candidates -= candidate //Subtract from candidates.
|
||||
commandos += candidate//Add their ghost to commandos.
|
||||
|
||||
//Spawns HONKsquad and equips them.
|
||||
for(var/thing in GLOB.landmarks_list)
|
||||
var/obj/effect/landmark/L = thing
|
||||
if(honksquad_number<=0) break
|
||||
if(L.name == "HONKsquad")
|
||||
honk_leader_selected = honksquad_number == 1?1:0
|
||||
|
||||
var/mob/living/carbon/human/new_honksquad = create_honksquad(L, honk_leader_selected)
|
||||
|
||||
if(commandos.len)
|
||||
new_honksquad.key = pick(commandos)
|
||||
commandos -= new_honksquad.key
|
||||
new_honksquad.internal = new_honksquad.s_store
|
||||
new_honksquad.update_action_buttons_icon()
|
||||
|
||||
//So they don't forget their code or mission.
|
||||
new_honksquad.mind.store_memory("<B>Mission:</B> <span class='warning'>[input].</span>")
|
||||
|
||||
to_chat(new_honksquad, "<span class='notice'>You are a HONKsquad. [!honk_leader_selected ? "commando" : "<B>LEADER</B>"] in the service of Clown Planet. You are called in cases of exteme low levels of HONK. You are NOT authorized to kill.\nYour current mission is: <span class='danger'>[input]</span></span>")
|
||||
|
||||
honksquad_number--
|
||||
|
||||
|
||||
message_admins("<span class='notice'>[key_name_admin(usr)] has spawned a HONKsquad.</span>", 1)
|
||||
log_admin("[key_name(usr)] used Spawn HONKsquad.")
|
||||
return 1
|
||||
|
||||
/client/proc/create_honksquad(obj/spawn_location, honk_leader_selected = 0)
|
||||
var/mob/living/carbon/human/new_honksquad = new(spawn_location.loc)
|
||||
var/honksquad_leader_rank = pick("Lieutenant", "Captain", "Major")
|
||||
var/honksquad_rank = pick("Corporal", "Sergeant", "Staff Sergeant", "Sergeant 1st Class", "Master Sergeant", "Sergeant Major")
|
||||
var/honksquad_name = pick(GLOB.clown_names)
|
||||
|
||||
var/datum/preferences/A = new()//Randomize appearance for the commando.
|
||||
if(honk_leader_selected)
|
||||
A.age = rand(35,45)
|
||||
A.real_name = "[honksquad_leader_rank] [honksquad_name]"
|
||||
else
|
||||
A.real_name = "[honksquad_rank] [honksquad_name]"
|
||||
A.copy_to(new_honksquad)
|
||||
|
||||
new_honksquad.dna.ready_dna(new_honksquad)//Creates DNA.
|
||||
|
||||
//Creates mind stuff.
|
||||
new_honksquad.mind_initialize()
|
||||
new_honksquad.mind.assigned_role = SPECIAL_ROLE_HONKSQUAD
|
||||
new_honksquad.mind.special_role = SPECIAL_ROLE_HONKSQUAD
|
||||
new_honksquad.mind.offstation_role = TRUE
|
||||
new_honksquad.add_language("Clownish")
|
||||
SSticker.mode.traitors |= new_honksquad.mind//Adds them to current traitor list. Which is really the extra antagonist list.
|
||||
new_honksquad.equip_honksquad(honk_leader_selected)
|
||||
return new_honksquad
|
||||
|
||||
/mob/living/carbon/human/proc/equip_honksquad(honk_leader_selected = 0)
|
||||
|
||||
var/obj/item/radio/R = new /obj/item/radio/headset(src)
|
||||
R.set_frequency(1442)
|
||||
equip_to_slot_or_del(R, slot_l_ear)
|
||||
equip_to_slot_or_del(new /obj/item/storage/backpack/clown(src), slot_back)
|
||||
equip_to_slot_or_del(new /obj/item/storage/box/survival(src), slot_in_backpack)
|
||||
if(src.gender == FEMALE)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat/sexy(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown/sexy(src), slot_w_uniform)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/clothing/under/rank/clown(src), slot_w_uniform)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/clown_shoes(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/pda/clown(src), slot_wear_pda)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/mask/gas/clown_hat(src), slot_wear_mask)
|
||||
equip_to_slot_or_del(new /obj/item/reagent_containers/food/snacks/grown/banana(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/bikehorn(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/stamp/clown(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/toy/crayon/rainbow(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/reagent_containers/spray/waterflower(src), slot_in_backpack)
|
||||
equip_to_slot_or_del(new /obj/item/reagent_containers/food/pill/patch/jestosterone(src), slot_r_store)
|
||||
if(prob(50))
|
||||
equip_to_slot_or_del(new /obj/item/gun/energy/clown(src), slot_in_backpack)
|
||||
else
|
||||
equip_to_slot_or_del(new /obj/item/gun/throw/piecannon(src), slot_in_backpack)
|
||||
dna.SetSEState(GLOB.clumsyblock, TRUE)
|
||||
singlemutcheck(src, GLOB.clumsyblock, MUTCHK_FORCED)
|
||||
|
||||
|
||||
|
||||
var/obj/item/card/id/W = new(src)
|
||||
W.name = "[real_name]'s ID Card"
|
||||
W.icon_state = "centcom_old"
|
||||
W.access = list(ACCESS_CLOWN)//They get full station access.
|
||||
W.assignment = "HONKsquad"
|
||||
W.registered_name = real_name
|
||||
equip_to_slot_or_del(W, slot_wear_id)
|
||||
|
||||
return 1
|
||||
@@ -179,3 +179,28 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
|
||||
|
||||
to_chat(world, "There are [count] objects of type [type_path] in the game world.")
|
||||
SSblackbox.record_feedback("tally", "admin_verb", 1, "Count Objects (Global)") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||
|
||||
/client/proc/set_next_map()
|
||||
set category = "Server"
|
||||
set name = "Set Next Map"
|
||||
|
||||
if(!check_rights(R_SERVER))
|
||||
return
|
||||
|
||||
var/list/map_datums = list()
|
||||
for(var/x in subtypesof(/datum/map))
|
||||
var/datum/map/M = x
|
||||
map_datums["[initial(M.fluff_name)] ([initial(M.technical_name)])"] = M // Put our map in
|
||||
|
||||
var/target_map_name = input(usr, "Select target map", "Next map", null) as null|anything in map_datums
|
||||
|
||||
if(!target_map_name)
|
||||
return
|
||||
|
||||
var/datum/map/TM = map_datums[target_map_name]
|
||||
SSmapping.next_map = new TM
|
||||
var/announce_to_players = alert(usr, "Do you wish to tell the playerbase about your choice?", "Announce", "Yes", "No")
|
||||
message_admins("[key_name_admin(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
|
||||
log_admin("[key_name(usr)] has set the next map to [SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])")
|
||||
if(announce_to_players == "Yes")
|
||||
to_chat(world, "<span class='boldannounce'>[key] has chosen the following map for next round: <font color='cyan'>[SSmapping.next_map.fluff_name] ([SSmapping.next_map.technical_name])</font></span>")
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/datum/admins/proc/CandCheck(role = null, mob/living/carbon/human/M, datum/game_mode/temp = null)
|
||||
// You pass in ROLE define (optional), the applicant, and the gamemode, and it will return true / false depending on whether the applicant qualify for the candidacy in question
|
||||
if(jobban_isbanned(M, "Syndicate"))
|
||||
if(jobban_isbanned(M, ROLE_SYNDICATE))
|
||||
return FALSE
|
||||
if(M.stat || !M.mind || M.mind.special_role || M.mind.offstation_role)
|
||||
return FALSE
|
||||
@@ -199,7 +199,7 @@
|
||||
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
if(istype(G) && G.client && (ROLE_OPERATIVE in G.client.prefs.be_special))
|
||||
if(!jobban_isbanned(G, "operative") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(!jobban_isbanned(G, ROLE_OPERATIVE) && !jobban_isbanned(G, ROLE_SYNDICATE))
|
||||
if(player_old_enough_antag(G.client,ROLE_OPERATIVE))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a nuke team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
@@ -316,7 +316,7 @@
|
||||
|
||||
//Generates a list of commandos from active ghosts. Then the user picks which characters to respawn as the commandos.
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
if(!jobban_isbanned(G, "Syndicate"))
|
||||
if(!jobban_isbanned(G, ROLE_SYNDICATE))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for an elite syndicate strike team being sent in?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
@@ -427,7 +427,7 @@
|
||||
for(var/mob/G in GLOB.respawnable_list)
|
||||
if(istype(G) && G.client && (ROLE_RAIDER in G.client.prefs.be_special))
|
||||
if(player_old_enough_antag(G.client,ROLE_RAIDER))
|
||||
if(!jobban_isbanned(G, "raider") && !jobban_isbanned(G, "Syndicate"))
|
||||
if(!jobban_isbanned(G, ROLE_RAIDER) && !jobban_isbanned(G, ROLE_SYNDICATE))
|
||||
spawn(0)
|
||||
switch(alert(G,"Do you wish to be considered for a vox raiding party arriving on the station?","Please answer in 30 seconds!","Yes","No"))
|
||||
if("Yes")
|
||||
|
||||
@@ -59,15 +59,6 @@
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
/proc/HONK_announce(text, mob/Sender)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='boldnotice'><font color=pink>HONK: </font>[key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) (<A HREF='?_src_=holder;HONKReply=[Sender.UID()]'>RPLY</A>):</span> [msg]"
|
||||
for(var/client/X in GLOB.admins)
|
||||
if(R_EVENT & X.holder.rights)
|
||||
to_chat(X, msg)
|
||||
if(X.prefs.sound & SOUND_ADMINHELP)
|
||||
SEND_SOUND(X, sound('sound/effects/adminhelp.ogg'))
|
||||
|
||||
/proc/ERT_Announce(text, mob/Sender, repeat_warning)
|
||||
var/msg = sanitize(copytext(text, 1, MAX_MESSAGE_LEN))
|
||||
msg = "<span class='adminnotice'><b><font color=orange>ERT REQUEST: </font>[key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) (<A HREF='?_src_=holder;ErtReply=[Sender.UID()]'>RESPOND</A>):</b> [msg]</span>"
|
||||
|
||||
@@ -278,11 +278,9 @@
|
||||
var/action=""
|
||||
if(config.antag_hud_allowed)
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) //Remove the verb from non-admin ghosts
|
||||
g.verbs -= /mob/dead/observer/verb/toggle_antagHUD
|
||||
if(g.antagHUD)
|
||||
g.antagHUD = FALSE // Disable it on those that have it enabled
|
||||
g.has_enabled_antagHUD = 2 // We'll allow them to respawn
|
||||
g.has_enabled_antagHUD = FALSE // We'll allow them to respawn
|
||||
to_chat(g, "<span class='danger'>The Administrator has disabled AntagHUD </span>")
|
||||
config.antag_hud_allowed = 0
|
||||
to_chat(src, "<span class='danger'>AntagHUD usage has been disabled</span>")
|
||||
@@ -290,7 +288,6 @@
|
||||
else
|
||||
for(var/mob/dead/observer/g in get_ghosts())
|
||||
if(!g.client.holder) // Add the verb back for all non-admin ghosts
|
||||
g.verbs += /mob/dead/observer/verb/toggle_antagHUD
|
||||
to_chat(g, "<span class='boldnotice'>The Administrator has enabled AntagHUD </span>")// Notify all observers they can now use AntagHUD
|
||||
|
||||
config.antag_hud_allowed = 1
|
||||
@@ -321,7 +318,7 @@
|
||||
to_chat(g, "<span class='danger'>The administrator has placed restrictions on joining the round if you use AntagHUD</span>")
|
||||
to_chat(g, "<span class='danger'>Your AntagHUD has been disabled, you may choose to re-enabled it but will be under restrictions </span>")
|
||||
g.antagHUD = FALSE
|
||||
g.has_enabled_antagHUD = 0
|
||||
g.has_enabled_antagHUD = FALSE
|
||||
action = "placed restrictions"
|
||||
config.antag_hud_restricted = 1
|
||||
to_chat(src, "<span class='danger'>AntagHUD restrictions have been enabled</span>")
|
||||
@@ -498,11 +495,16 @@ Traitors and the like can also be revived with the previous role mostly intact.
|
||||
if(!ckey)
|
||||
var/list/candidates = list()
|
||||
for(var/mob/M in GLOB.player_list)
|
||||
if(M.stat != DEAD) continue //we are not dead!
|
||||
if(!(ROLE_ALIEN in M.client.prefs.be_special)) continue //we don't want to be an alium
|
||||
if(jobban_isbanned(M, "alien") || jobban_isbanned(M, "Syndicate")) continue //we are jobbanned
|
||||
if(M.client.is_afk()) continue //we are afk
|
||||
if(M.mind && M.mind.current && M.mind.current.stat != DEAD) continue //we have a live body we are tied to
|
||||
if(M.stat != DEAD)
|
||||
continue //we are not dead!
|
||||
if(!(ROLE_ALIEN in M.client.prefs.be_special))
|
||||
continue //we don't want to be an alium
|
||||
if(jobban_isbanned(M, ROLE_ALIEN) || jobban_isbanned(M, ROLE_SYNDICATE))
|
||||
continue //we are jobbanned
|
||||
if(M.client.is_afk())
|
||||
continue //we are afk
|
||||
if(M.mind && M.mind.current && M.mind.current.stat != DEAD)
|
||||
continue //we have a live body we are tied to
|
||||
candidates += M.ckey
|
||||
if(candidates.len)
|
||||
ckey = input("Pick the player you want to respawn as a xeno.", "Suitable Candidates") as null|anything in candidates
|
||||
|
||||
@@ -153,7 +153,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/suit/space/hardsuit/syndi/elite/sst(src), slot_wear_suit)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal(src), slot_glasses)
|
||||
equip_to_slot_or_del(new /obj/item/storage/belt/military/sst(src), slot_belt)
|
||||
equip_to_slot_or_del(new /obj/item/tank/jetpack/oxygen/harness(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/tank/internals/oxygen/red(src), slot_s_store)
|
||||
equip_to_slot_or_del(new /obj/item/clothing/shoes/magboots/syndie/advance(src), slot_shoes)
|
||||
equip_to_slot_or_del(new /obj/item/gun/projectile/automatic/l6_saw(src), slot_r_hand)
|
||||
equip_to_slot_or_del(new /obj/item/ammo_box/magazine/mm556x45(src), slot_in_backpack)
|
||||
|
||||
Reference in New Issue
Block a user