Skip to content

Commit

Permalink
Add a modpack compatibility patch system
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze committed Jan 3, 2025
1 parent 1bb2ab4 commit 1e23635
Show file tree
Hide file tree
Showing 29 changed files with 175 additions and 156 deletions.
35 changes: 16 additions & 19 deletions maps/exodus/exodus.dm
Original file line number Diff line number Diff line change
@@ -1,38 +1,35 @@
#if !defined(USING_MAP_DATUM)

#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/meteor/_meteor.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/mixed/_mixed.dme"

#include "../../mods/content/mundane.dm"
#include "../../mods/content/scaling_descriptors.dm"

#include "../../mods/content/bigpharma/_bigpharma.dme"
#include "../../mods/content/corporate/_corporate.dme"
#include "../../mods/content/government/_government.dme"
#include "../../mods/content/matchmaking/_matchmaking.dme"
#include "../../mods/content/modern_earth/_modern_earth.dme"
#include "../../mods/content/mouse_highlights/_mouse_highlight.dme"
#include "../../mods/content/scaling_descriptors.dm"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/content/standard_jobs/_standard_jobs.dme"
#include "../../mods/content/xenobiology/_xenobiology.dme"

#include "../../mods/mobs/dionaea/_dionaea.dme"
#include "../../mods/mobs/borers/_borers.dme"

// Must come after borers for compatibility.
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/meteor/_meteor.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/mixed.dm"

// Must come after psionics for counsellor compatibility.
#include "../../mods/content/standard_jobs/_standard_jobs.dme"
#include "../../mods/mobs/borers/_borers.dme"
#include "../../mods/mobs/dionaea/_dionaea.dme"

#include "../../mods/species/ascent/_ascent.dme"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/species/serpentid/_serpentid.dme"
#include "../../mods/species/utility_frames/_utility_frames.dme"
#include "../../mods/species/bayliens/_bayliens.dme"

#include "../random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm"

Expand Down
40 changes: 20 additions & 20 deletions maps/ministation/ministation.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,37 @@ Twice...
#include "../../code/unit_tests/offset_tests.dm"
#endif

#include "../random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm"

#include "../../mods/content/mundane.dm"
#include "../../mods/content/scaling_descriptors.dm"

#include "../../mods/content/bigpharma/_bigpharma.dme"
#include "../../mods/content/corporate/_corporate.dme"
#include "../../mods/content/government/_government.dme"
#include "../../mods/content/matchmaking/_matchmaking.dme"
#include "../../mods/content/modern_earth/_modern_earth.dme"
#include "../../mods/content/mouse_highlights/_mouse_highlight.dme"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/content/standard_jobs/_standard_jobs.dme"
#include "../../mods/content/xenobiology/_xenobiology.dme"

#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/mixed/_mixed.dme"
#include "../../mods/gamemodes/mixed.dm"

#include "../random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm"
#include "../../mods/mobs/dionaea/_dionaea.dme"
#include "../../mods/mobs/borers/_borers.dme"

#include "../../mods/content/standard_jobs/_standard_jobs.dme"
#include "../../mods/content/xenobiology/_xenobiology.dme"
#include "../../mods/content/corporate/_corporate.dme"
#include "../../mods/content/matchmaking/_matchmaking.dme"
#include "../../mods/species/ascent/_ascent.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/species/neoavians/_neoavians.dme"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/species/serpentid/_serpentid.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/content/mundane.dm"
#include "../../mods/content/bigpharma/_bigpharma.dme"
#include "../../mods/content/government/_government.dme"
#include "../../mods/content/modern_earth/_modern_earth.dme"
#include "../../mods/content/mouse_highlights/_mouse_highlight.dme"
#include "../../mods/content/scaling_descriptors.dm"

#include "ministation_antagonists.dm"
#include "ministation_areas.dm"
Expand Down Expand Up @@ -70,12 +76,6 @@ Twice...
#include "../away/yacht/yacht.dm"
#include "../away/liberia/liberia.dm"

#include "../../mods/mobs/dionaea/_dionaea.dme"
#include "../../mods/mobs/borers/_borers.dme"

// Must come after borers for compatibility.
#include "../../mods/content/psionics/_psionics.dme"

#include "ministation_overmap.dm"

#include "jobs/command.dm"
Expand Down
38 changes: 18 additions & 20 deletions maps/modpack_testing/modpack_testing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,43 @@
#include "modpack_testing_lobby.dm"
#include "blank.dmm"

#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/meteor/_meteor.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/mixed/_mixed.dme"

#include "../../mods/content/mundane.dm"
#include "../../mods/content/scaling_descriptors.dm"

#include "../../mods/content/dungeon_loot/_dungeon_loot.dme"
#include "../../mods/content/bigpharma/_bigpharma.dme"
#include "../../mods/content/byond_membership/_byond_membership.dm"
#include "../../mods/content/corporate/_corporate.dme"
#include "../../mods/content/dungeon_loot/_dungeon_loot.dme"
#include "../../mods/content/fantasy/_fantasy.dme"
#include "../../mods/content/generic_shuttles/_generic_shuttles.dme"
#include "../../mods/content/government/_government.dme"
#include "../../mods/content/inertia/_inertia.dme"
#include "../../mods/content/matchmaking/_matchmaking.dme"
#include "../../mods/content/modern_earth/_modern_earth.dme"
#include "../../mods/content/mouse_highlights/_mouse_highlight.dme"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/content/shackles/_shackles.dme"
#include "../../mods/content/xenobiology/_xenobiology.dme"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/species/drakes/_drakes.dme" // include before _fantasy.dme so overrides work
#include "../../mods/content/fantasy/_fantasy.dme"
#include "../../mods/content/inertia/_inertia.dme"

#include "../../mods/mobs/dionaea/_dionaea.dme"
#include "../../mods/mobs/borers/_borers.dme"
#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/meteor/_meteor.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/mixed.dm"

// Must come after borers for compatibility.
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/mobs/borers/_borers.dme"
#include "../../mods/mobs/dionaea/_dionaea.dme"

#include "../../mods/species/serpentid/_serpentid.dme"
#include "../../mods/species/ascent/_ascent.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/species/drakes/_drakes.dme"
#include "../../mods/species/neoavians/_neoavians.dme"
#include "../../mods/species/serpentid/_serpentid.dme"
#include "../../mods/species/utility_frames/_utility_frames.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/species/vox/_vox.dme"

#define USING_MAP_DATUM /datum/map/modpack_testing
Expand Down
37 changes: 18 additions & 19 deletions maps/tradeship/tradeship.dm
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,43 @@
#include "../../code/unit_tests/offset_tests.dm"
#endif

#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/mixed/_mixed.dme"

#include "../random_ruins/exoplanet_ruins/playablecolony/playablecolony.dm"

#include "../../mods/content/government/away_sites/icarus/icarus.dm"
#include "../../mods/content/corporate/away_sites/lar_maria/lar_maria.dm"

#include "../../mods/content/standard_jobs/_standard_jobs.dme"
#include "../../mods/content/dungeon_loot/_dungeon_loot.dme"
#include "../../mods/content/mundane.dm"
#include "../../mods/content/scaling_descriptors.dm"

#include "../../mods/content/bigpharma/_bigpharma.dme"
#include "../../mods/content/corporate/_corporate.dme"
#include "../../mods/content/dungeon_loot/_dungeon_loot.dme"
#include "../../mods/content/government/_government.dme"
#include "../../mods/content/matchmaking/_matchmaking.dme"
#include "../../mods/content/modern_earth/_modern_earth.dme"
#include "../../mods/content/mouse_highlights/_mouse_highlight.dme"
#include "../../mods/content/scaling_descriptors.dm"
#include "../../mods/content/xenobiology/_xenobiology.dme"
#include "../../mods/content/matchmaking/_matchmaking.dme"
#include "../../mods/content/pheromones/_pheromones.dme"
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/content/standard_jobs/_standard_jobs.dme"
#include "../../mods/content/xenobiology/_xenobiology.dme"

#include "../../mods/mobs/dionaea/_dionaea.dme"
#include "../../mods/mobs/borers/_borers.dme"
#include "../../mods/gamemodes/cult/_cult.dme"
#include "../../mods/gamemodes/heist/_heist.dme"
#include "../../mods/gamemodes/ninja/_ninja.dme"
#include "../../mods/gamemodes/revolution/_revolution.dme"
#include "../../mods/gamemodes/spyvspy/_spyvspy.dme"
#include "../../mods/gamemodes/traitor/_traitor.dme"
#include "../../mods/gamemodes/mixed.dm"

// Must come after borers for compatibility.
#include "../../mods/content/psionics/_psionics.dme"
#include "../../mods/mobs/borers/_borers.dme"
#include "../../mods/mobs/dionaea/_dionaea.dme"

#include "../../mods/species/ascent/_ascent.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/species/drakes/_drakes.dme"
#include "../../mods/species/neoavians/_neoavians.dme"
#include "../../mods/species/serpentid/_serpentid.dme"
#include "../../mods/species/utility_frames/_utility_frames.dme"
#include "../../mods/species/neoavians/_neoavians.dme"
#include "../../mods/species/bayliens/_bayliens.dme"
#include "../../mods/species/vox/_vox.dme"

#include "../away/bearcat/bearcat.dm"
Expand Down
22 changes: 0 additions & 22 deletions mods/content/fantasy/datum/overrides.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,28 +31,6 @@
/decl/background_category/religion = /decl/background_detail/religion/other
)

// Rename grafadreka
/decl/species/grafadreka
name = "Meredrake"
name_plural = "Meredrakes"
description = "Meredrakes, sometimes called mire-drakes, are large reptillian pack predators, widely assumed to be cousins to true dragons. \
They are commonly found living in caves or burrows bordering grassland or forest, and while they prefer to hunt deer or rabbits, they will sometimes attack travellers if pickings are slim enough. \
While they are not domesticated, they can be habituated and trained as working animals if captured young enough."

/decl/sprite_accessory/marking/grafadreka
species_allowed = list("Meredrake")

/decl/language/grafadreka
desc = "Hiss hiss, feed me rabbits."

/decl/material/liquid/sifsap
name = "drake spittle"
lore_text = "A complex chemical slurry brewed up in the gullet of meredrakes."

/obj/aura/sifsap_salve
name = "Drakespittle Salve"
descriptor = "glowing spittle"

// Rename wooden prostheses
/decl/bodytype/prosthetic/wooden
name = "carved wooden" // weird to call it 'crude' when it's cutting-edge for the setting
2 changes: 0 additions & 2 deletions mods/content/psionics/_psionics.dme
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "items\literature.dm"
#include "items\null_ammo.dm"
#include "items\nullrod.dm"
#include "items\soulstone.dm"
#include "machines\psimeter.dm"
#include "machines\psimonitor.dm"
#include "system\subsystem_psi.dm"
Expand All @@ -54,7 +53,6 @@
#include "system\psionics\interface\ui.dm"
#include "system\psionics\interface\ui_hub.dm"
#include "system\psionics\interface\ui_toggles.dm"
#include "system\psionics\mob\borer_power.dm"
#include "system\psionics\mob\mob.dm"
#include "system\psionics\mob\mob_assay.dm"
#include "system\psionics\mob\mob_interactions.dm"
Expand Down
9 changes: 0 additions & 9 deletions mods/content/standard_jobs/jobs/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -199,15 +199,6 @@
)
give_psionic_implant_on_join = FALSE

#ifdef MODPACK_PSIONICS
/datum/job/counselor/equip_job(var/mob/living/human/H)
if(H.mind.role_alt_title == "Counselor")
psi_faculties = list("[PSI_REDACTION]" = PSI_RANK_OPERANT)
if(H.mind.role_alt_title == "Mentalist")
psi_faculties = list("[PSI_COERCION]" = PSI_RANK_OPERANT)
return ..()
#endif

// Department-flavor IDs
/obj/item/card/id/medical
name = "identification card"
Expand Down
1 change: 1 addition & 0 deletions mods/gamemodes/cult/overrides.dm
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
playsound(src, 'sound/effects/ghost2.ogg', 10, 5)

/datum/trader/ship/clothingshop/hatglovesaccessories/New()
..()
possible_trading_items[/obj/item/clothing/head/culthood] = TRADER_BLACKLIST_ALL

/mob/living/silicon/ai
Expand Down
8 changes: 0 additions & 8 deletions mods/gamemodes/heist/_heist.dme
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#ifndef GAMEMODE_PACK_HEIST
#define GAMEMODE_PACK_HEIST

#ifdef MODPACK_VOX
#warn Vox modpack loaded before Heist modpack, compatibility features will be missing.
#endif
#ifdef GAMEMODE_PACK_MIXED
#warn Mixed gamemodes modpack loaded before Heist modpack, Heist combination modes will be missing.
#endif

// BEGIN_INCLUDE
#include "_heist.dm"
#include "areas.dm"
Expand Down
7 changes: 7 additions & 0 deletions mods/gamemodes/mixed.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef GAMEMODE_PACK_MIXED
#define GAMEMODE_PACK_MIXED
#endif

// This modpack doesn't actually have anything here, and instead it uses the compatibility patch system to make load order not matter.
/decl/modpack/mixed_modes
name = "Mixed Gamemodes"
2 changes: 0 additions & 2 deletions mods/gamemodes/mixed/_mixed.dm

This file was deleted.

15 changes: 0 additions & 15 deletions mods/gamemodes/mixed/_mixed.dme

This file was deleted.

5 changes: 0 additions & 5 deletions mods/mobs/borers/_borers.dme
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#ifndef CONTENT_PACK_BORERS
#define CONTENT_PACK_BORERS

#ifdef MODPACK_PSIONICS
#warn Psionics modpack loaded before Borers modpack, compatibility features will be missing.
#endif

// BEGIN_INCLUDE
#include "borer.dm"
#include "datum\antagonist.dm"
Expand Down
5 changes: 0 additions & 5 deletions mods/species/drakes/_drakes.dme
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
#ifndef MODPACK_DRAKES
#define MODPACK_DRAKES

#ifdef MODPACK_FANTASY
#warn Fantasy modpack loaded before Drakes modpack, compatibility features will be missing.
#endif

// BEGIN_INCLUDE
#include "_drakes.dm"
#include "_overrides.dm"
Expand Down
1 change: 0 additions & 1 deletion mods/species/vox/_vox.dme
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include "datum\cultures_vox.dm"
#include "datum\descriptors_vox.dm"
#include "datum\factions_vox.dm"
#include "datum\heist_compatibility.dm"
#include "datum\language.dm"
#include "datum\locations_vox.dm"
#include "datum\outfits.dm"
Expand Down
4 changes: 4 additions & 0 deletions mods/~compatibility/patches/fantasy.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Override drake lore and names for the fantasy modpack.
#ifdef MODPACK_DRAKES
#include fantasy/drake_fantasy.dm
#endif
Loading

0 comments on commit 1e23635

Please sign in to comment.