Skip to content

Commit

Permalink
addresses unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Birdtalon committed Nov 16, 2023
1 parent 631e24c commit a73d186
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@
hive = GLOB.hive_datum[old_xeno.hivenumber]
else if(hivenumber)
hive = GLOB.hive_datum[hivenumber]
else
CRASH("Tried to create a xenomorph [src] with no hive datum.")

if(hive)
hive.add_xeno(src)
Expand Down Expand Up @@ -393,16 +391,17 @@
old_xeno.empty_gut()

//Set leader to the new mob
if(IS_XENO_LEADER(old_xeno))
if(hive && IS_XENO_LEADER(old_xeno))
hive.replace_hive_leader(old_xeno, src)

if(old_xeno.iff_tag)
iff_tag = old_xeno.iff_tag
iff_tag.forceMove(src)
old_xeno.iff_tag = null

for(var/trait in hive.hive_inherant_traits)
ADD_TRAIT(src, trait, TRAIT_SOURCE_HIVE)
if(hive)
for(var/trait in hive.hive_inherant_traits)
ADD_TRAIT(src, trait, TRAIT_SOURCE_HIVE)

mutators.xeno = src

Expand Down Expand Up @@ -485,7 +484,7 @@
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE

// Only handle free slots if the xeno is not in tdome
if(!is_admin_level(z))
if(hive && !is_admin_level(z))
var/selected_caste = GLOB.xeno_datum_list[caste_type]?.type
hive.used_slots[selected_caste]++

Expand Down

0 comments on commit a73d186

Please sign in to comment.