Skip to content

Commit

Permalink
Just wanna try this out.
Browse files Browse the repository at this point in the history
  • Loading branch information
francinum committed Dec 19, 2024
1 parent 023eed2 commit 732b873
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions code/_compile_options.dm
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@

// #define UNIT_TESTS //If this is uncommented, we do a single run though of the game setup and tear down process with unit tests in between

#define ENFORCE_ABSTRACT //Throw a stack trace when instantiating an atom that is marked as abstract.

/////////////////////// AUTO WIKI

Expand Down
6 changes: 6 additions & 0 deletions code/game/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@
if(use_preloader && (type == global._preloader_path))//in case the instanciated atom is creating other atoms in New()
world.preloader_load(src)

#if defined(UNIT_TESTS) && defined(ENFORCE_ABSTRACT)
if(isabstract(src))
stack_trace("Instantiated abstract atom of type [type]. You shouldn't do that.")
#endif


var/do_initialize = SSatoms.initialized
if(do_initialize != INITIALIZATION_INSSATOMS)
args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD
Expand Down

0 comments on commit 732b873

Please sign in to comment.