35 lines
		
	
	
		
			659 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			659 B
		
	
	
	
		
			Lua
		
	
	
	
	
	
| local DataTableUtils = require("Utils.DataTableUtils")
 | |
| local PreCookSlot = {}
 | |
| 
 | |
| function PreCookSlot:OnInitialized()
 | |
| 
 | |
| end
 | |
| 
 | |
| function PreCookSlot:Construct()
 | |
| 
 | |
| end
 | |
| 
 | |
| function PreCookSlot:Destruct()
 | |
| 
 | |
| end
 | |
| 
 | |
| function PreCookSlot:Reset()
 | |
| 
 | |
| 
 | |
| end
 | |
| 
 | |
| function PreCookSlot:SetPreCookToolID(pre_cook_tool_id)
 | |
|     self:Reset()
 | |
|     if not pre_cook_tool_id then return end
 | |
| 
 | |
|     local row_data = DataTableUtils.GetDataTableRow("PreCookItemConfig", pre_cook_tool_id)
 | |
|     if not row_data then
 | |
|         return
 | |
|     end
 | |
| 
 | |
|     self.SlotImg:SetBrushFromSoftTexture(row_data.DisplayResource, true)
 | |
|     print("PreCookSlot:SetPreCookToolID", row_data)
 | |
| end
 | |
| 
 | |
| 
 | |
| return Class(nil, nil, PreCookSlot) |