nb = numberTimTravel wrote:What does nb stand for in the first post?

nb = numberTimTravel wrote:What does nb stand for in the first post?



Code: Select all
local function build_obj_line(gui,uplist_object,n)
	local amount = uplist_object.amount
	local object = uplist_object.object
	local name = object.name
	if amount ~= nil then	
		if amount > 0 then -- product
			gui.add({type = "sprite-button", sprite = "sprite_prod_effic", tooltip = {"effic-gui-prod-tt"}, style = "sprite_ingr_effic_style"})
		else -- ingredient
			gui.add({type = "sprite-button", sprite = "sprite_ingr_effic", tooltip = {"effic-gui-ingr-tt"}, style = "sprite_ingr_effic_style"})
			amount = -amount
		end
	end
	if amount ~= nil then	
		gui.add({type = "label", caption = amount .. "x", style = "label_effic_style"})
	end
	uplist_object.chk_sel = nil
	local gui2 = gui.add({type = "sprite-button", name = "but_effic_obj_" .. string.format("%2d",n) .. name, tooltip = {"effic-gui-open-object"}, style = "sprite_obj_effic_style"})
	if uplist_object.is_item then
		gui2.sprite = "item/" .. name
	else
		gui2.sprite = "fluid/" .. name
	end
	uplist_object.lbl_name = gui.add({type = "label", caption = object.localised_name, style = "label_effic_style"})			
	uplist_object.lbl_dp = gui.add({type = "label", style = "label_numg_effic_style"})
	uplist_object.lbl_dpt = gui.add({type = "label", style = "label_numw_effic_style"})
	uplist_object.lbl_dc = gui.add({type = "label", style = "label_numg_effic_style"})
	uplist_object.lbl_dct = gui.add({type = "label", style = "label_numw_effic_style"})
	uplist_object.lbl_ds = gui.add({type = "label", style = "label_numg_effic_style"})
	uplist_object.lbl_dst = gui.add({type = "label", style = "label_numw_effic_style"})
	uplist_object.lbl_norm = gui.add({type = "label", style = "label_numw_effic_style"})
	uplist_object.lbl_nbingr = gui.add({type = "label", caption = object.nb_recipes, style = "label_effic_style"})
end