From 7172d90ec6a6d790a81a886d784b5075c623bb02 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Wed, 5 Jul 2023 20:46:08 -0700 Subject: [PATCH 1/3] god i hate the untested antag pr --- code/modules/mob/living/silicon/robot/death.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 23371be556b4..71ac9ba3da09 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -26,6 +26,8 @@ . = ..() + remove_traits(list(TRAIT_HANDS_BLOCKED, TRAIT_INCAPACITATED, TRAIT_FLOORED, TRAIT_CRITICAL_CONDITION), STAT_TRAIT) // to remove unwanted traits from living/set_stat + locked = FALSE //unlock cover if(!QDELETED(builtInCamera) && builtInCamera.status) From 20172f52f310946f8f8251402fba1b736e71d7f3 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 9 Jul 2023 01:37:32 -0700 Subject: [PATCH 2/3] better solution, maybe --- .../modules/mob/living/silicon/robot/death.dm | 2 -- code/modules/mob/living/silicon/silicon.dm | 23 +++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/robot/death.dm b/code/modules/mob/living/silicon/robot/death.dm index 71ac9ba3da09..23371be556b4 100644 --- a/code/modules/mob/living/silicon/robot/death.dm +++ b/code/modules/mob/living/silicon/robot/death.dm @@ -26,8 +26,6 @@ . = ..() - remove_traits(list(TRAIT_HANDS_BLOCKED, TRAIT_INCAPACITATED, TRAIT_FLOORED, TRAIT_CRITICAL_CONDITION), STAT_TRAIT) // to remove unwanted traits from living/set_stat - locked = FALSE //unlock cover if(!QDELETED(builtInCamera) && builtInCamera.status) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index b647ec5ffff2..401325fe55a5 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -506,3 +506,26 @@ else jobname = "Silicon" msgr.username = "[newname] ([jobname])" + +/mob/living/silicon/robot/set_stat(new_stat) + //Don't want to call parent (mob/living/set_stat) since it adds unwanted traits. + //Copied from mob/proc/set_stat: + if(new_stat == stat) + return + . = stat + stat = new_stat + SEND_SIGNAL(src, COMSIG_MOB_STATCHANGE, new_stat, .) + + //Altered mob/living/set_stat for Cyborgs + switch(.) //Previous stat. + if(CONSCIOUS || SOFT_CRIT || UNCONSCIOUS) + remove_traits(src, list(TRAIT_IMMOBILIZED, TRAIT_INCAPACITATED, TRAIT_HANDS_BLOCKED), STAT_TRAIT) + if(DEAD) + remove_from_dead_mob_list() + add_to_alive_mob_list() + switch(stat) //Current stat. + if(CONSCIOUS || SOFT_CRIT || UNCONSCIOUS) + add_traits(src, list(TRAIT_IMMOBILIZED, TRAIT_INCAPACITATED, TRAIT_HANDS_BLOCKED), STAT_TRAIT) + if(DEAD) + remove_from_alive_mob_list() + add_to_dead_mob_list() From 63950676b3f8f152930e16a1f251be43e8dfa197 Mon Sep 17 00:00:00 2001 From: Rune Knight Date: Sun, 9 Jul 2023 03:11:23 -0700 Subject: [PATCH 3/3] gives TRAIT_FORCED_STANDING to cyborg during init --- code/modules/mob/living/silicon/silicon.dm | 25 ++-------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm index 401325fe55a5..474969b6574e 100644 --- a/code/modules/mob/living/silicon/silicon.dm +++ b/code/modules/mob/living/silicon/silicon.dm @@ -59,6 +59,8 @@ diag_hud.add_atom_to_hud(src) diag_hud_set_status() diag_hud_set_health() + ADD_TRAIT(src, TRAIT_FORCED_STANDING, "cyborg") // not CYBORG_ITEM_TRAIT because not an item + /mob/living/silicon/med_hud_set_health() return //we use a different hud @@ -506,26 +508,3 @@ else jobname = "Silicon" msgr.username = "[newname] ([jobname])" - -/mob/living/silicon/robot/set_stat(new_stat) - //Don't want to call parent (mob/living/set_stat) since it adds unwanted traits. - //Copied from mob/proc/set_stat: - if(new_stat == stat) - return - . = stat - stat = new_stat - SEND_SIGNAL(src, COMSIG_MOB_STATCHANGE, new_stat, .) - - //Altered mob/living/set_stat for Cyborgs - switch(.) //Previous stat. - if(CONSCIOUS || SOFT_CRIT || UNCONSCIOUS) - remove_traits(src, list(TRAIT_IMMOBILIZED, TRAIT_INCAPACITATED, TRAIT_HANDS_BLOCKED), STAT_TRAIT) - if(DEAD) - remove_from_dead_mob_list() - add_to_alive_mob_list() - switch(stat) //Current stat. - if(CONSCIOUS || SOFT_CRIT || UNCONSCIOUS) - add_traits(src, list(TRAIT_IMMOBILIZED, TRAIT_INCAPACITATED, TRAIT_HANDS_BLOCKED), STAT_TRAIT) - if(DEAD) - remove_from_alive_mob_list() - add_to_dead_mob_list()