From e274b3e0fd271c42c993bc925bdbeb1f4ddc3ba2 Mon Sep 17 00:00:00 2001 From: D00Med Date: Fri, 3 Feb 2017 17:07:00 +1000 Subject: [PATCH] more improvements --- api.lua | 3 ++- init.lua | 32 ++++++++++++++++++++++++------ textures/vehicles_lightblock.png | Bin 155 -> 356 bytes textures/vehicles_lightblock2.png | Bin 150 -> 245 bytes textures/vehicles_lightcycle.png | Bin 1999 -> 2097 bytes textures/vehicles_lightcycle2.png | Bin 1913 -> 2107 bytes 6 files changed, 28 insertions(+), 7 deletions(-) diff --git a/api.lua b/api.lua index 44edec5..4daa8a9 100644 --- a/api.lua +++ b/api.lua @@ -218,7 +218,8 @@ function vehicles.object_drive(entity, dtime, def) minetest.set_node(pos, {name=place_node}) end if place_trigger ~= nil and ctrl.sneak then - minetest.set_node(pos, {name=place_node}) + local facedir = minetest.dir_to_facedir(dir) + minetest.set_node(pos, {name=place_node, param2=facedir}) end end diff --git a/init.lua b/init.lua index f173c3b..5d8847d 100644 --- a/init.lua +++ b/init.lua @@ -2366,18 +2366,28 @@ minetest.register_node("vehicles:tyres", { minetest.register_node("vehicles:light_barrier", { description = S("Light Barrier"), - tiles = {"vehicles_lightblock.png",}, + tiles = { + "vehicles_lightblock.png^[transformR90", + "vehicles_lightblock.png^[transformR90", + "vehicles_lightblock.png", + }, use_texture_alpha = true, - drawtype = "allfaces", + drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.0625, -0.5, -0.5, 0.0625, 0.5, 0.5}, + } + }, sunlight_propagates = true, walkable = false, light_source = 9, - is_ground_content = true, groups = {cracky=3,dig_immediate=3,not_in_creative_inventory=1}, on_construct = function(pos, node) minetest.get_node_timer(pos):start(4) + return end, on_timer = function(pos, elapsed) minetest.remove_node(pos) @@ -2386,18 +2396,28 @@ minetest.register_node("vehicles:light_barrier", { minetest.register_node("vehicles:light_barrier2", { description = S("Light Barrier 2"), - tiles = {"vehicles_lightblock2.png",}, + tiles = { + "vehicles_lightblock2.png^[transformR90", + "vehicles_lightblock2.png^[transformR90", + "vehicles_lightblock2.png", + }, use_texture_alpha = true, - drawtype = "allfaces", + drawtype = "nodebox", paramtype = "light", paramtype2 = "facedir", + node_box = { + type = "fixed", + fixed = { + {-0.0625, -0.5, -0.5, 0.0625, 0.5, 0.5}, + } + }, sunlight_propagates = true, walkable = false, light_source = 9, - is_ground_content = true, groups = {cracky=3,dig_immediate=3,not_in_creative_inventory=1}, on_construct = function(pos, node) minetest.get_node_timer(pos):start(4) + return end, on_timer = function(pos, elapsed) minetest.remove_node(pos) diff --git a/textures/vehicles_lightblock.png b/textures/vehicles_lightblock.png index 89a61bf725190b375b45109fee6ee17bd6d959a3..b0d440a373ffb4efc55412735b932c4b429840c5 100644 GIT binary patch delta 309 zcmV-50m}ZH0ptRZIDY{aNklsM1O=$1V~(t=A{5cnA3b5NsA;Orq0CznXqhBq{G5`Po M07*qoM6N<$g2Wdt82|tP diff --git a/textures/vehicles_lightblock2.png b/textures/vehicles_lightblock2.png index 8f5d3904b9c47dfec08561f2e55d9c0182d8e11a..954df883cc2ff437a846760ed2f08ae2d328cb54 100644 GIT binary patch delta 196 zcmV;#06YJd0rdfpIe(`~L_t(I%cYaS4Z=_iLtp++L9`1X#$a1^U>0WJgjk?OK!3ua zge`8hIOGKvMVLi1ANX*7W5Q_i#xJ3eH yQ&vB5lxDS!hAU5LV?pZEAr|Fcj*&7+w9X#^5Kjfq*?Z*x00005+ePE8?-MTFy6d$oFM z8y=3FgKVewIDZ`nQ7BN75>Y6CX|-CIBsnoKqZG1Gz^_ywO(BXb7yzXZ zp4YSKDB1%yJv~jc*<^ZpdgK@9wtlZwt5t+jI2mb-T7T7Q6_X^iTCJ0@oaZ5`RYb9f z2}48_k=H5Vd5D>ro=vt|gE^LiI|$S$Z=6{umdnVwIsWmdKO^Vnkd+ETDTGqUN@c(% z%H=(e9R}_oFP>?Rc^-0R#(HmN23fBo;<)F{ew%5v_5*uafb3gJAxb4gv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