forked from tgstation/tgstation
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes clown faction runtimes. (tgstation#67707)
- Loading branch information
Showing
3 changed files
with
21 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
/// Checks if any mob's faction var initial value is not a list, which is not supported by the current code | ||
/datum/unit_test/mob_faction | ||
|
||
/datum/unit_test/mob_faction/Run() | ||
/// Right now taken from create_and_destroy | ||
var/list/ignored = list( | ||
/mob/living/carbon, | ||
/mob/dview, | ||
/mob/oranges_ear | ||
) | ||
ignored += typesof(/mob/camera/imaginary_friend) | ||
ignored += typesof(/mob/living/simple_animal/pet/gondola/gondolapod) | ||
ignored += typesof(/mob/living/silicon/robot/model) | ||
ignored += typesof(/mob/camera/ai_eye/remote/base_construction) | ||
ignored += typesof(/mob/camera/ai_eye/remote/shuttle_docker) | ||
for (var/mob_type in typesof(/mob) - ignored) | ||
var/mob/mob_instance = allocate(mob_type) | ||
if(!islist(mob_instance.faction)) | ||
TEST_FAIL("[mob_type] faction variable is not a list") |