Exemplo n.º 1
0
def recipeworker(cmds, cList, mytime, xp_to_level, out_q):
	totals = {}
	for cmd in cmds:
		if len(cmd) == 2:
			Globals.karmin = {}
			for subcmd in cmd:
				totals.update(costCraft(subcmd[0],subcmd[1],subcmd[2],subcmd[3],subcmd[4],deepcopy(cList),mytime,xp_to_level))
		else:
			totals.update(costCraft(cmd[0],cmd[1],cmd[2],cmd[3],cmd[4],deepcopy(cList),mytime,xp_to_level))
	out_q.put(totals)
Exemplo n.º 2
0
def recipeworker((cmds, cList, mytime, xp_to_level)):  # , out_q):
	Globals.init()
	totals = {}
	if type(cmds) == list:
		Globals.karmin = {}
		for cmd in cmds:
			totals.update(costCraft(cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], deepcopy(cList), mytime, xp_to_level))
	else:
		totals.update(costCraft(cmds[0], cmds[1], cmds[2], cmds[3], cmds[4], deepcopy(cList), mytime, xp_to_level))
	return totals
Exemplo n.º 3
0
def recipeworker(inc_params):  # , out_q):
	cmds, cList, free, mytime, xp_to_level, backupkey = inc_params
	Globals.init()
	totals = {}

	if type(cmds) == list:
		Globals.karmin = {}
		for cmd in cmds:
			with mytimer(cmd[0]):
				totals.update(costCraft(cmd[0], cmd[1], cmd[2], cmd[3], cmd[4], Globals.mydeepcopy(cList), mytime, xp_to_level, backupkey, free))
	else:
		with mytimer(cmds[0]):
			totals.update(costCraft(cmds[0], cmds[1], cmds[2], cmds[3], cmds[4], Globals.mydeepcopy(cList), mytime, xp_to_level, backupkey, free))
	return totals