mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Fixes vat grower bubble overlay not clearing. (#90183)
## About The Pull Request This PR fixes the vat grower bubble overlay not clearing when the sample grows to completion. Now the vat is in charge of deleteing the sample which seems more reasonable, instead of the cell line deleting its parent sample. ## Why It's Good For The Game Bubbles are supposed to be the visual queue a sample is loaded into the vat, no more ghost bubbles. ## Changelog 🆑 fix: fixed the vat grower bubble overlay not clearing upon completetion. /🆑
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//Cytology signals
|
||||
///Sent from /datum/biological_sample/proc/reset_sample
|
||||
#define COMSIG_SAMPLE_GROWTH_COMPLETED "sample_growth_completed"
|
||||
#define SPARE_SAMPLE (1<<0)
|
||||
|
||||
|
||||
@@ -85,18 +85,16 @@
|
||||
playsound(vat, 'sound/effects/splat.ogg', 50, TRUE)
|
||||
if(rand(1, 100) < risk) //Fail roll!
|
||||
fuck_up_growing(vat)
|
||||
|
||||
return FALSE
|
||||
succeed_growing(vat)
|
||||
return TRUE
|
||||
. = FALSE
|
||||
else
|
||||
succeed_growing(vat)
|
||||
. = TRUE
|
||||
SEND_SIGNAL(vat.biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED)
|
||||
|
||||
/datum/micro_organism/cell_line/proc/fuck_up_growing(obj/machinery/vatgrower/vat)
|
||||
vat.visible_message(span_warning("The biological sample in [vat] seems to have dissipated!"))
|
||||
if(prob(50))
|
||||
new /obj/effect/gibspawner/generic(get_turf(vat)) //Spawn some gibs.
|
||||
if(SEND_SIGNAL(vat.biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED) & SPARE_SAMPLE)
|
||||
return
|
||||
QDEL_NULL(vat.biological_sample)
|
||||
|
||||
/datum/micro_organism/cell_line/proc/succeed_growing(obj/machinery/vatgrower/vat)
|
||||
var/datum/effect_system/fluid_spread/smoke/smoke = new
|
||||
@@ -109,9 +107,6 @@
|
||||
//We maybe add some color. the chance is static for now, but idewally we would be able to manipulate it in the future.
|
||||
if(prob(CYTO_SHINY_CHANCE))
|
||||
mutate_color(thing)
|
||||
if(SEND_SIGNAL(vat.biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED) & SPARE_SAMPLE)
|
||||
return
|
||||
QDEL_NULL(vat.biological_sample)
|
||||
|
||||
///Overriden to show more info like needs, supplementary and supressive reagents and also growth.
|
||||
/datum/micro_organism/cell_line/get_details(show_details)
|
||||
|
||||
@@ -486,9 +486,6 @@
|
||||
var/mob/selected_mob = pick(list(/mob/living/basic/clown/mutant/slow, /mob/living/basic/clown/fleshclown))
|
||||
|
||||
new selected_mob(get_turf(vat))
|
||||
if(SEND_SIGNAL(vat.biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED) & SPARE_SAMPLE)
|
||||
return
|
||||
QDEL_NULL(vat.biological_sample)
|
||||
|
||||
/datum/micro_organism/cell_line/clown/bananaclown
|
||||
desc = "Clown bits with banana chunks"
|
||||
@@ -660,9 +657,7 @@
|
||||
vat.visible_message(span_warning("You hear angry buzzing coming from the inside of the vat!"))
|
||||
for(var/i in 1 to 5)
|
||||
new /mob/living/basic/bee(get_turf(vat))
|
||||
if(SEND_SIGNAL(vat.biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED) & SPARE_SAMPLE)
|
||||
return
|
||||
QDEL_NULL(vat.biological_sample)
|
||||
|
||||
|
||||
/datum/micro_organism/cell_line/butterfly
|
||||
desc = "Papilionoidea cells"
|
||||
|
||||
@@ -169,5 +169,7 @@
|
||||
if(resampler_active)
|
||||
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound), get_turf(src), 'sound/effects/servostep.ogg', 100, 1), 1.5 SECONDS)
|
||||
biological_sample.reset_sample()
|
||||
return SPARE_SAMPLE
|
||||
UnregisterSignal(biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED)
|
||||
else
|
||||
UnregisterSignal(biological_sample, COMSIG_SAMPLE_GROWTH_COMPLETED)
|
||||
QDEL_NULL(biological_sample)
|
||||
update_appearance()
|
||||
|
||||
Reference in New Issue
Block a user