From 860c1d2e9f6488c90680e6bbb42d8eaf26d6f62d Mon Sep 17 00:00:00 2001 From: Anewbe Date: Mon, 2 Oct 2017 03:08:01 -0500 Subject: [PATCH] Makes the auto-antag-record logging for loadout items prettier --- code/game/jobs/job_controller.dm | 2 ++ code/modules/client/preference_setup/loadout/loadout.dm | 1 + .../client/preference_setup/loadout/loadout_utility.dm | 3 +++ code/modules/mob/living/carbon/human/human.dm | 2 -- code/modules/mob/mob.dm | 7 +++++++ code/modules/mob/mob_defines.dm | 2 +- 6 files changed, 14 insertions(+), 3 deletions(-) diff --git a/code/game/jobs/job_controller.dm b/code/game/jobs/job_controller.dm index 9e3efc53dab..ee7dd75ebc0 100644 --- a/code/game/jobs/job_controller.dm +++ b/code/game/jobs/job_controller.dm @@ -352,6 +352,8 @@ var/global/datum/controller/occupations/job_master H << "Your current species, job or whitelist status does not permit you to spawn with [thing]!" continue + H.amend_exploitable(G.path) + if(G.slot == "implant") H.implant_loadout(G) continue diff --git a/code/modules/client/preference_setup/loadout/loadout.dm b/code/modules/client/preference_setup/loadout/loadout.dm index 3891bf05627..44a814ac679 100644 --- a/code/modules/client/preference_setup/loadout/loadout.dm +++ b/code/modules/client/preference_setup/loadout/loadout.dm @@ -204,6 +204,7 @@ var/list/gear_datums = list() var/whitelisted //Term to check the whitelist for.. var/sort_category = "General" var/list/gear_tweaks = list() //List of datums which will alter the item after it has been spawned. + var/exploitable = 0 //Does it go on the exploitable information list? /datum/gear/New() ..() diff --git a/code/modules/client/preference_setup/loadout/loadout_utility.dm b/code/modules/client/preference_setup/loadout/loadout_utility.dm index b990906fea9..e973bf232c6 100644 --- a/code/modules/client/preference_setup/loadout/loadout_utility.dm +++ b/code/modules/client/preference_setup/loadout/loadout_utility.dm @@ -76,6 +76,9 @@ display_name = "cell, device" path = /obj/item/weapon/cell/device +/datum/gear/utility/implant + exploitable = 1 + /datum/gear/utility/implant/eal //This does nothing if you don't actually know EAL. display_name = "implant, language, EAL" path = /obj/item/weapon/implant/language/eal diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 7e50773cb50..3a24f95360e 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -175,8 +175,6 @@ var/obj/item/organ/external/affected = src.organs_by_name[BP_HEAD] affected.implants += I I.part = affected - exploit_addons |= I - exploit_record += " Has an implanted [I.name]." I.implanted(src) /mob/living/carbon/human/proc/implant_loyalty(override = FALSE) // Won't override by default. diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9dc1c3eedc5..92a8b3bdebc 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1059,6 +1059,13 @@ mob/proc/yank_out_object() /mob/proc/is_muzzled() return 0 +//Exploitable Info Update + +/mob/proc/amend_exploitable(var/obj/item/I) + var/obj/item/exploit_item = new I(src.loc) + exploit_addons |= exploit_item + var/exploitmsg = html_decode("\n" + "Has " + exploit_item.name + ".") + exploit_record += exploitmsg /client/proc/check_has_body_select() return mob && mob.hud_used && istype(mob.zone_sel, /obj/screen/zone_sel) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index ea7520d5a85..e296db2ab9c 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -72,7 +72,7 @@ var/sec_record = "" var/gen_record = "" var/exploit_record = "" - var/exploit_addons = list() + var/exploit_addons = list() //Assorted things that show up at the end of the exploit_record list var/blinded = null var/bhunger = 0 //Carbon var/ajourn = 0