Add signed general cache destinations

This commit is contained in:
Tanner committed 2026-11-14 23:12:50 +00:00
1 parent 11c1bad0c4
commit 86fbf911a5
7 files changed
+305 -114

No files matched your search

+29
View File
@@ -65,6 +65,35 @@ class ThrowSignTests(unittest.TestCase):
bot1 = world.find_throw_signs((0, 64, 0), 'mosfet1', 10)
self.assertEqual([sign['position'] for sign in bot1], [group_sign])
def test_throw_accepts_unqualified_items_and_species_log_labels(self):
single_item_sign = (0, 64, 0)
oak_family_sign = (4, 64, 0)
chunks = FakeChunks(
block_entities={
single_item_sign: {'data': {'front_text': {'messages': [
'mosfet1 throw oak_log', '', '', '',
]}}},
oak_family_sign: {'data': {'front_text': {'messages': [
'mosfet1 throw Oak Logs', '', '', '',
]}}},
},
states={
single_item_sign: wall_sign_state('north'),
oak_family_sign: wall_sign_state('north'),
})
world = World(Munch(chunks=chunks))
directives = world.find_throw_signs((0, 64, 0), 'mosfet1', 10)
exact = next(sign for sign in directives
if sign['position'] == single_item_sign)
family = next(sign for sign in directives
if sign['position'] == oak_family_sign)
self.assertEqual(exact['item_ids'], {items.get_id('oak_log')})
self.assertEqual(family['item_ids'], items.get_set({
'oak_log', 'stripped_oak_log', 'oak_wood', 'stripped_oak_wood',
}))
def test_back_text_uses_back_face_normal(self):
position = (0, 64, 0)
world = World(Munch(chunks=FakeChunks(