mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-01-03 14:02:49 +00:00
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
47 lines
1.2 KiB
Plaintext
47 lines
1.2 KiB
Plaintext
/datum/submap
|
|
var/name
|
|
var/pref_name
|
|
var/singleton/submap_archetype/archetype
|
|
var/associated_z
|
|
|
|
/datum/submap/New(var/existing_z)
|
|
SSmapping.submaps[src] = TRUE
|
|
associated_z = existing_z
|
|
|
|
/datum/submap/Destroy()
|
|
SSmapping.submaps -= src
|
|
. = ..()
|
|
|
|
/datum/submap/proc/setup_submap(var/singleton/submap_archetype/_archetype)
|
|
|
|
if(!istype(_archetype))
|
|
log_game( "Submap error - [name] - null or invalid archetype supplied ([_archetype]).")
|
|
qdel(src)
|
|
return
|
|
|
|
// Not much point doing this when it has presumably been done already.
|
|
if(_archetype == archetype)
|
|
log_game( "Submap error - [name] - submap already set up.")
|
|
return
|
|
|
|
archetype = _archetype
|
|
if(!pref_name)
|
|
pref_name = archetype.descriptor
|
|
|
|
log_game("Starting submap setup - '[name]', [archetype], [associated_z]z.")
|
|
|
|
if(!associated_z)
|
|
log_game( "Submap error - [name]/[archetype ? archetype.descriptor : "NO ARCHETYPE"] could not find an associated z-level for spawnpoint placement.")
|
|
qdel(src)
|
|
return
|
|
|
|
var/obj/effect/overmap/visitable/cell = GLOB.map_sectors["[associated_z]"]
|
|
if(istype(cell))
|
|
sync_cell(cell)
|
|
|
|
/datum/submap/proc/sync_cell(var/obj/effect/overmap/visitable/cell)
|
|
name = cell.name
|
|
|
|
/datum/submap/proc/available()
|
|
return TRUE
|