Blobs can now spawn up to three cores per event (#21377)

Blobs are too trivial, this should make them exciting. 

Requirements for this event to proc are two engineers, so in the
worst-case you still have two people with an emitter each who can each
destroy one blob and circle to the third after.

Could use scrutiny from someone more familiar with event code than
myself, I feel I've stepped on something here.

<img width="980" height="895" alt="image"
src="https://github.com/user-attachments/assets/38e15dfb-70a1-475e-b9b0-120765b507d5"
/>
This commit is contained in:
hazelrat
2025-09-30 15:55:56 +00:00
committed by GitHub
parent affa7c3dcf
commit f56a3f6714
3 changed files with 88 additions and 26 deletions
+19 -20
View File
@@ -1,7 +1,6 @@
/datum/event/blob
announceWhen = 12
var/obj/effect/blob/core/Blob
// Quite a short fuse due to the potential severity of this event.
announceWhen = 12
ic_name = "a biohazard"
/datum/event/blob/announce()
@@ -10,22 +9,22 @@
/datum/event/blob/start()
..()
var/turf/T = pick_subarea_turf(/area/horizon/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
if(!T)
log_and_message_admins("Blob failed to find a viable turf.")
kill(TRUE)
return
// This stores the list of the possible number of blobs, weighted towards 2. Adjust if a different weighting if desired.
var/list/numberOfBlobs = list(1 = 1, 2 = 2, 3 = 1)
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
Blob = new /obj/effect/blob/core(T)
for(var/i = 1; i < rand(3, 4); i++)
Blob.process()
// We pick randomly from the list to determine how many we spawn.
for(var/i = 1 to pickweight(numberOfBlobs))
var/turf/T = pick_subarea_turf(/area/horizon/maintenance, list(/proc/is_station_turf, /proc/not_turf_contains_dense_objects))
if(!T)
// If we can't find a turf anywhere, we aren't going to find one in subsequent loops and we can call it here.
log_and_message_admins("Blob event failed to find a viable turf.")
kill(TRUE)
return
/datum/event/blob/tick()
if(!Blob || !Blob.loc)
Blob = null
end()
kill()
return
if(IsMultiple(activeFor, 3))
Blob.process()
log_and_message_admins("Blob spawned at \the [get_area(T)]", location = T)
// Spawn the blob in.
var/obj/effect/blob/core/Blob = new /obj/effect/blob/core(T)
// Blobs receive a burst of growth from the moment they spawn!
for(var/int = 1 to rand(3, 4))
Blob.process()