diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 3612c4d8c4d..5dd341b3109 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -867,7 +867,7 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl /proc/hasvar(var/datum/A, var/varname) if(A.vars.Find(lowertext(varname))) return 1 else return 0 - + //Returns: all the areas in the world /proc/return_areas() var/list/area/areas = list() @@ -877,8 +877,8 @@ proc/anim(turf/location as turf,target as mob|obj,a_icon,a_icon_state as text,fl //Returns: all the areas in the world, sorted. /proc/return_sorted_areas() - return sortAtom(return_areas()) - + return sortAtom(return_areas()) + //Takes: Area type as text string or as typepath OR an instance of the area. //Returns: A list of all areas of that type in the world. /proc/get_areas(var/areatype) diff --git a/code/_globalvars/mapping.dm b/code/_globalvars/mapping.dm index 5d40a7c9772..1810bff0b47 100644 --- a/code/_globalvars/mapping.dm +++ b/code/_globalvars/mapping.dm @@ -51,5 +51,5 @@ var/list/blobstart = list() var/list/ninjastart = list() var/list/carplist = list() //list of all carp-spawn landmarks - //away missions -var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to \ No newline at end of file +//away missions +var/list/awaydestinations = list() //a list of landmarks that the warpgate can take you to diff --git a/code/game/area/Space Station 13 areas.dm b/code/game/area/Space Station 13 areas.dm index 58a2fe59002..9c00df44213 100644 --- a/code/game/area/Space Station 13 areas.dm +++ b/code/game/area/Space Station 13 areas.dm @@ -54,14 +54,12 @@ NOTE: there are two lists of areas in the end of this file: centcom and station var/air_doors_activated = 0 var/tele_proof = 0 - + /*Adding a wizard area teleport list because motherfucking lag -- Urist*/ /*I am far too lazy to make it a proper list of areas so I'll just make it run the usual telepot routine at the start of the game*/ var/list/teleportlocs = list() - -/hook/startup/proc/setupTeleportLocs() +/proc/process_teleport_locs() for(var/area/AR in world) - if(istype(AR, /area/shuttle) || istype(AR, /area/syndicate_station) || istype(AR, /area/wizard_station)) continue if(teleportlocs.Find(AR.name)) continue var/list/turfs = get_area_turfs(AR.type) if(turfs.len) @@ -73,21 +71,15 @@ var/list/teleportlocs = list() teleportlocs = sortAssoc(teleportlocs) return 1 - + var/list/ghostteleportlocs = list() - -/hook/startup/proc/setupGhostTeleportLocs() +/proc/process_ghost_teleport_locs() for(var/area/AR in world) if(ghostteleportlocs.Find(AR.name)) continue - if(istype(AR, /area/tdome)) - ghostteleportlocs += AR.name - ghostteleportlocs[AR.name] = AR var/list/turfs = get_area_turfs(AR.type) if(turfs.len) - var/turf/picked = pick(turfs) - if ((picked.z in config.player_levels)) - ghostteleportlocs += AR.name - ghostteleportlocs[AR.name] = AR + ghostteleportlocs += AR.name + ghostteleportlocs[AR.name] = AR ghostteleportlocs = sortAssoc(ghostteleportlocs) diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index 1495d5b50ae..616a2deb206 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -82,7 +82,7 @@ Obviously, requires DNA2. M.update_mutations() //update our mutation overlays M.update_body() //M.say(pick("",";")+pick("HULK MAD","YOU MADE HULK ANGRY")) // Just a note to security. - message_admins("[key_name(usr)] has hulked out! ([formatJumpTo(usr)])") + message_admins("[key_name_admin(usr)] has hulked out! ([formatJumpTo(usr)])") return */ diff --git a/code/game/gamemodes/blob/blob.dm b/code/game/gamemodes/blob/blob.dm index 5329c966b92..7a87a77c7a1 100644 --- a/code/game/gamemodes/blob/blob.dm +++ b/code/game/gamemodes/blob/blob.dm @@ -125,13 +125,13 @@ var/list/blob_nodes = list() if(location.z != ZLEVEL_STATION || istype(location, /turf/space)) if(!warned) C << "You feel ready to burst, but this isn't an appropriate place! You must return to the station!" - message_admins("[key_name(C)] was in space when the blobs burst, and will die if he doesn't return to the station.") + message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if he doesn't return to the station.") spawn(300) burst_blob(blob, 1) else burst ++ log_admin("[key_name(C)] was in space when attempting to burst as a blob.") - message_admins("[key_name(C)] was in space when attempting to burst as a blob.") + message_admins("[key_name_admin(C)] was in space when attempting to burst as a blob.") C.gib() make_blobs(1) check_finished() //Still needed in case we can't make any blobs diff --git a/code/game/gamemodes/events/holidays/Holidays.dm b/code/game/gamemodes/events/holidays/Holidays.dm index 53d6e0171f7..a4db5022f03 100644 --- a/code/game/gamemodes/events/holidays/Holidays.dm +++ b/code/game/gamemodes/events/holidays/Holidays.dm @@ -133,7 +133,7 @@ var/global/Holiday = null world.update_status() Holiday_Game_Start() - message_admins("\blue ADMIN: Event: [key_name(src)] force-set Holiday to \"[Holiday]\"") + message_admins("\blue ADMIN: Event: [key_name_admin(src)] force-set Holiday to \"[Holiday]\"") log_admin("[key_name(src)] force-set Holiday to \"[Holiday]\"") diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index fb2168181e3..a4b17c9ba69 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -479,7 +479,7 @@ proc/display_roundstart_logout_report() if(L.suiciding) //Suicider msg += "[L.name] ([L.ckey]), the [L.job] (Suicide)\n" job_master.FreeRole(L.job) - message_admins("[L.name] ([L.ckey]), the [L.job] has been freed due to (Early Round Suicide)\n") + message_admins("[key_name_admin(L)], the [L.job] has been freed due to (Early Round Suicide)\n") continue //Disconnected client if(L.stat == UNCONSCIOUS) msg += "[L.name] ([L.ckey]), the [L.job] (Dying)\n" @@ -505,7 +505,7 @@ proc/display_roundstart_logout_report() else msg += "[L.name] ([ckey(D.mind.key)]), the [L.job] (Ghosted)\n" job_master.FreeRole(L.job) - message_admins("[L.name] ([L.ckey]), the [L.job] has been freed due to (Early Round Ghosted While Alive)\n") + message_admins("[key_name_admin(L)], the [L.job] has been freed due to (Early Round Ghosted While Alive)\n") continue //Ghosted while alive diff --git a/code/game/gamemodes/mutiny/mutiny.dm b/code/game/gamemodes/mutiny/mutiny.dm index 150ff09f5fe..c91d8ad465d 100644 --- a/code/game/gamemodes/mutiny/mutiny.dm +++ b/code/game/gamemodes/mutiny/mutiny.dm @@ -332,8 +332,8 @@ datum/game_mode/mutiny if (M) src << "Attempting to recruit [M]..." - log_admin("[src]([src.ckey]) attempted to recruit [M] as a loyalist.") - message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a loyalist.") + log_admin("[key_name(src)] attempted to recruit [M] as a loyalist.") + message_admins("\red [key_name_admin(src)] attempted to recruit [M] as a loyalist.") var/choice = alert(M, "Asked by [src]: Will you help me complete Directive X?", "Loyalist recruitment", "Yes", "No") if(choice == "Yes") @@ -369,8 +369,8 @@ datum/game_mode/mutiny if (M) src << "Attempting to recruit [M]..." - log_admin("[src]([src.ckey]) attempted to recruit [M] as a mutineer.") - message_admins("\red [src]([src.ckey]) attempted to recruit [M] as a mutineer.") + log_admin("[key_name(src)] attempted to recruit [M] as a mutineer.") + message_admins("\red [key_name_admin(src)] attempted to recruit [M] as a mutineer.") var/choice = alert(M, "Asked by [src]: Will you help me stop Directive X?", "Mutineer recruitment", "Yes", "No") if(choice == "Yes") diff --git a/code/game/gamemodes/nations/nations.dm b/code/game/gamemodes/nations/nations.dm index 52df698a96f..4dba8ac9b25 100644 --- a/code/game/gamemodes/nations/nations.dm +++ b/code/game/gamemodes/nations/nations.dm @@ -428,9 +428,9 @@ datum/game_mode/nations H << "You are now part of the great sovereign nation of [H.mind.nation.name]!" return 1 else - message_admins("[H.name] with [H.mind.assigned_role] could not find any nation to assign!") + message_admins("[key_name_admin(H)] with [H.mind.assigned_role] could not find any nation to assign!") return 1 - message_admins("[H.name] latejoined with no mind.") + message_admins("[key_name_admin(H)] latejoined with no mind.") return 1 /proc/get_nations_mode() diff --git a/code/game/gamemodes/revolution/rp-revolution.dm b/code/game/gamemodes/revolution/rp-revolution.dm index 963579af7c8..7e2b42461fe 100644 --- a/code/game/gamemodes/revolution/rp-revolution.dm +++ b/code/game/gamemodes/revolution/rp-revolution.dm @@ -294,8 +294,8 @@ mob/living/carbon/human/proc src << "\red Wait five seconds before reconversion attempt." return src << "\red Attempting to convert [M]..." - log_admin("[src]([src.ckey]) attempted to convert [M].") - message_admins("\red [src]([src.ckey]) attempted to convert [M].") + log_admin("[key_name(src)] attempted to convert [M].") + message_admins("\red [key_name_admin(src)] attempted to convert [M].") var/choice = alert(M,"Asked by [src]: Do you want to join the revolution?","Align Thyself with the Revolution!","No!","Yes!") if(choice == "Yes!") ticker.mode:add_revolutionary(M.mind) diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index 33425ebd135..c8f683406e2 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -5,7 +5,7 @@ var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffhealing", "armor", "scrying", "staffdoor", "special") var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos") usr << "You summoned [summon_type ? "magic" : "guns"]!" - message_admins("[key_name_admin(usr, 1)] summoned [summon_type ? "magic" : "guns"]!") + message_admins("[key_name_admin(usr)] summoned [summon_type ? "magic" : "guns"]!") for(var/mob/living/carbon/human/H in player_list) if(H.stat == 2 || !(H.client)) continue if(H.mind) diff --git a/code/game/machinery/podmen.dm b/code/game/machinery/podmen.dm index 58dc6dc7888..6679fd3b580 100644 --- a/code/game/machinery/podmen.dm +++ b/code/game/machinery/podmen.dm @@ -46,7 +46,6 @@ Growing it to term with nothing injected will grab a ghost from the observers. * if(!source.client && source.mind) for(var/mob/O in respawnable_list) if(O.mind == source.mind && config.revival_pod_plants) - message_admins("Found mind, asking for respawn") switch(alert(O,"Your corpse has been placed into a pod plant. Do you want to be resurrected/cloned? Please note if you select 'No', you will still be able to be cloned or borged again this round.","Pod Alert","Yes","No")) if("Yes") source.key = O.key diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index 5fb04ffbafb..8e2f2d62b92 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -213,8 +213,8 @@ var/pressure = air_contents.return_pressure() if(pressure > TANK_FRAGMENT_PRESSURE) if(!istype(src.loc,/obj/item/device/transfer_valve)) - message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].") - log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast].") + message_admins("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast] (JMP)") + log_game("Explosive tank rupture! last key to touch the tank was [src.fingerprintslast] at [x], [y], [z]") //world << "\blue[x],[y] tank is exploding: [pressure] kPa" //Give the gas a chance to build up more pressure through reacting air_contents.react() diff --git a/code/modules/admin/admin_memo.dm b/code/modules/admin/admin_memo.dm index 133f6d10e90..4a5f2eac73a 100644 --- a/code/modules/admin/admin_memo.dm +++ b/code/modules/admin/admin_memo.dm @@ -27,7 +27,8 @@ if( findtext(memo,"[memo]" - message_admins("[key] set an admin memo:
[memo]") + log_admin("[key_name(usr)] set an admin memo:
[memo]") + message_admins("[key_name_admin(usr)] set an admin memo:
[memo]") //show all memos /client/proc/admin_memo_show() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index b5274601aa3..e004a7b0d83 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -444,7 +444,7 @@ var/list/admin_verbs_mentor = list( if(flash_range == null) return explosion(epicenter, devastation_range, heavy_impact_range, light_impact_range, flash_range, 1, 1) - message_admins("[ckey] creating an admin explosion at [epicenter.loc].") + message_admins("[key_name_admin(usr)] creating an admin explosion at [epicenter.loc].") feedback_add_details("admin_verb","DB") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/give_spell(mob/T as mob in mob_list) // -- Urist @@ -569,8 +569,8 @@ var/list/admin_verbs_mentor = list( set category = "Admin" if(holder) - log_admin("[src] deadmined themself.") - message_admins("[src] deadmined themself.") + log_admin("[key_name(usr)] deadmined themself.") + message_admins("[key_name_admin(usr)] deadmined themself.") deadmin() verbs += /client/proc/readmin deadmins += ckey @@ -614,8 +614,8 @@ var/list/admin_verbs_mentor = list( D = new(rank,admin_ranks[rank],ckey) var/client/C = directory[ckey] D.associate(C) - message_admins("[src] re-adminned themselves.") - log_admin("[src] re-adminned themselves.") + message_admins("[key_name_admin(usr)] re-adminned themselves.") + log_admin("[key_name(usr)] re-adminned themselves.") deadmins -= ckey feedback_add_details("admin_verb","RAS") return diff --git a/code/modules/admin/buildmode.dm b/code/modules/admin/buildmode.dm index cb2b79b9171..88077425c67 100644 --- a/code/modules/admin/buildmode.dm +++ b/code/modules/admin/buildmode.dm @@ -17,7 +17,7 @@ if(H.cl == M.client) qdel(H) else - message_admins("[key_name(usr)] has entered build mode.") + message_admins("[key_name_admin(usr)] has entered build mode.") log_admin("[key_name(usr)] has entered build mode.") M.client.buildmode = 1 M.client.show_popup_menus = 0 diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 78d99749fe4..8c8cd6e9f29 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -3,7 +3,7 @@ if(usr.client != src.owner || !check_rights(0)) log_admin("[key_name(usr)] tried to use the admin panel without authorization.") - message_admins("[usr.key] has attempted to override the admin panel!") + message_admins("[key_name_admin(usr)] has attempted to override the admin panel!") return if(ticker.mode && ticker.mode.check_antagonists_topic(href, href_list)) @@ -124,7 +124,7 @@ if(bancid) banreason = "[banreason] (CUSTOM CID)" else - message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom ip and computer id fields replaced with the ip and computer id from the located mob") + message_admins("Ban process: A mob matching [playermob.ckey] was found at location [playermob.x], [playermob.y], [playermob.z]. Custom IP and computer id fields replaced with the IP and computer id from the located mob") DB_ban_record(bantype, playermob, banduration, banreason, banjob, null, banckey, banip, bancid ) @@ -280,7 +280,7 @@ ticker.delay_end = !ticker.delay_end log_admin("[key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].") - message_admins("\blue [key_name(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1) + message_admins("\blue [key_name_admin(usr)] [ticker.delay_end ? "delayed the round end" : "has made the round end normally"].", 1) href_list["secretsadmin"] = "check_antagonist" else if(href_list["simplemake"]) @@ -1002,8 +1002,8 @@ M << "\red To try to resolve this matter head to [config.banappeals]" else M << "\red No ban appeals URL has been set." - log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") - message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") + log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") + message_admins("\blue [key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis will be removed in [mins] minutes.") del(M.client) //del(M) // See no reason why to delete mob. Important stuff can be lost. And ban can be lifted before round ends. @@ -1024,8 +1024,8 @@ else M << "\red No ban appeals URL has been set." ban_unban_log_save("[usr.client.ckey] has permabanned [M.ckey]. - Reason: [reason] - This is a permanent ban.") - log_admin("[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.") - message_admins("\blue[usr.client.ckey] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.") + log_admin("[key_name(usr)] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.") + message_admins("\blue[key_name_admin(usr)] has banned [M.ckey].\nReason: [reason]\nThis is a permanent ban.") feedback_inc("ban_perma",1) DB_ban_record(BANTYPE_PERMA, M, -1, reason) @@ -1260,7 +1260,7 @@ return log_admin("[key_name(usr)] has sent [key_name(M)] back to the Lobby.") - message_admins("[key_name(usr)] has sent [key_name(M)] back to the Lobby.") + message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] back to the Lobby.") var/mob/new_player/NP = new() NP.ckey = M.ckey @@ -1412,7 +1412,7 @@ L.revive() message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(L)]!", 1) - log_admin("[key_name(usr)] healed / Revived [key_name(L)]") + log_admin("[key_name(usr)] healed / revived [key_name(L)]") else if(href_list["makeai"]) if(!check_rights(R_SPAWN)) return @@ -1604,14 +1604,14 @@ H.equip_to_slot_or_del( new /obj/item/weapon/reagent_containers/food/snacks/cookie(H), slot_r_hand ) if(!(istype(H.r_hand,/obj/item/weapon/reagent_containers/food/snacks/cookie))) log_admin("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].") - message_admins("[key_name(H)] has their hands full, so they did not receive their cookie, spawned by [key_name(src.owner)].") + message_admins("[key_name_admin(H)] has their hands full, so they did not receive their cookie, spawned by [key_name_admin(src.owner)].") return else H.update_inv_r_hand()//To ensure the icon appears in the HUD else H.update_inv_l_hand() log_admin("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]") - message_admins("[key_name(H)] got their cookie, spawned by [key_name(src.owner)]") + message_admins("[key_name_admin(H)] got their cookie, spawned by [key_name_admin(src.owner)]") feedback_inc("admin_cookies_spawned",1) H << "\blue Your prayers have been answered!! You received the best cookie!" @@ -1635,8 +1635,8 @@ BSACooldown = 0 M << "You've been hit by bluespace artillery!" - log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]") - message_admins("[key_name(M)] has been hit by Bluespace Artillery fired by [src.owner]") + log_admin("[key_name(M)] has been hit by Bluespace Artillery fired by [key_name(src.owner)]") + message_admins("[key_name_admin(M)] has been hit by Bluespace Artillery fired by [key_name_admin(src.owner)]") var/obj/effect/stop/S S = new /obj/effect/stop @@ -1674,8 +1674,8 @@ if(!input) return src.owner << "You sent [input] to [H] via a secure channel." - log_admin("[src.owner] replied to [key_name(H)]'s Centcomm message with the message [input].") - message_admins("[src.owner] replied to [key_name(H)]'s Centcom message with: \"[input]\"") + log_admin("[key_name(src.owner)] replied to [key_name(H)]'s Centcomm message with the message [input].") + message_admins("[key_name_admin(src.owner)] replied to [key_name_admin(H)]'s Centcom message with: \"[input]\"") H << "You hear something crackle in your headset for a moment before a voice speaks. \"Please stand by for a message from Central Command. Message as follows. [input]. Message ends.\"" else if(href_list["SyndicateReply"]) @@ -2392,11 +2392,11 @@ S.long_jump(origin_area, destination_area, transition_area, move_duration) message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle", 1) - log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle") + log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] lasting [move_duration] seconds for the [shuttle_tag] shuttle") else S.short_jump(origin_area, destination_area) message_admins("\blue [key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle", 1) - log_admin("[key_name_admin(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle") + log_admin("[key_name(usr)] has initiated a jump from [origin_area] to [destination_area] for the [shuttle_tag] shuttle") if("moveshuttle") diff --git a/code/modules/admin/verbs/adminjump.dm b/code/modules/admin/verbs/adminjump.dm index 932f54f0689..99385ee5ff6 100644 --- a/code/modules/admin/verbs/adminjump.dm +++ b/code/modules/admin/verbs/adminjump.dm @@ -1,30 +1,39 @@ -/client/proc/Jump(var/area/A in return_sorted_areas()) +/client/proc/Jump(area/A in return_sorted_areas()) set name = "Jump to Area" set desc = "Area to jump to" set category = "Admin" - if(!src.holder) - src << "Only administrators may use this command." + + if(!check_rights(R_ADMIN)) return - var/list/area_turfs = get_area_turfs(A) - if(area_turfs && area_turfs.len) - usr.loc = pick(area_turfs) - else - src << "That area has no turfs to jump to!" + if(!A) return + + var/list/turfs = list() + for(var/turf/T in A) + if(T.density) + continue + turfs.Add(T) + + var/turf/T = pick_n_take(turfs) + if(!T) + src << "Nowhere to jump to!" + return + + admin_forcemove(usr, T) log_admin("[key_name(usr)] jumped to [A]") - message_admins("[key_name_admin(usr)] jumped to [A]", 1) + message_admins("[key_name_admin(usr)] jumped to [A]") feedback_add_details("admin_verb","JA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/jumptoturf(var/turf/T in world) set name = "Jump to Turf" set category = "Admin" - if(!src.holder) - src << "Only administrators may use this command." + + if(!check_rights(R_ADMIN)) return - log_admin("[key_name(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]") - message_admins("[key_name_admin(usr)] jumped to [T.x],[T.y],[T.z] in [T.loc]", 1) + log_admin("[key_name(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]") + message_admins("[key_name_admin(usr)] jumped to [T.x], [T.y], [T.z] in [T.loc]", 1) usr.loc = T feedback_add_details("admin_verb","JT") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return @@ -33,8 +42,7 @@ set category = "Admin" set name = "Jump to Mob" - if(!src.holder) - src << "Only administrators may use this command." + if(!check_rights(R_ADMIN)) return log_admin("[key_name(usr)] jumped to [key_name(M)]") @@ -44,7 +52,7 @@ var/turf/T = get_turf(M) if(T && isturf(T)) feedback_add_details("admin_verb","JM") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! - A.loc = T + admin_forcemove(A, M.loc) else A << "This mob is not located in the game world." @@ -52,8 +60,7 @@ set category = "Admin" set name = "Jump to Coordinate" - if (!holder) - src << "Only administrators may use this command." + if(!check_rights(R_ADMIN)) return if(src.mob) @@ -68,8 +75,7 @@ set category = "Admin" set name = "Jump to Key" - if(!src.holder) - src << "Only administrators may use this command." + if(!check_rights(R_ADMIN)) return var/list/keys = list() @@ -82,20 +88,22 @@ var/mob/M = selection:mob log_admin("[key_name(usr)] jumped to [key_name(M)]") message_admins("[key_name_admin(usr)] jumped to [key_name_admin(M)]", 1) - usr.loc = M.loc + + 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! /client/proc/Getmob(var/mob/M in mob_list) set category = "Admin" set name = "Get Mob" set desc = "Mob to teleport" - if(!src.holder) - src << "Only administrators may use this command." + + if(!check_rights(R_ADMIN)) return log_admin("[key_name(usr)] teleported [key_name(M)]") message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)]", 1) - M.loc = get_turf(usr) + 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! /client/proc/Getkey() @@ -103,8 +111,7 @@ set name = "Get Key" set desc = "Key to teleport" - if(!src.holder) - src << "Only administrators may use this command." + if(!check_rights(R_ADMIN)) return var/list/keys = list() @@ -120,19 +127,27 @@ log_admin("[key_name(usr)] teleported [key_name(M)]") message_admins("[key_name_admin(usr)] teleported [key_name(M)]", 1) if(M) - M.loc = get_turf(usr) + admin_forcemove(M, get_turf(usr)) + usr.loc = M.loc feedback_add_details("admin_verb","GK") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/sendmob(var/mob/M in sortmobs()) set category = "Admin" set name = "Send Mob" - if(!src.holder) - src << "Only administrators may use this command." + + if(!check_rights(R_ADMIN)) return + var/area/A = input(usr, "Pick an area.", "Pick an area") in return_sorted_areas() if(A) - M.loc = pick(get_area_turfs(A)) + 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]") - message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1) \ No newline at end of file + message_admins("[key_name_admin(usr)] teleported [key_name_admin(M)] to [A]", 1) + +/proc/admin_forcemove(mob/mover, atom/newloc) + mover.loc = newloc + mover.on_forcemove(newloc) + +/mob/proc/on_forcemove(atom/newloc) + return diff --git a/code/modules/admin/verbs/freeze.dm b/code/modules/admin/verbs/freeze.dm index 128ef87060b..2d3314bd045 100644 --- a/code/modules/admin/verbs/freeze.dm +++ b/code/modules/admin/verbs/freeze.dm @@ -26,8 +26,8 @@ var/global/list/frozen_mob_list = list() /mob/living/proc/admin_Freeze(var/client/admin) if(istype(admin)) - src << "You have been frozen by [admin.key]" - message_admins("\blue [key_name_admin(admin)] froze [key_name(src)]") + src << "You have been frozen by [key_name(admin)]" + message_admins("[key_name_admin(admin)] froze [key_name_admin(src)]") log_admin("[key_name(admin)] froze [key_name(src)]") var/obj/effect/overlay/adminoverlay/AO = new @@ -42,8 +42,8 @@ var/global/list/frozen_mob_list = list() /mob/living/proc/admin_unFreeze(var/client/admin) if(istype(admin)) - src << "You have been unfrozen by [key]" - message_admins("\blue [key_name_admin(admin)] unfroze [key_name(src)]") + src << "You have been unfrozen by [key_name(admin)]" + message_admins("\blue [key_name_admin(admin)] unfroze [key_name_admin(src)]") log_admin("[key_name(admin)] unfroze [key_name(src)]") update_icons() diff --git a/code/modules/admin/verbs/possess.dm b/code/modules/admin/verbs/possess.dm index bb1a6b56480..e6c5659f63b 100644 --- a/code/modules/admin/verbs/possess.dm +++ b/code/modules/admin/verbs/possess.dm @@ -11,10 +11,10 @@ if(T) log_admin("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])") - message_admins("[key_name(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1) + message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at ([T.x], [T.y], [T.z])", 1) else log_admin("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location") - message_admins("[key_name(usr)] has possessed [O] ([O.type]) at an unknown location", 1) + message_admins("[key_name_admin(usr)] has possessed [O] ([O.type]) at an unknown location", 1) if(!usr.control_object) //If you're not already possessing something... usr.name_archive = usr.real_name diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index feb735baef2..7d0f5875986 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -107,7 +107,7 @@ return world << "[msg]" log_admin("GlobalNarrate: [key_name(usr)] : [msg]") - message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)] : [msg]
", 1) + message_admins("\blue \bold GlobalNarrate: [key_name_admin(usr)]: [msg]
", 1) feedback_add_details("admin_verb","GLN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE @@ -128,8 +128,8 @@ return M << msg - log_admin("DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]") - message_admins("\blue \bold DirectNarrate: [key_name(usr)] to ([M.name]/[M.key]): [msg]
", 1) + log_admin("DirectNarrate: [key_name(usr)] to ([key_name(M)]): [msg]") + message_admins("\blue \bold DirectNarrate: [key_name_admin(usr)] to ([key_name_admin(M)]): [msg]
", 1) feedback_add_details("admin_verb","DIRN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! /client/proc/cmd_admin_godmode(mob/M as mob in mob_list) @@ -472,10 +472,6 @@ Traitors and the like can also be revived with the previous role mostly intact. If they don't have a mind, they obviously don't have a special role. */ - //Two variables to properly announce later on. - var/admin = key_name_admin(src) - var/player_key = G_found.key - //Now for special roles and equipment. switch(new_character.mind.special_role) if("traitor") @@ -519,7 +515,7 @@ Traitors and the like can also be revived with the previous role mostly intact. if(alert(new_character,"Would you like an active AI to announce this character?",,"No","Yes")=="Yes") call(/mob/new_player/proc/AnnounceArrival)(new_character, new_character.mind.assigned_role) - message_admins("\blue [admin] has respawned [player_key] as [new_character.real_name].", 1) + message_admins("\blue [key_name_admin(usr)] has respawned [key_name_admin(G_found)] as [new_character.real_name].", 1) new_character << "You have been fully respawned. Enjoy the game." @@ -728,8 +724,8 @@ Traitors and the like can also be revived with the previous role mostly intact. if (heavy || light) empulse(O, heavy, light) - log_admin("[key_name(usr)] created an EM Pulse ([heavy],[light]) at ([O.x],[O.y],[O.z])") - message_admins("[key_name_admin(usr)] created an EM PUlse ([heavy],[light]) at ([O.x],[O.y],[O.z])", 1) + log_admin("[key_name(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])") + message_admins("[key_name_admin(usr)] created an EM pulse ([heavy], [light]) at ([O.x],[O.y],[O.z])", 1) feedback_add_details("admin_verb","EMP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! return diff --git a/code/modules/admin/verbs/ticklag.dm b/code/modules/admin/verbs/ticklag.dm index 928ba733caa..defe8f7d846 100644 --- a/code/modules/admin/verbs/ticklag.dm +++ b/code/modules/admin/verbs/ticklag.dm @@ -11,7 +11,7 @@ //I've used ticks of 2 before to help with serious singulo lags if(newtick && newtick <= 2 && newtick > 0) log_admin("[key_name(src)] has modified world.tick_lag to [newtick]", 0) - message_admins("[key_name(src)] has modified world.tick_lag to [newtick]", 0) + message_admins("[key_name_admin(src)] has modified world.tick_lag to [newtick]", 0) world.tick_lag = newtick feedback_add_details("admin_verb","TICKLAG") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 6c985f2a002..ffb412ceacc 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1532,7 +1532,7 @@ datum/preferences //Debugging report to track down a bug, which randomly assigned the plural gender to people. if(character.gender in list(PLURAL, NEUTER)) if(isliving(src)) //Ghosts get neuter by default - message_admins("[character] ([character.ckey]) has spawned with their gender as plural or neuter. Please notify coders.") + message_admins("[key_name_admin(character)] has spawned with their gender as plural or neuter. Please notify coders.") character.gender = MALE proc/open_load_dialog(mob/user) diff --git a/code/modules/garbage collection/gc_testing.dm b/code/modules/garbage collection/gc_testing.dm index 34467b15b5a..1682f5c5634 100644 --- a/code/modules/garbage collection/gc_testing.dm +++ b/code/modules/garbage collection/gc_testing.dm @@ -11,7 +11,7 @@ garbageCollector.del_everything = !garbageCollector.del_everything // world << "GC: qdel turned [garbageCollector.del_everything ? "off" : "on"]." log_admin("[key_name(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].") - message_admins("\blue [key_name(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].", 1) + message_admins("\blue [key_name_admin(usr)] turned qdel [garbageCollector.del_everything ? "off" : "on"].", 1) /client/proc/gc_toggle_profiling() set name = "(GC) Toggle Profiling" @@ -23,7 +23,7 @@ del_profiling = !del_profiling log_admin("[key_name(usr)] turned deletion profiling [del_profiling ? "on" : "off"].") - message_admins("\blue [key_name(usr)] turned deletion profiling [del_profiling ? "on" : "off"].", 1) + message_admins("\blue [key_name_admin(usr)] turned deletion profiling [del_profiling ? "on" : "off"].", 1) /client/proc/gc_show_del_report() set name = "(GC) Show Del Report" diff --git a/code/modules/library/lib_machines.dm b/code/modules/library/lib_machines.dm index 22f90482727..b41f77a0b42 100644 --- a/code/modules/library/lib_machines.dm +++ b/code/modules/library/lib_machines.dm @@ -352,7 +352,7 @@ datum/borrowbook // Datum used to keep track of who has borrowed what when and f usr << query.ErrorMsg() else log_game("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs") - message_admins("[usr.name]/[usr.key] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs") + message_admins("[key_name_admin(usr)] has uploaded the book titled [scanner.cache.name], [length(scanner.cache.dat)] signs") alert("Upload Complete.") if(href_list["targetid"]) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 0406f46cc22..6a2722470b2 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -330,9 +330,11 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set category = "Ghost" set name = "Teleport" set desc= "Teleport to a location" - if(!istype(usr, /mob/dead/observer)) + + if(!isobserver(usr)) usr << "Not when you're not dead!" return + usr.verbs -= /mob/dead/observer/proc/dead_tele spawn(30) usr.verbs += /mob/dead/observer/proc/dead_tele @@ -348,7 +350,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp if(!L || !L.len) usr << "No area available." - usr.loc = pick(L) + usr.forceMove(pick(L)) /mob/dead/observer/verb/follow() set category = "Ghost" diff --git a/code/modules/mob/living/carbon/brain/brain.dm b/code/modules/mob/living/carbon/brain/brain.dm index 89e52b7e5ab..6265b1bdd9e 100644 --- a/code/modules/mob/living/carbon/brain/brain.dm +++ b/code/modules/mob/living/carbon/brain/brain.dm @@ -62,6 +62,14 @@ /mob/living/carbon/brain/blob_act() return + + +/mob/living/carbon/brain/on_forcemove(atom/newloc) + if(container) + container.loc = newloc + else //something went very wrong. + CRASH("Brainmob without container.") + loc = container /mob/living/carbon/brain/binarycheck() return istype(loc, /obj/item/device/mmi/posibrain) \ No newline at end of file diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index a8d9d90958b..d0ae61919c9 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -115,7 +115,7 @@ //we're good to suck the blood, blaah M.handle_bloodsucking(src) add_logs(src, M, "vampirebit") - message_admins("[M.name] ([M.ckey]) vampirebit [src.name] ([src.ckey])") + msg_admin_attack("[key_name_admin(M)] vampirebit [key_name_admin(src)]") return //end vampire codes diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index 835a4f3e240..b9f85576e01 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -521,4 +521,11 @@ // No binary for pAIs. /mob/living/silicon/pai/binarycheck() - return 0 \ No newline at end of file + return 0 + +/mob/living/silicon/pai/on_forcemove(atom/newloc) + if(card) + card.loc = newloc + else //something went very wrong. + CRASH("pAI without card") + loc = card diff --git a/code/modules/mob/logout.dm b/code/modules/mob/logout.dm index 8be55390b17..fdc342876dc 100644 --- a/code/modules/mob/logout.dm +++ b/code/modules/mob/logout.dm @@ -6,7 +6,7 @@ if (ticker && ticker.current_state == GAME_STATE_PLAYING) //Only report this stuff if we are currently playing. var/admins_number = admins.len - message_admins("Admin logout: [key_name(src)]") + message_admins("Admin logout: [key_name_admin(src)]") if(admins_number == 0) //Apparently the admin logging out is no longer an admin at this point, so we have to check this towards 0 and not towards 1. Awell. send2adminirc("[key_name(src)] logged out - no more admins online.") ..() diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 211cc4cfc34..efeb2e60a30 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -333,8 +333,8 @@ for(var/bad in paper_blacklist) if(findtext(t,bad)) usr << "\blue You think to yourself, \"Hm.. this is only paper...\"" - log_admin("PAPER: [usr] ([usr.ckey]) tried to use forbidden word in [src]: [bad].") - message_admins("PAPER: [usr] ([usr.ckey]) tried to use forbidden word in [src]: [bad].") + log_admin("PAPER: [key_name(usr)] tried to use forbidden word in [src]: [bad].") + message_admins("PAPER: [key_name_admin(usr)] tried to use forbidden word in [src]: [bad].") return */ t = html_encode(t) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 795990fef40..863bdc19b32 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -215,10 +215,17 @@ var/const/GRAV_NEEDS_WRENCH = 3 /obj/machinery/gravity_generator/main/attack_hand(mob/user as mob) if(!..()) return interact(user) + +/obj/machinery/gravity_generator/main/attack_ai(mob/user as mob) + return 1 + +/obj/machinery/gravity_generator/main/attack_ghost(mob/user as mob) + return interact(user) /obj/machinery/gravity_generator/main/interact(mob/user as mob) if(stat & BROKEN) return + var/dat = "Gravity Generator Breaker: " if(breaker) dat += "ON OFF" @@ -241,9 +248,8 @@ var/const/GRAV_NEEDS_WRENCH = 3 /obj/machinery/gravity_generator/main/Topic(href, href_list) - if(..()) - return + return 1 if(href_list["gentoggle"]) breaker = !breaker diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index fa8c14fe1b0..a61c4dff501 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -113,7 +113,7 @@ /obj/singularity/proc/admin_investigate_setup() last_warning = world.time var/count = locate(/obj/machinery/containment_field) in orange(30, src) - if(!count) message_admins("A singulo has been created without containment fields active ([x],[y],[z])",1) + if(!count) message_admins("A singularity has been created without containment fields active at [x], [y], [z] (JMP)") investigate_log("was created. [count?"":"No containment fields were active"]","singulo") /obj/singularity/proc/dissipate() diff --git a/code/world.dm b/code/world.dm index e56ce1ce9c8..ab86fee03f9 100644 --- a/code/world.dm +++ b/code/world.dm @@ -67,6 +67,9 @@ var/global/datum/global_init/init = new () master_controller.setup() + process_teleport_locs() //Sets up the wizard teleport locations + process_ghost_teleport_locs() //Sets up ghost teleport locations. + #ifdef MAP_NAME map_name = "[MAP_NAME]" #else @@ -265,13 +268,13 @@ var/world_topic_spam_protect_time = world.timeofday sleep(600) if(!C.client && C.stat != DEAD && C.brain_op_stage!=4.0) job_master.FreeRole(C.job) - message_admins("[C.name] ([C.ckey]), the [C.job] has been freed due to (Client disconnect for 10 minutes)\n") + message_admins("[key_name_admin(C)], the [C.job] has been freed due to (Client disconnect for 10 minutes)\n") for(var/obj/item/W in C) C.unEquip(W) del(C) else if(!C.key && C.stat != DEAD && C.brain_op_stage!=4.0) job_master.FreeRole(C.job) - message_admins("[C.name] ([C.ckey]), the [C.job] has been freed due to (Client quit BYOND)\n") + message_admins("[key_name_admin(C)], the [C.job] has been freed due to (Client quit BYOND)\n") for(var/obj/item/W in C) C.unEquip(W) del(C)