diff --git a/enviro.lua b/enviro.lua index 92f94e0..ff33640 100644 --- a/enviro.lua +++ b/enviro.lua @@ -6,7 +6,7 @@ local enviro = {}; enviro.skyboxes = { ["default"]={type = "regular", tex = {}}, - ["space"]=={type = "cavebox", tex = {"black.png","black.png","black.png","black.png","black.png","black.png",}},--{type="skybox", tex={"sky_pos_y.png","sky_neg_y.png","sky_pos_z.png","sky_neg_z.png","sky_neg_x.png","sky_pos_x.png",}}, -- need textures installed! + ["space"]={type="skybox", tex={"sky_pos_y.png","sky_neg_y.png","sky_pos_z.png","sky_neg_z.png","sky_neg_x.png","sky_pos_x.png",}}, -- need textures installed! ["caves"]={type = "cavebox", tex = {"black.png","black.png","black.png","black.png","black.png","black.png",}}, }; @@ -58,6 +58,7 @@ end minetest.register_node("basic_machines:enviro", { description = "Changes enviroment for players around target location", tiles = {"enviro.png"}, + drawtype = "allfaces", groups = {cracky=3, mesecon_effector_on = 1}, sounds = default.node_sound_wood_defaults(), after_place_node = function(pos, placer) @@ -269,9 +270,11 @@ minetest.register_globalstep(function(dtime) if pos.y<1500 and pos.y>1120 then local hp = player:get_hp(); + if hp>0 then minetest.chat_send_player(name,"WARNING: you entered DEADLY RADIATION ZONE"); - player:set_hp(hp-15); + local privs = minetest.get_player_privs(name) + if not privs.kick then player:set_hp(hp-15) end end return else diff --git a/mover.lua b/mover.lua index fc498ec..946cd6d 100644 --- a/mover.lua +++ b/mover.lua @@ -11,7 +11,7 @@ local machines_minstep = 1 -- minimal allowed activation timestep, if faster mac local max_range = 10; -- machines normal range of operation local machines_operations = 10; -- 1 coal will provide 10 mover basic operations ( moving dirt 1 block distance) local machines_TTL = 16; -- time to live for signals, how many hops before signal dissipates -basic_machines.version = "12/04/2016a"; +basic_machines.version = "01/04/2017a"; basic_machines.clockgen = 1; -- if 0 all background continuously running activity (clockgen/keypad) repeating is disabled -- how hard it is to move blocks, default factor 1, note fuel cost is this multiplied by distance and divided by machine_operations.. @@ -776,8 +776,7 @@ local function use_keypad(pos,ttl, manual) -- position, time to live ( how many count = count - 1; meta:set_int("count",count); else meta:set_int("repeat",0); - return - + --return end if count>=0 then @@ -917,10 +916,8 @@ local function use_keypad(pos,ttl, manual) -- position, time to live ( how many if mode == 3 then -- keypad in toggle mode local state = meta:get_int("state") or 0;state = 1-state; meta:set_int("state",state); if state == 0 then mode = 1 else mode = 2 end - end - -- pass the signal on to target - if mode == 2 then -- on + elseif mode == 2 then -- on if not effector.action_on then return end effector.action_on(tpos,node,ttl-1); -- run elseif mode == 1 then -- off