Skip to content

Commit

Permalink
Merge pull request #4696 from out-of-phaze/modular/misc-species
Browse files Browse the repository at this point in the history
Move miscellaneous species (golems, aliums) to modpacks
  • Loading branch information
MistakeNot4892 authored Feb 1, 2025
2 parents 5923c5a + df38126 commit 5370e95
Show file tree
Hide file tree
Showing 18 changed files with 842 additions and 809 deletions.
2 changes: 0 additions & 2 deletions code/__defines/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,6 @@

#define SPECIES_HUMAN "Human"
#define SPECIES_MONKEY "Monkey"
#define SPECIES_ALIEN "Humanoid"
#define SPECIES_GOLEM "Golem"

#define SURGERY_CLOSED 0
#define SURGERY_OPEN 1
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystems/initialization/modpacks.dm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ SUBSYSTEM_DEF(modpacks)

// Compiled modpack information.
var/list/default_submap_whitelisted_species = list()
var/list/default_submap_blacklisted_species = list(SPECIES_ALIEN, SPECIES_GOLEM)
var/list/default_submap_blacklisted_species = list()
var/list/modpack_nanoui_directories = list()

/datum/controller/subsystem/modpacks/Initialize()
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/random/random.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
return

var/type_to_spawn = item_to_spawn()
if(!type_to_spawn)
return
if(islist(type_to_spawn))
for(var/spawn_type in type_to_spawn)
LAZYADD(., create_instance(spawn_type, loc))
Expand Down
142 changes: 0 additions & 142 deletions code/modules/species/outsider/random.dm

This file was deleted.

25 changes: 25 additions & 0 deletions maps/__map_modpack_compatibility.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// This must be included before maps and any modpacks that use it.
// That includes before _map_include.dm.

/// A spawner that can have its path overridden by a modpack, so that maps can have optional modpack compatibility.
/obj/abstract/modpack_compat
abstract_type = /obj/abstract/modpack_compat
name = "optional modpack object"
desc = "This item type is used to spawn a movable at roundstart, whether a modpack is included or not."
icon = 'icons/misc/mark.dmi'
icon_state = "rup"
var/atom/movable/spawn_object

/obj/abstract/modpack_compat/Initialize()
..()
if(ispath(spawn_object))
new spawn_object
return INITIALIZE_HINT_QDEL

#define OPTIONAL_SPAWNER(TYPE, VALUE) \
/obj/abstract/modpack_compat/##TYPE { \
spawn_object = VALUE; \
}

/// This spawner is used to optionally spawn the aliumizer if the random aliens modpack is included.
OPTIONAL_SPAWNER(aliumizer, null)
1 change: 1 addition & 0 deletions maps/modpack_testing/modpack_testing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
#include "../../mods/species/serpentid/_serpentid.dme"
#include "../../mods/species/utility_frames/_utility_frames.dme"
#include "../../mods/species/vox/_vox.dme"
#include "../../mods/species/random_species/_random_species.dme"

#define USING_MAP_DATUM /datum/map/modpack_testing

Expand Down
5 changes: 5 additions & 0 deletions mods/content/xenobiology/_xenobiology.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#define isslime(X) istype(X, /mob/living/slime)
#define SPECIES_GOLEM "Golem"

/decl/modpack/xenobiology
name = "Xenobiology"

/decl/modpack/xenobiology/initialize()
. = ..()
SSmodpacks.default_submap_blacklisted_species += SPECIES_GOLEM
2 changes: 2 additions & 0 deletions mods/content/xenobiology/_xenobiology.dme
Original file line number Diff line number Diff line change
Expand Up @@ -53,5 +53,7 @@
#include "slime\slime_reagents.dm"
#include "slime\slime_surgery.dm"
#include "slime\slime_update_icon.dm"
#include "species\golem.dm"
#include "species\golem_organs.dm"
// END_INCLUDE
#endif
File renamed without changes.
2 changes: 1 addition & 1 deletion mods/gamemodes/heist/heist_base.dmm
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@
/turf/unsimulated/floor/plating,
/area/map_template/syndicate_mothership/raider_base)
"aA" = (
/obj/structure/aliumizer,
/obj/abstract/modpack_compat/aliumizer,
/turf/unsimulated/floor/asteroid,
/area/map_template/syndicate_mothership/raider_base)
"aB" = (
Expand Down
Loading

0 comments on commit 5370e95

Please sign in to comment.