-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds a Unit Test for Turf Sound Sanity (#488)
- Loading branch information
Showing
6 changed files
with
24 additions
and
4 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
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,19 @@ | ||
/** | ||
* Goes through every subtype of /turf/open and makes sure a valid step type exists for each category. | ||
*/ | ||
/datum/unit_test/turf_sound | ||
|
||
/datum/unit_test/turf_sound/Run() | ||
for(var/turf/open/turf_to_check as anything in subtypesof(/turf/open)) | ||
var/footstep = initial(turf_to_check.footstep) | ||
var/barefootstep = initial(turf_to_check.barefootstep) | ||
var/clawfootstep = initial(turf_to_check.clawfootstep) | ||
var/heavyfootstep = initial(turf_to_check.heavyfootstep) | ||
if(footstep && !GLOB.footstep[footstep]) | ||
TEST_FAIL("Footstep for [turf_to_check] is not a valid entry, check \"code/__DEFINES/footsteps.dm\" for valid values.") | ||
if(barefootstep && !GLOB.barefootstep[barefootstep]) | ||
TEST_FAIL("Barefootstep for [turf_to_check] is not a valid entry, check \"code/__DEFINES/footsteps.dm\" for valid values.") | ||
if(clawfootstep && !GLOB.clawfootstep[clawfootstep]) | ||
TEST_FAIL("Clawfootstep for [turf_to_check] is not a valid entry, check \"code/__DEFINES/footsteps.dm\" for valid values.") | ||
if(heavyfootstep && !GLOB.heavyfootstep[heavyfootstep]) | ||
TEST_FAIL("Heavyfootstep for [turf_to_check] is not a valid entry, check \"code/__DEFINES/footsteps.dm\" for valid values.") |