new file: aircraft.lua
new file: characters new file: depends.txt new file: documentation.txt new file: electric_nodes.lua new file: init.lua new file: models/chasseur.blend new file: models/chasseur.blend1 new file: models/chasseur.blend2 new file: models/chasseur.x new file: models/hunter.x new file: models/patrouilleur-closed.blend1 new file: models/patrouilleur-closed.blend2 new file: models/patrouilleur-opened.blend1 new file: models/patrouilleur.blend new file: models/patrouilleur.blend1 new file: models/patrouilleur.blend2 new file: models/patrouilleur.x new file: models/patrouilleur_close.blend new file: models/patrouilleur_close.x new file: models/patrouilleur_open.blend new file: models/patrouilleur_open.blend1 new file: models/patrouilleur_open.blend2 new file: models/patrouilleur_open.x new file: screen.lua new file: sounds/cps-vflSymP2Q.swf new file: sounds/jackhammer_sound.ogg new file: sounds/metal_footstep.1.ogg new file: sounds/metal_footstep.2.ogg new file: sounds/metal_footstep.3.ogg new file: sounds/metal_footstep.4.ogg new file: structures.lua new file: textures/battery_back.png new file: textures/battery_side.png new file: textures/battery_top.png new file: textures/bronze_ingot.png new file: textures/bronze_lump.png new file: textures/button_item.png new file: textures/edge_side.png new file: textures/electronic_card_item.png new file: textures/floor_bottom.png new file: textures/floor_side.png new file: textures/floor_top.png new file: textures/hydro_generator_front.png new file: textures/jackhammer.png new file: textures/jackhammer_side.png new file: textures/jackhammer_top.png new file: textures/lamp_box.png new file: textures/lamp_box_on.png new file: textures/lamp_small.png new file: textures/lamp_small_ceiling.png new file: textures/lamp_small_floor.png new file: textures/lamp_small_on.png new file: textures/lamp_small_on_ceiling.png new file: textures/lamp_small_on_floor.png new file: textures/lamp_small_only.png new file: textures/patrouilleur.png new file: textures/plastic_item.png new file: textures/resistor_item.png new file: textures/resistor_side.png new file: textures/resistor_top.png new file: textures/screen_flat_back.png new file: textures/screen_flat_bottom.png new file: textures/screen_flat_front_2columns.png new file: textures/screen_flat_front_bigtext.png new file: textures/screen_flat_front_cybertronic.png new file: textures/screen_flat_front_map.png new file: textures/screen_flat_front_off.png new file: textures/screen_flat_front_smalltext.png new file: textures/screen_flat_left.png new file: textures/screen_flat_right.png new file: textures/screen_flat_top.png new file: textures/steel_armature_h_side.png new file: textures/steel_armature_top.png new file: textures/steel_armature_v_side.png new file: textures/steel_wrench.png new file: textures/structure_armature_h_wielded.png new file: textures/structures_concrete.png new file: textures/switch_side.png new file: textures/switch_top_off.png new file: textures/switch_top_on.png new file: textures/technology_ladder.png new file: textures/triangle_left.png new file: textures/triangle_right.png new file: textures/triangle_side.png new file: textures/wire_item.png new file: textures/wire_side.png new file: textures/wire_top.png new file: textures/wire_top_wall.png new file: tools.lua
183
aircraft.lua
Executable file
@ -0,0 +1,183 @@
|
|||||||
|
|
||||||
|
local function get_sign(i)
|
||||||
|
if i == 0 then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return i/math.abs(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_velocity(v, yaw, y)
|
||||||
|
local x = math.cos(yaw)*v
|
||||||
|
local z = math.sin(yaw)*v
|
||||||
|
return {x=x, y=y, z=z}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_v(v)
|
||||||
|
return math.sqrt(v.x^2+v.z^2)
|
||||||
|
end
|
||||||
|
--[[
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = {"air"},
|
||||||
|
interval = 10,
|
||||||
|
chance = 0.1,
|
||||||
|
action = function(pos, timer)
|
||||||
|
minetest.env:clear_objects()
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
]]
|
||||||
|
|
||||||
|
local hunter = {
|
||||||
|
hp_max = 100,
|
||||||
|
physical = true,
|
||||||
|
collisionbox = {-2.5,-7,-2.5, 2.5,4,2.5},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "patrouilleur.x",
|
||||||
|
textures = {"patrouilleur.png"},
|
||||||
|
automatic_rotate = true,
|
||||||
|
makes_footstep_sound = true,
|
||||||
|
spritediv = {x=1, y=1},
|
||||||
|
initial_sprite_basepos = {x=0, y=0},
|
||||||
|
is_visible = true,
|
||||||
|
|
||||||
|
driver = nil,
|
||||||
|
v = 0,
|
||||||
|
z = 0,
|
||||||
|
}
|
||||||
|
|
||||||
|
function hunter:on_rightclick(clicker)
|
||||||
|
if not clicker or not clicker:is_player() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self.driver and clicker == self.driver then
|
||||||
|
self.driver = nil
|
||||||
|
self.object:set_animation({x=50, y=55}, 15, 1)
|
||||||
|
local p = get_velocity(3, self.object:getyaw(), 3)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
pos.x = pos.x-p.x
|
||||||
|
pos.y = pos.y-p.y
|
||||||
|
pos.z = pos.z-p.z
|
||||||
|
clicker:set_detach()
|
||||||
|
clicker:setpos(pos)
|
||||||
|
self.object:setvelocity({x=0, y=0, z=0})
|
||||||
|
elseif not self.driver then
|
||||||
|
self.driver = clicker
|
||||||
|
clicker:set_attach(self.object, "", {x=0,y=0,z=0}, {x=0,y=0,z=0})
|
||||||
|
self.object:set_animation({x=55, y=60}, 15, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function hunter:on_activate(staticdata, dtime_s)
|
||||||
|
self.object:set_armor_groups({immortal=1})
|
||||||
|
if staticdata then
|
||||||
|
self.v = tonumber(staticdata)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function hunter:get_staticdata()
|
||||||
|
return tostring(v)
|
||||||
|
end
|
||||||
|
|
||||||
|
function hunter:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
|
||||||
|
self.object:remove()
|
||||||
|
if puncher and puncher:is_player() then
|
||||||
|
puncher:get_inventory():add_item("main", "technology:hunter")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function hunter:on_step(dtime)
|
||||||
|
-- make fire if damages are over 50%
|
||||||
|
if self.object:get_hp() < 50 then
|
||||||
|
print("hunter is burning")
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
pos.x = pos.x + math.random(-2,2)
|
||||||
|
pos.y = pos.y + math.random(-2,2)
|
||||||
|
pos.z = pos.z + math.random(-2,2)
|
||||||
|
minetest.env:set_node(pos, {name="fire:basic_flame"})
|
||||||
|
self.z = self.z - 0.1
|
||||||
|
end
|
||||||
|
-- explode when hp is under 5
|
||||||
|
if self.object:get_hp() < 5 then
|
||||||
|
explosion(self.object:getpos(), 30)
|
||||||
|
end
|
||||||
|
local velocity = self.object:getvelocity()
|
||||||
|
-- have user commands
|
||||||
|
self.v = get_v(velocity)*get_sign(self.v)
|
||||||
|
if self.driver then
|
||||||
|
local ctrl = self.driver:get_player_control()
|
||||||
|
if ctrl.up then
|
||||||
|
self.v = self.v+0.4
|
||||||
|
end
|
||||||
|
if ctrl.down then
|
||||||
|
self.v = self.v-0.4
|
||||||
|
end
|
||||||
|
if ctrl.left then
|
||||||
|
self.object:setyaw(self.object:getyaw()+math.pi/120+dtime*math.pi/120)
|
||||||
|
--self.object:set_animation({x=5, y=5}, 1, 0)
|
||||||
|
end
|
||||||
|
if ctrl.right then
|
||||||
|
self.object:setyaw(self.object:getyaw()-math.pi/120-dtime*math.pi/120)
|
||||||
|
--self.object:set_animation({x=15, y=15}, 1, 0)
|
||||||
|
end
|
||||||
|
if ctrl.jump then
|
||||||
|
self.z = self.z+0.15
|
||||||
|
end
|
||||||
|
if ctrl.sneak then
|
||||||
|
self.z = self.z-0.15
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local z = get_sign(self.z)
|
||||||
|
self.z = self.z - 0.02*z
|
||||||
|
if z ~= get_sign(self.z) then
|
||||||
|
self.object:setvelocity({x=0,y=0,z=0})
|
||||||
|
self.z = 0
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if math.abs(self.z) > 4.5 then
|
||||||
|
self.z = 4.5*get_sign(self.z)
|
||||||
|
end
|
||||||
|
|
||||||
|
local s = get_sign(self.v)
|
||||||
|
self.v = self.v - 0.02*s
|
||||||
|
if s ~= get_sign(self.v) then
|
||||||
|
self.object:setvelocity({x=0, y=0, z=0})
|
||||||
|
self.v = 0
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if math.abs(self.v) > 6 then
|
||||||
|
self.v = 6*get_sign(self.v)
|
||||||
|
end
|
||||||
|
|
||||||
|
self.object:setacceleration({x=0, y=0, z=0})
|
||||||
|
if math.abs(self.object:getvelocity().y) < 0.01 then
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
pos.y = math.floor(pos.y)+0
|
||||||
|
self.object:setpos(pos)
|
||||||
|
self.object:setvelocity(get_velocity(self.v, self.object:getyaw(), self.z))
|
||||||
|
else
|
||||||
|
self.object:setvelocity(get_velocity(self.v, self.object:getyaw(), self.z))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_entity("technology:hunter", hunter)
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craftitem("technology:hunter", {
|
||||||
|
description = "hunter flying",
|
||||||
|
inventory_image = "hunter_inv.png",
|
||||||
|
wield_image = "hunter_inv.png",
|
||||||
|
wield_scale = {x=2, y=2, z=1},
|
||||||
|
liquids_pointable = true,
|
||||||
|
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
print("hunter added !!!")
|
||||||
|
pointed_thing.under.y = pointed_thing.under.y+2
|
||||||
|
minetest.env:add_entity(pointed_thing.under, "technology:hunter")
|
||||||
|
itemstack:take_item()
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
279
characters
Executable file
@ -0,0 +1,279 @@
|
|||||||
|
A
|
||||||
|
_a_
|
||||||
|
4
|
||||||
|
B
|
||||||
|
_b_
|
||||||
|
4
|
||||||
|
C
|
||||||
|
_c_
|
||||||
|
3
|
||||||
|
D
|
||||||
|
_d_
|
||||||
|
4
|
||||||
|
E
|
||||||
|
_e_
|
||||||
|
3
|
||||||
|
F
|
||||||
|
_f_
|
||||||
|
3
|
||||||
|
G
|
||||||
|
_g_
|
||||||
|
4
|
||||||
|
H
|
||||||
|
_h_
|
||||||
|
4
|
||||||
|
I
|
||||||
|
_i_
|
||||||
|
3
|
||||||
|
J
|
||||||
|
_j_
|
||||||
|
4
|
||||||
|
K
|
||||||
|
_k_
|
||||||
|
4
|
||||||
|
L
|
||||||
|
_l_
|
||||||
|
3
|
||||||
|
M
|
||||||
|
_m_
|
||||||
|
5
|
||||||
|
N
|
||||||
|
_n_
|
||||||
|
4
|
||||||
|
O
|
||||||
|
_o_
|
||||||
|
4
|
||||||
|
P
|
||||||
|
_p_
|
||||||
|
4
|
||||||
|
Q
|
||||||
|
_q_
|
||||||
|
4
|
||||||
|
R
|
||||||
|
_r_
|
||||||
|
4
|
||||||
|
S
|
||||||
|
_s_
|
||||||
|
4
|
||||||
|
T
|
||||||
|
_t_
|
||||||
|
3
|
||||||
|
U
|
||||||
|
_u_
|
||||||
|
4
|
||||||
|
V
|
||||||
|
_v_
|
||||||
|
4
|
||||||
|
W
|
||||||
|
_w_
|
||||||
|
5
|
||||||
|
X
|
||||||
|
_x_
|
||||||
|
4
|
||||||
|
Y
|
||||||
|
_y_
|
||||||
|
4
|
||||||
|
Z
|
||||||
|
_z_
|
||||||
|
3
|
||||||
|
a
|
||||||
|
_a
|
||||||
|
4
|
||||||
|
b
|
||||||
|
_b
|
||||||
|
4
|
||||||
|
c
|
||||||
|
_c
|
||||||
|
3
|
||||||
|
d
|
||||||
|
_d
|
||||||
|
4
|
||||||
|
e
|
||||||
|
_e
|
||||||
|
4
|
||||||
|
f
|
||||||
|
_f
|
||||||
|
3
|
||||||
|
g
|
||||||
|
_g
|
||||||
|
4
|
||||||
|
h
|
||||||
|
_h
|
||||||
|
4
|
||||||
|
i
|
||||||
|
_i
|
||||||
|
1
|
||||||
|
j
|
||||||
|
_j
|
||||||
|
2
|
||||||
|
k
|
||||||
|
_k
|
||||||
|
4
|
||||||
|
l
|
||||||
|
_l
|
||||||
|
1
|
||||||
|
m
|
||||||
|
_m
|
||||||
|
5
|
||||||
|
n
|
||||||
|
_n
|
||||||
|
4
|
||||||
|
o
|
||||||
|
_o
|
||||||
|
4
|
||||||
|
p
|
||||||
|
_p
|
||||||
|
4
|
||||||
|
q
|
||||||
|
_q
|
||||||
|
4
|
||||||
|
r
|
||||||
|
_r
|
||||||
|
3
|
||||||
|
s
|
||||||
|
_s
|
||||||
|
4
|
||||||
|
t
|
||||||
|
_t
|
||||||
|
3
|
||||||
|
u
|
||||||
|
_u
|
||||||
|
4
|
||||||
|
v
|
||||||
|
_v
|
||||||
|
4
|
||||||
|
w
|
||||||
|
_w
|
||||||
|
5
|
||||||
|
x
|
||||||
|
_x
|
||||||
|
3
|
||||||
|
y
|
||||||
|
_y
|
||||||
|
4
|
||||||
|
z
|
||||||
|
_z
|
||||||
|
4
|
||||||
|
|
||||||
|
_sp
|
||||||
|
2
|
||||||
|
0
|
||||||
|
_0
|
||||||
|
4
|
||||||
|
1
|
||||||
|
_1
|
||||||
|
2
|
||||||
|
2
|
||||||
|
_2
|
||||||
|
4
|
||||||
|
3
|
||||||
|
_3
|
||||||
|
4
|
||||||
|
4
|
||||||
|
_4
|
||||||
|
4
|
||||||
|
5
|
||||||
|
_5
|
||||||
|
4
|
||||||
|
6
|
||||||
|
_6
|
||||||
|
4
|
||||||
|
7
|
||||||
|
_7
|
||||||
|
4
|
||||||
|
8
|
||||||
|
_8
|
||||||
|
4
|
||||||
|
9
|
||||||
|
_9
|
||||||
|
4
|
||||||
|
(
|
||||||
|
_bl
|
||||||
|
2
|
||||||
|
)
|
||||||
|
_br
|
||||||
|
2
|
||||||
|
{
|
||||||
|
_cl
|
||||||
|
3
|
||||||
|
}
|
||||||
|
_cr
|
||||||
|
3
|
||||||
|
[
|
||||||
|
_sl
|
||||||
|
2
|
||||||
|
]
|
||||||
|
_sr
|
||||||
|
2
|
||||||
|
'
|
||||||
|
_ap
|
||||||
|
1
|
||||||
|
!
|
||||||
|
_ex
|
||||||
|
1
|
||||||
|
?
|
||||||
|
_qu
|
||||||
|
4
|
||||||
|
@
|
||||||
|
_at
|
||||||
|
5
|
||||||
|
#
|
||||||
|
_hs
|
||||||
|
5
|
||||||
|
$
|
||||||
|
_dl
|
||||||
|
4
|
||||||
|
%
|
||||||
|
_pr
|
||||||
|
5
|
||||||
|
^
|
||||||
|
_ca
|
||||||
|
3
|
||||||
|
&
|
||||||
|
_am
|
||||||
|
5
|
||||||
|
*
|
||||||
|
_as
|
||||||
|
3
|
||||||
|
_
|
||||||
|
_un
|
||||||
|
3
|
||||||
|
+
|
||||||
|
_ps
|
||||||
|
3
|
||||||
|
-
|
||||||
|
_mn
|
||||||
|
3
|
||||||
|
=
|
||||||
|
_eq
|
||||||
|
3
|
||||||
|
;
|
||||||
|
_sm
|
||||||
|
1
|
||||||
|
,
|
||||||
|
_cm
|
||||||
|
2
|
||||||
|
"
|
||||||
|
_qo
|
||||||
|
3
|
||||||
|
/
|
||||||
|
_dv
|
||||||
|
5
|
||||||
|
~
|
||||||
|
_tl
|
||||||
|
4
|
||||||
|
<
|
||||||
|
_lt
|
||||||
|
3
|
||||||
|
>
|
||||||
|
_gt
|
||||||
|
3
|
||||||
|
\
|
||||||
|
_re
|
||||||
|
5
|
||||||
|
|
|
||||||
|
_vb
|
||||||
|
1
|
||||||
|
.
|
||||||
|
_dt
|
||||||
|
1
|
4
depends.txt
Executable file
@ -0,0 +1,4 @@
|
|||||||
|
default
|
||||||
|
moreores
|
||||||
|
explosion
|
||||||
|
mesecons
|
35
documentation.txt
Executable file
@ -0,0 +1,35 @@
|
|||||||
|
This mod add computers and screen to minetest
|
||||||
|
made by jimy byerley jimy.byerley@gmail.com
|
||||||
|
It is GNU, do it what you want !
|
||||||
|
|
||||||
|
==[ crafting ]==========================================
|
||||||
|
|
||||||
|
plastic : put cotton in furnace
|
||||||
|
|
||||||
|
wire :
|
||||||
|
plastic steel ingot
|
||||||
|
|
||||||
|
button :
|
||||||
|
plastic
|
||||||
|
steel ingot
|
||||||
|
steel ingot
|
||||||
|
|
||||||
|
electronic card :
|
||||||
|
steel_ingot
|
||||||
|
plastic
|
||||||
|
|
||||||
|
modern screen :
|
||||||
|
plastic
|
||||||
|
plastic electronic card glass
|
||||||
|
plastic
|
||||||
|
|
||||||
|
keyboard :
|
||||||
|
button button button
|
||||||
|
button button button
|
||||||
|
button button button
|
||||||
|
|
||||||
|
laptop :
|
||||||
|
modern screen
|
||||||
|
electronic card
|
||||||
|
keyboard
|
||||||
|
|
222
electric_nodes.lua
Executable file
@ -0,0 +1,222 @@
|
|||||||
|
|
||||||
|
-- crafting
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:wire 10',
|
||||||
|
recipe = {
|
||||||
|
{'technology:plastic', 'moreores:copper_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:resistor 2',
|
||||||
|
recipe = {
|
||||||
|
{'mesecons:mesecon', 'moreores:copper_lump', 'mesecons:mesecon'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:12V_battery',
|
||||||
|
recipe = {
|
||||||
|
{'technology:plastic', 'technology:plastic', 'technology:plastic'},
|
||||||
|
{'moreores:copper_ingot', '', 'moreores:copper_ingot'},
|
||||||
|
{'technology:plastic', 'technology:plastic', 'technology:plastic'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:electronic_card',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot'},
|
||||||
|
{'technology:plastic'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:button 4',
|
||||||
|
recipe = {
|
||||||
|
{'technology:plastic'},
|
||||||
|
{'default:steel_ingot'},
|
||||||
|
{'default:steel_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:switch_off 2',
|
||||||
|
recipe = {
|
||||||
|
{'', 'moreores:copper_ingot', ''},
|
||||||
|
{'', '', ''},
|
||||||
|
{'mesecons:mesecon', '', 'mesecons:mesecon'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:lamp_small 5',
|
||||||
|
recipe = {
|
||||||
|
{'glass:bottle_empty'},
|
||||||
|
{'default:steel_ingot'},
|
||||||
|
{'moreores:copper_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:lamp_box 2',
|
||||||
|
recipe = {
|
||||||
|
{'default:glass', 'default:glass'},
|
||||||
|
{'default:steel_ingot', 'default:steel_ingot'},
|
||||||
|
{'moreores:copper_ingot', 'moreores:copper_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:battery',
|
||||||
|
recipe = {
|
||||||
|
{'technology:plastic', 'technology:plastic', 'technology:plastic'},
|
||||||
|
{'default:steel_ingot', 'moreores:copper_ingot', 'moreores:copper_ingot'},
|
||||||
|
{'technology:plastic', 'technology:plastic', 'technology:plastic'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
-- nodes defs
|
||||||
|
|
||||||
|
minetest.register_alias("technology:wire", "mesecons:mesecon")
|
||||||
|
|
||||||
|
minetest.register_node("technology:resistor", {
|
||||||
|
description = "Electric resistor",
|
||||||
|
inventory_image = "resistor_item.png",
|
||||||
|
wield_image = "resistor_item.png",
|
||||||
|
paramtype = "light",
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{0.05, -0.45, -1.1, 0.1, -0.4, 1.1},
|
||||||
|
{-0.1, -0.45, -1.1, -0.05, -0.4, 1.1},
|
||||||
|
{0.025, -0.5, -0.2, 0.125, -0.35, 0.2},
|
||||||
|
{-0.125, -0.5, -0.2, -0.025, -0.35, 0.2},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.125, -0.5, -0.2, 0.125, -0.35, 0.2},
|
||||||
|
}},
|
||||||
|
tiles = {"wire_top.png", "wire_top.png", "wire_side.png", "wire_side.png", "wire_side.png", "wire_side.png"},
|
||||||
|
--tiles = {"resistor_top.png", "resistor_top.png", "resistor_side.png", "resistor_side.png", "resistor_side.png", "resistor_side.png"},
|
||||||
|
walkable = false,
|
||||||
|
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,pinch=1,conductor=1},
|
||||||
|
electric = {conduction = 0.6},
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("technology:12V_battery", {
|
||||||
|
description = "Electric Battery 12V",
|
||||||
|
inventory_image = "battery_top.png",
|
||||||
|
wield_image = "battery_top.png",
|
||||||
|
stack_max = 20,
|
||||||
|
paramtype = "light",
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{0.05, -0.45, -1.1, 0.1, -0.4, 0},
|
||||||
|
{-0.1, -0.45, -1.1, -0.05, -0.4, 0},
|
||||||
|
{-0.4, -0.5, -0.5, 0.4, -0.1, 0.05},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{0.05, -0.45, -1.1, 0.1, -0.4, 0},
|
||||||
|
{-0.1, -0.45, -1.1, -0.05, -0.4, 0},
|
||||||
|
{-0.4, -0.5, -0.5, 0.4, -0.1, 0.05},
|
||||||
|
}},
|
||||||
|
tiles = {"battery_top.png", "battery_top.png", "battery_side.png", "battery_side.png", "battery_side.png", "battery_back.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,pinch=1,generator=1},
|
||||||
|
electric = {generated = 12.5},
|
||||||
|
on_construct = function(pos)
|
||||||
|
local meta = minetest.env:get_meta(pos)
|
||||||
|
meta:set_string("infotext", "\"12.5V DC BATTERY\"")
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:lamp_small", {
|
||||||
|
description = "Electric lamp small",
|
||||||
|
drawtype = "torchlike",
|
||||||
|
tiles = {"lamp_small_floor.png", "lamp_small_ceiling.png", "lamp_small.png"},
|
||||||
|
inventory_image = "lamp_small_only.png",
|
||||||
|
wield_image = "lamp_small_only.png",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "wallmounted",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
walkable = false,
|
||||||
|
--light_source = LIGHT_MAX-1,
|
||||||
|
selection_box = {
|
||||||
|
type = "wallmounted",
|
||||||
|
wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
|
||||||
|
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||||
|
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
|
||||||
|
},
|
||||||
|
legacy_wallmounted = true,
|
||||||
|
groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1,electric=1},
|
||||||
|
electric = {
|
||||||
|
action = function(pos, energy)
|
||||||
|
if energy < 10 then
|
||||||
|
return
|
||||||
|
elseif energy > 80 then
|
||||||
|
minetest.env:set_node(pos, {name="fire:basic_flame"})
|
||||||
|
else
|
||||||
|
local node = minetest.env:get_node(pos)
|
||||||
|
node.name = "technology:lamp_small_on"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:lamp_small_on", {
|
||||||
|
description = "Electric lamp small",
|
||||||
|
drawtype = "torchlike",
|
||||||
|
tiles = {"lamp_small_on_floor.png", "lamp_small_on_ceiling.png", "lamp_small_on.png"},
|
||||||
|
inventory_image = "lamp_small_only.png",
|
||||||
|
wield_image = "lamp_small_only.png",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "wallmounted",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
walkable = false,
|
||||||
|
light_source = 10,
|
||||||
|
selection_box = {
|
||||||
|
type = "wallmounted",
|
||||||
|
wall_top = {-0.1, 0.5-0.6, -0.1, 0.1, 0.5, 0.1},
|
||||||
|
wall_bottom = {-0.1, -0.5, -0.1, 0.1, -0.5+0.6, 0.1},
|
||||||
|
wall_side = {-0.5, -0.3, -0.1, -0.5+0.3, 0.3, 0.1},
|
||||||
|
},
|
||||||
|
legacy_wallmounted = true,
|
||||||
|
drop = "technology:lamp_small",
|
||||||
|
groups = {choppy=2,dig_immediate=3,flammable=1,attached_node=1,electric=1},
|
||||||
|
electric = {
|
||||||
|
action = function(pos, energy)
|
||||||
|
if energy < 10 then
|
||||||
|
local node = minetest.env:get_node(pos)
|
||||||
|
node.name = "technology:lamp_small"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
elseif energy > 80 then
|
||||||
|
minetest.env:set_node(pos, {name="fire:basic_flame"})
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("technology:lamp_box", "mesecons_lamp:mesecon_lamp_off")
|
||||||
|
|
||||||
|
minetest.register_alias("technology:lamp_box_on", "mesecons_lamp:mesecon_lamp_on")
|
||||||
|
|
||||||
|
minetest.register_craftitem("technology:button", {
|
||||||
|
description = "electric button",
|
||||||
|
inventory_image = "button_item.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("technology:switch_off", "mesecons_walllever:wall_lever_off")
|
||||||
|
|
||||||
|
minetest.register_alias("technology:switch_on", "mesecons_walllever:wall_lever_on")
|
||||||
|
|
||||||
|
minetest.register_craftitem("technology:electronic_card", {
|
||||||
|
description = "electronic card with micro-processor",
|
||||||
|
inventory_image = "electronic_card_item.png",
|
||||||
|
})
|
||||||
|
|
29
init.lua
Executable file
@ -0,0 +1,29 @@
|
|||||||
|
|
||||||
|
technology ={}
|
||||||
|
|
||||||
|
-- crafting
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = "technology:plastic",
|
||||||
|
recipe = "farming:string",
|
||||||
|
})
|
||||||
|
|
||||||
|
--node defs
|
||||||
|
|
||||||
|
minetest.register_craftitem("technology:plastic", {
|
||||||
|
description = "plastic",
|
||||||
|
inventory_image = "plastic_item.png",
|
||||||
|
})
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("technology").."/tools.lua")
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("technology").."/structures.lua")
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("technology").."/electric_nodes.lua")
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("technology").."/aircraft.lua")
|
||||||
|
|
||||||
|
dofile(minetest.get_modpath("technology").."/screen.lua")
|
||||||
|
|
||||||
|
|
BIN
models/chasseur.blend
Executable file
BIN
models/chasseur.blend1
Executable file
BIN
models/chasseur.blend2
Executable file
3576
models/chasseur.x
Executable file
6922
models/hunter.x
Executable file
BIN
models/patrouilleur-closed.blend1
Executable file
BIN
models/patrouilleur-closed.blend2
Executable file
BIN
models/patrouilleur-opened.blend1
Executable file
BIN
models/patrouilleur.blend
Executable file
BIN
models/patrouilleur.blend1
Executable file
BIN
models/patrouilleur.blend2
Executable file
6834
models/patrouilleur.x
Executable file
BIN
models/patrouilleur_close.blend
Executable file
2993
models/patrouilleur_close.x
Executable file
BIN
models/patrouilleur_open.blend
Executable file
BIN
models/patrouilleur_open.blend1
Executable file
BIN
models/patrouilleur_open.blend2
Executable file
5530
models/patrouilleur_open.x
Executable file
195
screen.lua
Executable file
@ -0,0 +1,195 @@
|
|||||||
|
|
||||||
|
-- crafting
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "technology:flat_screen_off",
|
||||||
|
recipe = {
|
||||||
|
{"technology:plastic", "", ""},
|
||||||
|
{"technology:plastic", "technology:electronic_card", "default:glass"},
|
||||||
|
{"technology:plastic", "", ""},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
--node defs
|
||||||
|
|
||||||
|
minetest.register_node("technology:flat_screen_off", {
|
||||||
|
description = "modern screen",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
tiles = {"screen_flat_top.png", "screen_flat_bottom.png", "screen_flat_left.png",
|
||||||
|
"screen_flat_right.png", "screen_flat_back.png", "screen_flat_front_off.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {choppy=2, dig_immediate=2},
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
local node = minetest.env:get_node(pos)
|
||||||
|
node.name = "technology:flat_screen_smalltext"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
drop = 'technology:flat_screen_off',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:flat_screen_smalltext", {
|
||||||
|
description = "modern screen",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 3,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
tiles = {"screen_flat_top.png", "screen_flat_bottom.png", "screen_flat_left.png",
|
||||||
|
"screen_flat_right.png", "screen_flat_back.png", "screen_flat_front_smalltext.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {choppy=2, dig_immediate=2},
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "technology:flat_screen_off"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
drop = 'technology:flat_screen_off',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:flat_screen_bigtext", {
|
||||||
|
description = "modern screen",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 5,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
tiles = {"screen_flat_top.png", "screen_flat_bottom.png", "screen_flat_left.png",
|
||||||
|
"screen_flat_right.png", "screen_flat_back.png", "screen_flat_front_bigtext.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {choppy=2, dig_immediate=2},
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "technology:flat_screen_off"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
drop = 'technology:flat_screen_off',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:flat_screen_2columns", {
|
||||||
|
description = "modern screen",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 4,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
tiles = {"screen_flat_top.png", "screen_flat_bottom.png", "screen_flat_left.png",
|
||||||
|
"screen_flat_right.png", "screen_flat_back.png", "screen_flat_front_2columns.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {choppy=2, dig_immediate=2},
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "technology:flat_screen_off"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
drop = 'technology:flat_screen_off',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:flat_screen_map", {
|
||||||
|
description = "modern screen",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 6,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
tiles = {"screen_flat_top.png", "screen_flat_bottom.png", "screen_flat_left.png",
|
||||||
|
"screen_flat_right.png", "screen_flat_back.png", "screen_flat_front_map.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {choppy=2, dig_immediate=2},
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "technology:flat_screen_off"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
drop = 'technology:flat_screen_off',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:flat_screen_screensaver", {
|
||||||
|
description = "modern screen",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 4,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.45, -0.4, 0.3, 0.45, 0.3, 0.25},
|
||||||
|
{-0.35, -0.35, 0.3, 0.35, 0.25, 0.4},
|
||||||
|
}},
|
||||||
|
tiles = {"screen_flat_top.png", "screen_flat_bottom.png", "screen_flat_left.png",
|
||||||
|
"screen_flat_right.png", "screen_flat_back.png", "screen_flat_front_cybertronic.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {choppy=2, dig_immediate=2},
|
||||||
|
on_punch = function(pos, node, puncher)
|
||||||
|
node.name = "technology:flat_screen_off"
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
drop = 'technology:flat_screen_off',
|
||||||
|
})
|
||||||
|
|
||||||
|
local screens = {"technology:flat_screen_smalltext",
|
||||||
|
"technology:flat_screen_bigtext", "technology:flat_screen_2columns", "technology:flat_screen_map",
|
||||||
|
"technology:flat_screen_screensaver"}
|
||||||
|
|
||||||
|
minetest.register_abm({
|
||||||
|
nodenames = screens,
|
||||||
|
interval = 1,
|
||||||
|
chance = 2,
|
||||||
|
action = function(pos, node, _, _)
|
||||||
|
if math.random(1,2) == 1 then return end
|
||||||
|
local newname = screens[math.random(1,5)]
|
||||||
|
local node = minetest.env:get_node(pos)
|
||||||
|
node.name = newname
|
||||||
|
minetest.env:set_node(pos, node)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("technology:flat_screen", "technology:flat_screen_off")
|
||||||
|
|
BIN
sounds/cps-vflSymP2Q.swf
Executable file
BIN
sounds/jackhammer_sound.ogg
Executable file
BIN
sounds/metal_footstep.1.ogg
Executable file
BIN
sounds/metal_footstep.2.ogg
Executable file
BIN
sounds/metal_footstep.3.ogg
Executable file
BIN
sounds/metal_footstep.4.ogg
Executable file
406
structures.lua
Executable file
@ -0,0 +1,406 @@
|
|||||||
|
--[[
|
||||||
|
including : concrete, steel armature, grid, bridge, support, flat
|
||||||
|
]]
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:concrete',
|
||||||
|
type = "shapeless",
|
||||||
|
recipe = {"group:sand", "default:gravel", "bucket:bucket_water"},
|
||||||
|
replacements = {{"bucket:bucket_water", "bucket:bucket_empty"}}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:armature_h 5',
|
||||||
|
recipe = {
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
{'', 'moreores:bronze_ingot', ''},
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:armature_v 5',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
|
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||||
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:armature_v',
|
||||||
|
recipe = {
|
||||||
|
{'technology:armature_h'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:armature_h',
|
||||||
|
recipe = {
|
||||||
|
{'technology:armature_v'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = 'moreores:bronze_ingot 7',
|
||||||
|
recipe = 'technology:armature_v',
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "cooking",
|
||||||
|
output = 'moreores:bronze_ingot 7',
|
||||||
|
recipe = 'technology:armature_h',
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("technology:concrete", {
|
||||||
|
description = "Concrete block",
|
||||||
|
tiles = {"structures_concrete.png"},
|
||||||
|
is_ground_content = true,
|
||||||
|
groups = {cracky=3, stone=2},
|
||||||
|
sounds = default.node_sound_stone_defaults(),
|
||||||
|
})
|
||||||
|
|
||||||
|
local metal_punch = function(pos, puncher)
|
||||||
|
local table = {
|
||||||
|
name = "metal_footstep",
|
||||||
|
gain = 1.0,
|
||||||
|
max_hear_distance = 200,
|
||||||
|
loop = false,
|
||||||
|
pos = pos
|
||||||
|
}
|
||||||
|
minetest.sound_play(table.name, table)
|
||||||
|
end
|
||||||
|
|
||||||
|
local metal_footstep = {
|
||||||
|
footstep = {name="metal_footstep", gain=0.8},
|
||||||
|
dug = {name="", gain = 0.8},
|
||||||
|
}
|
||||||
|
|
||||||
|
minetest.register_node("technology:armature_h", {
|
||||||
|
description = "Steel armature horizontal",
|
||||||
|
inventory_image = "steel_armature_h_side.png",
|
||||||
|
wield_image = "steel_armature_h_side.png",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.4, 0.5},
|
||||||
|
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.5, -0.4, -0.2, 0.5, 0.4, 0.2},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_h_side.png", "steel_armature_h_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:armature_v", {
|
||||||
|
description = "Steel armature vertical",
|
||||||
|
inventory_image = "steel_armature_v_side.png",
|
||||||
|
wield_image = "steel_armature_v_side.png",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, -0.4, 0.5, 0.5},
|
||||||
|
{0.4, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
{-0.4, -0.5, -0.2, 0.4, 0.5, 0.2},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_top.png", "steel_armature_v_side.png", "steel_armature_v_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:grid_v", {
|
||||||
|
description = "Bronze grid vertical",
|
||||||
|
inventory_image = "bronze_grid_front.png",
|
||||||
|
wield_image = "bronze_grid_front.png",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 3,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, 0.3, 0.5, 0.5, 0.4}
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, 0.3, 0.5, 0.5, 0.4}
|
||||||
|
}},
|
||||||
|
tiles = {"bronze_grid_side.png", "bronze_grid_side.png", "bronze_grid_side.png", "bronze_grid_side.png", "bronze_grid_front.png", "steel_grid_front.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffy=2},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:grid_h", {
|
||||||
|
description = "Bronze grid horizontal",
|
||||||
|
inventory_image = "bronze_grid_front.png",
|
||||||
|
wield_image = "bronze_grid_front.png",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
light_source = 3,
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5}
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0.4, -0.5, 0.5, 0.5, 0.5}
|
||||||
|
}},
|
||||||
|
tiles = {"bronze_grid_side.png", "bronze_grid_front.png", "bronze_grid_side.png", "bronze_grid_front.png", "bronze_grid_side.png", "steel_grid_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffy=2},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:grid_v 10',
|
||||||
|
recipe = {
|
||||||
|
{'', 'moreores:bronze_ingot', ''},
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
{'', 'moreores:bronze_ingot', ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:grid_v',
|
||||||
|
recipe = {{'technology:grid_h'}},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'gird:grid_h',
|
||||||
|
recipe = {{'technology:grid_v'}},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:floor 2',
|
||||||
|
recipe = {
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:edge 10',
|
||||||
|
recipe = {
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:edge',
|
||||||
|
recipe = {
|
||||||
|
{'technology:edge_angle'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:edge_angle',
|
||||||
|
recipe = {
|
||||||
|
{'technology:edge'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:triangle 4',
|
||||||
|
recipe = {
|
||||||
|
{'moreores:bronze_ingot', 'moreores:bronze_ingot'},
|
||||||
|
{'', 'moreores:bronze_ingot'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:floor", {
|
||||||
|
description = "Bridge floor",
|
||||||
|
inventory_image = "floor_top.png",
|
||||||
|
wield_image = "floor_top.png",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0.4, -0.5, 0.5, 0.42, 0.5},
|
||||||
|
{-0.3, 0.3, -0.5, -0.2, 0.4, 0.5},
|
||||||
|
{0.2, 0.3, -0.5, 0.3, 0.4, 0.5},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"floor_top.png", "floor_bottom.png", "floor_side.png", "floor_side.png", "floor_side.png", "floor_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_node("technology:stairs", {
|
||||||
|
description = "Bridge stairs",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, -0.38, 0},
|
||||||
|
{-0.5, -0.1, 0, 0.5, 0.02, 0.5},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"floor_top.png", "floor_bottom.png", "floor_side.png", "floor_side.png", "floor_side.png", "floor_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:edge", {
|
||||||
|
description = "Bridge edge",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0.2, -0.5, 0.5, 0.3, -0.4},
|
||||||
|
{-0.3, -0.6, -0.5, -0.2, 0.2, -0.4},
|
||||||
|
{0.2, -0.6, -0.5, 0.3, 0.2, -0.4},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.3},
|
||||||
|
}},
|
||||||
|
tiles = {"edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:edge_angle", {
|
||||||
|
description = "Bridge edge",
|
||||||
|
stack_max = 20,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, 0.2, -0.5, 0.5, 0.3, -0.4},
|
||||||
|
{-0.3, -0.6, -0.5, -0.2, 0.2, -0.4},
|
||||||
|
{0.2, -0.6, -0.5, 0.3, 0.2, -0.4},
|
||||||
|
|
||||||
|
{-0.5, 0.2, -0.5, -0.4, 0.3, 0.5},
|
||||||
|
{-0.5, -0.6, -0.3, -0.4, 0.2, -0.2},
|
||||||
|
{-0.5, -0.6, 0.2, -0.4, 0.2, 0.3},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0.5, -0.3},
|
||||||
|
}},
|
||||||
|
tiles = {"edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png", "edge_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
drop = "technology:edge",
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:triangle", {
|
||||||
|
description = "Bridge triangle",
|
||||||
|
inventory_image = "triangle_right.png",
|
||||||
|
wield_image = "triangle_right.png",
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.01, 0.5, -0.5, 0.01, 1.5, 0.5},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.01, 0.5, -0.5, 0.01, 1.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"triangle_side.png", "triangle_side.png", "triangle_right.png", "triangle_left.png", "triangle_side.png", "triangle_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:ladder", {
|
||||||
|
description = "bronze ladder",
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.3, -0.5, 0.4, -0.2, 0.5, 0.5},
|
||||||
|
{ 0.3, -0.5, 0.4, 0.2, 0.5, 0.5},
|
||||||
|
|
||||||
|
{ -0.2, -0.36, 0.42, 0.2, -0.3, 0.48},
|
||||||
|
{ -0.2, 0.36, 0.42, 0.2, 0.3, 0.48},
|
||||||
|
{ -0.2, -0.03, 0.42, 0.2, 0.03, 0.48},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.3, -0.5, 0.4, 0.3, 0.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png"},
|
||||||
|
walkable = true,
|
||||||
|
climbable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:ladder_closed", {
|
||||||
|
description = "bronze ladder closed",
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
-- barre verticales latérales
|
||||||
|
{-0.3, -0.5, 0.4, -0.2, 0.5, 0.5},
|
||||||
|
{ 0.3, -0.5, 0.4, 0.2, 0.5, 0.5},
|
||||||
|
-- barres horizontales
|
||||||
|
{ -0.2, -0.36, 0.42, 0.2, -0.3, 0.48},
|
||||||
|
{ -0.2, 0.36, 0.42, 0.2, 0.3, 0.48},
|
||||||
|
{ -0.2, -0.03, 0.42, 0.2, 0.03, 0.48},
|
||||||
|
-- garde-corps lateraux
|
||||||
|
{-0.45, -0.5, -0.35, -0.4, -0.4, 0.5},
|
||||||
|
{ 0.4, -0.5, -0.35, 0.45, -0.4, 0.5},
|
||||||
|
{-0.4, -0.5, -0.3, 0.4, -0.4, -0.35},
|
||||||
|
-- tige entre garde corps
|
||||||
|
{-0.05, -0.5, -0.35, 0.05, 0.5, -0.3},
|
||||||
|
{-0.45, -0.5, -0.1, -0.4, 0.5, -0.15},
|
||||||
|
{ 0.45, -0.5, -0.1, 0.4, 0.5, -0.15},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
}},
|
||||||
|
tiles = {"technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png", "technology_ladder.png"},
|
||||||
|
walkable = true,
|
||||||
|
climbable = true,
|
||||||
|
groups = {paffly=2, mecanic=1},
|
||||||
|
on_punch = metal_punch,
|
||||||
|
sounds = metal_footstep,
|
||||||
|
})
|
||||||
|
|
BIN
textures/battery_back.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/battery_side.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/battery_top.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/bronze_ingot.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/bronze_lump.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/button_item.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/edge_side.png
Executable file
After Width: | Height: | Size: 170 B |
BIN
textures/electronic_card_item.png
Executable file
After Width: | Height: | Size: 4.1 KiB |
BIN
textures/floor_bottom.png
Executable file
After Width: | Height: | Size: 889 B |
BIN
textures/floor_side.png
Executable file
After Width: | Height: | Size: 889 B |
BIN
textures/floor_top.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/hydro_generator_front.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
textures/jackhammer.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/jackhammer_side.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/jackhammer_top.png
Executable file
After Width: | Height: | Size: 889 B |
BIN
textures/lamp_box.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/lamp_box_on.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/lamp_small.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/lamp_small_ceiling.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/lamp_small_floor.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/lamp_small_on.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/lamp_small_on_ceiling.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/lamp_small_on_floor.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/lamp_small_only.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/patrouilleur.png
Executable file
After Width: | Height: | Size: 4.0 MiB |
BIN
textures/plastic_item.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/resistor_item.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/resistor_side.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/resistor_top.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/screen_flat_back.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/screen_flat_bottom.png
Executable file
After Width: | Height: | Size: 886 B |
BIN
textures/screen_flat_front_2columns.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/screen_flat_front_bigtext.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/screen_flat_front_cybertronic.png
Executable file
After Width: | Height: | Size: 1.0 KiB |
BIN
textures/screen_flat_front_map.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/screen_flat_front_off.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/screen_flat_front_smalltext.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/screen_flat_left.png
Executable file
After Width: | Height: | Size: 886 B |
BIN
textures/screen_flat_right.png
Executable file
After Width: | Height: | Size: 886 B |
BIN
textures/screen_flat_top.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
textures/steel_armature_h_side.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/steel_armature_top.png
Executable file
After Width: | Height: | Size: 889 B |
BIN
textures/steel_armature_v_side.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/steel_wrench.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/structure_armature_h_wielded.png
Executable file
After Width: | Height: | Size: 230 B |
BIN
textures/structures_concrete.png
Executable file
After Width: | Height: | Size: 886 B |
BIN
textures/switch_side.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/switch_top_off.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/switch_top_on.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/technology_ladder.png
Executable file
After Width: | Height: | Size: 494 B |
BIN
textures/triangle_left.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/triangle_right.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/triangle_side.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/wire_item.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/wire_side.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
textures/wire_top.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
BIN
textures/wire_top_wall.png
Executable file
After Width: | Height: | Size: 2.4 KiB |
79
tools.lua
Executable file
@ -0,0 +1,79 @@
|
|||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:wrench',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("technology:wrench", {
|
||||||
|
description = "Wrench",
|
||||||
|
inventory_image = "steel_wrench.png",
|
||||||
|
tool_capabilities = {
|
||||||
|
max_drop_level=1,
|
||||||
|
groupcaps={
|
||||||
|
mecanic={times={[1]=1.00, [2]=2.60, [3]=4.00}, uses=0, maxlevel=3},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'technology:jackhammer',
|
||||||
|
recipe = {
|
||||||
|
{'', '', 'technology:plastic'},
|
||||||
|
{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'},
|
||||||
|
{'', '', 'technology:plastic'},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_tool("technology:jackhammer", {
|
||||||
|
description = "Jackhammer",
|
||||||
|
inventory_image = "jackhammer.png",
|
||||||
|
tool_capabilities = {
|
||||||
|
max_drop_level=1,
|
||||||
|
groupcaps={
|
||||||
|
cracky={times={[1]=4.00, [2]=1.60, [3]=1.00}, uses=160, maxlevel=2}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node("technology:jackhammer", {
|
||||||
|
description = "Jackhammer",
|
||||||
|
inventory_image = "jackhammer.png",
|
||||||
|
wield_image = "jackhammer.png",
|
||||||
|
stack_max = 1,
|
||||||
|
node_placement_prediction = "",
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
drawtype = "nodebox",
|
||||||
|
node_box = {type = "fixed", fixed = {
|
||||||
|
{-0.2, -0.0, -0.2, 0.2, 0.5, 0.2},
|
||||||
|
{-0.08, -0.7, -0.05, 0.08, -0.0, 0.05},
|
||||||
|
}},
|
||||||
|
selection_box = {type = "fixed", fixed = {
|
||||||
|
{-0.2, -0.0, -0.2, 0.2, 0.5, 0.2},
|
||||||
|
{-0.08, -0.7, -0.05, 0.08, -0.0, 0.05},
|
||||||
|
}},
|
||||||
|
tiles = {"jackhammer_top.png", "jackhammer_bottom.png", "jackhammer_side.png", "jackhammer_side.png", "jackhammer_side.png", "jackhammer_side.png"},
|
||||||
|
walkable = true,
|
||||||
|
groups = {dig_immediate=3},
|
||||||
|
on_use = function(item, player, pointed_thing)
|
||||||
|
if pointed_thing.under and minetest.env:find_node_near(pointed_thing.under, 1, {"group:cracky"}) then
|
||||||
|
local node = minetest.env:get_node(pointed_thing.under)
|
||||||
|
minetest.env:dig_node(pointed_thing.under)
|
||||||
|
local inventory = player:get_inventory()
|
||||||
|
local nodename = minetest.registered_nodes[node.name].drop or node.name
|
||||||
|
inventory:add_item("main", nodename)
|
||||||
|
end
|
||||||
|
local toplay = {
|
||||||
|
gain = 3.0,
|
||||||
|
pos = pointed_thing.above,
|
||||||
|
max_hear_distance = 600,
|
||||||
|
loop = false,
|
||||||
|
}
|
||||||
|
minetest.sound_play("jackhammer_sound", toplay)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|