mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Code no longer runtimes on species change for mobs
on species change was removing the inert mutation (from the mutation index and mutation list) before trying to find it in that same list and checking the index. Instead we get the index first and then remove it
This commit is contained in:
@@ -301,10 +301,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
C.Digitigrade_Leg_Swap(TRUE)
|
||||
for(var/X in inherent_traits)
|
||||
C.remove_trait(X, SPECIES_TRAIT)
|
||||
|
||||
//If their inert mutation is not the same, swap it out
|
||||
if((inert_mutation != new_species.inert_mutation) && LAZYLEN(C.dna.mutation_index))
|
||||
C.dna.remove_mutation(inert_mutation)
|
||||
C.dna.mutation_index[C.dna.mutation_index.Find(inert_mutation)] = new_species.inert_mutation
|
||||
C.dna.mutation_index[new_species.inert_mutation] = create_sequence(new_species.inert_mutation)
|
||||
C.dna.add_mutation(new_species.inert_mutation)
|
||||
|
||||
C.remove_movespeed_modifier(MOVESPEED_ID_SPECIES)
|
||||
|
||||
SEND_SIGNAL(C, COMSIG_SPECIES_LOSS, src)
|
||||
|
||||
Reference in New Issue
Block a user