From ddda298c33202d5ba7352a6df9928c1962ba8eec Mon Sep 17 00:00:00 2001 From: HeroOfTheWinds Date: Thu, 22 May 2014 14:59:21 -1000 Subject: [PATCH] Add air shield, change time to float value Air Shield gives off light and can be walked through. Use for doors, etc. Time changed from 4500 to 0.1875, which is the same but more compatible with dev builds. --- mods/moontest/nodes.lua | 19 ++++++++++++++++++ .../moontest/textures/moontest_air_shield.png | Bin 0 -> 144 bytes .../textures/moontest_air_shield_animated.png | Bin 0 -> 366 bytes mods/sky/init.lua | 2 +- 4 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 mods/moontest/textures/moontest_air_shield.png create mode 100644 mods/moontest/textures/moontest_air_shield_animated.png diff --git a/mods/moontest/nodes.lua b/mods/moontest/nodes.lua index a115e76d..26ce7260 100644 --- a/mods/moontest/nodes.lua +++ b/mods/moontest/nodes.lua @@ -69,6 +69,25 @@ minetest.register_node("moontest:air", { buildable_to = true, }) +minetest.register_node("moontest:air_shield", { + description = "Air Shield", + drawtype = "glasslike", + inventory_image = minetest.inventorycube("moontest_air_shield.png"), + use_texture_alpha = true, + --tiles = {"moontest_air_shield.png"}, + tiles = { + {name="moontest_air_shield_animated.png", animation={type="vertical_frames", aspect_w=16, aspect_h=16, length=3.0}} + }, + paramtype = "light", + sunlight_propagates = true, + light_source = 7, + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + post_effect_color = {a=100, r=0, g=150, b=255}, +}) + minetest.register_node("moontest:airgen", { description = "Air Generator", tiles = {"moontest_airgen.png"}, diff --git a/mods/moontest/textures/moontest_air_shield.png b/mods/moontest/textures/moontest_air_shield.png new file mode 100644 index 0000000000000000000000000000000000000000..2127d908f00cac6123a61d2ccfb0edafd72064f6 GIT binary patch literal 144 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqt2hInf{U`%d!Uf4r;B5V#p&df8Q=ELYh*fb#6eNQ iG~r4^ATwJxBg2NpOeTk&Oca0$89ZJ6T-G@yGywoBo+Ok2 literal 0 HcmV?d00001 diff --git a/mods/moontest/textures/moontest_air_shield_animated.png b/mods/moontest/textures/moontest_air_shield_animated.png new file mode 100644 index 0000000000000000000000000000000000000000..51119ca140a2e3057f003dc1b5f8e8ceddf81b9f GIT binary patch literal 366 zcmeAS@N?(olHy`uVBq!ia0vp^0zmwLgAGV>B|fVFQfx`y?k)`fL2$v|<&%LToCO|{ z#S9GG!XV7ZFl&wkP>{XE)7O>#9;-Nmw(OT3%Ort9zdcREm;Fg$$|sd`m|rbHi^-znmvWl#gysV-!?ozEbt7xnp8>;@n+jnLYwc4e!eqs&aSC zD0eC}49Z;CIWdnnz%VCHL5V&59Djtqf|7TI}LoLJRjRRJT3d(nGqs6Dm7U|{fc^>bP0 Hl+XkK_tTA< literal 0 HcmV?d00001 diff --git a/mods/sky/init.lua b/mods/sky/init.lua index 37f612c5..367556e9 100644 --- a/mods/sky/init.lua +++ b/mods/sky/init.lua @@ -1,7 +1,7 @@ -- Set time to midnight. minetest.register_on_joinplayer(function(player) - minetest.set_timeofday(4500) + minetest.set_timeofday(0.1875) minetest.setting_set("time_speed", 0) end)