mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-09 07:57:00 +00:00
Update bapi-dmm to include better path error handling (#9285)
This commit is contained in:
Binary file not shown.
@@ -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.
Reference in New Issue
Block a user