mirror of
				https://github.com/Sokomine/replacer.git
				synced 2025-10-31 06:05:24 +01:00 
			
		
		
		
	make the fix cleaner
This commit is contained in:
		| @@ -75,15 +75,15 @@ replacer.inspect = function( itemstack, user, pointed_thing, mode, show_receipe | |||||||
| 				text = text..'entity \"'..tostring( luaob.name )..'\"'; | 				text = text..'entity \"'..tostring( luaob.name )..'\"'; | ||||||
| 				local sdata = luaob:get_staticdata(); | 				local sdata = luaob:get_staticdata(); | ||||||
| 				if( sdata ) then | 				if( sdata ) then | ||||||
| 					sdata = minetest.deserialize( sdata ); | 					sdata = minetest.deserialize( sdata ) or {}; | ||||||
| 					if( sdata and sdata.itemstring ) then | 					if( sdata.itemstring ) then | ||||||
| 						text = text..' ['..tostring( sdata.itemstring )..']'; | 						text = text..' ['..tostring( sdata.itemstring )..']'; | ||||||
| 						if( show_receipe ) then | 						if( show_receipe ) then | ||||||
| 							-- the fields part is used here to provide additional information about the entity | 							-- the fields part is used here to provide additional information about the entity | ||||||
| 							replacer.inspect_show_crafting( name, sdata.itemstring, { pos=pos, luaob=luaob} ); | 							replacer.inspect_show_crafting( name, sdata.itemstring, { pos=pos, luaob=luaob} ); | ||||||
| 						end | 						end | ||||||
| 					end | 					end | ||||||
| 					if( sdata and sdata.age ) then | 					if( sdata.age ) then | ||||||
| 						text = text..', dropped '..tostring( math.floor( sdata.age/60 ))..' minutes ago'; | 						text = text..', dropped '..tostring( math.floor( sdata.age/60 ))..' minutes ago'; | ||||||
| 					end | 					end | ||||||
| 				end | 				end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user