diff options
author | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 20:02:19 -0400 |
---|---|---|
committer | Vanessa Ezekowitz <vanessaezekowitz@gmail.com> | 2016-04-01 21:09:33 -0400 |
commit | da66780a569712c23ae4f2996cfb4608a9f9d69d (patch) | |
tree | 217556029a78bc23ad4564720afc86de97228a04 /mesecons/mesecons_solarpanel | |
parent | 615b22df4d423aded3613db7716943a2f389b047 (diff) | |
download | dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.gz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.bz2 dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.tar.xz dreambuilder_modpack-da66780a569712c23ae4f2996cfb4608a9f9d69d.zip |
copy all standard Dreambuilder mods in from the old subgame
(exactly as last supplied there, updates to these mods will follow later)
Diffstat (limited to 'mesecons/mesecons_solarpanel')
-rw-r--r-- | mesecons/mesecons_solarpanel/depends.txt | 2 | ||||
-rw-r--r-- | mesecons/mesecons_solarpanel/doc/solarpanel/description.html | 1 | ||||
-rw-r--r-- | mesecons/mesecons_solarpanel/doc/solarpanel/preview.png | bin | 0 -> 56933 bytes | |||
-rw-r--r-- | mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png | bin | 0 -> 3721 bytes | |||
-rw-r--r-- | mesecons/mesecons_solarpanel/init.lua | 95 | ||||
-rw-r--r-- | mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png | bin | 0 -> 652 bytes |
6 files changed, 98 insertions, 0 deletions
diff --git a/mesecons/mesecons_solarpanel/depends.txt b/mesecons/mesecons_solarpanel/depends.txt new file mode 100644 index 0000000..bc7b062 --- /dev/null +++ b/mesecons/mesecons_solarpanel/depends.txt @@ -0,0 +1,2 @@ +mesecons +mesecons_materials diff --git a/mesecons/mesecons_solarpanel/doc/solarpanel/description.html b/mesecons/mesecons_solarpanel/doc/solarpanel/description.html new file mode 100644 index 0000000..f8e7450 --- /dev/null +++ b/mesecons/mesecons_solarpanel/doc/solarpanel/description.html @@ -0,0 +1 @@ +Solar Panel are light receptors: they turn on if there is enough light. diff --git a/mesecons/mesecons_solarpanel/doc/solarpanel/preview.png b/mesecons/mesecons_solarpanel/doc/solarpanel/preview.png Binary files differnew file mode 100644 index 0000000..b773195 --- /dev/null +++ b/mesecons/mesecons_solarpanel/doc/solarpanel/preview.png diff --git a/mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png b/mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png Binary files differnew file mode 100644 index 0000000..3a3d799 --- /dev/null +++ b/mesecons/mesecons_solarpanel/doc/solarpanel/recipe.png diff --git a/mesecons/mesecons_solarpanel/init.lua b/mesecons/mesecons_solarpanel/init.lua new file mode 100644 index 0000000..bc5a408 --- /dev/null +++ b/mesecons/mesecons_solarpanel/init.lua @@ -0,0 +1,95 @@ +-- Solar Panel +minetest.register_node("mesecons_solarpanel:solar_panel_on", { + drawtype = "nodebox", + tiles = { "jeija_solar_panel.png", }, + inventory_image = "jeija_solar_panel.png", + wield_image = "jeija_solar_panel.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + is_ground_content = true, + node_box = { + type = "wallmounted", + wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, + wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, + wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, + }, + selection_box = { + type = "wallmounted", + wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, + wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, + wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, + }, + drop = "mesecons_solarpanel:solar_panel_off", + groups = {dig_immediate=3, not_in_creative_inventory = 1}, + sounds = default.node_sound_glass_defaults(), + mesecons = {receptor = { + state = mesecon.state.on + }} +}) + +-- Solar Panel +minetest.register_node("mesecons_solarpanel:solar_panel_off", { + drawtype = "nodebox", + tiles = { "jeija_solar_panel.png", }, + inventory_image = "jeija_solar_panel.png", + wield_image = "jeija_solar_panel.png", + paramtype = "light", + paramtype2 = "wallmounted", + walkable = false, + is_ground_content = true, + node_box = { + type = "wallmounted", + wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, + wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, + wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, + }, + selection_box = { + type = "wallmounted", + wall_bottom = { -7/16, -8/16, -7/16, 7/16, -7/16, 7/16 }, + wall_top = { -7/16, 7/16, -7/16, 7/16, 8/16, 7/16 }, + wall_side = { -8/16, -7/16, -7/16, -7/16, 7/16, 7/16 }, + }, + groups = {dig_immediate=3}, + description="Solar Panel", + sounds = default.node_sound_glass_defaults(), + mesecons = {receptor = { + state = mesecon.state.off + }} +}) + +minetest.register_craft({ + output = "mesecons_solarpanel:solar_panel_off 1", + recipe = { + {"mesecons_materials:silicon", "mesecons_materials:silicon"}, + {"mesecons_materials:silicon", "mesecons_materials:silicon"}, + } +}) + +minetest.register_abm( + {nodenames = {"mesecons_solarpanel:solar_panel_off"}, + interval = 1, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local light = minetest.get_node_light(pos, nil) + + if light >= 12 then + minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_on", param2=node.param2}) + mesecon.receptor_on(pos) + end + end, +}) + +minetest.register_abm( + {nodenames = {"mesecons_solarpanel:solar_panel_on"}, + interval = 1, + chance = 1, + action = function(pos, node, active_object_count, active_object_count_wider) + local light = minetest.get_node_light(pos, nil) + + if light < 12 then + minetest.set_node(pos, {name="mesecons_solarpanel:solar_panel_off", param2=node.param2}) + mesecon.receptor_off(pos) + end + end, +}) diff --git a/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png b/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png Binary files differnew file mode 100644 index 0000000..a7b0f75 --- /dev/null +++ b/mesecons/mesecons_solarpanel/textures/jeija_solar_panel.png |