Crafting cards: one-row buttons, list all missing reagents
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
a205d429bd
commit
377f534f6b
3 changed files with 20 additions and 9 deletions
|
|
@ -244,7 +244,7 @@ class ActionTest(unittest.TestCase):
|
|||
self.assertEqual(p["bank"]["copper_bar"], 3)
|
||||
self.assertNotIn("copper_ore", p["bank"])
|
||||
self.assertIsNone(p["action"])
|
||||
self.assertEqual(summary["stopped"], "Out of copper ore")
|
||||
self.assertEqual(summary["stopped"], "Out of: copper ore")
|
||||
|
||||
def test_crafting_stops_as_the_last_one_finishes(self):
|
||||
world = world_with(("ann", "commoner"))
|
||||
|
|
@ -254,7 +254,7 @@ class ActionTest(unittest.TestCase):
|
|||
duration = game.action_time(world, p, game.ACTION_BY_ID["smith_copper_bar"])
|
||||
summary = game.process_player(world, p, T0 + duration + 0.1, random.Random(1))
|
||||
self.assertIsNone(p["action"])
|
||||
self.assertEqual(summary["stopped"], "Out of copper ore")
|
||||
self.assertEqual(summary["stopped"], "Out of: copper ore")
|
||||
|
||||
def test_level_and_city_requirements(self):
|
||||
world = world_with(("ann", "commoner"))
|
||||
|
|
@ -2709,7 +2709,7 @@ class WorkOrderTest(unittest.TestCase):
|
|||
self.dave["bank"] = {"iron_bar": 1}
|
||||
game.provide_reagent(self.world, self.dave, order["id"], "iron_bar")
|
||||
self.fred["bank"] = {"iron_bar": 1, "oak_plank": 1, "clay_core": 3}
|
||||
self.assertEqual(game.work_order(self.world, self.fred, order["id"], T0), "Out of iron bar")
|
||||
self.assertEqual(game.work_order(self.world, self.fred, order["id"], T0), "Out of: iron bar")
|
||||
self.fred["bank"]["iron_bar"] = 2
|
||||
self.assertIsNone(game.work_order(self.world, self.fred, order["id"], T0))
|
||||
game.process_player(self.world, self.fred, T0 + 600, random.Random(1))
|
||||
|
|
@ -2850,7 +2850,7 @@ class JewelcraftingTest(unittest.TestCase):
|
|||
game.start_action(self.world, self.ann, "prospect_garnet", T0)
|
||||
summary = game.process_player(self.world, self.ann, T0 + 1000, Always())
|
||||
self.assertEqual(self.ann["bank"], {"iron_ore": 2, "garnet": 1})
|
||||
self.assertEqual(summary["stopped"], "Out of iron ore")
|
||||
self.assertEqual(summary["stopped"], "Out of: iron ore")
|
||||
self.assertGreater(self.ann["xp"]["jewelcrafting"], game.XP_TABLE[15])
|
||||
|
||||
def test_jewellery_bonuses(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue