示例#1
0
 def __init(self, loading=False, last_tax_payed=0):
     self.level_max = TIER.CURRENT_MAX  # for now
     self._update_level_data(loading=loading, initial=True)
     self.last_tax_payed = last_tax_payed
     UpgradePermissionsChanged.subscribe(
         self._on_change_upgrade_permissions, sender=self.settlement)
     self._upgrade_production = None  # referenced here for quick access
示例#2
0
	def remove(self):
		
		#Send update to ingamegui for removing the size of this settlement.
		self.session.message_bus.broadcast(SettlerInhabitantsChanged(self, -self.inhabitants))
		
		self.session.message_bus.unsubscribe_locally(UpgradePermissionsChanged, self.settlement, self._on_change_upgrade_permissions)
		
		UpgradePermissionsChanged.unsubscribe(self._on_change_upgrade_permissions, sender=self.settlement)

		super(Settler, self).remove()
示例#3
0
	def set_upgrade_permissions(self, level, allowed):
		if self.upgrade_permissions[level] != allowed:
			self.upgrade_permissions[level] = allowed

			UpgradePermissionsChanged.broadcast(self)
示例#4
0
 def hide(self):
     super(MainSquareSettlerLevelTab, self).hide()
     UpgradePermissionsChanged.discard(self.refresh_via_message,
                                       sender=self.settlement)
示例#5
0
 def show(self):
     super(MainSquareSettlerLevelTab, self).show()
     UpgradePermissionsChanged.subscribe(self.refresh_via_message,
                                         sender=self.settlement)
示例#6
0
    def remove(self):
        SettlerInhabitantsChanged.broadcast(self, -self.inhabitants)

        UpgradePermissionsChanged.unsubscribe(
            self._on_change_upgrade_permissions, sender=self.settlement)
        super(Settler, self).remove()
	def hide(self):
		super(MainSquareSettlerLevelTab, self).hide()
		UpgradePermissionsChanged.unsubscribe(self.refresh_via_message, sender=self.settlement)
示例#8
0
	def __init(self, loading=False, last_tax_payed=0):
		self.level_max = TIER.CURRENT_MAX # for now
		self._update_level_data(loading=loading, initial=True)
		self.last_tax_payed = last_tax_payed
		UpgradePermissionsChanged.subscribe(self._on_change_upgrade_permissions, sender=self.settlement)
		self._upgrade_production = None # referenced here for quick access
示例#9
0
	def remove(self):
		SettlerInhabitantsChanged.broadcast(self, -self.inhabitants)

		UpgradePermissionsChanged.unsubscribe(self._on_change_upgrade_permissions, sender=self.settlement)
		super(Settler, self).remove()
示例#10
0
	def set_upgrade_permissions(self, level, allowed):
		if self.upgrade_permissions[level] != allowed:
			self.upgrade_permissions[level] = allowed

			UpgradePermissionsChanged.broadcast(self)
 def hide(self):
     super().hide()
     UpgradePermissionsChanged.discard(self.refresh_via_message,
                                       sender=self.settlement)
 def show(self):
     super().show()
     UpgradePermissionsChanged.subscribe(self.refresh_via_message,
                                         sender=self.settlement)
示例#13
0
	def __init(self, loading = False, last_tax_payed=0):
		self.level_max = SETTLER.CURRENT_MAX_INCR # for now
		self._update_level_data(loading = loading)
		self.last_tax_payed = last_tax_payed
		UpgradePermissionsChanged.subscribe(self._on_change_upgrade_permissions, sender=self.settlement)
示例#14
0
	def remove(self):
		UpgradePermissionsChanged.unsubscribe(self._on_change_upgrade_permissions, sender=self.settlement)
		super(Settler, self).remove()