diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index da1b4800e9..59765bcf6d 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -167,10 +167,10 @@ client if(istype(D,/atom)) var/atom/A = D - body += "[D]" - if(A.dir) - body += "
<< [dir2text(A.dir)] >>" - if(istype(A,/mob)) + if(ismob(A)) + body += "[D]" + if(A.dir) + body += "
<< [dir2text(A.dir)] >>" var/mob/M = A body += "
[M.ckey ? M.ckey : "No ckey"] / [M.real_name ? M.real_name : "No real name"]" body += {" @@ -185,6 +185,10 @@ client "} + else + body += "[D]" + if(A.dir) + body += "
<< [dir2text(A.dir)] >>" else body += "[D]" @@ -239,7 +243,8 @@ client body += "" body += "" body += "" -// body += "" + body += "" + body += "" if(ishuman(D)) body += "" body += "" @@ -389,6 +394,31 @@ client if (href_list["Vars"]) debug_variables(locate(href_list["Vars"])) + + //~CARN: for renaming mobs (updates their real_name and their ID/PDA if applicable). + else if (href_list["rename"]) + var/new_name = input(usr,"What would you like to name this mob?","Input a name") as text|null + if(!new_name) return + var/mob/M = locate(href_list["rename"]) + if(!istype(M)) return + + message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].", 1) + if(istype(M, /mob/living/carbon/human)) + for(var/obj/item/weapon/card/id/ID in M.contents) + if(ID.registered_name == M.real_name) + ID.name = "[new_name]'s ID Card ([ID.assignment])" + ID.registered_name = new_name + break + for(var/obj/item/device/pda/PDA in M.contents) + if(PDA.owner == M.real_name) + PDA.name = "PDA-[new_name] ([PDA.ownjob])" + PDA.owner = new_name + break + M.real_name = new_name + M.name = new_name + M.original_name = new_name + href_list["datumrefresh"] = href_list["rename"] + else if (href_list["varnameedit"]) if(!href_list["datumedit"] || !href_list["varnameedit"]) usr << "Varedit error: Not all information has been sent Contact a coder." @@ -498,6 +528,20 @@ client togglebuildmode(MOB) href_list["datumrefresh"] = href_list["build_mode"] + else if (href_list["drop_everything"]) + if(!href_list["drop_everything"]) + return + var/mob/MOB = locate(href_list["drop_everything"]) + if(!MOB) + return + if(!ismob(MOB)) + return + if(!src.holder) + return + + if(usr.client) + usr.client.cmd_admin_drop_everything(MOB) + else if (href_list["direct_control"]) if(!href_list["direct_control"]) return diff --git a/code/defines/procs/helpers.dm b/code/defines/procs/helpers.dm index dfdbeaa8e5..0e65f4f618 100644 --- a/code/defines/procs/helpers.dm +++ b/code/defines/procs/helpers.dm @@ -1829,6 +1829,13 @@ proc/get_opposite(var/checkdir) count++ return count +proc/get_mob_with_client_list() + var/list/mobs = list() + for(var/mob/M in world) + if (M.client) + mobs += M + return mobs + /proc/reverse_direction(var/dir) switch(dir) if(NORTH) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 50dcb16dcb..34da1f2daa 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -2231,6 +2231,7 @@ var/global/BSACooldown = 0 set category = "Admin" set name = "Show Player Panel" set desc="Edit player (respawn, ban, heal, etc)" + if(!M) usr << "You seem to be selecting a mob that doesn't exist anymore." return @@ -2239,60 +2240,123 @@ var/global/BSACooldown = 0 if (!istype(src,/obj/admins)) usr << "Error: you are not an admin!" return - var/dat = "Options for [M.key]" - var/foo = " " - if (ismob(M) && M.client) -// if(!M.client.authenticated && !M.client.authenticating) -// foo += text("Authorize | ") -// else -// foo += text("Authorized | ") - foo += text("Promote/Demote | ") + + var/body = "Options for [M.key]" + body += "Options panel for [M]" + if(M.client) + body += " played by [M.client] " + if(M.client.holder) + body += "\[[M.client.holder.rank]\]" + else + body += "\[Player\]" + + if(istype(M, /mob/new_player)) + body += " Hasn't Entered Game " + else + body += " \[Heal\] " + + body += "

\[ " + body += "VV - " + body += "TP - " + body += "PM - " + body += "SM - " + body += "JMP\]
" + + body += "Mob type = [M.type]

" + + body += "Kick | " + body += "Ban | " + body += "Jobban " + + if(M.client) + body += "| Prison | " + body += "Mute: " + if(M.client.muted_complete) + body += "Completely Muted: (Allow adminhelp)" + else + if(M.client.muted) + body += "Soft Mute: (Unmute) (Mute adminhelps)" + else + body += "Voiced: (Mute)" + + body += "

" + body += "Jump to | " + body += "Get" + + body += "

" + body += "Traitor panel | " + body += "Narrate to | " + body += "Subtle message" + + if (M.client) if(!istype(M, /mob/new_player)) - if(!ismonkey(M)) - foo += text("Monkeyize | ") + body += "

" + body += "Transformation:" + body += "
" + + //Monkey + if(ismonkey(M)) + body += "Monkeyized | " else - foo += text("Monkeyized | ") - if(!iscorgi(M)) - foo += text("Corgize | ") + body += "Monkeyize | " + + //Corgi + if(iscorgi(M)) + body += "Corgized | " else - foo += text("Corgized | ") + body += "Corgize | " + + //AI / Cyborg if(isAI(M)) - foo += text("Is an AI | ") + body += "Is an AI " else if(ishuman(M)) - foo += text("Make AI | ") - foo += text("Make AI Silently | ") - foo += text("Make Robot | ") - foo += text("Make Alien | ") - foo += text("Make Metroid | ") - foo += text("Thunderdome 1 | ") - foo += text("Thunderdome 2 | ") - foo += text("Thunderdome Admin | ") - foo += text("Thunderdome Observer | ") - foo += text("Prison | ") - // foo += text("Maze | ") - foo += text("Heal/Revive | ") - else - foo += text("Hasn't Entered Game | ") - foo += text("Forcesay | ") - if(M.client) - foo += text("Mute: [(M.client.muted ? "Muted" : "Voiced")] | ") - foo += text("Complete mute: [(M.client.muted ? "Completely Muted" : "Voiced")] | ") - else - foo += "Mute unavailable - no client" - foo += text("Boot") - foo += text("
") - foo += text("Jump to | ") - foo += text("Get | ") - foo += text("Send") - foo += text("
") - foo += text("Edit mind | ") - foo += text("Narrate to | ") - foo += text("Subtle message") - foo += text("
") - foo += text("Ban | ") - foo += text("Jobban") - dat += text("[foo]") - usr << browse(dat, "window=adminplayeropts;size=480x150") + body += "Make AI | " + body += "Make AI Silently | " + body += "Make Robot | " + body += "Make Alien | " + body += "Make Metroid " + + body += "

" + body += "Rudimentary transformation:
These transformations only create a new mob type and copy stuff over. They do not take into account MMIs and similar mob-specific things. The buttons in 'Transformations' are preferred, when possible.

" + body += "Observer | " + body += "\[ Alien: Drone, " + body += "Hunter, " + body += "Queen, " + body += "Sentinel, " + body += "Larva \] " + body += "Human " + body += "\[ Metroid: Baby, " + body += "Adult \] " + body += "Monkey | " + body += "Cyborg | " + body += "Cat | " + body += "Runtime | " + body += "Corgi | " + body += "Ian | " + body += "Crab | " + body += "Coffee | " + //body += "Parrot | " + //body += "DrProfessor | " + body += "\[ Construct: Armoured , " + body += "Builder , " + body += "Wraith \] " + body += "Shade" + body += "
" + + if (M.client) + body += "

" + body += "Other actions:" + body += "
" + body += "Forcesay | " + body += "Thunderdome 1 | " + body += "Thunderdome 2 | " + body += "Thunderdome Admin | " + body += "Thunderdome Observer | " + + body += "
" + body += "" + + usr << browse(body, "window=adminplayeropts;size=550x515") //feedback_add_details("admin_verb","SPP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 428292633b..e8f711d2ff 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -64,7 +64,7 @@ verbs += /client/proc/cmd_admin_delete verbs += /client/proc/cmd_admin_add_freeform_ai_law verbs += /client/proc/cmd_admin_rejuvenate - verbs += /client/proc/cmd_admin_drop_everything + //verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables //verbs += /client/proc/cmd_modify_object_variables --Merged with view variables if ("Admin Candidate") @@ -127,11 +127,11 @@ verbs += /obj/admins/proc/votekill verbs += /obj/admins/proc/show_player_panel verbs += /client/proc/deadchat //toggles deadchat - verbs += /client/proc/cmd_admin_mute + //verbs += /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro verbs += /client/proc/cmd_admin_pm_context verbs += /client/proc/cmd_admin_pm_panel verbs += /client/proc/cmd_admin_subtle_message - verbs += /client/proc/warn + //verbs += /client/proc/warn - was never used verbs += /client/proc/dsay verbs += /client/proc/admin_play verbs += /client/proc/admin_observe @@ -140,7 +140,7 @@ verbs += /client/proc/player_panel_new verbs += /client/proc/unban_panel verbs += /client/proc/jobbans - verbs += /client/proc/playernotes + verbs += /client/proc/voting verbs += /client/proc/hide_verbs verbs += /client/proc/general_report @@ -148,6 +148,7 @@ verbs += /client/proc/deadmin_self //verbs += /client/proc/cmd_admin_prison --Merged with player panel //verbs += /obj/admins/proc/unprison --Merged with player panel + verbs += /client/proc/playernotes verbs += /obj/admins/proc/show_skills else return @@ -244,9 +245,8 @@ verbs += /client/proc/mapload verbs += /client/proc/check_words verbs += /client/proc/drop_bomb - verbs += /client/proc/cmd_admin_grantfullaccess verbs += /client/proc/kill_airgroup - verbs += /client/proc/cmd_admin_drop_everything + //verbs += /client/proc/cmd_admin_drop_everything --Merged with view variables verbs += /client/proc/make_sound verbs += /client/proc/play_local_sound verbs += /client/proc/send_space_ninja @@ -350,8 +350,7 @@ verbs -= /client/proc/mapload verbs -= /client/proc/check_words verbs -= /client/proc/drop_bomb - verbs -= /client/proc/cmd_admin_grantfullaccess - verbs -= /client/proc/cmd_admin_drop_everything + //verbs -= /client/proc/cmd_admin_drop_everything --merged with view variables verbs -= /client/proc/make_sound verbs -= /client/proc/only_one verbs -= /client/proc/send_space_ninja @@ -379,17 +378,18 @@ verbs -= /client/proc/spawn_xeno verbs -= /client/proc/cmd_admin_add_random_ai_law verbs -= /client/proc/secrets + verbs -= /client/proc/check_antagonists verbs -= /client/proc/play_sound verbs -= /client/proc/stealth verbs -= /client/proc/cmd_admin_check_contents verbs -= /client/proc/cmd_admin_create_centcom_report verbs -= /client/proc/deadchat //toggles deadchat - verbs -= /client/proc/cmd_admin_mute + //verbs -= /client/proc/cmd_admin_mute --was never used (according to stats trackind) - use show player panel --erro verbs -= /client/proc/cmd_admin_pm_context verbs -= /client/proc/cmd_admin_pm_panel verbs -= /client/proc/cmd_admin_say verbs -= /client/proc/cmd_admin_subtle_message - verbs -= /client/proc/warn + //verbs -= /client/proc/warn verbs -= /client/proc/dsay verbs -= /client/proc/admin_play verbs -= /client/proc/admin_observe diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index b638cdd67c..a899f823dd 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -140,6 +140,9 @@ var/intercom_range_display_status = 0 src.verbs += /client/proc/jump_to_dead_group src.verbs += /client/proc/startSinglo src.verbs += /client/proc/ticklag //allows you to set the ticklag. + src.verbs += /client/proc/cmd_admin_grantfullaccess + //src.verbs += /client/proc/cmd_admin_rejuvenate + //feedback_add_details("admin_verb","mDV") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! count_objects_on_z_level() diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 1ddc96cbe7..1a3a8199b8 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -4,6 +4,11 @@ if(!holder) src << "Only administrators may use this command." return + + var/confirm = alert(src, "Make [M] drop everything?", "Message", "Yes", "No") + if(confirm != "Yes") + return + for(var/obj/item/W in M) M.drop_from_slot(W) @@ -77,14 +82,25 @@ 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(mob/M as mob in world) // Targetted narrate -- TLE +/client/proc/cmd_admin_direct_narrate(var/mob/M) // Targetted narrate -- TLE set category = "Special Verbs" set name = "Direct Narrate" if(!holder) src << "Only administrators may use this command." return + + if(!M) + M = input("Direct narrate to who?", "Active Players") as null|anything in get_mob_with_client_list() + + if(!M) + return + var/msg = input("Message:", text("Enter the text you wish to appear to your target:")) as text + + if( !msg ) + 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) @@ -457,51 +473,7 @@ Traitors and the like can also be revived with the previous role mostly intact. alert("Cannot revive a ghost") return if(config.allow_admin_rev) - //M.fireloss = 0 - M.setToxLoss(0) - //M.bruteloss = 0 - M.setOxyLoss(0) - M.SetParalysis(0) - M.SetStunned(0) - M.SetWeakened(0) - M.radiation = 0 - //M.health = 100 - M.nutrition = 400 - M.bodytemperature = initial(M.bodytemperature) - M.heal_overall_damage(1000, 1000) - //M.updatehealth() - M.buckled = initial(M.buckled) - M.handcuffed = initial(M.handcuffed) - if(istype(M,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - for(var/name in H.organs) - var/datum/organ/external/e = H.organs[name] - e.brute_dam = 0.0 - e.burn_dam = 0.0 - e.bandaged = 0.0 - e.max_damage = initial(e.max_damage) - e.bleeding = 0 - e.open = 0 - e.broken = 0 - e.destroyed = 0 - e.perma_injury = 0 - e.update_icon() - for(var/datum/organ/wound/W in e.wounds) - if(W.bleeding || !W.is_healing) - W.stopbleeding() - del(H.vessel) - H.vessel = new/datum/reagents(560) - H.vessel.my_atom = H - H.vessel.add_reagent("blood",560) - spawn(1) - H.fixblood() - H.pale = 0 - H.update_body() - H.update_face() - H.UpdateDamageIcon() - if (M.stat > 1) - M.stat=0 - ..() + M.revive() log_admin("[key_name(usr)] healed / revived [key_name(M)]") message_admins("\red Admin [key_name_admin(usr)] healed / revived [key_name_admin(M)]!", 1) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index f272027a12..bbcbfcbf57 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -218,10 +218,50 @@ SetStunned(0) SetWeakened(0) //src.health = 100 + if(ishuman(src)) + src.radiation = 0 + //M.health = 100 + src.nutrition = 400 + src.bodytemperature = initial(src.bodytemperature) + src.heal_overall_damage(1000, 1000) + //M.updatehealth() + src.buckled = initial(src.buckled) + src.handcuffed = initial(src.handcuffed) + if(istype(src,/mob/living/carbon/human)) + var/mob/living/carbon/human/H = src + for(var/name in H.organs) + var/datum/organ/external/e = H.organs[name] + e.brute_dam = 0.0 + e.burn_dam = 0.0 + e.bandaged = 0.0 + e.max_damage = initial(e.max_damage) + e.bleeding = 0 + e.open = 0 + e.broken = 0 + e.destroyed = 0 + e.perma_injury = 0 + e.update_icon() + for(var/datum/organ/wound/W in e.wounds) + if(W.bleeding || !W.is_healing) + W.stopbleeding() + del(H.vessel) + H.vessel = new/datum/reagents(560) + H.vessel.my_atom = H + H.vessel.add_reagent("blood",560) + spawn(1) + H.fixblood() + H.pale = 0 + H.update_body() + H.update_face() + H.UpdateDamageIcon() + if (src.stat > 1) + src.stat=0 + ..() src.heal_overall_damage(1000, 1000) src.buckled = initial(src.buckled) src.handcuffed = initial(src.handcuffed) - if(src.stat > 1) src.stat = CONSCIOUS + if(src.stat > 1) + src.stat = CONSCIOUS ..() return