Skip to content

Commit

Permalink
load V17
Browse files Browse the repository at this point in the history
  • Loading branch information
HybridDog committed Nov 22, 2015
1 parent 2e8511d commit 9dc7ef2
Show file tree
Hide file tree
Showing 10 changed files with 178 additions and 46 deletions.
125 changes: 125 additions & 0 deletions 3d2shield.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@

minetest.register_tool("diplazer:pick", {
description ="Diplazer pick",
range = 10,
inventory_image = "diplazer_pick.png",
groups = {not_in_creative_inventory = 0},
tool_capabilities = {
full_punch_interval = 0.35,
max_drop_level = 3,
groupcaps = {
fleshy={times={[1]=0,[2]=0,[3]=0},uses=40,maxlevel=3},
choppy={times={[1]=0,[2]=0,[3]=0},uses=100,maxlevel=3},
bendy={times={[1]=0,[2]=0,[3]=0},uses=100,maxlevel=3},
cracky={times={[1]=0,[2]=0,[3]=0},uses=100,maxlevel=3},
crumbly={times={[1]=0,[2]=0,[3]=0},uses=100,maxlevel=3},
snappy={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
},
damage_groups={fleshy=8},
},
})

minetest.register_tool("diplazer:adpick", {
description ="Diplazer ad pick",
range = 15,
inventory_image = "diplazer_adpick.png",
groups = {not_in_creative_inventory = 1},
tool_capabilities = {
full_punch_interval = 0.20,
max_drop_level = 3,
groupcaps = {
unbreakable={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
fleshy={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
choppy={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
bendy={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
cracky={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
crumbly={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
snappy={times={[1]=0,[2]=0,[3]=0},uses=0,maxlevel=3},
},
damage_groups={fleshy=9000},
},
})


minetest.register_node("diplazer:chip", {
description = "Chip block",
tiles = {"diplazer_shield.png",},
light_source = 50,
paramtype = "light",
use_texture_alpha = true,
sunlight_propagates = false,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds=default.node_sound_stone_defaults(),
})


minetest.register_tool("diplazer:armholder", {
description = "Plazmashield",
range = 4,
inventory_image = "diplazer_shield_armholder.png",
on_use = function(itemstack, user, pointed_thing)
plazmashield_tmp={user=user:get_player_name()}
local p=user:getpos()
local dir = user:get_look_dir()
p={x=p.x, y=p.y+1, z=p.z}
local m=minetest.env:add_entity(p, "diplazer:shield")
return itemstack
end,
})

minetest.register_entity("diplazer:shield",
{
hp_max = 40,
physical =true,
weight = 0,
collisionbox = {-0.5,-1.0,-0.5,0.5,1,0.5,},
visual = "cube",
visual_size = {x=1, y=2},
textures = {"diplazer_shield.png","diplazer_shield.png","diplazer_shield2.png","diplazer_shield2.png","diplazer_shield2.png","diplazer_shield2.png"},
colors = {},
spritediv = {x=1, y=1},
initial_sprite_basepos = {x=0, y=0},
is_visible = true,
makes_footstep_sound = false,
automatic_rotate = true,
alpha=10,
timer=5,
on_step = function(self, dtime)
self.timer=self.timer-dtime
if self.timer<0 then self.object:remove() return false end
return self
end,
})


minetest.register_craft({
output = "diplazer:chip",
recipe = {
{"default:diamond", "diplazer:box", ""},
}
})

minetest.register_craft({
output = "diplazer:adpick",
recipe = {
{"diplazer:adpick", "", ""},
}
})


minetest.register_craft({
output = "diplazer:pick",
recipe = {
{"diplazer:chip", "diplazer:chip", "diplazer:chip"},
{"", "default:steel_ingot", ""},
{"", "default:steel_ingot", ""},
}
})
minetest.register_craft({
output = "diplazer:armholder",
recipe = {
{"", "default:steel_ingot", ""},
{"default:mese_crystal", "diplazer:box", "default:steel_ingot"},
{"", "default:steel_ingot", ""},
}
})
21 changes: 19 additions & 2 deletions Copyright (C) UjEdwin Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,21 @@ Switcherbox:
diplazer:box (di_box)
Change modes & reload using mese crystal / fragemnts


Gravity manipuler:
diplazer:grav (di_grav)
change your gravity on use or restore (1 / 0.5 as default)

Plazmashield:
diplazer:armholder (di_s)
Spawns a object and protect you for a few secunds from attacks.

The pickaxe:
A fast and hard pick that is ore usefull then the other tools in some cases.
diplazer:pick (di_pick)

Same pick but is unlimeted and a bit better.
Craft it by it self to to repair it.
diplazer:adpick (di_adpick)

Lazer blocks:
decoration with light
Expand All @@ -129,7 +139,14 @@ see Help-Controls.txt for more info
You can easy toogle / functions in the init.lua

Changes log:

V17:
Added: diplazer:chip
Added: diplazer:pick
Added: diplazer:adpick
V16.5
Added: diplazer:armholder / di_s
Fixed: dibox massive errors / message
Fixed: diplazer lazers that makes annoying shadows
V16
Added: diplazer:3dt
V15.2
Expand Down
10 changes: 5 additions & 5 deletions base.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1831,14 +1831,14 @@ minetest.register_node("diplazer:lazer_" .. diplazer_lazer[i], {
description = "Diplazer Lazer (temporary)",
tiles = {"diplazer_lazer_" .. diplazer_lazer[i] .. ".png",},
drop="",
light_source = 50,
light_source = default.LIGHT_MAX - 1,
paramtype = "light",
alpha = 50,
walkable=false,
use_texture_alpha = true,
drawtype = "glasslike",
sunlight_propagates = true,
groups = {not_in_creative_inventory=1},
sunlight_propagates = false,
groups = {not_in_creative_inventory=1,liquid = 2, hot = 3,igniter = 1},
can_dig = function(pos, player)
return false
end,
Expand All @@ -1849,10 +1849,10 @@ minetest.register_node("diplazer:lazerblock_" .. diplazer_lazer[i], {
tiles = {"diplazer_lazer_" .. diplazer_lazer[i] .. ".png",},
light_source = 50,
paramtype = "light",
alpha = 50,
alpha = 30,
use_texture_alpha = true,
drawtype = "glasslike",
sunlight_propagates = true,
sunlight_propagates = false,
groups = {cracky=3,oddly_breakable_by_hand=3},
sounds=default.node_sound_stone_defaults(),
})
Expand Down
54 changes: 21 additions & 33 deletions dipbox.lua
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,10 @@ end




minetest.register_abm({
nodenames = {"diplazer:box"},
interval = 1,
chance = 1,
action = function(pos, node, active_object_count, active_object_count_wider)

dibox_update = function (pos, elapsed)
if diaplzer_loadbox==0 then return 0 end
diaplzer_loadbox=0
minetest.get_node_timer(pos):stop()
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()

Expand Down Expand Up @@ -156,12 +151,7 @@ minetest.register_abm({
else
return false
end
end
})




end



Expand All @@ -173,7 +163,6 @@ fmeta:set_string("formspec",
"list[context;diprep;2,2.5;1,1;]" ..
"button[1.8,3.5; 1.5,1;dip_rep;Load]" ..
"button[0,0; 1.5,1;dip_hlp;Help]" ..
"list[context;main;0,0;8,4;]" ..
"list[current_player;main;0,5;8,4;]" ..
"button[5,0; 1.5,1;dip_cm1;Mode 1]" ..
"button[6.5,0; 1.5,1;dip_cm2;Mode 2]" ..
Expand Down Expand Up @@ -204,21 +193,19 @@ minetest.register_node("diplazer:box", {
"default_steel_block.png^diplazer_boxside.png",
"default_steel_block.png^diplazer_boxside.png",
"default_steel_block.png^diplazer_boxpanel.png",},
groups = {cracky=3,oddly_breakable_by_hand=3},
groups = {fleshy = 3, dig_immediate = 3,},
paramtype2 = "facedir",
sounds=default.node_sound_stone_defaults(),
after_place_node = function(pos, placer, itemstack)
local meta = minetest.get_meta(pos)
meta:set_string("owner", placer:get_player_name())
meta:set_string("rep", "0")
meta:set_int("state", 0)
diplazer_inv(meta,placer,pos,0)
end,
on_construct = function(pos)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
inv:set_size("dipinv", 1)
inv:set_size("diprep", 1)
meta:set_string("setmode", "0")
diplazer_inv(meta,placer,pos,0)
end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
local meta=minetest.get_meta(pos)
Expand All @@ -244,7 +231,7 @@ allow_metadata_inventory_take = function(pos, listname, index, stack, player)
can_dig = function(pos, player)
local meta=minetest.get_meta(pos)
local inv=meta:get_inventory()
if player:get_player_name() ~= meta:get_string("owner") then
if player:get_player_name() ~= meta:get_string("owner") and meta:get_string("owner")~="" then
return false
end
return inv:get_stack("dipinv", 1):is_empty() and inv:get_stack("diprep", 1):is_empty()
Expand All @@ -257,25 +244,26 @@ on_receive_fields = function(pos, formname, fields, sender)
if sender:get_player_name() ~= meta:get_string("owner") then
return false
end
if fields.dip_rep then meta:set_string("rep", "1") diaplzer_loadbox=1 end
if fields.dip_cm1 then meta:set_string("setmode", "1") diaplzer_loadbox=1 end
if fields.dip_cm2 then meta:set_string("setmode", "2") diaplzer_loadbox=1 end
if fields.dip_cm3 then meta:set_string("setmode", "3") diaplzer_loadbox=1 end
if fields.dip_cm4 then meta:set_string("setmode", "4") diaplzer_loadbox=1 end
if fields.dip_cm5 then meta:set_string("setmode", "5") diaplzer_loadbox=1 end
if fields.dip_cm6 then meta:set_string("setmode", "6") diaplzer_loadbox=1 end
if fields.dip_cm7 then meta:set_string("setmode", "7") diaplzer_loadbox=1 end
if fields.dip_cm8 then meta:set_string("setmode", "8") diaplzer_loadbox=1 end
if fields.dip_cm9 then meta:set_string("setmode", "9") diaplzer_loadbox=1 end
if fields.dip_cm10 then meta:set_string("setmode", "10") diaplzer_loadbox=1 end
if fields.dip_cm11 then meta:set_string("setmode", "11") diaplzer_loadbox=1 end
if fields.dip_cm12 then meta:set_string("setmode", "12") diaplzer_loadbox=1 end
if fields.dip_rep then meta:set_string("rep", "1") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm1 then meta:set_string("setmode", "1") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm2 then meta:set_string("setmode", "2") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm3 then meta:set_string("setmode", "3") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm4 then meta:set_string("setmode", "4") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm5 then meta:set_string("setmode", "5") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm6 then meta:set_string("setmode", "6") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm7 then meta:set_string("setmode", "7") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm8 then meta:set_string("setmode", "8") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm9 then meta:set_string("setmode", "9") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm10 then meta:set_string("setmode", "10") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm11 then meta:set_string("setmode", "11") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end
if fields.dip_cm12 then meta:set_string("setmode", "12") minetest.env:get_node_timer(pos):start(1) diaplzer_loadbox=1 end


if fields.dip_hlp then
minetest.chat_send_player(sender:get_player_name(), "Place a blockstack left of the tool to place or dig with . (The amount of stack sets how many to place / dig [itmes works too if you will dig]) (insert mese crystal or framgents to load the tool)")
end
end,
on_timer = dibox_update,
})

minetest.register_craft({
Expand Down
14 changes: 8 additions & 6 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
diplazer_vesrion=16
diplazer_vesrion=17

diplazer_Tele={}
diplazer_UserTele={}
Expand Down Expand Up @@ -28,11 +28,17 @@ dofile(minetest.get_modpath("diplazer") .. "/settings.lua")
dofile(minetest.get_modpath("diplazer") .. "/base.lua")
dofile(minetest.get_modpath("diplazer") .. "/dipbox.lua")
dofile(minetest.get_modpath("diplazer") .. "/di3dt.lua")
dofile(minetest.get_modpath("diplazer") .. "/3d2shield.lua")

if diplazer_Enable_gravity==true then
dofile(minetest.get_modpath("diplazer") .. "/digrav.lua")
end



minetest.register_alias("di_adpick", "diplazer:adpick")
minetest.register_alias("di_pick", "diplazer:pick")
minetest.register_alias("di_s", "diplazer:armholder")
minetest.register_alias("di_3dt", "diplazer:di3dt")
minetest.register_alias("di_vac", "diplazer:vacuum")
minetest.register_alias("di_grav", "diplazer:grav")
Expand All @@ -51,8 +57,4 @@ minetest.register_alias("di_lcomg", "diplazer:lazerblock_com")
minetest.register_alias("di_lcomc", "diplazer:lazerblock_com")
minetest.register_alias("di_lgun", "diplazer:lazerblock_gun")
minetest.register_alias("di_lad", "diplazer:lazerblock_admin")
minetest.register_alias("di_ladno", "diplazer:lazerblock_adminno")




minetest.register_alias("di_ladno", "diplazer:lazerblock_adminno")
Binary file added textures/diplazer_adpick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/diplazer_pick.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/diplazer_shield.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/diplazer_shield2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added textures/diplazer_shield_armholder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9dc7ef2

Please sign in to comment.