-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIRROR] Unit test for black market items. Added missing bulwark modu…
…le and jawed hook to the market. (#2384) (#3239) * Unit test for black market items. Added missing bulwark module and jawed hook to the market. (#82972) ## About The Pull Request Jacq has come up with the suggestion of adding a unit test to the blackmarket. I agreed ~~and I think I deserve the NO GBP label because both of these missing items are actually my fault~~. ## Why It's Good For The Game Let's avoid issues like this in the future. ## Changelog :cl: fix: Added the missing bulwark MOD module and the jawed fishing hook to the black market. /:cl: * Unit test for black market items. Added missing bulwark module and jawed hook to the market. --------- Co-authored-by: NovaBot <[email protected]> Co-authored-by: Ghom <[email protected]>
- Loading branch information
1 parent
4a1b162
commit 369c715
Showing
10 changed files
with
37 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
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
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,23 @@ | ||
/// Ensures black market items have acceptable variable values. | ||
/datum/unit_test/blackmarket | ||
|
||
/datum/unit_test/blackmarket/Run() | ||
for(var/datum/market_item/prototype as anything in subtypesof(/datum/market_item)) | ||
if(prototype::abstract_path == prototype) //skip abstract paths | ||
continue | ||
if(!prototype::category) | ||
TEST_FAIL("[prototype] doesn't have a set category (or the abstract path var isn't correctly set)") | ||
continue | ||
if(!prototype::item) | ||
TEST_FAIL("[prototype] doesn't have a set item (or the abstract path var isn't correctly set)") | ||
continue | ||
if(isnull(prototype::price) && prototype::price_max <= prototype::price_min) | ||
TEST_FAIL("[prototype] doesn't have a correctly set random price (price_max should be higher than price_min)") | ||
if(isnull(prototype::stock) && prototype::stock_max < prototype::stock_min) | ||
TEST_FAIL("[prototype] doesn't have a correctly set random stock (stock_max shouldn't be lower than stock_min)") | ||
if(!isnum(prototype::availability_prob)) | ||
TEST_FAIL("[prototype] doesn't have a set availability_prob (must be a number)") | ||
if(!prototype::name) | ||
TEST_FAIL("[prototype] doesn't have a set name") | ||
if(!prototype::desc) | ||
TEST_FAIL("[prototype] doesn't have a set desc") |