Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.40 KB | None | 0 0
  1. -- ui_itm_cooking
  2. -- ponney68
  3. --[[
  4. Copyright (C) 2012 Alundaio
  5. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License-]]
  6. --]]
  7. -------------------------------------------------------------------
  8. class "load_item" (CUIListBoxItem)
  9. function load_item:__init(height) super(height)
  10. self.file_name = "filename"
  11.  
  12. self:SetTextColor(GetARGB(255, 170, 170, 170))
  13.  
  14. self.fn = self:GetTextItem()
  15. self.fn:SetFont(GetFontLetterica18Russian())
  16. self.fn:SetEllipsis(true)
  17. end
  18.  
  19. function load_item:__finalize()
  20. end
  21.  
  22. -------------------------------------------------------------------
  23. class "cooking_ui" (CUIScriptWnd)
  24.  
  25. function cooking_ui:__init(owner,section) super()
  26. self.owner = owner
  27. self.section = section
  28.  
  29. self.use_parts = rx_utils.read_from_ini2(nil,section,"cooking_use_parts","bool",false)
  30. self.cooking_type = rx_utils.read_from_ini2(nil,section,"cooking_type","string","weapon")
  31.  
  32. self.cooking_only = rx_utils.parse_list2(nil,section,"cooking_only",true)
  33. self.cooking_refuse = rx_utils.parse_list2(nil,section,"cooking_refuse",true)
  34.  
  35. self.parts_include = rx_utils.parse_list2(nil,section,"cooking_parts_include",true)
  36. self.parts_exclude = rx_utils.parse_list2(nil,section,"cooking_parts_exclude",true)
  37.  
  38. self.use_actor_effects = rx_utils.read_from_ini2(nil,section,"cooking_use_actor_effects","bool",false)
  39.  
  40. self:InitControls()
  41. self:InitCallBacks()
  42. end
  43.  
  44. function cooking_ui:__finalize()
  45. end
  46.  
  47. function cooking_ui:FillList()
  48. self.list_box:RemoveAll()
  49.  
  50. local function fill_list(actor,obj)
  51. if (obj) and (self.cooking_only and self.cooking_only[obj:section()]) or (self.cooking_refuse == nil) or (self.cooking_refuse[obj:section()] == nil) then
  52. if (self.cooking_type == "fuel" and rx_utils.item_is_explosive(obj)) then
  53.  
  54. self:AddItemToList(obj,self.list_box)
  55.  
  56. end
  57. end
  58. end
  59.  
  60. db.actor:iterate_inventory(fill_list,db.actor)
  61. end
  62.  
  63. function cooking_ui:FillPartsList()
  64. self.list_box_parts:RemoveAll()
  65.  
  66. if self.list_box:GetSize()==0 then return end
  67.  
  68. local item = self.list_box:GetSelectedItem()
  69. if not (item) then
  70. return
  71. end
  72.  
  73. local obj = level.object_by_id(item.item_id)
  74. local function fill_list(actor,itm)
  75. if (itm and itm:id() ~= item.item_id) then
  76. if (self.parts_include and self.parts_include[itm:section()]) or (self.parts_exclude == nil and string.find(obj:section(),itm:section())) or (self.parts_exclude and self.parts_exclude[itm:section()] == nil and string.find(obj:section(),itm:section())) then
  77. self:AddItemToList(itm,self.list_box_parts,rx_utils.read_from_ini2(nil,itm:section(),"float",nil))
  78. end
  79. end
  80. end
  81.  
  82. db.actor:iterate_inventory(fill_list,db.actor)
  83. end
  84.  
  85. function cooking_ui:InitControls()
  86. self:SetWndRect (Frect():set(0,0,1024,768))
  87.  
  88.  
  89. self:SetAutoDelete(true)
  90.  
  91. self.xml = CScriptXmlInit()
  92. local ctrl
  93. self.xml:ParseFile ("ui_itm_main.xml")
  94.  
  95. ctrl = CUIWindow()
  96. self.xml:InitWindow ("itm_cooking:file_item:main",0,ctrl)
  97.  
  98. self.file_item_main_sz = vector2():set(ctrl:GetWidth(),ctrl:GetHeight())
  99.  
  100. self.xml:InitWindow ("itm_cooking:file_item:fn",0,ctrl)
  101. self.file_item_fn_sz = vector2():set(ctrl:GetWidth(),ctrl:GetHeight())
  102.  
  103. self.xml:InitWindow ("itm_cooking:file_item:fd",0,ctrl)
  104. self.file_item_fd_sz = vector2():set(ctrl:GetWidth(),ctrl:GetHeight())
  105.  
  106. self.form = self.xml:InitStatic("itm_cooking:form",self)
  107. --self.form:SetWndPos(vector2():set(device().width/2-(self.form:GetWidth()+70), device().height/2 - self.form:GetHeight()))
  108. self.form:SetWndPos(vector2():set(0, 0))
  109.  
  110. -- Background for forms
  111. --self.xml:InitStatic("itm_cooking:form:list_background",self.form)
  112.  
  113. if (self.use_parts) then
  114. --self.xml:InitStatic("itm_cooking:form:list_parts_background",self.form)
  115. end
  116.  
  117. -- Item picture
  118. self.picture = self.xml:InitStatic("itm_cooking:form:icon",self.form)
  119. self.picture_parts = self.xml:InitStatic("itm_cooking:form:icon_parts",self.form)
  120.  
  121. -- cooking tool picture
  122. self.pic = self.xml:InitStatic("itm_cooking:form:icon_tool",self.form)
  123.  
  124. local inv_grid_width = rx_utils.read_from_ini2(ini,self.section,"inv_grid_width","float",0)
  125. local inv_grid_height = rx_utils.read_from_ini2(ini,self.section,"inv_grid_height","float",0)
  126. local inv_grid_x = rx_utils.read_from_ini2(ini,self.section,"inv_grid_x","float",0)
  127. local inv_grid_y = rx_utils.read_from_ini2(ini,self.section,"inv_grid_y","float",0)
  128.  
  129. local x1 = inv_grid_x*50
  130. local y1 = inv_grid_y*50
  131.  
  132. local w = inv_grid_width*50
  133. local h = inv_grid_height*50
  134.  
  135. local x2 = x1 + w
  136. local y2 = y1 + h
  137.  
  138. local w,h = w,h
  139. if (utils.is_widescreen()) then
  140. w,h = w/1.5,h/1.2
  141. else
  142. w,h = w/1.3,h/1.3
  143. end
  144. self.pic:InitTexture("ui\\ui_icon_equipment")
  145. self.pic:SetTextureRect(Frect():set(x1,y1,x2,y2))
  146. self.pic:SetWndSize(vector2():set(w,h))
  147.  
  148. if not (self.pic.x) then
  149. local pos = self.pic:GetWndPos()
  150. local posform = self.form:GetWndPos()
  151. self.pic.x = pos.x + posform.x
  152. self.pic.y = pos.y + posform.y
  153. end
  154.  
  155. self.pic:SetWndPos(vector2():set(self.pic.x-w/2, self.pic.y-h/2))
  156.  
  157. -- Caption
  158. self.caption_parts = self.xml:InitTextWnd("itm_cooking:form:caption_parts",self.form)
  159. self.caption_cooking = self.xml:InitTextWnd("itm_cooking:form:caption_cooking",self.form)
  160.  
  161. -- List Box
  162. self.xml:InitFrame ("itm_cooking:form:list_frame",self.form)
  163.  
  164. self.list_box = self.xml:InitListBox("itm_cooking:form:list",self.form)
  165.  
  166. self.list_box:ShowSelectedItem (true)
  167. self:Register (self.list_box, "list_window")
  168.  
  169. if (self.use_parts) then
  170. -- Parts List Box
  171. self.list_pos = self.list_box:GetWndPos()
  172.  
  173. self.list_box_parts = self.xml:InitListBox("itm_cooking:form:list_parts",self.form)
  174. --self.list_box_parts:SetWndPos(vector2():set(self.list_pos.x+self.list_box:GetWidth()+5, self.list_pos.y))
  175.  
  176. local frame = self.xml:InitFrame("itm_cooking:form:list_frame_parts",self.form)
  177. --frame:SetWndPos(vector2():set(self.list_pos.x+self.list_box:GetWidth()+5, self.list_pos.y))
  178.  
  179. self.list_box_parts:ShowSelectedItem(true)
  180. self:Register(self.list_box_parts, "list_window_parts")
  181. else
  182. --self.form:SetWndSize(vector2():set(self.list_box:GetWidth()+35, self.form:GetHeight()))
  183. end
  184. -- Button cooking
  185. ctrl = self.xml:Init3tButton("itm_cooking:form:btn_cooking", self.form)
  186. self:Register (ctrl, "button_cooking")
  187.  
  188. -- Button Cancel
  189. ctrl = self.xml:Init3tButton ("itm_cooking:form:btn_cancel", self.form)
  190. self:Register (ctrl, "button_back")
  191. end
  192.  
  193. function cooking_ui:InitCallBacks()
  194. self:AddCallback("button_cooking", ui_events.BUTTON_CLICKED, self.OnButton_cooking, self)
  195. self:AddCallback("button_back", ui_events.BUTTON_CLICKED, self.OnButton_back_clicked, self)
  196.  
  197. self:AddCallback("list_window", ui_events.LIST_ITEM_CLICKED, self.OnListItemClicked, self)
  198. self:AddCallback("list_window", ui_events.WINDOW_LBUTTON_DB_CLICK, self.OnListItemDbClicked, self)
  199.  
  200. self:AddCallback("list_window_parts", ui_events.LIST_ITEM_CLICKED, self.OnPartsListItemClicked, self)
  201. self:AddCallback("list_window_parts", ui_events.WINDOW_LBUTTON_DB_CLICK, self.OnPartsListItemDbClicked, self)
  202. end
  203.  
  204. function cooking_ui:OnPartsListItemClicked()
  205. if self.list_box_parts:GetSize()==0 then return end
  206.  
  207. local item = self.list_box_parts:GetSelectedItem()
  208. if not (item) then
  209. self.picture_parts:SetTextureRect(Frect():set(0,0,0,0))
  210. self.caption_parts:SetText("")
  211. return
  212. end
  213.  
  214. local se_item = item.item_id and alife():object(item.item_id)
  215. if (se_item == nil or not db.actor:object(se_item:section_name())) then
  216. self.list_box_parts:RemoveItem(item)
  217. return
  218. end
  219.  
  220. local sec = se_item:section_name()
  221.  
  222. local w,h = item.width,item.height
  223. if (utils.is_widescreen()) then
  224. w,h = item.width/1.5,item.height/1.2
  225. else
  226. w,h = item.width/1.2,item.height/1.2
  227. end
  228. self.picture_parts:InitTexture("ui\\ui_icon_equipment")
  229. self.picture_parts:SetTextureRect(Frect():set(item.x1,item.y1,item.x2,item.y2))
  230. self.picture_parts:SetWndSize(vector2():set(w,h))
  231.  
  232. if not (self.picture_parts.x) then
  233. local pos = self.picture_parts:GetWndPos()
  234. self.picture_parts.x = pos.x
  235. self.picture_parts.y = pos.y
  236. end
  237.  
  238. self.picture_parts:SetWndPos(vector2():set(self.picture_parts.x-w/2, self.picture_parts.y-h/2))
  239.  
  240. self.caption_parts:SetText(string.format("Selected (x%d)",self:GetPartCount(sec)))
  241.  
  242. end
  243.  
  244. function cooking_ui:OnPartsListItemDbClicked()
  245. self:OnButton_cooking()
  246. end
  247.  
  248. function cooking_ui:OnListItemClicked()
  249. if self.list_box:GetSize()==0 then return end
  250.  
  251. local item = self.list_box:GetSelectedItem()
  252.  
  253. if not (item) then
  254. self.picture:SetTextureRect(Frect():set(0,0,0,0))
  255. return
  256. end
  257.  
  258. local se_item = alife():object(item.item_id)
  259. if (se_item == nil or not db.actor:object(se_item:section_name())) then
  260. self.list_box:RemoveItem(item)
  261. return
  262. end
  263.  
  264. local w,h = item.width,item.height
  265. if (utils.is_widescreen()) then
  266. w,h = item.width/1.5,item.height/1.2
  267. else
  268. w,h = item.width/1.2,item.height/1.2
  269. end
  270. self.picture:InitTexture("ui\\ui_icon_equipment")
  271. self.picture:SetTextureRect(Frect():set(item.x1,item.y1,item.x2,item.y2))
  272. self.picture:SetWndSize(vector2():set(w,h))
  273.  
  274. if not (self.picture.x) then
  275. local pos = self.picture:GetWndPos()
  276. self.picture.x = pos.x
  277. self.picture.y = pos.y
  278. end
  279.  
  280. self.picture:SetWndPos(vector2():set(self.picture.x-w/2, self.picture.y-h/2))
  281.  
  282. self.caption_cooking:SetText(string.format("Selected (x%d)",self:GetFuelCharges(se_item)))
  283.  
  284. if (self.use_parts) then
  285. self.picture_parts:SetTextureRect(Frect():set(0,0,0,0))
  286. self.caption_parts:SetText("")
  287. self:FillPartsList()
  288. end
  289. end
  290.  
  291. function cooking_ui:OnButton_back_clicked()
  292. alife():create(self.section,db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id(),db.actor:id())
  293. self:HideDialog()
  294. end
  295.  
  296. function cooking_ui:OnKeyboard(dik, keyboard_action)
  297.  
  298. CUIScriptWnd.OnKeyboard(self,dik,keyboard_action)
  299. if (keyboard_action == ui_events.WINDOW_KEY_PRESSED) then
  300. if (dik == DIK_keys.DIK_RETURN) then
  301.  
  302. elseif (dik == DIK_keys.DIK_ESCAPE) then
  303. self:OnButton_back_clicked()
  304.  
  305.  
  306. end
  307. end
  308. return true
  309. end
  310.  
  311. -- Drengor - multi-cook
  312. function cooking_ui:GetPartCount(part_name)
  313. local cnt = 0
  314.  
  315. local function countparts(npc, item)
  316. if item:section() == part_name then
  317. cnt = cnt + 1
  318. end
  319. end
  320.  
  321. db.actor:iterate_inventory(countparts, nil)
  322.  
  323. alun_utils.printf("Counted %d %s",cnt,part_name);
  324.  
  325. return cnt
  326. end
  327.  
  328. function cooking_ui:GetFuelCharges(fuel_item)
  329. -- fuel_name begins with fuel type, and optionally has a 2-8 on the end indicating reduced charges
  330. local fuel_name = fuel_item:section_name()
  331. local last_char = fuel_name:byte(fuel_name:len())
  332. local base_charges = 1
  333. local charge_adjust = 0
  334.  
  335. if(last_char > 49) and (last_char < 57) then
  336. charge_adjust = last_char - 49
  337. end
  338.  
  339. if(alun_utils.startsWith(fuel_name,"kerosene")) then base_charges = 5 end
  340. if(alun_utils.startsWith(fuel_name,"charcoal")) then base_charges = 3 end
  341. if(alun_utils.startsWith(fuel_name,"explo_jerrycan_fuel")) then base_charges = 8 end
  342. if(alun_utils.startsWith(fuel_name,"explo_balon_gas")) then base_charges = 8 end
  343.  
  344. return base_charges - charge_adjust
  345. end
  346.  
  347. function cooking_ui:MakeFuelCharges(fuel_item,charges)
  348. -- fuel_name begins with fuel type, and optionally has a 2-8 on the end indicating reduced charges, or _empty
  349. local fuel_name = fuel_item:section_name()
  350. local last_char = fuel_name:byte(fuel_name:len())
  351. local base_charges = 1
  352.  
  353. if(last_char > 49) and (last_char < 57) then
  354. fuel_name = fuel_name:sub(1,fuel_name:len()-1)
  355. end
  356.  
  357. if(fuel_name == "kerosene") then base_charges = 5 end
  358. if(fuel_name == "charcoal") then base_charges = 3 end
  359. if(fuel_name == "explo_jerrycan_fuel") then base_charges = 8 end
  360. if(fuel_name == "explo_balon_gas") then base_charges = 8 end
  361.  
  362. if (charges > 0) then
  363. fuel_name = string.format("%s%d",fuel_name,base_charges + 1 - charges)
  364. else
  365. fuel_name = string.format("%s%s",fuel_name,"_empty")
  366. end
  367.  
  368. alife():create(fuel_name, db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id())
  369. end
  370.  
  371. function cooking_ui:ConsumeFuel(fuel_item, charges)
  372. local c = self:GetFuelCharges(fuel_item) - charges
  373. local fuel_name = fuel_item:section_name()
  374.  
  375. if(c > 0 or (alun_utils.startsWith(fuel_name,"explo_jerrycan_fuel") or alun_utils.startsWith(fuel_name,"explo_balon_gas"))) then
  376. self:MakeFuelCharges(fuel_item,c)
  377. end
  378.  
  379. alife():release(fuel_item,true)
  380. end
  381.  
  382. function cooking_ui:ConsumePart(part, count)
  383. local part_name = part:section_name()
  384. local cnt = 0
  385.  
  386. local function consumeparts(npc, item)
  387. if cnt < count and item:section() == part_name then
  388. alife():release(alife():object(item:id()),true)
  389. cnt = cnt + 1
  390. end
  391. end
  392.  
  393. db.actor:iterate_inventory(consumeparts, nil)
  394. end
  395.  
  396. function cooking_ui:CreateMeal(part_name,count)
  397. for i=1,count,1 do
  398. alife():create(part_name, db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id())
  399. end
  400. end
  401. -- end Drengor - multi-cook
  402.  
  403. function cooking_ui:OnButton_cooking()
  404. index = self.list_box_parts:GetSelectedIndex()
  405. if (index ~= -1) then
  406. item = self.list_box_parts:GetItemByIndex(index)
  407. local se_parts = item and item.item_id and alife():object(item.item_id)
  408. if not (se_parts) then
  409. return
  410. end
  411. end
  412.  
  413. local index = self.list_box:GetSelectedIndex()
  414. if index == -1 then return end
  415. local item = self.list_box:GetItemByIndex(index)
  416.  
  417. local obj = item and level.object_by_id(item.item_id)
  418. local se_obj = item and item.item_id and alife():object(item.item_id)
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.  
  470.  
  471.  
  472.  
  473.  
  474.  
  475.  
  476.  
  477.  
  478.  
  479.  
  480.  
  481.  
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492. if not (obj) then
  493. return
  494.  
  495.  
  496.  
  497. end
  498.  
  499. if (self.list_box_parts) then
  500.  
  501. if (index ~= -1) then
  502. index = self.list_box_parts:GetSelectedIndex()
  503. item = self.list_box_parts:GetItemByIndex(index)
  504. local se_parts = item and item.item_id and alife():object(item.item_id)
  505. local sec = se_parts:section_name()
  506.  
  507. if (se_parts) then
  508.  
  509.  
  510. -- Drengor - multi-cook
  511. local part_count = self:GetPartCount(sec)
  512. local fuel_charges = self:GetFuelCharges(se_obj)
  513. local cook_count = part_count
  514.  
  515. if(part_count >= fuel_charges) then cook_count = fuel_charges end
  516. -- end Drengor - multi-cook
  517.  
  518. -- ponney68 cooking item
  519. if self.section =="fieldcooker" then
  520. alife():create("fieldcooker", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id())
  521. end
  522. if self.section =="wood_stove" then
  523. alife():create("wood_stove", db.actor:position(), db.actor:level_vertex_id(), db.actor:game_vertex_id(), db.actor:id())
  524. end
  525. -- End ponney68
  526.  
  527.  
  528. -- Drengor - multi-cook
  529. -- mutant_part_tushkano_meat
  530. if(sec=="mutant_part_tushkano_meat")then self:CreateMeal("meat_tushkano",cook_count) end
  531.  
  532.  
  533. -- mutant_part_flesh_meat
  534. if(sec=="mutant_part_flesh_meat")then self:CreateMeal("meat_flesh",cook_count) end
  535.  
  536.  
  537. -- mutant_part_boar_chop
  538. if(sec=="mutant_part_boar_chop")then self:CreateMeal("meat_boar",cook_count) end
  539.  
  540.  
  541. -- mutant_part_dog_meat
  542. if(sec=="mutant_part_dog_meat")then self:CreateMeal("meat_dog",cook_count) end
  543.  
  544.  
  545. -- mutant_part_psevdodog_meat
  546. if(sec=="mutant_part_psevdodog_meat")then self:CreateMeal("meat_pseudodog",cook_count) end
  547.  
  548.  
  549. -- mutant_part_krovosos_meat
  550. if(sec=="mutant_part_krovosos_meat")then self:CreateMeal("meat_bloodsucker",cook_count) end
  551.  
  552.  
  553. -- mutant_part_snork_hand
  554. if(sec=="mutant_part_snork_hand")then self:CreateMeal("meat_snork",cook_count) end
  555.  
  556.  
  557. -- mutant_part_chimera_meat
  558. if(sec=="mutant_part_chimera_meat")then self:CreateMeal("meat_chimera",cook_count) end
  559.  
  560.  
  561. -- mutant_part_crow_beak
  562. if(sec=="mutant_part_crow_beak")then self:CreateMeal("drink_crow",cook_count) end
  563.  
  564.  
  565.  
  566.  
  567.  
  568. self:ConsumeFuel(se_obj,cook_count)
  569. self:ConsumePart(se_parts,cook_count)
  570. -- end Drengor - multi-cook
  571. end
  572. end
  573. end
  574.  
  575. self:HideDialog()
  576.  
  577.  
  578. if (self.use_actor_effects and actor_effects) then
  579. actor_effects.use_item(self.section.."_dummy")
  580. level_weathers.get_weather_manager():forced_weather_change()
  581. end
  582. end
  583.  
  584. function cooking_ui:AddItemToList(item,listbox)
  585.  
  586. local _itm = load_item(self.file_item_main_sz.y)
  587. local sec = item and item:section()
  588. local inv_name = item and game.translate_string(rx_utils.read_from_ini2(nil,sec,"inv_name","string","error")) or "none"
  589.  
  590. _itm:SetWndSize (self.file_item_main_sz)
  591.  
  592. _itm.fn:SetWndPos(vector2():set(0,0))
  593. _itm.fn:SetWndSize (self.file_item_fn_sz)
  594. _itm.fn:SetText (inv_name)
  595.  
  596. if (item) then
  597. _itm.item_id = item:id()
  598.  
  599. local inv_grid_width = rx_utils.read_from_ini2(ini,sec,"inv_grid_width","float",0)
  600. local inv_grid_height = rx_utils.read_from_ini2(ini,sec,"inv_grid_height","float",0)
  601. local inv_grid_x = rx_utils.read_from_ini2(ini,sec,"inv_grid_x","float",0)
  602. local inv_grid_y = rx_utils.read_from_ini2(ini,sec,"inv_grid_y","float",0)
  603.  
  604. _itm.x1 = inv_grid_x*50
  605. _itm.y1 = inv_grid_y*50
  606.  
  607. _itm.width = inv_grid_width*50
  608. _itm.height = inv_grid_height*50
  609.  
  610. _itm.x2 = _itm.x1 + _itm.width
  611. _itm.y2 = _itm.y1 + _itm.height
  612. end
  613.  
  614. --[[
  615. _itm.picture = self.xml:InitStatic("itm_cooking:form:picture",self.form)
  616. _itm.picture:InitTexture("ui\\ui_icon_equipment")
  617. _itm.picture:SetTextureRect(Frect():set(_itm.x1,_itm.y1,_itm.x2,_itm.y2))
  618. _itm.picture:SetWndSize(vector2():set(inv_grid_width*50,inv_grid_height*50))
  619. --]]
  620.  
  621. listbox:AddExistingItem(_itm)
  622. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement