Update bapi-dmm to include better path error handling (#9285)

This commit is contained in:
ShadowLarkens
2024-10-22 23:10:20 -07:00
committed by GitHub
parent cfdb309a17
commit 66c4b4b9ae
3 changed files with 10 additions and 0 deletions

Binary file not shown.

View File

@@ -43,6 +43,9 @@
/proc/_bapi_new_atom(text_path, turf/crds, list/attributes)
var/path = text2path(text_path)
if(!path)
CRASH("Bad atom path [text_path]")
if(attributes != null)
world.preloader_setup(attributes, path)
@@ -53,6 +56,8 @@
/proc/_bapi_create_or_get_area(text_path)
var/path = text2path(text_path)
if(!path)
CRASH("Bad area path [text_path]")
var/area/area_instance = GLOB.areas_by_type[path]
if(!area_instance)
@@ -73,6 +78,9 @@
/proc/_bapi_create_turf(turf/crds, text_path, list/attributes, place_on_top, no_changeturf)
var/path = text2path(text_path)
if(!path)
CRASH("Bad turf path [text_path]")
if(attributes != null)
world.preloader_setup(attributes, path)
@@ -86,6 +94,8 @@
world.preloader_load(instance)
/proc/_bapi_add_turf_to_area(area/A, turf/T)
if(!A || !T)
return
A.contents.Add(T)
/proc/_bapi_helper_get_world_type_turf()

Binary file not shown.