2017-11-23 15:51:31 +01:00
|
|
|
minetest.register_node("laptop:core_open", {
|
|
|
|
description = "MineTest Core",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_laptop_core_tp_off.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_laptop_core_rt.png",
|
|
|
|
"laptop_laptop_core_lt.png",
|
|
|
|
"laptop_laptop_core_bk.png",
|
|
|
|
"laptop_laptop_core_ft.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:core_closed",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2, not_in_creative_inventory=1},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
2017-11-24 21:54:13 +01:00
|
|
|
os:resume("laptop:core_open_on")
|
2017-11-23 15:51:31 +01:00
|
|
|
end,
|
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_off()
|
|
|
|
os:set_infotext('MineTest Core')
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
stack_max = 1,
|
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
2017-11-23 15:51:31 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.375, 0.4375}, -- NodeBox1
|
|
|
|
{-0.4375, -0.375, 0.3125, 0.4375, 0.375, 0.4375}, -- NodeBox2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("laptop:core_open_on", {
|
|
|
|
description = "MineTest Core",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_laptop_core_tp.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_laptop_core_rt.png",
|
|
|
|
"laptop_laptop_core_lt.png",
|
|
|
|
"laptop_laptop_core_bk.png",
|
|
|
|
"laptop_laptop_core_ft_on.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:core_closed",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2, not_in_creative_inventory=1},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_off("laptop:core_closed")
|
|
|
|
end,
|
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_on()
|
|
|
|
os:set_infotext('MineTest Core')
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
|
|
|
stack_max = 1,
|
2017-11-23 17:17:59 +01:00
|
|
|
on_receive_fields = function(pos, formname, fields, sender)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:receive_fields(fields, sender)
|
|
|
|
end,
|
2017-11-23 15:51:31 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.375, 0.4375}, -- NodeBox1
|
|
|
|
{-0.4375, -0.375, 0.3125, 0.4375, 0.375, 0.4375}, -- NodeBox2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("laptop:core_closed", {
|
|
|
|
description = "MineTest Core",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_laptop_core_bk_off.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_laptop_core_rt_off.png",
|
|
|
|
"laptop_laptop_core_lt_off.png",
|
|
|
|
"laptop_laptop_core_r_off.png",
|
|
|
|
"laptop_laptop_core_ft_off.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:core_closed",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_off("laptop:core_open")
|
|
|
|
end,
|
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
2017-11-24 22:11:45 +01:00
|
|
|
-- os.custom_launcher = 'stickynote'
|
2017-11-23 15:51:31 +01:00
|
|
|
os:power_off()
|
|
|
|
os:set_infotext('MineTest Core')
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
|
|
|
stack_max = 1,
|
2017-11-23 15:51:31 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.5, -0.4375, 0.4375, -0.375, 0.4375}, -- NodeBox1
|
|
|
|
{-0.4375, -0.375, -0.4375, 0.4375, -0.25, 0.4375}, -- NodeBox2
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
minetest.register_node("laptop:monitor_on", {
|
|
|
|
description = "MT Desktop",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_monitor_core_bt.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_monitor_core_rt.png",
|
|
|
|
"laptop_monitor_core_lt.png",
|
|
|
|
"laptop_monitor_core_bk.png",
|
|
|
|
"laptop_monitor_core_ft_on.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:monitor_off",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2, not_in_creative_inventory=1},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_off("laptop:monitor_off")
|
|
|
|
end,
|
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_on()
|
|
|
|
os:set_infotext('MT Desktop')
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
|
|
|
stack_max = 1,
|
2017-11-23 17:17:59 +01:00
|
|
|
on_receive_fields = function(pos, formname, fields, sender)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:receive_fields(fields, sender)
|
|
|
|
end,
|
2017-11-23 15:51:31 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.5, -0.25, 0.4375, -0.4375, 0.25}, -- NodeBox4
|
|
|
|
{-0.125, -0.4375, -0.0625, 0.125, -0.375, 0.0625}, -- NodeBox7
|
|
|
|
{-0.4375, -0.375, -0.125, 0.4375, 0.375, 0.125}, -- NodeBox8
|
|
|
|
{-0.4375, -0.5, -0.5, 0.25, -0.4375, -0.3125}, -- NodeBox9
|
|
|
|
{0.3125, -0.5, -0.5, 0.4375, -0.4375, -0.3125}, -- NodeBox10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("laptop:monitor_off", {
|
|
|
|
description = "MT Desktop",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_monitor_core_bt.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_monitor_core_rt.png",
|
|
|
|
"laptop_monitor_core_lt.png",
|
|
|
|
"laptop_monitor_core_bk.png",
|
|
|
|
"laptop_monitor_core_ft.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:monitor_off",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_on("laptop:monitor_on")
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
|
|
|
stack_max = 1,
|
2017-11-23 15:51:31 +01:00
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
2017-11-24 23:19:20 +01:00
|
|
|
-- change lauchher background
|
|
|
|
local app = laptop.get_app("launcher", os)
|
2017-11-27 17:09:43 +01:00
|
|
|
app.background_img = "laptop_os_main.png"
|
2017-11-24 23:19:20 +01:00
|
|
|
app:sync_storage()
|
2017-11-23 15:51:31 +01:00
|
|
|
os:power_off()
|
|
|
|
os:set_infotext('MT Desktop')
|
|
|
|
end,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.5, -0.25, 0.4375, -0.4375, 0.25}, -- NodeBox4
|
|
|
|
{-0.125, -0.4375, -0.0625, 0.125, -0.375, 0.0625}, -- NodeBox7
|
|
|
|
{-0.4375, -0.375, -0.125, 0.4375, 0.375, 0.125}, -- NodeBox8
|
|
|
|
{-0.4375, -0.5, -0.5, 0.25, -0.4375, -0.3125}, -- NodeBox9
|
|
|
|
{0.3125, -0.5, -0.5, 0.4375, -0.4375, -0.3125}, -- NodeBox10
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("laptop:monitor2_on", {
|
|
|
|
description = "MT Desktop 2.0",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_monitor2_core_bt.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_monitor_core_rt.png",
|
|
|
|
"laptop_monitor_core_lt.png",
|
|
|
|
"laptop_monitor2_core_bk.png",
|
|
|
|
"laptop_monitor2_core_ft_on.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:monitor2_off",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2, not_in_creative_inventory=1},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_off("laptop:monitor2_off")
|
|
|
|
end,
|
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
2017-11-24 23:19:20 +01:00
|
|
|
local app = laptop.get_app("launcher", os)
|
2017-11-27 17:09:43 +01:00
|
|
|
app.background_img = "laptop_os_main.png"
|
2017-11-24 23:19:20 +01:00
|
|
|
app:sync_storage()
|
2017-11-23 15:51:31 +01:00
|
|
|
os:power_on()
|
|
|
|
os:set_infotext('MT Desktop')
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
|
|
|
stack_max = 1,
|
2017-11-23 17:17:59 +01:00
|
|
|
on_receive_fields = function(pos, formname, fields, sender)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:receive_fields(fields, sender)
|
|
|
|
end,
|
2017-11-23 15:51:31 +01:00
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.3125, 0, 0.4375, 0.375, 0.0625}, -- NodeBox1
|
|
|
|
{-0.4375, -0.3125, -0.0625, 0.4375, -0.25, 0}, -- NodeBox2
|
|
|
|
{-0.4375, -0.25, -0.0625, -0.375, 0.3125, 0}, -- NodeBox3
|
|
|
|
{-0.4375, 0.3125, -0.0625, 0.4375, 0.375, 0}, -- NodeBox4
|
|
|
|
{0.375, -0.25, -0.0625, 0.4375, 0.3125, 0}, -- NodeBox5
|
|
|
|
{-0.125, -0.4375, 0, 0.125, -0.3125, 0.0625}, -- NodeBox6
|
|
|
|
{-0.1875, -0.5, -0.0625, 0.1875, -0.4375, 0.125}, -- NodeBox7
|
|
|
|
{-0.5, -0.5, -0.5, 0.25, -0.4375, -0.1875}, -- NodeBox8
|
|
|
|
{0.3125, -0.5, -0.5, 0.5, -0.4375, -0.1875}, -- NodeBox9
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
minetest.register_node("laptop:monitor2_off", {
|
|
|
|
description = "MT Desktop 2.0",
|
|
|
|
tiles = {
|
2017-11-27 17:09:43 +01:00
|
|
|
"laptop_monitor2_core_bt.png",
|
|
|
|
"laptop_laptop_core_bt.png",
|
|
|
|
"laptop_monitor_core_rt.png",
|
|
|
|
"laptop_monitor_core_lt.png",
|
|
|
|
"laptop_monitor2_core_bk.png",
|
|
|
|
"laptop_monitor2_core_ft.png"
|
2017-11-23 15:51:31 +01:00
|
|
|
},
|
|
|
|
drawtype = "nodebox",
|
|
|
|
paramtype = "light",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
drop = "laptop:monitor2_off",
|
2017-11-23 22:50:51 +01:00
|
|
|
groups = {choppy=2, oddly_breakably_by_hand=2, dig_immediate = 2},
|
2017-11-23 15:51:31 +01:00
|
|
|
on_punch = function (pos, node, puncher)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_on("laptop:monitor2_on")
|
|
|
|
end,
|
2017-11-23 22:50:51 +01:00
|
|
|
after_place_node = laptop.after_place_node,
|
|
|
|
after_dig_node = laptop.after_dig_node,
|
|
|
|
stack_max = 1,
|
2017-11-23 15:51:31 +01:00
|
|
|
on_construct = function(pos)
|
|
|
|
local os = laptop.os_get(pos)
|
|
|
|
os:power_off()
|
|
|
|
os:set_infotext('MT Desktop')
|
|
|
|
end,
|
|
|
|
node_box = {
|
|
|
|
type = "fixed",
|
|
|
|
fixed = {
|
|
|
|
{-0.4375, -0.3125, 0, 0.4375, 0.375, 0.0625}, -- NodeBox1
|
|
|
|
{-0.4375, -0.3125, -0.0625, 0.4375, -0.25, 0}, -- NodeBox2
|
|
|
|
{-0.4375, -0.25, -0.0625, -0.375, 0.3125, 0}, -- NodeBox3
|
|
|
|
{-0.4375, 0.3125, -0.0625, 0.4375, 0.375, 0}, -- NodeBox4
|
|
|
|
{0.375, -0.25, -0.0625, 0.4375, 0.3125, 0}, -- NodeBox5
|
|
|
|
{-0.125, -0.4375, 0, 0.125, -0.3125, 0.0625}, -- NodeBox6
|
|
|
|
{-0.1875, -0.5, -0.0625, 0.1875, -0.4375, 0.125}, -- NodeBox7
|
|
|
|
{-0.5, -0.5, -0.5, 0.25, -0.4375, -0.1875}, -- NodeBox8
|
|
|
|
{0.3125, -0.5, -0.5, 0.5, -0.4375, -0.1875}, -- NodeBox9
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|