Fix runtimes when events cannot find a valid event area (#26594)

* Fix runtimes when events cannot find a valid event area

* oops
This commit is contained in:
Luc
2024-09-03 09:13:49 -04:00
committed by GitHub
parent 6f1a90c59d
commit 00a0b8f004
3 changed files with 10 additions and 0 deletions

View File

@@ -194,6 +194,9 @@
var/mess_count = rand(5, 10)
for(var/i in 1 to mess_count)
var/area/target_area = findEventArea()
if(!target_area)
log_debug("Failed to generate themed messes: No valid event areas were found.")
return
var/list/turfs = get_area_turfs(target_area)
while(length(turfs))
var/turf/T = pick_n_take(turfs)