Fix bug in housing check and add test

This commit is contained in:
Nate Bowman
2026-11-16 19:19:26 -05:00
parent 1b9266ff09
commit 0780fec1fb
2 changed files with 27 additions and 3 deletions

View File

@@ -16,14 +16,14 @@ class Housing():
if world.get_effective_population() + required > pop_space:
raise YallGotHousedException
return True
def check_housing_safe(self, world, thing):
try:
self.check_housing(world, thing)
return self.check_housing(world, thing)
except YallGotHousedException:
return False
else:
return True
def __init__(self):