mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-18 19:44:58 +01:00
bitrunning hotfixes [NO GBP] (#78530)
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may not be viewable. --> <!-- You can view Contributing.MD for a detailed description of the pull request process. --> ## About The Pull Request small tweaks for bitrunning - ability disks grant a huge power spike which should let me balance megafauna health more closely to the real thing - added a check for bit avatars to skip dynamic midround checks - more info for netpods mostly <!-- Describe The Pull Request. Please be sure every change is documented or this can delay review and even discourage maintainers from merging your PR! --> ## Why It's Good For The Game fixes #78513 fixes #78575 <!-- Argue for the merits of your changes and how they benefit the game, especially if they are controversial and/or far reaching. If you can't actually explain WHY what you are doing will improve the game, then it probably isn't good for the game in the first place. --> ## Changelog <!-- If your PR modifies aspects of the game that can be concretely observed by players or admins you should add a changelog. If your change does NOT meet this description, remove this section. Be sure to properly mark your PRs to prevent unnecessary GBP loss. You can read up on GBP and it's effects on PRs in the tgstation guides for contributors. Please note that maintainers freely reserve the right to remove and add tags should they deem it appropriate. You can attempt to finagle the system all you want, but it's best to shoot for clear communication right off the bat. --> 🆑 add: Netpods and quantum servers now have more examination info fix: You no longer lose antag status if you receive it in the vdom. fix: Beach bar shouldn't have visible atmos piping anymore. fix: Adds more lighting to the vaporwave vdom level. balance: Buffed vdom megafauna health to compensate for new ability disks. /🆑 <!-- Both 🆑's are required for the changelog to work! You can put your name to the right of the first 🆑 if you want to overwrite your GitHub username as author ingame. --> <!-- You can use multiple of the same prefix (they're only used for the icon ingame) and delete the unneeded ones. Despite some of the tags, changelogs should generally represent how a player might be affected by the changes rather than a summary of the PR's contents. -->
This commit is contained in:
+184
-524
File diff suppressed because it is too large
Load Diff
+909
-907
File diff suppressed because it is too large
Load Diff
@@ -892,6 +892,9 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
|
||||
///Trait given to a mob with a ckey currently in a temporary body, allowing people to know someone will re-enter the round later.
|
||||
#define TRAIT_MIND_TEMPORARILY_GONE "temporarily_gone"
|
||||
|
||||
/// Similar trait given to temporary bodies inhabited by players
|
||||
#define TRAIT_TEMPORARY_BODY "temporary_body"
|
||||
|
||||
/// Trait given to mechs that can have orebox functionality on movement
|
||||
#define TRAIT_OREBOX_FUNCTIONAL "orebox_functional"
|
||||
|
||||
|
||||
@@ -75,7 +75,10 @@
|
||||
if (length(exclusive_roles) && !(creature.mind.assigned_role.title in exclusive_roles)) // Is the rule exclusive to their job?
|
||||
trimmed_list.Remove(creature)
|
||||
continue
|
||||
if(HAS_TRAIT(creature, TRAIT_MIND_TEMPORARILY_GONE)) // are they in the vdom?
|
||||
if(HAS_TRAIT(creature, TRAIT_MIND_TEMPORARILY_GONE)) // are they out of body?
|
||||
trimmed_list.Remove(creature)
|
||||
continue
|
||||
if(HAS_TRAIT(creature, TRAIT_TEMPORARY_BODY)) // are they an avatar?
|
||||
trimmed_list.Remove(creature)
|
||||
continue
|
||||
return trimmed_list
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
var/mob/living/avatar = parent
|
||||
avatar.key = old_body.key
|
||||
ADD_TRAIT(old_body, TRAIT_MIND_TEMPORARILY_GONE, REF(src))
|
||||
ADD_TRAIT(avatar, TRAIT_TEMPORARY_BODY, REF(src))
|
||||
|
||||
connect_avatar_signals(avatar)
|
||||
RegisterSignal(pod, COMSIG_BITRUNNER_CROWBAR_ALERT, PROC_REF(on_netpod_crowbar))
|
||||
@@ -262,6 +263,7 @@
|
||||
old_mind.set_current(old_body)
|
||||
|
||||
REMOVE_TRAIT(old_body, TRAIT_MIND_TEMPORARILY_GONE, REF(src))
|
||||
REMOVE_TRAIT(avatar, TRAIT_TEMPORARY_BODY, REF(src))
|
||||
|
||||
old_mind = null
|
||||
old_body = null
|
||||
|
||||
@@ -29,8 +29,7 @@
|
||||
if(isnull(user.mind))
|
||||
return
|
||||
|
||||
var/datum/component/avatar_connection/connection = user.GetComponent(/datum/component/avatar_connection)
|
||||
if(isnull(connection))
|
||||
if(!HAS_TRAIT(user, TRAIT_TEMPORARY_BODY))
|
||||
balloon_alert(user, "no connection detected.")
|
||||
return
|
||||
|
||||
|
||||
@@ -397,11 +397,15 @@
|
||||
/obj/machinery/netpod/proc/on_examine(datum/source, mob/examiner, list/examine_text)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
examine_text += span_infoplain("Drag yourself into the pod to engage the link.")
|
||||
examine_text += span_infoplain("It has limited resuscitation capabilities. Remaining in the pod can heal some injuries.")
|
||||
examine_text += span_infoplain("It has a security system that will alert the occupant if it is tampered with.")
|
||||
|
||||
if(isnull(occupant))
|
||||
examine_text += span_infoplain("It is currently unoccupied.")
|
||||
examine_text += span_notice("It is currently unoccupied.")
|
||||
return
|
||||
|
||||
examine_text += span_infoplain("It is currently occupied by [occupant].")
|
||||
examine_text += span_notice("It is currently occupied by [occupant].")
|
||||
examine_text += span_notice("It can be pried open with a crowbar, but its safety mechanisms will alert the occupant.")
|
||||
|
||||
/// On unbuckle or break, make sure the occupant ref is null
|
||||
|
||||
@@ -5,16 +5,30 @@
|
||||
var/outfit_path = generated_domain.forced_outfit || netsuit
|
||||
var/datum/outfit/to_wear = new outfit_path()
|
||||
|
||||
to_wear.suit_store = null
|
||||
to_wear.belt = /obj/item/bitrunning_host_monitor
|
||||
to_wear.glasses = null
|
||||
to_wear.suit = null
|
||||
to_wear.gloves = null
|
||||
to_wear.l_hand = null
|
||||
to_wear.l_pocket = null
|
||||
to_wear.r_hand = null
|
||||
to_wear.r_pocket = null
|
||||
to_wear.suit = null
|
||||
to_wear.suit_store = null
|
||||
|
||||
avatar.equipOutfit(to_wear, visualsOnly = TRUE)
|
||||
|
||||
var/thing = avatar.get_active_held_item()
|
||||
if(!isnull(thing))
|
||||
qdel(thing)
|
||||
|
||||
thing = avatar.get_inactive_held_item()
|
||||
if(!isnull(thing))
|
||||
qdel(thing)
|
||||
|
||||
var/obj/item/storage/backpack/bag = avatar.back
|
||||
if(istype(bag))
|
||||
QDEL_LIST(bag.contents)
|
||||
|
||||
bag.contents += list(
|
||||
new /obj/item/storage/box/survival,
|
||||
new /obj/item/storage/medkit/regular,
|
||||
|
||||
@@ -32,6 +32,8 @@
|
||||
/obj/machinery/quantum_server/proc/on_examine(datum/source, mob/examiner, list/examine_text)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
examine_text += span_infoplain("Can be resource intensive to run. Ensure adequate power supply.")
|
||||
|
||||
if(capacitor_coefficient < 1)
|
||||
examine_text += span_infoplain("Its coolant capacity reduces cooldown time by [(1 - capacitor_coefficient) * 100]%.")
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/dragon/virtual_domain
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
health = 1400
|
||||
health = 1600
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
maxHealth = 1400
|
||||
maxHealth = 1600
|
||||
true_spawn = FALSE
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/blood_drunk_miner/virtual_domain
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
health = 1500
|
||||
health = 1600
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
maxHealth = 1500
|
||||
maxHealth = 1600
|
||||
true_spawn = FALSE
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/bubblegum/virtual_domain
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
health = 1100
|
||||
health = 2000
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
maxHealth = 1100
|
||||
maxHealth = 2000
|
||||
true_spawn = FALSE
|
||||
|
||||
@@ -13,6 +13,6 @@
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
health = 1200
|
||||
maxHealth = 1200
|
||||
health = 2000
|
||||
maxHealth = 2000
|
||||
true_spawn = FALSE
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/hierophant/virtual_domain
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
health = 1600
|
||||
health = 1700
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
maxHealth = 1600
|
||||
maxHealth = 1700
|
||||
true_spawn = FALSE
|
||||
|
||||
@@ -12,9 +12,9 @@
|
||||
/mob/living/simple_animal/hostile/megafauna/legion/virtual_domain
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
health = 1100
|
||||
health = 1500
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
maxHealth = 1100
|
||||
maxHealth = 1500
|
||||
true_spawn = FALSE
|
||||
|
||||
// You may be thinking, well, what about those mini-legions? They're not part of the created_atoms list
|
||||
// You may be thinking, what about those mini-legions? They're not part of the initial created_atoms list
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
can_be_cybercop = FALSE
|
||||
crusher_loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
guaranteed_butcher_results = list(/obj/item/wendigo_skull = 1)
|
||||
health = 1500
|
||||
health = 2000
|
||||
loot = list(/obj/structure/closet/crate/secure/bitrunning/encrypted)
|
||||
maxHealth = 1500
|
||||
maxHealth = 2000
|
||||
true_spawn = FALSE
|
||||
|
||||
@@ -100,6 +100,7 @@
|
||||
#include "baseturfs.dm"
|
||||
#include "bespoke_id.dm"
|
||||
#include "binary_insert.dm"
|
||||
#include "bitrunning.dm"
|
||||
#include "blindness.dm"
|
||||
#include "bloody_footprints.dm"
|
||||
#include "breath.dm"
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
#define TEST_MAP "test_only"
|
||||
#define TEST_MAP_EXPENSIVE "test_only_expensive"
|
||||
|
||||
/// The qserver and qconsole should find each other on init
|
||||
/datum/unit_test/qserver_find_console
|
||||
|
||||
/datum/unit_test/qserver_find_console/Run()
|
||||
var/obj/machinery/computer/quantum_console/console = allocate(/obj/machinery/computer/quantum_console)
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server, locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z))
|
||||
|
||||
TEST_ASSERT_NOTNULL(console.server_ref, "Quantum console did not set server_ref")
|
||||
TEST_ASSERT_NOTNULL(server.console_ref, "Quantum server did not set console_ref")
|
||||
|
||||
var/obj/machinery/computer/quantum_console/connected_console = server.console_ref.resolve()
|
||||
var/obj/machinery/quantum_server/connected_server = console.server_ref.resolve()
|
||||
TEST_ASSERT_EQUAL(connected_console, console, "Quantum console did not set server_ref correctly")
|
||||
TEST_ASSERT_EQUAL(connected_server, server, "Quantum server did not set console_ref correctly")
|
||||
|
||||
/// Tests the connection between avatar and pilot
|
||||
/datum/unit_test/avatar_connection_basic
|
||||
|
||||
/datum/unit_test/avatar_connection_basic/Run()
|
||||
var/obj/machinery/netpod/pod = allocate(/obj/machinery/netpod)
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server, locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z))
|
||||
var/mob/living/carbon/human/labrat = allocate(/mob/living/carbon/human/consistent)
|
||||
var/mob/living/carbon/human/target = allocate(/mob/living/carbon/human/consistent)
|
||||
|
||||
labrat.mind_initialize()
|
||||
labrat.mock_client = new()
|
||||
|
||||
var/datum/weakref/initial_mind = labrat.mind
|
||||
var/datum/weakref/labrat_mind_ref = WEAKREF(labrat.mind)
|
||||
pod.occupant = labrat
|
||||
|
||||
var/datum/component/avatar_connection/connection = target.AddComponent( \
|
||||
/datum/component/avatar_connection, \
|
||||
old_mind = labrat.mind, \
|
||||
old_body = labrat, \
|
||||
server = server, \
|
||||
pod = pod, \
|
||||
)
|
||||
|
||||
var/mob/living/carbon/human/labrat_resolved = connection.old_body_ref?.resolve()
|
||||
TEST_ASSERT_EQUAL(labrat, labrat_resolved, "Wrong pilot ref")
|
||||
|
||||
var/obj/machinery/netpod/connected_pod = connection.netpod_ref?.resolve()
|
||||
TEST_ASSERT_EQUAL(connected_pod, pod, "Wrong netpod ref")
|
||||
|
||||
target.apply_damage(10, damagetype = BURN, def_zone = BODY_ZONE_HEAD, blocked = 0, forced = TRUE)
|
||||
TEST_ASSERT_EQUAL(labrat.getFireLoss(), 10, "Damage was not transferred to pilot")
|
||||
TEST_ASSERT_NOTNULL(locate(/obj/item/bodypart/head) in labrat.get_damaged_bodyparts(burn = TRUE), "Pilot did not get damaged bodypart")
|
||||
|
||||
connection.full_avatar_disconnect()
|
||||
TEST_ASSERT_EQUAL(labrat.mind, initial_mind, "Should reconnect mind on full disconnect")
|
||||
|
||||
for(var/i in 1 to 5) // so sick of this failing
|
||||
target.apply_damage(500, damagetype = BURN, def_zone = BODY_ZONE_HEAD, blocked = 0, forced = TRUE, spread_damage = TRUE)
|
||||
TEST_ASSERT_EQUAL(target.stat, DEAD, "Target should be very dead")
|
||||
TEST_ASSERT_NOTEQUAL(labrat.stat, DEAD, "Pilot should be very alive")
|
||||
|
||||
/// Gibbing specifically
|
||||
/datum/unit_test/avatar_connection_gib
|
||||
|
||||
/datum/unit_test/avatar_connection_gib/Run()
|
||||
var/obj/machinery/netpod/pod = allocate(/obj/machinery/netpod)
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server, locate(run_loc_floor_bottom_left.x + 1, run_loc_floor_bottom_left.y, run_loc_floor_bottom_left.z))
|
||||
|
||||
var/mob/living/carbon/human/to_gib = allocate(/mob/living/carbon/human/consistent)
|
||||
var/mob/living/carbon/human/pincushion = allocate(/mob/living/carbon/human/consistent)
|
||||
pincushion.mind_initialize()
|
||||
pincushion.mock_client = new()
|
||||
var/datum/mind/initial_mind = pincushion.mind
|
||||
pod.occupant = pincushion
|
||||
|
||||
to_gib.AddComponent( \
|
||||
/datum/component/avatar_connection, \
|
||||
old_mind = pincushion.mind, \
|
||||
old_body = pincushion, \
|
||||
server = server, \
|
||||
pod = pod, \
|
||||
)
|
||||
|
||||
to_gib.gib()
|
||||
TEST_ASSERT_EQUAL(initial_mind, pincushion.mind, "Pilot should have been transferred back on avatar gib")
|
||||
TEST_ASSERT_EQUAL(pincushion.get_organ_loss(ORGAN_SLOT_BRAIN), pod.disconnect_damage, "Pilot should have taken brain dmg on gib disconnect")
|
||||
|
||||
/// Tests the server's ability to generate a loot crate
|
||||
/datum/unit_test/qserver_generate_rewards
|
||||
|
||||
/datum/unit_test/qserver_generate_rewards/Run()
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server)
|
||||
var/mob/living/carbon/human/labrat = allocate(/mob/living/carbon/human/consistent)
|
||||
labrat.mind_initialize()
|
||||
labrat.mock_client = new()
|
||||
|
||||
var/turf/tiles = get_adjacent_open_turfs(server)
|
||||
TEST_ASSERT_NOTEQUAL(length(tiles), 0, "Sanity: Did not find an open turf")
|
||||
|
||||
server.cold_boot_map(labrat, map_key = TEST_MAP)
|
||||
TEST_ASSERT_EQUAL(server.generated_domain.key, TEST_MAP, "Sanity: Did not load test map correctly")
|
||||
|
||||
server.receive_turfs = tiles
|
||||
TEST_ASSERT_EQUAL(server.generate_loot(), TRUE, "Should generate loot with a receive turf")
|
||||
|
||||
/// Server side randomization of domains
|
||||
/datum/unit_test/qserver_get_random_domain_id
|
||||
|
||||
/datum/unit_test/qserver_get_random_domain_id/Run()
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server)
|
||||
|
||||
var/id = server.get_random_domain_id()
|
||||
TEST_ASSERT_NULL(id, "Shouldn't return a random domain with no points")
|
||||
|
||||
server.points = 3
|
||||
id = server.get_random_domain_id()
|
||||
TEST_ASSERT_NOTNULL(id, "Should return a random domain with points")
|
||||
|
||||
/// Tests the ability to create hololadders and effectively, retries
|
||||
/datum/unit_test/qserver_generate_hololadder
|
||||
|
||||
/datum/unit_test/qserver_generate_hololadder/Run()
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server)
|
||||
var/mob/living/carbon/human/labrat = allocate(/mob/living/carbon/human/consistent)
|
||||
|
||||
server.generate_hololadder()
|
||||
TEST_ASSERT_EQUAL(length(server.exit_turfs), 0, "Sanity: Shouldn't exist any exit turfs until boot")
|
||||
TEST_ASSERT_EQUAL(server.retries_spent, 0, "Shouldn't create a hololadder without exit turfs")
|
||||
|
||||
server.cold_boot_map(labrat, map_key = TEST_MAP)
|
||||
TEST_ASSERT_NOTNULL(server.generated_domain, "Sanity: Did not load test map correctly")
|
||||
TEST_ASSERT_EQUAL(length(server.exit_turfs), 3, "Should create 3 exit turfs")
|
||||
|
||||
server.generate_hololadder()
|
||||
TEST_ASSERT_EQUAL(server.retries_spent, 1, "Should've spent a retry")
|
||||
|
||||
server.generate_hololadder()
|
||||
server.generate_hololadder()
|
||||
TEST_ASSERT_EQUAL(server.retries_spent, 3, "Should've spent 3 retries")
|
||||
|
||||
server.generate_hololadder()
|
||||
TEST_ASSERT_EQUAL(server.retries_spent, 3, "Shouldn't spend more than 3 retries")
|
||||
|
||||
server.reset(fast = TRUE)
|
||||
TEST_ASSERT_EQUAL(server.retries_spent, 0, "Should reset retries on reset()")
|
||||
|
||||
/// Tests the calculate rewards function
|
||||
/datum/unit_test/qserver_calculate_rewards
|
||||
|
||||
/datum/unit_test/qserver_calculate_rewards/Run()
|
||||
var/obj/machinery/quantum_server/server = allocate(/obj/machinery/quantum_server)
|
||||
var/mob/living/carbon/human/labrat = allocate(/mob/living/carbon/human/consistent)
|
||||
var/datum/weakref/labrat_mind_ref = WEAKREF(labrat.mind)
|
||||
|
||||
server.cold_boot_map(labrat, map_key = TEST_MAP)
|
||||
TEST_ASSERT_NOTNULL(server.generated_domain, "Sanity: Did not load test map correctly")
|
||||
|
||||
var/rewards = server.calculate_rewards()
|
||||
TEST_ASSERT_EQUAL(rewards, 1, "Should return base rewards when unmodded")
|
||||
|
||||
server.domain_randomized = TRUE
|
||||
rewards = server.calculate_rewards()
|
||||
TEST_ASSERT_EQUAL(rewards, 1.2, "Should increase rewards when randomized")
|
||||
|
||||
server.domain_randomized = FALSE
|
||||
server.avatar_connection_refs += labrat_mind_ref
|
||||
server.avatar_connection_refs += labrat_mind_ref
|
||||
server.avatar_connection_refs += labrat_mind_ref
|
||||
rewards = server.calculate_rewards()
|
||||
var/totalA = ROUND_UP(rewards)
|
||||
var/totalB = ROUND_UP(1 + server.multiplayer_bonus * 2)
|
||||
TEST_ASSERT_EQUAL(totalA, totalB, "Should increase rewards with occupants")
|
||||
|
||||
for(var/datum/stock_part/servo/servo in server.component_parts)
|
||||
server.component_parts -= servo
|
||||
server.component_parts += new /datum/stock_part/servo/tier4
|
||||
|
||||
server.RefreshParts()
|
||||
server.avatar_connection_refs.Cut()
|
||||
rewards = server.calculate_rewards()
|
||||
TEST_ASSERT_EQUAL(rewards, 1.6, "Should increase rewards with modded servos")
|
||||
|
||||
/// Ensures loot crates can spawn a proper number of items
|
||||
/datum/unit_test/bitrunning_loot_crate_rewards
|
||||
|
||||
/datum/unit_test/bitrunning_loot_crate_rewards/Run()
|
||||
var/obj/structure/closet/crate/secure/bitrunning/decrypted/crate = allocate(/obj/structure/closet/crate/secure/bitrunning/decrypted)
|
||||
|
||||
var/total = 0
|
||||
total = crate.calculate_loot(1, 1, 1)
|
||||
TEST_ASSERT_NOTEQUAL(total, 0, "Should return a number")
|
||||
|
||||
total = crate.calculate_loot(1, 1, 3)
|
||||
TEST_ASSERT_NOTEQUAL(total, 0, "Should return a number")
|
||||
|
||||
total = crate.calculate_loot(1, 1, 0.5)
|
||||
TEST_ASSERT_NOTEQUAL(total, 0, "Should return a number")
|
||||
|
||||
total = crate.calculate_loot(3, 4, 0.3)
|
||||
TEST_ASSERT_NOTEQUAL(total, 0, "Should return a number")
|
||||
|
||||
total = crate.calculate_loot(3, 3.2, 0.2)
|
||||
TEST_ASSERT_NOTEQUAL(total, 0, "Should return a number")
|
||||
|
||||
/// Ensures settings on vdoms are being set correctly
|
||||
/datum/unit_test/bitrunner_vdom_settings
|
||||
|
||||
/datum/unit_test/bitrunner_vdom_settings/Run()
|
||||
var/obj/structure/closet/crate/secure/bitrunning/decrypted/crate = allocate(/obj/structure/closet/crate/secure/bitrunning/decrypted)
|
||||
|
||||
for(var/path in subtypesof(/datum/lazy_template/virtual_domain))
|
||||
var/datum/lazy_template/virtual_domain/vdom = new path
|
||||
TEST_ASSERT_NOTNULL(vdom.key, "[path] should have a key")
|
||||
TEST_ASSERT_NOTNULL(vdom.map_name, "[path] should have a map name")
|
||||
|
||||
if(!length(vdom.extra_loot))
|
||||
continue
|
||||
|
||||
TEST_ASSERT_EQUAL(crate.spawn_loot(vdom.extra_loot), TRUE, "[path] didn't spawn loot. Extra loot should be an associative list")
|
||||
|
||||
#undef TEST_MAP
|
||||
#undef TEST_MAP_EXPENSIVE
|
||||
Reference in New Issue
Block a user