forked from mtcontrib/maidroid
		
	[ADD] Add core_writer method
This commit is contained in:
		| @@ -266,15 +266,31 @@ end) () | |||||||
| 		paramtype2  = "facedir", | 		paramtype2  = "facedir", | ||||||
| 	}) | 	}) | ||||||
|  |  | ||||||
|  | 	local function on_activate(self, staticdata) | ||||||
|  | 		self.object:set_properties{ | ||||||
|  | 			textures = {"maidroid_tool:core_node"}, | ||||||
|  | 		} | ||||||
|  | 	end | ||||||
|  |  | ||||||
|  | 	local function start_rotate(self) | ||||||
|  | 		self.object:set_properties{ | ||||||
|  | 			automatic_rotate = 1, | ||||||
|  | 		} | ||||||
|  | 	end | ||||||
|  |  | ||||||
|  | 	local function stop_rotate(self) | ||||||
|  | 		self.object:set_properties{ | ||||||
|  | 			automatic_rotate = 0, | ||||||
|  | 		} | ||||||
|  | 	end | ||||||
|  |  | ||||||
| 	minetest.register_entity("maidroid_tool:core_entity", { | 	minetest.register_entity("maidroid_tool:core_entity", { | ||||||
| 		physical       = false, | 		physical       = false, | ||||||
| 		visual         = "wielditem", | 		visual         = "wielditem", | ||||||
| 		visual_size    = {x = 0.5, y = 0.5}, | 		visual_size    = {x = 0.5, y = 0.5}, | ||||||
| 		collisionbox   = {0, 0, 0, 0, 0, 0}, | 		collisionbox   = {0, 0, 0, 0, 0, 0}, | ||||||
|  |  | ||||||
| 		on_activate = function(self, staticdata) | 		on_activate    = on_activate, | ||||||
| 			self.object:set_properties{textures = {"maidroid_tool:core_node"}} |  | ||||||
| 		end, |  | ||||||
|  |  | ||||||
| 		on_step = function(self, dtime) | 		on_step = function(self, dtime) | ||||||
| 			local yaw = self.object:getyaw() | 			local yaw = self.object:getyaw() | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user