Daemonion

bind_stalker cleanup attempt 1

Dec 21st, 2012
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.38 KB | None | 0 0
  1. ------------------------------------------
  2. function actor_binder:on_item_take (obj)
  3.     level_tasks.proceed(self.object)
  4.     ev_inv_space.start(obj)
  5.     --game_stats.update_take_item (obj, self.object)
  6.    
  7. ---------------------------------------
  8.     -- Daemonion's weapon audio perspective
  9.     if (isWeapon(obj)) then
  10.         local sec = obj:section()
  11.         local ini = system_ini()
  12.         -- Check system ini if section with the postfix "_actor" exists
  13.         if (ini:section_exist(sec.."_actor")) then
  14.             alife():release( alife():object(obj:id()),true )
  15.             alife():create(sec.."_actor",db.actor:position(),0,0,0)
  16.         end
  17.     end
  18. ---------------------------------------
  19.  
  20. end
  21.  
  22. ----------------------------------------------
  23. function actor_binder:on_item_drop (obj)
  24.     level_tasks.proceed(self.object)
  25.     ev_inv_space.start(obj)
  26.     ev_gasmask.maskDrop(obj)
  27.    
  28. ---------------------------------------
  29.     -- Daemonion's weapon audio perspective
  30.     if (isWeapon(obj) and string.find(obj:section(),"_actor")) then
  31.         local sec = string.gsub(obj:section(),"_actor","")
  32.         alife():release( alife():object(obj:id()),true )
  33.         alife():create(sec,db.actor:position(),db.actor:level_vertex_id(),db.actor:game_vertex_id())
  34.     end
  35. ---------------------------------------
  36.    
  37.     --game_stats.update_drop_item (obj, self.object)
  38.     abc_medkit.chk_medlot_object(obj)
  39. end
  40.  
  41. --------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment