diff --git a/elepower_dynamics/compat/basic_materials.lua b/elepower_dynamics/compat/basic_materials.lua index bd4ade0..bb6de08 100644 --- a/elepower_dynamics/compat/basic_materials.lua +++ b/elepower_dynamics/compat/basic_materials.lua @@ -6,23 +6,53 @@ if minetest.get_modpath("basic_materials") == nil then minetest.register_craftitem(":basic_materials:oil_extract", { description = "Oil Extract", - inventory_image = "elepower_oil_extract.png", + inventory_image = "elepower_bm_oil_extract.png", }) minetest.register_craftitem(":basic_materials:paraffin", { description = "Unprocessed Paraffin", - inventory_image = "elepower_paraffin.png", + inventory_image = "elepower_bm_paraffin.png", }) minetest.register_alias("basic_materials:plastic_base", "basic_materials:paraffin") minetest.register_alias("homedecor:plastic_base", "basic_materials:paraffin") minetest.register_alias("homedecor:paraffin", "basic_materials:paraffin") - minetest.register_alias("homedecor:plastic_sheeting", "basic_materials:plastic_sheet") minetest.register_alias("homedecor:oil_extract", "basic_materials:oil_extract") + minetest.register_alias("homedecor:plastic_sheeting", "basic_materials:plastic_sheet") + minetest.register_alias("homedecor:plastic_strips", "basic_materials:plastic_strip") + minetest.register_alias("homedecor:empty_spool", "basic_materials:empty_spool") minetest.register_craftitem(":basic_materials:plastic_sheet", { description = "Plastic Sheet", - inventory_image = "elepower_plastic_sheet.png", + inventory_image = "elepower_bm_plastic_sheet.png", + }) + + minetest.register_craftitem(":basic_materials:plastic_strip", { + description = "Plastic Strips", + groups = { strip = 1 }, + inventory_image = "elepower_bm_strip.png^[colorize:#ffffff:200", + }) + + minetest.register_craftitem(":basic_materials:empty_spool", { + description = "Empty wire spool", + inventory_image = "elepower_bm_empty_spool.png" + }) + + + minetest.register_craft( { + output = "basic_materials:plastic_strip 9", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, + }) + + minetest.register_craft( { + output = "basic_materials:empty_spool 3", + recipe = { + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, + { "" , "basic_materials:plastic_sheet", "" }, + { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" } + }, }) minetest.register_craft({ @@ -74,17 +104,18 @@ if minetest.get_modpath("basic_materials") == nil then minetest.register_craftitem(":basic_materials:copper_wire", { description = "Copper Wire", - inventory_image = "elepower_copper_wire.png", + inventory_image = "elepower_bm_copper_wire.png", groups = {copper = 1, wire = 1, component = 1} }) - minetest.register_craft({ - output = "basic_materials:copper_wire 8", + minetest.register_craft( { + output = "basic_materials:copper_wire 2", + type = "shapeless", recipe = { - {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"}, - {"default:copper_ingot", "", "default:copper_ingot"}, - {"default:copper_ingot", "default:copper_ingot", "default:copper_ingot"} - } + "default:copper_ingot", + "basic_materials:empty_spool", + "basic_materials:empty_spool", + }, }) ----------- @@ -93,7 +124,7 @@ if minetest.get_modpath("basic_materials") == nil then minetest.register_craftitem(":basic_materials:motor", { description = "Motor", - inventory_image = "elepower_motor.png", + inventory_image = "elepower_bm_motor.png", groups = {motor = 1, component = 1} }) @@ -112,7 +143,7 @@ if minetest.get_modpath("basic_materials") == nil then minetest.register_craftitem(":basic_materials:silicon", { description = "Silicon", - inventory_image = "elepower_silicon.png", + inventory_image = "elepower_bm_silicon.png", groups = {silicon = 1, lump = 1} }) @@ -125,6 +156,54 @@ if minetest.get_modpath("basic_materials") == nil then inventory_image = "elepower_brass_ingot.png", groups = {brass = 1, ingot = 1} }) + + ----------- + -- STEEL -- + ----------- + + minetest.register_craftitem(":basic_materials:steel_strip", { + description = "Steel Strip", + groups = { strip = 1 }, + inventory_image = "elepower_bm_strip.png^[multiply:#ffffff" + }) + + minetest.register_craftitem(":basic_materials:steel_wire", { + description = "Spool of steel wire", + groups = { wire = 1 }, + inventory_image = "elepower_bm_steel_wire.png" + }) + + minetest.register_craft( { + output = "basic_materials:steel_wire 2", + type = "shapeless", + recipe = { + "default:steel_ingot", + "basic_materials:empty_spool", + "basic_materials:empty_spool", + }, + }) + + minetest.register_craft( { + output = "basic_materials:steel_strip 12", + recipe = { + { "", "default:steel_ingot", "" }, + { "default:steel_ingot", "", "" }, + }, + }) + else - minetest.clear_craft({output = "basic_materials:brass_ingot"}) + minetest.clear_craft({output = "basic_materials:brass_ingot"}) + + local steel_strip_def = table.copy(minetest.registered_items["basic_materials:steel_strip"]) + steel_strip_def.inventory_image = "elepower_bm_strip.png^[multiply:#ffffff" + minetest.register_craftitem(":basic_materials:steel_strip", steel_strip_def) + + local copper_strip_def = table.copy(minetest.registered_items["basic_materials:copper_strip"]) + copper_strip_def.inventory_image = "elepower_bm_strip.png^[multiply:#fcb15f" + minetest.register_craftitem(":basic_materials:copper_strip", copper_strip_def) + + local plastic_strip_def = table.copy(minetest.registered_items["basic_materials:plastic_strip"]) + plastic_strip_def.inventory_image = "elepower_bm_strip.png^[colorize:#ffffff:200" + minetest.register_craftitem(":basic_materials:plastic_strip", plastic_strip_def) + end diff --git a/elepower_dynamics/components.lua b/elepower_dynamics/components.lua index fff0f63..23d1c0d 100644 --- a/elepower_dynamics/components.lua +++ b/elepower_dynamics/components.lua @@ -17,6 +17,7 @@ local list_def = { {material = "viridisium", description = "Viridisium", color = "#5b9751", dust = true, plate = true, gear = true}, {material = "zinc", description = "Zinc", color = "#598a9e", dust = true, plate = true}, {material = "coal", description = "Coal", color = "#1f1f1f", dust = true}, + {material = "mese", description = "Mese", color = "#fdff2d99", dust = true}, {material = "wood", description = "Wood", color = "#847454", dust = "Sawdust", gear = true} } @@ -50,7 +51,12 @@ end function elepd.register_dust(mat, data) local mod = minetest.get_current_modname() local itemname = mod..":"..mat.."_dust" - + local image = "elepower_dust.png^[multiply:" .. data.color + + if mat == "mese" then + image = "elepower_dust.png^[colorize:" .. data.color.."^[multiply:" .. data.color + end + data.item = itemname elepd.registered_dusts[mat] = data @@ -60,9 +66,11 @@ function elepd.register_dust(mat, data) description = data.description end + + minetest.register_craftitem(itemname, { description = description, - inventory_image = "elepower_dust.png^[multiply:" .. data.color, + inventory_image = image, groups = { ["dust_" .. mat] = 1, dust = 1 diff --git a/elepower_dynamics/conduits.lua b/elepower_dynamics/conduits.lua index 8a6d452..3d941bf 100644 --- a/elepower_dynamics/conduits.lua +++ b/elepower_dynamics/conduits.lua @@ -6,15 +6,67 @@ ele.register_conduit("elepower_dynamics:conduit", { use_texture_alpha = "clip", groups = {oddly_breakable_by_hand = 1, cracky = 1} }) ---[[ + ele.register_conduit("elepower_dynamics:conduit_wall", { description = "Power Conduit Wall Pass Through", - tiles = {"elepower_machine_side.png^elepower_power_port.png"}, + tiles = {"elepower_conduit_wall.png"}, use_texture_alpha = "clip", ele_conductor_density = 4/8, - groups = {oddly_breakable_by_hand = 1, cracky = 1} + groups = {cracky = 1} }) ---]] + +ele.register_conduit("elepower_dynamics:conduit_dirt_with_grass", { + description = "Power Conduit Grass Outlet", + tiles = {"default_grass.png^elepower_conduit_node_socket.png", + "default_dirt.png", + "default_dirt.png^default_grass_side.png" + }, + use_texture_alpha = "clip", + ele_conductor_density = 4/8, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25} + }) +}) + +ele.register_conduit("elepower_dynamics:conduit_dirt_with_dry_grass", { + description = "Power Conduit Dry Grass Outlet", + tiles = {"default_dry_grass.png^elepower_conduit_node_socket.png", + "default_dirt.png", + "default_dirt.png^default_dry_grass_side.png" + }, + use_texture_alpha = "clip", + ele_conductor_density = 4/8, + groups = {crumbly = 3, soil = 1}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25} + }) +}) + +ele.register_conduit("elepower_dynamics:conduit_stone_block", { + description = "Power Conduit Stone Block", + tiles = {"default_stone_block.png^elepower_conduit_node_socket.png", + "default_stone_block.png^elepower_conduit_node_socket.png", + "default_stone_block.png^elepower_conduit_node_socket.png" + }, + use_texture_alpha = "clip", + ele_conductor_density = 4/8, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +ele.register_conduit("elepower_dynamics:conduit_stone_block_desert", { + description = "Power Conduit Desert Stone Block", + tiles = {"default_desert_stone_block.png^elepower_conduit_node_socket.png", + "default_desert_stone_block.png^elepower_conduit_node_socket.png", + "default_desert_stone_block.png^elepower_conduit_node_socket.png" + }, + use_texture_alpha = "clip", + ele_conductor_density = 4/8, + groups = {cracky = 2, stone = 1}, + sounds = default.node_sound_stone_defaults(), +}) + -- Fluid fluid_lib.register_transfer_node("elepower_dynamics:opaque_duct", { description = "Opaque Fluid Duct", diff --git a/elepower_dynamics/crafting.lua b/elepower_dynamics/crafting.lua index 0675150..5730912 100644 --- a/elepower_dynamics/crafting.lua +++ b/elepower_dynamics/crafting.lua @@ -130,6 +130,53 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = "elepower_dynamics:conduit_wall 1", + recipe = { + {"" ,"elepower_dynamics:lead_plate",""}, + {"elepower_dynamics:lead_plate","elepower_dynamics:conduit" ,"elepower_dynamics:lead_plate"}, + {"" ,"elepower_dynamics:lead_plate",""} + } +}) + +minetest.register_craft({ + output = "elepower_dynamics:conduit_dirt_with_grass 1", + recipe = { + {"","farming:seed_wheat",""}, + {"","elepower_dynamics:conduit" ,""}, + {"","default:dirt" ,""} + } +}) + +minetest.register_craft({ + output = "elepower_dynamics:conduit_dirt_with_dry_grass 1", + recipe = { + {"","farming:wheat",""}, + {"","elepower_dynamics:conduit" ,""}, + {"","default:dirt" ,""} + } +}) + +minetest.register_craft({ + output = "elepower_dynamics:conduit_stone_block 1", + recipe = { + {"" ,"stairs:slab_stone_block" ,""}, + {"stairs:slab_stone_block","elepower_dynamics:conduit","stairs:slab_stone_block"}, + {"" ,"stairs:slab_stone_block" ,""} + } +}) + +minetest.register_craft({ + output = "elepower_dynamics:conduit_stone_block_desert 1", + recipe = { + {"" ,"stairs:slab_desert_stone_block" ,""}, + {"stairs:slab_desert_stone_block","elepower_dynamics:conduit","stairs:slab_desert_stone_block"}, + {"" ,"stairs:slab_desert_stone_block" ,""} + } +}) + + + -- Opaque Fluid Duct minetest.register_craft({ output = "elepower_dynamics:opaque_duct 3", diff --git a/elepower_dynamics/textures/GIMP/elepower_acidic_compound.xcf b/elepower_dynamics/textures/GIMP/elepower_acidic_compound.xcf new file mode 100644 index 0000000..db62b96 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_acidic_compound.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_battery.xcf b/elepower_dynamics/textures/GIMP/elepower_battery.xcf new file mode 100644 index 0000000..684de59 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_battery.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_blank_pcb.xcf b/elepower_dynamics/textures/GIMP/elepower_blank_pcb.xcf new file mode 100644 index 0000000..d9455d0 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_blank_pcb.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_capacitor.xcf b/elepower_dynamics/textures/GIMP/elepower_capacitor.xcf new file mode 100644 index 0000000..dbc4120 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_capacitor.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_carbon_fiber.xcf b/elepower_dynamics/textures/GIMP/elepower_carbon_fiber.xcf new file mode 100644 index 0000000..95bf270 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_carbon_fiber.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_carbon_fiber_sheet.xcf b/elepower_dynamics/textures/GIMP/elepower_carbon_fiber_sheet.xcf new file mode 100644 index 0000000..40a0492 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_carbon_fiber_sheet.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_coil.xcf b/elepower_dynamics/textures/GIMP/elepower_coil.xcf new file mode 100644 index 0000000..a27008d Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_coil.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_dust.xcf b/elepower_dynamics/textures/GIMP/elepower_dust.xcf new file mode 100644 index 0000000..fde9521 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_dust.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_gas_container.xcf b/elepower_dynamics/textures/GIMP/elepower_gas_container.xcf new file mode 100644 index 0000000..7e7dfaa Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_gas_container.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_graphite_rod.xcf b/elepower_dynamics/textures/GIMP/elepower_graphite_rod.xcf new file mode 100644 index 0000000..fd062c0 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_graphite_rod.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_ic.xcf b/elepower_dynamics/textures/GIMP/elepower_ic.xcf new file mode 100644 index 0000000..6380dc6 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_ic.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_ic_2.xcf b/elepower_dynamics/textures/GIMP/elepower_ic_2.xcf new file mode 100644 index 0000000..a91636d Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_ic_2.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_ic_3.xcf b/elepower_dynamics/textures/GIMP/elepower_ic_3.xcf new file mode 100644 index 0000000..b491d22 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_ic_3.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_induction_coil.xcf b/elepower_dynamics/textures/GIMP/elepower_induction_coil.xcf new file mode 100644 index 0000000..d3910ad Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_induction_coil.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_induction_coil_advanced.xcf b/elepower_dynamics/textures/GIMP/elepower_induction_coil_advanced.xcf new file mode 100644 index 0000000..f6b5100 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_induction_coil_advanced.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_lcd_panel.xcf b/elepower_dynamics/textures/GIMP/elepower_lcd_panel.xcf new file mode 100644 index 0000000..533adef Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_lcd_panel.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_microcontroller.xcf b/elepower_dynamics/textures/GIMP/elepower_microcontroller.xcf new file mode 100644 index 0000000..31d6a94 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_microcontroller.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_pcb.xcf b/elepower_dynamics/textures/GIMP/elepower_pcb.xcf new file mode 100644 index 0000000..a8c4615 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_pcb.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_pv_cell.xcf b/elepower_dynamics/textures/GIMP/elepower_pv_cell.xcf new file mode 100644 index 0000000..f8981c0 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_pv_cell.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_servo_valve.xcf b/elepower_dynamics/textures/GIMP/elepower_servo_valve.xcf new file mode 100644 index 0000000..099f39f Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_servo_valve.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_silicon_wafer.xcf b/elepower_dynamics/textures/GIMP/elepower_silicon_wafer.xcf new file mode 100644 index 0000000..5992201 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_silicon_wafer.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_silicon_wafer_solar.xcf b/elepower_dynamics/textures/GIMP/elepower_silicon_wafer_solar.xcf new file mode 100644 index 0000000..e1b2852 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_silicon_wafer_solar.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_soc.xcf b/elepower_dynamics/textures/GIMP/elepower_soc.xcf new file mode 100644 index 0000000..5f8469c Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_soc.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_tin_can.xcf b/elepower_dynamics/textures/GIMP/elepower_tin_can.xcf new file mode 100644 index 0000000..4fa20c4 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_tin_can.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_tree_tap.xcf b/elepower_dynamics/textures/GIMP/elepower_tree_tap.xcf new file mode 100644 index 0000000..7897a35 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_tree_tap.xcf differ diff --git a/elepower_dynamics/textures/GIMP/elepower_uv_bulb.xcf b/elepower_dynamics/textures/GIMP/elepower_uv_bulb.xcf new file mode 100644 index 0000000..ab991f9 Binary files /dev/null and b/elepower_dynamics/textures/GIMP/elepower_uv_bulb.xcf differ diff --git a/elepower_dynamics/textures/elepower_acidic_compound.png b/elepower_dynamics/textures/elepower_acidic_compound.png index c06c1fc..0f0ece9 100644 Binary files a/elepower_dynamics/textures/elepower_acidic_compound.png and b/elepower_dynamics/textures/elepower_acidic_compound.png differ diff --git a/elepower_dynamics/textures/elepower_battery.png b/elepower_dynamics/textures/elepower_battery.png index 306b060..79de8f7 100644 Binary files a/elepower_dynamics/textures/elepower_battery.png and b/elepower_dynamics/textures/elepower_battery.png differ diff --git a/elepower_dynamics/textures/elepower_blank_pcb.png b/elepower_dynamics/textures/elepower_blank_pcb.png index 619c652..a7c3a4a 100644 Binary files a/elepower_dynamics/textures/elepower_blank_pcb.png and b/elepower_dynamics/textures/elepower_blank_pcb.png differ diff --git a/elepower_dynamics/textures/elepower_bm_copper_wire.png b/elepower_dynamics/textures/elepower_bm_copper_wire.png new file mode 100644 index 0000000..72ed251 Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_copper_wire.png differ diff --git a/elepower_dynamics/textures/elepower_bm_empty_spool.png b/elepower_dynamics/textures/elepower_bm_empty_spool.png new file mode 100644 index 0000000..105092e Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_empty_spool.png differ diff --git a/elepower_dynamics/textures/elepower_bm_motor.png b/elepower_dynamics/textures/elepower_bm_motor.png new file mode 100644 index 0000000..82f40a1 Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_motor.png differ diff --git a/elepower_dynamics/textures/elepower_bm_oil_extract.png b/elepower_dynamics/textures/elepower_bm_oil_extract.png new file mode 100644 index 0000000..62872cf Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_oil_extract.png differ diff --git a/elepower_dynamics/textures/elepower_bm_paraffin.png b/elepower_dynamics/textures/elepower_bm_paraffin.png new file mode 100644 index 0000000..706d72b Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_paraffin.png differ diff --git a/elepower_dynamics/textures/elepower_bm_plastic_sheet.png b/elepower_dynamics/textures/elepower_bm_plastic_sheet.png new file mode 100644 index 0000000..93e2cd5 Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_plastic_sheet.png differ diff --git a/elepower_dynamics/textures/elepower_bm_silicon.png b/elepower_dynamics/textures/elepower_bm_silicon.png new file mode 100644 index 0000000..edcfa08 Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_silicon.png differ diff --git a/elepower_dynamics/textures/elepower_bm_steel_wire.png b/elepower_dynamics/textures/elepower_bm_steel_wire.png new file mode 100644 index 0000000..29cc00b Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_steel_wire.png differ diff --git a/elepower_dynamics/textures/elepower_bm_strip.png b/elepower_dynamics/textures/elepower_bm_strip.png new file mode 100644 index 0000000..9823991 Binary files /dev/null and b/elepower_dynamics/textures/elepower_bm_strip.png differ diff --git a/elepower_dynamics/textures/elepower_capacitor.png b/elepower_dynamics/textures/elepower_capacitor.png index ac1c9e8..2b4058b 100644 Binary files a/elepower_dynamics/textures/elepower_capacitor.png and b/elepower_dynamics/textures/elepower_capacitor.png differ diff --git a/elepower_dynamics/textures/elepower_carbon_fiber.png b/elepower_dynamics/textures/elepower_carbon_fiber.png index a1a9595..a49992a 100644 Binary files a/elepower_dynamics/textures/elepower_carbon_fiber.png and b/elepower_dynamics/textures/elepower_carbon_fiber.png differ diff --git a/elepower_dynamics/textures/elepower_carbon_fiber_sheet.png b/elepower_dynamics/textures/elepower_carbon_fiber_sheet.png index cd204fd..b24cbd0 100644 Binary files a/elepower_dynamics/textures/elepower_carbon_fiber_sheet.png and b/elepower_dynamics/textures/elepower_carbon_fiber_sheet.png differ diff --git a/elepower_dynamics/textures/elepower_chip.png b/elepower_dynamics/textures/elepower_chip.png index dd046c4..21bd259 100644 Binary files a/elepower_dynamics/textures/elepower_chip.png and b/elepower_dynamics/textures/elepower_chip.png differ diff --git a/elepower_dynamics/textures/elepower_conduit_node_socket.png b/elepower_dynamics/textures/elepower_conduit_node_socket.png new file mode 100644 index 0000000..cdc8023 Binary files /dev/null and b/elepower_dynamics/textures/elepower_conduit_node_socket.png differ diff --git a/elepower_dynamics/textures/elepower_conduit_wall.png b/elepower_dynamics/textures/elepower_conduit_wall.png new file mode 100644 index 0000000..ce1a8f3 Binary files /dev/null and b/elepower_dynamics/textures/elepower_conduit_wall.png differ diff --git a/elepower_dynamics/textures/elepower_copper_coil.png b/elepower_dynamics/textures/elepower_copper_coil.png index e6f1d00..e6af902 100644 Binary files a/elepower_dynamics/textures/elepower_copper_coil.png and b/elepower_dynamics/textures/elepower_copper_coil.png differ diff --git a/elepower_dynamics/textures/elepower_dust.png b/elepower_dynamics/textures/elepower_dust.png index 6f83d0d..eda7e8f 100644 Binary files a/elepower_dynamics/textures/elepower_dust.png and b/elepower_dynamics/textures/elepower_dust.png differ diff --git a/elepower_dynamics/textures/elepower_gas_chlorine.png b/elepower_dynamics/textures/elepower_gas_chlorine.png index 10d8839..bdb5c31 100644 Binary files a/elepower_dynamics/textures/elepower_gas_chlorine.png and b/elepower_dynamics/textures/elepower_gas_chlorine.png differ diff --git a/elepower_dynamics/textures/elepower_gas_container.png b/elepower_dynamics/textures/elepower_gas_container.png index ab910f8..adb96e3 100644 Binary files a/elepower_dynamics/textures/elepower_gas_container.png and b/elepower_dynamics/textures/elepower_gas_container.png differ diff --git a/elepower_dynamics/textures/elepower_gas_helium.png b/elepower_dynamics/textures/elepower_gas_helium.png index e88f306..cfd45bb 100644 Binary files a/elepower_dynamics/textures/elepower_gas_helium.png and b/elepower_dynamics/textures/elepower_gas_helium.png differ diff --git a/elepower_dynamics/textures/elepower_gas_hydrogen.png b/elepower_dynamics/textures/elepower_gas_hydrogen.png index cca8a16..5029714 100644 Binary files a/elepower_dynamics/textures/elepower_gas_hydrogen.png and b/elepower_dynamics/textures/elepower_gas_hydrogen.png differ diff --git a/elepower_dynamics/textures/elepower_gas_lithium.png b/elepower_dynamics/textures/elepower_gas_lithium.png index cdbf37b..71d1ba2 100644 Binary files a/elepower_dynamics/textures/elepower_gas_lithium.png and b/elepower_dynamics/textures/elepower_gas_lithium.png differ diff --git a/elepower_dynamics/textures/elepower_gas_nitrogen.png b/elepower_dynamics/textures/elepower_gas_nitrogen.png index 309a559..60c2079 100644 Binary files a/elepower_dynamics/textures/elepower_gas_nitrogen.png and b/elepower_dynamics/textures/elepower_gas_nitrogen.png differ diff --git a/elepower_dynamics/textures/elepower_gas_oxygen.png b/elepower_dynamics/textures/elepower_gas_oxygen.png index 908cc13..3f7afc9 100644 Binary files a/elepower_dynamics/textures/elepower_gas_oxygen.png and b/elepower_dynamics/textures/elepower_gas_oxygen.png differ diff --git a/elepower_dynamics/textures/elepower_gear.png b/elepower_dynamics/textures/elepower_gear.png index 950ba46..a851a22 100644 Binary files a/elepower_dynamics/textures/elepower_gear.png and b/elepower_dynamics/textures/elepower_gear.png differ diff --git a/elepower_dynamics/textures/elepower_graphite_rod.png b/elepower_dynamics/textures/elepower_graphite_rod.png index a63f298..0a08a28 100644 Binary files a/elepower_dynamics/textures/elepower_graphite_rod.png and b/elepower_dynamics/textures/elepower_graphite_rod.png differ diff --git a/elepower_dynamics/textures/elepower_ic.png b/elepower_dynamics/textures/elepower_ic.png index 546bf30..668f1a2 100644 Binary files a/elepower_dynamics/textures/elepower_ic.png and b/elepower_dynamics/textures/elepower_ic.png differ diff --git a/elepower_dynamics/textures/elepower_ic_2.png b/elepower_dynamics/textures/elepower_ic_2.png index 6496f1a..c076d88 100644 Binary files a/elepower_dynamics/textures/elepower_ic_2.png and b/elepower_dynamics/textures/elepower_ic_2.png differ diff --git a/elepower_dynamics/textures/elepower_ic_3.png b/elepower_dynamics/textures/elepower_ic_3.png index 431ea64..28ccbf7 100644 Binary files a/elepower_dynamics/textures/elepower_ic_3.png and b/elepower_dynamics/textures/elepower_ic_3.png differ diff --git a/elepower_dynamics/textures/elepower_induction_coil.png b/elepower_dynamics/textures/elepower_induction_coil.png index 5a1f2f3..c622745 100644 Binary files a/elepower_dynamics/textures/elepower_induction_coil.png and b/elepower_dynamics/textures/elepower_induction_coil.png differ diff --git a/elepower_dynamics/textures/elepower_induction_coil_advanced.png b/elepower_dynamics/textures/elepower_induction_coil_advanced.png index cd31b83..c6af5a9 100644 Binary files a/elepower_dynamics/textures/elepower_induction_coil_advanced.png and b/elepower_dynamics/textures/elepower_induction_coil_advanced.png differ diff --git a/elepower_dynamics/textures/elepower_lcd_panel.png b/elepower_dynamics/textures/elepower_lcd_panel.png index 3d62a88..023883c 100644 Binary files a/elepower_dynamics/textures/elepower_lcd_panel.png and b/elepower_dynamics/textures/elepower_lcd_panel.png differ diff --git a/elepower_dynamics/textures/elepower_microcontroller.png b/elepower_dynamics/textures/elepower_microcontroller.png index d4236dd..3a0d4cb 100644 Binary files a/elepower_dynamics/textures/elepower_microcontroller.png and b/elepower_dynamics/textures/elepower_microcontroller.png differ diff --git a/elepower_dynamics/textures/elepower_pcb.png b/elepower_dynamics/textures/elepower_pcb.png index 7899614..4c1321c 100644 Binary files a/elepower_dynamics/textures/elepower_pcb.png and b/elepower_dynamics/textures/elepower_pcb.png differ diff --git a/elepower_dynamics/textures/elepower_plate.png b/elepower_dynamics/textures/elepower_plate.png index cf05e8c..7ef3360 100644 Binary files a/elepower_dynamics/textures/elepower_plate.png and b/elepower_dynamics/textures/elepower_plate.png differ diff --git a/elepower_dynamics/textures/elepower_pv_cell.png b/elepower_dynamics/textures/elepower_pv_cell.png index 309ef07..81f23e6 100644 Binary files a/elepower_dynamics/textures/elepower_pv_cell.png and b/elepower_dynamics/textures/elepower_pv_cell.png differ diff --git a/elepower_dynamics/textures/elepower_servo_valve.png b/elepower_dynamics/textures/elepower_servo_valve.png index 0097652..be2b171 100644 Binary files a/elepower_dynamics/textures/elepower_servo_valve.png and b/elepower_dynamics/textures/elepower_servo_valve.png differ diff --git a/elepower_dynamics/textures/elepower_silicon_wafer.png b/elepower_dynamics/textures/elepower_silicon_wafer.png index ba5bf98..f86a5b9 100644 Binary files a/elepower_dynamics/textures/elepower_silicon_wafer.png and b/elepower_dynamics/textures/elepower_silicon_wafer.png differ diff --git a/elepower_dynamics/textures/elepower_silicon_wafer_solar.png b/elepower_dynamics/textures/elepower_silicon_wafer_solar.png index 801fba8..5796866 100644 Binary files a/elepower_dynamics/textures/elepower_silicon_wafer_solar.png and b/elepower_dynamics/textures/elepower_silicon_wafer_solar.png differ diff --git a/elepower_dynamics/textures/elepower_silver_coil.png b/elepower_dynamics/textures/elepower_silver_coil.png index 51a002a..bc6efed 100644 Binary files a/elepower_dynamics/textures/elepower_silver_coil.png and b/elepower_dynamics/textures/elepower_silver_coil.png differ diff --git a/elepower_dynamics/textures/elepower_soc.png b/elepower_dynamics/textures/elepower_soc.png index 9de9dcc..2de2bfa 100644 Binary files a/elepower_dynamics/textures/elepower_soc.png and b/elepower_dynamics/textures/elepower_soc.png differ diff --git a/elepower_dynamics/textures/elepower_tin_can.png b/elepower_dynamics/textures/elepower_tin_can.png index d85bafa..aded5cc 100644 Binary files a/elepower_dynamics/textures/elepower_tin_can.png and b/elepower_dynamics/textures/elepower_tin_can.png differ diff --git a/elepower_dynamics/textures/elepower_tree_tap.png b/elepower_dynamics/textures/elepower_tree_tap.png index 5b11c88..26c0ce7 100644 Binary files a/elepower_dynamics/textures/elepower_tree_tap.png and b/elepower_dynamics/textures/elepower_tree_tap.png differ diff --git a/elepower_dynamics/textures/elepower_uv_bulb.png b/elepower_dynamics/textures/elepower_uv_bulb.png index b131cda..3153dcf 100644 Binary files a/elepower_dynamics/textures/elepower_uv_bulb.png and b/elepower_dynamics/textures/elepower_uv_bulb.png differ diff --git a/elepower_lighting/i_crafting.lua b/elepower_lighting/i_crafting.lua new file mode 100644 index 0000000..4d1fd8c --- /dev/null +++ b/elepower_lighting/i_crafting.lua @@ -0,0 +1,322 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Crafting Recipes -- +------------------------------------------------------ +local glass = "default:glass" +local glass_slab = "stairs:slab_glass" +local stick = "default:stick" +local steel_wire = "basic_materials:steel_wire" +local steel_strip = "basic_materials:steel_strip" +local plastic_strip = "basic_materials:plastic_strip" +local plastic_sheet = "basic_materials:plastic_sheet" +local mese_dust = "elepower_dynamics:mese_dust" +local dye_red = "dye:red" +local dye_green = "dye:green" +local dye_blue = "dye:blue" +local s_wood = "stairs:slab_wood" + +minetest.register_craft( { + output = "elepower_lighting:electrum_strip 12", + recipe = { + { "", "elepower_dynamics:electrum_ingot", "" }, + { "elepower_dynamics:electrum_ingot", "", "" }, + }, +}) + +-- Override base recipes so lighting independent +minetest.clear_craft({output = "elepower_dynamics:uv_bulb"}) +minetest.registered_craftitems["elepower_dynamics:uv_bulb"] = {} -- registered as node + +minetest.register_craft({ + output = "elepower_dynamics:uv_bulb", + recipe = { + { "" ,"elepower_lighting:bulb_glass" , "" }, + {"group:color_blue","elepower_lighting:incandescent_bulb_element" ,"group:color_violet"}, + { "" ,steel_strip , "" } + } +}) + +-- Compressing Recipes +local compressor_recipes = { + { + recipe = { "elepower_lighting:electrum_strip 1", dye_red.." 1" }, + output = "elepower_lighting:led_red", + time = 4, + }, + { + recipe = { "elepower_lighting:electrum_strip 1", dye_green.." 1" }, + output = "elepower_lighting:led_green", + time = 4, + }, + { + recipe = { "elepower_lighting:electrum_strip 1", dye_blue.." 1" }, + output = "elepower_lighting:led_blue", + time = 4, + } +} + +for _,i in pairs(compressor_recipes) do + elepm.register_craft({ + type = "compress", + recipe = i.recipe, + output = i.output, + time = i.time or 1 + }) +end + +-- Soldering Recipes + +local soldering_recipes = { + { + recipe = { "elepower_dynamics:pcb", "elepower_dynamics:chip 4", "elepower_lighting:led_red"}, + output = "elepower_lighting:led_driver 4", + time = 8, + }, + { + recipe = {"elepower_lighting:led_light_panel", "elepower_dynamics:microcontroller", "elepower_lighting:led_cluster"}, + output = "elepower_lighting:led_light_panel_colored", + time = 12, + } + } + +for _,i in pairs(soldering_recipes) do + elepm.register_craft({ + type = "solder", + recipe = i.recipe, + output = i.output, + time = i.time or 4 + }) +end + + +-- Canning +local canning_recipes = { + { + recipe = {"elepower_dynamics:iron_plate", "elepower_dynamics:conduit"}, + output = "elepower_lighting:conduit_iron_thin", + time = 4, + }, + { + recipe = {"elepower_dynamics:iron_plate 2", "elepower_dynamics:conduit"}, + output = "elepower_lighting:conduit_iron_thick", + time = 4, + }, + { + recipe = {"elepower_dynamics:steel_plate", "elepower_dynamics:conduit"}, + output = "elepower_lighting:conduit_steel_thin", + time = 4, + }, + { + recipe = {"elepower_dynamics:steel_plate 2", "elepower_dynamics:conduit"}, + output = "elepower_lighting:conduit_steel_thick", + time = 4, + }, + { + recipe = {"elepower_dynamics:gold_plate", "elepower_dynamics:conduit"}, + output = "elepower_lighting:conduit_gold_thin", + time = 4, + }, + { + recipe = {"elepower_dynamics:gold_plate 2", "elepower_dynamics:conduit"}, + output = "elepower_lighting:conduit_gold_thick", + time = 4, + }, +} + +for _,i in pairs(canning_recipes) do + elepm.register_craft({ + type = "can", + recipe = i.recipe, + output = i.output, + time = i.time or 4 + }) +end + +-- Wood Conduit +minetest.register_craft({ + output = "elepower_lighting:conduit_wood_thin", + recipe = { + { "" ,"", "" }, + { "" ,"elepower_dynamics:conduit", "" }, + { "" ,s_wood, "" } + } +}) + +minetest.register_craft({ + output = "elepower_lighting:conduit_wood_thick", + recipe = { + { "" ,s_wood, "" }, + { "" ,"elepower_dynamics:conduit", "" }, + { "" ,s_wood, "" } + } +}) + +-- Incandescent Bulb Glass +minetest.register_craft({ + output = "elepower_lighting:bulb_glass 10", + recipe = { + { "" ,glass, "" }, + {glass, "" ,glass}, + {glass, "" ,glass} + } +}) + +-- Incandescent Bulb Element +minetest.register_craft({ + output = "elepower_lighting:incandescent_bulb_element 5", + recipe = { + { "" , "" , "" }, + {stick, "" ,steel_wire}, + { "" , "" , "" } + } +}) + +-- Incandescent Light Bulb +minetest.register_craft({ + output = "elepower_lighting:bulb_incandescent", + recipe = { + { "" , "elepower_lighting:bulb_glass" , "" }, + { "" , "elepower_lighting:incandescent_bulb_element" , "" }, + { "" , steel_strip , "" } + } +}) + + +-- CCF Bulb Glass +minetest.register_craft({ + output = "elepower_lighting:cf_bulb_glass 10", + recipe = { + {glass,glass,glass}, + {glass, "" ,glass}, + {glass, "" ,glass} + } +}) + +-- CCF Light Bulb +minetest.register_craft({ + output = "elepower_lighting:bulb_cf", + recipe = { + { "elepower_lighting:cf_bulb_glass", "" , "elepower_lighting:cf_bulb_glass" }, + { "" ,mese_dust , "" }, + { "" ,steel_strip, "" } + } +}) + +-- Fluro Light Bank Glass +minetest.register_craft({ + output = "elepower_lighting:fluro_tube_glass 6", + recipe = { + {glass,"",glass}, + {glass,"",glass}, + {glass,"",glass} + } +}) + +-- Fluro Light Bank +minetest.register_craft({ + output = "elepower_lighting:fluro_light_bank", + recipe = { + { "","elepower_lighting:fluro_tube_glass","elepower_lighting:fluro_tube_glass" }, + { "",mese_dust , mese_dust }, + { "","elepower_dynamics:steel_plate" , steel_strip } + } +}) + +-- Light Emitting Diode cluster +minetest.register_craft({ + output = "elepower_lighting:led_cluster", + recipe = { + { "" , glass_slab , "" }, + { "elepower_lighting:led_red","elepower_lighting:led_green","elepower_lighting:led_blue"}, + { "" , plastic_strip , "" } + } +}) + +-- LED Light Bulb +minetest.register_craft({ + output = "elepower_lighting:bulb_led", + recipe = { + { "" ,"elepower_lighting:bulb_glass", "" }, + {"elepower_lighting:led_cluster","elepower_lighting:led_driver","elepower_lighting:led_cluster"}, + { "" , steel_strip , "" } + } +}) + +-- LED Light Panel 1x1 +minetest.register_craft({ + output = "elepower_lighting:led_light_panel", + recipe = { + { "" , glass_slab , "" }, + {"elepower_lighting:led_cluster","elepower_lighting:led_driver","elepower_lighting:led_cluster"}, + { "" , plastic_sheet , "" } + } +}) + +-- LED Light Panel 1x3 +minetest.register_craft({ + output = "elepower_lighting:led_1x3_light_panel", + recipe = { + { "" ,"", "" }, + {"elepower_lighting:led_light_panel","elepower_lighting:led_light_panel","elepower_lighting:led_light_panel"}, + { "" ,"", "" } + } +}) + +-- LED Light Panel 2x3 +minetest.register_craft({ + output = "elepower_lighting:led_2x3_light_panel", + recipe = { + {"elepower_lighting:led_light_panel","elepower_lighting:led_light_panel","elepower_lighting:led_light_panel"}, + {"elepower_lighting:led_light_panel","elepower_lighting:led_light_panel","elepower_lighting:led_light_panel"}, + { "" ,"", "" } + } +}) + +-- Lens +minetest.register_craft({ + output = "elepower_lighting:magnifying_lens 5", + recipe = { + { "" ,glass_slab , "" }, + {glass_slab ,glass_slab ,glass_slab }, + { "" ,glass_slab , "" } + } +}) + +-- Flood Light - Incandescent +minetest.register_craft({ + output = "elepower_lighting:incandescent_floodlight_xp0_yp0", + recipe = { + { "" ,"elepower_dynamics:steel_plate", "" }, + {"elepower_lighting:magnifying_lens","elepower_lighting:bulb_incandescent","elepower_lighting:bulb_incandescent"}, + { "" ,"elepower_dynamics:steel_plate", "" } + } +}) + +-- Flood Light - CCF +minetest.register_craft({ + output = "elepower_lighting:cf_floodlight_xp0_yp0", + recipe = { + { "" ,"elepower_dynamics:steel_plate", "" }, + {"elepower_lighting:magnifying_lens","elepower_lighting:bulb_cf","elepower_lighting:bulb_cf"}, + { "" ,"elepower_dynamics:steel_plate", "" } + } +}) + +-- Flood Light - LED +minetest.register_craft({ + output = "elepower_lighting:led_floodlight_xp0_yp0", + recipe = { + { "" ,"elepower_dynamics:steel_plate", "" }, + {"elepower_lighting:magnifying_lens","elepower_lighting:bulb_led","elepower_lighting:bulb_led"}, + { "" ,"elepower_dynamics:steel_plate", "" } + } +}) \ No newline at end of file diff --git a/elepower_lighting/i_crafting_shades.lua b/elepower_lighting/i_crafting_shades.lua new file mode 100644 index 0000000..d73bb08 --- /dev/null +++ b/elepower_lighting/i_crafting_shades.lua @@ -0,0 +1,67 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Crafting Shades -- +------------------------------------------------------ +local stick = "default:stick" +local paper = "default:paper" +local paper_red = "elepower_lighting:paper_red" +local paper_blue = "elepower_lighting:paper_blue" + +local colors = {["default:paper"] = "",["elepower_lighting:paper_red"] = "_red",["elepower_lighting:paper_blue"] = "_blue"} + +for paper,color in pairs(colors) do +minetest.register_craft({ + output = "elepower_lighting:decor_shade"..color.."_1 2", + recipe = { + {stick,paper,stick}, + {paper,stick,paper}, + {stick,paper,stick} + } +}) + +minetest.register_craft({ + output = "elepower_lighting:decor_shade"..color.."_2 2", + recipe = { + {stick,paper,stick}, + {stick,paper,stick}, + {stick,paper,stick} + } +}) + +minetest.register_craft({ + output = "elepower_lighting:decor_shade"..color.."_3 2", + recipe = { + {stick,paper,stick}, + {stick,stick,stick}, + {stick,paper,stick} + } +}) + +minetest.register_craft({ + output = "elepower_lighting:decor_shade"..color.."_4 2", + recipe = { + {stick,stick,stick}, + {stick,paper,stick}, + {stick,stick,stick} + } +}) + +minetest.register_craft({ + output = "elepower_lighting:decor_shade"..color.."_5 2", + recipe = { + {paper,stick,paper}, + {stick,paper,stick}, + {paper,stick,paper} + } +}) + +end \ No newline at end of file diff --git a/elepower_lighting/i_craftitems.lua b/elepower_lighting/i_craftitems.lua new file mode 100644 index 0000000..8754186 --- /dev/null +++ b/elepower_lighting/i_craftitems.lua @@ -0,0 +1,82 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Craft Items -- +------------------------------------------------------ + +minetest.register_craftitem("elepower_lighting:bulb_glass", { + description = "Bulb Glass", + inventory_image = "elepower_lighting_incandescent_bulb_glass.png", + groups = {oddly_breakable_by_hand = 1} +}) + +minetest.register_craftitem("elepower_lighting:incandescent_bulb_element", { + description = "Incandescent Bulb Element", + inventory_image = "elepower_lighting_incandescent_bulb_element.png", + groups = {oddly_breakable_by_hand = 1} +}) + +minetest.register_craftitem("elepower_lighting:cf_bulb_glass", { + description = "CF Bulb Glass", + inventory_image = "elepower_lighting_cf_bulb_glass.png", + groups = {oddly_breakable_by_hand = 1} +}) + +minetest.register_craftitem("elepower_lighting:magnifying_lens", { + description = "Magnifying Lens", + inventory_image = "elepower_lighting_magnifying_lens.png", + groups = {oddly_breakable_by_hand = 1} +}) + +minetest.register_craftitem("elepower_lighting:fluro_tube_glass", { + description = "Fluro Tube Glass", + inventory_image = "elepower_lighting_fluro_tube_glass.png", + groups = {oddly_breakable_by_hand = 1} +}) + +minetest.register_craftitem("elepower_lighting:electrum_strip", { + description = "Electrum Strip", + inventory_image = "elepower_bm_strip.png^[multiply:#ebeb90", + groups = {strip = 1} +}) + +minetest.register_craftitem("elepower_lighting:led_red", { + description = "Red Light Emitting Diode", + inventory_image = "elepower_lighting_light_emitting_diode_single.png^[multiply:#FF0000".. + "^[lowpart:31:elepower_lighting_light_emitting_diode_single.png", + groups = {oddly_breakable_by_hand = 1, led = 1} +}) + +minetest.register_craftitem("elepower_lighting:led_green", { + description = "Green Light Emitting Diode", + inventory_image = "elepower_lighting_light_emitting_diode_single.png^[multiply:#00FF00".. + "^[lowpart:31:elepower_lighting_light_emitting_diode_single.png", + groups = {oddly_breakable_by_hand = 1, led = 1} +}) + +minetest.register_craftitem("elepower_lighting:led_blue", { + description = "Blue Light Emitting Diode", + inventory_image = "elepower_lighting_light_emitting_diode_single.png^[multiply:#0000FF".. + "^[lowpart:31:elepower_lighting_light_emitting_diode_single.png", + groups = {oddly_breakable_by_hand = 1, led = 1} +}) + +minetest.register_craftitem("elepower_lighting:led_cluster", { + description = "Light Emitting Diode Cluster", + inventory_image = "elepower_lighting_light_emitting_diode_cluster.png", + groups = {oddly_breakable_by_hand = 1, led = 1} +}) + +minetest.register_craftitem("elepower_lighting:led_driver", { + description = "LED Driver Board", + inventory_image = "elepower_lighting_light_emitting_diode_driver.png", + groups = {oddly_breakable_by_hand = 1} +}) diff --git a/elepower_lighting/i_functions.lua b/elepower_lighting/i_functions.lua new file mode 100644 index 0000000..efbb398 --- /dev/null +++ b/elepower_lighting/i_functions.lua @@ -0,0 +1,916 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Functions -- +------------------------------------------------------ +------------------------------------------- +-- Floodlight Formspec -- +------------------------------------------- +local function get_formspec_flood(power,tilt,rotate) + local rotate = rotate or 0 + local tilt = tilt or 0 + local per_rot = (math.abs(rotate)/45)*100 + local percent = (math.abs(tilt)/20)*100 + + local final ="size[8,3]".. + ele.formspec.power_meter(power).. + -- rotate + + "image[3.5,0.25;2.8,1;elepower_gui_barbg.png^[transformR90]".. + "image[4.43,2.4;0.5,0.5;elepower_lighting_flood_arrow_icon.png^[transformR90]".. + "tooltip[3.5,1.45;2.25,0.4;"..rotate.." Degrees;#30434c;#f9f9f9]".. + --"button[5.15,1.45;0.75,0.75;rot;+]".. + --"tooltip[5.15,1.45;0.75,0.75;+1 Degrees;#30434c;#f9f9f9]".. + --"button[4.35,1.45;0.75,0.75;rot;0]".. + --"tooltip[4.35,1.45;0.75,0.75;Reset;#30434c;#f9f9f9]".. + --"button[3.5,1.45;0.75,0.75;rot;-]".. + --"tooltip[3.5,1.45;0.75,0.75;-1 Degrees;#30434c;#f9f9f9]".. + --"image[3.5,0.25;2.8,1;elepower_lighting_flood_tilt_gauge.png^[transformR90]".. + + "scrollbaroptions[min=-45;max=45;smallstep=1;largestep=5;arrows=show]".. + "scrollbar[3.5,1.45;2.25,0.45;horizontal;rot;"..rotate.."]".. + + "scrollbaroptions[min=-20;max=20;smallstep=1;largestep=5;arrows=show]".. + "scrollbar[7.25,0;0.4,2.4;vertical;tilt;"..(tilt).."]".. + -- tilt + "image[6.25,0;1,2.8;elepower_gui_barbg.png]".. + "image[6.5,2.45;0.5,0.5;elepower_lighting_flood_arrow_icon.png]".. + "tooltip[7.25,0;1,2.6;"..(tilt).." Degrees;#30434c;#f9f9f9]" + --"button[7.25,0.05;0.75,0.75;tilt;+]".. + --"tooltip[7.25,0.05;0.75,0.75;+1 Degrees;#30434c;#f9f9f9]".. + --"button[7.25,.9;0.75,0.75;tilt;0]".. + --"tooltip[7.25,.9;0.75,0.75;Reset;#30434c;#f9f9f9]".. + --"button[7.25,1.75;0.75,0.75;tilt;-]".. + --"tooltip[7.25,1.75;0.75,0.75;-1 Degrees;#30434c;#f9f9f9]" + + if rotate > 0 then + final = final.."image[4.62,0.25;1.4,1;elepower_gui_barbg.png^[lowpart:"..per_rot..":elepower_gui_bar.png^[transformR270]" + + elseif rotate < 0 then + final = final.."image[3.5,0.25;1.4,1;elepower_gui_barbg.png^[lowpart:"..per_rot..":elepower_gui_bar.png^[transformR90]" + end + + if tilt < 0 then + final = final.."image[6.25,0;1,1.4;elepower_gui_barbg.png^[lowpart:"..percent..":elepower_gui_bar.png]" + + elseif tilt > 0 then + final = final.."image[6.25,1.22;1,1.4;elepower_gui_barbg.png^[lowpart:"..percent..":elepower_gui_bar.png^[transformR180]" + + end + + final = final.."image[3.5,0.25;2.8,1;elepower_lighting_flood_rotate_gauge.png^[transformR90]" + final = final.."image[6.25,0;1,2.8;elepower_lighting_flood_tilt_gauge.png]" + + return final +end + +-- register flood on_recieve fields +function elepower_lighting.flood_on_recieve_fields(pos, formname, fields, player) + + local meta = minetest.get_meta(pos) + + if fields.quit then + return + end + + if fields.rot then + local split = string.split(fields.rot, ":") + local new_rot = tonumber(split[2]) + meta:set_int("rotate",new_rot) + + if meta:get_int("on_off") == 1 then + elepower_lighting.remove_flood_light_fill(pos) + elepower_lighting.add_flood_light_fill(pos) + end + + end + + if fields.tilt then + local split = string.split(fields.tilt, ":") + local new_tilt = tonumber(split[2]) + meta:set_int("tilt", new_tilt) + + if meta:get_int("on_off") == 1 then + elepower_lighting.remove_flood_light_fill(pos) + elepower_lighting.add_flood_light_fill(pos) + end + end + --minetest.debug(dump(fields)) +end + +------------------------------------------- +-- Converts node param2 into a primary -- +-- axis and the secondary axis, needed -- +-- to workout and place light_fill -- +------------------------------------------- +function elepower_lighting.p2_to_axis(node_param2) + -- first_key = primary axis, num_key = param2, value = secondary axis/+- + local p2_conv_table = {x = {[0]="z:+1",[2]="z:-1", [4]="y:-1", [6]="y:+1", [8]="y:+1",[10]="y:-1",[20]="z:+1",[22]="z:-1"}, + y = {[5]="x:+1",[7]="x:-1", [9]="x:+1",[11]="x:-1",[12]="z:+1",[14]="z:-1",[16]="z:+1",[18]="z:-1"}, + z = {[1]="x:+1",[3]="x:-1",[13]="y:-1",[15]="y:+1",[17]="y:+1",[19]="y:-1",[21]="x:-1",[23]="x:+1"}} + local light_strip_axis + + for xyz,all_p2 in pairs(p2_conv_table) do + for p2,sec_axis in pairs(all_p2) do + if node_param2 == p2 then + local second_axis_v = string.split(sec_axis, ":") + light_strip_axis = {[xyz] = 1,[second_axis_v[1].."s"] = tonumber(second_axis_v[2])} + break + end + end + end + return light_strip_axis +end + +--------------------------------------------- +-- Simply adds or removes light_fill -- +--------------------------------------------- +function elepower_lighting.add_remove_light_fill(pos,light_strip_axis,light_shape,add_remove) + local x = light_strip_axis.x or 0 + local y = light_strip_axis.y or 0 + local z = light_strip_axis.z or 0 + + local xs = light_strip_axis.xs or 0 + local ys = light_strip_axis.ys or 0 + local zs = light_strip_axis.zs or 0 + local mt_add_remove = minetest.remove_node + local node_name = "elepower_lighting:light_fill" + local add_node + + -- used for adding/setting nodes + if add_remove == 1 then + mt_add_remove = minetest.set_node + node_name = "air" + add_node = {name = "elepower_lighting:light_fill"} + end + + if light_shape == "3x1" then + local pos_p = {x=pos.x+x, y=pos.y+y, z=pos.z+z} + local pos_n = {x=pos.x-x, y=pos.y-y, z=pos.z-z} + + local poses = {pos_p,pos_n} + + for k,p in pairs(poses) do + if minetest.get_node(p).name == node_name then + mt_add_remove(p,add_node) + end + end + + elseif light_shape == "3x2" then + local pos_p = {x=pos.x+x, y=pos.y+y, z=pos.z+z} + local pos_n = {x=pos.x-x, y=pos.y-y, z=pos.z-z} + local pos_ps = {x=pos.x+x+xs, y=pos.y+y+ys, z=pos.z+z+zs} + local pos_cs = {x=pos.x+xs, y=pos.y+ys, z=pos.z+zs} + local pos_ns = {x=pos.x-x+xs, y=pos.y-y+ys, z=pos.z-z+zs} + + local poses = {pos_p,pos_n,pos_ps,pos_cs,pos_ns} + + for k,p in pairs(poses) do + if minetest.get_node(p).name == node_name then + mt_add_remove(p,add_node) + end + end + end +end +--------------------------------------------- +-- Add Flood Light Light nodes -- +--------------------------------------------- +function elepower_lighting.add_flood_light_fill(pos) + local meta = minetest.get_meta(pos) + local node_p2 = minetest.get_node(pos).param2 + local rel_x_y + + --1st axis = face dir, 2nd axis = relative vertical(tilt) + local face_dir = {["z:+1"] = {[0]="y:+1",[12]="x:+1",[16]="x:-1",[20]="y:-1"}, -- North + ["x:+1"] = {[1]="y:+1", [5]="z:+1", [9]="z:-1",[23]="y:-1"}, -- East + ["z:-1"] = {[2]="y:+1",[14]="x:+1",[18]="x:-1",[22]="y:-1"}, -- South + ["x:-1"] = {[3]="y:+1", [7]="z:-1",[11]="z:-1",[21]="y:-1"}, -- West + ["y:+1"] = {[6]="z:+1", [8]="z:-1",[15]="x:+1",[17]="x:-1"}, -- Up + ["y:-1"] = {[4]="z:+1",[10]="z:-1",[13]="x:+1",[19]="x:-1"}} -- Down + + -- Rotation reference table + local rot_dir = {[0] = {x = "x",x_v = "+1",y = "z",y_v = "+1", z="y"}, + [1] = {x = "z",x_v = "-1",y = "x",y_v = "+1", z="y"}, + [2] = {x = "x",x_v = "-1",y = "z",y_v = "-1", z="y"}, + [3] = {x = "z",x_v = "+1",y = "x",y_v = "-1", z="y"}, + + [4] = {x = "x",x_v = "+1",y = "y",y_v = "-1",z="z"}, + [5] = {x = "y",x_v = "+1",y = "x",y_v = "+1",z="z"}, + [6] = {x = "x",x_v = "-1",y = "y",y_v = "+1",z="z"}, + [7] = {x = "y",x_v = "-1",y = "x",y_v = "-1",z="z"}, + + [8] = {x = "x",x_v = "+1",y = "y",y_v = "+1",z="z"}, + [9] = {x = "y",x_v = "-1",y = "x",y_v = "+1",z="z"}, + [10] = {x = "x",x_v = "-1",y = "y",y_v = "-1",z="z"}, + [11] = {x = "y",x_v = "+1",y = "x",y_v = "-1",z="z"}, + + [12] = {x = "y",x_v = "-1",y = "z",y_v = "+1",z="x"}, + [13] = {x = "z",x_v = "-1",y = "y",y_v = "-1",z="x"}, + [14] = {x = "y",x_v = "+1",y = "z",y_v = "-1",z="x"}, + [15] = {x = "z",x_v = "+1",y = "y",y_v = "+1",z="x"}, + + [16] = {x = "y",x_v = "+1",y = "z",y_v = "+1",z="x"}, + [17] = {x = "z",x_v = "-1",y = "y",y_v = "+1",z="x"}, + [18] = {x = "y",x_v = "-1",y = "z",y_v = "-1",z="x"}, + [19] = {x = "z",x_v = "+1",y = "y",y_v = "-1",z="x"}, + + [20] = {x = "x",x_v = "+1",y = "z",y_v = "+1", z="y"}, + [21] = {x = "z",x_v = "+1",y = "x",y_v = "-1", z="y"}, + [22] = {x = "x",x_v = "-1",y = "z",y_v = "-1", z="y"}, + [23] = {x = "z",x_v = "-1",y = "x",y_v = "+1", z="y"}, + } + + for axis,p2s in pairs(face_dir) do + for p2,rel_vert in pairs(p2s) do + if node_p2 == p2 then + local sep_rel_x_axis = string.split(axis,":") + local sep_rel_y_axis = string.split(rel_vert,":") + rel_x_y = {[sep_rel_x_axis[1].."x"] = sep_rel_x_axis[2], + [sep_rel_y_axis[1].."y"] = sep_rel_y_axis[2], + [sep_rel_y_axis[1].."z"] = sep_rel_y_axis[4], + x = sep_rel_x_axis[1], + x_val = sep_rel_x_axis[2], + y = sep_rel_y_axis[1], + y_val = sep_rel_y_axis[2] + } + rot_x_y = rot_dir[node_p2] + end + end + end + + local light_range = 30 + local tilt_angle = meta:get_int("tilt") + local rot_angle = meta:get_int("rotate") + local angle = 90 - rot_angle + + -- Start of Raycast Calculations -- + -- work out rotation find pt on circle - x = cx + r * cos(a) // y = cy + r * sin(a) + -- eg x = rel-x-origin + (light_range*cos((90-rot_angle)*radians) + local x_rel = pos[rot_x_y.x] + (math.floor((30*math.cos(angle*0.0174533))))*tonumber(rot_x_y.x_v) + local y_rel = pos[rot_x_y.y] + (math.floor((30*math.sin(angle*0.0174533))))*tonumber(rot_x_y.y_v) + + local pos_rot = {[rot_x_y.x] = x_rel,[rot_x_y.y] = y_rel, [rot_x_y.z] = pos[rot_x_y.z]} + + -- work out gradient from angle (math.tan needs radians=degrees*0.0174533...) + local grad = math.tan(tilt_angle*0.0174533) + local y_end = math.floor(light_range*grad) + + local xx = (rel_x_y.xx or 0)*light_range + local yx = (rel_x_y.yx or 0)*light_range + local zx = (rel_x_y.zx or 0)*light_range + + local xy = (rel_x_y.xy or 0)*y_end + local yy = (rel_x_y.yy or 0)*y_end + local zy = (rel_x_y.zy or 0)*y_end + + -- pos_s (start) simply add relative x + local pos_s = {x=pos.x+(xx/light_range),y=pos.y+(yx/light_range),z=pos.z+(zx/light_range)} + -- pos_e (end) add both relative x and relative y + local pos_e = {x=pos_rot.x+xx+xy,y=pos_rot.y+yx+yy,z=pos_rot.z+zx+zy} + + meta:set_string("flood_light_pos_s", minetest.serialize(pos_s)) + meta:set_string("flood_light_pos_e", minetest.serialize(pos_e)) + + local ray = minetest.raycast(pos_s,pos_e,false,true) + local ray_next = ray:next() + local end_pos + + while ray_next do + local name = minetest.get_node(ray_next.under).name + local node_draw = minetest.registered_items[name].drawtype + + if node_draw ~= "plantlike" and + node_draw ~= "firelike" and + node_draw ~= "raillike" and + node_draw ~= "torchlike" and + node_draw ~= "signlike" and + name ~= "elepower_lighting:light_fill" then + + local e_pos = ray_next.under + meta:set_string("flood_light_end", minetest.serialize(e_pos)) + + end_pos = {x=e_pos.x-(xx/light_range),y=e_pos.y-(yx/light_range),z=e_pos.z-(zx/light_range)} + break + end + ray_next = ray:next() + end + + local tot = 30 + if end_pos then + tot = math.abs(end_pos[rel_x_y.x] - pos[rel_x_y.x]) + end + + -- Start of light fill calculations + local flood_fill_pos = {} + for i = 1,tot,1 do + local new_pos = table.copy(pos) + + -- calculate rotation position + local x_rel = new_pos[rot_x_y.x] + ((math.floor((i*math.cos(angle*0.0174533))))*tonumber(rot_x_y.x_v)) + 1*tonumber(rot_x_y.x_v) -- last + removes offset from carrier "1" + local y_rel = new_pos[rot_x_y.y] + (math.floor((i*math.sin(angle*0.0174533))))*tonumber(rot_x_y.y_v) + + local pos_rot = {[rot_x_y.x] = x_rel,[rot_x_y.y] = y_rel, [rot_x_y.z] = new_pos[rot_x_y.z]} + + -- adjust for tilt + pos_rot[rel_x_y.x] = (pos_rot[rel_x_y.x] + (1*rel_x_y.x_val)) -- relative X axis + pos_rot[rel_x_y.y] = (pos_rot[rel_x_y.y] + math.ceil((i*rel_x_y.y_val)*grad)) -- relative Y axis + + + --new_pos.x = new_pos.x+(math.floor(0.85*i)) + if minetest.get_node(pos_rot).name == "air" or + minetest.get_node(pos_rot).name == "elepower_lighting:light_fill" then + + table.insert(flood_fill_pos,pos_rot) + minetest.set_node(pos_rot,{name = "elepower_lighting:light_fill"}) + --minetest.debug(rot_x_y.y..":".. rot_x_y.y_v) + + end + end + + meta:set_string("flood_fill_pos", minetest.serialize(flood_fill_pos)) +end +--------------------------------------------- +-- Removes Flood Light Light nodes -- +--------------------------------------------- +function elepower_lighting.remove_flood_light_fill(pos) + local meta = minetest.get_meta(pos) + local flood_fill_pos = minetest.deserialize(meta:get_string("flood_fill_pos")) + + if type(flood_fill_pos) == "table" then + meta:set_string("flood_light_pos_s","") + meta:set_string("flood_light_pos_e","") + meta:set_string("flood_light_end","") + for k,pos in pairs(flood_fill_pos) do + if minetest.get_node(pos).name == "elepower_lighting:light_fill" then + minetest.remove_node(pos) + end + end + end +end + +------------------------------------------- +-- A rotate and place that allows lights -- +-- to mount into wall sockets -- +-- thanks mt forums for below soln idea -- +------------------------------------------- +function elepower_lighting.rot_and_place(itemstack, placer, pointed_thing) + local p0 = pointed_thing.under + local p1 = pointed_thing.above + local param2 = 0 + + if placer then + local placer_pos = placer:get_pos() + if placer_pos then + param2 = minetest.dir_to_facedir(vector.subtract(p1, placer_pos)) + end + + if p0.xp1.x then -- +X + param2 = 16 + param2 + + elseif p0.zp1.z then -- -Z + param2 = 8 + param2 + + elseif p0.yp1.y then -- -Y + param2 = 20 + param2 + end + end + + return minetest.item_place(itemstack, placer, pointed_thing, param2) +end + +------------------------------------ +-- Main Lighting timer, what uses -- +-- EpU's and allows lights to be -- +-- switched on and off -- +------------------------------------ +function elepower_lighting.light_timer(pos) + local meta = minetest.get_meta(pos) + local on_off = meta:get_int("on_off") + local reg_name = minetest.get_node(pos).name + local node_p2 = minetest.get_node(pos).param2 + local name = minetest.registered_items[minetest.get_node(pos).name].description + local light_shape = minetest.registered_items[minetest.get_node(pos).name].ele_light_shape or nil + local capacity = ele.helpers.get_node_property(meta, pos, "capacity") + local storage = ele.helpers.get_node_property(meta, pos, "storage") + local usage = ele.helpers.get_node_property(meta, pos, "usage") + local pow_percent = {capacity = capacity, storage = storage, usage = usage} + local light_strip_axis + local flood_light_change = false + + if light_shape ~= "flood" then + light_strip_axis = elepower_lighting.p2_to_axis(node_p2) + + elseif light_shape == "flood" then + -- need an overide in the event a wall/tree etc is built infront of an "on" flood light beam + local flood_light_end = minetest.deserialize(meta:get_string("flood_light_end")) + local pos_s = minetest.deserialize(meta:get_string("flood_light_pos_s")) + local pos_e = minetest.deserialize(meta:get_string("flood_light_pos_e")) + local e_pos + + if light_shape == "flood" then + + -- change floodlight node for angled/tilted version + local tilt = meta:get_int("tilt") or 0 + local rotate = meta:get_int("rotate") or 0 + local rpn = "p" + local tpn = "p" + local new_name + + if rotate < 0 then + if rotate < -10 then + rpn = "n" + end + rotate = rotate*-1 + end + + if tilt < 0 then + if tilt < -5 then + tpn = "n" + end + tilt = tilt*-1 + end + + if rotate > 10 then + rotate = 45 + else + rotate = 0 + end + + if tilt > 5 then + tilt = 20 + else + tilt = 0 + end + + if not string.find(reg_name, "active") then + new_name = "elepower_lighting:incandescent_floodlight_x"..rpn..rotate.."_y"..tpn..tilt + else + new_name = "elepower_lighting:incandescent_floodlight_x"..rpn..rotate.."_y"..tpn..tilt.."_active" + end + + if new_name ~= reg_name then + ele.helpers.swap_node(pos, new_name) + end + + end + + if pos_s then + local ray = minetest.raycast(pos_s,pos_e,false,true) + local ray_next = ray:next() + + while ray_next do + local name = minetest.get_node(ray_next.under).name + local node_draw = minetest.registered_items[name].drawtype + + if node_draw ~= "plantlike" and + node_draw ~= "firelike" and + node_draw ~= "raillike" and + node_draw ~= "torchlike" and + node_draw ~= "signlike" and + name ~= "elepower_lighting:light_fill" then + + e_pos = ray_next.under + + break + end + ray_next = ray:next() + end + + if minetest.serialize(e_pos) ~= minetest.serialize(flood_light_end) then + flood_light_change = true + end + end + end + + if (storage >= usage and on_off == 1) then + if not string.find(reg_name, "active") or flood_light_change == true then + + if flood_light_change == false then + ele.helpers.swap_node(pos, reg_name.."_active") + + elseif flood_light_change == true then + elepower_lighting.remove_flood_light_fill(pos) + end + + if light_shape == "flood" then + elepower_lighting.add_flood_light_fill(pos) + + elseif light_shape then + elepower_lighting.add_remove_light_fill(pos,light_strip_axis,light_shape,1) + end + + end + + pow_percent.storage = pow_percent.storage - usage + storage = pow_percent.storage + meta:set_int("storage", pow_percent.storage) + else + if string.find(reg_name, "active") then + local name = string.sub(reg_name, 1, -8) + + ele.helpers.swap_node(pos, name) + + if light_shape then + if light_shape == "flood" then + elepower_lighting.remove_flood_light_fill(pos) + + elseif light_shape then + elepower_lighting.add_remove_light_fill(pos,light_strip_axis,light_shape) + end + end + end + end + + meta:set_string("infotext", name .. "\n" .. ele.capacity_text(capacity, storage)) + + if light_shape == "flood" then + local tilt = meta:get_int("tilt") or 0 + local rotate = meta:get_int("rotate") or 0 + meta:set_string("formspec", get_formspec_flood(pow_percent,tilt,rotate)) + end + + return true +end + +--------------------------------------------- +-- Main Colored Lighting timer, what uses -- +-- EpU's and allows lights to be switched -- +-- on and off -- +--------------------------------------------- +elepower_lighting.colors = {{"#ff0500", "Red"}, + {"#ff3500", "Dark Orange"}, + {"#ff6300", "Orange"}, + {"#ff9100", "Light Orange"}, + {"#ffc000", "Golden"}, + {"#ffef00", "Yellow"}, + {"#e1ff00", "Lemon Lime"}, + {"#b3ff00", "Lime"}, + {"#84ff00", "Lawn Green"}, + {"#56ff00", "Bright Green"}, + {"#00ff36", "Green"}, + {"#00ff65", "Spring Green"}, + {"#00ff93", "Sea Green"}, + {"#00ffc2", "Aqua"}, + {"#00fff0", "Turquoise Blue"}, + {"#00dfff", "Sky Blue"}, + {"#00b1ff", "Vivid Blue"}, + {"#0082ff", "Azure"}, + {"#0053ff", "Blue"}, + {"#0024ff", "Blue Bonnet"}, + {"#0900ff", "Dark Blue"}, + {"#3800ff", "Blue Purple"}, + {"#6700ff", "Indigo"}, + {"#9500ff", "Violet"}, + {"#c400ff", "Orchid"}, + {"#f200ff", "Magenta"}, + {"#ff00dd", "Hot Pink"}, + {"#ff00af", "Shocking Pink"}, + {"#ff0080", "Pink"}, + {"#ff0051", "Apple Red"}, + {"#ffffff", "White"}, + {"#000000", "Black"} + } + +local function get_formspec_panel_color(power,color_mode,color_sync) + local color_m = color_mode + local color_s = color_sync + + if tonumber(color_m) then + color_m = "Single Color-"..elepower_lighting.colors[(color_m/8)][2] + + else + color_m = color_m:gsub("^%l", string.upper) + end + + local final ="size[8,3]".. + "container[0,0.1]".. + ele.formspec.power_meter(power).. + "container_end[]".. + "label[1,-0.05;Current Selection: "..color_m.."]".. + "checkbox[6,-0.25;sync;Synchronize;"..color_s.."]".. + "image_button[1,0.4;2,0.75;elepower_lighting_gui_rainbow_button.png;r_color;Rainbow;false;true;elepower_lighting_gui_rainbow_button.png^[opacity:127]".. + "image_button[1,1.1;2,0.75;elepower_lighting_gui_strobe_button.png;r_color;Strobe;false;true;elepower_lighting_gui_strobe_button.png^[opacity:127]".. + "image_button[1,1.8;2,0.75;elepower_lighting_gui_blue_button.png;r_color;Blues;false;true;elepower_lighting_gui_blue_button.png^[opacity:127]".. + "image_button[1,2.5;2,0.75;elepower_lighting_gui_red_button.png;r_color;Reds;false;true;elepower_lighting_gui_red_button.png^[opacity:127]" + + for k,def in pairs(elepower_lighting.colors) do + + local image_end = "elepower_lighting_gui_color_button.png^[multiply:".. + def[1]..";f_color;"..((k)*8).. + ";false;true;elepower_lighting_gui_color_button.png^[multiply:".. + def[1].."^[opacity:127]]" + + final = final.."style[f_color;font_size=0;textcolor="..def[1].."]" + if k <= 8 then + final = final.."image_button["..(3.0+((k-1)*0.6))..",0.4;0.75,0.75;"..image_end + final = final.."tooltip["..(3.0+((k-1)*0.6))..",0.4;0.55,0.65;"..def[2]..";#30434c;#f9f9f9]" + + elseif k > 8 and k < 17 then + final = final.."image_button["..(3.0+((k-9)*0.6))..",1.1;0.75,0.75;"..image_end + final = final.."tooltip["..(3.0+((k-9)*0.6))..",1.1;0.55,0.65;"..def[2]..";#30434c;#f9f9f9]" + + elseif k > 16 and k < 25 then + final = final.."image_button["..(3.0+((k-17)*0.6))..",1.8;0.75,0.75;"..image_end + final = final.."tooltip["..(3.0+((k-17)*0.6))..",1.8;0.55,0.65;"..def[2]..";#30434c;#f9f9f9]" + + else + final = final.."image_button["..(3.0+((k-25)*0.6))..",2.5;0.75,0.75;"..image_end + final = final.."tooltip["..(3.0+((k-25)*0.6))..",2.5;0.55,0.65;"..def[2]..";#30434c;#f9f9f9]" + end + + end + + return final +end + +-- register color on_recieve fields +function elepower_lighting.color_on_recieve_fields(pos, formname, fields, player) + + local meta = minetest.get_meta(pos) + + if fields.quit then + return + end + + if fields.r_color == "Rainbow" then + meta:set_string("color_mode","rainbow") + + elseif fields.r_color == "Strobe" then + meta:set_string("color_mode","strobe") + + elseif fields.r_color == "Blues" then + meta:set_string("color_mode","blues") + + elseif fields.r_color == "Reds" then + meta:set_string("color_mode","reds") + + elseif fields.f_color then + meta:set_string("color_mode",fields.f_color) + + elseif fields.sync then + meta:set_string("color_sync",tostring(fields.sync)) + + end + + --minetest.debug(dump(fields)) +end + +function elepower_lighting.light_timer_colored(pos) + local meta = minetest.get_meta(pos) + local on_off = meta:get_int("on_off") + local cycles = meta:get_int("light_color_count") + local color_mode = meta:get_string("color_mode") or "rainbow" + local color_sync = meta:get_string("color_sync") or "false" + local run_bwd = meta:get_string("run_bwd") or "false" + local node = minetest.get_node(pos) + local name = minetest.registered_items[minetest.get_node(pos).name].description + local reg_name = minetest.get_node(pos).name + local capacity = ele.helpers.get_node_property(meta, pos, "capacity") + local storage = ele.helpers.get_node_property(meta, pos, "storage") + local usage = ele.helpers.get_node_property(meta, pos, "usage") + local pow_percent = {capacity = capacity, storage = storage, usage = usage} + local strobe_ok = true + local is_timer = true + + + if cycles == 5 then --(1 second) + if (storage >= usage and on_off == 1) then + if not string.find(reg_name, "active") and color_mode ~= "strobe" then + ele.helpers.swap_node(pos, reg_name.."_active") + + end + + pow_percent.storage = pow_percent.storage - usage + storage = pow_percent.storage + meta:set_int("storage", pow_percent.storage) + else + if string.find(reg_name, "active") then + local name = string.sub(reg_name, 1, -8) + ele.helpers.swap_node(pos, name) + strobe_ok = false + + end + end + + meta:set_string("formspec", get_formspec_panel_color(pow_percent,color_mode,color_sync)) + meta:set_string("infotext", name .. "\n" .. ele.capacity_text(capacity, storage)) + + cycles = 0 + end + + node = minetest.get_node(pos) + + if string.find(node.name, "active") or strobe_ok then + + if color_mode == "rainbow" then + + if color_sync == "true" then + local sync_total = 30 + local node_plain_p2 = node.param2 % 8 + + col_seq = math.ceil(sync_total*((((elepower_lighting.timer/0.2))/sync_total)%1)) + node.param2 = node_plain_p2 + ((col_seq*8)-8) + minetest.swap_node(pos, node) + + else + node.param2 = node.param2+8 + + if node.param2 >=240 then + node.param2 = (node.param2 % 32) + end + + minetest.swap_node(pos, node) + end + + elseif color_mode == "blues" or color_mode == "reds" then + local blues_seq_p2 = {120,128,136,144,152,160,168} + local reds_seq_p2 = {200,208,216,224,232,0} + local node_plain_p2 = node.param2 % 8 + local cur_color_p2 = math.floor(node.param2/8)*8 + local col_seq = 1 + local change = 1 + local col_seq_p2 = blues_seq_p2 + local sync_total = #blues_seq_p2-1 + + if color_mode == "reds" then + col_seq_p2 = reds_seq_p2 + sync_total = #reds_seq_p2-1 + end + + if color_sync == "true" then + if math.floor(((elepower_lighting.timer/0.2)/sync_total)%2) == 0 then + --minetest.debug("bwd: ".. (sync_total+1)-math.ceil(sync_total*((((elepower_lighting.timer/0.2))/sync_total)%1))) + col_seq = (sync_total+1)-math.ceil(sync_total*((((elepower_lighting.timer/0.2))/sync_total)%1)) + change = 0 + meta:set_string("run_bwd", "true") + + else + --minetest.debug("fwd: ".. 1+math.ceil(sync_total*((((elepower_lighting.timer/0.2))/sync_total)%1))) + col_seq = 1+math.ceil(sync_total*((((elepower_lighting.timer/0.2))/sync_total)%1)) + change = 0 + meta:set_string("run_bwd", "false") + end + + else + for k,v in pairs(col_seq_p2 ) do + if v == cur_color_p2 then + col_seq = k + end + end + + if (col_seq == #col_seq_p2 or run_bwd == "true") and col_seq ~= 1 then + meta:set_string("run_bwd", "true") + change = -1 + + elseif col_seq == 1 then + meta:set_string("run_bwd", "false") + end + end + + --minetest.debug(col_seq+change) + node.param2 = col_seq_p2[col_seq+change] + node_plain_p2 + minetest.swap_node(pos, node) + + elseif color_mode == "strobe" then + + if color_sync == "true" then + + local col_seq = math.ceil(math.floor((elepower_lighting.timer/0.2)+0.5)%2) + + if col_seq == 1 then + if not string.find(reg_name, "active") then + ele.helpers.swap_node(pos, reg_name.."_active") + end + + else + if string.find(reg_name, "active") then + local name = string.sub(reg_name, 1, -8) + ele.helpers.swap_node(pos, name) + end + end + + else + + if string.find(reg_name, "active") then + local name = string.sub(reg_name, 1, -8) + ele.helpers.swap_node(pos, name) + + else + ele.helpers.swap_node(pos, reg_name.."_active") + end + end + + elseif type(tonumber(color_mode)) == "number" then + + local node_plain_p2 = node.param2 % 8 + local cur_color_p2 = math.floor(node.param2/8)*8 + + if color_mode-8 ~= cur_color_p2 then + node.param2 = color_mode-8 + node_plain_p2 + minetest.swap_node(pos, node) + end + + else + -- catch error state set to white + local node_plain_p2 = node.param2 % 8 + node.param2 = node_plain_p2 + 240 + minetest.swap_node(pos, node) + end + + + end + + local timer = minetest.get_node_timer(pos) + + if timer:get_timeout() ~= 0.2 then + timer:start(0.2) + is_timer = false + end + + meta:set_int("light_color_count",cycles+1) + + + return is_timer +end + +elepower_lighting.timer = 0 +minetest.register_globalstep(function(dtime) + -- note counter shouldn't cause an issue until uptime exceeds about 7million yrs + elepower_lighting.timer = elepower_lighting.timer + dtime; + +end) + +----------------------------------------- +-- Lighting simple functions for basic -- +-- node functionality -- +----------------------------------------- +-- set light on/off by punch +function elepower_lighting.light_punch(pos,player) + local meta = minetest.get_meta(pos) + local on_off = meta:get_int("on_off") or 1 + + if on_off == 1 then + on_off = 0 + + else + on_off = 1 + end + meta:set_int("on_off",on_off) +end + +-- set lights to on when constructed +function elepower_lighting.light_construct(pos) + local meta = minetest.get_meta(pos) + meta:set_int("on_off",1) + + local is_colored = minetest.registered_items[minetest.get_node(pos).name].palette or nil + + if is_colored then + meta:set_string("color_mode","rainbow") + local timer = minetest.get_node_timer(pos) + timer:start(0.2) + end + +end + +-- Main place function +function elepower_lighting.light_place(itemstack, placer, pointed_thing) + if pointed_thing.type ~= "node" then + return itemstack + end + + return elepower_lighting.rot_and_place(itemstack, placer, pointed_thing) +end + +-- For lights more than 1x1 cleanup light_fill on destruction +function elepower_lighting.light_strip_cleanup(pos) + + local node_p2 = minetest.get_node(pos).param2 + local light_shape = minetest.registered_items[minetest.get_node(pos).name].ele_light_shape or nil + local light_strip_axis = elepower_lighting.p2_to_axis(node_p2) + + if light_shape == "flood" then + elepower_lighting.remove_flood_light_fill(pos) + + else + elepower_lighting.add_remove_light_fill(pos,light_strip_axis,light_shape) + end + + end \ No newline at end of file diff --git a/elepower_lighting/i_register_flood_lights.lua b/elepower_lighting/i_register_flood_lights.lua new file mode 100644 index 0000000..76283a0 --- /dev/null +++ b/elepower_lighting/i_register_flood_lights.lua @@ -0,0 +1,139 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Register Nodes - Flood Lights -- +------------------------------------------------------ + +local flood_light_angles = { + xp0_yp0 = {groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xp0_yp20 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xp0_yn20 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xp45_yp0 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xp45_yp20 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xp45_yn20 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xn45_yp0 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xn45_yp20 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"}, + xn45_yn20 = {groups = {cracky = 1, ele_user = 1, not_in_creative_inventory = 1}, drops = "elepower_lighting:incandescent_floodlight_xp0_yp0"} + } + +for angle,def in pairs(flood_light_angles) do + ele.register_machine("elepower_lighting:incandescent_floodlight_"..angle, { + description = "Flood Light Incandescent ", + drawtype = "mesh", + mesh = "flood_light_"..angle..".obj", + tiles = {"elepower_lighting_flood_light_off.png"}, + inventory_image = "elepower_lighting_flood_light_inv.png", + selection_box = { + type = "fixed", + fixed = {-0.375, -0.5, -0.375, 0.375, 0.313, 0.5} + }, + collision_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5} + }, + ele_active_node = true, + ele_active_nodedef = { + tiles = {"elepower_lighting_flood_light_on.png"}, + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + drops = def.drops, + groups = def.groups, + ele_capacity = 64, + ele_usage = 8, + ele_inrush = 8, + ele_light_shape = "flood", + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place, + on_destruct = elepower_lighting.light_strip_cleanup, + on_receive_fields = elepower_lighting.flood_on_recieve_fields + }) +end + +for angle,def in pairs(flood_light_angles) do + ele.register_machine("elepower_lighting:cf_floodlight_"..angle, { + description = "Flood Light CF", + drawtype = "mesh", + mesh = "flood_light_"..angle..".obj", + tiles = {"elepower_lighting_flood_light_off.png"}, + inventory_image = "elepower_lighting_cf_flood_light_inv.png", + selection_box = { + type = "fixed", + fixed = {-0.375, -0.5, -0.375, 0.375, 0.313, 0.5} + }, + collision_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5} + }, + ele_active_node = true, + ele_active_nodedef = { + tiles = {"elepower_lighting_cf_flood_light_on.png"}, + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + drops = def.drops, + groups = def.groups, + ele_capacity = 128, + ele_usage = 4, + ele_inrush = 16, + ele_light_shape = "flood", + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place, + on_destruct = elepower_lighting.light_strip_cleanup, + on_receive_fields = elepower_lighting.flood_on_recieve_fields + }) +end + +for angle,def in pairs(flood_light_angles) do + ele.register_machine("elepower_lighting:led_floodlight_"..angle, { + description = "Flood Light LED", + drawtype = "mesh", + mesh = "flood_light_"..angle..".obj", + tiles = {"elepower_lighting_flood_light_off.png"}, + inventory_image = "elepower_lighting_led_flood_light_inv.png", + selection_box = { + type = "fixed", + fixed = {-0.375, -0.5, -0.375, 0.375, 0.313, 0.5} + }, + collision_box = { + type = "fixed", + fixed = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5} + }, + ele_active_node = true, + ele_active_nodedef = { + tiles = {"elepower_lighting_flood_light_on.png"}, + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + drops = def.drops, + groups = def.groups, + ele_capacity = 192, + ele_usage = 2, + ele_inrush = 16, + ele_light_shape = "flood", + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place, + on_destruct = elepower_lighting.light_strip_cleanup, + on_receive_fields = elepower_lighting.flood_on_recieve_fields + }) +end \ No newline at end of file diff --git a/elepower_lighting/i_register_nodes.lua b/elepower_lighting/i_register_nodes.lua new file mode 100644 index 0000000..88d9deb --- /dev/null +++ b/elepower_lighting/i_register_nodes.lua @@ -0,0 +1,407 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Register Nodes -- +------------------------------------------------------ +---------------- +-- Light Fill -- +---------------- +minetest.register_node("elepower_lighting:light_fill", { + description = "Light Fill", + drawtype = "airlike", + paramtype = "light", + --tiles = {"elepower_lighting_light_fill.png"}, -- debugging + sunlight_propagates = true, + walkable = false, + pointable = false, + diggable = true, + climbable = false, + buildable_to = true, + drop = "", + is_ground_content = false, + groups = {not_in_creative_inventory = 1}, + light_source = elepower_lighting.maxlight, +}) +------------- +-- Conduit -- +------------- +ele.register_conduit("elepower_lighting:conduit_iron_thin", { + description = "Conduit Decorative Cast Iron Thin", + tiles = {"elepower_lighting_conduit_iron_thin.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 1/8, + groups = {cracky = 2} +}) + +ele.register_conduit("elepower_lighting:conduit_iron_thick", { + description = "Conduit Decorative Cast Iron Thick", + tiles = {"elepower_lighting_conduit_iron_thick.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 2/8, + groups = {cracky = 2} +}) + +ele.register_conduit("elepower_lighting:conduit_steel_thin", { + description = "Conduit Decorative Steel Thin", + tiles = {"elepower_lighting_conduit_steel_thin.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 1/8, + groups = {cracky = 2} +}) + +ele.register_conduit("elepower_lighting:conduit_steel_thick", { + description = "Conduit Decorative Steel Thick", + tiles = {"elepower_lighting_conduit_steel_thick.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 2/8, + groups = {cracky = 2} +}) + +ele.register_conduit("elepower_lighting:conduit_gold_thin", { + description = "Conduit Decorative Gold Thin", + tiles = {"elepower_lighting_conduit_gold_thin.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 1/8, + groups = {cracky = 1} +}) + +ele.register_conduit("elepower_lighting:conduit_gold_thick", { + description = "Conduit Decorative Gold Thick", + tiles = {"elepower_lighting_conduit_gold_thick.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 2/8, + groups = {cracky = 1} +}) + +ele.register_conduit("elepower_lighting:conduit_wood_thin", { + description = "Conduit Decorative Wood Thin", + tiles = {"elepower_lighting_conduit_wood_thin.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 1/8, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +ele.register_conduit("elepower_lighting:conduit_wood_thick", { + description = "Conduit Decorative Wood Thick", + tiles = {"elepower_lighting_conduit_wood_thick.png"}, + use_texture_alpha = "clip", + ele_conductor_density = 2/8, + groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 2} +}) + +------------ +-- Lights -- +------------ +ele.register_machine("elepower_lighting:bulb_incandescent", { + description = "Bulb Incandescent", + drawtype = "mesh", + mesh = "incandescent_light_bulb.obj", + tiles = {"elepower_lighting_incandescent_light_off.png"}, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.1875, 0.25} + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_incandescent_light_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 32, + ele_usage = 4, + ele_inrush = 8, + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place +}) + +ele.register_machine(":elepower_dynamics:uv_bulb", { + description = "UV Bulb Incandescent", + drawtype = "mesh", + mesh = "incandescent_light_bulb.obj", + tiles = {"elepower_lighting_incandescent_uv_light_off.png"}, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.1875, 0.25} + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = 7, + tiles = {"elepower_lighting_incandescent_uv_light_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 32, + ele_usage = 4, + ele_inrush = 8, + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place +}) + + +ele.register_machine("elepower_lighting:bulb_cf", { + description = "Bulb Compact Fluro", + drawtype = "mesh", + mesh = "cf_light_bulb.obj", + tiles = {"elepower_lighting_cf_light_off.png"}, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3125, 0.25} + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_cf_light_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 64, + ele_usage = 2, + ele_inrush = 16, + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place +}) + +ele.register_machine("elepower_lighting:fluro_light_bank", { + description = "Fluro Light Bank", + drawtype = "mesh", + mesh = "fluro_light_bank.obj", + tiles = {"elepower_lighting_fluro_light_bank_off.png"}, + inventory_image = "elepower_lighting_fluro_light_bank_inv.png", + selection_box = { + type = "fixed", + fixed = {-1, -0.5, -0.375, 1, -0.125, 0.375} + }, + collision_box = { + type = "fixed", + fixed = {-1, -0.5, -0.375, 1, -0.125, 0.375} + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_fluro_light_bank_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 64, + ele_usage = 3, + ele_inrush = 16, + ele_light_shape = "3x1", + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place, + on_destruct = elepower_lighting.light_strip_cleanup +}) + + +ele.register_machine("elepower_lighting:bulb_led", { + description = "Bulb Light-Emitting Diode", + drawtype = "mesh", + mesh = "incandescent_light_bulb.obj", + tiles = {"elepower_lighting_led_light_bulb_off.png"}, + selection_box = { + type = "fixed", + fixed = {-0.25, -0.5, -0.25, 0.25, 0.3125, 0.25} + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_led_light_bulb_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 96, + ele_usage = 1, + ele_inrush = 16, + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place +}) + + +ele.register_machine("elepower_lighting:led_light_panel", { + description = "LED Light Panel", + drawtype = "mesh", + mesh = "led_light_panel_1x1.obj", + tiles = {"elepower_lighting_led_light_off.png"}, + selection_box = { + type = "fixed", + fixed = { + {-0.5000, -0.5000, -0.5000, 0.5000, -0.2500, 0.5000} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5000, -0.5000, -0.5000, 0.5000, -0.2500, 0.5000} + } + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_led_light_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 96, + ele_usage = 1, + ele_inrush = 16, + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place +}) + +ele.register_machine("elepower_lighting:led_light_panel_colored", { + description = 'LED Light Panel Colored', + drawtype = "mesh", + mesh = "led_light_panel_1x1.obj", + tiles = {"elepower_lighting_led_light_off.png"}, + selection_box = { + type = "fixed", + fixed = { + {-0.5000, -0.5000, -0.5000, 0.5000, -0.2500, 0.5000} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.5000, -0.5000, -0.5000, 0.5000, -0.2500, 0.5000} + } + }, + ele_active_node = true, + ele_active_nodedef = { + paramtype2 = 'colorwallmounted', + palette = 'palette_32.png', + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_led_light_on.png"} + }, + is_ground_content = false, + paramtype = "light", + sunlight_propagates = true, + paramtype2 = 'wallmounted', + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 96, + ele_usage = 1, + ele_inrush = 16, + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer_colored, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_receive_fields = elepower_lighting.color_on_recieve_fields + --on_place = elepower_lighting.light_place + +}) + +ele.register_machine("elepower_lighting:led_1x3_light_panel", { + description = "LED 1x3 Light Panel", + drawtype = "mesh", + mesh = "led_light_panel_1x3.obj", + tiles = {"elepower_lighting_led_light_1x3_off.png"}, + inventory_image = "elepower_lighting_led_light_1x3_inv.png", + selection_box = { + type = "fixed", + fixed = { + {-1.5000, -0.5000, -0.5000, 1.5000, -0.2500, 0.5000} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-1.5000, -0.5000, -0.5000, 1.5000, -0.2500, 0.5000} + } + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_led_light_1x3_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 288, + ele_usage = 1, + ele_inrush = 16, + ele_light_shape = "3x1", + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place, + on_destruct = elepower_lighting.light_strip_cleanup +}) + + +ele.register_machine("elepower_lighting:led_2x3_light_panel", { + description = "LED 2x3 Light Panel", + drawtype = "mesh", + mesh = "led_light_panel_2x3.obj", + tiles = {"elepower_lighting_led_light_2x3_off.png"}, + inventory_image = "elepower_lighting_led_light_2x3_inv.png", + selection_box = { + type = "fixed", + fixed = { + {-1.5000, -0.5000, -0.5000, 1.5000, -0.2500, 1.5000} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-1.5000, -0.5000, -0.5000, 1.5000, -0.2500, 1.5000} + } + }, + ele_active_node = true, + ele_active_nodedef = { + light_source = elepower_lighting.maxlight, + tiles = {"elepower_lighting_led_light_2x3_on.png"} + }, + use_texture_alpha = "clip", + paramtype = "light", + sunlight_propagates = true, + groups = {cracky = 1, ele_user = 1, ele_lighting = 1}, + ele_capacity = 576, + ele_usage = 1, + ele_inrush = 16, + ele_light_shape = "3x2", + ele_no_automatic_ports = true, + on_timer = elepower_lighting.light_timer, + on_punch = elepower_lighting.light_punch, + on_construct = elepower_lighting.light_construct, + on_place = elepower_lighting.light_place, + on_destruct = elepower_lighting.light_strip_cleanup +}) \ No newline at end of file diff --git a/elepower_lighting/i_register_nodes_shades.lua b/elepower_lighting/i_register_nodes_shades.lua new file mode 100644 index 0000000..6149f75 --- /dev/null +++ b/elepower_lighting/i_register_nodes_shades.lua @@ -0,0 +1,123 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- Register Nodes Shades -- +------------------------------------------------------ + +local light_shades_signlike = { + "Light Shade Timber Cross", + "Light Shade Timber Stripe", + "Light Shade Timber Decorative Stripe", + "Light Shade Timber Round", + "Light Shade Timber Small Round" + } + +for num,name in pairs(light_shades_signlike) do + + minetest.register_node("elepower_lighting:decor_shade_"..num, { + description = name, + drawtype = "signlike", + tiles = {"elepower_lighting_decor_surrond_"..num..".png"}, + selection_box = { + type = "fixed", + fixed = { + {-0.57, -0.5, -0.57, 0.57, -0.43, 0.57} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.56, -0.5, -0.56, 0.56, -0.44, 0.56} + } + }, + visual_scale = 1.13, + paramtype2 = "wallmounted", + sunlight_propagates = true, + groups = {snappy = 3} +}) + +end + +for num,name in pairs(light_shades_signlike) do + + minetest.register_node("elepower_lighting:decor_shade_red_"..num, { + description = name.." Red", + drawtype = "signlike", + tiles = {"elepower_lighting_decor_surrond_red_"..num..".png"}, + selection_box = { + type = "fixed", + fixed = { + {-0.57, -0.5, -0.57, 0.57, -0.43, 0.57} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.56, -0.5, -0.56, 0.56, -0.44, 0.56} + } + }, + visual_scale = 1.13, + paramtype2 = "wallmounted", + sunlight_propagates = true, + groups = {snappy = 3} +}) + +end + +for num,name in pairs(light_shades_signlike) do + + minetest.register_node("elepower_lighting:decor_shade_blue_"..num, { + description = name.." Blue", + drawtype = "signlike", + tiles = {"elepower_lighting_decor_surrond_blue_"..num..".png"}, + selection_box = { + type = "fixed", + fixed = { + {-0.57, -0.5, -0.57, 0.57, -0.43, 0.57} + } + }, + collision_box = { + type = "fixed", + fixed = { + {-0.56, -0.5, -0.56, 0.56, -0.44, 0.56} + } + }, + visual_scale = 1.13, + paramtype2 = "wallmounted", + sunlight_propagates = true, + groups = {snappy = 3} +}) + +end + +minetest.register_craftitem("elepower_lighting:paper_red", { + description = "Red Paper", + inventory_image = "elepower_lighting_paper_red.png", + groups = {flammable = 3} +}) + +minetest.register_craftitem("elepower_lighting:paper_blue", { + description = "Blue Paper", + inventory_image = "elepower_lighting_paper_blue.png", + groups = {flammable = 3} +}) + +minetest.register_craft({ + type = "fuel", + recipe = "elepower_lighting:paper_red", + burntime = 1, +}) + +minetest.register_craft({ + type = "fuel", + recipe = "elepower_lighting:paper_blue", + burntime = 1, +}) diff --git a/elepower_lighting/init.lua b/elepower_lighting/init.lua new file mode 100644 index 0000000..2dee094 --- /dev/null +++ b/elepower_lighting/init.lua @@ -0,0 +1,31 @@ +------------------------------------------------------ +-- ___ _ -- +-- | __| |___ _ __ _____ __ _____ _ _ -- +-- | _|| / -_) '_ \/ _ \ V V / -_) '_| -- +-- |___|_\___| .__/\___/\_/\_/\___|_| -- +-- _ _ |_| _ _ _ -- +-- | | (_)__ _| |_| |_(_)_ _ __ _ -- +-- | |__| / _` | ' \ _| | ' \/ _` | -- +-- |____|_\__, |_||_\__|_|_||_\__, | -- +-- |___/ |___/ -- +------------------------------------------------------ +-- -- +------------------------------------------------------ +-- Global variable for mod +elepower_lighting = {} +elepower_lighting.maxlight = 14 + +-- path, modname and translation +local modname = minetest.get_current_modname() +local modpath = minetest.get_modpath(modname) +elepower_lighting.S = minetest.get_translator(modname) +local S = elepower_lighting.S + +-- includes +dofile(modpath .. "/i_functions.lua") +dofile(modpath .. "/i_register_nodes.lua") +dofile(modpath .. "/i_register_nodes_shades.lua") +dofile(modpath .. "/i_register_flood_lights.lua") +dofile(modpath .. "/i_craftitems.lua") +dofile(modpath .. "/i_crafting.lua") +dofile(modpath .. "/i_crafting_shades.lua") \ No newline at end of file diff --git a/elepower_lighting/mod.conf b/elepower_lighting/mod.conf new file mode 100644 index 0000000..cd18420 --- /dev/null +++ b/elepower_lighting/mod.conf @@ -0,0 +1,4 @@ +name = elepower_lighting +description = Elepower Lighting! +depends = elepower_dynamics +optional_depends = diff --git a/elepower_lighting/models/cf_light_bulb.obj b/elepower_lighting/models/cf_light_bulb.obj new file mode 100644 index 0000000..d8f1d43 --- /dev/null +++ b/elepower_lighting/models/cf_light_bulb.obj @@ -0,0 +1,265 @@ +# Blender v2.90.1 OBJ File: 'light_bulb_ccf.blend' +# www.blender.org +mtllib ccf_light_bulb.mtl +o group_20_ID140 +v 0.125000 -0.290667 -0.125000 +v 0.125000 -0.500000 0.125000 +v -0.125000 -0.500000 0.125000 +v -0.125000 -0.290667 0.125000 +v 0.125000 -0.500000 -0.125000 +v -0.125000 -0.500000 -0.125000 +v 0.125000 -0.290667 0.125000 +v -0.125000 -0.290667 -0.125000 +v -0.250000 -0.312500 0.250000 +v -0.250000 -0.187500 0.250000 +v 0.250000 -0.187500 -0.250000 +v -0.250000 -0.187500 -0.250000 +v 0.250000 -0.312500 -0.250000 +v -0.250000 -0.312500 -0.250000 +v 0.250000 -0.312500 0.250000 +v 0.250000 -0.187500 0.250000 +v -0.031250 -0.187500 0.221344 +v -0.031250 0.312500 0.221344 +v -0.031250 0.312500 -0.216157 +v -0.031250 0.124750 -0.028407 +v -0.031250 -0.187500 0.033594 +v -0.218750 0.312500 -0.216157 +v -0.218750 0.312500 0.221344 +v -0.218750 -0.187500 0.033594 +v -0.218750 -0.187500 0.221344 +v -0.218750 -0.187500 -0.028407 +v -0.218750 -0.187500 -0.216157 +v -0.031250 -0.187500 -0.028407 +v -0.031250 -0.187500 -0.216157 +v -0.218750 0.124750 -0.028407 +v -0.031250 0.124750 0.033594 +v -0.218750 0.124750 0.033594 +v 0.218750 -0.187500 0.221344 +v 0.218750 0.312500 0.221344 +v 0.218750 0.312500 -0.216157 +v 0.218750 0.124750 -0.028407 +v 0.218750 -0.187500 0.033594 +v 0.031250 0.312500 -0.216157 +v 0.031250 0.312500 0.221344 +v 0.031250 -0.187500 0.033594 +v 0.031250 -0.187500 0.221344 +v 0.031250 -0.187500 -0.028407 +v 0.031250 -0.187500 -0.216157 +v 0.218750 -0.187500 -0.028407 +v 0.218750 -0.187500 -0.216157 +v 0.031250 0.124750 -0.028407 +v 0.218750 0.124750 0.033594 +v 0.031250 0.124750 0.033594 +vt 0.937500 0.312500 +vt 0.687500 0.062500 +vt 0.687500 0.312500 +vt 0.687500 0.500000 +vt 0.937500 0.500000 +vt 0.687500 0.500000 +vt 0.937500 0.312500 +vt 0.937500 0.500000 +vt 0.937500 0.312500 +vt 0.937500 0.500000 +vt 0.687500 0.500000 +vt 0.937500 0.312500 +vt 0.687500 0.062500 +vt 0.937500 0.062500 +vt 0.500000 0.500000 +vt -0.000000 -0.000000 +vt 0.500000 -0.000000 +vt 0.500000 0.000000 +vt 0.625000 0.500000 +vt 0.625000 0.000000 +vt 0.500000 -0.000000 +vt 0.000000 0.500000 +vt 0.500000 0.500000 +vt 0.625000 -0.000000 +vt 0.500000 0.500000 +vt 0.500000 -0.000000 +vt 0.500000 0.500000 +vt 0.625000 0.500000 +vt 0.625000 0.000000 +vt 0.625000 1.000000 +vt 0.812500 0.562500 +vt 0.812500 1.000000 +vt 0.437500 0.500000 +vt 0.187500 0.687500 +vt 0.000000 0.500000 +vt 0.437500 0.500000 +vt 0.625000 1.000000 +vt 0.437500 1.000000 +vt 0.437500 1.000000 +vt 0.625000 0.500000 +vt 0.437500 0.500000 +vt 0.000000 0.500000 +vt 0.250000 0.687500 +vt 0.437500 0.500000 +vt 1.000000 0.875000 +vt 0.812500 0.687500 +vt 0.812500 0.875000 +vt 0.812500 1.000000 +vt 1.000000 0.687500 +vt 0.812500 0.687500 +vt 0.812500 1.000000 +vt 1.000000 0.687500 +vt 1.000000 1.000000 +vt 1.000000 0.875000 +vt 0.812500 0.687500 +vt 0.812500 0.875000 +vt 0.812500 0.875000 +vt 0.625000 1.000000 +vt 0.812500 0.562500 +vt 0.812500 1.000000 +vt 0.437500 0.500000 +vt 0.187500 0.687500 +vt 0.000000 0.500000 +vt 0.437500 1.000000 +vt 0.625000 0.500000 +vt 0.625000 1.000000 +vt 0.812500 1.000000 +vt 1.000000 0.687500 +vt 1.000000 1.000000 +vt -0.000000 0.500000 +vt 0.250000 0.687500 +vt 0.437500 0.500000 +vt 0.437500 1.000000 +vt 0.625000 0.500000 +vt 0.437500 0.500000 +vt 0.812500 0.875000 +vt 0.812500 1.000000 +vt 1.000000 0.687500 +vt 0.812500 0.687500 +vt 1.000000 0.875000 +vt 0.812500 0.687500 +vt 0.812500 0.875000 +vt 1.000000 0.875000 +vt 0.812500 0.687500 +vt 0.812500 0.875000 +vt 0.937500 0.062500 +vt 0.687500 0.312500 +vt 0.687500 0.312500 +vt 0.687500 0.312500 +vt -0.000000 0.500000 +vt 0.500000 0.500000 +vt 0.000000 -0.000000 +vt 0.625000 0.500000 +vt 0.625000 0.562500 +vt 0.437500 1.000000 +vt 0.250000 0.687500 +vt 0.250000 1.000000 +vt 0.187500 1.000000 +vt 0.000000 1.000000 +vt 0.625000 0.500000 +vt 0.625000 1.000000 +vt 0.000000 1.000000 +vt 0.187500 0.687500 +vt 0.187500 1.000000 +vt 0.250000 1.000000 +vt 0.437500 1.000000 +vt 1.000000 0.687500 +vt 1.000000 1.000000 +vt 1.000000 0.875000 +vt 0.625000 0.562500 +vt 0.437500 1.000000 +vt 0.250000 0.687500 +vt 0.250000 1.000000 +vt 0.187500 1.000000 +vt 0.000000 1.000000 +vt 0.437500 0.500000 +vt -0.000000 1.000000 +vt 0.187500 0.687500 +vt 0.187500 1.000000 +vt 0.250000 1.000000 +vt 0.437500 1.000000 +vt 0.625000 1.000000 +vt 1.000000 0.875000 +vt 1.000000 1.000000 +vt 1.000000 0.687500 +vn 0.0000 -1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +usemtl material +s off +f 5/1/1 3/2/1 6/3/1 +f 7/4/2 5/1/2 1/5/2 +f 4/6/3 2/7/3 7/8/3 +f 6/9/4 4/6/4 8/10/4 +f 1/5/5 6/3/5 8/11/5 +f 1/12/6 4/13/6 7/14/6 +f 11/15/6 10/16/6 16/17/6 +f 14/18/4 10/19/4 12/20/4 +f 15/21/1 14/22/1 13/23/1 +f 11/24/2 15/25/2 13/26/2 +f 11/24/5 14/27/5 12/28/5 +f 10/19/3 15/21/3 16/29/3 +f 22/30/6 18/31/6 19/32/6 +f 18/33/2 20/34/2 19/35/2 +f 25/36/3 18/37/3 23/38/3 +f 22/39/5 29/40/5 27/41/5 +f 22/42/4 32/43/4 23/44/4 +f 21/45/1 25/46/1 24/47/1 +f 32/48/5 21/49/5 24/50/5 +f 30/51/3 28/52/3 20/53/3 +f 29/54/1 26/55/1 27/56/1 +f 20/53/1 32/57/1 30/51/1 +f 38/58/6 34/59/6 35/60/6 +f 34/61/2 36/62/2 35/63/2 +f 39/64/3 33/65/3 34/66/3 +f 46/67/3 44/68/3 36/69/3 +f 38/70/4 48/71/4 39/72/4 +f 38/73/5 45/74/5 43/75/5 +f 36/69/1 48/76/1 46/67/1 +f 48/77/5 37/78/5 40/79/5 +f 37/80/1 41/81/1 40/82/1 +f 45/83/1 42/84/1 43/85/1 +f 5/1/1 2/86/1 3/2/1 +f 7/4/2 2/87/2 5/1/2 +f 4/6/3 3/88/3 2/7/3 +f 6/9/4 3/88/4 4/6/4 +f 1/5/5 5/1/5 6/3/5 +f 1/12/6 8/89/6 4/13/6 +f 11/15/6 12/90/6 10/16/6 +f 14/18/4 9/91/4 10/19/4 +f 15/21/1 9/92/1 14/22/1 +f 11/24/2 16/93/2 15/25/2 +f 11/24/5 13/26/5 14/27/5 +f 10/19/3 9/91/3 15/21/3 +f 22/30/6 23/94/6 18/31/6 +f 18/33/2 17/95/2 31/96/2 +f 17/95/2 21/97/2 31/96/2 +f 28/98/2 29/99/2 20/34/2 +f 29/99/2 19/35/2 20/34/2 +f 18/33/2 31/96/2 20/34/2 +f 25/36/3 17/100/3 18/37/3 +f 22/39/5 19/101/5 29/40/5 +f 22/42/4 27/102/4 30/103/4 +f 27/102/4 26/104/4 30/103/4 +f 24/105/4 25/106/4 32/43/4 +f 25/106/4 23/44/4 32/43/4 +f 22/42/4 30/103/4 32/43/4 +f 21/45/1 17/107/1 25/46/1 +f 32/48/5 31/108/5 21/49/5 +f 30/51/3 26/55/3 28/52/3 +f 29/54/1 28/52/1 26/55/1 +f 20/53/1 31/109/1 32/57/1 +f 38/58/6 39/110/6 34/59/6 +f 34/61/2 33/111/2 47/112/2 +f 33/111/2 37/113/2 47/112/2 +f 44/114/2 45/115/2 36/62/2 +f 45/115/2 35/63/2 36/62/2 +f 34/61/2 47/112/2 36/62/2 +f 39/64/3 41/116/3 33/65/3 +f 46/67/3 42/84/3 44/68/3 +f 38/70/4 43/117/4 46/118/4 +f 43/117/4 42/119/4 46/118/4 +f 40/120/4 41/121/4 48/71/4 +f 41/121/4 39/72/4 48/71/4 +f 38/70/4 46/118/4 48/71/4 +f 38/73/5 35/122/5 45/74/5 +f 36/69/1 47/123/1 48/76/1 +f 48/77/5 47/124/5 37/78/5 +f 37/80/1 33/125/1 41/81/1 +f 45/83/1 44/68/1 42/84/1 diff --git a/elepower_lighting/models/flood_light_xn45_yn20.obj b/elepower_lighting/models/flood_light_xn45_yn20.obj new file mode 100644 index 0000000..2d8275a --- /dev/null +++ b/elepower_lighting/models/flood_light_xn45_yn20.obj @@ -0,0 +1,172 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_xp45_yn20.mtl +o group_ID37 +v -0.217699 -0.337760 0.247935 +v 0.404416 0.265702 0.075469 +v 0.044189 0.168684 0.701537 +v 0.585455 0.168684 0.389037 +v -0.036660 -0.434778 0.561503 +v 0.323567 -0.337760 -0.064565 +v 0.504606 -0.434778 0.249003 +v -0.136850 0.265702 0.387969 +v -0.336526 -0.180395 -0.082880 +v 0.161166 0.302374 -0.220853 +v -0.090808 0.205356 0.342715 +v 0.342204 0.205356 0.092715 +v -0.155487 -0.277414 0.230688 +v 0.096487 -0.180395 -0.332880 +v 0.277526 -0.277414 -0.019312 +v -0.271847 0.302374 0.029147 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.045790 -0.432319 -0.170688 +v 0.170741 -0.432319 0.045732 +v -0.045766 -0.160594 0.170732 +v -0.170716 -0.432319 -0.045689 +v 0.170741 -0.160594 0.045732 +v -0.045766 -0.432319 0.170732 +v -0.170716 -0.160594 -0.045689 +v 0.045790 -0.160594 -0.170688 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn -0.1294 -0.9659 -0.2241 +vn -0.4830 0.2588 -0.8365 +vn 0.1294 0.9659 0.2241 +vn 0.8660 -0.0000 -0.5000 +vn -0.8660 -0.0000 0.5000 +vn 0.4830 -0.2588 0.8365 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -0.5000 0.0000 -0.8660 +vn 0.5000 0.0000 0.8660 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/7 17/50/7 23/51/7 18/52/7 +f 23/53/8 20/54/8 19/55/8 18/56/8 +f 21/57/9 18/58/9 19/59/9 22/60/9 +f 23/61/10 17/62/10 24/63/10 20/64/10 +f 24/65/11 22/66/11 19/67/11 20/68/11 +f 24/69/12 17/70/12 21/71/12 22/72/12 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/10 27/78/10 29/79/10 32/80/10 +f 30/81/9 28/82/9 25/83/9 26/84/9 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/13 32/90/13 25/91/13 28/92/13 +f 29/93/14 27/94/14 30/95/14 26/96/14 diff --git a/elepower_lighting/models/flood_light_xn45_yp0.obj b/elepower_lighting/models/flood_light_xn45_yp0.obj new file mode 100644 index 0000000..247db70 --- /dev/null +++ b/elepower_lighting/models/flood_light_xn45_yp0.obj @@ -0,0 +1,168 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_pos_45.mtl +o group_ID37 +v -0.249808 -0.307369 0.275645 +v 0.291458 0.317381 -0.036855 +v -0.062383 0.317381 0.600275 +v 0.478883 0.317381 0.287775 +v -0.062383 -0.307369 0.600275 +v 0.291458 -0.307369 -0.036855 +v 0.478883 -0.307369 0.287775 +v -0.249808 0.317381 0.275645 +v -0.383106 -0.244894 -0.080235 +v 0.049906 0.254906 -0.330235 +v -0.195681 0.254906 0.244395 +v 0.237332 0.254906 -0.005605 +v -0.195681 -0.244894 0.244395 +v 0.049906 -0.244894 -0.330235 +v 0.237332 -0.244894 -0.005605 +v -0.383106 0.254906 -0.080235 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.004128 -0.432319 -0.159525 +v 0.129078 -0.432319 0.056895 +v -0.087428 -0.160594 0.181895 +v -0.212378 -0.432319 -0.034525 +v 0.129078 -0.160594 0.056895 +v -0.087428 -0.432319 0.181895 +v -0.212378 -0.160594 -0.034525 +v 0.004128 -0.160594 -0.159525 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.0000 -1.0000 -0.0000 +vn -0.5000 0.0000 -0.8660 +vn 0.0000 1.0000 -0.0000 +vn 0.8660 0.0000 -0.5000 +vn -0.8660 0.0000 0.5000 +vn 0.5000 0.0000 0.8660 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/7 17/50/7 23/51/7 18/52/7 +f 23/53/8 20/54/8 19/55/8 18/56/8 +f 21/57/1 18/58/1 19/59/1 22/60/1 +f 23/61/3 17/62/3 24/63/3 20/64/3 +f 24/65/9 22/66/9 19/67/9 20/68/9 +f 24/69/10 17/70/10 21/71/10 22/72/10 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/3 27/78/3 29/79/3 32/80/3 +f 30/81/1 28/82/1 25/83/1 26/84/1 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/2 32/90/2 25/91/2 28/92/2 +f 29/93/6 27/94/6 30/95/6 26/96/6 diff --git a/elepower_lighting/models/flood_light_xn45_yp20.obj b/elepower_lighting/models/flood_light_xn45_yp20.obj new file mode 100644 index 0000000..eaee7aa --- /dev/null +++ b/elepower_lighting/models/flood_light_xn45_yp20.obj @@ -0,0 +1,172 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_xp45_yp20.mtl +o group_ID37 +v -0.202850 -0.273068 0.273653 +v 0.257567 0.330394 -0.178881 +v -0.102660 0.427413 0.447187 +v 0.438606 0.427413 0.134687 +v -0.021812 -0.176050 0.587221 +v 0.338415 -0.273068 -0.038847 +v 0.519454 -0.176050 0.274721 +v -0.283699 0.330394 0.133619 +v -0.337848 -0.309740 -0.085169 +v 0.030486 0.173029 -0.447196 +v -0.221488 0.270048 0.116372 +v 0.211525 0.270048 -0.133628 +v -0.156809 -0.212722 0.228399 +v 0.095165 -0.309740 -0.335169 +v 0.276204 -0.212722 -0.021601 +v -0.402526 0.173029 -0.197196 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.045790 -0.432319 -0.170688 +v 0.170741 -0.432319 0.045732 +v -0.045766 -0.160594 0.170732 +v -0.170716 -0.432319 -0.045689 +v 0.170741 -0.160594 0.045732 +v -0.045766 -0.432319 0.170732 +v -0.170716 -0.160594 -0.045689 +v 0.045790 -0.160594 -0.170688 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.1294 -0.9659 0.2241 +vn -0.4830 -0.2588 -0.8365 +vn -0.1294 0.9659 -0.2241 +vn 0.8660 -0.0000 -0.5000 +vn -0.8660 0.0000 0.5000 +vn 0.4830 0.2588 0.8365 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -0.5000 0.0000 -0.8660 +vn 0.5000 0.0000 0.8660 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/7 17/50/7 23/51/7 18/52/7 +f 23/53/8 20/54/8 19/55/8 18/56/8 +f 21/57/9 18/58/9 19/59/9 22/60/9 +f 23/61/10 17/62/10 24/63/10 20/64/10 +f 24/65/11 22/66/11 19/67/11 20/68/11 +f 24/69/12 17/70/12 21/71/12 22/72/12 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/10 27/78/10 29/79/10 32/80/10 +f 30/81/9 28/82/9 25/83/9 26/84/9 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/13 32/90/13 25/91/13 28/92/13 +f 29/93/14 27/94/14 30/95/14 26/96/14 diff --git a/elepower_lighting/models/flood_light_xp0_yn20.obj b/elepower_lighting/models/flood_light_xp0_yn20.obj new file mode 100644 index 0000000..1362b6a --- /dev/null +++ b/elepower_lighting/models/flood_light_xp0_yn20.obj @@ -0,0 +1,168 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_pos_0_v_pos_20.mtl +o group_ID37 +v -0.312500 -0.337760 0.105869 +v 0.312500 0.265702 0.267566 +v -0.312500 0.168684 0.629643 +v 0.312500 0.168684 0.629643 +v -0.312500 -0.434778 0.467946 +v 0.312500 -0.337760 0.105869 +v 0.312500 -0.434778 0.467946 +v -0.312500 0.265702 0.267566 +v -0.250000 -0.180395 -0.240039 +v 0.250000 0.302374 -0.110681 +v -0.250000 0.205356 0.251396 +v 0.250000 0.205356 0.251396 +v -0.250000 -0.277414 0.122038 +v 0.250000 -0.180395 -0.240039 +v 0.250000 -0.277414 0.122038 +v -0.250000 0.302374 -0.110681 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.125000 -0.432319 -0.124925 +v 0.125000 -0.432319 0.124975 +v -0.125000 -0.160594 0.124975 +v -0.125000 -0.432319 -0.124925 +v 0.125000 -0.160594 0.124975 +v -0.125000 -0.432319 0.124975 +v -0.125000 -0.160594 -0.124925 +v 0.125000 -0.160594 -0.124925 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.0000 -0.9659 -0.2588 +vn 0.0000 0.2588 -0.9659 +vn 0.0000 0.9659 0.2588 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -0.2588 0.9659 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/5 17/50/5 23/51/5 18/52/5 +f 23/53/7 20/54/7 19/55/7 18/56/7 +f 21/57/8 18/58/8 19/59/8 22/60/8 +f 23/61/9 17/62/9 24/63/9 20/64/9 +f 24/65/4 22/66/4 19/67/4 20/68/4 +f 24/69/10 17/70/10 21/71/10 22/72/10 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/9 27/78/9 29/79/9 32/80/9 +f 30/81/8 28/82/8 25/83/8 26/84/8 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/7 32/90/7 25/91/7 28/92/7 +f 29/93/10 27/94/10 30/95/10 26/96/10 diff --git a/elepower_lighting/models/flood_light_xp0_yp0.obj b/elepower_lighting/models/flood_light_xp0_yp0.obj new file mode 100644 index 0000000..6add1b4 --- /dev/null +++ b/elepower_lighting/models/flood_light_xp0_yp0.obj @@ -0,0 +1,164 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_xp0_yp0.mtl +o group_ID37 +v -0.312500 -0.307369 0.124975 +v 0.312500 0.317382 0.124975 +v -0.312500 0.317382 0.499825 +v 0.312500 0.317382 0.499825 +v -0.312500 -0.307369 0.499825 +v 0.312500 -0.307369 0.124975 +v 0.312500 -0.307369 0.499825 +v -0.312500 0.317382 0.124975 +v -0.250000 -0.244894 -0.249875 +v 0.250000 0.254906 -0.249875 +v -0.250000 0.254906 0.124975 +v 0.250000 0.254906 0.124975 +v -0.250000 -0.244894 0.124975 +v 0.250000 -0.244894 -0.249875 +v 0.250000 -0.244894 0.124975 +v -0.250000 0.254906 -0.249875 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.125000 -0.432319 -0.124925 +v 0.125000 -0.432319 0.124975 +v -0.125000 -0.160594 0.124975 +v -0.125000 -0.432319 -0.124925 +v 0.125000 -0.160594 0.124975 +v -0.125000 -0.432319 0.124975 +v -0.125000 -0.160594 -0.124925 +v 0.125000 -0.160594 -0.124925 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/5 17/50/5 23/51/5 18/52/5 +f 23/53/2 20/54/2 19/55/2 18/56/2 +f 21/57/1 18/58/1 19/59/1 22/60/1 +f 23/61/3 17/62/3 24/63/3 20/64/3 +f 24/65/4 22/66/4 19/67/4 20/68/4 +f 24/69/6 17/70/6 21/71/6 22/72/6 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/3 27/78/3 29/79/3 32/80/3 +f 30/81/1 28/82/1 25/83/1 26/84/1 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/2 32/90/2 25/91/2 28/92/2 +f 29/93/6 27/94/6 30/95/6 26/96/6 diff --git a/elepower_lighting/models/flood_light_xp0_yp20.obj b/elepower_lighting/models/flood_light_xp0_yp20.obj new file mode 100644 index 0000000..6b6945c --- /dev/null +++ b/elepower_lighting/models/flood_light_xp0_yp20.obj @@ -0,0 +1,168 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_pos_0_v_neg_20.mtl +o group_ID37 +v -0.312500 -0.273068 0.135565 +v 0.312500 0.330394 -0.026132 +v -0.312500 0.427413 0.335945 +v 0.312500 0.427413 0.335945 +v -0.312500 -0.176050 0.497642 +v 0.312500 -0.273068 0.135565 +v 0.312500 -0.176050 0.497642 +v -0.312500 0.330394 -0.026132 +v -0.250000 -0.309740 -0.242682 +v 0.250000 0.173029 -0.372040 +v -0.250000 0.270048 -0.009963 +v 0.250000 0.270048 -0.009963 +v -0.250000 -0.212722 0.119395 +v 0.250000 -0.309740 -0.242682 +v 0.250000 -0.212722 0.119395 +v -0.250000 0.173029 -0.372040 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.125000 -0.432319 -0.124925 +v 0.125000 -0.432319 0.124975 +v -0.125000 -0.160594 0.124975 +v -0.125000 -0.432319 -0.124925 +v 0.125000 -0.160594 0.124975 +v -0.125000 -0.432319 0.124975 +v -0.125000 -0.160594 -0.124925 +v 0.125000 -0.160594 -0.124925 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.0000 -0.9659 0.2588 +vn 0.0000 -0.2588 -0.9659 +vn 0.0000 0.9659 -0.2588 +vn 1.0000 0.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.2588 0.9659 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/5 17/50/5 23/51/5 18/52/5 +f 23/53/7 20/54/7 19/55/7 18/56/7 +f 21/57/8 18/58/8 19/59/8 22/60/8 +f 23/61/9 17/62/9 24/63/9 20/64/9 +f 24/65/4 22/66/4 19/67/4 20/68/4 +f 24/69/10 17/70/10 21/71/10 22/72/10 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/9 27/78/9 29/79/9 32/80/9 +f 30/81/8 28/82/8 25/83/8 26/84/8 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/7 32/90/7 25/91/7 28/92/7 +f 29/93/10 27/94/10 30/95/10 26/96/10 diff --git a/elepower_lighting/models/flood_light_xp45_yn20.obj b/elepower_lighting/models/flood_light_xp45_yn20.obj new file mode 100644 index 0000000..f0ad328 --- /dev/null +++ b/elepower_lighting/models/flood_light_xp45_yn20.obj @@ -0,0 +1,172 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_xn45_yn20.mtl +o group_ID37 +v -0.323567 -0.337760 -0.064565 +v 0.136850 0.265702 0.387969 +v -0.585455 0.168684 0.389037 +v -0.044189 0.168684 0.701537 +v -0.504606 -0.434778 0.249003 +v 0.217699 -0.337760 0.247935 +v 0.036660 -0.434778 0.561503 +v -0.404416 0.265702 0.075469 +v -0.096487 -0.180395 -0.332880 +v 0.271847 0.302374 0.029147 +v -0.342204 0.205356 0.092715 +v 0.090808 0.205356 0.342715 +v -0.277526 -0.277414 -0.019312 +v 0.336526 -0.180395 -0.082880 +v 0.155487 -0.277414 0.230688 +v -0.161166 0.302374 -0.220853 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.170716 -0.432319 -0.045689 +v 0.045766 -0.432319 0.170732 +v -0.170741 -0.160594 0.045732 +v -0.045790 -0.432319 -0.170688 +v 0.045766 -0.160594 0.170732 +v -0.170741 -0.432319 0.045732 +v -0.045790 -0.160594 -0.170688 +v 0.170716 -0.160594 -0.045689 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.1294 -0.9659 -0.2241 +vn 0.4830 0.2588 -0.8365 +vn -0.1294 0.9659 0.2241 +vn 0.8660 -0.0000 0.5000 +vn -0.8660 -0.0000 -0.5000 +vn -0.4830 -0.2588 0.8365 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.5000 0.0000 -0.8660 +vn -0.5000 0.0000 0.8660 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/7 17/50/7 23/51/7 18/52/7 +f 23/53/8 20/54/8 19/55/8 18/56/8 +f 21/57/9 18/58/9 19/59/9 22/60/9 +f 23/61/10 17/62/10 24/63/10 20/64/10 +f 24/65/11 22/66/11 19/67/11 20/68/11 +f 24/69/12 17/70/12 21/71/12 22/72/12 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/10 27/78/10 29/79/10 32/80/10 +f 30/81/9 28/82/9 25/83/9 26/84/9 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/13 32/90/13 25/91/13 28/92/13 +f 29/93/14 27/94/14 30/95/14 26/96/14 diff --git a/elepower_lighting/models/flood_light_xp45_yp0.obj b/elepower_lighting/models/flood_light_xp45_yp0.obj new file mode 100644 index 0000000..32603b5 --- /dev/null +++ b/elepower_lighting/models/flood_light_xp45_yp0.obj @@ -0,0 +1,168 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_neg_45.mtl +o group_ID37 +v -0.291458 -0.307369 -0.036855 +v 0.249808 0.317381 0.275645 +v -0.478883 0.317381 0.287775 +v 0.062383 0.317381 0.600275 +v -0.478883 -0.307369 0.287775 +v 0.249808 -0.307369 0.275645 +v 0.062383 -0.307369 0.600275 +v -0.291458 0.317381 -0.036855 +v -0.049906 -0.244894 -0.330235 +v 0.383107 0.254906 -0.080235 +v -0.237331 0.254906 -0.005605 +v 0.195681 0.254906 0.244395 +v -0.237331 -0.244894 -0.005605 +v 0.383107 -0.244894 -0.080235 +v 0.195681 -0.244894 0.244395 +v -0.049906 0.254906 -0.330235 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.212378 -0.432319 -0.034525 +v 0.087428 -0.432319 0.181895 +v -0.129078 -0.160594 0.056895 +v -0.004128 -0.432319 -0.159525 +v 0.087428 -0.160594 0.181895 +v -0.129078 -0.432319 0.056895 +v -0.004128 -0.160594 -0.159525 +v 0.212378 -0.160594 -0.034525 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn 0.0000 -1.0000 0.0000 +vn 0.5000 0.0000 -0.8660 +vn 0.0000 1.0000 0.0000 +vn 0.8660 0.0000 0.5000 +vn -0.8660 0.0000 -0.5000 +vn -0.5000 0.0000 0.8660 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/7 17/50/7 23/51/7 18/52/7 +f 23/53/8 20/54/8 19/55/8 18/56/8 +f 21/57/1 18/58/1 19/59/1 22/60/1 +f 23/61/3 17/62/3 24/63/3 20/64/3 +f 24/65/9 22/66/9 19/67/9 20/68/9 +f 24/69/10 17/70/10 21/71/10 22/72/10 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/3 27/78/3 29/79/3 32/80/3 +f 30/81/1 28/82/1 25/83/1 26/84/1 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/2 32/90/2 25/91/2 28/92/2 +f 29/93/6 27/94/6 30/95/6 26/96/6 diff --git a/elepower_lighting/models/flood_light_xp45_yp20.obj b/elepower_lighting/models/flood_light_xp45_yp20.obj new file mode 100644 index 0000000..c7222b8 --- /dev/null +++ b/elepower_lighting/models/flood_light_xp45_yp20.obj @@ -0,0 +1,172 @@ +# Blender v2.90.1 OBJ File: 'flood_light.blend' +# www.blender.org +mtllib flood_light_xn45_yp20.mtl +o group_ID37 +v -0.338415 -0.273068 -0.038847 +v 0.283699 0.330394 0.133619 +v -0.438605 0.427413 0.134687 +v 0.102660 0.427413 0.447187 +v -0.519454 -0.176050 0.274721 +v 0.202851 -0.273068 0.273653 +v 0.021812 -0.176050 0.587221 +v -0.257567 0.330394 -0.178881 +v -0.095165 -0.309740 -0.335169 +v 0.402527 0.173029 -0.197196 +v -0.211525 0.270048 -0.133628 +v 0.221488 0.270048 0.116372 +v -0.276204 -0.212722 -0.021601 +v 0.337848 -0.309740 -0.085169 +v 0.156809 -0.212722 0.228399 +v -0.030486 0.173029 -0.447196 +v -0.375000 -0.432319 0.374875 +v -0.375000 -0.494794 -0.374825 +v 0.375000 -0.494794 -0.374825 +v 0.375000 -0.432319 -0.374825 +v -0.375000 -0.494794 0.374875 +v 0.375000 -0.494794 0.374875 +v -0.375000 -0.432319 -0.374825 +v 0.375000 -0.432319 0.374875 +v 0.170716 -0.432319 -0.045689 +v 0.045766 -0.432319 0.170732 +v -0.170741 -0.160594 0.045732 +v -0.045790 -0.432319 -0.170688 +v 0.045766 -0.160594 0.170732 +v -0.170741 -0.432319 0.045732 +v -0.045790 -0.160594 -0.170688 +v 0.170716 -0.160594 -0.045689 +vt 0.479167 0.750000 +vt 0.479167 0.625000 +vt 0.270833 0.625000 +vt 0.270833 0.750000 +vt 0.479167 0.979167 +vt 0.270833 0.979167 +vt 0.270833 0.770833 +vt 0.479167 0.770833 +vt 0.020833 0.625000 +vt 0.229167 0.625000 +vt 0.229167 0.750000 +vt 0.020833 0.750000 +vt 0.145833 0.583333 +vt 0.145833 0.375000 +vt 0.020833 0.375000 +vt 0.020833 0.583333 +vt 0.312500 0.375000 +vt 0.312500 0.583333 +vt 0.187500 0.583333 +vt 0.187500 0.375000 +vt 0.020833 0.979167 +vt 0.229167 0.979167 +vt 0.229167 0.770833 +vt 0.020833 0.770833 +vt 0.770833 0.770833 +vt 0.770833 0.645833 +vt 0.604167 0.645833 +vt 0.604167 0.770833 +vt 0.979167 0.979167 +vt 0.812500 0.979167 +vt 0.812500 0.812500 +vt 0.979167 0.812500 +vt 0.812500 0.645833 +vt 0.979167 0.645833 +vt 0.979167 0.770833 +vt 0.812500 0.770833 +vt 0.770833 0.604167 +vt 0.770833 0.437500 +vt 0.645833 0.437500 +vt 0.645833 0.604167 +vt 0.937500 0.437500 +vt 0.937500 0.604167 +vt 0.812500 0.604167 +vt 0.812500 0.437500 +vt 0.604167 0.979167 +vt 0.770833 0.979167 +vt 0.770833 0.812500 +vt 0.604167 0.812500 +vt 0.270833 0.020833 +vt 0.270833 0.041667 +vt 0.020833 0.041667 +vt 0.020833 0.020833 +vt 0.270833 0.083333 +vt 0.020833 0.083333 +vt 0.020833 0.062500 +vt 0.270833 0.062500 +vt 0.562500 0.354167 +vt 0.562500 0.104167 +vt 0.312500 0.104167 +vt 0.312500 0.354167 +vt 0.270833 0.104167 +vt 0.270833 0.354167 +vt 0.020833 0.354167 +vt 0.020833 0.104167 +vt 0.562500 0.041667 +vt 0.562500 0.020833 +vt 0.312500 0.020833 +vt 0.312500 0.041667 +vt 0.312500 0.083333 +vt 0.562500 0.083333 +vt 0.562500 0.062500 +vt 0.312500 0.062500 +vt 0.958333 0.208333 +vt 0.958333 0.125000 +vt 0.875000 0.125000 +vt 0.875000 0.208333 +vt 0.958333 0.250000 +vt 0.958333 0.333333 +vt 0.875000 0.333333 +vt 0.875000 0.250000 +vt 0.854167 0.333333 +vt 0.854167 0.250000 +vt 0.770833 0.250000 +vt 0.770833 0.333333 +vt 0.854167 0.104167 +vt 0.770833 0.104167 +vt 0.770833 0.020833 +vt 0.854167 0.020833 +vt 0.854167 0.208333 +vt 0.770833 0.208333 +vt 0.770833 0.125000 +vt 0.854167 0.125000 +vt 0.875000 0.104167 +vt 0.958333 0.104167 +vt 0.958333 0.020833 +vt 0.875000 0.020833 +vn -0.1294 -0.9659 0.2241 +vn 0.4830 -0.2588 -0.8365 +vn 0.1294 0.9659 -0.2241 +vn 0.8660 0.0000 0.5000 +vn -0.8660 -0.0000 -0.5000 +vn -0.4830 0.2588 0.8365 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.5000 0.0000 -0.8660 +vn -0.5000 0.0000 0.8660 +usemtl material +s off +f 5/1/1 1/2/1 6/3/1 7/4/1 +f 8/5/2 2/6/2 6/7/2 1/8/2 +f 2/9/3 8/10/3 3/11/3 4/12/3 +f 4/13/4 7/14/4 6/15/4 2/16/4 +f 5/17/5 3/18/5 8/19/5 1/20/5 +f 4/21/6 3/22/6 5/23/6 7/24/6 +f 13/25/1 9/26/1 14/27/1 15/28/1 +f 16/29/2 10/30/2 14/31/2 9/32/2 +f 10/33/3 16/34/3 11/35/3 12/36/3 +f 12/37/4 15/38/4 14/39/4 10/40/4 +f 13/41/5 11/42/5 16/43/5 9/44/5 +f 12/45/6 11/46/6 13/47/6 15/48/6 +f 21/49/7 17/50/7 23/51/7 18/52/7 +f 23/53/8 20/54/8 19/55/8 18/56/8 +f 21/57/9 18/58/9 19/59/9 22/60/9 +f 23/61/10 17/62/10 24/63/10 20/64/10 +f 24/65/11 22/66/11 19/67/11 20/68/11 +f 24/69/12 17/70/12 21/71/12 22/72/12 +f 29/73/4 26/74/4 25/75/4 32/76/4 +f 31/77/10 27/78/10 29/79/10 32/80/10 +f 30/81/9 28/82/9 25/83/9 26/84/9 +f 27/85/5 31/86/5 28/87/5 30/88/5 +f 31/89/13 32/90/13 25/91/13 28/92/13 +f 29/93/14 27/94/14 30/95/14 26/96/14 diff --git a/elepower_lighting/models/fluro_light_bank.obj b/elepower_lighting/models/fluro_light_bank.obj new file mode 100644 index 0000000..59bee0d --- /dev/null +++ b/elepower_lighting/models/fluro_light_bank.obj @@ -0,0 +1,184 @@ +# Blender v2.90.1 OBJ File: 'light_bulb_fluro_bank.blend' +# www.blender.org +mtllib fluro_light_bank.mtl +o fluro_ID200 +v -0.875000 -0.125000 0.374999 +v -1.000000 -0.125000 -0.375001 +v -1.000000 -0.125000 0.374999 +v -1.000000 -0.500000 -0.375001 +v 1.000000 -0.125000 0.374999 +v 1.000000 -0.500000 0.374999 +v -1.000000 -0.500000 0.374999 +v -0.875000 -0.375000 0.374999 +v -0.875000 -0.125000 -0.375001 +v 0.875000 -0.125000 -0.375001 +v 1.000000 -0.500000 -0.375001 +v 0.875000 -0.375000 0.374999 +v -0.875000 -0.375000 -0.375001 +v 0.875000 -0.375000 -0.375001 +v 1.000000 -0.125000 -0.375001 +v 0.875000 -0.125000 0.374999 +v -0.875001 -0.156250 -0.124999 +v -0.875001 -0.343750 -0.124999 +v -0.875001 -0.156250 -0.312499 +v 0.875000 -0.343750 -0.312499 +v -0.875001 -0.343750 -0.312499 +v 0.875000 -0.156250 -0.124999 +v 0.875000 -0.343750 -0.124999 +v 0.875000 -0.156250 -0.312499 +v -0.875001 -0.156250 0.312501 +v -0.875001 -0.343750 0.312501 +v -0.875001 -0.156250 0.125001 +v 0.875000 -0.343750 0.125001 +v -0.875001 -0.343750 0.125001 +v 0.875000 -0.156250 0.312501 +v 0.875000 -0.343750 0.312501 +v 0.875000 -0.156250 0.125001 +vt 0.104167 0.395833 +vt 0.020833 0.687500 +vt 0.020833 0.395833 +vt 0.979167 0.708333 +vt 0.854167 1.000000 +vt 0.854167 0.708333 +vt 0.229167 0.250000 +vt 0.812500 0.250000 +vt 0.854167 0.291667 +vt 0.229167 0.250000 +vt 0.187500 0.291667 +vt 0.854167 0.291667 +vt 0.187500 0.395833 +vt 0.812500 0.687500 +vt 0.187500 0.687500 +vt 0.020833 0.708333 +vt 0.145833 1.000000 +vt 0.145833 0.708333 +vt 0.166667 0.687500 +vt 0.125000 0.395833 +vt 0.166667 0.395833 +vt 0.833333 1.000000 +vt 0.166667 0.708333 +vt 0.166667 1.000000 +vt 0.875000 0.687500 +vt 0.833333 0.395833 +vt 0.875000 0.395833 +vt 0.895833 0.395833 +vt 0.979167 0.687500 +vt 0.979167 0.395833 +vt 0.187500 0.375000 +vt 0.812500 0.312500 +vt 0.187500 0.312500 +vt 0.187500 0.375000 +vt 0.812500 0.312500 +vt 0.187500 0.312500 +vt 0.895833 0.312500 +vt 0.833333 0.375000 +vt 0.895833 0.375000 +vt 0.812500 0.375000 +vt 0.187500 0.312500 +vt 0.812500 0.375000 +vt 0.812500 0.312500 +vt 0.895833 0.375000 +vt 0.833333 0.312500 +vt 0.895833 0.312500 +vt 0.187500 0.312500 +vt 0.812500 0.375000 +vt 0.187500 0.375000 +vt 0.187500 0.312500 +vt 0.812500 0.312500 +vt 0.187500 0.375000 +vt 0.812500 0.312500 +vt 0.187500 0.312500 +vt 0.895833 0.312500 +vt 0.833333 0.375000 +vt 0.895833 0.375000 +vt 0.812500 0.375000 +vt 0.187500 0.375000 +vt 0.895833 0.375000 +vt 0.833333 0.312500 +vt 0.895833 0.312500 +vt 0.104167 0.687500 +vt 0.979167 1.000000 +vt 0.812500 0.166667 +vt 0.854167 0.166667 +vt 0.187500 0.291667 +vt 0.187500 0.166667 +vt 0.229167 0.166667 +vt 0.854167 0.166667 +vt 0.812500 0.250000 +vt 0.812500 0.166667 +vt 0.229167 0.166667 +vt 0.187500 0.166667 +vt 0.812500 0.395833 +vt 0.020833 1.000000 +vt 0.125000 0.687500 +vt 0.833333 0.708333 +vt 0.833333 0.687500 +vt 0.895833 0.687500 +vt 0.812500 0.375000 +vt 0.833333 0.312500 +vt 0.187500 0.375000 +vt 0.833333 0.375000 +vt 0.812500 0.312500 +vt 0.812500 0.375000 +vt 0.833333 0.312500 +vt 0.833333 0.375000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 -1.0000 0.0000 +usemtl material +s off +f 9/1/1 8/2/1 13/3/1 +f 15/4/1 6/5/1 11/6/1 +f 12/7/2 8/8/2 7/9/2 +f 14/10/3 11/11/3 4/12/3 +f 8/13/4 14/14/4 13/15/4 +f 4/16/5 3/17/5 2/18/5 +f 9/19/4 3/20/4 1/21/4 +f 11/22/6 7/23/6 4/24/6 +f 15/25/4 16/26/4 5/27/4 +f 14/28/5 16/29/5 10/30/5 +f 21/31/6 23/32/6 18/33/6 +f 17/34/4 24/35/4 19/36/4 +f 21/37/5 17/38/5 19/39/5 +f 18/33/2 22/40/2 17/34/2 +f 21/41/3 24/42/3 20/43/3 +f 24/44/1 23/45/1 20/46/1 +f 25/47/4 32/48/4 27/49/4 +f 29/50/3 32/48/3 28/51/3 +f 29/52/6 31/53/6 26/54/6 +f 29/55/5 25/56/5 27/57/5 +f 26/54/2 30/58/2 25/59/2 +f 32/60/1 31/61/1 28/62/1 +f 9/1/1 1/63/1 8/2/1 +f 15/4/1 5/64/1 6/5/1 +f 8/8/2 1/65/2 3/66/2 +f 6/67/2 5/68/2 12/7/2 +f 5/68/2 16/69/2 12/7/2 +f 8/8/2 3/66/2 7/9/2 +f 6/67/2 12/7/2 7/9/2 +f 4/12/3 2/70/3 13/71/3 +f 2/70/3 9/72/3 13/71/3 +f 10/73/3 15/74/3 14/10/3 +f 15/74/3 11/11/3 14/10/3 +f 4/12/3 13/71/3 14/10/3 +f 8/13/4 12/75/4 14/14/4 +f 4/16/5 7/76/5 3/17/5 +f 9/19/4 2/77/4 3/20/4 +f 11/22/6 6/78/6 7/23/6 +f 15/25/4 10/79/4 16/26/4 +f 14/28/5 12/80/5 16/29/5 +f 21/31/6 20/81/6 23/32/6 +f 17/34/4 22/40/4 24/35/4 +f 21/37/5 18/82/5 17/38/5 +f 18/33/2 23/32/2 22/40/2 +f 21/41/3 19/83/3 24/42/3 +f 24/44/1 22/84/1 23/45/1 +f 25/47/4 30/85/4 32/48/4 +f 29/50/3 27/49/3 32/48/3 +f 29/52/6 28/86/6 31/53/6 +f 29/55/5 26/87/5 25/56/5 +f 26/54/2 31/53/2 30/58/2 +f 32/60/1 30/88/1 31/61/1 diff --git a/elepower_lighting/models/incandescent_light_bulb.obj b/elepower_lighting/models/incandescent_light_bulb.obj new file mode 100644 index 0000000..9e9dfc9 --- /dev/null +++ b/elepower_lighting/models/incandescent_light_bulb.obj @@ -0,0 +1,82 @@ +# Blender v2.90.1 OBJ File: 'light_bulb.blend' +# www.blender.org +mtllib incandescent_light_bulb.mtl +o mesh_ID4 +v 0.125000 -0.500000 0.125000 +v 0.125000 -0.290667 -0.125000 +v -0.125000 -0.500000 0.125000 +v -0.125000 -0.290667 0.125000 +v 0.125000 -0.500000 -0.125000 +v -0.125000 -0.500000 -0.125000 +v 0.125000 -0.290667 0.125000 +v -0.125000 -0.290667 -0.125000 +v -0.250000 -0.312500 0.250000 +v -0.250000 0.187500 0.250000 +v 0.250000 0.187500 -0.250000 +v -0.250000 0.187500 -0.250000 +v 0.250000 -0.312500 -0.250000 +v -0.250000 -0.312500 -0.250000 +v 0.250000 -0.312500 0.250000 +v 0.250000 0.187500 0.250000 +vt 0.125000 0.312500 +vt 0.375000 0.312500 +vt 0.375000 0.500000 +vt 0.125000 0.500000 +vt 0.375000 -0.000000 +vt 0.375000 0.250000 +vt 0.125000 0.250000 +vt 0.125000 -0.000000 +vt 0.125000 0.312500 +vt 0.375000 0.312500 +vt 0.375000 0.500000 +vt 0.125000 0.500000 +vt 0.375000 0.500000 +vt 0.375000 0.312500 +vt 0.125000 0.500000 +vt 0.125000 0.312500 +vt 0.375000 0.000000 +vt 0.125000 0.000000 +vt 0.125000 0.250000 +vt 0.375000 0.250000 +vt 1.000000 0.500000 +vt 1.000000 1.000000 +vt 0.500000 1.000000 +vt 0.500000 0.500000 +vt 0.000000 1.000000 +vt 0.000000 0.500000 +vt 0.500000 0.500000 +vt 0.500000 1.000000 +vt 1.000000 0.500000 +vt 1.000000 -0.000000 +vt 0.500000 -0.000000 +vt 0.500000 0.500000 +vt 0.500000 0.500000 +vt 0.500000 1.000000 +vt -0.000000 1.000000 +vt 0.000000 0.500000 +vt 0.000000 1.000000 +vt 0.000000 0.500000 +vt 0.500000 1.000000 +vt 0.000000 1.000000 +vt -0.000000 0.500000 +vt 0.500000 0.500000 +vn 1.0000 0.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 0.0000 0.0000 1.0000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 -1.0000 0.0000 +usemtl material +s off +f 1/1/1 5/2/1 2/3/1 7/4/1 +f 7/5/2 2/6/2 8/7/2 4/8/2 +f 3/9/3 1/10/3 7/11/3 4/12/3 +f 8/13/4 6/14/4 3/9/4 4/12/4 +f 8/13/5 2/15/5 5/16/5 6/14/5 +f 1/17/6 3/18/6 6/19/6 5/20/6 +f 16/21/2 11/22/2 12/23/2 10/24/2 +f 12/25/4 14/26/4 9/27/4 10/28/4 +f 13/29/6 15/30/6 9/31/6 14/32/6 +f 13/33/1 11/34/1 16/35/1 15/36/1 +f 12/23/5 11/37/5 13/38/5 14/32/5 +f 16/39/3 10/40/3 9/41/3 15/42/3 diff --git a/elepower_lighting/models/led_light_panel_1x1.obj b/elepower_lighting/models/led_light_panel_1x1.obj new file mode 100644 index 0000000..1277a43 --- /dev/null +++ b/elepower_lighting/models/led_light_panel_1x1.obj @@ -0,0 +1,66 @@ +# Blender v2.90.1 OBJ File: 'led_panel_1x1.blend' +# www.blender.org +mtllib led_light_panel_1x1.mtl +o Panel_ID214 +v -0.499997 -0.250000 -0.499998 +v -0.499997 -0.500000 0.500002 +v -0.499997 -0.250000 0.500002 +v -0.499997 -0.500000 -0.499998 +v 0.500003 -0.500000 -0.499998 +v -0.499997 -0.500000 0.500002 +v -0.499997 -0.500000 -0.499998 +v 0.500003 -0.500000 0.500002 +v 0.500003 -0.250000 0.500002 +v -0.499997 -0.500000 0.500002 +v 0.500003 -0.500000 0.500002 +v -0.499997 -0.250000 0.500002 +v 0.500003 -0.250000 0.500002 +v -0.499997 -0.250000 -0.499998 +v -0.499997 -0.250000 0.500002 +v 0.500003 -0.250000 -0.499998 +v -0.499997 -0.250000 -0.499998 +v 0.500003 -0.500000 -0.499998 +v -0.499997 -0.500000 -0.499998 +v 0.500003 -0.250000 -0.499998 +v 0.500003 -0.500000 -0.499998 +v 0.500003 -0.250000 0.500002 +v 0.500003 -0.500000 0.500002 +v 0.500003 -0.250000 -0.499998 +vt 1.000000 0.200000 +vt 1.000000 -0.000000 +vt -0.000000 -0.000000 +vt -0.000000 0.200000 +vt -0.000000 0.200000 +vt 1.000000 0.200000 +vt 1.000000 -0.000000 +vt -0.000000 -0.000000 +vt 1.000000 0.200000 +vt -0.000000 0.200000 +vt -0.000000 -0.000000 +vt 1.000000 -0.000000 +vt 1.000000 1.000000 +vt 1.000000 0.200000 +vt 0.000000 0.200000 +vt 0.000000 1.000000 +vt 1.000000 0.200000 +vt 1.000000 1.000000 +vt -0.000000 1.000000 +vt -0.000000 0.200000 +vt 1.000000 -0.000000 +vt 1.000000 0.200000 +vt -0.000000 0.200000 +vt -0.000000 -0.000000 +vn -1.0000 0.0000 0.0000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl material +s off +f 1/1/1 4/2/1 2/3/1 3/4/1 +f 17/5/2 20/6/2 18/7/2 19/8/2 +f 9/9/3 12/10/3 10/11/3 11/12/3 +f 5/13/4 8/14/4 6/15/4 7/16/4 +f 13/17/5 16/18/5 14/19/5 15/20/5 +f 21/21/6 24/22/6 22/23/6 23/24/6 diff --git a/elepower_lighting/models/led_light_panel_1x3.obj b/elepower_lighting/models/led_light_panel_1x3.obj new file mode 100644 index 0000000..7a90d63 --- /dev/null +++ b/elepower_lighting/models/led_light_panel_1x3.obj @@ -0,0 +1,46 @@ +# Blender v2.90.1 OBJ File: 'led_panel_1x3.blend' +# www.blender.org +mtllib led_light_panel_1x3.mtl +o Panel_ID214 +v -1.499997 -0.250000 -0.499998 +v -1.499997 -0.250000 0.500002 +v -1.499997 -0.500000 0.500002 +v -1.499997 -0.500000 -0.499998 +v 1.500003 -0.500000 -0.499998 +v 1.500003 -0.500000 0.500002 +v 1.500003 -0.250000 0.500002 +v 1.500003 -0.250000 -0.499998 +vt 0.923077 0.200000 +vt 0.923077 -0.000000 +vt 0.000000 -0.000000 +vt 0.000000 0.200000 +vt 0.923077 0.000000 +vt 0.923077 0.200000 +vt 0.000000 0.200000 +vt 0.000000 -0.000000 +vt 0.000000 1.000000 +vt 0.923077 1.000000 +vt 0.923077 0.200000 +vt -0.000000 0.200000 +vt 0.923077 1.000000 +vt 0.000000 1.000000 +vt 0.923077 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.200000 +vt 0.923077 0.200000 +vt 1.000000 1.000000 +vt 1.000000 0.200000 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl material +s off +f 8/1/1 5/2/1 4/3/1 1/4/1 +f 6/5/2 7/6/2 2/7/2 3/8/2 +f 4/9/3 5/10/3 6/11/3 3/12/3 +f 2/7/4 7/6/4 8/13/4 1/14/4 +f 1/15/5 4/16/5 3/17/5 2/18/5 +f 5/19/6 8/13/6 7/6/6 6/20/6 diff --git a/elepower_lighting/models/led_light_panel_2x3.obj b/elepower_lighting/models/led_light_panel_2x3.obj new file mode 100644 index 0000000..a4525ee --- /dev/null +++ b/elepower_lighting/models/led_light_panel_2x3.obj @@ -0,0 +1,46 @@ +# Blender v2.90.1 OBJ File: 'led_panel_2x3.blend' +# www.blender.org +mtllib led_light_panel_2x3.mtl +o Panel_ID214 +v -1.509768 -0.241296 -0.519411 +v -1.509768 -0.241296 1.480589 +v -1.509768 -0.491296 1.480589 +v -1.509768 -0.491296 -0.519411 +v 1.490232 -0.491296 -0.519411 +v 1.490232 -0.491296 1.480589 +v 1.490232 -0.241296 1.480589 +v 1.490232 -0.241296 -0.519411 +vt 0.923077 0.111111 +vt 0.923077 -0.000000 +vt 0.000000 -0.000000 +vt -0.000000 0.111111 +vt 0.923077 0.000000 +vt 0.923077 0.111111 +vt 0.000000 0.111111 +vt 0.000000 -0.000000 +vt 0.000000 1.000000 +vt 0.923077 1.000000 +vt 0.923077 0.111111 +vt -0.000000 0.111111 +vt 0.923077 1.000000 +vt 0.000000 1.000000 +vt 0.923077 1.000000 +vt 1.000000 1.000000 +vt 1.000000 0.111111 +vt 0.923077 0.111111 +vt 1.000000 1.000000 +vt 1.000000 0.111111 +vn 0.0000 0.0000 -1.0000 +vn 0.0000 0.0000 1.0000 +vn 0.0000 -1.0000 0.0000 +vn 0.0000 1.0000 0.0000 +vn -1.0000 0.0000 0.0000 +vn 1.0000 0.0000 0.0000 +usemtl material +s off +f 8/1/1 5/2/1 4/3/1 1/4/1 +f 6/5/2 7/6/2 2/7/2 3/8/2 +f 4/9/3 5/10/3 6/11/3 3/12/3 +f 2/7/4 7/6/4 8/13/4 1/14/4 +f 1/15/5 4/16/5 3/17/5 2/18/5 +f 5/19/6 8/13/6 7/6/6 6/20/6 diff --git a/elepower_lighting/textures/elepower_lighting_cf_bulb_glass.png b/elepower_lighting/textures/elepower_lighting_cf_bulb_glass.png new file mode 100644 index 0000000..af75e4b Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_cf_bulb_glass.png differ diff --git a/elepower_lighting/textures/elepower_lighting_cf_flood_light_inv.png b/elepower_lighting/textures/elepower_lighting_cf_flood_light_inv.png new file mode 100644 index 0000000..fbf70f4 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_cf_flood_light_inv.png differ diff --git a/elepower_lighting/textures/elepower_lighting_cf_flood_light_on.png b/elepower_lighting/textures/elepower_lighting_cf_flood_light_on.png new file mode 100644 index 0000000..c61b548 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_cf_flood_light_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_cf_light_off.png b/elepower_lighting/textures/elepower_lighting_cf_light_off.png new file mode 100644 index 0000000..c97c9ac Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_cf_light_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_cf_light_on.png b/elepower_lighting/textures/elepower_lighting_cf_light_on.png new file mode 100644 index 0000000..709a183 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_cf_light_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_gold_thick.png b/elepower_lighting/textures/elepower_lighting_conduit_gold_thick.png new file mode 100644 index 0000000..513ba89 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_gold_thick.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_gold_thin.png b/elepower_lighting/textures/elepower_lighting_conduit_gold_thin.png new file mode 100644 index 0000000..3f89539 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_gold_thin.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_iron_thick.png b/elepower_lighting/textures/elepower_lighting_conduit_iron_thick.png new file mode 100644 index 0000000..c89745d Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_iron_thick.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_iron_thin.png b/elepower_lighting/textures/elepower_lighting_conduit_iron_thin.png new file mode 100644 index 0000000..5a547a1 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_iron_thin.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_steel_thick.png b/elepower_lighting/textures/elepower_lighting_conduit_steel_thick.png new file mode 100644 index 0000000..3ab053f Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_steel_thick.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_steel_thin.png b/elepower_lighting/textures/elepower_lighting_conduit_steel_thin.png new file mode 100644 index 0000000..01af4e1 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_steel_thin.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_thin_thick.xcf b/elepower_lighting/textures/elepower_lighting_conduit_thin_thick.xcf new file mode 100644 index 0000000..fb859d6 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_thin_thick.xcf differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_wood_thick.png b/elepower_lighting/textures/elepower_lighting_conduit_wood_thick.png new file mode 100644 index 0000000..582f25b Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_wood_thick.png differ diff --git a/elepower_lighting/textures/elepower_lighting_conduit_wood_thin.png b/elepower_lighting/textures/elepower_lighting_conduit_wood_thin.png new file mode 100644 index 0000000..cee84c7 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_conduit_wood_thin.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond.xcf b/elepower_lighting/textures/elepower_lighting_decor_surrond.xcf new file mode 100644 index 0000000..5f9d716 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond.xcf differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_1.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_1.png new file mode 100644 index 0000000..6fe7df4 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_1.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_2.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_2.png new file mode 100644 index 0000000..386cc44 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_2.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_3.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_3.png new file mode 100644 index 0000000..37b6e22 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_3.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_4.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_4.png new file mode 100644 index 0000000..24f6d7a Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_4.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_5.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_5.png new file mode 100644 index 0000000..48e74c4 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_5.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_1.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_1.png new file mode 100644 index 0000000..de63fa6 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_1.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_2.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_2.png new file mode 100644 index 0000000..bd6e384 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_2.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_3.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_3.png new file mode 100644 index 0000000..2c8e147 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_3.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_4.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_4.png new file mode 100644 index 0000000..0f8f4f9 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_4.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_5.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_5.png new file mode 100644 index 0000000..0539833 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_blue_5.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_red_1.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_1.png new file mode 100644 index 0000000..ac963cb Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_1.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_red_2.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_2.png new file mode 100644 index 0000000..b2093ba Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_2.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_red_3.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_3.png new file mode 100644 index 0000000..be0df10 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_3.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_red_4.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_4.png new file mode 100644 index 0000000..a762f07 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_4.png differ diff --git a/elepower_lighting/textures/elepower_lighting_decor_surrond_red_5.png b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_5.png new file mode 100644 index 0000000..8829590 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_decor_surrond_red_5.png differ diff --git a/elepower_lighting/textures/elepower_lighting_flood_arrow_icon.png b/elepower_lighting/textures/elepower_lighting_flood_arrow_icon.png new file mode 100644 index 0000000..2d0cab8 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_flood_arrow_icon.png differ diff --git a/elepower_lighting/textures/elepower_lighting_flood_light_inv.png b/elepower_lighting/textures/elepower_lighting_flood_light_inv.png new file mode 100644 index 0000000..b56c92c Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_flood_light_inv.png differ diff --git a/elepower_lighting/textures/elepower_lighting_flood_light_off.png b/elepower_lighting/textures/elepower_lighting_flood_light_off.png new file mode 100644 index 0000000..e695d55 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_flood_light_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_flood_light_on.png b/elepower_lighting/textures/elepower_lighting_flood_light_on.png new file mode 100644 index 0000000..498d3ce Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_flood_light_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_flood_rotate_gauge.png b/elepower_lighting/textures/elepower_lighting_flood_rotate_gauge.png new file mode 100644 index 0000000..7fe0e7a Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_flood_rotate_gauge.png differ diff --git a/elepower_lighting/textures/elepower_lighting_flood_tilt_gauge.png b/elepower_lighting/textures/elepower_lighting_flood_tilt_gauge.png new file mode 100644 index 0000000..4a7f5f8 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_flood_tilt_gauge.png differ diff --git a/elepower_lighting/textures/elepower_lighting_fluro_light_bank_inv.png b/elepower_lighting/textures/elepower_lighting_fluro_light_bank_inv.png new file mode 100644 index 0000000..15ea499 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_fluro_light_bank_inv.png differ diff --git a/elepower_lighting/textures/elepower_lighting_fluro_light_bank_off.png b/elepower_lighting/textures/elepower_lighting_fluro_light_bank_off.png new file mode 100644 index 0000000..4edb5fd Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_fluro_light_bank_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_fluro_light_bank_on.png b/elepower_lighting/textures/elepower_lighting_fluro_light_bank_on.png new file mode 100644 index 0000000..07e8cde Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_fluro_light_bank_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_fluro_tube_glass.png b/elepower_lighting/textures/elepower_lighting_fluro_tube_glass.png new file mode 100644 index 0000000..d7da2ec Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_fluro_tube_glass.png differ diff --git a/elepower_lighting/textures/elepower_lighting_gui_blue_button.png b/elepower_lighting/textures/elepower_lighting_gui_blue_button.png new file mode 100644 index 0000000..81cf317 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_gui_blue_button.png differ diff --git a/elepower_lighting/textures/elepower_lighting_gui_color_button.png b/elepower_lighting/textures/elepower_lighting_gui_color_button.png new file mode 100644 index 0000000..1589d0d Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_gui_color_button.png differ diff --git a/elepower_lighting/textures/elepower_lighting_gui_icon_light.png b/elepower_lighting/textures/elepower_lighting_gui_icon_light.png new file mode 100644 index 0000000..cb421e8 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_gui_icon_light.png differ diff --git a/elepower_lighting/textures/elepower_lighting_gui_rainbow_button.png b/elepower_lighting/textures/elepower_lighting_gui_rainbow_button.png new file mode 100644 index 0000000..0b1b92b Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_gui_rainbow_button.png differ diff --git a/elepower_lighting/textures/elepower_lighting_gui_red_button.png b/elepower_lighting/textures/elepower_lighting_gui_red_button.png new file mode 100644 index 0000000..8c12f4c Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_gui_red_button.png differ diff --git a/elepower_lighting/textures/elepower_lighting_gui_strobe_button.png b/elepower_lighting/textures/elepower_lighting_gui_strobe_button.png new file mode 100644 index 0000000..d6ca0c1 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_gui_strobe_button.png differ diff --git a/elepower_lighting/textures/elepower_lighting_incandescent_bulb_element.png b/elepower_lighting/textures/elepower_lighting_incandescent_bulb_element.png new file mode 100644 index 0000000..78d224b Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_incandescent_bulb_element.png differ diff --git a/elepower_lighting/textures/elepower_lighting_incandescent_bulb_glass.png b/elepower_lighting/textures/elepower_lighting_incandescent_bulb_glass.png new file mode 100644 index 0000000..06f1322 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_incandescent_bulb_glass.png differ diff --git a/elepower_lighting/textures/elepower_lighting_incandescent_light_off.png b/elepower_lighting/textures/elepower_lighting_incandescent_light_off.png new file mode 100644 index 0000000..01629fb Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_incandescent_light_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_incandescent_light_on.png b/elepower_lighting/textures/elepower_lighting_incandescent_light_on.png new file mode 100644 index 0000000..79a5ee0 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_incandescent_light_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_incandescent_uv_light_off.png b/elepower_lighting/textures/elepower_lighting_incandescent_uv_light_off.png new file mode 100644 index 0000000..897b87c Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_incandescent_uv_light_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_incandescent_uv_light_on.png b/elepower_lighting/textures/elepower_lighting_incandescent_uv_light_on.png new file mode 100644 index 0000000..493c287 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_incandescent_uv_light_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_bulb_light_off.png b/elepower_lighting/textures/elepower_lighting_led_bulb_light_off.png new file mode 100644 index 0000000..8194c14 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_bulb_light_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_flood_light_inv.png b/elepower_lighting/textures/elepower_lighting_led_flood_light_inv.png new file mode 100644 index 0000000..bce5cc4 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_flood_light_inv.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_1x3_inv.png b/elepower_lighting/textures/elepower_lighting_led_light_1x3_inv.png new file mode 100644 index 0000000..03b6ea6 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_1x3_inv.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_1x3_off.png b/elepower_lighting/textures/elepower_lighting_led_light_1x3_off.png new file mode 100644 index 0000000..5f77c3f Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_1x3_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_1x3_on.png b/elepower_lighting/textures/elepower_lighting_led_light_1x3_on.png new file mode 100644 index 0000000..11a1cfa Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_1x3_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_2x3_inv.png b/elepower_lighting/textures/elepower_lighting_led_light_2x3_inv.png new file mode 100644 index 0000000..fbd571b Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_2x3_inv.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_2x3_off.png b/elepower_lighting/textures/elepower_lighting_led_light_2x3_off.png new file mode 100644 index 0000000..2b82bb6 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_2x3_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_2x3_on.png b/elepower_lighting/textures/elepower_lighting_led_light_2x3_on.png new file mode 100644 index 0000000..e192b77 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_2x3_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_bulb_off.png b/elepower_lighting/textures/elepower_lighting_led_light_bulb_off.png new file mode 100644 index 0000000..1c6e28e Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_bulb_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_bulb_on.png b/elepower_lighting/textures/elepower_lighting_led_light_bulb_on.png new file mode 100644 index 0000000..0f40722 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_bulb_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_off.png b/elepower_lighting/textures/elepower_lighting_led_light_off.png new file mode 100644 index 0000000..0b758e7 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_off.png differ diff --git a/elepower_lighting/textures/elepower_lighting_led_light_on.png b/elepower_lighting/textures/elepower_lighting_led_light_on.png new file mode 100644 index 0000000..29abcd7 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_led_light_on.png differ diff --git a/elepower_lighting/textures/elepower_lighting_light_emitting_diode_cluster.png b/elepower_lighting/textures/elepower_lighting_light_emitting_diode_cluster.png new file mode 100644 index 0000000..a8d0333 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_light_emitting_diode_cluster.png differ diff --git a/elepower_lighting/textures/elepower_lighting_light_emitting_diode_driver.png b/elepower_lighting/textures/elepower_lighting_light_emitting_diode_driver.png new file mode 100644 index 0000000..f88a668 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_light_emitting_diode_driver.png differ diff --git a/elepower_lighting/textures/elepower_lighting_light_emitting_diode_single.png b/elepower_lighting/textures/elepower_lighting_light_emitting_diode_single.png new file mode 100644 index 0000000..c3ef4aa Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_light_emitting_diode_single.png differ diff --git a/elepower_lighting/textures/elepower_lighting_light_fill.png b/elepower_lighting/textures/elepower_lighting_light_fill.png new file mode 100644 index 0000000..06d301d Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_light_fill.png differ diff --git a/elepower_lighting/textures/elepower_lighting_magnifying_lens.png b/elepower_lighting/textures/elepower_lighting_magnifying_lens.png new file mode 100644 index 0000000..355f424 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_magnifying_lens.png differ diff --git a/elepower_lighting/textures/elepower_lighting_paper_blue.png b/elepower_lighting/textures/elepower_lighting_paper_blue.png new file mode 100644 index 0000000..aaf1ccd Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_paper_blue.png differ diff --git a/elepower_lighting/textures/elepower_lighting_paper_colored.xcf b/elepower_lighting/textures/elepower_lighting_paper_colored.xcf new file mode 100644 index 0000000..03337d5 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_paper_colored.xcf differ diff --git a/elepower_lighting/textures/elepower_lighting_paper_red.png b/elepower_lighting/textures/elepower_lighting_paper_red.png new file mode 100644 index 0000000..0547a65 Binary files /dev/null and b/elepower_lighting/textures/elepower_lighting_paper_red.png differ diff --git a/elepower_lighting/textures/palette_32.png b/elepower_lighting/textures/palette_32.png new file mode 100644 index 0000000..1b8e7af Binary files /dev/null and b/elepower_lighting/textures/palette_32.png differ diff --git a/elepower_machines/craft.lua b/elepower_machines/craft.lua index dc8c63f..77a5842 100644 --- a/elepower_machines/craft.lua +++ b/elepower_machines/craft.lua @@ -19,6 +19,7 @@ function elepm.register_craft_type(name, def) elepm.craft[name] = {} + -- Don't register cooking or fuel types externally. if name == "cooking" or name == "fuel" then return end @@ -54,15 +55,28 @@ function elepm.register_craft(craftdef) local ctype = craftdef.type local ctypedef = elepm.craft.types[ctype] local time = (craftdef.time or craftdef.cooktime or 5) + (ctypedef.time or 0) - + local craftrecipe = {} + + -- Recipe inputs are stored as hybridization of standard furnace and regular crafting + -- Table is structured as example + -- input{{[default:tin_ingot]=1},{[default:tin_ingot]=1}} + -- to contrast "cooking" recipes are stored as + -- input{[default:iron_ore]=1} + -- to contrast normal craft recipes are stored as and always assume x1: + -- input:{ + -- {item,item,item}, + -- {item,item,item}, + -- {item,item,item} + -- } + for _,input in ipairs(inputs) do local stack = ItemStack(input) if stack and not stack:is_empty() then - craftrecipe[stack:get_name()] = stack:get_count() + table.insert(craftrecipe,{[stack:get_name()] = stack:get_count()}) end end - + local craftresult = {} if type(outputs) == "table" then for _,output in ipairs(outputs) do @@ -82,16 +96,18 @@ function elepm.register_craft(craftdef) } table.insert(elepm.craft[ctype], recipe) - + if have_ui or have_cg then local spec = {} local items = {} - for item, count in pairs(recipe.recipe) do - local stack = ItemStack(item) - stack:set_count(count) - spec[#spec+1] = stack - items[#items+1] = stack:to_string() + for _, def in pairs(recipe.recipe) do + for item,count in pairs(def) do + local stack = ItemStack(item) + stack:set_count(count) + spec[#spec+1] = stack + items[#items+1] = stack:to_string() + end end if type(recipe.output) == "table" then @@ -145,10 +161,11 @@ local no_recipe = { } function elepm.get_recipe(type, inputs) + if not elepm.craft[type] or not inputs then return no_recipe end - + -- Minetest's cooking builtin type if type == "cooking" then local result, new_input = minetest.get_craft_result({ @@ -170,44 +187,51 @@ function elepm.get_recipe(type, inputs) -- Custom types local result = no_recipe - for _,recipe in ipairs(elepm.craft[type]) do - local recip_match = true - local inputs_full = {} - local new_input = {} + local recipe_match = false + local new_input = {} + local sp_recipe + local count + + for rec_num,recipe in pairs(elepm.craft[type]) do + sp_recipe = 0 + count = 0 - for _,input in ipairs(inputs) do - local in_name = input:get_name() - - if not recipe.recipe[in_name] then - recip_match = false - elseif recipe.recipe[in_name] > input:get_count() then - recip_match = false - end - - if not recip_match then break end - - table.insert(inputs_full, in_name) - - local istack = ItemStack(in_name) - istack:set_count(input:get_count() - recipe.recipe[in_name]) - new_input[#new_input + 1] = istack - end - - if recip_match then - for _,ingredient in ipairs(recipe.recipe) do - local its = ItemStack(ingredient) - if not inputs_full[its:get_name()] then - recip_match = false - break + for item_num, items in pairs(recipe.recipe) do -- items = {value4 = 1} + for pos,input in pairs(inputs) do + local in_name = input:get_name() + if items[in_name] and -- is input_name in recipe + items[in_name] <= input:get_count() and -- do we have enough materials in input + pos == item_num then -- are we in correct pos/slot + + sp_recipe = rec_num + count = count + 1 end end end - if recip_match then - result = recipe - result.new_input = new_input - break + if count == #inputs then + recipe_match = true + break + end + end + + if recipe_match == true then + + for item_num,items in pairs(elepm.craft[type][sp_recipe]["recipe"]) do + + for name,num in pairs(items) do + + local istack = ItemStack(name) + istack:set_count(inputs[item_num]:get_count() - num) + new_input[#new_input + 1] = istack + + end end + + result = elepm.craft[type][sp_recipe] -- includes recipe,time,output + result.new_input = new_input + else + --minetest.debug("no match") -- useful for debugging end return result diff --git a/elepower_machines/crafting.lua b/elepower_machines/crafting.lua index 446cfbc..b224bc8 100644 --- a/elepower_machines/crafting.lua +++ b/elepower_machines/crafting.lua @@ -134,13 +134,17 @@ local grinding_recipes = { recipe = { "default:mese_crystal" }, output = "default:mese_crystal_fragment 9", }, + { + recipe = { "default:mese_crystal_fragment" }, + output = "elepower_dynamics:mese_dust", + }, { recipe = { "elepower_dynamics:graphite_ingot" }, output = "elepower_dynamics:graphite_rod 3", } } --- Register solderer recipes +-- Register grind recipes for _,i in pairs(grinding_recipes) do elepm.register_craft({ type = "grind", @@ -161,8 +165,8 @@ for mat, ingot in pairs(ingot_map) do if plate then elepm.register_craft({ type = "compress", - recipe = { ingot .. " 2" }, - output = plate.item, + recipe = {ingot,ingot}, + output = plate.item.." 2", time = 4, }) @@ -170,7 +174,7 @@ for mat, ingot in pairs(ingot_map) do elepm.register_craft({ type = "grind", recipe = { plate.item }, - output = dust.item .. " 2", + output = dust.item.." 2", time = 6, }) end @@ -185,7 +189,7 @@ for name in pairs(minetest.registered_nodes) do if minetest.registered_nodes[sandstone] then elepm.register_craft({ type = "compress", - recipe = { sand .. " 4" }, + recipe = { sand .. " 2",sand .. " 2"}, output = sandstone, time = 1, }) @@ -203,7 +207,7 @@ for name in pairs(minetest.registered_nodes) do if minetest.registered_nodes[ssblock] then elepm.register_craft({ type = "compress", - recipe = { sandstone .. " 4" }, + recipe = { sandstone .. " 2",sandstone .. " 2" }, output = ssblock, time = 1, }) @@ -214,28 +218,33 @@ end local compressor_recipes = { { - recipe = { "elepower_dynamics:viridisium_block 9" }, + recipe = { "elepower_dynamics:viridisium_block 4", "elepower_dynamics:viridisium_block 4" }, output = "elepower_dynamics:xycrone_lump", time = 20, }, { - recipe = { "default:mese_crystal_fragment 9" }, + recipe = { "default:mese_crystal_fragment 4", "default:mese_crystal_fragment 4" }, output = "default:mese_crystal", + time = 2, }, { - recipe = { "default:mese_crystal 9" }, + recipe = { "default:mese_crystal 4","default:mese_crystal 4" }, output = "default:mese", + time = 2, }, { - recipe = { "elepower_dynamics:coal_dust 4" }, + recipe = { "elepower_dynamics:coal_dust 2","elepower_dynamics:coal_dust 2" }, output = "elepower_dynamics:carbon_fiber", + time = 2, }, { - recipe = { "elepower_dynamics:carbon_fiber 4" }, + recipe = { "elepower_dynamics:carbon_fiber 2","elepower_dynamics:carbon_fiber 2" }, output = "elepower_dynamics:carbon_sheet", + time = 2, } } + -- Register compressor recipes for _,i in pairs(compressor_recipes) do elepm.register_craft({ diff --git a/elepower_machines/machines/bases/crafter.lua b/elepower_machines/machines/bases/crafter.lua index 97f9a9f..17da5ec 100644 --- a/elepower_machines/machines/bases/crafter.lua +++ b/elepower_machines/machines/bases/crafter.lua @@ -7,7 +7,9 @@ function ele.formspec.get_crafter_formspec(craft_type, power, percent, pos, mach local craft_reg_path = elepm.craft[craft_type] local input_size = craftstats.inputs local material_inputs = {} - local mat_inputs = "|" + local mat_inputs_1 = "|" + local mat_inputs_2 = "|" + local mat_inputs_3 = "|" local formspec_inout_icon_tooltip local icon_def_slot_1 = minetest.registered_nodes[machine_name].ele_icon_material_1 or "elepower_gui_icon_crafter_genmat_1.png" local icon_def_slot_2 = minetest.registered_nodes[machine_name].ele_icon_material_2 or "elepower_gui_icon_crafter_genmat_2.png" @@ -37,18 +39,21 @@ function ele.formspec.get_crafter_formspec(craft_type, power, percent, pos, mach end end else - for k,v in pairs(craft_reg_path) do - for k2,v2 in pairs(v.recipe)do - -- have to check all registered items - if minetest.registered_items[k2] then - local description = minetest.registered_items[k2].description - - -- remove any text on 2nd/3rd line - if string.find(description,"\n") then - description = string.split(description,"\n") - description = description[1] - end - material_inputs[description] = 1 + for _,craft_recipes in pairs(craft_reg_path) do + for item_pos,item in pairs(craft_recipes.recipe)do + for item_name,item_num in pairs(item) do + -- have to check all registered items + if minetest.registered_items[item_name] then + local description = minetest.registered_items[item_name].description + + -- remove any text on 2nd/3rd line + if string.find(description,"\n") then + description = string.split(description,"\n") + description = description[1] + end + + material_inputs[description..":"..item_pos] = item_pos -- add a unique value to name + end end end end @@ -61,29 +66,42 @@ function ele.formspec.get_crafter_formspec(craft_type, power, percent, pos, mach end table.sort(material_in_sort) - for k,mat_desc in pairs(material_in_sort) do - mat_inputs = mat_inputs.."\n"..mat_desc + for k,mat_desc in pairs(material_in_sort) do + + local mat_desc_r = string.gsub(mat_desc,":(.*)","") -- remove :1,:2,:3 + + if material_inputs[mat_desc] == 1 then + mat_inputs_1 = mat_inputs_1.."\n"..mat_desc_r + + elseif material_inputs[mat_desc] == 2 then + mat_inputs_2 = mat_inputs_2.."\n"..mat_desc_r + + elseif material_inputs[mat_desc] == 3 then + mat_inputs_3 = mat_inputs_3.."\n"..mat_desc_r + end end - mat_inputs = string.gsub(mat_inputs, "|\n","") - + mat_inputs_1 = string.gsub(mat_inputs_1, "|\n","") + mat_inputs_2 = string.gsub(mat_inputs_2, "|\n","") + mat_inputs_3 = string.gsub(mat_inputs_3, "|\n","") + --adjust tooltip and layout depending on if we have 1/2/3 input slots if input_size == 1 then formspec_inout_icon_tooltip = "image[1.7,2.45;0.5,0.5;"..icon_def_slot_1.."]".. - "tooltip[1.5,2.0;1,1;"..mat_inputs..";#30434c;#0399c6]"--"tooltip[1.5,2.0;1,1;"..minetest.colorize("#0399c6",mat_inputs).."]" + "tooltip[1.5,2.0;1,1;"..mat_inputs_1..";#30434c;#0399c6]"--"tooltip[1.5,2.0;1,1;"..minetest.colorize("#0399c6",mat_inputs).."]" elseif input_size == 2 then formspec_inout_icon_tooltip = "image[1.2,2.45;0.5,0.5;"..icon_def_slot_1.."]".. - "tooltip[1.0,2.0;1,1;"..mat_inputs..";#30434c;#0399c6]".. + "tooltip[1.0,2.0;1,1;"..mat_inputs_1..";#30434c;#0399c6]".. "image[2.2,2.45;0.5,0.5;"..icon_def_slot_2.."]".. - "tooltip[2.0,2.0;1,1;"..mat_inputs..";#30434c;#0399c6]" + "tooltip[2.0,2.0;1,1;"..mat_inputs_2..";#30434c;#0399c6]" else formspec_inout_icon_tooltip = "image[1.2,2.45;0.5,0.5;"..icon_def_slot_1.."]".. - "tooltip[1.0,2.0;1,1;"..mat_inputs..";#30434c;#0399c6]".. + "tooltip[1.0,2.0;1,1;"..mat_inputs_1..";#30434c;#0399c6]".. "image[2.2,2.45;0.5,0.5;"..icon_def_slot_2.."]".. - "tooltip[2.0,2.0;1,1;"..mat_inputs..";#30434c;#0399c6]".. + "tooltip[2.0,2.0;1,1;"..mat_inputs_2..";#30434c;#0399c6]".. "image[3.2,2.45;0.5,0.5;"..icon_def_slot_3.."]".. - "tooltip[3.0,2.0;1,1;"..mat_inputs..";#30434c;#0399c6]" + "tooltip[3.0,2.0;1,1;"..mat_inputs_3..";#30434c;#0399c6]" end -- End add icons tooltips for in slots @@ -148,7 +166,10 @@ function crafter_timer (pos, elapsed) local refresh = false local meta = minetest.get_meta(pos) local inv = meta:get_inventory() - + + + --tt_time = minetest.get_node_timer(pos) + -- Specialized for universal crafter node local machine_node = minetest.get_node(pos).name local machine_def = minetest.registered_nodes[machine_node] diff --git a/elepower_machines/machines/compressor.lua b/elepower_machines/machines/compressor.lua index 3b76cbd..b287843 100644 --- a/elepower_machines/machines/compressor.lua +++ b/elepower_machines/machines/compressor.lua @@ -2,7 +2,7 @@ elepm.register_craft_type("compress", { description = "Compressing", icon = "elepower_machine_side.png^elepower_compressor.png", - inputs = 1, + inputs = 2, }) elepm.register_crafter("elepower_machines:compressor", { diff --git a/elepower_nuclear/craftitems.lua b/elepower_nuclear/craftitems.lua index 6bd8a5f..d638412 100644 --- a/elepower_nuclear/craftitems.lua +++ b/elepower_nuclear/craftitems.lua @@ -14,12 +14,12 @@ minetest.register_craftitem("elepower_nuclear:uranium_lump", { minetest.register_craftitem("elepower_nuclear:uranium_dust", { description = "Enriched Uranium Dust\n(Ready to be used as fuel)", - inventory_image = "elenuclear_uranium_dust.png" + inventory_image = "elepower_dust.png^[colorize:#3eff2788^[multiply:#3eff27A0" }) minetest.register_craftitem("elepower_nuclear:depleted_uranium_dust", { description = "Depleted Uranium Dust\n(Requires enrichment)", - inventory_image = "elenuclear_depleted_uranium_dust.png" + inventory_image = "elepower_dust.png^[multiply:#18df00" }) minetest.register_craftitem("elepower_nuclear:nuclear_waste", { diff --git a/elepower_papi/machine.lua b/elepower_papi/machine.lua index 6abfa8b..f7456f0 100644 --- a/elepower_papi/machine.lua +++ b/elepower_papi/machine.lua @@ -473,10 +473,11 @@ function ele.register_machine(nodename, nodedef) end end - if nodedef.paramtype2 ~= 0 or not nodedef.paramtype2 then + + if nodedef.paramtype2 == 0 or not nodedef.paramtype2 then nodedef.paramtype2 = "facedir" else - nodedef.paramtype2 = nil + --nodedef.paramtype2 = nil end -- Ensure machine group is used properly diff --git a/elepower_tome/i_eletome_additional_info.lua b/elepower_tome/i_eletome_additional_info.lua index 39eb122..6785ec0 100644 --- a/elepower_tome/i_eletome_additional_info.lua +++ b/elepower_tome/i_eletome_additional_info.lua @@ -78,6 +78,18 @@ eletome.ai.machine.over = "These are the simpliest machines in elepower consi "maybe more complex a small 'I' will be present on the large image, indicating ".. "there is a subpage with additional information for that machine. for example ".. "the Automatic Planter at the bottom of the opposite page." + +-- info for Lighting +eletome.ai.lighting = {} +--eletome.ai.lighting.sort_by = "ele_capacity" +eletome.ai.lighting.over = "There is an array of lighting in elepower which increase in technical complexity ".. + "while off setting this with a lower power usage. Lighting types include:\n".. + " Incandescent bulbs\n".. + " Compact Fluroscent bulbs and Fluroscent Tubes\n".. + " LED bulbs and Light panels\n".. + " Flood Lights for each type of bulb\n".. + " A very small number of decorative panels to place around bulbs\n".. + "Black, Silver and Gold conduit to allow the creation of lamps and hanging lights" -- info for Fluid Pump page eletome.ai.fluid_pump = {} @@ -692,6 +704,30 @@ eletome.ai.nodes["elepower_machines:solderer"] = {lb_top_img = "elepower_ eletome.ai.nodes["elepower_farming:tree_processor"] = {lb_top_img = "elepower_gui_icon_fluid_water.png",lb_top_tt = "Processes\n Tree Sap"} +-- Lighting +eletome.ai.nodes["elepower_lighting:bulb_incandescent"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:bulb_cf"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:bulb_led"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:fluro_light_bank"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:led_light_panel"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:led_light_panel_colored"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:led_1x3_light_panel"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:led_2x3_light_panel"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:incandescent_floodlight_xp0_yp0"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:cf_floodlight_xp0_yp0"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + +eletome.ai.nodes["elepower_lighting:led_floodlight_xp0_yp0"] = {lb_top_img = "elepower_lighting_gui_icon_light.png",lb_top_tt = "Light"} + + -- Wind Turbine eletome.ai.nodes["elepower_machines:wind_turbine"] = {lb_top_img = "elepower_tome_wind.png", lb_top_tt = "Wind", diff --git a/elepower_tome/i_functions.lua b/elepower_tome/i_functions.lua index 1937c1e..3c10a7a 100644 --- a/elepower_tome/i_functions.lua +++ b/elepower_tome/i_functions.lua @@ -43,8 +43,8 @@ function eletome.get_nodes_in_group(group_name) -- have to remove registered nodes with same name but -- different number versions eg powercells, also remove -- "active" versions - - if not string.find(name, "active") and tonumber((string.match(name,"%d+"))or 0) == 0 then + + if not string.find(name, "active") and (tonumber(string.sub(name, -1))or 0) == 0 then -- this line creates a slight issue were it will remove other legitimate nodes that end in a number - org code tonumber((string.match(name,"%d+"))or 0) local description = def.description if string.find(description,"\n") then @@ -76,12 +76,24 @@ end function eletome.sort_by(sort_by,mach_sort,mach_key) local key = {} local sort = {} - + local unique = 1 -- create new key table using sort_by with -- field to sort_by and node.description - for des,name in pairs(mach_key)do - table.insert(sort,minetest.registered_nodes[name][sort_by]) - key[minetest.registered_nodes[name][sort_by]] = des + + for des,name in pairs(mach_key)do + local node_value = minetest.registered_nodes[name][sort_by] + + if type(node_value) == "string" then + node_value = node_value..unique + + elseif type(node_value) == "number" then + node_value = node_value + unique + end + + table.insert(sort,node_value) + key[node_value] = des + + unique = unique+1 end -- standard table sort @@ -154,8 +166,7 @@ end function eletome.get_craft_recipe(reg_node_name) local recipe_output = {} recipe_output.items = {} - recipe_output.num = {} - local i = 1 + recipe_output.num = {} local all_crafts = table.copy(elepm.craft.types) for craft_name,craft_def in pairs(all_crafts) do @@ -181,10 +192,11 @@ function eletome.get_craft_recipe(reg_node_name) recipe_output.craft_name = craft_name recipe_output.craft_des = craft_def.description - for k,v in pairs(reg_craft_def.recipe) do - recipe_output.items[pos[i]] = k - recipe_output.num[pos[i]] = v - i=i+1 + for item_pos,item in pairs(reg_craft_def.recipe) do + for name,num in pairs(item) do + recipe_output.items[pos[item_pos]] = name + recipe_output.num[pos[item_pos]] = num + end end end else diff --git a/elepower_tome/i_page_contents.lua b/elepower_tome/i_page_contents.lua index 8778b04..00c7124 100644 --- a/elepower_tome/i_page_contents.lua +++ b/elepower_tome/i_page_contents.lua @@ -88,6 +88,7 @@ function eletome.contents_page() "hypertext[13.5,"..(2.7+ac_off)..";4.5,7.0;machine;"..sty_h3s.. -- right side column "Powercells\n".. + "Lighting\n".. "Fluid Pump\n".. "Evaporation Plant\n".. "Miner\n".. diff --git a/elepower_tome/i_page_crafts.lua b/elepower_tome/i_page_crafts.lua index c9e5363..3fff8c8 100644 --- a/elepower_tome/i_page_crafts.lua +++ b/elepower_tome/i_page_crafts.lua @@ -18,6 +18,7 @@ function eletome.craft_page(craft_description,page_num) -- Convert craft_description back to craft local raw_all_crafts = table.copy(elepm.craft.types) + local craft_click = {} local craft_type for craft_name,def in pairs(raw_all_crafts) do @@ -95,10 +96,10 @@ function eletome.craft_page(craft_description,page_num) -- Craft page right page -- --------------------------- local head_sub_rp_rec = "hypertext[9.5,0.7;8.5,1.0;craft_lp_h;"..sty_h1s.."Recipes"..sty_h1e.."]" - local craft_reg_path = elepm.craft[craft_type] local recipe_list = {} local recipe_list_rdy = {} + if craft_type == "cooking" then @@ -132,25 +133,29 @@ function eletome.craft_page(craft_description,page_num) -- {input={item1,num},{item2,num},output={item1,num},{item2,num}} -- } - for k,v in pairs(craft_reg_path) do + --minetest.debug(dump(elepm.craft2[craft_type])) + for k,craft_recipes in pairs(craft_reg_path) do local input = {} local output = {} - if type(v.output) == "table" then -- very rarly table eg grinding-fuel_rod_depleted - for k,v in pairs(v.output)do + if type(craft_recipes.output) == "table" then -- very rarly table eg grinding-fuel_rod_depleted + for k,v in pairs(craft_recipes.output)do local t_out = string.split(v," ") table.insert(output,{t_out[1],tonumber(t_out[2]) or 1}) end else - local t_out = string.gsub(tostring(v.output),"ItemStack%(\"","") + local t_out = string.gsub(tostring(craft_recipes.output),"ItemStack%(\"","") local t_out = string.gsub(t_out,"\"%)","") local t_out = string.split(t_out," ") table.insert(output,{t_out[1],tonumber(t_out[2]) or 1}) end - - for k2,v2 in pairs(v.recipe)do - table.insert(input,{k2,v2}) + + for k2,def in pairs(craft_recipes.recipe)do -- recipe == inputs only + for name,num in pairs(def) do + table.insert(input,{name,num}) + + end end table.insert(recipe_list,{input = input,output = output}) diff --git a/elepower_tome/i_page_machines.lua b/elepower_tome/i_page_machines.lua index adc094e..cdab3ac 100644 --- a/elepower_tome/i_page_machines.lua +++ b/elepower_tome/i_page_machines.lua @@ -30,6 +30,9 @@ function eletome.machines(machine,page_num) elseif machine_name == "ele_user" then machine_name = "Machine" mach_group = "ele_user" + elseif machine_name == "ele_lighting" then + machine_name = "Lighting" + mach_group = "ele_lighting" end -- remove "_" @@ -99,7 +102,7 @@ function eletome.machines(machine,page_num) -- Sort the table if sort_by ~= nil then if sort_by ~= "no_sort" then - -- Sort values by any field avliable in node registration + -- Sort values by any field avaliable in node registration mach_sort, mach_key = eletome.sort_by(sort_by,mach_sort,mach_key) end else diff --git a/elepower_tome/mod.conf b/elepower_tome/mod.conf index 279f234..cd0b01b 100644 --- a/elepower_tome/mod.conf +++ b/elepower_tome/mod.conf @@ -1,3 +1,4 @@ name = elepower_tome description = Elepower Power Network User Guide depends = elepower_machines +optional_depends = elepower_lighting diff --git a/elepower_wireless/machines/matter_receiver.lua b/elepower_wireless/machines/matter_receiver.lua index f699ec0..952bf59 100644 --- a/elepower_wireless/machines/matter_receiver.lua +++ b/elepower_wireless/machines/matter_receiver.lua @@ -129,4 +129,4 @@ minetest.register_lbm({ nodenames = {"group:matter_receiver"}, run_at_every_load = true, action = save_receiver, -}) +}) \ No newline at end of file