./hud_whored.lua

  1. local Hud_gsi_whored 
  2.  
  3. function hud_whored_init() 
  4. 	--Destroy base hud subscriptions to GSI 
  5. 	vint_datagroup_remove_subscription("sr2_local_player_gameplay_indicator_status", "insert", "hud_gsi_vdo_update", HUD_DOC_HANDLE) 
  6. 	vint_datagroup_remove_subscription("sr2_local_player_gameplay_indicator_status", "update", "hud_gsi_vdo_update", HUD_DOC_HANDLE) 
  7. 	 
  8. 	--Destroy base hud GSI 
  9. 	if Hud_gsi ~= -1 then 
  10. 		Hud_gsi:object_destroy() 
  11. 		Hud_gsi = -1 
  12. 	end 
  13. 	 
  14. 	Hud_gsi_whored = Vdo_gsi_whored:new("gsi_whored") 
  15. 	Hud_gsi_whored:open() 
  16. 	 
  17. 	--Subscribe 
  18. 	vint_datagroup_add_subscription("sr2_local_player_gameplay_indicator_status", "insert", "hud_whored_gsi_update") 
  19. 	vint_datagroup_add_subscription("sr2_local_player_gameplay_indicator_status", "update", "hud_whored_gsi_update") 
  20. end 
  21.  
  22. function hud_whored_cleanup() 
  23. 	if Hud_gsi_whored ~= nil then 
  24. 		Hud_gsi_whored:object_destroy() 
  25. 	end 
  26. end 
  27.  
  28. function hud_whored_gsi_update(di_h) 
  29. 	Hud_gsi_whored:update(di_h) 
  30. end 
  31.