From d5f57c5bf7046acef6da044395820d60c2e216bd Mon Sep 17 00:00:00 2001
From: SkyratBot <59378654+SkyratBot@users.noreply.github.com>
Date: Wed, 2 Nov 2022 21:50:17 +0100
Subject: [PATCH] [MIRROR] adds applying client quirks to player panel [MDB
IGNORE] (#17275)
* adds applying client quirks to player panel (#70923)
## About The Pull Request

this is terribly annoying for any sort of testing. especially if you
were to have a blind or crippled character.
instead of that, we now just make it a button in player panel
## Why It's Good For The Game
fuck
## Changelog
:cl:
admin: ctrl shift click spawning no longer applies quirks
admin: adds quirk applying button to player panel
/:cl:
* adds applying client quirks to player panel
Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
---
code/modules/admin/topic.dm | 17 ++++++++++++++++-
code/modules/admin/verbs/admingame.dm | 1 +
code/modules/mob/mob_transformation_simple.dm | 2 --
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm
index f895be65240..2945bd33bb2 100644
--- a/code/modules/admin/topic.dm
+++ b/code/modules/admin/topic.dm
@@ -547,7 +547,7 @@
var/mob/M = locate(href_list["forcespeech"])
if(!ismob(M))
to_chat(usr, "this can only be used on instances of type /mob.", confidential = TRUE)
-
+ return
var/speech = input("What will [key_name(M)] say?", "Force speech", "")// Don't need to sanitize, since it does that in say(), we also trust our admins.
if(!speech)
return
@@ -556,6 +556,21 @@
log_admin("[key_name(usr)] forced [key_name(M)] to say: [speech]")
message_admins(span_adminnotice("[key_name_admin(usr)] forced [key_name_admin(M)] to say: [speech]"))
+ else if(href_list["applyquirks"])
+ if(!check_rights(R_ADMIN))
+ return
+
+ var/mob/living/carbon/human/target = locate(href_list["applyquirks"])
+ if(!istype(target))
+ to_chat(usr, "this can only be used on instances of type /mob/living/carbon/human.", confidential = TRUE)
+ return
+ if(!target.client)
+ to_chat(usr, "[target] has no client!", confidential = TRUE)
+ return
+ SSquirks.AssignQuirks(target, target.client)
+ log_admin("[key_name(usr)] applied client quirks to [key_name(target)].")
+ message_admins(span_adminnotice("[key_name_admin(usr)] applied client quirks to [key_name_admin(target)]."))
+
else if(href_list["sendtoprison"])
if(!check_rights(R_ADMIN))
return
diff --git a/code/modules/admin/verbs/admingame.dm b/code/modules/admin/verbs/admingame.dm
index 5bbfeb84baf..5bb9b2d4d9e 100644
--- a/code/modules/admin/verbs/admingame.dm
+++ b/code/modules/admin/verbs/admingame.dm
@@ -136,6 +136,7 @@
body += "
"
if(!isnewplayer(M))
body += "Forcesay | "
+ body += "Apply Client Quirks | "
body += "Thunderdome 1 | "
body += "Thunderdome 2 | "
body += "Thunderdome Admin | "
diff --git a/code/modules/mob/mob_transformation_simple.dm b/code/modules/mob/mob_transformation_simple.dm
index 8c50e1c15ea..252d4362f96 100644
--- a/code/modules/mob/mob_transformation_simple.dm
+++ b/code/modules/mob/mob_transformation_simple.dm
@@ -50,8 +50,6 @@
client?.prefs.safe_transfer_prefs_to(new_human)
new_human.dna.update_dna_identity()
new_human.updateappearance(mutcolor_update=1, mutations_overlay_update=1)
- if(client)
- SSquirks.AssignQuirks(new_human, client)
//Ghosts have copys of their minds, but if an admin put somebody else in their og body, the mind will have a new mind.key
// and transfer_to will transfer the wrong person since it uses mind.key