mirror of
				https://codeberg.org/tenplus1/mobs_redo.git
				synced 2025-10-31 15:45:22 +01:00 
			
		
		
		
	only show mob HP when punched
This commit is contained in:
		
							
								
								
									
										5
									
								
								api.lua
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								api.lua
									
									
									
									
									
								
							| @@ -3,7 +3,7 @@ | ||||
|  | ||||
| mobs = {} | ||||
| mobs.mod = "redo" | ||||
| mobs.version = "20171112" | ||||
| mobs.version = "20171222" | ||||
|  | ||||
|  | ||||
| -- Intllib | ||||
| @@ -426,7 +426,8 @@ local check_for_death = function(self, cause, cmi_cause) | ||||
| 			self.nametag2 = self.nametag or "" | ||||
| 		end | ||||
|  | ||||
| 		if show_health then | ||||
| 		if show_health | ||||
| 		and (cmi_cause and cmi_cause.type == "punch") then | ||||
|  | ||||
| 			self.htimer = 2 | ||||
| 			self.nametag = "♥ " .. self.health .. " / " .. self.hp_max | ||||
|   | ||||
		Reference in New Issue
	
	Block a user