mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Reduction of admin right-click verbs.
Removes verbs which only works on specific mob types from the admin right-click context. Fixes #9627. Fixes #9628.
This commit is contained in:
@@ -7,6 +7,8 @@ var/list/directory = list() //list of all ckeys with associated client
|
|||||||
|
|
||||||
var/global/list/player_list = list() //List of all mobs **with clients attached**. Excludes /mob/new_player
|
var/global/list/player_list = list() //List of all mobs **with clients attached**. Excludes /mob/new_player
|
||||||
var/global/list/mob_list = list() //List of all mobs, including clientless
|
var/global/list/mob_list = list() //List of all mobs, including clientless
|
||||||
|
var/global/list/human_mob_list = list() //List of all human mobs and sub-types, including clientless
|
||||||
|
var/global/list/silicon_mob_list = list() //List of all silicon mobs, including clientless
|
||||||
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
|
var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player
|
||||||
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player
|
||||||
|
|
||||||
|
|||||||
@@ -1236,7 +1236,7 @@ var/global/floorIsLava = 0
|
|||||||
if(!ai_number)
|
if(!ai_number)
|
||||||
usr << "<b>No AIs located</b>" //Just so you know the thing is actually working and not just ignoring you.
|
usr << "<b>No AIs located</b>" //Just so you know the thing is actually working and not just ignoring you.
|
||||||
|
|
||||||
/datum/admins/proc/show_skills(var/mob/living/carbon/human/M as mob in world)
|
/datum/admins/proc/show_skills()
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
set name = "Show Skills"
|
set name = "Show Skills"
|
||||||
|
|
||||||
@@ -1246,6 +1246,9 @@ var/global/floorIsLava = 0
|
|||||||
usr << "Error: you are not an admin!"
|
usr << "Error: you are not an admin!"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/M = input("Select mob.", "Select mob.") as null|anything in human_mob_list
|
||||||
|
if(!M) return
|
||||||
|
|
||||||
show_skill_window(usr, M)
|
show_skill_window(usr, M)
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -708,66 +708,70 @@ var/list/admin_verbs_mentor = list(
|
|||||||
if(holder)
|
if(holder)
|
||||||
src.holder.output_ai_laws()
|
src.holder.output_ai_laws()
|
||||||
|
|
||||||
/client/proc/rename_silicon(mob/living/silicon/S in mob_list)
|
/client/proc/rename_silicon()
|
||||||
set name = "Rename Silicon"
|
set name = "Rename Silicon"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
|
|
||||||
if(!istype(S))
|
if(!check_rights(R_ADMIN)) return
|
||||||
return
|
|
||||||
|
|
||||||
if(holder)
|
var/mob/living/silicon/S = input("Select silicon.", "Rename Silicon.") as null|anything in silicon_mob_list
|
||||||
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "Enter new silicon name", S.real_name))
|
if(!S) return
|
||||||
if(new_name && new_name != S.real_name)
|
|
||||||
admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
|
var/new_name = sanitizeSafe(input(src, "Enter new name. Leave blank or as is to cancel.", "[S.real_name] - Enter new silicon name", S.real_name))
|
||||||
S.SetName(new_name)
|
if(new_name && new_name != S.real_name)
|
||||||
|
admin_log_and_message_admins("has renamed the silicon '[S.real_name]' to '[new_name]'")
|
||||||
|
S.SetName(new_name)
|
||||||
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","RAI") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/manage_silicon_laws(mob/living/silicon/S in mob_list)
|
/client/proc/manage_silicon_laws()
|
||||||
set name = "Manage Silicon Laws"
|
set name = "Manage Silicon Laws"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
|
|
||||||
if(!istype(S))
|
if(!check_rights(R_ADMIN)) return
|
||||||
return
|
|
||||||
|
|
||||||
if(holder)
|
var/mob/living/silicon/S = input("Select silicon.", "Manage Silicon Laws") as null|anything in silicon_mob_list
|
||||||
var/obj/nano_module/law_manager/L = new(S)
|
if(!S) return
|
||||||
L.ui_interact(usr, state = admin_state)
|
|
||||||
|
var/obj/nano_module/law_manager/L = new(S)
|
||||||
|
L.ui_interact(usr, state = admin_state)
|
||||||
admin_log_and_message_admins("has opened [S]'s law manager.")
|
admin_log_and_message_admins("has opened [S]'s law manager.")
|
||||||
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","MSL") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/change_human_appearance_admin(mob/living/carbon/human/H in world)
|
/client/proc/change_human_appearance_admin()
|
||||||
set name = "Change Mob Appearance - Admin"
|
set name = "Change Mob Appearance - Admin"
|
||||||
set desc = "Allows you to change the mob appearance"
|
set desc = "Allows you to change the mob appearance"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
|
|
||||||
if(!istype(H))
|
if(!check_rights(R_FUN)) return
|
||||||
return
|
|
||||||
|
|
||||||
if(holder)
|
var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Admin") as null|anything in human_mob_list
|
||||||
admin_log_and_message_admins("is altering the appearance of [H].")
|
if(!H) return
|
||||||
H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0, state = admin_state)
|
|
||||||
|
admin_log_and_message_admins("is altering the appearance of [H].")
|
||||||
|
H.change_appearance(APPEARANCE_ALL, usr, usr, check_species_whitelist = 0, state = admin_state)
|
||||||
feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","CHAA") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/change_human_appearance_self(mob/living/carbon/human/H in mob_list)
|
/client/proc/change_human_appearance_self()
|
||||||
set name = "Change Mob Appearance - Self"
|
set name = "Change Mob Appearance - Self"
|
||||||
set desc = "Allows the mob to change its appearance"
|
set desc = "Allows the mob to change its appearance"
|
||||||
set category = "Admin"
|
set category = "Admin"
|
||||||
|
|
||||||
if(!istype(H))
|
if(!check_rights(R_FUN)) return
|
||||||
return
|
|
||||||
|
var/mob/living/carbon/human/H = input("Select mob.", "Change Mob Appearance - Self") as null|anything in human_mob_list
|
||||||
|
if(!H) return
|
||||||
|
|
||||||
if(!H.client)
|
if(!H.client)
|
||||||
usr << "Only mobs with clients can alter their own appearance."
|
usr << "Only mobs with clients can alter their own appearance."
|
||||||
return
|
return
|
||||||
|
|
||||||
if(holder)
|
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
||||||
switch(alert("Do you wish for [H] to be allowed to select non-whitelisted races?","Alter Mob Appearance","Yes","No","Cancel"))
|
if("Yes")
|
||||||
if("Yes")
|
admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.")
|
||||||
admin_log_and_message_admins("has allowed [H] to change \his appearance, without whitelisting of races.")
|
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0)
|
||||||
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 0)
|
if("No")
|
||||||
if("No")
|
admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.")
|
||||||
admin_log_and_message_admins("has allowed [H] to change \his appearance, with whitelisting of races.")
|
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
|
||||||
H.change_appearance(APPEARANCE_ALL, H.loc, check_species_whitelist = 1)
|
|
||||||
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
feedback_add_details("admin_verb","CMAS") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
|
|
||||||
/client/proc/change_security_level()
|
/client/proc/change_security_level()
|
||||||
@@ -792,12 +796,14 @@ var/list/admin_verbs_mentor = list(
|
|||||||
// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
// feedback_add_details("admin_verb","MP") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
|
||||||
return
|
return
|
||||||
|
|
||||||
/client/proc/editappear(mob/living/carbon/human/M as mob in mob_list)
|
/client/proc/editappear()
|
||||||
set name = "Edit Appearance"
|
set name = "Edit Appearance"
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
|
|
||||||
if(!check_rights(R_FUN)) return
|
if(!check_rights(R_FUN)) return
|
||||||
|
|
||||||
|
var/mob/living/carbon/human/M = input("Select mob.", "Edit Appearance") as null|anything in human_mob_list
|
||||||
|
|
||||||
if(!istype(M, /mob/living/carbon/human))
|
if(!istype(M, /mob/living/carbon/human))
|
||||||
usr << "\red You can only do this to humans!"
|
usr << "\red You can only do this to humans!"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -516,12 +516,13 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
|
|||||||
for(var/areatype in areas_without_camera)
|
for(var/areatype in areas_without_camera)
|
||||||
world << "* [areatype]"
|
world << "* [areatype]"
|
||||||
|
|
||||||
/client/proc/cmd_admin_dress(var/mob/living/carbon/human/M in mob_list)
|
/client/proc/cmd_admin_dress()
|
||||||
set category = "Fun"
|
set category = "Fun"
|
||||||
set name = "Select equipment"
|
set name = "Select equipment"
|
||||||
if(!ishuman(M))
|
|
||||||
alert("Invalid mob")
|
var/mob/living/carbon/human/M = input("Select mob.", "Select equipment.") as null|anything in human_mob_list
|
||||||
return
|
if(!M) return
|
||||||
|
|
||||||
//log_admin("[key_name(src)] has alienized [M.key].")
|
//log_admin("[key_name(src)] has alienized [M.key].")
|
||||||
var/list/dresspacks = list(
|
var/list/dresspacks = list(
|
||||||
"strip",
|
"strip",
|
||||||
|
|||||||
@@ -37,6 +37,7 @@
|
|||||||
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
hud_list[SPECIALROLE_HUD] = image('icons/mob/hud.dmi', src, "hudblank")
|
||||||
hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
hud_list[STATUS_HUD_OOC] = image('icons/mob/hud.dmi', src, "hudhealthy")
|
||||||
|
|
||||||
|
human_mob_list |= src
|
||||||
..()
|
..()
|
||||||
|
|
||||||
if(dna)
|
if(dna)
|
||||||
@@ -44,6 +45,7 @@
|
|||||||
make_blood()
|
make_blood()
|
||||||
|
|
||||||
/mob/living/carbon/human/Destroy()
|
/mob/living/carbon/human/Destroy()
|
||||||
|
human_mob_list -= src
|
||||||
for(var/organ in organs)
|
for(var/organ in organs)
|
||||||
qdel(organ)
|
qdel(organ)
|
||||||
return ..()
|
return ..()
|
||||||
|
|||||||
@@ -27,11 +27,13 @@
|
|||||||
#define MED_HUD 2 //Medical HUD mode
|
#define MED_HUD 2 //Medical HUD mode
|
||||||
|
|
||||||
/mob/living/silicon/New()
|
/mob/living/silicon/New()
|
||||||
|
silicon_mob_list |= src
|
||||||
..()
|
..()
|
||||||
add_language("Galactic Common")
|
add_language("Galactic Common")
|
||||||
init_subsystems()
|
init_subsystems()
|
||||||
|
|
||||||
/mob/living/silicon/Destroy()
|
/mob/living/silicon/Destroy()
|
||||||
|
silicon_mob_list -= src
|
||||||
for(var/datum/alarm_handler/AH in alarm_manager.all_handlers)
|
for(var/datum/alarm_handler/AH in alarm_manager.all_handlers)
|
||||||
AH.unregister(src)
|
AH.unregister(src)
|
||||||
..()
|
..()
|
||||||
|
|||||||
Reference in New Issue
Block a user