Core: add Item.trap property

This commit is contained in:
Fabian Dill
2021-09-29 05:21:33 +02:00
parent 0afbe7988e
commit bde02f696b
5 changed files with 22 additions and 9 deletions

View File

@@ -292,5 +292,8 @@ class Factorio(World):
return FactorioItem(name, name in advancement_technologies or
name in self.additional_advancement_technologies,
tech_table[name], self.player)
elif name in all_items:
return FactorioItem(name, False, all_items[name], self.player)
item = FactorioItem(name, False, all_items[name], self.player)
if "Trap" in name:
item.trap = True
return item