-
-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
170 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 Citadel Station Developers *// | ||
|
||
#define COMSIG_MAP_LEVEL_LOADED "loaded" | ||
#define COMSIG_MAP_LEVEL_UNLOADED "unloaded" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 Citadel Station Developers *// | ||
|
||
#define COMSIG_MAP_STRUCT_CONSTRUCTED "constructed" | ||
#define COMSIG_MAP_STRUCT_DECONSTRUCTED "deconstructed" |
17 changes: 0 additions & 17 deletions
17
code/controllers/subsystem/mapping/level/mapping-level-structs.dm
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 Citadel Station Developers *// | ||
|
||
/** | ||
* Contains loading / unloading logic. | ||
*/ | ||
|
||
//* Loading *// | ||
|
||
/** | ||
* called right after we physically load in, before init | ||
* called before atom init | ||
* | ||
* this is *not* called if we are created from a zlevel, say, when dynamically generating a planet. | ||
* this is solely for hardcoded map levels to have load behaviors. | ||
* undefined behavior will result if this is overridden on a level used for dynamic generation. | ||
* | ||
* @params | ||
* * z_index - zlevel we loaded on | ||
* * generation_callbacks - callbacks to add to perform post_loaded generation. this will be done in a batch before on_loaded_finalize and before atom init. | ||
*/ | ||
/datum/map_level/proc/on_loaded_immediate(z_index, list/datum/callback/additional_generation) | ||
return | ||
|
||
/** | ||
* called in a group after all maps and dependencies load **and** generation callbacks fire. | ||
* called after atom init | ||
* | ||
* this is *not* called if we are created from a zlevel, say, when dynamically generating a planet. | ||
* this is solely for hardcoded map levels to have load behaviors. | ||
* undefined behavior will result if this is overridden on a level used for dynamic generation. | ||
* | ||
* @params | ||
* * z_index - zlevel we loaded on | ||
*/ | ||
/datum/map_level/proc/on_loaded_finalize(z_index) | ||
return | ||
|
||
//* Unloading *// | ||
|
||
// No hooks yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,30 @@ | ||
//* This file is explicitly licensed under the MIT license. *// | ||
//* Copyright (c) 2024 Citadel Station Developers *// | ||
|
||
/** | ||
* Checks if we're actually loaded in | ||
*/ | ||
/obj/overmap/entity/proc/is_loaded_into_world() | ||
return !isnull(location) | ||
|
||
/** | ||
* get our z-level indices | ||
* | ||
* * entities that are on z's like shuttles instead of owning them use the z level they're on | ||
* | ||
* @return null if there are none / this is not semantically an entity on a z, and list() if we're not in a level right now. | ||
* @return list() of indices; empty list is possible. | ||
*/ | ||
/obj/overmap/entity/proc/get_z_indices() | ||
RETURN_TYPE(/list) | ||
return location?.get_z_indices() | ||
return location ? location.get_owned_z_indices() : list() | ||
|
||
/** | ||
* get our owned z-level indices | ||
* | ||
* * shuttles and similar entities don't own their indices. | ||
* | ||
* @return null if this is not semantically an entity on a z, and list() if none are owned, otherwise | ||
* @return list() of indices; empty list is possible. | ||
*/ | ||
/obj/overmap/entity/proc/get_owned_z_indices() | ||
RETURN_TYPE(/list) | ||
return location?.get_owned_z_indices() | ||
return location ? location.get_owned_z_indices() : list() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.