123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- if not minetest.global_exists("lbrim") then lbrim = {} end
- lbrim.modpath = minetest.get_modpath("lbrim")
- minetest.register_node("lbrim:lava_source", {
- description = "Nether Lava Source",
- drawtype = "liquid",
- tiles = {
- {
- name = "lbrim_source.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 3.0,
- },
- },
- },
- special_tiles = {
- -- New-style lava source material (mostly unused)
- {
- name = "lbrim_source.png",
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 3.0,
- },
- backface_culling = false,
- },
- },
- paramtype = "light",
- light_source = default.LIGHT_MAX - 2,
- walkable = true,
- pointable = false,
- diggable = false,
- buildable_to = false,
- -- Liquids cannot be floodable.
- --floodable = true,
- is_ground_content = false,
- drop = "",
- drowning = 1,
- liquidtype = "source",
- liquid_alternative_flowing = "lbrim:lava_flowing",
- liquid_alternative_source = "lbrim:lava_source",
- liquid_viscosity = 7,
- liquid_renewable = true,
- damage_per_second = 16*500,
- _damage_per_second_type = "lava",
- _death_message = default.lava_death_messages(),
- post_effect_color = {a = 191, r = 255, g = 64, b = 0},
-
- groups = -- comment
- {
- lava = 3,
- liquid = 2,
- igniter = 1,
- disable_jump = 1,
- melt_around = 3
- },
-
- on_blast = function(pos, intensity) end,
- on_player_walk_over = function(pos, player)
- if not gdac.player_is_admin(player) then
- local pname = player:get_player_name()
- if player:get_hp() > 0 and not heatdamage.is_immune(pname) then
- local pa = vector.add(pos, {x=0, y=1, z=0})
- if minetest.get_node(pa).name == "air" then
- minetest.add_node(pa, {name="fire:basic_flame"})
- end
- local node = minetest.get_node(pos)
- utility.damage_player(player, "lava", 20*500, {
- reason = "node_damage",
- damage_group = "lava",
- source_node = node.name,
- node_pos = pos,
- })
- end
- end
- end,
- on_collapse_to_entity = function(pos, node)
- -- Do not allow player to obtain the node itself.
- end,
- })
- minetest.register_node("lbrim:lava_flowing", {
- description = "Flowing Nether Lava",
- drawtype = "flowingliquid",
- tiles = {"lbrim_lava.png"},
- special_tiles = {
- {
- name = "lbrim_flowing.png",
- backface_culling = false,
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 3.3,
- },
- },
- {
- name = "lbrim_flowing.png",
- backface_culling = true,
- animation = {
- type = "vertical_frames",
- aspect_w = 16,
- aspect_h = 16,
- length = 3.3,
- },
- },
- },
- paramtype = "light",
- paramtype2 = "flowingliquid",
- light_source = default.LIGHT_MAX - 2,
- walkable = false,
- pointable = false,
- diggable = false,
- buildable_to = false,
- -- Liquids cannot be floodable.
- --floodable = true,
- is_ground_content = false,
- drop = "",
- drowning = 1,
- liquidtype = "flowing",
- liquid_alternative_flowing = "lbrim:lava_flowing",
- liquid_alternative_source = "lbrim:lava_source",
- liquid_viscosity = 7,
- liquid_renewable = true,
- damage_per_second = 16*500,
- _damage_per_second_type = "lava",
- _death_message = default.lava_death_messages(),
- post_effect_color = {a = 191, r = 255, g = 64, b = 0},
-
- groups = -- comment
- {
- lava = 3,
- liquid = 2,
- igniter = 1,
- not_in_creative_inventory = 1,
- disable_jump = 1,
- melt_around = 3
- },
-
- on_blast = function(pos, intensity) end,
- on_player_walk_over = function(pos, player)
- if not gdac.player_is_admin(player) then
- local pname = player:get_player_name()
- if player:get_hp() > 0 and not heatdamage.is_immune(pname) then
- local pa = vector.add(pos, {x=0, y=1, z=0})
- if minetest.get_node(pa).name == "air" then
- minetest.add_node(pa, {name="fire:basic_flame"})
- end
- local node = minetest.get_node(pos)
- utility.damage_player(player, "lava", 20*500, {
- reason = "node_damage",
- damage_group = "lava",
- source_node = node.name,
- node_pos = pos,
- })
- end
- end
- end,
- on_collapse_to_entity = function(pos, node)
- -- Do not allow player to obtain the node itself.
- end,
- })
|