From c351205d2339965fcaafd542eff6f7c4ac637e1c Mon Sep 17 00:00:00 2001 From: Chaplain Maximum Date: Mon, 27 May 2024 19:57:37 +0300 Subject: [PATCH 1/3] Admin tool for Void MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ту-ту-ту --- void-marines/code/admin_tools.dm | 59 ++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 void-marines/code/admin_tools.dm diff --git a/void-marines/code/admin_tools.dm b/void-marines/code/admin_tools.dm new file mode 100644 index 0000000000..b0a970222d --- /dev/null +++ b/void-marines/code/admin_tools.dm @@ -0,0 +1,59 @@ +/client/proc/editappearplayer(mob/living/carbon/human/M as mob in GLOB.human_mob_list) + set name = "Edit Appearance | Player" + set category = null + + if(!check_rights(R_ADMIN)) return + + if(!istype(M, /mob/living/carbon/human)) + to_chat(usr, SPAN_DANGER("You can only do this to humans!")) + return + switch(alert("Are you sure you wish to edit this mob's appearance?",,"Yes","No")) + if("No") + return + var/new_facial = input(M, "Please select facial hair color.", "Character Generation") as color + if(new_facial) + M.r_facial = hex2num(copytext(new_facial, 2, 4)) + M.g_facial = hex2num(copytext(new_facial, 4, 6)) + M.b_facial = hex2num(copytext(new_facial, 6, 8)) + + var/new_hair = input(M, "Please select hair color.", "Character Generation") as color + if(new_facial) + M.r_hair = hex2num(copytext(new_hair, 2, 4)) + M.g_hair = hex2num(copytext(new_hair, 4, 6)) + M.b_hair = hex2num(copytext(new_hair, 6, 8)) + + var/new_eyes = input(M, "Please select eye color.", "Character Generation") as color + if(new_eyes) + M.r_eyes = hex2num(copytext(new_eyes, 2, 4)) + M.g_eyes = hex2num(copytext(new_eyes, 4, 6)) + M.b_eyes = hex2num(copytext(new_eyes, 6, 8)) + + + // hair + var/new_hstyle = input(M, "Select a hair style", "Grooming") as null|anything in GLOB.hair_styles_list + if(new_hstyle) + M.h_style = new_hstyle + + // facial hair + var/new_fstyle = input(M, "Select a facial hair style", "Grooming") as null|anything in GLOB.facial_hair_styles_list + if(new_fstyle) + M.f_style = new_fstyle + + var/new_gender = alert(M, "Please select gender.", "Character Generation", "Male", "Female") + if (new_gender) + if(new_gender == "Male") + M.gender = MALE + else + M.gender = FEMALE + M.update_hair() + M.update_body() + + var/old_name = M.name + M.change_real_name(M, newname) + if(M.wear_id) + M.wear_id.name = "[M.real_name]'s ID Card" + M.wear_id.registered_name = "[M.real_name]" + if(M.wear_id.assignment) + M.wear_id.name += " ([M.wear_id.assignment])" + + message_admins("[key_name(src)] changed name of [old_name] to [newname].") From d98661050a8c4e1a414787e3b3c4e472f150debb Mon Sep 17 00:00:00 2001 From: Chaplain Maximum Date: Sun, 21 Jul 2024 02:41:42 +0300 Subject: [PATCH 2/3] =?UTF-8?q?"=D0=91=D0=9B=D0=AF*=D0=AC,=20=D0=9D*=D0=A1?= =?UTF-8?q?=20=D0=9E=D0=9F*=D0=A2=D0=AC=20=D0=93*=D0=A3=D0=A8=D0=90=D0=A2?= =?UTF-8?q?=20=D0=95=D0=91=D0=A3*=D0=98=D0=95=20*=D0=A1=D0=95=D0=9D*=D0=A1?= =?UTF-8?q?*?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cpl Scotty Potter [Sun Riders (FTL SQ1)] says, "БЛЯ*Ь, Н*С ОП*ТЬ Г*УШАТ ЕБУ*ИЕ *СЕН*С*. ДА ОТК*ДА * НИХ ЕБУЧИЕ ГЛУШИЛКИ. ЧТО *НАЧИТ МЫ И* *РОДАЛИ *М --- code/modules/mob/mob_helpers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index b60039840d..1c1043c7fd 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -123,7 +123,7 @@ var/global/list/limb_types_by_name = list( var/message_length = length(message) var/index = 1 while(index <= message_length) - var/char = copytext(message, index, index + 1) + var/char = copytext_char(message, index, index + 1) if(char == " " || prob(clear_char_probability)) output_message += char else From 3a763afc750310f7e4d21bc2c64a077b4d6983a3 Mon Sep 17 00:00:00 2001 From: Chaplain Maximum Date: Sun, 21 Jul 2024 03:03:48 +0300 Subject: [PATCH 3/3] Fix --- code/modules/admin/admin_verbs.dm | 1 + colonialmarines.dme | 1 + void-marines/code/admin_tools.dm | 35 ++++++++++++++++++++++--------- 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 6e47391fc1..314bc75972 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -14,6 +14,7 @@ var/list/admin_verbs_default = list( /client/proc/create_custom_paper, /client/proc/cmd_admin_change_their_name, /client/proc/cmd_admin_changekey, + /client/proc/editappearplayer, /client/proc/cmd_admin_subtle_message, /client/proc/cmd_admin_atom_narrate, /client/proc/cmd_admin_xeno_report, //Allows creation of IC reports by the Queen Mother diff --git a/colonialmarines.dme b/colonialmarines.dme index fe9860e217..300f01a677 100644 --- a/colonialmarines.dme +++ b/colonialmarines.dme @@ -2476,4 +2476,5 @@ #include "void-marines\code\rasputin.dm" #include "void-marines\code\reserve_role.dm" #include "void-marines\code\vendors.dm" +#include "void-marines\code\admin_tools.dm" // END_INCLUDE diff --git a/void-marines/code/admin_tools.dm b/void-marines/code/admin_tools.dm index b0a970222d..f0a7472cc3 100644 --- a/void-marines/code/admin_tools.dm +++ b/void-marines/code/admin_tools.dm @@ -10,6 +10,31 @@ switch(alert("Are you sure you wish to edit this mob's appearance?",,"Yes","No")) if("No") return + + // Changing name \\ + + var/newname = input(M, "What do you want to name them?", "Name:") as null|text + if(!newname) + return + + if(!M) + to_chat(usr, "This mob no longer exists") + return + + var/old_name = M.name + M.change_real_name(M, newname) + if(istype(M, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = M + if(H.wear_id) + H.wear_id.name = "[H.real_name]'s ID Card" + H.wear_id.registered_name = "[H.real_name]" + if(H.wear_id.assignment) + H.wear_id.name += " ([H.wear_id.assignment])" + + message_admins("[key_name(src)] changed name of [old_name] to [newname].") + + // Changing appear \\ + var/new_facial = input(M, "Please select facial hair color.", "Character Generation") as color if(new_facial) M.r_facial = hex2num(copytext(new_facial, 2, 4)) @@ -47,13 +72,3 @@ M.gender = FEMALE M.update_hair() M.update_body() - - var/old_name = M.name - M.change_real_name(M, newname) - if(M.wear_id) - M.wear_id.name = "[M.real_name]'s ID Card" - M.wear_id.registered_name = "[M.real_name]" - if(M.wear_id.assignment) - M.wear_id.name += " ([M.wear_id.assignment])" - - message_admins("[key_name(src)] changed name of [old_name] to [newname].")