From 4892ee1df8167134b313af03623bc71950bde8fd Mon Sep 17 00:00:00 2001 From: Leshana Date: Tue, 28 Feb 2017 23:24:34 -0500 Subject: [PATCH] Make the resleever upgradable (reduces badness) --- code/modules/resleeving/machines.dm | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/code/modules/resleeving/machines.dm b/code/modules/resleeving/machines.dm index 94681020155..9ef82c262b6 100644 --- a/code/modules/resleeving/machines.dm +++ b/code/modules/resleeving/machines.dm @@ -362,6 +362,8 @@ density = 1 opacity = 0 anchored = 1 + var/blur_amount + var/confuse_amount var/mob/living/carbon/human/occupant = null var/connected = null @@ -378,6 +380,17 @@ RefreshParts() update_icon() +/obj/machinery/transhuman/resleever/RefreshParts() + var/scan_rating = 0 + for(var/obj/item/weapon/stock_parts/scanning_module/SM in component_parts) + scan_rating += SM.rating + confuse_amount = (48 - scan_rating * 8) + + var/manip_rating = 0 + for(var/obj/item/weapon/stock_parts/manipulator/M in component_parts) + manip_rating += M.rating + blur_amount = (48 - scan_rating * 8) + /obj/machinery/transhuman/resleever/attack_hand(mob/user as mob) user.set_machine(src) var/health_text = "" @@ -456,8 +469,8 @@ //Inform them and make them a little dizzy. occupant << "You feel a small pain in your head as you're given a new backup implant. Oh, and a new body. It's disorienting, to say the least." - occupant.confused = max(occupant.confused, 30) - occupant.eye_blurry = max(occupant.eye_blurry, 30) + occupant.confused = max(occupant.confused, confuse_amount) + occupant.eye_blurry = max(occupant.eye_blurry, blur_amount) if(occupant.original_player != occupant.ckey) log_and_message_admins("is now a cross-sleeved character. Body originally belonged to [occupant.original_player]. Mind is now [occupant.mind.name].",occupant)