Merge branch 'master' into admin-additions

This commit is contained in:
dearmochi
2020-08-16 14:32:57 +02:00
committed by GitHub
59 changed files with 1766 additions and 1029 deletions
+20 -8
View File
@@ -901,15 +901,21 @@
else if(href_list["boot2"])
var/mob/M = locateUID(href_list["boot2"])
if(istype(M, /mob))
if(M.client && M.client.holder && (M.client.holder.rights & R_BAN))
to_chat(usr, "<span class='warning'>[key_name_admin(M)] cannot be kicked from the server.</span>")
if(!ismob(M))
return
var/client/C = M.client
if(C == null)
to_chat(usr, "<span class='warning'>Mob has no client to kick.</span>")
return
if(alert("Kick [C.ckey]?",,"Yes","No") == "Yes")
if(C && C.holder && (C.holder.rights & R_BAN))
to_chat(usr, "<span class='warning'>[key_name_admin(C)] cannot be kicked from the server.</span>")
return
to_chat(M, "<span class='warning'>You have been kicked from the server</span>")
log_admin("[key_name(usr)] booted [key_name(M)].")
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(M)].</span>", 1)
//M.client = null
qdel(M.client)
to_chat(C, "<span class='warning'>You have been kicked from the server</span>")
log_admin("[key_name(usr)] booted [key_name(C)].")
message_admins("<span class='notice'>[key_name_admin(usr)] booted [key_name_admin(C)].</span>", 1)
//C = null
qdel(C)
else if(href_list["open_logging_view"])
var/mob/M = locateUID(href_list["open_logging_view"])
@@ -1665,6 +1671,12 @@
return
SStickets.autoRespond(index)
if(href_list["convert_ticket"])
var/indexNum = text2num(href_list["convert_ticket"])
if(href_list["is_mhelp"])
SSmentor_tickets.convert_to_other_ticket(indexNum)
else
SStickets.convert_to_other_ticket(indexNum)
else if(href_list["cult_nextobj"])
if(alert(usr, "Validate the current Cult objective and unlock the next one?", "Cult Cheat Code", "Yes", "No") != "Yes")
return
+13 -7
View File
@@ -125,22 +125,28 @@ GLOBAL_LIST_INIT(adminhelp_ignored_words, list("unknown","the","a","an","of","mo
ticketNum = T.ticketNum // ticketNum is the number of their ticket.
T.addResponse(src, msg)
msg = "[span][selected_type]: </span><span class='boldnotice'>[key_name(src, TRUE, selected_type)] ([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_TP(mob,"TP")]) ([ADMIN_SM(mob,"SM")]) ([admin_jump_link(mob)]) (<A HREF='?_src_=holder;[isMhelp ? "openmentorticket" : "openadminticket"]=[ticketNum]'>TICKET</A>) [ai_found ? "(<A HREF='?_src_=holder;adminchecklaws=[mob.UID()]'>CL</A>)" : ""] (<A HREF='?_src_=holder;take_question=[ticketNum][isMhelp ? ";is_mhelp=1" : ""]'>TAKE</A>) (<A HREF='?_src_=holder;resolve=[ticketNum][isMhelp ? ";is_mhelp=1" : ""]'>RESOLVE</A>) [isMhelp ? "" : "<A HREF='?_src_=holder;autorespond=[ticketNum]'>(AUTO)</A>"] :</span> [span][msg]</span>"
var/finalised_msg = "[span][selected_type]: </span><span class='boldnotice'>[key_name(src, TRUE, selected_type)] "
finalised_msg += "([ADMIN_QUE(mob,"?")]) ([ADMIN_PP(mob,"PP")]) ([ADMIN_VV(mob,"VV")]) ([ADMIN_TP(mob,"TP")]) ([ADMIN_SM(mob,"SM")]) "
finalised_msg += "([admin_jump_link(mob)]) (<A HREF='?_src_=holder;[isMhelp ? "openmentorticket" : "openadminticket"]=[ticketNum]'>TICKET</A>) "
finalised_msg += "[ai_found ? "(<A HREF='?_src_=holder;adminchecklaws=[mob.UID()]'>CL</A>)" : ""] (<A HREF='?_src_=holder;take_question=[ticketNum][isMhelp ? ";is_mhelp=1" : ""]'>TAKE</A>) "
finalised_msg += "(<A HREF='?_src_=holder;resolve=[ticketNum][isMhelp ? ";is_mhelp=1" : ""]'>RESOLVE</A>) [isMhelp ? "" : "<A HREF='?_src_=holder;autorespond=[ticketNum]'>(AUTO)</A>"] "
finalised_msg += "<a href='?_src_=holder;convert_ticket=[ticketNum][isMhelp ? ";is_mhelp=1" : ""]'>(CONVERT)</a> :</span> [span][msg]</span>"
if(isMhelp)
//Open a new adminticket and inform the user.
SSmentor_tickets.newTicket(src, prunedmsg, msg)
SSmentor_tickets.newTicket(src, prunedmsg, finalised_msg)
for(var/client/X in mentorholders + modholders + adminholders)
if(X.prefs.sound & SOUND_MENTORHELP)
X << 'sound/effects/adminhelp.ogg'
to_chat(X, msg)
SEND_SOUND(X, 'sound/effects/adminhelp.ogg')
to_chat(X, finalised_msg)
else //Ahelp
//Open a new adminticket and inform the user.
SStickets.newTicket(src, prunedmsg, msg)
SStickets.newTicket(src, prunedmsg, finalised_msg)
for(var/client/X in modholders + adminholders)
if(X.prefs.sound & SOUND_ADMINHELP)
X << 'sound/effects/adminhelp.ogg'
SEND_SOUND(X, 'sound/effects/adminhelp.ogg')
window_flash(X)
to_chat(X, msg)
to_chat(X, finalised_msg)
+26 -1
View File
@@ -22,6 +22,10 @@
to_chat(src, "Nowhere to jump to!")
return
if(isobj(usr.loc))
var/obj/O = usr.loc
O.force_eject_occupant()
admin_forcemove(usr, T)
log_admin("[key_name(usr)] jumped to [A]")
if(!isobserver(usr))
@@ -35,6 +39,9 @@
if(!check_rights(R_ADMIN))
return
if(isobj(usr.loc))
var/obj/O = usr.loc
O.force_eject_occupant()
log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]")
if(!isobserver(usr))
message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1)
@@ -52,6 +59,9 @@
log_admin("[key_name(usr)] jumped to [key_name(M)]")
if(!isobserver(usr))
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(isobj(usr.loc))
var/obj/O = usr.loc
O.force_eject_occupant()
if(src.mob)
var/mob/A = src.mob
var/turf/T = get_turf(M)
@@ -70,6 +80,9 @@
var/turf/T = locate(tx, ty, tz)
if(T)
if(isobj(usr.loc))
var/obj/O = usr.loc
O.force_eject_occupant()
admin_forcemove(usr, T)
if(isobserver(usr))
var/mob/dead/observer/O = usr
@@ -96,7 +109,9 @@
log_admin("[key_name(usr)] jumped to [key_name(M)]")
if(!isobserver(usr))
message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1)
if(isobj(usr.loc))
var/obj/O = usr.loc
O.force_eject_occupant()
admin_forcemove(usr, M.loc)
feedback_add_details("admin_verb","JK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -111,6 +126,10 @@
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1)
if(isobj(M.loc))
var/obj/O = M.loc
O.force_eject_occupant()
admin_forcemove(M, get_turf(usr))
feedback_add_details("admin_verb","GM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -135,6 +154,9 @@
log_admin("[key_name(usr)] teleported [key_name(M)]")
message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1)
if(M)
if(isobj(M.loc))
var/obj/O = M.loc
O.force_eject_occupant()
admin_forcemove(M, get_turf(usr))
admin_forcemove(usr, M.loc)
feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
@@ -148,6 +170,9 @@
var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas()
if(A)
if(isobj(M.loc))
var/obj/O = M.loc
O.force_eject_occupant()
admin_forcemove(M, pick(get_area_turfs(A)))
feedback_add_details("admin_verb","SMOB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
log_admin("[key_name(usr)] teleported [key_name(M)] to [A]")
+3
View File
@@ -917,6 +917,9 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention)
if(istype(landmark))
var/datum/map_template/ruin/template = landmark.ruin_template
if(isobj(usr.loc))
var/obj/O = usr.loc
O.force_eject_occupant()
admin_forcemove(usr, get_turf(landmark))
to_chat(usr, "<span class='name'>[template.name]</span>")
+1
View File
@@ -63,6 +63,7 @@
else if(ismouse(target))
var/mob/living/simple_animal/mouse/M = target
visible_message("<span class='danger'>SPLAT!</span>")
M.death()
M.splat()
playsound(loc, 'sound/effects/snap.ogg', 50, 1)
layer = MOB_LAYER - 0.2
+3
View File
@@ -33,6 +33,9 @@
deltimer(ant_timer)
return ..()
/obj/item/reagent_containers/food/set_APTFT()
set hidden = TRUE
/obj/item/reagent_containers/food/proc/check_for_ants()
if(!antable)
return
@@ -17,6 +17,8 @@
pixel_y = rand(8,-8)
update_icon()
/obj/item/reagent_containers/honeycomb/set_APTFT()
set hidden = TRUE
/obj/item/reagent_containers/honeycomb/update_icon()
overlays.Cut()
@@ -53,7 +53,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
if(ismob(body))
T = get_turf(body) //Where is the body located?
attack_log_old = body.attack_log_old //preserve our attack logs by copying them to our ghost
logs = body.logs.Copy()
var/mutable_appearance/MA = copy_appearance(body)
if(body.mind && body.mind.name)
@@ -519,9 +519,6 @@
/datum/species/proc/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art) //Handles any species-specific attackhand events.
if(!istype(M))
return
if(H.frozen)
to_chat(M, "<span class='warning'>Do not touch Admin-Frozen people.</span>")
return
if(istype(M))
var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"]
+16 -15
View File
@@ -59,8 +59,9 @@
//Even if we don't push/swap places, we "touched" them, so spread fire
spreadFire(M)
if(now_pushing)
return 1
// No pushing if we're already pushing past something, or if the mob we're pushing into is anchored.
if(now_pushing || M.anchored)
return TRUE
//Should stop you pushing a restrained person out of the way
if(isliving(M))
@@ -68,7 +69,7 @@
if(L.pulledby && L.pulledby != src && L.restrained())
if(!(world.time % 5))
to_chat(src, "<span class='warning'>[L] is restrained, you cannot push past.</span>")
return 1
return TRUE
if(L.pulling)
if(ismob(L.pulling))
@@ -76,28 +77,28 @@
if(P.restrained())
if(!(world.time % 5))
to_chat(src, "<span class='warning'>[L] is restrained, you cannot push past.</span>")
return 1
return TRUE
if(moving_diagonally) //no mob swap during diagonal moves.
return 1
return TRUE
if(a_intent == INTENT_HELP) // Help intent doesn't mob swap a mob pulling a structure
if(isstructure(M.pulling) || isstructure(pulling))
return 1
return TRUE
if(!M.buckled && !M.has_buckled_mobs())
var/mob_swap
//the puller can always swap with it's victim if on grab intent
if(M.pulledby == src && a_intent == INTENT_GRAB)
mob_swap = 1
mob_swap = TRUE
//restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
mob_swap = 1
mob_swap = TRUE
if(mob_swap)
//switch our position with M
if(loc && !loc.Adjacent(M.loc))
return 1
now_pushing = 1
return TRUE
now_pushing = TRUE
var/oldloc = loc
var/oldMloc = M.loc
@@ -114,18 +115,18 @@
if(!M_passmob)
M.pass_flags &= ~PASSMOB
now_pushing = 0
return 1
now_pushing = FALSE
return TRUE
// okay, so we didn't switch. but should we push?
// not if he's not CANPUSH of course
if(!(M.status_flags & CANPUSH))
return 1
return TRUE
//anti-riot equipment is also anti-push
if(M.r_hand && (prob(M.r_hand.block_chance * 2)) && !istype(M.r_hand, /obj/item/clothing))
return 1
return TRUE
if(M.l_hand && (prob(M.l_hand.block_chance * 2)) && !istype(M.l_hand, /obj/item/clothing))
return 1
return TRUE
//Called when we bump into an obj
/mob/living/proc/ObjBump(obj/O)
@@ -123,6 +123,7 @@
for(var/mob/living/simple_animal/mouse/M in view(1, src))
if(!M.stat && Adjacent(M))
custom_emote(1, "splats \the [M]!")
M.death()
M.splat()
movement_target = null
stop_automated_movement = 0
@@ -80,15 +80,6 @@
icon_resting = "mouse_[mouse_color]_sleep"
desc = "It's a small [mouse_color] rodent, often seen hiding in maintenance areas and making a nuisance of itself."
/mob/living/simple_animal/mouse/proc/splat()
src.health = 0
src.stat = DEAD
src.icon_dead = "mouse_[mouse_color]_splat"
src.icon_state = "mouse_[mouse_color]_splat"
layer = MOB_LAYER
if(client)
client.time_died_as_mouse = world.time
/mob/living/simple_animal/mouse/attack_hand(mob/living/carbon/human/M as mob)
if(M.a_intent == INTENT_HELP)
get_scooped(M)
@@ -110,6 +101,10 @@
desc = "It's toast."
death()
/mob/living/simple_animal/mouse/proc/splat()
icon_dead = "mouse_[mouse_color]_splat"
icon_state = "mouse_[mouse_color]_splat"
/mob/living/simple_animal/mouse/death(gibbed)
// Only execute the below if we successfully died
playsound(src, squeak_sound, 40, 1)
+1
View File
@@ -28,6 +28,7 @@
/mob/Login()
GLOB.player_list |= src
last_known_ckey = ckey
update_Login_details()
world.update_status()
+9 -4
View File
@@ -19,7 +19,6 @@
for(var/datum/alternate_appearance/AA in viewing_alternate_appearances)
AA.viewers -= src
viewing_alternate_appearances = null
logs.Cut()
LAssailant = null
return ..()
@@ -880,6 +879,9 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
return
if(!Adjacent(usr))
return
if(IsFrozen(src) && !is_admin(usr))
to_chat(usr, "<span class='boldannounce'>Interacting with admin-frozen players is not permitted.</span>")
return
if(isLivingSSD(src) && M.client && M.client.send_ssd_warning(src))
return
show_inv(usr)
@@ -1235,10 +1237,13 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
create_log_in_list(debug_log, text, collapse, world.timeofday)
/mob/proc/create_log(log_type, what, target = null, turf/where = get_turf(src))
LAZYINITLIST(logs[log_type])
var/list/log_list = logs[log_type]
if(!ckey)
return
var/real_ckey = ckey
if(ckey[1] == "@") // Admin aghosting will do this
real_ckey = copytext(ckey, 2)
var/datum/log_record/record = new(log_type, src, what, target, where, world.time)
log_list.Add(record)
GLOB.logging.add_log(real_ckey, record)
/proc/create_log_in_list(list/target, text, collapse = TRUE, last_log)//forgive me code gods for this shitcode proc
//this proc enables lovely stuff like an attack log that looks like this: "[18:20:29-18:20:45]21x John Smith attacked Andrew Jackson with a crowbar."
+1 -1
View File
@@ -36,7 +36,7 @@
var/list/attack_log_old = list( )
var/list/debug_log = null
var/list/logs = list() // Logs for each log type defined in __DEFINES/logs.dm
var/last_known_ckey = null // Used in logging
var/last_log = 0
var/obj/machinery/machine = null
+1
View File
@@ -55,6 +55,7 @@
return
say_dead_direct("[pick("complains", "moans", "whines", "laments", "blubbers", "salts")], <span class='message'>\"[message]\"</span>", src)
create_log(DEADCHAT_LOG, message)
/mob/proc/say_understands(var/mob/other, var/datum/language/speaking = null)
if(stat == DEAD)
@@ -222,7 +222,7 @@
if(is_authenticated(usr) && modify)
var/t1 = href_list["assign_target"]
if(t1 == "Custom")
var/temp_t = sanitize(copytext(input("Enter a custom job assignment.","Assignment"),1,MAX_MESSAGE_LEN))
var/temp_t = sanitize(reject_bad_name(copytext(input("Enter a custom job assignment.", "Assignment"), 1, MAX_MESSAGE_LEN), TRUE))
//let custom jobs function as an impromptu alt title, mainly for sechuds
if(temp_t && modify)
SSjobs.log_job_transfer(modify.registered_name, modify.getRankAndAssignment(), temp_t, scan.registered_name)
@@ -251,7 +251,8 @@
message_admins("[key_name_admin(usr)] has reassigned \"[modify.registered_name]\" from \"[jobnamedata]\" to \"[t1]\".")
SSjobs.log_job_transfer(modify.registered_name, jobnamedata, t1, scan.registered_name)
SSjobs.slot_job_transfer(modify.rank, t1)
if(modify.owner_uid)
SSjobs.slot_job_transfer(modify.rank, t1)
var/mob/living/carbon/human/H = modify.getPlayer()
if(istype(H))
@@ -266,7 +267,7 @@
if("PRG_reg")
if(is_authenticated(usr))
var/temp_name = reject_bad_name(href_list["reg"])
var/temp_name = reject_bad_name(href_list["reg"], TRUE)
if(temp_name)
modify.registered_name = temp_name
else
@@ -290,6 +291,8 @@
if(is_authenticated(usr))
var/delcount = SSjobs.delete_log_records(scan.registered_name, TRUE)
if(delcount)
message_admins("[key_name_admin(usr)] has wiped all ID computer logs.")
usr.create_log(MISC_LOG, "wiped all ID computer logs.")
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
if("PRG_print")
@@ -331,9 +334,14 @@
if("PRG_terminate")
if(is_authenticated(usr))
var/jobnamedata = modify.getRankAndAssignment()
log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\".")
var/reason = sanitize(copytext(input("Enter legal reason for termination. Enter nothing to cancel.", "Employment Termination"), 1, MAX_MESSAGE_LEN))
if(!reason || !is_authenticated(usr) || !modify)
return
log_game("[key_name(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for: \"[reason]\".")
message_admins("[key_name_admin(usr)] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for: \"[reason]\".")
usr.create_log(MISC_LOG, "terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\"")
SSjobs.log_job_transfer(modify.registered_name, jobnamedata, "Terminated", scan.registered_name)
SSjobs.notify_dept_head(modify.rank, "[scan.registered_name] has terminated the employment of \"[modify.registered_name]\" the \"[jobnamedata]\" for \"[reason]\".")
modify.assignment = "Terminated"
modify.access = list()
@@ -270,7 +270,6 @@
M.mind.transfer_to(new_mob)
else
new_mob.attack_log_old = M.attack_log_old.Copy()
new_mob.logs = M.logs.Copy()
new_mob.key = M.key
to_chat(new_mob, "<B>Your form morphs into that of a [randomize].</B>")
@@ -22,6 +22,9 @@
ignore_flags = TRUE
to_chat(user, "<span class='warning'>You short out the safeties on [src].</span>")
/obj/item/reagent_containers/applicator/set_APTFT()
set hidden = TRUE
/obj/item/reagent_containers/applicator/on_reagent_change()
if(!emagged)
var/found_forbidden_reagent = FALSE
@@ -24,6 +24,9 @@
mode = SYRINGE_INJECT
update_icon()
/obj/item/reagent_containers/syringe/set_APTFT()
set hidden = TRUE
/obj/item/reagent_containers/syringe/on_reagent_change()
update_icon()