From 02f3a90427d55221c67ea7b210dac444e8ae3292 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Sun, 21 Jan 2024 22:31:56 +0100 Subject: [PATCH 1/4] add hivenumber and initialize hivenumber to it please --- .../structures/special/recovery_node.dm | 35 +++++++++---------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/code/modules/cm_aliens/structures/special/recovery_node.dm b/code/modules/cm_aliens/structures/special/recovery_node.dm index a0d01bab89dc..be16752bcd6e 100644 --- a/code/modules/cm_aliens/structures/special/recovery_node.dm +++ b/code/modules/cm_aliens/structures/special/recovery_node.dm @@ -5,29 +5,26 @@ desc = "A warm, soothing light source that pulsates with a faint hum." icon_state = "recovery" health = 400 - var/heal_amount = 10 - var/heal_cooldown = 5 SECONDS - var/last_healed + var/recovery_pheromone_range = 2 + var/warding_pheromone_range = 8 + var/recovery_strenght = 2.5 + var/warding_strenght = 1 + /obj/effect/alien/resin/special/recovery/get_examine_text(mob/user) . = ..() if((isxeno(user) || isobserver(user)) && linked_hive) - . += "Recovers the health of adjacent Xenomorphs." + . += "Emits pheromons to nerby xenomorphs" /obj/effect/alien/resin/special/recovery/process() - if(last_healed && world.time < last_healed + heal_cooldown) - return - var/list/heal_candidates = list() - for(var/mob/living/carbon/xenomorph/X in orange(src, 1)) - if(X.health >= X.maxHealth || !X.resting || X.hivenumber != linked_hive.hivenumber) + for(var/mob/living/carbon/xenomorph/xenomorph in range(recovery_pheromone_range, loc)) + if(xenomorph.ignores_pheromones) + continue + if(recovery_strenght > xenomorph.recovery_new) + xenomorph.recovery_new = recovery_strenght + + for(var/mob/living/carbon/xenomorph/xenomorph in range(warding_pheromone_range, loc)) + if(xenomorph.ignores_pheromones) continue - heal_candidates += X - last_healed = world.time - if(!heal_candidates.len) - return - var/mob/living/carbon/xenomorph/picked_candidate = pick(heal_candidates) - picked_candidate.visible_message(SPAN_HELPFUL("\The [picked_candidate] glows as a warm aura envelops them."), \ - SPAN_HELPFUL("You feel a warm aura envelop you.")) - if(!do_after(picked_candidate, heal_cooldown, INTERRUPT_MOVED, BUSY_ICON_MEDICAL)) - return - picked_candidate.gain_health(heal_amount) + if(warding_strenght > xenomorph.warding_new) + xenomorph.recovery_new = warding_strenght From 502e16dbf82da5dc565d258bfa4fc6af78a71524 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Sun, 21 Jan 2024 22:46:40 +0100 Subject: [PATCH 2/4] adds hivenumber check --- code/modules/cm_aliens/structures/special/recovery_node.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/cm_aliens/structures/special/recovery_node.dm b/code/modules/cm_aliens/structures/special/recovery_node.dm index be16752bcd6e..eeb873766bcc 100644 --- a/code/modules/cm_aliens/structures/special/recovery_node.dm +++ b/code/modules/cm_aliens/structures/special/recovery_node.dm @@ -20,11 +20,11 @@ for(var/mob/living/carbon/xenomorph/xenomorph in range(recovery_pheromone_range, loc)) if(xenomorph.ignores_pheromones) continue - if(recovery_strenght > xenomorph.recovery_new) + if(recovery_strenght > xenomorph.recovery_new && linked_hive == xenomorph.hivenumber) xenomorph.recovery_new = recovery_strenght for(var/mob/living/carbon/xenomorph/xenomorph in range(warding_pheromone_range, loc)) if(xenomorph.ignores_pheromones) continue - if(warding_strenght > xenomorph.warding_new) + if(warding_strenght > xenomorph.warding_new && linked_hive == xenomorph.hivenumber) xenomorph.recovery_new = warding_strenght From 7c9620639df2fa07f4f28ae0bc7e0518f69daba7 Mon Sep 17 00:00:00 2001 From: vincibrv Date: Mon, 22 Jan 2024 00:10:59 +0100 Subject: [PATCH 3/4] renames vars --- .../cm_aliens/structures/special/recovery_node.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/cm_aliens/structures/special/recovery_node.dm b/code/modules/cm_aliens/structures/special/recovery_node.dm index eeb873766bcc..b26fc12dd489 100644 --- a/code/modules/cm_aliens/structures/special/recovery_node.dm +++ b/code/modules/cm_aliens/structures/special/recovery_node.dm @@ -7,8 +7,8 @@ health = 400 var/recovery_pheromone_range = 2 var/warding_pheromone_range = 8 - var/recovery_strenght = 2.5 - var/warding_strenght = 1 + var/recovery_strength = 2.5 + var/warding_strength = 1 /obj/effect/alien/resin/special/recovery/get_examine_text(mob/user) @@ -20,11 +20,11 @@ for(var/mob/living/carbon/xenomorph/xenomorph in range(recovery_pheromone_range, loc)) if(xenomorph.ignores_pheromones) continue - if(recovery_strenght > xenomorph.recovery_new && linked_hive == xenomorph.hivenumber) - xenomorph.recovery_new = recovery_strenght + if(recovery_strength > xenomorph.recovery_new && linked_hive == xenomorph.hivenumber) + xenomorph.recovery_new = recovery_strength for(var/mob/living/carbon/xenomorph/xenomorph in range(warding_pheromone_range, loc)) if(xenomorph.ignores_pheromones) continue - if(warding_strenght > xenomorph.warding_new && linked_hive == xenomorph.hivenumber) - xenomorph.recovery_new = warding_strenght + if(warding_strength > xenomorph.warding_new && linked_hive == xenomorph.hivenumber) + xenomorph.recovery_new = warding_strength From f499298b1e6de47037657c17cb5433f4ec1fe429 Mon Sep 17 00:00:00 2001 From: cuberound <122645057+cuberound@users.noreply.github.com> Date: Mon, 22 Jan 2024 00:16:35 +0100 Subject: [PATCH 4/4] Update code/modules/cm_aliens/structures/special/recovery_node.dm Co-authored-by: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> --- code/modules/cm_aliens/structures/special/recovery_node.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/cm_aliens/structures/special/recovery_node.dm b/code/modules/cm_aliens/structures/special/recovery_node.dm index b26fc12dd489..f9311c210cff 100644 --- a/code/modules/cm_aliens/structures/special/recovery_node.dm +++ b/code/modules/cm_aliens/structures/special/recovery_node.dm @@ -14,7 +14,7 @@ /obj/effect/alien/resin/special/recovery/get_examine_text(mob/user) . = ..() if((isxeno(user) || isobserver(user)) && linked_hive) - . += "Emits pheromons to nerby xenomorphs" + . += "Emits pheromones to nearby Xenomorphs." /obj/effect/alien/resin/special/recovery/process() for(var/mob/living/carbon/xenomorph/xenomorph in range(recovery_pheromone_range, loc))