From 21f09b7e07f1ad4ac17f6ef99f679e059f7dd210 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Sun, 14 Apr 2024 10:36:03 +0300 Subject: [PATCH 01/13] Update lesser_drone.dm --- .../carbon/xenomorph/castes/lesser_drone.dm | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 8b268ebfce62..728e669b96ba 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -16,9 +16,10 @@ can_be_revived = FALSE build_time_mult = BUILD_TIME_MULT_LESSER_DRONE + behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = 1 + can_hold_facehuggers = 0 can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD @@ -118,3 +119,21 @@ /mob/living/carbon/xenomorph/lesser_drone/handle_ghost_message() return + +/mob/living/carbon/xenomorph/lesser_drone/handle_screech_act(mob/self, mob/living/carbon/xenomorph/queen/queen) + return null + +/mob/living/carbon/xenomorph/lesser_drone/handle_queen_screech(mob/living/carbon/xenomorph/queen/queen) + to_chat(src, SPAN_DANGER("The mighty roar of the queen makes you tremble and fall over!")) + adjust_effect(6, STUN) + apply_effect(6, WEAKEN) + +/mob/living/carbon/xenomorph/lesser_drone/get_status_tab_items() + . = ..() + +/datum/behavior_delegate/lesser_drone_base + name = "Base Lesser Drone Behavior Delegate" + +/datum/behavior_delegate/lesser_drone_base/on_life() + if(bound_xeno.body_position == STANDING_UP && !(locate(/obj/effect/alien/weeds) in get_turf(bound_xeno))) + bound_xeno.adjustBruteLoss(5) From adfd1d15f4915e40c0d46a0a8e715d08fd735f59 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Mon, 15 Apr 2024 07:35:52 +0300 Subject: [PATCH 02/13] Update code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- .../modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 728e669b96ba..64b10be173aa 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -128,9 +128,6 @@ adjust_effect(6, STUN) apply_effect(6, WEAKEN) -/mob/living/carbon/xenomorph/lesser_drone/get_status_tab_items() - . = ..() - /datum/behavior_delegate/lesser_drone_base name = "Base Lesser Drone Behavior Delegate" From 3ffe96a5df642bcc890d9248a1b784ab2bbe0ea1 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Mon, 15 Apr 2024 08:20:26 +0300 Subject: [PATCH 03/13] Infinite facehugger holding fix --- .../mob/living/carbon/xenomorph/Facehuggers.dm | 12 ++++++------ .../living/carbon/xenomorph/castes/lesser_drone.dm | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index df272387f001..867627dfeaf6 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -343,22 +343,22 @@ stat = CONSCIOUS jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) -/obj/item/clothing/mask/facehugger/proc/go_idle() //Idle state does not count toward the death timer. +/obj/item/clothing/mask/facehugger/proc/go_idle() if(stat == DEAD || stat == UNCONSCIOUS) return stat = UNCONSCIOUS icon_state = "[initial(icon_state)]_inactive" - if(jump_timer) - deltimer(jump_timer) - jump_timer = null - // Reset the jumps left to their original count - jumps_left = initial(jumps_left) + addtimer(CALLBACK(src, PROC_REF(go_active)), rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME)) /obj/item/clothing/mask/facehugger/proc/try_jump() jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) if(stat != CONSCIOUS || isnull(loc)) //Make sure we're conscious and not idle or dead. + jumps_left-- // Huggers should still lose hp, even when idle + + if(!jumps_left) + end_lifecycle() return if(isxeno(loc)) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 64b10be173aa..893dabf9e0da 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = 0 + can_hold_facehuggers = TRUE can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD From 930f7cf857d042b20836195187b0d10b6639301d Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Mon, 15 Apr 2024 22:01:30 +0300 Subject: [PATCH 04/13] Update Facehuggers.dm --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 867627dfeaf6..d455e7f7e917 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -354,11 +354,8 @@ /obj/item/clothing/mask/facehugger/proc/try_jump() jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) - if(stat != CONSCIOUS || isnull(loc)) //Make sure we're conscious and not idle or dead. - jumps_left-- // Huggers should still lose hp, even when idle - if(!jumps_left) - end_lifecycle() + if(isnull(loc)) return if(isxeno(loc)) @@ -366,7 +363,9 @@ if(X.caste.hugger_nurturing) // caste can prevent hugger death return - leap_at_nearest_target() + if(stat == CONSCIOUS) //Make sure we're conscious and not idle or dead. + leap_at_nearest_target() + jumps_left-- if(!jumps_left) end_lifecycle() From 0c0e1398204fa71e07ed0db1476830fcd757315b Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:52:28 +0300 Subject: [PATCH 05/13] Revert "Update Facehuggers.dm" This reverts commit 930f7cf857d042b20836195187b0d10b6639301d. --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index d455e7f7e917..867627dfeaf6 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -354,8 +354,11 @@ /obj/item/clothing/mask/facehugger/proc/try_jump() jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) + if(stat != CONSCIOUS || isnull(loc)) //Make sure we're conscious and not idle or dead. + jumps_left-- // Huggers should still lose hp, even when idle - if(isnull(loc)) + if(!jumps_left) + end_lifecycle() return if(isxeno(loc)) @@ -363,9 +366,7 @@ if(X.caste.hugger_nurturing) // caste can prevent hugger death return - if(stat == CONSCIOUS) //Make sure we're conscious and not idle or dead. - leap_at_nearest_target() - + leap_at_nearest_target() jumps_left-- if(!jumps_left) end_lifecycle() From 7b05f7f82c642cb0dd725bbf2c313eb459e35e51 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 18 Apr 2024 13:52:32 +0300 Subject: [PATCH 06/13] Revert "Infinite facehugger holding fix" This reverts commit 3ffe96a5df642bcc890d9248a1b784ab2bbe0ea1. --- .../mob/living/carbon/xenomorph/Facehuggers.dm | 12 ++++++------ .../living/carbon/xenomorph/castes/lesser_drone.dm | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 867627dfeaf6..df272387f001 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -343,22 +343,22 @@ stat = CONSCIOUS jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) -/obj/item/clothing/mask/facehugger/proc/go_idle() +/obj/item/clothing/mask/facehugger/proc/go_idle() //Idle state does not count toward the death timer. if(stat == DEAD || stat == UNCONSCIOUS) return stat = UNCONSCIOUS icon_state = "[initial(icon_state)]_inactive" - + if(jump_timer) + deltimer(jump_timer) + jump_timer = null + // Reset the jumps left to their original count + jumps_left = initial(jumps_left) addtimer(CALLBACK(src, PROC_REF(go_active)), rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME)) /obj/item/clothing/mask/facehugger/proc/try_jump() jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) if(stat != CONSCIOUS || isnull(loc)) //Make sure we're conscious and not idle or dead. - jumps_left-- // Huggers should still lose hp, even when idle - - if(!jumps_left) - end_lifecycle() return if(isxeno(loc)) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 893dabf9e0da..64b10be173aa 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = TRUE + can_hold_facehuggers = 0 can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD From cf1c9cc71283ec8e41fd2dad5bc9e0c1aadd0cfe Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:18:07 +0300 Subject: [PATCH 07/13] aaaaaaaa --- .../mob/living/carbon/xenomorph/Facehuggers.dm | 18 +++++++++++++++--- .../carbon/xenomorph/castes/lesser_drone.dm | 2 +- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index df272387f001..fcab6b02966a 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -175,8 +175,12 @@ /obj/item/clothing/mask/facehugger/equipped(mob/M) SHOULD_CALL_PARENT(FALSE) // ugh equip sounds - // So picking up a hugger does not prematurely kill it - go_idle() + + var/mob/living/carbon/xenomorph/xeno = M + + if(xeno.caste.hugger_nurturing || hivenumber == XENO_HIVE_TUTORIAL) // caste can prevent hugger death + jumps_left = initial(jumps_left) + go_idle() /obj/item/clothing/mask/facehugger/Crossed(atom/target) has_proximity(target) @@ -350,10 +354,18 @@ stat = UNCONSCIOUS icon_state = "[initial(icon_state)]_inactive" if(jump_timer) + jumps_left-- // Reduce a jump so you cannot infinitely juggle huggers unless nurturing \ tutorial deltimer(jump_timer) + + if(!jumps_left) + end_lifecycle() + return + jump_timer = null // Reset the jumps left to their original count - jumps_left = initial(jumps_left) + if(hivenumber == XENO_HIVE_TUTORIAL) // caste can prevent hugger death + jumps_left = initial(jumps_left) + addtimer(CALLBACK(src, PROC_REF(go_active)), rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME)) /obj/item/clothing/mask/facehugger/proc/try_jump() diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 64b10be173aa..893dabf9e0da 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = 0 + can_hold_facehuggers = TRUE can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD From 7d4bfa7a38cbcdcaa888011accce6421739a336e Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 18 Apr 2024 17:32:20 +0300 Subject: [PATCH 08/13] Revert "aaaaaaaa" This reverts commit cf1c9cc71283ec8e41fd2dad5bc9e0c1aadd0cfe. --- .../mob/living/carbon/xenomorph/Facehuggers.dm | 18 +++--------------- .../carbon/xenomorph/castes/lesser_drone.dm | 2 +- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index fcab6b02966a..df272387f001 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -175,12 +175,8 @@ /obj/item/clothing/mask/facehugger/equipped(mob/M) SHOULD_CALL_PARENT(FALSE) // ugh equip sounds - - var/mob/living/carbon/xenomorph/xeno = M - - if(xeno.caste.hugger_nurturing || hivenumber == XENO_HIVE_TUTORIAL) // caste can prevent hugger death - jumps_left = initial(jumps_left) - go_idle() + // So picking up a hugger does not prematurely kill it + go_idle() /obj/item/clothing/mask/facehugger/Crossed(atom/target) has_proximity(target) @@ -354,18 +350,10 @@ stat = UNCONSCIOUS icon_state = "[initial(icon_state)]_inactive" if(jump_timer) - jumps_left-- // Reduce a jump so you cannot infinitely juggle huggers unless nurturing \ tutorial deltimer(jump_timer) - - if(!jumps_left) - end_lifecycle() - return - jump_timer = null // Reset the jumps left to their original count - if(hivenumber == XENO_HIVE_TUTORIAL) // caste can prevent hugger death - jumps_left = initial(jumps_left) - + jumps_left = initial(jumps_left) addtimer(CALLBACK(src, PROC_REF(go_active)), rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME)) /obj/item/clothing/mask/facehugger/proc/try_jump() diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 893dabf9e0da..64b10be173aa 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = TRUE + can_hold_facehuggers = 0 can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD From 9bd02cd1344274b411fa4545f590bf8ca5e52102 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 18 Apr 2024 18:10:14 +0300 Subject: [PATCH 09/13] bbbbbbb --- .../living/carbon/xenomorph/Facehuggers.dm | 29 ++++++++++++------- .../carbon/xenomorph/castes/lesser_drone.dm | 10 +------ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index df272387f001..2026eed7d56e 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -76,7 +76,9 @@ return addtimer(CALLBACK(src, PROC_REF(check_turf)), 0.2 SECONDS) if(stat == CONSCIOUS && loc) //Make sure we're conscious and not idle or dead. - go_idle() + var/jumps_before = jumps_left + go_idle(FALSE) + jumps_left = jumps_before if(attached) attached = FALSE die() @@ -173,10 +175,15 @@ if(exposed_temperature > 300) die() -/obj/item/clothing/mask/facehugger/equipped(mob/M) +/obj/item/clothing/mask/facehugger/equipped(mob/holder) SHOULD_CALL_PARENT(FALSE) // ugh equip sounds - // So picking up a hugger does not prematurely kill it - go_idle() + if (!isxeno(holder)) + return + + var/mob/living/carbon/xenomorph/xeno = holder + + if (xeno.caste.hugger_nurturing || hivenumber == XENO_HIVE_TUTORIAL) + go_idle() /obj/item/clothing/mask/facehugger/Crossed(atom/target) has_proximity(target) @@ -343,22 +350,23 @@ stat = CONSCIOUS jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) -/obj/item/clothing/mask/facehugger/proc/go_idle() //Idle state does not count toward the death timer. +/obj/item/clothing/mask/facehugger/proc/go_idle(var/delete_timer = TRUE) //Idle state does not count toward the death timer. if(stat == DEAD || stat == UNCONSCIOUS) return stat = UNCONSCIOUS icon_state = "[initial(icon_state)]_inactive" - if(jump_timer) - deltimer(jump_timer) - jump_timer = null + if(delete_timer) + if(jump_timer) + deltimer(jump_timer) + jump_timer = null // Reset the jumps left to their original count jumps_left = initial(jumps_left) addtimer(CALLBACK(src, PROC_REF(go_active)), rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME)) /obj/item/clothing/mask/facehugger/proc/try_jump() jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) - if(stat != CONSCIOUS || isnull(loc)) //Make sure we're conscious and not idle or dead. + if(isnull(loc)) //Make sure we're conscious and not idle or dead. return if(isxeno(loc)) @@ -366,7 +374,8 @@ if(X.caste.hugger_nurturing) // caste can prevent hugger death return - leap_at_nearest_target() + if(stat == CONSCIOUS) + leap_at_nearest_target() jumps_left-- if(!jumps_left) end_lifecycle() diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 64b10be173aa..9be9e21fd983 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = 0 + can_hold_facehuggers = TRUE can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD @@ -120,14 +120,6 @@ /mob/living/carbon/xenomorph/lesser_drone/handle_ghost_message() return -/mob/living/carbon/xenomorph/lesser_drone/handle_screech_act(mob/self, mob/living/carbon/xenomorph/queen/queen) - return null - -/mob/living/carbon/xenomorph/lesser_drone/handle_queen_screech(mob/living/carbon/xenomorph/queen/queen) - to_chat(src, SPAN_DANGER("The mighty roar of the queen makes you tremble and fall over!")) - adjust_effect(6, STUN) - apply_effect(6, WEAKEN) - /datum/behavior_delegate/lesser_drone_base name = "Base Lesser Drone Behavior Delegate" From 11bb36cdd2323ec2334d4b10bfc6c12fcfffa117 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Thu, 18 Apr 2024 20:39:21 +0300 Subject: [PATCH 10/13] Linter --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 2026eed7d56e..d8e4e2954cd3 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -350,7 +350,7 @@ stat = CONSCIOUS jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) -/obj/item/clothing/mask/facehugger/proc/go_idle(var/delete_timer = TRUE) //Idle state does not count toward the death timer. +/obj/item/clothing/mask/facehugger/proc/go_idle(delete_timer = TRUE) //Idle state does not count toward the death timer. if(stat == DEAD || stat == UNCONSCIOUS) return From 788c58ca8a001de13195072a16026e4e9b887055 Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Sat, 20 Apr 2024 08:26:36 +0300 Subject: [PATCH 11/13] Revert "Linter" This reverts commit 11bb36cdd2323ec2334d4b10bfc6c12fcfffa117. --- code/modules/mob/living/carbon/xenomorph/Facehuggers.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index d8e4e2954cd3..2026eed7d56e 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -350,7 +350,7 @@ stat = CONSCIOUS jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) -/obj/item/clothing/mask/facehugger/proc/go_idle(delete_timer = TRUE) //Idle state does not count toward the death timer. +/obj/item/clothing/mask/facehugger/proc/go_idle(var/delete_timer = TRUE) //Idle state does not count toward the death timer. if(stat == DEAD || stat == UNCONSCIOUS) return From 9c5cbdf4e51d8109b5013416f32aa85be66a51cf Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Sat, 20 Apr 2024 08:26:41 +0300 Subject: [PATCH 12/13] Revert "bbbbbbb" This reverts commit 9bd02cd1344274b411fa4545f590bf8ca5e52102. --- .../living/carbon/xenomorph/Facehuggers.dm | 29 +++++++------------ .../carbon/xenomorph/castes/lesser_drone.dm | 10 ++++++- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index 2026eed7d56e..df272387f001 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -76,9 +76,7 @@ return addtimer(CALLBACK(src, PROC_REF(check_turf)), 0.2 SECONDS) if(stat == CONSCIOUS && loc) //Make sure we're conscious and not idle or dead. - var/jumps_before = jumps_left - go_idle(FALSE) - jumps_left = jumps_before + go_idle() if(attached) attached = FALSE die() @@ -175,15 +173,10 @@ if(exposed_temperature > 300) die() -/obj/item/clothing/mask/facehugger/equipped(mob/holder) +/obj/item/clothing/mask/facehugger/equipped(mob/M) SHOULD_CALL_PARENT(FALSE) // ugh equip sounds - if (!isxeno(holder)) - return - - var/mob/living/carbon/xenomorph/xeno = holder - - if (xeno.caste.hugger_nurturing || hivenumber == XENO_HIVE_TUTORIAL) - go_idle() + // So picking up a hugger does not prematurely kill it + go_idle() /obj/item/clothing/mask/facehugger/Crossed(atom/target) has_proximity(target) @@ -350,23 +343,22 @@ stat = CONSCIOUS jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) -/obj/item/clothing/mask/facehugger/proc/go_idle(var/delete_timer = TRUE) //Idle state does not count toward the death timer. +/obj/item/clothing/mask/facehugger/proc/go_idle() //Idle state does not count toward the death timer. if(stat == DEAD || stat == UNCONSCIOUS) return stat = UNCONSCIOUS icon_state = "[initial(icon_state)]_inactive" - if(delete_timer) - if(jump_timer) - deltimer(jump_timer) - jump_timer = null + if(jump_timer) + deltimer(jump_timer) + jump_timer = null // Reset the jumps left to their original count jumps_left = initial(jumps_left) addtimer(CALLBACK(src, PROC_REF(go_active)), rand(MIN_ACTIVE_TIME,MAX_ACTIVE_TIME)) /obj/item/clothing/mask/facehugger/proc/try_jump() jump_timer = addtimer(CALLBACK(src, PROC_REF(try_jump)), time_between_jumps, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) - if(isnull(loc)) //Make sure we're conscious and not idle or dead. + if(stat != CONSCIOUS || isnull(loc)) //Make sure we're conscious and not idle or dead. return if(isxeno(loc)) @@ -374,8 +366,7 @@ if(X.caste.hugger_nurturing) // caste can prevent hugger death return - if(stat == CONSCIOUS) - leap_at_nearest_target() + leap_at_nearest_target() jumps_left-- if(!jumps_left) end_lifecycle() diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 9be9e21fd983..64b10be173aa 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = TRUE + can_hold_facehuggers = 0 can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD @@ -120,6 +120,14 @@ /mob/living/carbon/xenomorph/lesser_drone/handle_ghost_message() return +/mob/living/carbon/xenomorph/lesser_drone/handle_screech_act(mob/self, mob/living/carbon/xenomorph/queen/queen) + return null + +/mob/living/carbon/xenomorph/lesser_drone/handle_queen_screech(mob/living/carbon/xenomorph/queen/queen) + to_chat(src, SPAN_DANGER("The mighty roar of the queen makes you tremble and fall over!")) + adjust_effect(6, STUN) + apply_effect(6, WEAKEN) + /datum/behavior_delegate/lesser_drone_base name = "Base Lesser Drone Behavior Delegate" From 87a30c2c7a28525658c975f6416ea0bfeeddb6ff Mon Sep 17 00:00:00 2001 From: Git-Nivrak <59925169+Git-Nivrak@users.noreply.github.com> Date: Sat, 20 Apr 2024 08:56:32 +0300 Subject: [PATCH 13/13] a --- .../living/carbon/xenomorph/Facehuggers.dm | 25 ++++++++++++++++++- .../carbon/xenomorph/castes/lesser_drone.dm | 10 +------- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm index df272387f001..8aa3000092f5 100644 --- a/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm +++ b/code/modules/mob/living/carbon/xenomorph/Facehuggers.dm @@ -38,6 +38,9 @@ /// the nearest human before dying var/jumps_left = 2 + var/time_to_live = 30 SECONDS + var/death_timer + var/icon_xeno = 'icons/mob/xenos/effects.dmi' var/icon_xenonid = 'icons/mob/xenonids/xenonid_crab.dmi' @@ -55,6 +58,9 @@ set_hive_data(src, hivenumber) go_active() + if (hivenumber != XENO_HIVE_TUTORIAL) + death_timer = addtimer(CALLBACK(src, PROC_REF(end_lifecycle)), time_to_live, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) + /obj/item/clothing/mask/facehugger/Destroy() . = ..() @@ -75,6 +81,10 @@ if(QDESTROYING(src)) return addtimer(CALLBACK(src, PROC_REF(check_turf)), 0.2 SECONDS) + + if(!death_timer && hivenumber != XENO_HIVE_TUTORIAL) + death_timer = addtimer(CALLBACK(src, PROC_REF(end_lifecycle)), time_to_live, TIMER_OVERRIDE|TIMER_STOPPABLE|TIMER_UNIQUE) + if(stat == CONSCIOUS && loc) //Make sure we're conscious and not idle or dead. go_idle() if(attached) @@ -173,9 +183,18 @@ if(exposed_temperature > 300) die() -/obj/item/clothing/mask/facehugger/equipped(mob/M) +/obj/item/clothing/mask/facehugger/equipped(mob/holder) SHOULD_CALL_PARENT(FALSE) // ugh equip sounds // So picking up a hugger does not prematurely kill it + if (!isxeno(holder)) + return + + var/mob/living/carbon/xenomorph/xeno = holder + + if ((xeno.caste.hugger_nurturing || hivenumber == XENO_HIVE_TUTORIAL) && death_timer) + deltimer(death_timer) + death_timer = null + go_idle() /obj/item/clothing/mask/facehugger/Crossed(atom/target) @@ -410,6 +429,10 @@ deltimer(jump_timer) jump_timer = null + if(death_timer) + deltimer(death_timer) + death_timer = null + if(!impregnated) icon_state = "[initial(icon_state)]_dead" stat = DEAD diff --git a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm index 64b10be173aa..9be9e21fd983 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm @@ -19,7 +19,7 @@ behavior_delegate_type = /datum/behavior_delegate/lesser_drone_base caste_desc = "A builder of hives." - can_hold_facehuggers = 0 + can_hold_facehuggers = TRUE can_hold_eggs = CAN_HOLD_TWO_HANDS acid_level = 1 weed_level = WEED_LEVEL_STANDARD @@ -120,14 +120,6 @@ /mob/living/carbon/xenomorph/lesser_drone/handle_ghost_message() return -/mob/living/carbon/xenomorph/lesser_drone/handle_screech_act(mob/self, mob/living/carbon/xenomorph/queen/queen) - return null - -/mob/living/carbon/xenomorph/lesser_drone/handle_queen_screech(mob/living/carbon/xenomorph/queen/queen) - to_chat(src, SPAN_DANGER("The mighty roar of the queen makes you tremble and fall over!")) - adjust_effect(6, STUN) - apply_effect(6, WEAKEN) - /datum/behavior_delegate/lesser_drone_base name = "Base Lesser Drone Behavior Delegate"