Skip to content

Commit

Permalink
puts a mutex on protean blob transforms (#5989)
Browse files Browse the repository at this point in the history
similar stuff might have to be done for slimes at some point
  • Loading branch information
silicons authored Sep 19, 2023
1 parent 245ded7 commit 299b58b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions code/modules/species/protean/protean_blob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,9 @@
/mob/living/carbon/human/proc/nano_intoblob()
if(loc == /obj/item/hardsuit/protean)
return
if(transforming)
return
transforming = TRUE
handle_grasp() //It's possible to blob out before some key parts of the life loop. This results in things getting dropped at null. TODO: Fix the code so this can be done better.
remove_micros(src, src) //Living things don't fare well in roblobs.

Expand Down Expand Up @@ -362,6 +365,8 @@
blob.can_be_drop_prey = P.can_be_drop_prey
blob.can_be_drop_pred = P.can_be_drop_pred

transforming = FALSE

//Return our blob in case someone wants it
return blob

Expand Down Expand Up @@ -432,6 +437,9 @@
return
if(istype(blob.loc, /obj/item/hardsuit/protean))
return
if(transforming)
return
transforming = TRUE

buckled?.unbuckle_mob(src, BUCKLE_OP_FORCE)
unbuckle_all_mobs(BUCKLE_OP_FORCE)
Expand Down Expand Up @@ -495,6 +503,7 @@
qdel(blob)

//Return ourselves in case someone wants it
transforming = FALSE
return src

/mob/living/simple_mob/protean_blob/say_understands()
Expand Down

0 comments on commit 299b58b

Please sign in to comment.