mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Unit test for making sure that boulders can be processed correctly. (#96611)
## About The Pull Request This PR adds a unit test for boulder processing, which follows these steps: Spawns 2 boulders, a refinery, and a smelter. Confirms that the boulder is spawning with materials (we're using a subtype that should allow for processing through both machines, by setting it's mats to iron and glass.) Moves the boulder into the refinery, then the smelter, and at each machine makes sure that it's able to enter the machine properly. Calls Process on the machine a set number of times, to ensure that the boulder should be finished. Checks to make sure the boulder has lost it's processed material. And then, after the moving the processes through the second machine, makes sure that it qdels the boulder without leaving any mysterious ghost boulders lingering in this mortal coil. The test also runs twice, once going refinery -> smelter, and again from smelter -> refinery. ## Why It's Good For The Game The intent is to futureproof boulder refinery, as well as to help prevent issues like #96549, though I'm not confident that this PR closes the listed issue just yet. This process seems to be somewhat delicate based on the number of times that it's broken thus far in the past 2 years, and starting to implement a unit test is the best way to improve it's reliability going forward. ## Changelog No player facing changes. --------- Co-authored-by: san7890 <the@san7890.com> Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
co-authored by
san7890
Ghom
parent
300f295068
commit
9448deb7ff
@@ -669,6 +669,10 @@
|
||||
if(!mapload)
|
||||
vent_size_setup(random = TRUE) // We only do this here specific to random distribution ore vents, and within mapload we handle this manually within SSore_generation.
|
||||
|
||||
/obj/structure/ore_vent/random/LateInitialize()
|
||||
. = ..()
|
||||
if(!length(mineral_breakdown))
|
||||
CRASH("We generated an ore vent, and after init, it had no mineral breakdown!")
|
||||
|
||||
/obj/structure/ore_vent/random/icebox //The one that shows up on the top level of icebox
|
||||
icon_state = "ore_vent_ice"
|
||||
|
||||
Reference in New Issue
Block a user