Skip to content

Commit

Permalink
bbbbbbb
Browse files Browse the repository at this point in the history
  • Loading branch information
Git-Nivrak committed Apr 18, 2024
1 parent 7d4bfa7 commit 9bd02cd
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 19 deletions.
29 changes: 19 additions & 10 deletions code/modules/mob/living/carbon/xenomorph/Facehuggers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -343,30 +350,32 @@
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))
var/mob/living/carbon/xenomorph/X = loc
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()
Expand Down
10 changes: 1 addition & 9 deletions code/modules/mob/living/carbon/xenomorph/castes/lesser_drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"

Expand Down

0 comments on commit 9bd02cd

Please sign in to comment.