Skip to content

Commit

Permalink
Merge pull request #5 from 800maximum123/campaign-what-ever
Browse files Browse the repository at this point in the history
Campaign what ever
  • Loading branch information
VoiceInYourHead committed Jul 21, 2024
2 parents df69124 + 3a763af commit ed221c2
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 1 deletion.
1 change: 1 addition & 0 deletions code/modules/admin/admin_verbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/mob_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions colonialmarines.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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
74 changes: 74 additions & 0 deletions void-marines/code/admin_tools.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
/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

// 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))
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()

0 comments on commit ed221c2

Please sign in to comment.