the quest that requests for an extractor to be built didn't take into account the built extractor #145
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
maybe it is because I was dead betwee the quest was given and the extrator was built? That's just a supposition, maybe the quest is simpliy bugged
Done in
2206b55. Your supposition was wrong in a good way - it was not about dying, and it was not intermittent. The quest could never be completed by anyone.Extractors are not in
buildings. They are placed onto a planet from space and live inGameState.extractors, with their own position, stock and id. The quest goal askedhas_building_of_type("extractor"), which walksbuildings- so it was false however many extractors you built, forever. My bug, from #133.structure_exists()is now the question anything wanting "does the player have one of these" should ask, and the quest model asks it. (The two remaininghas_building_of_type()callers are aboutuniquestructures - the mothership - where the answer really is about that list.)The regression test is the part worth keeping: for every structure quest in the chain it builds the target the way the game builds it, and watches the goal flip. It does not know which array anything lands in - the knowing is exactly what got this wrong. So a future quest asking for something else stored off to one side fails the test instead of shipping.