forked from luanti-org/minetest_game
		
	Chest: Redo new chests to use single-tile textures where possible
This keeps the filenames the same, but adds a new "inside" double texture for the open chest. Use regular drawtype for closed chest and delete the "cube.obj" model. X-flip the right-side texture for the closed chest.
This commit is contained in:
		
				
					committed by
					
						 paramat
						paramat
					
				
			
			
				
	
			
			
			
						parent
						
							758d5010b8
						
					
				
				
					commit
					d104b9b10f
				
			| @@ -1999,7 +1999,11 @@ function default.register_chest(name, d) | ||||
| 		return false | ||||
| 	end | ||||
|  | ||||
| 	def_closed.mesh = "cube.obj" | ||||
| 	def_closed.mesh = nil | ||||
| 	def_closed.drawtype = nil | ||||
| 	def_closed.tiles[6] = def.tiles[5] -- swap textures around for "normal" | ||||
| 	def_closed.tiles[5] = def.tiles[3] -- drawtype to make them match the mesh | ||||
| 	def_closed.tiles[3] = def.tiles[3].."^[transformFX" | ||||
|  | ||||
| 	minetest.register_node("default:" .. name, def_closed) | ||||
| 	minetest.register_node("default:" .. name .. "_open", def_opened) | ||||
| @@ -2026,7 +2030,14 @@ end | ||||
|  | ||||
| default.register_chest("chest", { | ||||
| 	description = "Chest", | ||||
| 	tiles = { "default_chest_wood.png" }, | ||||
| 	tiles = { | ||||
| 		"default_chest_top.png", | ||||
| 		"default_chest_top.png", | ||||
| 		"default_chest_side.png", | ||||
| 		"default_chest_side.png", | ||||
| 		"default_chest_front.png", | ||||
| 		"default_chest_inside.png" | ||||
| 	}, | ||||
| 	sounds = default.node_sound_wood_defaults(), | ||||
| 	sound_open = "default_chest_open", | ||||
| 	sound_close = "default_chest_close", | ||||
| @@ -2035,7 +2046,14 @@ default.register_chest("chest", { | ||||
|  | ||||
| default.register_chest("chest_locked", { | ||||
| 	description = "Locked Chest", | ||||
| 	tiles = { "default_chest_wood_locked.png" }, | ||||
| 	tiles = { | ||||
| 		"default_chest_top.png", | ||||
| 		"default_chest_top.png", | ||||
| 		"default_chest_side.png", | ||||
| 		"default_chest_side.png", | ||||
| 		"default_chest_lock.png", | ||||
| 		"default_chest_inside.png" | ||||
| 	}, | ||||
| 	sounds = default.node_sound_wood_defaults(), | ||||
| 	sound_open = "default_chest_open", | ||||
| 	sound_close = "default_chest_close", | ||||
|   | ||||
		Reference in New Issue
	
	Block a user