diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab7c849f12..2a087bcf56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -67,7 +67,7 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Cache SpacemanDMM + - name: Restore SpacemanDMM Cache uses: actions/cache@v4 with: path: ~/SpacemanDMM @@ -92,7 +92,7 @@ jobs: unit_tests: strategy: matrix: - map: ['tether', 'stellar_delight', 'groundbase'] + map: ['USE_MAP_TETHER', 'USE_MAP_STELLARDELIGHT', 'USE_MAP_GROUNDBASE'] # name: Integration Tests (${{ matrix.map }}) name: Integration Tests # needs: ['run_linters', 'dreamchecker'] @@ -102,10 +102,10 @@ jobs: - name: Ensure +x on CI directory run: | chmod -R +x ./tools/ci - - name: Setup Cache + - name: Restore BYOND Cache uses: actions/cache@v4 with: - path: $HOME/BYOND + path: $HOME/byond key: ${{ runner.os }}-byond - name: Install RUST_G Dependencies run: | @@ -118,35 +118,38 @@ jobs: tools/ci/install_byond.sh tools/ci/compile_and_run.sh env: - TEST_DEFINE: "UNIT_TEST" - TEST_FILE: "code/_unit_tests.dm" - MAP: ${{ matrix.map }} - REPLACE: true + EXTRA_ARGS: "-DUNIT_TEST -D${{ matrix.map }}" RUN: "1" - - name: Compile POIs + + extra_map_tests: + name: Map Tests + runs-on: ubuntu-20.04 + steps: + - uses: actions/checkout@v4 + - name: Ensure +x on CI directory run: | - tools/ci/install_byond.sh - tools/ci/compile_and_run.sh + chmod -R +x ./tools/ci + - name: Restore BYOND Cache + uses: actions/cache@v4 + with: + path: $HOME/byond + key: ${{ runner.os }}-byond + - name: Install BYOND + run: tools/ci/install_byond.sh + - name: Compile POIs + run: tools/ci/compile_and_run.sh env: - TEST_DEFINE: "MAP_TEST" - TEST_FILE: "code/_map_tests.dm" - MAP: ${{ matrix.map }} - REPLACE: false + EXTRA_ARGS: "-DMAP_TEST" RUN: "0" - name: Compile away missions - run: | - tools/ci/install_byond.sh - tools/ci/compile_and_run.sh + run: tools/ci/compile_and_run.sh env: - TEST_DEFINE: "AWAY_MISSION_TEST" - TEST_FILE: "code/_away_mission_tests.dm" - MAP: ${{ matrix.map }} - REPLACE: false + EXTRA_ARGS: "-DAWAY_MISSION_TEST -DUSE_MAP_TETHER" # Only Tether has support for all away missions RUN: "0" tests_successful: name: Integration Tests - needs: ['run_linters', 'dreamchecker', 'unit_tests'] + needs: ['run_linters', 'dreamchecker', 'unit_tests', 'extra_map_tests'] runs-on: ubuntu-20.04 steps: - name: Report Success diff --git a/code/__defines/_compile_options.dm b/code/__defines/_compile_options.dm index 058115f4fd..57748c4419 100644 --- a/code/__defines/_compile_options.dm +++ b/code/__defines/_compile_options.dm @@ -15,11 +15,16 @@ // Movement Compile Options //#define CARDINAL_INPUT_ONLY // Uncomment to disable diagonal player movement (restore previous cardinal-moves-only behavior) +// CI will override these as appropriate +// #define MAP_TEST 0 +// #define AWAY_MISSION_TEST 0 +// #define UNIT_TEST 0 + // Comment/Uncomment this to turn off/on shuttle code debugging logs #define DEBUG_SHUTTLES // If we are doing the map test build, do not include the main maps, only the submaps. -#if MAP_TEST +#ifdef MAP_TEST #define USING_MAP_DATUM /datum/map #define MAP_OVERRIDE 1 #endif diff --git a/code/_away_mission_tests.dm b/code/_away_mission_tests.dm deleted file mode 100644 index 4d9d4e91f9..0000000000 --- a/code/_away_mission_tests.dm +++ /dev/null @@ -1,10 +0,0 @@ -/* - * - * This file is used by CI to indicate that additional maps need to be compiled to look for errors such as missing paths. - * Do not add anything but the AWAY_MISSION_TEST definition here as it will be overwritten by CI when running tests. - * - * - * Should you wish to edit set AWAY_MISSION_TEST to 1 like so: - * #define AWAY_MISSION_TEST 1 - */ -#define AWAY_MISSION_TEST 0 diff --git a/code/_map_tests.dm b/code/_map_tests.dm deleted file mode 100644 index 372a4a7194..0000000000 --- a/code/_map_tests.dm +++ /dev/null @@ -1,10 +0,0 @@ -/* - * - * This file is used by CI to indicate that additional maps need to be compiled to look for errors such as missing paths. - * Do not add anything but the MAP_TEST definition here as it will be overwritten by CI when running tests. - * - * - * Should you wish to edit set MAP_TEST to 1 like so: - * #define MAP_TEST 1 - */ -#define MAP_TEST 0 diff --git a/code/_unit_tests.dm b/code/_unit_tests.dm deleted file mode 100644 index 7a1a4cbbf3..0000000000 --- a/code/_unit_tests.dm +++ /dev/null @@ -1,10 +0,0 @@ -/* - * - * This file is used by CI to indicate that Unit Tests are to be ran. - * Do not add anything but the UNIT_TEST definition here as it will be overwritten by CI when running tests. - * - * - * Should you wish to edit set UNIT_TEST to 1 like so: - * #define UNIT_TEST 1 - */ -#define UNIT_TEST 0 diff --git a/code/game/world.dm b/code/game/world.dm index ceb73437d0..24ea94a8a2 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -56,7 +56,7 @@ . = ..() -#if UNIT_TEST +#ifdef UNIT_TEST log_unit_test("Unit Tests Enabled. This will destroy the world when testing is complete.") log_unit_test("If you did not intend to enable this please check code/__defines/unit_testing.dm") #endif @@ -78,7 +78,7 @@ spawn(1) master_controller.setup() -#if UNIT_TEST +#ifdef UNIT_TEST initialize_unit_tests() #endif diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm index 2f3dd757ae..f9f0b8c94d 100644 --- a/code/modules/awaymissions/zlevel.dm +++ b/code/modules/awaymissions/zlevel.dm @@ -1,5 +1,8 @@ /proc/createRandomZlevel() - if(awaydestinations.len || UNIT_TEST) //crude, but it saves another var! //VOREStation Edit - No loading away missions during CI testing + #ifdef UNIT_TEST + return + #endif + if(awaydestinations.len) //crude, but it saves another var! //VOREStation Edit - No loading away missions during CI testing return var/list/potentialRandomZlevels = list() diff --git a/guides/Guide to Map Folders.md b/guides/Guide to Map Folders.md index 95ad239178..98869d2cce 100644 --- a/guides/Guide to Map Folders.md +++ b/guides/Guide to Map Folders.md @@ -44,7 +44,7 @@ mappath = 'tether_plains.dmm' # Non-map specific expedition areas should be loaded as follows: /// Away Missions -#if AWAY_MISSION_TEST +#ifdef AWAY_MISSION_TEST #include "../../expedition_vr/beach/beach.dmm" #include "../../expedition_vr/beach/cave.dmm" #include "../../expedition_vr/alienship/alienship.dmm" @@ -65,4 +65,4 @@ mappath = 'tether_plains.dmm' /datum/map_z_level/tether_lateload/away_beach name = "Away Mission - Desert Beach" z = Z_LEVEL_BEACH - base_turf = /turf/simulated/floor/outdoors/rocks/caves \ No newline at end of file + base_turf = /turf/simulated/floor/outdoors/rocks/caves diff --git a/maps/cynosure/cynosure_shuttles.dm b/maps/cynosure/cynosure_shuttles.dm index 039027a942..8dcd023c40 100644 --- a/maps/cynosure/cynosure_shuttles.dm +++ b/maps/cynosure/cynosure_shuttles.dm @@ -442,7 +442,7 @@ ESCAPE_POD(1) /* // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "generic_shuttle.dmm" #endif @@ -496,4 +496,4 @@ ESCAPE_POD(1) vessel_mass = 1000 vessel_size = SHIP_SIZE_TINY shuttle = "Private Vessel" -*/ \ No newline at end of file +*/ diff --git a/maps/expedition_vr/beach/submaps/mountains.dm b/maps/expedition_vr/beach/submaps/mountains.dm index 9150c690c2..d07fffe3ff 100644 --- a/maps/expedition_vr/beach/submaps/mountains.dm +++ b/maps/expedition_vr/beach/submaps/mountains.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST #include "deadBeacon.dmm" #include "prepper1.dmm" #include "quarantineshuttle.dmm" @@ -371,4 +371,3 @@ mappath = 'maps/expedition_vr/beach/submaps/speakeasy_vr.dmm' cost = 10 allow_duplicates = FALSE - diff --git a/maps/groundbase/groundbase.dm b/maps/groundbase/groundbase.dm index 1bdb846c52..58f01c51d3 100644 --- a/maps/groundbase/groundbase.dm +++ b/maps/groundbase/groundbase.dm @@ -12,7 +12,7 @@ #include "..\offmap_vr\common_offmaps.dm" #include "..\~map_system\maps_vr.dm" - #if !AWAY_MISSION_TEST //Don't include these for just testing away missions + #ifndef AWAY_MISSION_TEST //Don't include these for just testing away missions #include "gb-z1.dmm" #include "gb-z2.dmm" #include "gb-z3.dmm" @@ -24,4 +24,4 @@ #warn A map has already been included, ignoring Groundbase -#endif \ No newline at end of file +#endif diff --git a/maps/groundbase/groundbase_poi_stuff.dm b/maps/groundbase/groundbase_poi_stuff.dm index f9e0a5c5e3..a0d4b571bc 100644 --- a/maps/groundbase/groundbase_poi_stuff.dm +++ b/maps/groundbase/groundbase_poi_stuff.dm @@ -1,4 +1,4 @@ -#if MAP_TEST +#ifdef MAP_TEST #include "pois/outdoors1.dmm" #include "pois/outdoors2.dmm" #include "pois/outdoors3.dmm" diff --git a/maps/offmap_vr/common_offmaps.dm b/maps/offmap_vr/common_offmaps.dm index 07b3edee72..d375c139b3 100644 --- a/maps/offmap_vr/common_offmaps.dm +++ b/maps/offmap_vr/common_offmaps.dm @@ -1,5 +1,5 @@ /// Away Missions -#if AWAY_MISSION_TEST +#ifdef AWAY_MISSION_TEST #include "../expedition_vr/beach/beach.dmm" #include "../expedition_vr/beach/cave.dmm" #include "../expedition_vr/alienship/alienship.dmm" @@ -358,7 +358,7 @@ ////////////////////////////////////////////////////////////////////////////////////// // Admin-use z-levels for loading whenever an admin feels like -#if AWAY_MISSION_TEST +#ifdef AWAY_MISSION_TEST #include "../submaps/admin_use_vr/spa.dmm" #endif #include "../submaps/admin_use_vr/fun.dm" @@ -616,7 +616,7 @@ #include "../offmap_vr/talon/talon_v2.dm" #include "../offmap_vr/talon/talon_v2_areas.dm" -#if MAP_TEST +#ifdef MAP_TEST #include "../offmap_vr/talon/talon_v2.dmm" #endif diff --git a/maps/offmap_vr/om_ships/abductor.dm b/maps/offmap_vr/om_ships/abductor.dm index 4cb4502a21..6c405bf926 100644 --- a/maps/offmap_vr/om_ships/abductor.dm +++ b/maps/offmap_vr/om_ships/abductor.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "abductor.dmm" #endif @@ -85,4 +85,3 @@ You will find a dispenser within the room you started in which contains some bas /obj/machinery/power/rtg/abductor/built/abductor name = "Void Core" power_gen = 5000000 - diff --git a/maps/offmap_vr/om_ships/aro.dm b/maps/offmap_vr/om_ships/aro.dm index c4c464442f..f8b1870b48 100644 --- a/maps/offmap_vr/om_ships/aro.dm +++ b/maps/offmap_vr/om_ships/aro.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "aro.dmm" #endif diff --git a/maps/offmap_vr/om_ships/aro2.dm b/maps/offmap_vr/om_ships/aro2.dm index d42ef4d6bb..22fe311472 100644 --- a/maps/offmap_vr/om_ships/aro2.dm +++ b/maps/offmap_vr/om_ships/aro2.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "aro2.dmm" #endif @@ -100,4 +100,4 @@ docking_controller_tag = "aroboat2_docker" shuttle_area = /area/shuttle/aroboat2 fuel_consumption = 0 - defer_initialisation = TRUE \ No newline at end of file + defer_initialisation = TRUE diff --git a/maps/offmap_vr/om_ships/aro3.dm b/maps/offmap_vr/om_ships/aro3.dm index 791a53a642..e891bd6e96 100644 --- a/maps/offmap_vr/om_ships/aro3.dm +++ b/maps/offmap_vr/om_ships/aro3.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "aro3.dmm" #endif diff --git a/maps/offmap_vr/om_ships/bearcat.dm b/maps/offmap_vr/om_ships/bearcat.dm index 69cb39e81f..6c21dc6ed5 100644 --- a/maps/offmap_vr/om_ships/bearcat.dm +++ b/maps/offmap_vr/om_ships/bearcat.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "bearcat.dmm" #endif @@ -199,4 +199,4 @@ /area/shuttle/bearcat/comms name = "\improper Bearcat Communications Relay" icon_state = "tcomsatcham" - music = list('sound/ambience/signal.ogg') \ No newline at end of file + music = list('sound/ambience/signal.ogg') diff --git a/maps/offmap_vr/om_ships/curashuttle.dm b/maps/offmap_vr/om_ships/curashuttle.dm index e2a44154e6..212c5b56c4 100644 --- a/maps/offmap_vr/om_ships/curashuttle.dm +++ b/maps/offmap_vr/om_ships/curashuttle.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "curashuttle.dmm" #endif @@ -63,4 +63,4 @@ [b]Notice[/b]: Small private vessel"} vessel_mass = 2000 vessel_size = SHIP_SIZE_TINY - shuttle = "Cura" \ No newline at end of file + shuttle = "Cura" diff --git a/maps/offmap_vr/om_ships/geckos.dm b/maps/offmap_vr/om_ships/geckos.dm index d204125414..469ed60b45 100644 --- a/maps/offmap_vr/om_ships/geckos.dm +++ b/maps/offmap_vr/om_ships/geckos.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "gecko_sh.dmm" #include "gecko_cr.dmm" #endif diff --git a/maps/offmap_vr/om_ships/generic_shuttle.dm b/maps/offmap_vr/om_ships/generic_shuttle.dm index 65cfb4b4cc..0be9f3b7a8 100644 --- a/maps/offmap_vr/om_ships/generic_shuttle.dm +++ b/maps/offmap_vr/om_ships/generic_shuttle.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "generic_shuttle.dmm" #endif @@ -52,4 +52,4 @@ [b]Notice[/b]: Small private vessel"} vessel_mass = 1000 vessel_size = SHIP_SIZE_TINY - shuttle = "Private Vessel" \ No newline at end of file + shuttle = "Private Vessel" diff --git a/maps/offmap_vr/om_ships/hybridshuttle.dm b/maps/offmap_vr/om_ships/hybridshuttle.dm index c35c9af290..09bdc7abad 100644 --- a/maps/offmap_vr/om_ships/hybridshuttle.dm +++ b/maps/offmap_vr/om_ships/hybridshuttle.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "hybridshuttle.dmm" #endif @@ -49,4 +49,4 @@ [b]Notice[/b]: Experimental vessel"} vessel_mass = 3000 vessel_size = SHIP_SIZE_SMALL - shuttle = "XN-29 Prototype Shuttle" \ No newline at end of file + shuttle = "XN-29 Prototype Shuttle" diff --git a/maps/offmap_vr/om_ships/itglight.dm b/maps/offmap_vr/om_ships/itglight.dm index d771b87589..d38f066fc7 100644 --- a/maps/offmap_vr/om_ships/itglight.dm +++ b/maps/offmap_vr/om_ships/itglight.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "itglight.dmm" #endif @@ -149,4 +149,4 @@ She has six point defense turrets, but her armor is thin, and she hasn't got any fancy shields.
She's not a combat ship, and she demands a competent pilot to treat her right.

Also d1a2 is best port, just saying.

- Also the ship is 150 meters long and 92 meters wide, in case that is ever relevent."} \ No newline at end of file + Also the ship is 150 meters long and 92 meters wide, in case that is ever relevent."} diff --git a/maps/offmap_vr/om_ships/lunaship.dm b/maps/offmap_vr/om_ships/lunaship.dm index 26ff0e54eb..c624d9c210 100644 --- a/maps/offmap_vr/om_ships/lunaship.dm +++ b/maps/offmap_vr/om_ships/lunaship.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "lunaship.dmm" #endif @@ -97,4 +97,4 @@ vessel_size = SHIP_SIZE_SMALL initial_generic_waypoints = list("luna_near_fore_port", "luna_near_fore_star", "luna_near_aft_port", "luna_near_aft_star", "luna_near_fore", "luna_wing_port", "luna_wing_star", "luna_near_aft") fore_dir = NORTH - known = FALSE \ No newline at end of file + known = FALSE diff --git a/maps/offmap_vr/om_ships/mackerels.dm b/maps/offmap_vr/om_ships/mackerels.dm index 22309b8163..d132b9ce2c 100644 --- a/maps/offmap_vr/om_ships/mackerels.dm +++ b/maps/offmap_vr/om_ships/mackerels.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "mackerel_sh.dmm" #include "mackerel_lc.dmm" #include "mackerel_lc_wreck.dmm" diff --git a/maps/offmap_vr/om_ships/mercenarybase.dm b/maps/offmap_vr/om_ships/mercenarybase.dm index 4db51b0b4e..772a4c6c80 100644 --- a/maps/offmap_vr/om_ships/mercenarybase.dm +++ b/maps/offmap_vr/om_ships/mercenarybase.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "mercenarybase.dmm" #endif @@ -44,4 +44,4 @@ /area/mercbase/dock name = "\improper Mercenary Base Boat Dock" /area/mercbase/cafeteria - name = "\improper Mercenary Base Boat Cafeteria" \ No newline at end of file + name = "\improper Mercenary Base Boat Cafeteria" diff --git a/maps/offmap_vr/om_ships/mercship.dm b/maps/offmap_vr/om_ships/mercship.dm index 8e035c2611..89568e9444 100644 --- a/maps/offmap_vr/om_ships/mercship.dm +++ b/maps/offmap_vr/om_ships/mercship.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "mercship.dmm" #endif @@ -105,4 +105,4 @@ docking_controller_tag = "mercboat_docker" shuttle_area = /area/shuttle/mercboat fuel_consumption = 0 - defer_initialisation = TRUE \ No newline at end of file + defer_initialisation = TRUE diff --git a/maps/offmap_vr/om_ships/salamander.dm b/maps/offmap_vr/om_ships/salamander.dm index 340b8c3d42..661e8f22c5 100644 --- a/maps/offmap_vr/om_ships/salamander.dm +++ b/maps/offmap_vr/om_ships/salamander.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "salamander.dmm" #endif @@ -207,4 +207,4 @@ stay safe out there and always double check who you sign with
\
\ rest of the cargo is covered by insurance anyway, so help yourself/ves i guess
\
\ --M"} \ No newline at end of file +-M"} diff --git a/maps/offmap_vr/om_ships/screebarge.dm b/maps/offmap_vr/om_ships/screebarge.dm index 08d4390269..0da5104581 100644 --- a/maps/offmap_vr/om_ships/screebarge.dm +++ b/maps/offmap_vr/om_ships/screebarge.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "screebarge.dmm" #endif @@ -50,4 +50,4 @@ desc = "Some sort of makeshift battle barge. Appears to be armed." vessel_mass = 3000 vessel_size = SHIP_SIZE_SMALL - shuttle = "Battle Barge" \ No newline at end of file + shuttle = "Battle Barge" diff --git a/maps/offmap_vr/om_ships/sdf_corvettes.dm b/maps/offmap_vr/om_ships/sdf_corvettes.dm index dad3035167..558ed21fae 100644 --- a/maps/offmap_vr/om_ships/sdf_corvettes.dm +++ b/maps/offmap_vr/om_ships/sdf_corvettes.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "sdf_corvette.dmm" #include "sdf_corvette_wreck.dmm" #include "sdf_cutter.dmm" diff --git a/maps/offmap_vr/om_ships/shelter_5.dm b/maps/offmap_vr/om_ships/shelter_5.dm index e23a6814c1..a1060f79f0 100644 --- a/maps/offmap_vr/om_ships/shelter_5.dm +++ b/maps/offmap_vr/om_ships/shelter_5.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "shelter_5.dmm" #endif diff --git a/maps/offmap_vr/om_ships/vespa.dm b/maps/offmap_vr/om_ships/vespa.dm index b6a2b1b963..be3810bad3 100644 --- a/maps/offmap_vr/om_ships/vespa.dm +++ b/maps/offmap_vr/om_ships/vespa.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "vespa.dmm" #endif @@ -159,4 +159,4 @@ //docking_controller_tag = "vespaboat_docker" //shuttle_area = /area/shuttle/vespaboat //fuel_consumption = 0 - //defer_initialisation = TRUE \ No newline at end of file + //defer_initialisation = TRUE diff --git a/maps/om_adventure/grasscave.dm b/maps/om_adventure/grasscave.dm index 3dc714066d..e4544cd087 100644 --- a/maps/om_adventure/grasscave.dm +++ b/maps/om_adventure/grasscave.dm @@ -1,4 +1,4 @@ -#if MAP_TEST +#ifdef MAP_TEST #include "pois/darkstar.dmm" #include "pois/darktear1.dmm" #include "pois/darktear2.dmm" diff --git a/maps/stellar_delight/stellar_delight.dm b/maps/stellar_delight/stellar_delight.dm index a38672d4a7..91f26246b7 100644 --- a/maps/stellar_delight/stellar_delight.dm +++ b/maps/stellar_delight/stellar_delight.dm @@ -11,7 +11,7 @@ #include "..\offmap_vr\common_offmaps.dm" #include "..\tether\tether_jobs.dm" - #if !AWAY_MISSION_TEST //Don't include these for just testing away missions + #ifndef AWAY_MISSION_TEST //Don't include these for just testing away missions #include "stellar_delight1.dmm" #include "stellar_delight2.dmm" #include "stellar_delight3.dmm" @@ -23,4 +23,4 @@ #warn A map has already been included, ignoring Tether -#endif \ No newline at end of file +#endif diff --git a/maps/submaps/admin_use_vr/ert.dm b/maps/submaps/admin_use_vr/ert.dm index a5cd94105f..06021501f0 100644 --- a/maps/submaps/admin_use_vr/ert.dm +++ b/maps/submaps/admin_use_vr/ert.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "ert.dmm" #endif @@ -24,7 +24,7 @@ /area/ship/ert/engineering name = "\improper NRV Von Braun - Engineering Control Room" icon_state = "engine_monitoring" - + /area/ship/ert/eng_storage name = "\improper NRV Von Braun - Engineering Storage" icon_state = "storage" @@ -36,7 +36,7 @@ /area/ship/ert/atmos name = "\improper NRV Von Braun - Atmospherics" icon_state = "atmos" - + /area/ship/ert/mech_bay name = "\improper NRV Von Braun - RIG & Mech Bay" icon_state = "yellow" @@ -184,7 +184,7 @@ on_enter_occupant_message = "You feel cool air surround you. You go numb as your senses turn inward." on_store_visible_message_1 = "hums and hisses as it moves" on_store_visible_message_2 = "into cryogenic storage." - + //Misc Stuff /obj/item/paper/ert_armory_cells name = "ERT Armory Cell Supply" @@ -236,4 +236,4 @@ P.S. Before any of you ask, no, you cannot fire yourself or your teammates out o storage_type = "responders" storage_name = "ERT Oversight Control" - allow_items = 1 \ No newline at end of file + allow_items = 1 diff --git a/maps/submaps/admin_use_vr/event_autonomous_drone.dm b/maps/submaps/admin_use_vr/event_autonomous_drone.dm index 4539fdd8a0..48a7735968 100644 --- a/maps/submaps/admin_use_vr/event_autonomous_drone.dm +++ b/maps/submaps/admin_use_vr/event_autonomous_drone.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "event_autonomous_drone.dmm" #endif diff --git a/maps/submaps/admin_use_vr/mercship.dm b/maps/submaps/admin_use_vr/mercship.dm index fd4fbc2ebe..6af7a7192e 100644 --- a/maps/submaps/admin_use_vr/mercship.dm +++ b/maps/submaps/admin_use_vr/mercship.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "mercship.dmm" #endif @@ -32,7 +32,7 @@ /area/ship/manta/atmos name = "\improper Mercenary Cruiser - Atmospherics" icon_state = "atmos" - + /area/ship/manta/mech_bay name = "\improper Mercenary Cruiser - Mech Bay" icon_state = "mechbay" @@ -100,19 +100,19 @@ /area/ship/manta/commander name = "\improper Mercenary Cruiser - Commander's Room" icon_state = "head_quarters" - + /area/ship/manta/holding name = "\improper Mercenary Cruiser - Holding Cells" icon_state = "brig" - + /area/ship/manta/recreation name = "\improper Mercenary Cruiser - Recreation & Supplies" icon_state = "recreation_area" - + /area/ship/manta/gunnery name = "\improper Mercenary Cruiser - Gunnery" icon_state = "security_sub" - + /area/ship/manta/magazine name = "\improper Mercenary Cruiser - Cannon Magazine" icon_state = "darkred" @@ -218,7 +218,7 @@ on_enter_occupant_message = "You feel cool air surround you. You go numb as your senses turn inward." on_store_visible_message_1 = "hums and hisses as it moves" on_store_visible_message_2 = "into cryogenic storage." - + //Misc Stuff /obj/item/paper/manta_shields name = "Shield Setup" @@ -296,4 +296,4 @@ In the meantime, happy hunting. Go bag me some carp. The mech bay can be found i storage_type = "mercenaries" storage_name = "Merc Oversight Control" - allow_items = 1 \ No newline at end of file + allow_items = 1 diff --git a/maps/submaps/admin_use_vr/salamander_trader.dm b/maps/submaps/admin_use_vr/salamander_trader.dm index 52819e32cf..0fbb79ba45 100644 --- a/maps/submaps/admin_use_vr/salamander_trader.dm +++ b/maps/submaps/admin_use_vr/salamander_trader.dm @@ -1,5 +1,5 @@ // Compile in the map for CI testing if we're testing compileability of all the maps -#if MAP_TEST +#ifdef MAP_TEST #include "salamander_trader.dmm" #endif @@ -25,28 +25,28 @@ requires_power = 1 has_gravity = 0 -/area/shuttle/salamander_trader_q1 +/area/shuttle/salamander_trader_q1 name = "\improper Salamander Trader Quarters 1" icon = 'icons/turf/areas_vr_talon.dmi' icon_state = "gray-p" requires_power = 1 has_gravity = 0 -/area/shuttle/salamander_trader_q2 +/area/shuttle/salamander_trader_q2 name = "\improper Salamander Trader Quarters 2" icon = 'icons/turf/areas_vr_talon.dmi' icon_state = "gray-s" requires_power = 1 has_gravity = 0 -/area/shuttle/salamander_trader_galley +/area/shuttle/salamander_trader_galley name = "\improper Salamander Trader Galley" icon = 'icons/turf/areas_vr_talon.dmi' icon_state = "dark-s" requires_power = 1 has_gravity = 0 -/area/shuttle/salamander_trader_head +/area/shuttle/salamander_trader_head name = "\improper Salamander Trader Head" icon = 'icons/turf/areas_vr_talon.dmi' icon_state = "dark-p" @@ -87,4 +87,4 @@ vessel_mass = 4500 vessel_size = SHIP_SIZE_LARGE fore_dir = EAST - shuttle = "Salamander Trader" \ No newline at end of file + shuttle = "Salamander Trader" diff --git a/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm b/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm index 84374d4a66..b6f9069902 100644 --- a/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm +++ b/maps/submaps/engine_submaps/southern_cross/_engine_submaps.dm @@ -2,7 +2,7 @@ // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new engine, please add it to this list. // Polaris: R-UST and Singulo are commented out as their current submap does not line up with the control room. -#if MAP_TEST +#ifdef MAP_TEST // #include "engine_rust.dmm" // #include "engine_singulo.dmm" #include "engine_sme.dmm" @@ -33,4 +33,4 @@ /datum/map_template/engine/tesla name = "Edison's Bane" desc = "The Telsa Engine" - mappath = 'maps/submaps/engine_submaps/southern_cross/engine_tesla.dmm' \ No newline at end of file + mappath = 'maps/submaps/engine_submaps/southern_cross/engine_tesla.dmm' diff --git a/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm b/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm index ee0a748b26..2539c3eaa2 100644 --- a/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm +++ b/maps/submaps/engine_submaps_vr/tether/_engine_submaps.dm @@ -1,7 +1,7 @@ // This causes engine maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new engine, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST #include "engine_rust.dmm" #include "engine_singulo.dmm" #include "engine_sme.dmm" @@ -32,4 +32,4 @@ /datum/map_template/engine/tesla name = "Edison's Bane" desc = "The Telsa Engine" - mappath = 'maps/submaps/engine_submaps_vr/tether/engine_tesla.dmm' \ No newline at end of file + mappath = 'maps/submaps/engine_submaps_vr/tether/engine_tesla.dmm' diff --git a/maps/submaps/pois_vr/aerostat/virgo2.dm b/maps/submaps/pois_vr/aerostat/virgo2.dm index 6fdc0c861b..e897592dd4 100644 --- a/maps/submaps/pois_vr/aerostat/virgo2.dm +++ b/maps/submaps/pois_vr/aerostat/virgo2.dm @@ -1,6 +1,6 @@ #include "virgo2_submap_areas.dm" -#if MAP_TEST +#ifdef MAP_TEST #include "Flake.dmm" #include "MCamp1.dmm" #include "Rocky1.dmm" diff --git a/maps/submaps/space_rocks/space_rocks_pois.dm b/maps/submaps/space_rocks/space_rocks_pois.dm index 3c42dc57d6..4999b37ac8 100644 --- a/maps/submaps/space_rocks/space_rocks_pois.dm +++ b/maps/submaps/space_rocks/space_rocks_pois.dm @@ -1,4 +1,4 @@ -#if MAP_TEST +#ifdef MAP_TEST #include "bittynest1.dmm" #include "bittynest2.dmm" #include "bittynest3.dmm" diff --git a/maps/submaps/space_submaps/debrisfield/debrisfield.dm b/maps/submaps/space_submaps/debrisfield/debrisfield.dm index 6520107209..6260ff2f08 100644 --- a/maps/submaps/space_submaps/debrisfield/debrisfield.dm +++ b/maps/submaps/space_submaps/debrisfield/debrisfield.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST // #define "your_map_here.dmm" #endif @@ -9,4 +9,4 @@ name = "Space Content - Debrisfield" desc = "Designed for space points of interest." -// No points of interest yet, but the infrastructure is there for people to add! \ No newline at end of file +// No points of interest yet, but the infrastructure is there for people to add! diff --git a/maps/submaps/space_submaps/space.dm b/maps/submaps/space_submaps/space.dm index 374f046f51..efa043a0a3 100644 --- a/maps/submaps/space_submaps/space.dm +++ b/maps/submaps/space_submaps/space.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST // #define "your_map_here.dmm" #endif @@ -9,4 +9,4 @@ name = "POI - Space Content" desc = "A map template base. In space." -// To be added: Templates for space exploration when they are made. \ No newline at end of file +// To be added: Templates for space exploration when they are made. diff --git a/maps/submaps/surface_submaps/mountains/mountains.dm b/maps/submaps/surface_submaps/mountains/mountains.dm index dfa0ca65ac..0bdff1da4a 100644 --- a/maps/submaps/surface_submaps/mountains/mountains.dm +++ b/maps/submaps/surface_submaps/mountains/mountains.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST #include "deadBeacon.dmm" #include "prepper1.dmm" #include "quarantineshuttle.dmm" @@ -371,4 +371,3 @@ mappath = 'maps/submaps/surface_submaps/mountains/speakeasy_vr.dmm' cost = 10 allow_duplicates = FALSE - diff --git a/maps/submaps/surface_submaps/plains/plains.dm b/maps/submaps/surface_submaps/plains/plains.dm index f16b832e1a..7063aaf134 100644 --- a/maps/submaps/surface_submaps/plains/plains.dm +++ b/maps/submaps/surface_submaps/plains/plains.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST #include "farm1.dmm" #include "construction1.dmm" #include "camp1.dmm" @@ -338,7 +338,7 @@ name = "Syndi Sniper" desc = "Syndicate watch tower, deadly but secluded" mappath = 'maps/submaps/surface_submaps/plains/syndisniper.dmm' - + cost = 5 /datum/map_template/surface/plains/drgnplateu @@ -346,4 +346,4 @@ desc = "A dangerous plateu of cliffs home to a rampant gold hoarding dragon" mappath = 'maps/submaps/surface_submaps/plains/drgnplateu.dmm' cost = 15 - allow_duplicates = FALSE \ No newline at end of file + allow_duplicates = FALSE diff --git a/maps/submaps/surface_submaps/plains/plains_vr.dm b/maps/submaps/surface_submaps/plains/plains_vr.dm index 851c72322e..e194b6293d 100644 --- a/maps/submaps/surface_submaps/plains/plains_vr.dm +++ b/maps/submaps/surface_submaps/plains/plains_vr.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST #include "farm1.dmm" #include "construction1.dmm" #include "camp1.dmm" diff --git a/maps/submaps/surface_submaps/wilderness/wilderness.dm b/maps/submaps/surface_submaps/wilderness/wilderness.dm index 5b0253f2d3..eb5f696ae3 100644 --- a/maps/submaps/surface_submaps/wilderness/wilderness.dm +++ b/maps/submaps/surface_submaps/wilderness/wilderness.dm @@ -1,7 +1,7 @@ // This causes PoI maps to get 'checked' and compiled, when undergoing a unit test. // This is so CI can validate PoIs, and ensure future changes don't break PoIs, as PoIs are loaded at runtime and the compiler can't catch errors. // When adding a new PoI, please add it to this list. -#if MAP_TEST +#ifdef MAP_TEST #include "spider1.dmm" #include "Flake.dmm" #include "MCamp1.dmm" diff --git a/maps/tether/tether.dm b/maps/tether/tether.dm index 0188b54683..0260a859f3 100644 --- a/maps/tether/tether.dm +++ b/maps/tether/tether.dm @@ -12,7 +12,7 @@ #include "tether_events.dm" #include "../offmap_vr/common_offmaps.dm" - #if !AWAY_MISSION_TEST //Don't include these for just testing away missions + #ifndef AWAY_MISSION_TEST //Don't include these for just testing away missions #include "tether-01-surface1.dmm" #include "tether-02-surface2.dmm" #include "tether-03-surface3.dmm" diff --git a/maps/~map_system/_map_selection.dm b/maps/~map_system/_map_selection.dm new file mode 100644 index 0000000000..d6b6856a6f --- /dev/null +++ b/maps/~map_system/_map_selection.dm @@ -0,0 +1,38 @@ +#ifndef CITESTING + +/*********************/ +/* MAP SELECTION */ +/* FOR LIVE SERVER */ +/*********************/ + +// #define USE_MAP_TETHER +#define USE_MAP_STELLARDELIGHT +// #define USE_MAP_GROUNDBASE + +// Debug +// #define USE_MAP_MINITEST + +/*********************/ +/* End Map Selection */ +/*********************/ + +#endif + +// Tether +#ifdef USE_MAP_TETHER +#include "../tether/tether.dm" +#endif + +// Stellar Delight +#ifdef USE_MAP_STELLARDELIGHT +#include "../stellar_delight/stellar_delight.dm" +#endif + +// Groundbase +#ifdef USE_MAP_GROUNDBASE +#include "../groundbase/groundbase.dm" +#endif + +#ifdef USE_MAP_MINITEST +#include "../virgo_minitest/virgo_minitest.dm" +#endif diff --git a/tools/ci/compile_and_run.sh b/tools/ci/compile_and_run.sh index ae58fa1807..17ab16cb44 100755 --- a/tools/ci/compile_and_run.sh +++ b/tools/ci/compile_and_run.sh @@ -5,43 +5,19 @@ NC='\033[0m' source $HOME/BYOND/byond/bin/byondsetup +# Clean up between steps so Juke doesn't refuse to recompile with different -D options +rm vorestation.dmb + # Copy example configs cp config/example/* config/ -# Define any unit test defines that need to run -echo "#define ${TEST_DEFINE} 1" > ${TEST_FILE} - -replace=${REPLACE} -# Messy map compile code -if grep -q '#include[[:space:]]\"maps\\tether\\tether.dm\"' $BASENAME.dme && $replace; then - sed -i 's/#include[[:space:]]\"maps\\tether\\tether.dm\"/#include\ \"maps\\'${MAP}'\\'${MAP}'.dm\"/g' $BASENAME.dme - replace=false -elif grep -q '#include[[:space:]]\"maps\\stellar_delight\\stellar_delight.dm\"' $BASENAME.dme && $replace; then - sed -i 's/#include[[:space:]]\"maps\\stellar_delight\\stellar_delight.dm\"/#include\ \"maps\\'${MAP}'\\'${MAP}'.dm\"/g' $BASENAME.dme - replace=false -elif grep -q '#include[[:space:]]\"maps\\groundbase\\groundbase.dm\"' $BASENAME.dme && $replace; then - sed -i 's/#include[[:space:]]\"maps\\groundbase\\groundbase.dm\"/#include\ \"maps\\'${MAP}'\\'${MAP}'.dm\"/g' $BASENAME.dme - replace=false -fi - # Compile a copy of the codebase, and print errors as Github Actions annotations -tools/build/build --ci dm -DCIBUILDING -DCITESTING +tools/build/build --ci dm -DCIBUILDING -DCITESTING ${EXTRA_ARGS} exitVal=$? -# if [ $exitVal -gt 0 ]; then -# sed -E -n 's/^(.+?\.dm):([0-9]+):(error|warning): (.+)$/::\3 file=\1,line=\2::\4/gp' -# fi # Compile failed on map_test -if [ $exitVal -gt 0 ] && [ $TEST_DEFINE = "MAP_TEST" ]; then - echo "${RED}Some POIs appear to contain map-specific objects or code. Please isolate map-specific items/code from POIs.${NC}" - exit 1 -# Compile failed on away_mission_test -elif [ $exitVal -gt 0 ] && [ $TEST_DEFINE = "AWAY_MISSION_TEST" ]; then - echo "${RED}Some away missions failed to compile. Please check them for missing items/objects by trying to compile them in DreamMaker.${NC}" - exit 1 -# Compile failed on unit_test -elif [ $exitVal -gt 0 ] && [ $TEST_DEFINE = "UNIT_TEST" ]; then - echo "${RED}Compiling the codebase normally failed. Please review the compile errors and correct them, usually before making your PR.${NC}" +if [ $exitVal -gt 0 ]; then + echo "${RED}Errors were produced during CI with arguments ${EXTRA_ARGS}, please review CI logs.${NC}" exit 1 fi diff --git a/vorestation.dme b/vorestation.dme index 99e1d1f7da..4028eed437 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -12,11 +12,8 @@ // BEGIN_INCLUDE #include "code\__byond_version_compat.dm" #include "code\__spaceman_dmm.dm" -#include "code\_away_mission_tests.dm" #include "code\_macros.dm" #include "code\_macros_vr.dm" -#include "code\_map_tests.dm" -#include "code\_unit_tests.dm" #include "code\global.dm" #include "code\global_init.dm" #include "code\global_vr.dm" @@ -4353,7 +4350,6 @@ #include "maps\southern_cross\items\clothing\sc_accessory.dm" #include "maps\southern_cross\items\clothing\sc_suit.dm" #include "maps\southern_cross\items\clothing\sc_under.dm" -#include "maps\stellar_delight\stellar_delight.dm" #include "maps\submaps\_helpers.dm" #include "maps\submaps\_readme.dm" #include "maps\submaps\admin_use_vr\event_autonomous_drone.dm" @@ -4364,5 +4360,6 @@ #include "maps\submaps\space_submaps\debrisfield\debrisfield.dm" #include "maps\submaps\surface_submaps\wilderness\wilderness.dm" #include "maps\submaps\surface_submaps\wilderness\wilderness_areas.dm" +#include "maps\~map_system\_map_selection.dm" #include "maps\~map_system\maps.dm" // END_INCLUDE