Fix bug in housing check and add test
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user