Replace teleporters that can't be placed with red rupees

This commit is contained in:
2025-03-05 19:23:40 -06:00
parent 88224a5aca
commit 1df52ecf6e
4 changed files with 11 additions and 6 deletions

View File

@@ -217,7 +217,12 @@ class World(object):
logging.getLogger('').debug('Placed %s at %s', item, location)
else:
raise RuntimeError('Cannot assign item %s to location %s.' % (item, location))
if item.name == 'Teleporter':
from Items import ItemFactory
print('Cannot assign item %s to location %s, replacing with red rupee.' % (item, location))
self.push_item(location, ItemFactory('Rupees (20)', item.player), collect)
else:
raise RuntimeError('Cannot assign item %s to location %s.' % (item, location))
def get_entrances(self):
if self._cached_entrances is None: