def begin_production(self): super().begin_production() # find free building tile tile = self.owner.get_buildable_tile() # occupy it self.owner.gamemap.occupy_tile(tile) # spawn structure base self.structure_base = StructureBase(self.owner) self.structure_base.location = tile.location self.structure_base.spawn() self.owner.add_entity(self.structure_base) # set position to base (for artisan unit) self.location = self.structure_base.location # specify required artisan self.artisan_required = UnitArtisan.Profession.Builder # change to wait for builder state self.fsm.change_state(states.StateWaitForArtisan())
def production_spawn(self): super().production_spawn() # specify required artisan self.artisan_required = UnitArtisan.Profession.Refiner # change to wait for builder state self.fsm.change_state(states.StateWaitForArtisan())