예제 #1
0
파일: cult.py 프로젝트: rbain233/cultmaker
 def assignLabor(self, department, cultists):
     #TODO: add permanency, monthly function?
     if not self.departments.has_key(department):  #new one.
         d = LaborPool()
         d.name = department
         self.departments[department] = d
     d = self.departments[department]
     for c in cultists:
         if c.department:  #Make sure they're not in two departments at once.
             c.department.removePerson(c)
         d.addPerson(c)
     self._docallbacks()
     return d  #So the user can set the laborpool's attributes, if need be.
예제 #2
0
파일: cult.py 프로젝트: rbain233/cultmaker
	def assignLabor(self, department, cultists):
		#TODO: add permanency, monthly function?
		if not self.departments.has_key(department): #new one.
			d = LaborPool()
			d.name = department
			self.departments[department] = d 
		d = self.departments[department]
		for c in cultists:
			if c.department: #Make sure they're not in two departments at once.
				c.department.removePerson(c) 
			d.addPerson(c)
		self._docallbacks()
		return d #So the user can set the laborpool's attributes, if need be.