forked from mff/lavatemple
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			nalc-1.0
			...
			332aeffe40
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 332aeffe40 | |||
| d815c4044c | 
@@ -6,11 +6,11 @@ local function tick()
 | 
			
		||||
	for i,player in ipairs(players) do
 | 
			
		||||
		local target = lavatemple.mapgen_data.pos;
 | 
			
		||||
		if not target then return end
 | 
			
		||||
		local pos = player:getpos()
 | 
			
		||||
		local dir = player:get_look_yaw()
 | 
			
		||||
		local pos = player:get_pos()
 | 
			
		||||
		local dir = player:get_look_horizontal()
 | 
			
		||||
		local angle_north = math.deg(math.atan2(target.x - pos.x, target.z - pos.z))
 | 
			
		||||
		if angle_north < 0 then angle_north = angle_north + 360 end
 | 
			
		||||
		local angle_dir = 90 - math.deg(dir)
 | 
			
		||||
		local angle_dir = 360-math.deg(math.abs(dir))
 | 
			
		||||
		local angle_relative = (angle_north - angle_dir) % 360
 | 
			
		||||
		local compass_image = math.floor((angle_relative/30) + 0.5)%12
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +0,0 @@
 | 
			
		||||
default
 | 
			
		||||
stairs
 | 
			
		||||
mobs
 | 
			
		||||
worldedit
 | 
			
		||||
watershed?
 | 
			
		||||
moreblocks?
 | 
			
		||||
@@ -43,7 +43,7 @@ minetest.register_on_generated(function(minp,maxp,seed)
 | 
			
		||||
		io.close(f)
 | 
			
		||||
		if not contents then return end
 | 
			
		||||
		-- Clear the area since worldedit doesn't save "air" nodes
 | 
			
		||||
		pos1, pos2, count = worldedit.allocate(ltp, contents)
 | 
			
		||||
		local pos1, pos2, count = worldedit.allocate(ltp, contents)
 | 
			
		||||
		for x=pos1.x,pos2.x do
 | 
			
		||||
		for y=pos1.y,pos2.y do
 | 
			
		||||
		for z=pos1.z,pos2.z do
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								mod.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										5
									
								
								mod.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,5 @@
 | 
			
		||||
name = lavatemple
 | 
			
		||||
title = Lava Temple
 | 
			
		||||
description = Add a special hidden structure
 | 
			
		||||
depends = default,stairs,mobs,worldedit
 | 
			
		||||
optional_depends = watershed,moreblocks
 | 
			
		||||
@@ -36,6 +36,7 @@ minetest.register_node("lavatemple:ladder", {
 | 
			
		||||
	tiles = {"lavatemple_ladder.png"},
 | 
			
		||||
	inventory_image = "lavatemple_ladder_inv.png",
 | 
			
		||||
	wield_image = "lavatemple_ladder_inv.png",
 | 
			
		||||
	use_texture_alpha = "clip",
 | 
			
		||||
	paramtype = "light",
 | 
			
		||||
	sunlight_propagates = true,
 | 
			
		||||
	paramtype2 = "wallmounted",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user