Jump to content

Recommended Posts

In the Smarter Crock Pot mod you can highlight the predicted result with your mouse but once you use the controller it won't let you highlight over the field.

	function self:OnPrediction(data)
		if self.owner and self.container and self.container.components and self.container.components.container then
			if self.utilslots[1] then
				self:RemoveChild(self.utilslots[1])
			end
			self.utilslots={}
			local slot = UtilSlot(1,"images/hud.xml", "inv_slot.tex", self.owner, self.container.components.container)
			local tile = ItemTile(data.item)	
			if tile.quantity then 
				tile.quantity:Kill() 
			end	
			tile:ShowChance(data.chance)
			slot:SetTile(tile)
			self:AddChild(slot)
			table.insert(self.utilslots,slot)
			slot:SetPosition(self.container.components.container.widgetutilslotpos[1])

			if not self.container.components.container.side_widget and self.container.components.container.side_align_tip then
				slot.side_align_tip = self.container.components.container.side_align_tip - self.container.components.container.widgetutilslotpos[1].x
			end
		end	
	end

 

Edited by NoQuitting

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...