Port sand gathering to 26.3

This commit is contained in:
Tanner committed 2026-11-16 22:55:06 +00:00
1 parent f28269f71c
commit 3e8b95c895
9 files changed
+424 -158

No files matched your search

+25
View File
@@ -107,6 +107,31 @@ class SignReadingTests(unittest.TestCase):
individual_world.sign_policies('mosfet2')], ['circle'])
self.assertEqual(individual_world.sign_policies('mosfet1'), [])
def test_sand_origin_signs_match_bot_and_numbered_group_addresses(self):
chunks = Munch(block_entities={
(1, 64, 0): {'data': {'front_text': {'messages': [
'mosfet', 'sand origin', '', '',
]}}},
(3, 64, 0): {'data': {'back_text': {'messages': [
'mosfet1 sand', 'origin', '', '',
]}}},
(2, 64, 0): {'data': {'front_text': {'messages': [
'mosfet2 sand origin', '', '', '',
]}}},
})
world = World(Munch(chunks=chunks))
origins = world.find_sand_origins((0, 64, 0), 'mosfet1')
self.assertEqual([origin['position'] for origin in origins], [
(1, 64, 0), (3, 64, 0),
])
self.assertEqual(
[origin['position'] for origin in
world.find_sand_origins((0, 64, 0), 'mosfet2')],
[(1, 64, 0), (2, 64, 0)],
)
def test_sign_policies_read_any_distance_within_loaded_signs(self):
position = (100, 64, 0)
chunks = Munch(block_entities={position: {