Permalink
Browse files

Remove unused code written in the pre-component era

  • Loading branch information...
1 parent fcaa416 commit 1cca37754f9637dbca6bad0d21cb488e8435d452 @totycro totycro committed Apr 13, 2012
Showing with 0 additions and 18 deletions.
  1. +0 −6 horizons/world/building/settler.py
  2. +0 −7 horizons/world/production/producer.py
  3. +0 −5 horizons/world/resourcehandler.py
@@ -103,12 +103,6 @@ def load(self, db, worldid):
self.session.message_bus.broadcast(SettlerUpdate(self, self.level))
self.run(remaining_ticks)
- def load_production(self, db, worldid):
- if db.get_production_line_id(worldid) == self.session.db.get_settler_upgrade_material_prodline(self.level + 1):
- return SingleUseProduction.load(db, worldid)
- else:
- return super(Settler, self).load_production(db, worldid)
-
def _load_upgrade_data(self, db):
"""Load the upgrade production and relevant stored resources"""
upgrade_material_production = self._get_upgrade_production()
@@ -173,9 +173,6 @@ def save(self, db):
for production in self.get_productions():
production.save(db, self.instance.worldid)
- def load_production(self, db, worldid):
- return self.production_class.load(db, worldid)
-
# INTERFACE
def add_production(self, production):
assert isinstance(production, Production)
@@ -466,10 +463,6 @@ def add_production_by_id(self, production_line_id):
self.start_next_production()
- def load_production(self, db, worldid):
- prod = self.production_class.load(db, worldid)
- prod.add_production_finished_listener(self.on_queue_element_finished)
- return prod
def check_next_production_startable(self):
# See if we can start the next production, this only works if the current
@@ -126,11 +126,6 @@ def _get_owner_inventory(self):
except AttributeError: # no owner or no inventory, either way, we don't care
return None
- def load_production(self, db, production_id):
- """Load a saved production and return it. Needs to be implemented when add_production is.
- @return Production instance"""
- raise NotImplementedError("This function has to be overridden!")
-
def pickup_resources(self, res, amount, collector):
"""Try to get amount number of resources of id res_id that are in stock
and removes them from the stock. Will return smaller amount if not

0 comments on commit 1cca377

Please sign in to comment.