From 1b7bcda5c2a6ab0bfe5d11e9775c72a121738b42 Mon Sep 17 00:00:00 2001 From: maikerumine Date: Sat, 30 Jan 2016 00:44:50 -0500 Subject: [PATCH] added purpellium and bug fix with textures --- bpinit.lua | 2523 ------------------------------------------------ crafting.lua | 50 +- init.lua | 5 +- mapgen.lua | 1214 ----------------------- mostair.lua | 16 +- nodes-bad.lua | 870 +++++++++++++++++ nodes-good.lua | 625 ++++++++++++ nodes-org.lua | 625 ++++++++++++ nodes.lua | 287 +++++- oregen.lua | 59 +- shutdown.lua | 12 +- stair.lua | 16 +- thaw.lua | 18 + tools.lua | 156 ++- 14 files changed, 2658 insertions(+), 3818 deletions(-) delete mode 100644 bpinit.lua delete mode 100644 mapgen.lua create mode 100644 nodes-bad.lua create mode 100644 nodes-good.lua create mode 100644 nodes-org.lua create mode 100644 thaw.lua diff --git a/bpinit.lua b/bpinit.lua deleted file mode 100644 index 0f38d9c..0000000 --- a/bpinit.lua +++ /dev/null @@ -1,2523 +0,0 @@ ---function bp:spawn_specific(name, nodes, neighbors, min_light, max_light, interval, chance, active_object_count, min_height, max_height) - -dofile(minetest.get_modpath("es").."/api.lua") - -bp:register_spawn("es:badplayer1", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer1", { - type = "npc", - hp_min = 25, - hp_max = 35, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer1.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1.0}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 3, - damage = 2, - drops = { - {name = "default:apple", - chance = 1, - min = 1, - max = 2,}, - {name = "default:sword_steel", - chance = 2, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death1", - attack = "default_punch", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, -}) -bp:register_spawn("es:badplayer2", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, -20) -bp:register_mob("es:badplayer2", { - type = "monster", - hp_min = 35, - hp_max = 75, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer2.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 3, - damage = 3, - drops = { - {name = "default:jungletree", - chance = 1, - min = 0, - max = 2,}, - {name = "default:sword_steel", - chance = 2, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 0, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 100, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch2", - }, -}) -bp:register_spawn("es:badplayer3", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer3", { - type = "monster", - hp_min = 49, - hp_max = 83, - collisionbox = {-0.3, -0.6, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer3.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1.2, y=.7}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:stone_with_mese", - chance = 7, - min = 0, - max = 5,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default_apple", - chance = 1, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_howl", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer4", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer4", { - type = "monster", - hp_min = 37, - hp_max = 82, - collisionbox = {-0.3, -1.3, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer4.png", - "3d_armor_trans.png", - minetest.registered_items["default:pick_steel"].inventory_image, - }, - visual_size = {x=1.2, y=1.3}, - makes_footstep_sound = true, - view_range = 19, - walk_velocity = 1, - run_velocity = 3, - damage = 3, - drops = { - {name = "default:sword_steel", - chance = 2, - min =0, - max = 1,}, - {name = "default:pick_steel", - chance = 4, - min = 0, - max = 1,}, - {name = "default:steel_ingot", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 100, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch", - }, -}) -bp:register_spawn("es:badplayer5", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer5", { - type = "npc", - hp_min = 27, - hp_max = 34, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer5.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_wood"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:apple", - chance = 1, - min = 1, - max = 5,}, - {name = "default:sword_wood", - chance = 1, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 85, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death2", - attack = "default_punch2", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, -}) -bp:register_spawn("es:badplayer6", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, -10) -bp:register_mob("es:badplayer6", { - type = "monster", - hp_min = 130, - hp_max = 140, - collisionbox = {-0.3, -0.8, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer6.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_mese"].inventory_image, - }, - visual_size = {x=.9, y=.8}, - makes_footstep_sound = true, - view_range = 20, - walk_velocity = 3, - run_velocity = 4, - damage = 3, - drops = { - {name = "default:sword_mese", - chance = 3, - min = 0, - max = 1,}, - {name = "default:gold_ingot", - chance = 3, - min = 0, - max = 1,}, - {name = "default_apple", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer7", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer7", { - type = "monster", - hp_min = 37, - hp_max = 70, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer7.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_bronze"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1.2, - run_velocity = 3, - damage = 3, - drops = { - {name = "default:sword_bronze", - chance = 2, - min = 0, - max = 1,}, - {name = "default:bronze_ingot", - chance = 3, - min = 0, - max = 5,}, - {name = "default_apple", - chance = 1, - min = 1, - max=2,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 85, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_yeti_death", - attack = "mobs_oerkki_attack", - }, -}) -bp:register_spawn("es:badplayer8", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, -20) -bp:register_mob("es:badplayer8", { - type = "monster", - hp_min = 157, - hp_max = 195, - collisionbox = {-0.3, -0.8, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer8.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=0.6, y=0.8}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 1.5, - damage = 3, - drops = { - {name = "default:snow", - chance = 1, - min = 3, - max = 33,}, - {name = "default:sword_steel", - chance = 2, - min = 0, - max = 1,}, - {name = "default:ice", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 100, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch2", - }, -}) -bp:register_spawn("es:badplayer9", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 4, -1, 11000, 1, -30) -bp:register_mob("es:badplayer9", { - type = "monster", - hp_min = 177, - hp_max = 190, - collisionbox = {-0.3, -0.8, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer9.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_bronze"].inventory_image, - }, - visual_size = {x=.9, y=.8}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 3, - damage = 3, - drops = { - {name = "default:sword_bronze", - chance = 2, - min = 0, - max = 1,}, - {name = "default:default:stone_with_diamond", - chance = 6, - min = 0, - max = 3,}, - {name = "default:apple", - chance = 1, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer10", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 4, -1, 11000, 1, -40) -bp:register_mob("es:badplayer10", { - type = "monster", - hp_min = 157, - hp_max = 200, - collisionbox = {-0.3, -1.5, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer10.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_mese"].inventory_image, - }, - visual_size = {x=1.3, y=1.5}, - makes_footstep_sound = true, - view_range = 10, - walk_velocity = 4, - run_velocity =15, - damage = 4, - drops = { - {name = "default:cotton", - chance = 1, - min = 3, - max = 5,}, - {name = "default:sword_diamond", - chance = 3, - min = 0, - max = 1,}, - {name = "default:sword_mese", - chance = 2, - min = 0, - max=1,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 500, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_fireball", - attack = "mobs_slash_attack", - }, -}) -bp:register_spawn("es:badplayer11", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, -100) -bp:register_mob("es:badplayer11", { - type = "monster", - hp_min = 49, - hp_max = 85, - collisionbox = {-0.3, -1.3, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer11.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1.3}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:sapling", - chance = 1, - min = 3, - max = 5,}, - {name = "default:sword_steel", - chance = 6, - min = 0, - max = 1,}, - {name = "default:dirt", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 100, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch2", - }, -}) -bp:register_spawn("es:badplayer12", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer12", { - type = "monster", - hp_min = 57, - hp_max = 85, - collisionbox = {-0.3, -0.5, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer12.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_wood"].inventory_image, - }, - visual_size = {x=1, y=.5}, - makes_footstep_sound = true, - view_range = 25, - walk_velocity = 0.3, - run_velocity = 1.5, - damage = 3, - drops = { - {name = "default:grass_1", - chance = 1, - min = 3, - max = 5,}, - {name = "default:sword_wood", - chance = 2, - min = 1, - max = 1,}, - {name = "default:sand", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 100, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer13", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer13", { - type = "npc", - hp_min = 13, - hp_max = 15, - collisionbox = {-0.3, -0.8, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer13.png", - "3d_armor_trans.png", - minetest.registered_items["default:stick"].inventory_image, - }, - visual_size = {x=1, y=.8}, - makes_footstep_sound = true, - view_range = 19, - walk_velocity = 1.6, - run_velocity = 1, - damage = 2.5, - drops = { - {name = "default:leaves", - chance = 1, - min = 3, - max = 5,}, - {name = "default:sword_steel", - chance = 2, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 40, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - follow = "default:apple", - on_rightclick = nil, - - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_oerkki_attack", - death = "mobs_death1", - attack = "default_punch", - }, - - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, -}) - ---bp:register_egg("es:badplayer13", "Girl In Red", "character_13_preview.png", 1) - - - -bp:register_spawn("es:badplayer14", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer14", { - type = "npc", - hp_min = 27, - hp_max = 45, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer14.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_wood"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:papyrus", - chance = 1, - min = 3, - max = 5,}, - {name = "default:sword_steel", - chance = 2, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 90, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_death1", - attack = "default_punch2", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, - -}) -bp:register_spawn("es:badplayer15", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer15", { - type = "npc", - hp_min = 47, - hp_max = 55, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer15.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_mese"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 7, - walk_velocity = 1.3, - run_velocity = 3.9, - damage = 3, - drops = { - {name = "default:sword_mese", - chance = 2, - min = 0, - max = 1,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default:apple", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death2", - attack = "default_punch3", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, -}) -bp:register_spawn("es:badplayer16", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer16", { - type = "monster", - hp_min = 47, - hp_max = 85, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer16.png", - "3d_armor_trans.png", - minetest.registered_items["default:pick_wood"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 1.4, - damage = 3, - drops = { - {name = "default:pick_wood", - chance = 1, - min = 0, - max = 1,}, - {name = "default:sword_wood", - chance = 1, - min = 1, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 1, - max=5,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 90, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch", - }, -}) -bp:register_spawn("es:badplayer17", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer17", { - type = "npc", - hp_min = 37, - hp_max = 45, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer17.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_wood"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2.3, - damage = 4, - drops = { - {name = "default:apple", - chance = 1, - min = 0, - max = 5,}, - {name = "default:sword_wood", - chance = 1, - min = 1, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 4, - max=12,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 90, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death1", - attack = "default_punch2", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, - -}) -bp:register_spawn("es:badplayer18", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer18", { - type = "monster", - hp_min = 48, - hp_max = 77, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer18.png", - "3d_armor_trans.png", - minetest.registered_items["default:pick_stone"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:pick_stone", - chance = 1, - min = 1, - max = 3,}, - {name = "default:sword_stone", - chance = 5, - min = 0, - max = 1,}, - {name = "default:stone_with_gold", - chance = 2, - min = 4, - max=8,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 90, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_eerie", - death = "mobs_yeti_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer19", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer19", { - type = "npc", - hp_min = 28, - hp_max = 35, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer19.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 25, - walk_velocity = 1.6, - run_velocity = 2.8, - damage = 3, - drops = { - {name = "default:torch", - chance = 1, - min = 3, - max = 5,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 13, - max=30,}, - {name = "bones:bones", - chance = 2, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_fireball", - death = "mobs_slash_attack", - attack = "default_punch", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, - -}) -bp:register_spawn("es:badplayer20", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, -10) -bp:register_mob("es:badplayer20", { - type = "npc", - hp_min = 92, - hp_max = 125, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer20.png", - "3d_armor_trans.png", - minetest.registered_items["default:pick_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1.7, - run_velocity = 2.5, - damage = 4, - drops = { - {name = "default:pick_steel", - chance = 4, - min = 0, - max = 2,}, - {name = "default:sword_steel", - chance = 7, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_stone", - death = "mobs_slash_attack", - attack = "default_punch2", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, - -}) -bp:register_spawn("es:badplayer21", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, -50) -bp:register_mob("es:badplayer21", { - type = "monster", - hp_min = 157, - hp_max = 180, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer21.png", - "3d_armor_trans.png", - minetest.registered_items["default:pick_mese"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 4, - walk_velocity = 2.5, - run_velocity = 7, - damage = 4, - drops = { - {name = "default:pick_mese", - chance = 2, - min = 0, - max = 1,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default_apple", - chance = 1, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer22", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer22", { - type = "npc", - hp_min = 77, - hp_max = 90, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer22.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 3, - run_velocity = 3, - damage = 4, - drops = { - {name = "default:chest", - chance = 1, - min = 0, - max = 1,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default:default_brick", - chance = 4, - min = 1, - max=30,}, - {name = "bones:bones", - chance = 2, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 11, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death2", - attack = "default_punch", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, - -}) -bp:register_spawn("es:badplayer23", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, -100) -bp:register_mob("es:badplayer23", { - type = "monster", - hp_min = 127, - hp_max = 152, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer23.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 7, - walk_velocity = 1.3, - run_velocity = 3.5, - damage = 3, - drops = { - {name = "default:steelblock", - chance = 3, - min = 0, - max = 2,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "shooter:ammo", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch2", - }, -}) -bp:register_spawn("es:badplayer24", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, -40) -bp:register_mob("es:badplayer24", { - type = "monster", - hp_min = 137, - hp_max = 159, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer24.png", - "3d_armor_trans.png", - minetest.registered_items["default:goldblock"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1.5, - run_velocity = 3, - damage = 2.5, - drops = { - {name = "default:goldblock", - chance = 6, - min = 1, - max = 4,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 0, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_barbarian_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer25", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, -120) -bp:register_mob("es:badplayer25", { - type = "monster", - hp_min = 100, - hp_max = 120, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer25.png", - "3d_armor_trans.png", - minetest.registered_items["default:pick_diamond"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 12, - walk_velocity = 2, - run_velocity = 3, - damage = 5, - drops = { - {name = "default:pick_diamond", - chance = 2, - min = 0, - max = 1,}, - {name = "default:sword_diamond", - chance = 1, - min = 0, - max = 2,}, - {name = "default_apple", - chance = 2, - min = 1, - max=5,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch", - }, -}) -bp:register_spawn("es:badplayer26", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer26", { - type = "monster", - hp_min = 73, - hp_max = 80, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer26.png", - "3d_armor_trans.png", - minetest.registered_items["default:axe_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:axe_steel", - chance = 1, - min = 0, - max = 2,}, - {name = "farming:seed_cotton", - chance = 1, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 90, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch2", - }, -}) -bp:register_spawn("es:badplayer27", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer27", { - type = "monster", - hp_min = 99, - hp_max = 140, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer27.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_diamond"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 10, - walk_velocity = 2, - run_velocity = 4, - damage = 6, - drops = { - {name = "default:sword_diamond", - chance = 1, - min = 0, - max = 1,}, - {name = "default:default_apple", - chance = 1, - min = 1, - max = 7,}, - {name = "default:stick", - chance = 1, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 112, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_barbarian_death", - attack = "default_punch3", - }, -}) -bp:register_spawn("es:badplayer28", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer28", { - type = "monster", - hp_min = 77, - hp_max = 90, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer28.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 25, - walk_velocity = 0.5, - run_velocity = 1.5, - damage = 3, - drops = { - {name = "default:obsidian", - chance = 2, - min = 0, - max = 5,}, - {name = "default:sword_steel", - chance = 1, - min = 0, - max = 1,}, - {name = "default_apple", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch", - }, -}) -bp:register_spawn("es:badplayer29", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, -50) -bp:register_mob("es:badplayer29", { - type = "monster", - hp_min = 69, - hp_max = 89, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer29.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_stone"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 2, - damage = 3, - drops = { - {name = "default:sword_stone", - chance = 1, - min = 0, - max = 2,}, - {name = "default:water_flowing", - chance = 3, - min = 0, - max = 1,}, - {name = "default:default_apple", - chance = 2, - min = 1, - max=9,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 100, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_eerie", - death = "mobs_yeti_death", - attack = "default_punch2", - }, -}) -bp:register_spawn("es:badplayer30", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, -50) -bp:register_mob("es:badplayer30", { - type = "monster", - hp_min = 137, - hp_max = 150, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer30.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_mese"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 5, - walk_velocity = 1, - run_velocity = 5, - damage = 4, - drops = { - {name = "default:diamondblock", - chance = 4, - min = 1, - max = 3,}, - {name = "default:sword_mese", - chance = 2, - min = 0, - max = 1,}, - {name = "default:default_apple", - chance = 2, - min = 2, - max=7,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 112, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_howl", - attack = "default_punch3", - }, -}) - -bp:register_spawn("es:badplayer31", {"default:dirt_with_grass","default:stone","meru:stone", "default:stonebrick","default:cobble"}, 5, -1, 11000, 1, 31000) -bp:register_mob("es:badplayer31", { - type = "monster", - hp_min = 77, - hp_max = 130, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer31.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_mese"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 5, - walk_velocity = 1, - run_velocity = 5, - damage = 4, - drops = { - {name = "default:cactus", - chance = 5, - min = 0, - max = 3,}, - {name = "default:sword_mese", - chance = 2, - min = 1, - max = 1,}, - {name = "default:dirt", - chance = 2, - min = 6, - max=23,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 0, - lava_damage = 5, - light_damage = 112, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_howl", - attack = "default_punch3", - }, -}) - -bp:register_spawn("es:badplayer32", {"default:obsidian","es:infiniumblock","es:stone_with_infinium"}, 14, -1, 7000, 2, -50) -bp:register_mob("es:badplayer32", { - type = "monster", - hp_min = 177, - hp_max = 190, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"badplayer32.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_diamond"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 8, - walk_velocity = 5, - run_velocity = 3.4, - damage = 9, - drops = { - {name = "es:infinium_goo", - chance = 5, - min = 0, - max = 1,}, - {name = "default:sword_diamond", - chance = 2, - min = 1, - max = 1,}, - {name = "default:water_flowing", - chance = 2, - min = 1, - max=2,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 75, - drawtype = "front", - water_damage = 0, - lava_damage = 0, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell2", - death = "mobs_howl", - attack = "default_punch3", - }, -}) - - -bp:register_spawn("es:badplayer33", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer33", { - type = "npc", - hp_min = 125, - hp_max = 135, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"character_17.png", - "3d_armor_trans.png", - minetest.registered_items["es:sword_ruby"].inventory_image, - }, - visual_size = {x=1, y=1.0}, - makes_footstep_sound = true, - view_range = 25, - walk_velocity = 1.9, - run_velocity = 3.9, - damage = 5, - drops = { - {name = "default:apple", - chance = 1, - min = 1, - max = 5,}, - {name = "es:sword_ruby", - chance = 5, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 1, - max=4,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death1", - attack = "default_punch", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, -}) - -bp:register_spawn("es:badplayer34", {"default:dirt_with_grass","default:stone", "default:stonebrick","default:cobble"}, 20, 10, 11000, 1, 31000) -bp:register_mob("es:badplayer34", { - type = "npc", - hp_min = 25, - hp_max = 35, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"character_2.png", - "3d_armor_trans.png", - minetest.registered_items["es:infinium_ingot"].inventory_image, - }, - visual_size = {x=1, y=1.0}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 3, - run_velocity = 5, - damage = 3, - drops = { - {name = "default:apple", - chance = 1, - min = 1, - max = 2,}, - {name = "default:sword_diamond", - chance = 3, - min = 0, - max = 1,}, - {name = "default:meselamp", - chance = 2, - min = 1, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_die_yell", - death = "mobs_death1", - attack = "default_punch", - }, - attacks_monsters = true, - peaceful = true, - group_attack = true, - step = 1, -}) - -bp:register_spawn("es:badplayer35", {"default:sandstone","default:stone", "default:stonebrick","default:cobble"}, 9, -1, 11000, 1, -20) -bp:register_mob("es:badplayer35", { - type = "monster", - hp_min = 35, - hp_max = 75, - collisionbox = {-0.3, -1.0, -0.3, 0.3, 0.8, 0.3}, - visual = "mesh", - mesh = "3d_armor_character.x", - textures = {"character_21.png", - "3d_armor_trans.png", - minetest.registered_items["default:sword_steel"].inventory_image, - }, - visual_size = {x=1, y=1}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1.9, - run_velocity = 3.8, - damage = 4, - drops = { - {name = "default:jungletree", - chance = 1, - min = 0, - max = 2,}, - {name = "default:sword_steel", - chance = 2, - min = 0, - max = 1,}, - {name = "default:stick", - chance = 2, - min = 0, - max=3,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - armor = 80, - drawtype = "front", - water_damage = 10, - lava_damage = 5, - light_damage = 110, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 30, speed_run = 30, - stand_start = 0, stand_end = 79, - walk_start = 168, walk_end = 187, - run_start = 168, run_end = 187, - punch_start = 200, punch_end = 219, - }, - sounds = { - war_cry = "mobs_barbarian_yell1", - death = "mobs_barbarian_death", - attack = "default_punch2", - }, -}) - - - - --- Sheep by PilzAdam - -bp:register_mob("es:sheep", { - type = "animal", - passive = true, - hp_min = 12, - hp_max = 20, - armor = 100, - collisionbox = {-0.4, -0.01, -0.4, 0.4, 1, 0.4}, - visual = "mesh", - mesh = "mobs_sheep.x", - textures = { - {"mobs_sheep.png"}, - }, - visual_size = {x=1,y=1}, - gotten_texture = {"mobs_sheep_shaved.png"}, - gotten_mesh = "mobs_sheep_shaved.x", - makes_footstep_sound = true, - sounds = { - random = "mobs_sheep", - }, - walk_velocity = 1.7, - jump = true, - drops = { - {name = "badplayer:meat_raw", - chance = 1, min = 2, max = 3}, - {name = "wool:white", - chance = 1, min = 1, max = 1}, - }, - water_damage = 1, - lava_damage = 5, - light_damage = 0, - animation = { - speed_normal = 15, speed_run = 15, - stand_start = 0, stand_end = 80, - walk_start = 81, walk_end = 100, - }, - follow = "farming:wheat", - view_range = 5, - replace_rate = 50, - replace_what = {"default:grass_3", "default:grass_4", "default:grass_5", "farming:wheat_8"}, - replace_with = "air", - on_rightclick = function(self, clicker) - local item = clicker:get_wielded_item() - if item:get_name() == "farming:wheat" then - if not minetest.setting_getbool("creative_mode") then - item:take_item() - clicker:set_wielded_item(item) - end - if self.child == true then - self.hornytimer = self.hornytimer + 10 - return - end - self.food = (self.food or 0) + 1 - if self.food >= 8 then - self.food = 0 - if self.hornytimer == 0 then - self.horny = true - end - self.gotten = false -- can be shaved again - self.tamed = true - self.object:set_properties({ - textures = {"mobs_sheep.png"}, - mesh = "mobs_sheep.x", - }) - minetest.sound_play("mobs_sheep", {object = self.object,gain = 1.0,max_hear_distance = 32,loop = false,}) - end - return - end - - if item:get_name() == "bp:shears" - and self.gotten == false - and self.child == false then - self.gotten = true -- shaved - if minetest.registered_items["wool:white"] then - local pos = self.object:getpos() - pos.y = pos.y + 0.5 - local obj = minetest.add_item(pos, ItemStack("wool:white "..math.random(2,3))) - if obj then - obj:setvelocity({x=math.random(-1,1), y=5, z=math.random(-1,1)}) - end - item:add_wear(650) -- 100 uses - clicker:set_wielded_item(item) - end - self.object:set_properties({ - textures = {"mobs_sheep_shaved.png"}, - mesh = "mobs_sheep_shaved.x", - }) - end - - if item:get_name() == "bp:magic_lasso" - and clicker:is_player() - and clicker:get_inventory() - and self.child == false - and clicker:get_inventory():room_for_item("main", "es:sheep") then - clicker:get_inventory():add_item("main", "es:sheep") - self.object:remove() - item:add_wear(3000) -- 22 uses - print ("wear", item:get_wear()) - clicker:set_wielded_item(item) - end - end, -}) - -bp:register_spawn("es:sheep", {"default:dirt_with_grass", "ethereal:green_dirt"}, 20, 10, 9000, 2, 31000) - ---bp:register_egg("es:sheep", "Sheep", "wool_white.png", 1) - ---[[ shears (right click sheep to shear wool) -minetest.register_tool("es:shears", { - description = "Steel Shears (right-click sheep to shear)", - inventory_image = "mobs_shears.png", -}) - -minetest.register_craft({ - output = 'es:shears', - recipe = { - {'', 'default:steel_ingot', ''}, - {'', 'group:stick', 'default:steel_ingot'}, - } -})]] - --- Tree Monster (or Tree Gollum) by PilzAdam - -bp:register_mob("es:tree_monster", { - type = "monster", - passive = false, - attack_type = "dogfight", - damage = 1, - hp_min = 27, - hp_max = 53, - armor = 100, - collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4}, - visual = "mesh", - mesh = "mobs_tree_monster.x", - textures = { - {"mobs_tree_monster.png"}, - }, - visual_size = {x=4.5,y=4.5}, - blood_texture = "default_wood.png", - makes_footstep_sound = true, - sounds = { - random = "mobs_treemonster", - }, - walk_velocity = 1, - run_velocity = 3, - jump = true, - view_range = 15, - drops = { - {name = "ethereal:tree_sapling", - chance = 3, min = 1, max = 2}, - {name = "ethereal:jungle_tree_sapling", - chance = 3, min = 1, max = 2}, - {name = "default:apple", - chance = 2, min = 1, max=3}, - }, - water_damage = 1, - lava_damage = 5, - light_damage = 2, - fall_damage = 0, - animation = { - speed_normal = 15, speed_run = 15, - stand_start = 0, stand_end = 24, - walk_start = 25, walk_end = 47, - run_start = 48, run_end = 62, - punch_start = 48, punch_end = 62, - }, -}) - -bp:register_spawn("es:tree_monster", {"default:leaves", "default:jungleleaves","default:dirt", "default:jungletree"}, 5, 0, 13000, 2, 31000) - ---bp:register_egg("es:tree_monster", "Tree Monster", "default_tree_top.png", 1) - --- ethereal sapling compatibility -if not minetest.get_modpath("ethereal") then - minetest.register_alias("ethereal:tree_sapling", "default:sapling") - minetest.register_alias("ethereal:jungle_tree_sapling", "default:junglesapling") -end - - - - --- Sand Monster by PilzAdam - -bp:register_mob("es:sand_monster", { - type = "monster", - passive = false, - attack_type = "dogfight", - damage = 2, - hp_min = 7, - hp_max = 15, - armor = 100, - collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4}, - visual = "mesh", - mesh = "mobs_sand_monster.x", - textures = { - {"mobs_sand_monster.png"}, - }, - visual_size = {x=8,y=8}, - makes_footstep_sound = true, - sounds = { - random = "mobs_sandmonster", - }, - walk_velocity = 1.5, - run_velocity = 4, - view_range = 15, - jump = true, - floats = 0, - drops = { - {name = "default:desert_sand", - chance = 1, min = 3, max = 5,}, - {name = "bones:bones", - chance = 1, - min = 1, - max=1, - }, - }, - water_damage = 3, - lava_damage = 4, - light_damage = 0, - animation = { - speed_normal = 15, speed_run = 15, - stand_start = 0, stand_end = 39, - walk_start = 41, walk_end = 72, - run_start = 74, run_end = 105, - punch_start = 74, punch_end = 105, - }, -}) - -bp:register_spawn("es:sand_monster", {"default:sand","default:dirt", "meru:stone","group:crumbly"},20, -1, 7000, 2, 31000) - - - - --- Stone Monster by PilzAdam - -bp:register_mob("es:stone_monster", { - type = "monster", - passive = false, - attack_type = "dogfight", - damage = 8, - hp_min = 12, - hp_max = 35, - armor = 80, - collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.9, 0.4}, - visual = "mesh", - mesh = "mobs_stone_monster.x", - textures = { - {"mobs_stone_monster.png"}, - }, - visual_size = {x=3, y=2.6}, - makes_footstep_sound = true, - sounds = { - random = "mobs_stonemonster", - }, - walk_velocity = 0.5, - run_velocity = 2, - jump = true, - floats = 0, - view_range = 10, - drops = { - {name = "default:torch", - chance = 2, min = 3, max = 5,}, - {name = "default:iron_lump", - chance=5, min=1, max=2,}, - {name = "bones:bones", - chance=1, min=1, max=1,}, - }, - water_damage = 0, - lava_damage = 1, - light_damage = 0, - animation = { - speed_normal = 15, speed_run = 15, - stand_start = 0, stand_end = 14, - walk_start = 15, walk_end = 38, - run_start = 40, run_end = 63, - punch_start = 40, punch_end = 63, - }, -}) - -bp:register_spawn("es:stone_monster", {"default:stone"}, 5, 0, 7000, 30, 3100) - ---bp:register_egg("es:stone_monster", "Stone Monster", "default_stone.png", 1) - - - - - - - - - --- Spider by AspireMint (fishyWET (CC-BY-SA 3.0 license for texture) - -bp:register_mob("es:spider", { - type = "monster", - passive = false, - attack_type = "dogfight", - damage = 3, - hp_min = 40, - hp_max = 80, - armor = 100, - collisionbox = {-0.9, -0.01, -0.7, 0.7, 0.6, 0.7}, - visual = "mesh", - mesh = "mobs_spider.x", - textures = { - {"mobs_spider.png"}, - }, - visual_size = {x=3,y=3}, - makes_footstep_sound = false, - sounds = { - random = "mobs_spider", - attack = "mobs_spider", - }, - walk_velocity = 1.7, - run_velocity = 3.3, - jump = true, - view_range = 15, - floats = 0, - drops = { - {name = "farming:string", - chance = 1, min = 1, max = 5,}, - {name = "es:meat_raw", - chance = 1, min = 0, max = 1,}, - }, - water_damage = 5, - lava_damage = 5, - light_damage = 0, - animation = { - speed_normal = 15, speed_run = 15, - stand_start = 1, stand_end = 1, - walk_start = 20, walk_end = 40, - run_start = 20, run_end = 40, - punch_start = 50, punch_end = 90, - }, -}) - -bp:register_spawn("es:spider", {"default:stone" ,"default:cobble","group:crumbly", "group:cracky", "group:choppy", "group:snappy"}, 6, 0, 13000, 1, 71) - ---bp:register_egg("es:spider", "Spider", "mobs_cobweb.png", 1) - --- ethereal crystal spike compatibility -if not minetest.get_modpath("ethereal") then - minetest.register_alias("ethereal:crystal_spike", "default:sandstone") -end - --- cobweb -minetest.register_node("es:cobweb", { - description = "Cobweb", - drawtype = "plantlike", - visual_scale = 1.1, - tiles = {"mobs_cobweb.png"}, - inventory_image = "mobs_cobweb.png", - paramtype = "light", - sunlight_propagates = true, - liquid_viscosity = 11, - liquidtype = "source", - liquid_alternative_flowing = "mobs:cobweb", - liquid_alternative_source = "mobs:cobweb", - liquid_renewable = false, - liquid_range = 0, - walkable = false, - groups = {snappy=1,liquid=3}, - drop = "farming:cotton", - sounds = default.node_sound_leaves_defaults(), -}) - -minetest.register_craft({ - output = "es:cobweb", - recipe = { - {"farming:string", "", "farming:string"}, - {"", "farming:string", ""}, - {"farming:string", "", "farming:string"}, - } -}) - - -bp:register_mob("es:applmons", { - type = "monster", - hp_min = 20, - hp_max = 40, - collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.0, 0.4}, - visual = "mesh", - mesh = "applmons.x", - textures = {"applmons.png"}, - visual_size = {x=3.6, y=2.6}, - makes_footstep_sound = true, - view_range = 15, - walk_velocity = 1, - run_velocity = 3, - damage = 2, - drops = { - {name = "default:apple", - chance = 4, - min = 1, - max = 3,}, - }, - armor = 100, - drawtype = "front", - water_damage = 1, - lava_damage = 5, - light_damage = 0, - on_rightclick = nil, - attack_type = "dogfight", - animation = { - speed_normal = 15, - speed_run = 15, - stand_start = 0, - stand_end = 19, - walk_start = 20, - walk_end = 35, - run_start = 30, - run_end = 40, - punch_start = 36, - punch_end = 48, - } -}) -bp:register_spawn("es:applmons", {"default:stone"}, 6, -1, 17000, 2, -30) - - - - - - ---crafts-tenplus1 - - --- raw meat -minetest.register_craftitem("es:meat_raw", { - description = "Raw Meat", - inventory_image = "mobs_meat_raw.png", - on_use = minetest.item_eat(3), -}) - --- cooked meat -minetest.register_craftitem("es:meat", { - description = "Meat", - inventory_image = "mobs_meat.png", - on_use = minetest.item_eat(8), -}) - -minetest.register_craft({ - type = "cooking", - output = "es:meat", - recipe = "es:meat_raw", - cooktime = 5, -}) - - - -if minetest.setting_get("log_mods") then - minetest.log("action", "ES mobs loaded") -end diff --git a/crafting.lua b/crafting.lua index f80fdd5..c4d57da 100644 --- a/crafting.lua +++ b/crafting.lua @@ -88,7 +88,7 @@ minetest.register_craft({ minetest.register_craftitem("es:depleted_uranium_ingot", { description = "Depleted uranium", --inventory_image = "technic_uranium_ingot.png", - inventory_image = "default_steel_ingot.png^[colorize:#00FF00:185", + inventory_image = "technic_uranium_ingot.png", }) minetest.register_craft({ output = 'es:boneblock', @@ -146,7 +146,7 @@ minetest.register_craft({ recipe = { {'group:flora' , }, {'es:dry_dirt', }, -} +} }) @@ -249,6 +249,21 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'es:purpelliumblock', + recipe = { + {'es:purpellium_ingot', 'es:purpellium_ingot', 'es:purpellium_ingot'}, + {'es:purpellium_ingot', 'es:purpellium_ingot', 'es:purpellium_ingot'}, + {'es:purpellium_ingot', 'es:purpellium_ingot', 'es:purpellium_ingot'}, + + } +}) +minetest.register_craft({ + output = 'es:purpelliumblock 2', + recipe = { + {'stairs:stair_Purpellium', 'stairs:stair_Purpellium', 'stairs:stair_Purpellium'}, + } +}) minetest.register_craft({ output = 'es:emerald_crystal 9', @@ -278,6 +293,12 @@ minetest.register_craft({ } }) +minetest.register_craft({ + output = 'es:purpellium_ingot 9', + recipe = { + {'es:purpelliumblock'}, + } +}) --crafting minetest.register_craft({ @@ -286,9 +307,23 @@ minetest.register_craft({ recipe = {"vessels:glass_bottle", "es:infinium_goo","default:water_flowing"}, }) +minetest.register_craft({ + type = "shapeless", + output = "es:purpellium_container", + recipe = {"vessels:glass_bottle", "es:purpellium_dust","default:water_flowing"}, +}) +minetest.register_craftitem("es:purpellium_container", { + description = "Potion to do wonders!", + inventory_image = "purpellium_container.png", + on_use = minetest.item_eat(50), + --TODO HEAL HP TOO +}) - +minetest.register_craftitem("es:purpellium_dust", { + description = "Purpellium Dust", + inventory_image = "dye_violet.png", +}) --Weapon &Tool Crafting: @@ -443,6 +478,13 @@ minetest.register_craft({ recipe = "es:infinium_container", }) +minetest.register_craft({ + type = "cooking", + cooktime = 30, + output = "es:purpellium_ingot", + recipe = "es:purpellium_lump", +}) + minetest.register_craft({ type = "cooking", cooktime = 30, @@ -461,7 +503,7 @@ minetest.register_craft({ --MUST HAVE DEFAULT ORE GENERATION SET minetest.register_craftitem("es:mesecook_crystal", { description = "Cookable Raw MESE", - inventory_image = "default_mineral_mese.png^[colorize:#F0E68C:195", + inventory_image = "default_mineral_mese.png", }) diff --git a/init.lua b/init.lua index 1dd042b..8fce6a7 100644 --- a/init.lua +++ b/init.lua @@ -22,8 +22,8 @@ es.modpath = modpath -- REMOVE NODES DO NOT USE IN YOUR WORLD -- Alias ---dofile(modpath.."/technodrem.lua") ---dofile(modpath.."/moreorerem.lua") +dofile(modpath.."/technodrem.lua") +dofile(modpath.."/moreorerem.lua") dofile(modpath.."/alias.lua") -- Anticheat by RND @@ -53,6 +53,7 @@ dofile(modpath.."/tools.lua") -- Climate very laggy --dofile(minetest.get_modpath("es").."/freeze.lua") --dofile(minetest.get_modpath("es").."/snow.lua") +--dofile(minetest.get_modpath("es").."/thaw.lua") --MOREBLOCKS / STAIRSPLUS SUPPORT if moreblocks then diff --git a/mapgen.lua b/mapgen.lua deleted file mode 100644 index 089cc7a..0000000 --- a/mapgen.lua +++ /dev/null @@ -1,1214 +0,0 @@ --- --- Aliases for map generator outputs --- - -minetest.register_alias("mapgen_stone", "default:stone") -minetest.register_alias("mapgen_dirt", "default:dirt") -minetest.register_alias("mapgen_dirt_with_grass", "default:dirt_with_grass") -minetest.register_alias("mapgen_sand", "default:sand") -minetest.register_alias("mapgen_water_source", "default:water_source") -minetest.register_alias("mapgen_river_water_source", "default:river_water_source") -minetest.register_alias("mapgen_lava_source", "default:lava_source") -minetest.register_alias("mapgen_gravel", "default:gravel") -minetest.register_alias("mapgen_desert_stone", "default:desert_stone") -minetest.register_alias("mapgen_desert_sand", "default:desert_sand") -minetest.register_alias("mapgen_dirt_with_snow", "default:dirt_with_snow") -minetest.register_alias("mapgen_snowblock", "default:snowblock") -minetest.register_alias("mapgen_snow", "default:snow") -minetest.register_alias("mapgen_ice", "default:ice") -minetest.register_alias("mapgen_sandstone", "default:sandstone") - --- Flora - -minetest.register_alias("mapgen_tree", "default:tree") -minetest.register_alias("mapgen_leaves", "default:leaves") -minetest.register_alias("mapgen_apple", "default:apple") -minetest.register_alias("mapgen_jungletree", "default:jungletree") -minetest.register_alias("mapgen_jungleleaves", "default:jungleleaves") -minetest.register_alias("mapgen_junglegrass", "default:junglegrass") -minetest.register_alias("mapgen_pine_tree", "default:pine_tree") -minetest.register_alias("mapgen_pine_needles", "default:pine_needles") - --- Dungeons - -minetest.register_alias("mapgen_cobble", "default:cobble") -minetest.register_alias("mapgen_stair_cobble", "stairs:stair_cobble") -minetest.register_alias("mapgen_mossycobble", "default:mossycobble") -minetest.register_alias("mapgen_sandstonebrick", "default:sandstonebrick") -minetest.register_alias("mapgen_stair_sandstonebrick", "stairs:stair_sandstonebrick") - ---Meru -minetest.register_alias("meru:destone", "default:desert_stone") -minetest.register_alias("meru:stone", "default:sandstone") - - - - --- --- Register ores --- - --- All mapgens except singlenode --- Blob ore first to avoid other ores inside blobs - -function es.register_ores() - - -- Clay - - minetest.register_ore({ - ore_type = "blob", - ore = "default:clay", - wherein = {"default:sand"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -15, - y_max = 0, - noise_threshhold = 0, - noise_params = { - offset = 0.35, - scale = 0.2, - spread = {x = 5, y = 5, z = 5}, - seed = -316, - octaves = 1, - persist = 0.5 - }, - }) - - -- Sand - - minetest.register_ore({ - ore_type = "blob", - ore = "default:sand", - wherein = {"default:stone"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -63, - y_max = 4, - noise_threshhold = 0, - noise_params = { - offset = 0.35, - scale = 0.2, - spread = {x = 5, y = 5, z = 5}, - seed = 2316, - octaves = 1, - persist = 0.5 - }, - }) - - -- Dirt - - minetest.register_ore({ - ore_type = "blob", - ore = "default:dirt", - wherein = {"default:stone"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -63, - y_max = 31000, - noise_threshhold = 0, - noise_params = { - offset = 0.35, - scale = 0.2, - spread = {x = 5, y = 5, z = 5}, - seed = 17676, - octaves = 1, - persist = 0.5 - }, - }) - - -- Gravel - - minetest.register_ore({ - ore_type = "blob", - ore = "default:gravel", - wherein = {"default:stone"}, - clust_scarcity = 24 * 24 * 24, - clust_size = 7, - y_min = -31000, - y_max = 31000, - noise_threshhold = 0, - noise_params = { - offset = 0.35, - scale = 0.2, - spread = {x = 5, y = 5, z = 5}, - seed = 766, - octaves = 1, - persist = 0.5 - }, - }) - - -- Coal - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_coal", - wherein = "default:stone", - clust_scarcity = 8 * 8 * 8, - clust_num_ores = 8, - clust_size = 3, - y_min = -31000, - y_max = 64, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_coal", - wherein = "default:stone", - clust_scarcity = 24 * 24 * 24, - clust_num_ores = 27, - clust_size = 6, - y_min = -31000, - y_max = 230, - }) - - - -- Iron - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_iron", - wherein = "default:stone", - clust_scarcity = 12 * 12 * 12, - clust_num_ores = 3, - clust_size = 2, - y_min = -15, - y_max = 2, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_iron", - wherein = "default:stone", - clust_scarcity = 9 * 9 * 9, - clust_num_ores = 5, - clust_size = 3, - y_min = -63, - y_max = -16, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_iron", - wherein = "default:stone", - clust_scarcity = 7 * 7 * 7, - clust_num_ores = 5, - clust_size = 3, - y_min = -31000, - y_max = -64, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_iron", - wherein = "default:stone", - clust_scarcity = 24 * 24 * 24, - clust_num_ores = 27, - clust_size = 6, - y_min = -31000, - y_max = -64, - }) - - --Mese - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_mese", - wherein = "default:stone", - clust_scarcity = 18 * 18 * 18, - clust_num_ores = 3, - clust_size = 2, - y_min = -255, - y_max = -64, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_mese", - wherein = "default:stone", - clust_scarcity = 14 * 14 * 14, - clust_num_ores = 5, - clust_size = 3, - y_min = -31000, - y_max = -256, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:mese", - wherein = "default:stone", - clust_scarcity = 36 * 36 * 36, - clust_num_ores = 3, - clust_size = 2, - y_min = -31000, - y_max = -1024, - }) - - -- Gold - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_gold", - wherein = "default:stone", - clust_scarcity = 15 * 15 * 15, - clust_num_ores = 3, - clust_size = 2, - y_min = -255, - y_max = -64, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_gold", - wherein = "default:stone", - clust_scarcity = 13 * 13 * 13, - clust_num_ores = 5, - clust_size = 3, - y_min = -31000, - y_max = -256, - }) - - -- Diamond - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_diamond", - wherein = "default:stone", - clust_scarcity = 17 * 17 * 17, - clust_num_ores = 4, - clust_size = 3, - y_min = -255, - y_max = -128, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_diamond", - wherein = "default:stone", - clust_scarcity = 15 * 15 * 15, - clust_num_ores = 4, - clust_size = 3, - y_min = -31000, - y_max = -256, - }) - - -- Copper - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_copper", - wherein = "default:stone", - clust_scarcity = 12 * 12 * 12, - clust_num_ores = 4, - clust_size = 3, - y_min = -63, - y_max = -16, - }) - - minetest.register_ore({ - ore_type = "scatter", - ore = "default:stone_with_copper", - wherein = "default:stone", - clust_scarcity = 9 * 9 * 9, - clust_num_ores = 5, - clust_size = 3, - y_min = -31000, - y_max = -64, - }) - - minetest.register_ore({ - ore_type = "blob", - ore = "default:lava_source", - wherein = "default:stone", - clust_scarcity = 25*75*10, - clust_num_ores = 5, - clust_size = 4, - y_min = -31000, - y_max = 140, - }) - - minetest.register_ore({ - ore_type = "blob", - ore = "default:lava_source", - wherein = "default:desert_sand", - clust_scarcity = 25*75*10, - clust_num_ores = 25, - clust_size = 12, - y_min = -31000, - y_max = 140, - }) - - minetest.register_ore({ - ore_type = "blob", - ore = "default:lava_source", - wherein = "default:desert_stone", - clust_scarcity = 25*75*10, - clust_num_ores = 2, - clust_size = 2, - y_min = -31, - y_max = 140, - }) - - minetest.register_ore({ - ore_type = "blob", - ore = "default:lava_source", - wherein = "default:sandstone", - clust_scarcity = 25*75*10, - clust_num_ores = 2, - clust_size = 2, - y_min = -31, - y_max = 140, - }) - - - - - -end - - --- --- Register biomes --- - --- All mapgens except mgv6 and singlenode - -function es.register_biomes() - minetest.clear_registered_biomes() - - -- Permanent ice - - minetest.register_biome({ - name = "glacier", - node_dust = "default:snowblock", - node_top = "default:snowblock", - depth_top = 1, - node_filler = "default:snowblock", - depth_filler = 3, - node_stone = "default:ice", - node_water_top = "default:ice", - depth_water_top = 10, - --node_water = "", - node_river_water = "default:ice", - y_min = -8, - y_max = 31000, - heat_point = -5, - humidity_point = 50, - }) - - minetest.register_biome({ - name = "glacier_ocean", - node_dust = "default:snowblock", - node_top = "default:gravel", - depth_top = 1, - node_filler = "default:gravel", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = -9, - heat_point = -5, - humidity_point = 50, - }) - - -- Cold - - minetest.register_biome({ - name = "tundra", - node_dust = "default:snow", - node_top = "default:dirt_with_snow", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 0, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 2, - y_max = 31000, - heat_point = 20, - humidity_point = 30, - }) - - minetest.register_biome({ - name = "tundra_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 1, - heat_point = 20, - humidity_point = 30, - }) - - minetest.register_biome({ - name = "taiga", - node_dust = "default:snow", - node_top = "default:snowblock", - depth_top = 1, - node_filler = "default:stone", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 2, - y_max = 31000, - heat_point = 20, - humidity_point = 70, - }) - - minetest.register_biome({ - name = "taiga_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 1, - heat_point = 20, - humidity_point = 70, - }) - - -- Cool - - minetest.register_biome({ - name = "stone_grassland", - --node_dust = "", - node_top = "default:dirt_with_grass", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 0, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 6, - y_max = 31000, - heat_point = 45, - humidity_point = 30, - }) - - minetest.register_biome({ - name = "stone_grassland_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 5, - heat_point = 45, - humidity_point = 30, - }) - - minetest.register_biome({ - name = "coniferous_forest", - --node_dust = "", - node_top = "default:dirt_with_grass", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 6, - y_max = 31000, - heat_point = 45, - humidity_point = 70, - }) - - minetest.register_biome({ - name = "coniferous_forest_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 5, - heat_point = 45, - humidity_point = 70, - }) - - -- Warm - - minetest.register_biome({ - name = "sandstone_grassland", - --node_dust = "", - node_top = "default:dirt_with_grass", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 0, - node_stone = "default:sandstone", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 6, - y_max = 31000, - heat_point = 70, - humidity_point = 30, - }) - - minetest.register_biome({ - name = "sandstone_grassland_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - node_stone = "default:sandstone", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 5, - heat_point = 70, - humidity_point = 30, - }) - - minetest.register_biome({ - name = "deciduous_forest", - --node_dust = "", - node_top = "default:dirt_with_grass", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 6, - y_max = 31000, - heat_point = 70, - humidity_point = 70, - }) - - minetest.register_biome({ - name = "deciduous_forest_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 5, - heat_point = 70, - humidity_point = 70, - }) - - -- Hot - - minetest.register_biome({ - name = "desert", - --node_dust = "", - node_top = "default:desert_sand", - depth_top = 1, - node_filler = "default:desert_sand", - depth_filler = 1, - node_stone = "default:desert_stone", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 5, - y_max = 31000, - heat_point = 95, - humidity_point = 10, - }) - - minetest.register_biome({ - name = "desert_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - node_stone = "default:desert_stone", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 4, - heat_point = 95, - humidity_point = 10, - }) - - minetest.register_biome({ - name = "savanna", - --node_dust = "", - node_top = "default:dirt_with_dry_grass", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 1, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 5, - y_max = 31000, - heat_point = 95, - humidity_point = 50, - }) - - minetest.register_biome({ - name = "savanna_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 4, - heat_point = 95, - humidity_point = 50, - }) - - minetest.register_biome({ - name = "rainforest", - --node_dust = "", - node_top = "default:dirt_with_grass", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 1, - y_max = 31000, - heat_point = 95, - humidity_point = 90, - }) - - minetest.register_biome({ - name = "rainforest_swamp", - --node_dust = "", - node_top = "default:dirt", - depth_top = 1, - node_filler = "default:dirt", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = 0, - y_max = 0, - heat_point = 95, - humidity_point = 90, - }) - - minetest.register_biome({ - name = "rainforest_ocean", - --node_dust = "", - node_top = "default:sand", - depth_top = 1, - node_filler = "default:sand", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = -1, - heat_point = 95, - humidity_point = 90, - }) - - - minetest.register_biome({ - name = "stoneworld", - --node_dust = "", - node_top = "default:stone", - depth_top = 1, - node_filler = "default:desertstone", - depth_filler = 2, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -112, - y_max = 100, - heat_point = 95, - humidity_point = 90, - }) - - -- Underground - - minetest.register_biome({ - name = "underground", - --node_dust = "", - --node_top = "", - depth_top = 0, - --node_filler = "", - depth_filler = -4, - --node_stone = "", - --node_water_top = "", - --depth_water_top = , - --node_water = "", - --node_river_water = "", - y_min = -31000, - y_max = -113, - heat_point = 50, - humidity_point = 50, - }) -end - - --- --- Register decorations --- - --- Mgv6 - -function es.register_mgv6_decorations() - minetest.clear_registered_decorations() - - -- Papyrus - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass"}, - sidelen = 8, - noise_params = { - offset = -0.3, - scale = 0.7, - spread = {x = 100, y = 100, z = 100}, - seed = 354, - octaves = 3, - persist = 0.7 - }, - y_min = 1, - y_max = 1, - decoration = "default:papyrus", - height = 2, - height_max = 4, - spawn_by = "default:water_source", - num_spawn_by = 1, - }) - - -- Cacti - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:desert_sand"}, - sidelen = 16, - noise_params = { - offset = -0.012, - scale = 0.024, - spread = {x = 100, y = 100, z = 100}, - seed = 230, - octaves = 3, - persist = 0.6 - }, - y_min = 1, - y_max = 30, - decoration = "default:cactus", - height = 3, - height_max = 4, - }) - - -- Long grasses - - for length = 1, 5 do - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = 0.007, - spread = {x = 100, y = 100, z = 100}, - seed = 329, - octaves = 3, - persist = 0.6 - }, - y_min = 1, - y_max = 30, - decoration = "default:grass_"..length, - }) - end - - -- Dry shrubs - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:desert_sand", "default:dirt_with_snow"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = 0.035, - spread = {x = 100, y = 100, z = 100}, - seed = 329, - octaves = 3, - persist = 0.6 - }, - y_min = 1, - y_max = 30, - decoration = "default:dry_shrub", - }) -end - --- All mapgens except mgv6 and singlenode - -local function register_grass_decoration(offset, scale, length) - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass", "default:sand"}, - sidelen = 16, - noise_params = { - offset = offset, - scale = scale, - spread = {x=200, y=200, z=200}, - seed = 329, - octaves = 3, - persist = 0.6 - }, - biomes = { - "stone_grassland", "stone_grassland_ocean", - "sandstone_grassland", "sandstone_grassland_ocean", - "deciduous_forest", "deciduous_forest_ocean", - "coniferous_forest", "coniferous_forest_ocean", - }, - y_min = 5, - y_max = 31000, - decoration = "default:grass_"..length, - }) -end - -local function register_dry_grass_decoration(offset, scale, length) - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_dry_grass"}, - sidelen = 16, - noise_params = { - offset = offset, - scale = scale, - spread = {x=200, y=200, z=200}, - seed = 329, - octaves = 3, - persist = 0.6 - }, - biomes = {"savanna"}, - y_min = 5, - y_max = 31000, - decoration = "default:dry_grass_"..length, - }) -end - -function es.register_decorations() - minetest.clear_registered_decorations() - - -- Apple tree - - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"default:dirt_with_grass"}, - sidelen = 16, - noise_params = { - offset = 0.04, - scale = 0.02, - spread = {x=250, y=250, z=250}, - seed = 2, - octaves = 3, - persist = 0.66 - }, - biomes = {"deciduous_forest"}, - y_min = 6, - y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/apple_tree.mts", - flags = "place_center_x, place_center_z", - }) - - -- Jungle tree - - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"default:dirt_with_grass", "default:dirt"}, - sidelen = 80, - fill_ratio = 0.09, - biomes = {"rainforest", "rainforest_swamp"}, - y_min = 0, - y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/jungle_tree.mts", - flags = "place_center_x, place_center_z", - }) - - -- Taiga and temperate forest pine tree - - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"default:snowblock", "default:dirt_with_grass"}, - sidelen = 16, - noise_params = { - offset = 0.04, - scale = 0.02, - spread = {x=250, y=250, z=250}, - seed = 2, - octaves = 3, - persist = 0.66 - }, - biomes = {"taiga", "coniferous_forest"}, - y_min = 2, - y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/pine_tree.mts", - flags = "place_center_x, place_center_z", - }) - - -- Acacia tree - - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"default:dirt_with_dry_grass"}, - sidelen = 80, - noise_params = { - offset = 0, - scale = 0.003, - spread = {x=250, y=250, z=250}, - seed = 2, - octaves = 3, - persist = 0.66 - }, - biomes = {"savanna"}, - y_min = 6, - y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/acacia_tree.mts", - flags = "place_center_x, place_center_z", - rotation = "random", - }) - - -- Large cactus - - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"default:desert_sand"}, - sidelen = 80, - noise_params = { - offset = -0.0005, - scale = 0.0015, - spread = {x=200, y=200, z=200}, - seed = 230, - octaves = 3, - persist = 0.6 - }, - biomes = {"desert"}, - y_min = 5, - y_max = 31000, - schematic = minetest.get_modpath("default").."/schematics/large_cactus.mts", - flags = "place_center_x", - rotation = "random", - }) - - -- Cactus - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:desert_sand"}, - sidelen = 80, - noise_params = { - offset = -0.0005, - scale = 0.0015, - spread = {x=200, y=200, z=200}, - seed = 230, - octaves = 3, - persist = 0.6 - }, - biomes = {"desert"}, - y_min = 5, - y_max = 31000, - decoration = "default:cactus", - height = 2, - height_max = 5, - }) - - -- Papyrus - - minetest.register_decoration({ - deco_type = "schematic", - place_on = {"default:sand"}, - sidelen = 16, - noise_params = { - offset = -0.3, - scale = 0.7, - spread = {x=200, y=200, z=200}, - seed = 354, - octaves = 3, - persist = 0.7 - }, - biomes = {"savanna_ocean", "desert_ocean"}, - y_min = 0, - y_max = 0, - schematic = minetest.get_modpath("default").."/schematics/papyrus.mts", - }) - - -- Grasses - - register_grass_decoration(-0.03, 0.09, 5) - register_grass_decoration(-0.015, 0.075, 4) - register_grass_decoration(0, 0.06, 3) - register_grass_decoration(0.015, 0.045, 2) - register_grass_decoration(0.03, 0.03, 1) - - -- Dry grasses - - register_dry_grass_decoration(0.01, 0.05, 5) - register_dry_grass_decoration(0.03, 0.03, 4) - register_dry_grass_decoration(0.05, 0.01, 3) - register_dry_grass_decoration(0.07, -0.01, 2) - register_dry_grass_decoration(0.09, -0.03, 1) - - -- Junglegrass - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:dirt_with_grass"}, - sidelen = 80, - fill_ratio = 0.1, - biomes = {"rainforest"}, - y_min = 1, - y_max = 31000, - decoration = "default:junglegrass", - }) - - -- Dry shrub - - minetest.register_decoration({ - deco_type = "simple", - place_on = {"default:desert_sand", "default:dirt_with_snow"}, - sidelen = 16, - noise_params = { - offset = 0, - scale = 0.02, - spread = {x=200, y=200, z=200}, - seed = 329, - octaves = 3, - persist = 0.6 - }, - biomes = {"desert", "tundra"}, - y_min = 2, - y_max = 31000, - decoration = "default:dry_shrub", - }) -end - - --- --- Generate nyan cats --- - --- All mapgens except singlenode - -function es.make_nyancat(pos, facedir, length) - local tailvec = {x = 0, y = 0, z = 0} - if facedir == 0 then - tailvec.z = 1 - elseif facedir == 1 then - tailvec.x = 1 - elseif facedir == 2 then - tailvec.z = -1 - elseif facedir == 3 then - tailvec.x = -1 - else - facedir = 0 - tailvec.z = 1 - end - local p = {x = pos.x, y = pos.y, z = pos.z} - minetest.set_node(p, {name = "default:nyancat", param2 = facedir}) - for i = 1, length do - p.x = p.x + tailvec.x - p.z = p.z + tailvec.z - minetest.set_node(p, {name = "default:nyancat_rainbow", param2 = facedir}) - end -end - -function es.generate_nyancats(minp, maxp, seed) - local height_min = -31000 - local height_max = -32 - if maxp.y < height_min or minp.y > height_max then - return - end - local y_min = math.max(minp.y, height_min) - local y_max = math.min(maxp.y, height_max) - local volume = (maxp.x - minp.x + 1) * (y_max - y_min + 1) * (maxp.z - minp.z + 1) - local pr = PseudoRandom(seed + 9324342) - local max_num_nyancats = math.floor(volume / (16 * 16 * 16)) - for i = 1, max_num_nyancats do - if pr:next(0, 1000) == 0 then - local x0 = pr:next(minp.x, maxp.x) - local y0 = pr:next(minp.y, maxp.y) - local z0 = pr:next(minp.z, maxp.z) - local p0 = {x = x0, y = y0, z = z0} - default.make_nyancat(p0, pr:next(0, 3), pr:next(3, 15)) - end - end -end - - --- --- Detect mapgen to select functions --- - --- Mods using singlenode mapgen can call these functions to enable --- the use of minetest.generate_ores or minetest.generate_decorations - -local mg_params = minetest.get_mapgen_params() -if mg_params.mgname == "v6" then - default.register_ores() - default.register_mgv6_decorations() - minetest.register_on_generated(default.generate_nyancats) -elseif mg_params.mgname ~= "singlenode" then - default.register_ores() - default.register_biomes() - default.register_decorations() - minetest.register_on_generated(default.generate_nyancats) -end - diff --git a/mostair.lua b/mostair.lua index 6390ddc..2483f39 100644 --- a/mostair.lua +++ b/mostair.lua @@ -20,7 +20,7 @@ es = {} if minetest.get_modpath("moreblocks") and enable_stairsplus then register_stair_slab_panel_micro("es", "emeraldblock", "es:emeraldblock", {cracky=3}, - {"default_diamond_block.png^[colorize:#008000:134"}, + {"emerald_block.png"}, "Emerald Block", "emeraldblock", 0) @@ -29,7 +29,7 @@ end if minetest.get_modpath("moreblocks") and enable_stairsplus then register_stair_slab_panel_micro("es", "rubyblock", "es:rubyblock", {cracky=3}, - {"default_diamond_block.png^[colorize:#FF0000:144"}, + {"ruby_block.png"}, "Ruby Block", "rubyblock", 0) @@ -38,7 +38,7 @@ end if minetest.get_modpath("moreblocks") and enable_stairsplus then register_stair_slab_panel_micro("es", "aikerumblock", "es:aikerumblock", {cracky=3}, - {"default_diamond_block.png^[colorize:#0000FF:134"}, + {"aikerum_block.png"}, "Aikerum Block", "aikerumblock", 0) @@ -53,6 +53,15 @@ if minetest.get_modpath("moreblocks") and enable_stairsplus then 0) end +if minetest.get_modpath("moreblocks") and enable_stairsplus then + register_stair_slab_panel_micro("es", "purpelliumblock", "es:purpelliumblock", + {cracky=3}, + {"purpellium_block.png"}, + "Purpellium Block", + "purpelliumblock", + 0) +end + if minetest.get_modpath("moreblocks") and enable_stairsplus then register_stair_slab_panel_micro("es", "boneblock", "es:boneblock", {cracky=3}, @@ -93,6 +102,7 @@ end table.insert(circular_saw.known_stairs, "es:rubyblock") table.insert(circular_saw.known_stairs, "es:aikerumblock") table.insert(circular_saw.known_stairs, "es:infiniumblock") + table.insert(circular_saw.known_stairs, "es:purpelliumblock") table.insert(circular_saw.known_stairs, "es:boneblock") table.insert(circular_saw.known_stairs, "es:messymese") table.insert(circular_saw.known_stairs, "default:dirt_with_grass") diff --git a/nodes-bad.lua b/nodes-bad.lua new file mode 100644 index 0000000..3986e5a --- /dev/null +++ b/nodes-bad.lua @@ -0,0 +1,870 @@ +--Extreme Survival created by maikerumine +-- Minetest 0.4.13 mod: "Extreme Survival" +-- namespace: es +--https://github.com/maikerumine + +--License: +--~~~~~~~~ +--Code: +--(c) Copyright 2015 maikerumine; modified zlib-License +--see "LICENSE.txt" for details. + +--Media(if not stated differently): +--(c) Copyright (2014-2015) maikerumine; CC-BY-SA 3.0 + + +--tweaks and overrides +--rnd code +--cactus tweaks +local function hurt_cactus() -- cactus tweak + local name = "default:cactus" + local table = minetest.registered_nodes[name]; + local table2 = {}; + for i,v in pairs(table) do table2[i] = v end + table2.groups.disable_jump = 1 + table2.damage_per_second = 5 + minetest.register_node(":"..name, table2) +end +hurt_cactus(); + + +--TECHNIC NODES +minetest.register_node( "es:granite", { + description = "Granite", + tiles = { "technic_granite.png" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node( "es:marble", { + description = "Marble", + tiles = { "technic_marble.png" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node( "es:marble_bricks", { + description = "Marble Bricks", + tiles = { "technic_marble_bricks.png" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +--NOW WE ADD SOME RADIOACTIVITY FROM THE TECHNIC MOD +--20151206 DECIDED TO EVENTUALLY MOVE THIS INTO THE RADIATION HUD. +--MOVED AND TESTING NEW RADIATION HUD. +--KEEPING THIS CODE FOR POSSIBLE HUD FAILURE. +--UPDATE: Hud never worked like it should. +---------------------------------------- + + +if not vector.length_square then + vector.length_square = function (v) + return v.x*v.x + v.y*v.y + v.z*v.z + end +end + +-- radioactivity + +-- Radiation resistance represents the extent to which a material +-- attenuates radiation passing through it; i.e., how good a radiation +-- shield it is. This is identified per node type. For materials that +-- exist in real life, the radiation resistance value that this system +-- uses for a node type consisting of a solid cube of that material is the +-- (approximate) number of halvings of ionising radiation that is achieved +-- by a metre of the material in real life. This is approximately +-- proportional to density, which provides a good way to estimate it. +-- Homogeneous mixtures of materials have radiation resistance computed +-- by a simple weighted mean. Note that the amount of attenuation that +-- a material achieves in-game is not required to be (and is not) the +-- same as the attenuation achieved in real life. +-- +-- Radiation resistance for a node type may be specified in the node +-- definition, under the key "radiation_resistance". As an interim +-- measure, until node definitions widely include this, this code +-- knows a bunch of values for particular node types in several mods, +-- and values for groups of node types. The node definition takes +-- precedence if it specifies a value. Nodes for which no value at +-- all is known are taken to provide no radiation resistance at all; +-- this is appropriate for the majority of node types. Only node types +-- consisting of a fairly homogeneous mass of material should report +-- non-zero radiation resistance; anything with non-uniform geometry +-- or complex internal structure should show no radiation resistance. +-- Fractional resistance values are permitted; two significant figures +-- is the recommended precision. +local default_radiation_resistance_per_node = { + ["default:brick"] = 13, + ["default:bronzeblock"] = 45, + ["default:clay"] = 15, + ["default:coalblock"] = 9.6, + ["default:cobble"] = 15, + ["default:copperblock"] = 46, + ["default:desert_cobble"] = 15, + ["default:desert_sand"] = 10, + ["default:desert_stone"] = 17, + ["default:desert_stonebrick"] = 17, + ["default:diamondblock"] = 24, + ["default:dirt"] = 8.2, + ["default:dirt_with_grass"] = 8.2, + ["default:dry_dirt"] = 8.2, + ["default:dirt_with_dry_grass"] = 8.2, + ["default:dirt_with_grass_footsteps"] = 8.2, + ["default:dirt_with_snow"] = 8.2, + ["default:glass"] = 17, + ["default:goldblock"] = 170, + ["default:gravel"] = 10, + ["default:ice"] = 5.6, + ["default:lava_flowing"] = 8.5, + ["default:lava_source"] = 17, + ["default:mese"] = 21, + ["default:mossycobble"] = 15, + ["default:nyancat"] = 1000, + ["default:nyancat_rainbow"] = 1000, + ["default:obsidian"] = 18, + ["default:obsidian_glass"] = 18, + ["default:sand"] = 10, + ["default:sandstone"] = 15, + ["default:sandstonebrick"] = 15, + ["default:snowblock"] = 1.7, + ["default:steelblock"] = 40, + ["default:stone"] = 17, + ["default:stone_with_coal"] = 16, + ["default:stone_with_copper"] = 20, + ["default:stone_with_diamond"] = 18, + ["default:stone_with_gold"] = 34, + ["default:stone_with_iron"] = 20, + ["default:stone_with_mese"] = 17, + ["default:stonebrick"] = 17, + ["default:water_flowing"] = 2.8, + ["default:water_source"] = 5.6, + ["farming:desert_sand_soil"] = 10, + ["farming:desert_sand_soil_wet"] = 10, + ["farming:soil"] = 8.2, + ["farming:soil_wet"] = 8.2, + ["glooptest:akalin_crystal_glass"] = 21, + ["glooptest:akalinblock"] = 40, + ["glooptest:alatro_crystal_glass"] = 21, + ["glooptest:alatroblock"] = 40, + ["glooptest:amethystblock"] = 18, + ["glooptest:arol_crystal_glass"] = 21, + ["glooptest:crystal_glass"] = 21, + ["glooptest:emeraldblock"] = 19, + ["glooptest:heavy_crystal_glass"] = 21, + ["glooptest:mineral_akalin"] = 20, + ["glooptest:mineral_alatro"] = 20, + ["glooptest:mineral_amethyst"] = 17, + ["glooptest:mineral_arol"] = 20, + ["glooptest:mineral_desert_coal"] = 16, + ["glooptest:mineral_desert_iron"] = 20, + ["glooptest:mineral_emerald"] = 17, + ["glooptest:mineral_kalite"] = 20, + ["glooptest:mineral_ruby"] = 18, + ["glooptest:mineral_sapphire"] = 18, + ["glooptest:mineral_talinite"] = 20, + ["glooptest:mineral_topaz"] = 18, + ["glooptest:reinforced_crystal_glass"] = 21, + ["glooptest:rubyblock"] = 27, + ["glooptest:sapphireblock"] = 27, + ["glooptest:talinite_crystal_glass"] = 21, + ["glooptest:taliniteblock"] = 40, + ["glooptest:topazblock"] = 24, + ["mesecons_extrawires:mese_powered"] = 21, + ["moreblocks:cactus_brick"] = 13, + ["moreblocks:cactus_checker"] = 8.5, + ["moreblocks:circle_stone_bricks"] = 17, + ["moreblocks:clean_glass"] = 17, + ["moreblocks:coal_checker"] = 9.0, + ["moreblocks:coal_glass"] = 17, + ["moreblocks:coal_stone"] = 17, + ["moreblocks:coal_stone_bricks"] = 17, + ["moreblocks:glow_glass"] = 17, + ["moreblocks:grey_bricks"] = 15, + ["moreblocks:iron_checker"] = 11, + ["moreblocks:iron_glass"] = 17, + ["moreblocks:iron_stone"] = 17, + ["moreblocks:iron_stone_bricks"] = 17, + ["moreblocks:plankstone"] = 9.3, + ["moreblocks:split_stone_tile"] = 15, + ["moreblocks:split_stone_tile_alt"] = 15, + ["moreblocks:stone_tile"] = 15, + ["moreblocks:super_glow_glass"] = 17, + ["moreblocks:tar"] = 7.0, + ["moreblocks:wood_tile"] = 1.7, + ["moreblocks:wood_tile_center"] = 1.7, + ["moreblocks:wood_tile_down"] = 1.7, + ["moreblocks:wood_tile_flipped"] = 1.7, + ["moreblocks:wood_tile_full"] = 1.7, + ["moreblocks:wood_tile_left"] = 1.7, + ["moreblocks:wood_tile_right"] = 1.7, + ["moreblocks:wood_tile_up"] = 1.7, + ["moreores:mineral_mithril"] = 18, + ["moreores:mineral_silver"] = 21, + ["moreores:mineral_tin"] = 19, + ["moreores:mithril_block"] = 26, + ["moreores:silver_block"] = 53, + ["moreores:tin_block"] = 37, + ["snow:snow_brick"] = 2.8, + ["technic:brass_block"] = 43, + ["technic:carbon_steel_block"] = 40, + ["technic:cast_iron_block"] = 40, + ["technic:chernobylite_block"] = 40, + ["technic:chromium_block"] = 37, + ["technic:corium_flowing"] = 40, + ["technic:corium_source"] = 80, + ["technic:granite"] = 18, + ["technic:marble"] = 18, + ["technic:marble_bricks"] = 18, + ["technic:mineral_chromium"] = 19, + ["technic:mineral_uranium"] = 71, + ["technic:mineral_zinc"] = 19, + ["technic:stainless_steel_block"] = 40, + ["technic:uranium_block"] = 500, + ["technic:zinc_block"] = 36, + ["tnt:tnt"] = 11, + ["tnt:tnt_burning"] = 11, +} +local default_radiation_resistance_per_group = { + concrete = 16, + tree = 3.4, + wood = 1.7, +} +local cache_radiation_resistance = {} +local function node_radiation_resistance(nodename) + local eff = cache_radiation_resistance[nodename] + if eff then return eff end + local def = minetest.registered_nodes[nodename] or {groups={}} + eff = def.radiation_resistance or default_radiation_resistance_per_node[nodename] + if not eff then + for g, v in pairs(def.groups) do + if v > 0 and default_radiation_resistance_per_group[g] then + eff = default_radiation_resistance_per_group[g] + break + end + end + end + if not eff then eff = 0 end + cache_radiation_resistance[nodename] = eff + return eff +end + + +-- Radioactive nodes cause damage to nearby players. The damage +-- effect depends on the intrinsic strength of the radiation source, +-- the distance between the source and the player, and the shielding +-- effect of the intervening material. These determine a rate of damage; +-- total damage caused is the integral of this over time. +-- +-- In the absence of effective shielding, for a specific source the +-- damage rate varies realistically in inverse proportion to the square +-- of the distance. (Distance is measured to the player's abdomen, +-- not to the nominal player position which corresponds to the foot.) +-- However, if the player is inside a non-walkable (liquid or gaseous) +-- radioactive node, the nominal distance could go to zero, yielding +-- infinite damage. In that case, the player's body is displacing the +-- radioactive material, so the effective distance should remain non-zero. +-- We therefore apply a lower distance bound of sqrt(0.75) m, which is +-- the maximum distance one can get from the node centre within the node. +-- +-- A radioactive node is identified by being in the "radioactive" group, +-- and the group value signifies the strength of the radiation source. +-- The group value is the distance in metres from a node at which an +-- unshielded player will be damaged by 0.25 HP/s. Or, equivalently, it +-- is half the square root of the damage rate in HP/s that an unshielded +-- player 1 m away will take. +-- +-- Shielding is assessed by sampling every 0.25 m along the path +-- from the source to the player, ignoring the source node itself. +-- The summed radiation resistance values from the sampled nodes yield +-- a measure of the total amount of radiation resistance on the path. +-- As in reality, shielding causes exponential attenuation of radiation. +-- However, the effect is scaled down relative to real life: each +-- metre-point of shielding, corresponding to a real-life halving of +-- radiation, reduces radiation by 0.01 nepers (a factor of about 1.01). +-- This scales down the difference between shielded and unshielded safe +-- distances, avoiding the latter becoming impractically large. +-- +-- Damage is processed at rates down to 0.25 HP/s, which in the absence of +-- shielding is attained at the distance specified by the "radioactive" +-- group value. Computed damage rates below 0.25 HP/s result in no +-- damage at all to the player. This gives the player an opportunity +-- to be safe, and limits the range at which source/player interactions +-- need to be considered. +local assumed_abdomen_offset = vector.new(0, 1, 0) +local assumed_abdomen_offset_length = vector.length(assumed_abdomen_offset) +minetest.register_abm({ + nodenames = {"group:radioactive"}, + interval = 1, + chance = 1, + action = function (pos, node) + local strength = minetest.registered_nodes[node.name].groups.radioactive + for _, o in ipairs(minetest.get_objects_inside_radius(pos, strength + assumed_abdomen_offset_length)) do + if o:is_player() then + local rel = vector.subtract(vector.add(o:getpos(), assumed_abdomen_offset), pos) + local dist_sq = vector.length_square(rel) + local dist = math.sqrt(dist_sq) + local dirstep = dist == 0 and vector.new(0,0,0) or vector.divide(rel, dist*4) + local intpos = pos + local resistance = 0 + for intdist = 0.25, dist, 0.25 do + intpos = vector.add(intpos, dirstep) + local intnodepos = vector.round(intpos) + if not vector.equals(intnodepos, pos) then + resistance = resistance + node_radiation_resistance(minetest.get_node(intnodepos).name) + end + end + local dmg_rate = 0.25 * strength*strength * math.exp(-0.0025*resistance) / math.max(0.75, dist_sq) + if dmg_rate >= 0.25 then + local dmg_int = math.floor(dmg_rate) + if math.random() < dmg_rate-dmg_int then + dmg_int = dmg_int + 1 + end + if dmg_int > 0 then + o:set_hp(math.max(o:get_hp() - dmg_int, 0)) + end + end + end + end + end, +}) + + + + + + +--ES Node Definition +minetest.register_node("es:stone_with_emerald", { + description = "Emerald Ore", + tiles = {"default_stone.png^emerald_ore.png"}, + is_ground_content = true, + groups = {cracky=1}, + drop = "es:emerald_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_ruby", { + description = "Ruby Ore", + tiles = {"default_stone.png^ruby_ore.png"}, + is_ground_content = true, + groups = {cracky=1}, + drop = "es:ruby_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_aikerum", { + description = "Aikerum Ore", + tiles = {"default_stone.png^aikerum_ore.png"}, + is_ground_content = true, + groups = {cracky=1,level = 2}, + drop = "es:aikerum_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_infinium", { + description = "Infinium Ore - Slightly Radioactive", + tiles = {"default_stone.png^infinium_ore.png"}, + is_ground_content = true, + groups = {cracky=1,level = 2, radioactive = (state == "source" and 2 or 2)}, + drop = "es:infinium_goo", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_purpellium", { + description = "Purlellium Ore - Oddly interesting", + tiles = {"default_stone.png^purpellium_ore.png"}, + is_ground_content = true, + groups = {cracky=2,level = 2, radioactive = (state == "source" and 2 or 2)}, + drop = "es:purpellium_lump", + sounds = default.node_sound_stone_defaults(), +}) + +--Emerald located at -1000 +minetest.register_node("es:emeraldblock", { + description = "Emerald Block", + tiles = {"emerald_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:emerald_crystal", { + description = "Emerald Crystal", + inventory_image = "emerald.png", +}) + +--Ruby located at -3000 +minetest.register_node("es:rubyblock", { + description = "Ruby Block", + tiles = {"ruby_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:ruby_crystal", { + description = "Ruby Crystal", + inventory_image = "ruby.png", +}) + +--Aikerum located at -4000 +minetest.register_node("es:aikerumblock", { + description = "Aikerum Block", + tiles = {"aikerum_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:aikerum_crystal", { + description = "Aikerum Crystal", + inventory_image = "aikerum.png", +}) + + +--Infinium located at -4300 +minetest.register_node("es:infiniumblock", { + description = "infinium Block", + tiles = {"infinium_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:infinium_goo", { + description = "Infinium Goo--Need to craft with vessel to contain.", + inventory_image = "infinium.png", +}) + +minetest.register_craftitem("es:infinium_ingot", { + description = "Infinium Ingot--TBD CRAFTING Special Armour and Lab Equipment", + --inventory_image = "infinium_ingot.png", + inventory_image = "infinium_ingot.png", +}) + +minetest.register_craftitem("es:infinium_container", { + description = "Infinium Container--Cook to get Infinium Ingot", + inventory_image = "infinium_container.png", +}) + +--Purpellium located at -4000 +minetest.register_node("es:purpelliumblock", { + description = "Purpellium Block", + tiles = {"purpellium_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:purpellium_lump", { + description = "Purpellium Lump", + inventory_image = "purpellium_lump.png", +}) + +minetest.register_craftitem("es:purpellium_ingot", { + description = "Purpellium Ingot", + inventory_image = "purpellium_ingot.png", +}) + + + +--BONEBLOCK +minetest.register_node("es:boneblock", { + description = "Bone Blox", + tiles = { + "bones_top.png", + "bones_bottom.png", + "bones_side.png", + "bones_side.png", + "bones_rear.png", + "bones_front.png" + }, + paramtype2 = "facedir", + groups = {dig_immediate=2}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.5}, + dug = {name="default_gravel_footstep", gain=1.0}, + }), +}) + + +--INPERVIOUS NODES CANNOT BREAK- Great for prison walls. +minetest.register_node("es:hgglass", { + description = "High Density Glass", + drawtype = "glasslike_framed_optional", + tiles = {"default_glass.png", "default_glass_detail.png"}, + inventory_image = minetest.inventorycube("default_glass.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("es:steelblock", { + description = "High Density Steel Block", + tiles = {"default_steel_block.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stoneblock", { + description = "High Density Stone Block", + tiles = {"default_stone.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:sandstonebrick", { + description = "High Density Sandstone Brick", + tiles = {"default_stone_brick.png^[colorize:#CCCC99:150"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stonebrick", { + description = "High Density Stone Brick", + tiles = {"default_stone_brick.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:junglewood", { + description = "High Density Junglewood Planks", + tiles = {"default_junglewood.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_wood_defaults(), +}) + + +--A simple way to store your cookable Mese, and it gives off light! +minetest.register_node("es:messymese", { + description = "Messy MESE Block", + tiles = {"default_clay.png^bubble.png^mese_cook_mese_crystal.png"}, + light_source = 14, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:what", { + description = "The What Block - Dig for random gift", + drawtype = "glasslike_framed_optional^bubble.png", + tiles = {"default_glass.png^bubble.png", "default_glass_detail.png^bubble.png"}, + inventory_image = minetest.inventorycube("default_glass.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {crumbly=3,}, + drop = { + max_items = 2, + items = { + {items = {'es:what'}, rarity = 80}, + {items = {'es:sword_aikerum'}, rarity = 50}, + {items = {'es:sword_ruby'}, rarity = 40}, + {items = {'es:sword_emerald'}, rarity = 30}, + {items = {'es:pick_aikerum'}, rarity = 50}, + {items = {'es:pick_ruby'}, rarity = 40}, + {items = {'es:pick_emerald'}, rarity = 30}, + {items = {'farming:bread 20'}, rarity = 3}, + {items = {'default:cobble 10'}, rarity = 3}, + {items = {'default:gold_lump 10'}, rarity = 10}, + {items = {'default:iron_lump 10'}, rarity = 5}, + {items = {'default:apple 10'}, rarity = 5}, + {items = {'default:coal_lump 10'}, rarity = 1}, + {items = {'es:depleted_uranium_ingot 3'}} + } + }, + sounds = default.node_sound_glass_defaults(), +}) + + + + +--Default addons as they should be. I changed ore generation to keep unique for compatibility. + +--Dry dirt added +minetest.register_node("es:dry_dirt", { + description = "Some dry dirt", + tiles = {"default_dry_dirt.png"}, + --tiles = {"dry_dirt.png"}, + groups = {crumbly = 3}, + drop = 'es:dry_dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("es:stone_with_mese", { + description = "Cookable Mese Ore", + tiles = {"default_stone.png^default_mineral_mese.png"}, + paramtype = "light", + groups = {cracky = 1}, + drop = "es:mesecook_crystal", + sounds = default.node_sound_stone_defaults(), + light_source = 1, +}) + +minetest.register_node("es:desert_stone_with_gold", { + description = "Gold Ore", + tiles = {"default_desert_stone.png^default_mineral_gold.png"}, + groups = {cracky = 2}, + drop = "default:gold_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:desert_stone_with_iron", { + description = "Iron Ore", + tiles = {"default_desert_stone.png^default_mineral_iron.png"}, + groups = {cracky = 2}, + drop = 'default:iron_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:desert_stone_with_coal", { + description = "Coal Ore", + tiles = {"default_desert_stone.png^default_mineral_coal.png"}, + groups = {cracky = 3}, + drop = 'default:coal_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:depleted_uranium", { + description = "Depleted Uranium Ore RADIOACTIVE", + tiles = {"default_stone.png^uranium_ore.png"}, + groups = {cracky = 3, radioactive = (state == "source" and 3 or 2)}, + drop = 'es:depleted_uranium_lump', + sounds = default.node_sound_stone_defaults(), + light_source = 12, +}) + +minetest.register_craftitem("es:depleted_uranium_lump", { + description = "Depleted Uranium use for long term fuel, first cook the lump into an ingot, then use ingot for fuel.", + inventory_image = "uranium_lump.png", +}) + + + +--ES CUSTOM LIQUIDS: +minetest.register_node("es:toxic_water_source", { + description = "Toxic_Water Source", + inventory_image = minetest.inventorycube("es_toxic_water.png"), + drawtype = "liquid", + tiles = { + { + name = "es_toxic_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + -- New-style water source material (mostly unused) + { + name = "es_toxic_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + }, + alpha = 240, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "es:toxic_water_flowing", + liquid_alternative_source = "es:toxic_water_source", + liquid_viscosity =3, + damage_per_second = 3*2, + post_effect_color = {a = 255, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, radioactive = (state == "source" and 2 or 2),}, +}) + +--NOTES: +-- radioactive = (state == "source" and 32 or 16), +--THIS IS DEFAULT SETTING FROM TECHNIC + + + +minetest.register_node("es:toxic_water_flowing", { + description = "Toxic_Flowing Water", + inventory_image = minetest.inventorycube("es_toxic_water.png"), + drawtype = "flowingliquid", + tiles = {"es_toxic_water.png"}, + special_tiles = { + { + name = "es_toxic_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = "es_toxic_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 240, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "es:toxic_water_flowing", + liquid_alternative_source = "es:toxic_water_source", + liquid_viscosity = 2, + damage_per_second = 2*2, + post_effect_color = {a = 255, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1, radioactive = (state == "source" and 2 or 2),}, +}) + +--[[--FOR REF +-- Quicksand (old style, sinking inside shows black instead of yellow effect, +-- works ok with noclip enabled though) +minetest.register_node("ethereal:quicksand", { + description = "Quicksand", + tiles = {"default_sand.png"}, + drop = "default:sand", + liquid_viscosity = 15, + liquidtype = "source", + liquid_alternative_flowing = "ethereal:quicksand", + liquid_alternative_source = "ethereal:quicksand", + liquid_renewable = false, + liquid_range = 0, + drowning = 1, + walkable = false, + climbable = false, + post_effect_color = { r=230, g=210, b=160, a=245 }, + groups = {crumbly=3, falling_node=1, sand=1, liquid=3, disable_jump=1}, + sounds = default.node_sound_sand_defaults(), +}) + +]] + +minetest.register_node("es:mud_source", { + description = "Mud Source", + inventory_image = minetest.inventorycube("es_mud.png"), + drawtype = "liquid", + tiles = {"es_mud.png"}, +--[[ tiles = { + { + name = "default_mud_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + -- New-style water source material (mostly unused) + { + name = "default_mud_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + },]] + alpha = 255, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + --damage_per_second = 3*2, + liquidtype = "source", + liquid_alternative_flowing = "es:mud_flowing", + liquid_alternative_source = "es:mud_source", + liquid_viscosity = 18, + post_effect_color = {a = 255, r = 43, g = 23, b = 9}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, }, +}) + +minetest.register_node("es:mud_flowing", { + description = "Flowing mud", + inventory_image = minetest.inventorycube("es_mud.png"), + drawtype = "liquid",--change to liquid for a solid look + tiles = {"es_mud.png"}, + special_tiles = { + { + name = "es_mud_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = "es_mud_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 250, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + --damage_per_second = 3*2, + liquidtype = "flowing", + liquid_alternative_flowing = "es:mud_flowing", + liquid_alternative_source = "es:mud_source", + liquid_viscosity = 19, + post_effect_color = {a = 255, r = 43, g = 23, b = 9}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1, }, +}) diff --git a/nodes-good.lua b/nodes-good.lua new file mode 100644 index 0000000..7a9c4de --- /dev/null +++ b/nodes-good.lua @@ -0,0 +1,625 @@ +--Extreme Survival created by maikerumine +-- Minetest 0.4.13 mod: "Extreme Survival" +-- namespace: es +--https://github.com/maikerumine + +--License: +--~~~~~~~~ +--Code: +--(c) Copyright 2015 maikerumine; modified zlib-License +--see "LICENSE.txt" for details. + +--Media(if not stated differently): +--(c) Copyright (2014-2015) maikerumine; CC-BY-SA 3.0 + + +--tweaks and overrides +--rnd code +--cactus tweaks +local function hurt_cactus() -- cactus tweak + local name = "default:cactus" + local table = minetest.registered_nodes[name]; + local table2 = {}; + for i,v in pairs(table) do table2[i] = v end + table2.groups.disable_jump = 1 + table2.damage_per_second = 5 + minetest.register_node(":"..name, table2) +end +hurt_cactus(); + + +--TECHNIC NODES +minetest.register_node( "es:granite", { + description = "Granite", + tiles = { "technic_granite.png" }, + --tiles = { "default_coal_block.png^[colorize:#696969:142^(default_acacia_leaves.png^[colorize:#5E2612:152)" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node( "es:marble", { + description = "Marble", + tiles = { "technic_marble.png" }, + --tiles = {"default_sand.png^[colorize:#CDB79E:142^(default_acacia_leaves.png^[colorize:#CDB79E:152)"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node( "es:marble_bricks", { + description = "Marble Bricks", + tiles = { "technic_marble_bricks.png" }, + --tiles = {"default_sandstone_brick.png^[colorize:#CDB79E:182^(default_acacia_leaves.png^[colorize:#CDB79E:152)" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +--NOW WE ADD SOME RADIOACTIVITY FROM THE TECHNIC MOD +--20151206 DECIDED TO EVENTUALLY MOVE THIS INTO THE RADIATION HUD. +--MOVED AND TESTING NEW RADIATION HUD. +--KEEPING THIS CODE FOR POSSIBLE HUD FAILURE. +--UPDATE: Hud never worked like it should. +---------------------------------------- + + +if not vector.length_square then + vector.length_square = function (v) + return v.x*v.x + v.y*v.y + v.z*v.z + end +end + +-- radioactivity + +-- Radiation resistance represents the extent to which a material +-- attenuates radiation passing through it; i.e., how good a radiation +-- shield it is. This is identified per node type. For materials that +-- exist in real life, the radiation resistance value that this system +-- uses for a node type consisting of a solid cube of that material is the +-- (approximate) number of halvings of ionising radiation that is achieved +-- by a metre of the material in real life. This is approximately +-- proportional to density, which provides a good way to estimate it. +-- Homogeneous mixtures of materials have radiation resistance computed +-- by a simple weighted mean. Note that the amount of attenuation that +-- a material achieves in-game is not required to be (and is not) the +-- same as the attenuation achieved in real life. +-- +-- Radiation resistance for a node type may be specified in the node +-- definition, under the key "radiation_resistance". As an interim +-- measure, until node definitions widely include this, this code +-- knows a bunch of values for particular node types in several mods, +-- and values for groups of node types. The node definition takes +-- precedence if it specifies a value. Nodes for which no value at +-- all is known are taken to provide no radiation resistance at all; +-- this is appropriate for the majority of node types. Only node types +-- consisting of a fairly homogeneous mass of material should report +-- non-zero radiation resistance; anything with non-uniform geometry +-- or complex internal structure should show no radiation resistance. +-- Fractional resistance values are permitted; two significant figures +-- is the recommended precision. +local default_radiation_resistance_per_node = { + ["default:brick"] = 13, + ["default:bronzeblock"] = 45, + ["default:clay"] = 15, + ["default:coalblock"] = 9.6, + ["default:cobble"] = 15, + ["default:copperblock"] = 46, + ["default:desert_cobble"] = 15, + ["default:desert_sand"] = 10, + ["default:desert_stone"] = 17, + ["default:desert_stonebrick"] = 17, + ["default:diamondblock"] = 24, + ["default:dirt"] = 8.2, + ["default:dirt_with_grass"] = 8.2, + ["default:dry_dirt"] = 8.2, + ["default:dirt_with_dry_grass"] = 8.2, + ["default:dirt_with_grass_footsteps"] = 8.2, + ["default:dirt_with_snow"] = 8.2, + ["default:glass"] = 17, + ["default:goldblock"] = 170, + ["default:gravel"] = 10, + ["default:ice"] = 5.6, + ["default:lava_flowing"] = 8.5, + ["default:lava_source"] = 17, + ["default:mese"] = 21, + ["default:mossycobble"] = 15, + ["default:nyancat"] = 1000, + ["default:nyancat_rainbow"] = 1000, + ["default:obsidian"] = 18, + ["default:obsidian_glass"] = 18, + ["default:sand"] = 10, + ["default:sandstone"] = 15, + ["default:sandstonebrick"] = 15, + ["default:snowblock"] = 1.7, + ["default:steelblock"] = 40, + ["default:stone"] = 17, + ["default:stone_with_coal"] = 16, + ["default:stone_with_copper"] = 20, + ["default:stone_with_diamond"] = 18, + ["default:stone_with_gold"] = 34, + ["default:stone_with_iron"] = 20, + ["default:stone_with_mese"] = 17, + ["default:stonebrick"] = 17, + ["default:water_flowing"] = 2.8, + ["default:water_source"] = 5.6, + ["farming:desert_sand_soil"] = 10, + ["farming:desert_sand_soil_wet"] = 10, + ["farming:soil"] = 8.2, + ["farming:soil_wet"] = 8.2, + ["glooptest:akalin_crystal_glass"] = 21, + ["glooptest:akalinblock"] = 40, + ["glooptest:alatro_crystal_glass"] = 21, + ["glooptest:alatroblock"] = 40, + ["glooptest:amethystblock"] = 18, + ["glooptest:arol_crystal_glass"] = 21, + ["glooptest:crystal_glass"] = 21, + ["glooptest:emeraldblock"] = 19, + ["glooptest:heavy_crystal_glass"] = 21, + ["glooptest:mineral_akalin"] = 20, + ["glooptest:mineral_alatro"] = 20, + ["glooptest:mineral_amethyst"] = 17, + ["glooptest:mineral_arol"] = 20, + ["glooptest:mineral_desert_coal"] = 16, + ["glooptest:mineral_desert_iron"] = 20, + ["glooptest:mineral_emerald"] = 17, + ["glooptest:mineral_kalite"] = 20, + ["glooptest:mineral_ruby"] = 18, + ["glooptest:mineral_sapphire"] = 18, + ["glooptest:mineral_talinite"] = 20, + ["glooptest:mineral_topaz"] = 18, + ["glooptest:reinforced_crystal_glass"] = 21, + ["glooptest:rubyblock"] = 27, + ["glooptest:sapphireblock"] = 27, + ["glooptest:talinite_crystal_glass"] = 21, + ["glooptest:taliniteblock"] = 40, + ["glooptest:topazblock"] = 24, + ["mesecons_extrawires:mese_powered"] = 21, + ["moreblocks:cactus_brick"] = 13, + ["moreblocks:cactus_checker"] = 8.5, + ["moreblocks:circle_stone_bricks"] = 17, + ["moreblocks:clean_glass"] = 17, + ["moreblocks:coal_checker"] = 9.0, + ["moreblocks:coal_glass"] = 17, + ["moreblocks:coal_stone"] = 17, + ["moreblocks:coal_stone_bricks"] = 17, + ["moreblocks:glow_glass"] = 17, + ["moreblocks:grey_bricks"] = 15, + ["moreblocks:iron_checker"] = 11, + ["moreblocks:iron_glass"] = 17, + ["moreblocks:iron_stone"] = 17, + ["moreblocks:iron_stone_bricks"] = 17, + ["moreblocks:plankstone"] = 9.3, + ["moreblocks:split_stone_tile"] = 15, + ["moreblocks:split_stone_tile_alt"] = 15, + ["moreblocks:stone_tile"] = 15, + ["moreblocks:super_glow_glass"] = 17, + ["moreblocks:tar"] = 7.0, + ["moreblocks:wood_tile"] = 1.7, + ["moreblocks:wood_tile_center"] = 1.7, + ["moreblocks:wood_tile_down"] = 1.7, + ["moreblocks:wood_tile_flipped"] = 1.7, + ["moreblocks:wood_tile_full"] = 1.7, + ["moreblocks:wood_tile_left"] = 1.7, + ["moreblocks:wood_tile_right"] = 1.7, + ["moreblocks:wood_tile_up"] = 1.7, + ["moreores:mineral_mithril"] = 18, + ["moreores:mineral_silver"] = 21, + ["moreores:mineral_tin"] = 19, + ["moreores:mithril_block"] = 26, + ["moreores:silver_block"] = 53, + ["moreores:tin_block"] = 37, + ["snow:snow_brick"] = 2.8, + ["technic:brass_block"] = 43, + ["technic:carbon_steel_block"] = 40, + ["technic:cast_iron_block"] = 40, + ["technic:chernobylite_block"] = 40, + ["technic:chromium_block"] = 37, + ["technic:corium_flowing"] = 40, + ["technic:corium_source"] = 80, + ["technic:granite"] = 18, + ["technic:marble"] = 18, + ["technic:marble_bricks"] = 18, + ["technic:mineral_chromium"] = 19, + ["technic:mineral_uranium"] = 71, + ["technic:mineral_zinc"] = 19, + ["technic:stainless_steel_block"] = 40, + ["technic:uranium_block"] = 500, + ["technic:zinc_block"] = 36, + ["tnt:tnt"] = 11, + ["tnt:tnt_burning"] = 11, +} +local default_radiation_resistance_per_group = { + concrete = 16, + tree = 3.4, + wood = 1.7, +} +local cache_radiation_resistance = {} +local function node_radiation_resistance(nodename) + local eff = cache_radiation_resistance[nodename] + if eff then return eff end + local def = minetest.registered_nodes[nodename] or {groups={}} + eff = def.radiation_resistance or default_radiation_resistance_per_node[nodename] + if not eff then + for g, v in pairs(def.groups) do + if v > 0 and default_radiation_resistance_per_group[g] then + eff = default_radiation_resistance_per_group[g] + break + end + end + end + if not eff then eff = 0 end + cache_radiation_resistance[nodename] = eff + return eff +end + + +-- Radioactive nodes cause damage to nearby players. The damage +-- effect depends on the intrinsic strength of the radiation source, +-- the distance between the source and the player, and the shielding +-- effect of the intervening material. These determine a rate of damage; +-- total damage caused is the integral of this over time. +-- +-- In the absence of effective shielding, for a specific source the +-- damage rate varies realistically in inverse proportion to the square +-- of the distance. (Distance is measured to the player's abdomen, +-- not to the nominal player position which corresponds to the foot.) +-- However, if the player is inside a non-walkable (liquid or gaseous) +-- radioactive node, the nominal distance could go to zero, yielding +-- infinite damage. In that case, the player's body is displacing the +-- radioactive material, so the effective distance should remain non-zero. +-- We therefore apply a lower distance bound of sqrt(0.75) m, which is +-- the maximum distance one can get from the node centre within the node. +-- +-- A radioactive node is identified by being in the "radioactive" group, +-- and the group value signifies the strength of the radiation source. +-- The group value is the distance in metres from a node at which an +-- unshielded player will be damaged by 0.25 HP/s. Or, equivalently, it +-- is half the square root of the damage rate in HP/s that an unshielded +-- player 1 m away will take. +-- +-- Shielding is assessed by sampling every 0.25 m along the path +-- from the source to the player, ignoring the source node itself. +-- The summed radiation resistance values from the sampled nodes yield +-- a measure of the total amount of radiation resistance on the path. +-- As in reality, shielding causes exponential attenuation of radiation. +-- However, the effect is scaled down relative to real life: each +-- metre-point of shielding, corresponding to a real-life halving of +-- radiation, reduces radiation by 0.01 nepers (a factor of about 1.01). +-- This scales down the difference between shielded and unshielded safe +-- distances, avoiding the latter becoming impractically large. +-- +-- Damage is processed at rates down to 0.25 HP/s, which in the absence of +-- shielding is attained at the distance specified by the "radioactive" +-- group value. Computed damage rates below 0.25 HP/s result in no +-- damage at all to the player. This gives the player an opportunity +-- to be safe, and limits the range at which source/player interactions +-- need to be considered. +local assumed_abdomen_offset = vector.new(0, 1, 0) +local assumed_abdomen_offset_length = vector.length(assumed_abdomen_offset) +minetest.register_abm({ + nodenames = {"group:radioactive"}, + interval = 1, + chance = 1, + action = function (pos, node) + local strength = minetest.registered_nodes[node.name].groups.radioactive + for _, o in ipairs(minetest.get_objects_inside_radius(pos, strength + assumed_abdomen_offset_length)) do + if o:is_player() then + local rel = vector.subtract(vector.add(o:getpos(), assumed_abdomen_offset), pos) + local dist_sq = vector.length_square(rel) + local dist = math.sqrt(dist_sq) + local dirstep = dist == 0 and vector.new(0,0,0) or vector.divide(rel, dist*4) + local intpos = pos + local resistance = 0 + for intdist = 0.25, dist, 0.25 do + intpos = vector.add(intpos, dirstep) + local intnodepos = vector.round(intpos) + if not vector.equals(intnodepos, pos) then + resistance = resistance + node_radiation_resistance(minetest.get_node(intnodepos).name) + end + end + local dmg_rate = 0.25 * strength*strength * math.exp(-0.0025*resistance) / math.max(0.75, dist_sq) + if dmg_rate >= 0.25 then + local dmg_int = math.floor(dmg_rate) + if math.random() < dmg_rate-dmg_int then + dmg_int = dmg_int + 1 + end + if dmg_int > 0 then + o:set_hp(math.max(o:get_hp() - dmg_int, 0)) + end + end + end + end + end, +}) + + + + + + +--ES Node Definition +minetest.register_node("es:stone_with_emerald", { + description = "Emerald Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#008000:134)"}, + is_ground_content = true, + groups = {cracky=1}, + drop = "es:emerald_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_ruby", { + description = "Ruby Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#FF0000:144)"}, + is_ground_content = true, + groups = {cracky=1}, + drop = "es:ruby_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_aikerum", { + description = "Aikerum Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#0000FF:134)"}, + is_ground_content = true, + groups = {cracky=1,level = 2}, + drop = "es:aikerum_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_infinium", { + description = "Infinium Ore - Slightly Radioactive", + tiles = {"default_stone.png^infinium_ore.png"}, + is_ground_content = true, + groups = {cracky=1,level = 2, radioactive = (state == "source" and 2 or 2)}, + drop = "es:infinium_goo", + sounds = default.node_sound_stone_defaults(), +}) + +--Emerald located at -1000 +minetest.register_node("es:emeraldblock", { + description = "Emerald Block", + tiles = {"default_diamond_block.png^[colorize:#008000:134"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:emerald_crystal", { + description = "Emerald Crystal", + inventory_image = "default_diamond.png^[colorize:#008000:134", +}) + +--Ruby located at -3000 +minetest.register_node("es:rubyblock", { + description = "Ruby Block", + tiles = {"default_diamond_block.png^[colorize:#FF0000:194"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:ruby_crystal", { + description = "Ruby Crystal", + inventory_image = "default_diamond.png^[colorize:#FF0000:144", +}) + +--Aikerum located at -4000 +minetest.register_node("es:aikerumblock", { + description = "Aikerum Block", + tiles = {"default_diamond_block.png^[colorize:#0000FF:134"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:aikerum_crystal", { + description = "Aikerum Crystal", + inventory_image = "default_diamond.png^[colorize:#0000FF:134", +}) + + +--Infinium located at -4300 +minetest.register_node("es:infiniumblock", { + description = "infinium Block", + tiles = {"infinium_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:infinium_goo", { + description = "Infinium Goo--Need to craft with vessel to contain.", + inventory_image = "infinium.png", +}) + +minetest.register_craftitem("es:infinium_ingot", { + description = "Infinium Ingot--TBD CRAFTING Special Armour and Lab Equipment", + --inventory_image = "infinium_ingot.png", + inventory_image = "default_steel_ingot.png^[colorize:#B0171F:215", +}) + +minetest.register_craftitem("es:infinium_container", { + description = "Infinium Container--Cook to get Infinium Ingot", + inventory_image = "infinium_container.png", +}) + + +--BONEBLOCK +minetest.register_node("es:boneblock", { + description = "Bone Blox", + tiles = { + "bones_top.png", + "bones_bottom.png", + "bones_side.png", + "bones_side.png", + "bones_rear.png", + "bones_front.png" + }, + paramtype2 = "facedir", + groups = {dig_immediate=2}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.5}, + dug = {name="default_gravel_footstep", gain=1.0}, + }), +}) + + +--INPERVIOUS NODES CANNOT BREAK- Great for prison walls. +minetest.register_node("es:hgglass", { + description = "High Density Glass", + drawtype = "glasslike_framed_optional", + tiles = {"default_glass.png", "default_glass_detail.png"}, + inventory_image = minetest.inventorycube("default_glass.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("es:steelblock", { + description = "High Density Steel Block", + tiles = {"default_steel_block.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stoneblock", { + description = "High Density Stone Block", + tiles = {"default_stone.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:sandstonebrick", { + description = "High Density Sandstone Brick", + tiles = {"default_sandstone_brick.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stonebrick", { + description = "High Density Stone Brick", + tiles = {"default_stone_brick.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:junglewood", { + description = "High Density Junglewood Planks", + tiles = {"default_junglewood.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_wood_defaults(), +}) + + +--A simple way to store your cookable Mese, and it gives off light! +minetest.register_node("es:messymese", { + description = "Messy MESE Block", + tiles = {"default_clay.png^bubble.png^mese_cook_mese_crystal.png"}, + light_source = 14, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:what", { + description = "The What Block - Dig for random gift", + drawtype = "glasslike_framed_optional^bubble.png", + tiles = {"default_glass.png^bubble.png", "default_glass_detail.png^bubble.png"}, + inventory_image = minetest.inventorycube("default_glass.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {crumbly=3,}, + drop = { + max_items = 2, + items = { + {items = {'es:what'}, rarity = 80}, + {items = {'es:sword_aikerum'}, rarity = 50}, + {items = {'es:sword_ruby'}, rarity = 40}, + {items = {'es:sword_emerald'}, rarity = 30}, + {items = {'es:pick_aikerum'}, rarity = 50}, + {items = {'es:pick_ruby'}, rarity = 40}, + {items = {'es:pick_emerald'}, rarity = 30}, + {items = {'farming:bread 20'}, rarity = 3}, + {items = {'default:cobble 10'}, rarity = 3}, + {items = {'default:gold_lump 10'}, rarity = 10}, + {items = {'default:iron_lump 10'}, rarity = 5}, + {items = {'default:apple 10'}, rarity = 5}, + {items = {'default:coal_lump 10'}, rarity = 1}, + {items = {'es:depleted_uranium_ingot 3'}} + } + }, + sounds = default.node_sound_glass_defaults(), +}) + + + + +--Default addons as they should be. I changed ore generation to keep unique for compatibility. + +--Dry dirt added +minetest.register_node("es:dry_dirt", { + description = "Some dry dirt", + --tiles = {"default_dry_dirt.png"}, + tiles = {"default_dirt.png^[colorize:#B8860B:95"}, + groups = {crumbly = 3}, + drop = 'es:dry_dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("es:stone_with_mese", { + description = "Cookable Mese Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#F0E68C:195)"}, + paramtype = "light", + groups = {cracky = 1}, + drop = "es:mesecook_crystal", + sounds = default.node_sound_stone_defaults(), + light_source = 1, +}) + +minetest.register_node("es:desert_stone_with_gold", { + description = "Gold Ore", + tiles = {"default_desert_stone.png^default_mineral_gold.png"}, + groups = {cracky = 2}, + drop = "default:gold_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:desert_stone_with_iron", { + description = "Iron Ore", + tiles = {"default_desert_stone.png^default_mineral_iron.png"}, + groups = {cracky = 2}, + drop = 'default:iron_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:desert_stone_with_coal", { + description = "Coal Ore", + tiles = {"default_desert_stone.png^default_mineral_coal.png"}, + groups = {cracky = 3}, + drop = 'default:coal_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:depleted_uranium", { + description = "Depleted Uranium Ore RADIOACTIVE", + tiles = {"default_stone.png^(default_mineral_gold.png^[colorize:#00FF00:195)"}, + groups = {cracky = 3, radioactive = (state == "source" and 3 or 2)}, + drop = 'es:depleted_uranium_lump', + sounds = default.node_sound_stone_defaults(), + light_source = 1, +}) + +minetest.register_craftitem("es:depleted_uranium_lump", { + description = "Depleted Uranium use for long term fuel, first cook the lump into an ingot, then use ingot for fuel.", + inventory_image = "default_mineral_mese.png^[colorize:#7CFC00:195", +}) diff --git a/nodes-org.lua b/nodes-org.lua new file mode 100644 index 0000000..7a9c4de --- /dev/null +++ b/nodes-org.lua @@ -0,0 +1,625 @@ +--Extreme Survival created by maikerumine +-- Minetest 0.4.13 mod: "Extreme Survival" +-- namespace: es +--https://github.com/maikerumine + +--License: +--~~~~~~~~ +--Code: +--(c) Copyright 2015 maikerumine; modified zlib-License +--see "LICENSE.txt" for details. + +--Media(if not stated differently): +--(c) Copyright (2014-2015) maikerumine; CC-BY-SA 3.0 + + +--tweaks and overrides +--rnd code +--cactus tweaks +local function hurt_cactus() -- cactus tweak + local name = "default:cactus" + local table = minetest.registered_nodes[name]; + local table2 = {}; + for i,v in pairs(table) do table2[i] = v end + table2.groups.disable_jump = 1 + table2.damage_per_second = 5 + minetest.register_node(":"..name, table2) +end +hurt_cactus(); + + +--TECHNIC NODES +minetest.register_node( "es:granite", { + description = "Granite", + tiles = { "technic_granite.png" }, + --tiles = { "default_coal_block.png^[colorize:#696969:142^(default_acacia_leaves.png^[colorize:#5E2612:152)" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node( "es:marble", { + description = "Marble", + tiles = { "technic_marble.png" }, + --tiles = {"default_sand.png^[colorize:#CDB79E:142^(default_acacia_leaves.png^[colorize:#CDB79E:152)"}, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node( "es:marble_bricks", { + description = "Marble Bricks", + tiles = { "technic_marble_bricks.png" }, + --tiles = {"default_sandstone_brick.png^[colorize:#CDB79E:182^(default_acacia_leaves.png^[colorize:#CDB79E:152)" }, + is_ground_content = true, + groups = {cracky=3}, + sounds = default.node_sound_stone_defaults(), +}) + +--NOW WE ADD SOME RADIOACTIVITY FROM THE TECHNIC MOD +--20151206 DECIDED TO EVENTUALLY MOVE THIS INTO THE RADIATION HUD. +--MOVED AND TESTING NEW RADIATION HUD. +--KEEPING THIS CODE FOR POSSIBLE HUD FAILURE. +--UPDATE: Hud never worked like it should. +---------------------------------------- + + +if not vector.length_square then + vector.length_square = function (v) + return v.x*v.x + v.y*v.y + v.z*v.z + end +end + +-- radioactivity + +-- Radiation resistance represents the extent to which a material +-- attenuates radiation passing through it; i.e., how good a radiation +-- shield it is. This is identified per node type. For materials that +-- exist in real life, the radiation resistance value that this system +-- uses for a node type consisting of a solid cube of that material is the +-- (approximate) number of halvings of ionising radiation that is achieved +-- by a metre of the material in real life. This is approximately +-- proportional to density, which provides a good way to estimate it. +-- Homogeneous mixtures of materials have radiation resistance computed +-- by a simple weighted mean. Note that the amount of attenuation that +-- a material achieves in-game is not required to be (and is not) the +-- same as the attenuation achieved in real life. +-- +-- Radiation resistance for a node type may be specified in the node +-- definition, under the key "radiation_resistance". As an interim +-- measure, until node definitions widely include this, this code +-- knows a bunch of values for particular node types in several mods, +-- and values for groups of node types. The node definition takes +-- precedence if it specifies a value. Nodes for which no value at +-- all is known are taken to provide no radiation resistance at all; +-- this is appropriate for the majority of node types. Only node types +-- consisting of a fairly homogeneous mass of material should report +-- non-zero radiation resistance; anything with non-uniform geometry +-- or complex internal structure should show no radiation resistance. +-- Fractional resistance values are permitted; two significant figures +-- is the recommended precision. +local default_radiation_resistance_per_node = { + ["default:brick"] = 13, + ["default:bronzeblock"] = 45, + ["default:clay"] = 15, + ["default:coalblock"] = 9.6, + ["default:cobble"] = 15, + ["default:copperblock"] = 46, + ["default:desert_cobble"] = 15, + ["default:desert_sand"] = 10, + ["default:desert_stone"] = 17, + ["default:desert_stonebrick"] = 17, + ["default:diamondblock"] = 24, + ["default:dirt"] = 8.2, + ["default:dirt_with_grass"] = 8.2, + ["default:dry_dirt"] = 8.2, + ["default:dirt_with_dry_grass"] = 8.2, + ["default:dirt_with_grass_footsteps"] = 8.2, + ["default:dirt_with_snow"] = 8.2, + ["default:glass"] = 17, + ["default:goldblock"] = 170, + ["default:gravel"] = 10, + ["default:ice"] = 5.6, + ["default:lava_flowing"] = 8.5, + ["default:lava_source"] = 17, + ["default:mese"] = 21, + ["default:mossycobble"] = 15, + ["default:nyancat"] = 1000, + ["default:nyancat_rainbow"] = 1000, + ["default:obsidian"] = 18, + ["default:obsidian_glass"] = 18, + ["default:sand"] = 10, + ["default:sandstone"] = 15, + ["default:sandstonebrick"] = 15, + ["default:snowblock"] = 1.7, + ["default:steelblock"] = 40, + ["default:stone"] = 17, + ["default:stone_with_coal"] = 16, + ["default:stone_with_copper"] = 20, + ["default:stone_with_diamond"] = 18, + ["default:stone_with_gold"] = 34, + ["default:stone_with_iron"] = 20, + ["default:stone_with_mese"] = 17, + ["default:stonebrick"] = 17, + ["default:water_flowing"] = 2.8, + ["default:water_source"] = 5.6, + ["farming:desert_sand_soil"] = 10, + ["farming:desert_sand_soil_wet"] = 10, + ["farming:soil"] = 8.2, + ["farming:soil_wet"] = 8.2, + ["glooptest:akalin_crystal_glass"] = 21, + ["glooptest:akalinblock"] = 40, + ["glooptest:alatro_crystal_glass"] = 21, + ["glooptest:alatroblock"] = 40, + ["glooptest:amethystblock"] = 18, + ["glooptest:arol_crystal_glass"] = 21, + ["glooptest:crystal_glass"] = 21, + ["glooptest:emeraldblock"] = 19, + ["glooptest:heavy_crystal_glass"] = 21, + ["glooptest:mineral_akalin"] = 20, + ["glooptest:mineral_alatro"] = 20, + ["glooptest:mineral_amethyst"] = 17, + ["glooptest:mineral_arol"] = 20, + ["glooptest:mineral_desert_coal"] = 16, + ["glooptest:mineral_desert_iron"] = 20, + ["glooptest:mineral_emerald"] = 17, + ["glooptest:mineral_kalite"] = 20, + ["glooptest:mineral_ruby"] = 18, + ["glooptest:mineral_sapphire"] = 18, + ["glooptest:mineral_talinite"] = 20, + ["glooptest:mineral_topaz"] = 18, + ["glooptest:reinforced_crystal_glass"] = 21, + ["glooptest:rubyblock"] = 27, + ["glooptest:sapphireblock"] = 27, + ["glooptest:talinite_crystal_glass"] = 21, + ["glooptest:taliniteblock"] = 40, + ["glooptest:topazblock"] = 24, + ["mesecons_extrawires:mese_powered"] = 21, + ["moreblocks:cactus_brick"] = 13, + ["moreblocks:cactus_checker"] = 8.5, + ["moreblocks:circle_stone_bricks"] = 17, + ["moreblocks:clean_glass"] = 17, + ["moreblocks:coal_checker"] = 9.0, + ["moreblocks:coal_glass"] = 17, + ["moreblocks:coal_stone"] = 17, + ["moreblocks:coal_stone_bricks"] = 17, + ["moreblocks:glow_glass"] = 17, + ["moreblocks:grey_bricks"] = 15, + ["moreblocks:iron_checker"] = 11, + ["moreblocks:iron_glass"] = 17, + ["moreblocks:iron_stone"] = 17, + ["moreblocks:iron_stone_bricks"] = 17, + ["moreblocks:plankstone"] = 9.3, + ["moreblocks:split_stone_tile"] = 15, + ["moreblocks:split_stone_tile_alt"] = 15, + ["moreblocks:stone_tile"] = 15, + ["moreblocks:super_glow_glass"] = 17, + ["moreblocks:tar"] = 7.0, + ["moreblocks:wood_tile"] = 1.7, + ["moreblocks:wood_tile_center"] = 1.7, + ["moreblocks:wood_tile_down"] = 1.7, + ["moreblocks:wood_tile_flipped"] = 1.7, + ["moreblocks:wood_tile_full"] = 1.7, + ["moreblocks:wood_tile_left"] = 1.7, + ["moreblocks:wood_tile_right"] = 1.7, + ["moreblocks:wood_tile_up"] = 1.7, + ["moreores:mineral_mithril"] = 18, + ["moreores:mineral_silver"] = 21, + ["moreores:mineral_tin"] = 19, + ["moreores:mithril_block"] = 26, + ["moreores:silver_block"] = 53, + ["moreores:tin_block"] = 37, + ["snow:snow_brick"] = 2.8, + ["technic:brass_block"] = 43, + ["technic:carbon_steel_block"] = 40, + ["technic:cast_iron_block"] = 40, + ["technic:chernobylite_block"] = 40, + ["technic:chromium_block"] = 37, + ["technic:corium_flowing"] = 40, + ["technic:corium_source"] = 80, + ["technic:granite"] = 18, + ["technic:marble"] = 18, + ["technic:marble_bricks"] = 18, + ["technic:mineral_chromium"] = 19, + ["technic:mineral_uranium"] = 71, + ["technic:mineral_zinc"] = 19, + ["technic:stainless_steel_block"] = 40, + ["technic:uranium_block"] = 500, + ["technic:zinc_block"] = 36, + ["tnt:tnt"] = 11, + ["tnt:tnt_burning"] = 11, +} +local default_radiation_resistance_per_group = { + concrete = 16, + tree = 3.4, + wood = 1.7, +} +local cache_radiation_resistance = {} +local function node_radiation_resistance(nodename) + local eff = cache_radiation_resistance[nodename] + if eff then return eff end + local def = minetest.registered_nodes[nodename] or {groups={}} + eff = def.radiation_resistance or default_radiation_resistance_per_node[nodename] + if not eff then + for g, v in pairs(def.groups) do + if v > 0 and default_radiation_resistance_per_group[g] then + eff = default_radiation_resistance_per_group[g] + break + end + end + end + if not eff then eff = 0 end + cache_radiation_resistance[nodename] = eff + return eff +end + + +-- Radioactive nodes cause damage to nearby players. The damage +-- effect depends on the intrinsic strength of the radiation source, +-- the distance between the source and the player, and the shielding +-- effect of the intervening material. These determine a rate of damage; +-- total damage caused is the integral of this over time. +-- +-- In the absence of effective shielding, for a specific source the +-- damage rate varies realistically in inverse proportion to the square +-- of the distance. (Distance is measured to the player's abdomen, +-- not to the nominal player position which corresponds to the foot.) +-- However, if the player is inside a non-walkable (liquid or gaseous) +-- radioactive node, the nominal distance could go to zero, yielding +-- infinite damage. In that case, the player's body is displacing the +-- radioactive material, so the effective distance should remain non-zero. +-- We therefore apply a lower distance bound of sqrt(0.75) m, which is +-- the maximum distance one can get from the node centre within the node. +-- +-- A radioactive node is identified by being in the "radioactive" group, +-- and the group value signifies the strength of the radiation source. +-- The group value is the distance in metres from a node at which an +-- unshielded player will be damaged by 0.25 HP/s. Or, equivalently, it +-- is half the square root of the damage rate in HP/s that an unshielded +-- player 1 m away will take. +-- +-- Shielding is assessed by sampling every 0.25 m along the path +-- from the source to the player, ignoring the source node itself. +-- The summed radiation resistance values from the sampled nodes yield +-- a measure of the total amount of radiation resistance on the path. +-- As in reality, shielding causes exponential attenuation of radiation. +-- However, the effect is scaled down relative to real life: each +-- metre-point of shielding, corresponding to a real-life halving of +-- radiation, reduces radiation by 0.01 nepers (a factor of about 1.01). +-- This scales down the difference between shielded and unshielded safe +-- distances, avoiding the latter becoming impractically large. +-- +-- Damage is processed at rates down to 0.25 HP/s, which in the absence of +-- shielding is attained at the distance specified by the "radioactive" +-- group value. Computed damage rates below 0.25 HP/s result in no +-- damage at all to the player. This gives the player an opportunity +-- to be safe, and limits the range at which source/player interactions +-- need to be considered. +local assumed_abdomen_offset = vector.new(0, 1, 0) +local assumed_abdomen_offset_length = vector.length(assumed_abdomen_offset) +minetest.register_abm({ + nodenames = {"group:radioactive"}, + interval = 1, + chance = 1, + action = function (pos, node) + local strength = minetest.registered_nodes[node.name].groups.radioactive + for _, o in ipairs(minetest.get_objects_inside_radius(pos, strength + assumed_abdomen_offset_length)) do + if o:is_player() then + local rel = vector.subtract(vector.add(o:getpos(), assumed_abdomen_offset), pos) + local dist_sq = vector.length_square(rel) + local dist = math.sqrt(dist_sq) + local dirstep = dist == 0 and vector.new(0,0,0) or vector.divide(rel, dist*4) + local intpos = pos + local resistance = 0 + for intdist = 0.25, dist, 0.25 do + intpos = vector.add(intpos, dirstep) + local intnodepos = vector.round(intpos) + if not vector.equals(intnodepos, pos) then + resistance = resistance + node_radiation_resistance(minetest.get_node(intnodepos).name) + end + end + local dmg_rate = 0.25 * strength*strength * math.exp(-0.0025*resistance) / math.max(0.75, dist_sq) + if dmg_rate >= 0.25 then + local dmg_int = math.floor(dmg_rate) + if math.random() < dmg_rate-dmg_int then + dmg_int = dmg_int + 1 + end + if dmg_int > 0 then + o:set_hp(math.max(o:get_hp() - dmg_int, 0)) + end + end + end + end + end, +}) + + + + + + +--ES Node Definition +minetest.register_node("es:stone_with_emerald", { + description = "Emerald Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#008000:134)"}, + is_ground_content = true, + groups = {cracky=1}, + drop = "es:emerald_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_ruby", { + description = "Ruby Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#FF0000:144)"}, + is_ground_content = true, + groups = {cracky=1}, + drop = "es:ruby_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_aikerum", { + description = "Aikerum Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#0000FF:134)"}, + is_ground_content = true, + groups = {cracky=1,level = 2}, + drop = "es:aikerum_crystal", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stone_with_infinium", { + description = "Infinium Ore - Slightly Radioactive", + tiles = {"default_stone.png^infinium_ore.png"}, + is_ground_content = true, + groups = {cracky=1,level = 2, radioactive = (state == "source" and 2 or 2)}, + drop = "es:infinium_goo", + sounds = default.node_sound_stone_defaults(), +}) + +--Emerald located at -1000 +minetest.register_node("es:emeraldblock", { + description = "Emerald Block", + tiles = {"default_diamond_block.png^[colorize:#008000:134"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:emerald_crystal", { + description = "Emerald Crystal", + inventory_image = "default_diamond.png^[colorize:#008000:134", +}) + +--Ruby located at -3000 +minetest.register_node("es:rubyblock", { + description = "Ruby Block", + tiles = {"default_diamond_block.png^[colorize:#FF0000:194"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:ruby_crystal", { + description = "Ruby Crystal", + inventory_image = "default_diamond.png^[colorize:#FF0000:144", +}) + +--Aikerum located at -4000 +minetest.register_node("es:aikerumblock", { + description = "Aikerum Block", + tiles = {"default_diamond_block.png^[colorize:#0000FF:134"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:aikerum_crystal", { + description = "Aikerum Crystal", + inventory_image = "default_diamond.png^[colorize:#0000FF:134", +}) + + +--Infinium located at -4300 +minetest.register_node("es:infiniumblock", { + description = "infinium Block", + tiles = {"infinium_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:infinium_goo", { + description = "Infinium Goo--Need to craft with vessel to contain.", + inventory_image = "infinium.png", +}) + +minetest.register_craftitem("es:infinium_ingot", { + description = "Infinium Ingot--TBD CRAFTING Special Armour and Lab Equipment", + --inventory_image = "infinium_ingot.png", + inventory_image = "default_steel_ingot.png^[colorize:#B0171F:215", +}) + +minetest.register_craftitem("es:infinium_container", { + description = "Infinium Container--Cook to get Infinium Ingot", + inventory_image = "infinium_container.png", +}) + + +--BONEBLOCK +minetest.register_node("es:boneblock", { + description = "Bone Blox", + tiles = { + "bones_top.png", + "bones_bottom.png", + "bones_side.png", + "bones_side.png", + "bones_rear.png", + "bones_front.png" + }, + paramtype2 = "facedir", + groups = {dig_immediate=2}, + sounds = default.node_sound_dirt_defaults({ + footstep = {name="default_gravel_footstep", gain=0.5}, + dug = {name="default_gravel_footstep", gain=1.0}, + }), +}) + + +--INPERVIOUS NODES CANNOT BREAK- Great for prison walls. +minetest.register_node("es:hgglass", { + description = "High Density Glass", + drawtype = "glasslike_framed_optional", + tiles = {"default_glass.png", "default_glass_detail.png"}, + inventory_image = minetest.inventorycube("default_glass.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_glass_defaults(), +}) + +minetest.register_node("es:steelblock", { + description = "High Density Steel Block", + tiles = {"default_steel_block.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stoneblock", { + description = "High Density Stone Block", + tiles = {"default_stone.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:sandstonebrick", { + description = "High Density Sandstone Brick", + tiles = {"default_sandstone_brick.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:stonebrick", { + description = "High Density Stone Brick", + tiles = {"default_stone_brick.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:junglewood", { + description = "High Density Junglewood Planks", + tiles = {"default_junglewood.png"}, + is_ground_content = false, + groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, + sounds = default.node_sound_wood_defaults(), +}) + + +--A simple way to store your cookable Mese, and it gives off light! +minetest.register_node("es:messymese", { + description = "Messy MESE Block", + tiles = {"default_clay.png^bubble.png^mese_cook_mese_crystal.png"}, + light_source = 14, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:what", { + description = "The What Block - Dig for random gift", + drawtype = "glasslike_framed_optional^bubble.png", + tiles = {"default_glass.png^bubble.png", "default_glass_detail.png^bubble.png"}, + inventory_image = minetest.inventorycube("default_glass.png"), + paramtype = "light", + sunlight_propagates = true, + is_ground_content = false, + groups = {crumbly=3,}, + drop = { + max_items = 2, + items = { + {items = {'es:what'}, rarity = 80}, + {items = {'es:sword_aikerum'}, rarity = 50}, + {items = {'es:sword_ruby'}, rarity = 40}, + {items = {'es:sword_emerald'}, rarity = 30}, + {items = {'es:pick_aikerum'}, rarity = 50}, + {items = {'es:pick_ruby'}, rarity = 40}, + {items = {'es:pick_emerald'}, rarity = 30}, + {items = {'farming:bread 20'}, rarity = 3}, + {items = {'default:cobble 10'}, rarity = 3}, + {items = {'default:gold_lump 10'}, rarity = 10}, + {items = {'default:iron_lump 10'}, rarity = 5}, + {items = {'default:apple 10'}, rarity = 5}, + {items = {'default:coal_lump 10'}, rarity = 1}, + {items = {'es:depleted_uranium_ingot 3'}} + } + }, + sounds = default.node_sound_glass_defaults(), +}) + + + + +--Default addons as they should be. I changed ore generation to keep unique for compatibility. + +--Dry dirt added +minetest.register_node("es:dry_dirt", { + description = "Some dry dirt", + --tiles = {"default_dry_dirt.png"}, + tiles = {"default_dirt.png^[colorize:#B8860B:95"}, + groups = {crumbly = 3}, + drop = 'es:dry_dirt', + sounds = default.node_sound_dirt_defaults({ + footstep = {name = "default_grass_footstep", gain = 0.25}, + }), +}) + +minetest.register_node("es:stone_with_mese", { + description = "Cookable Mese Ore", + tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#F0E68C:195)"}, + paramtype = "light", + groups = {cracky = 1}, + drop = "es:mesecook_crystal", + sounds = default.node_sound_stone_defaults(), + light_source = 1, +}) + +minetest.register_node("es:desert_stone_with_gold", { + description = "Gold Ore", + tiles = {"default_desert_stone.png^default_mineral_gold.png"}, + groups = {cracky = 2}, + drop = "default:gold_lump", + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:desert_stone_with_iron", { + description = "Iron Ore", + tiles = {"default_desert_stone.png^default_mineral_iron.png"}, + groups = {cracky = 2}, + drop = 'default:iron_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:desert_stone_with_coal", { + description = "Coal Ore", + tiles = {"default_desert_stone.png^default_mineral_coal.png"}, + groups = {cracky = 3}, + drop = 'default:coal_lump', + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_node("es:depleted_uranium", { + description = "Depleted Uranium Ore RADIOACTIVE", + tiles = {"default_stone.png^(default_mineral_gold.png^[colorize:#00FF00:195)"}, + groups = {cracky = 3, radioactive = (state == "source" and 3 or 2)}, + drop = 'es:depleted_uranium_lump', + sounds = default.node_sound_stone_defaults(), + light_source = 1, +}) + +minetest.register_craftitem("es:depleted_uranium_lump", { + description = "Depleted Uranium use for long term fuel, first cook the lump into an ingot, then use ingot for fuel.", + inventory_image = "default_mineral_mese.png^[colorize:#7CFC00:195", +}) diff --git a/nodes.lua b/nodes.lua index 7a9c4de..2dc223a 100644 --- a/nodes.lua +++ b/nodes.lua @@ -32,7 +32,6 @@ hurt_cactus(); minetest.register_node( "es:granite", { description = "Granite", tiles = { "technic_granite.png" }, - --tiles = { "default_coal_block.png^[colorize:#696969:142^(default_acacia_leaves.png^[colorize:#5E2612:152)" }, is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), @@ -41,7 +40,6 @@ minetest.register_node( "es:granite", { minetest.register_node( "es:marble", { description = "Marble", tiles = { "technic_marble.png" }, - --tiles = {"default_sand.png^[colorize:#CDB79E:142^(default_acacia_leaves.png^[colorize:#CDB79E:152)"}, is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), @@ -50,7 +48,6 @@ minetest.register_node( "es:marble", { minetest.register_node( "es:marble_bricks", { description = "Marble Bricks", tiles = { "technic_marble_bricks.png" }, - --tiles = {"default_sandstone_brick.png^[colorize:#CDB79E:182^(default_acacia_leaves.png^[colorize:#CDB79E:152)" }, is_ground_content = true, groups = {cracky=3}, sounds = default.node_sound_stone_defaults(), @@ -341,7 +338,7 @@ minetest.register_abm({ --ES Node Definition minetest.register_node("es:stone_with_emerald", { description = "Emerald Ore", - tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#008000:134)"}, + tiles = {"default_stone.png^emerald_ore.png"}, is_ground_content = true, groups = {cracky=1}, drop = "es:emerald_crystal", @@ -350,7 +347,7 @@ minetest.register_node("es:stone_with_emerald", { minetest.register_node("es:stone_with_ruby", { description = "Ruby Ore", - tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#FF0000:144)"}, + tiles = {"default_stone.png^ruby_ore.png"}, is_ground_content = true, groups = {cracky=1}, drop = "es:ruby_crystal", @@ -359,7 +356,7 @@ minetest.register_node("es:stone_with_ruby", { minetest.register_node("es:stone_with_aikerum", { description = "Aikerum Ore", - tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#0000FF:134)"}, + tiles = {"default_stone.png^aikerum_ore.png"}, is_ground_content = true, groups = {cracky=1,level = 2}, drop = "es:aikerum_crystal", @@ -375,10 +372,19 @@ minetest.register_node("es:stone_with_infinium", { sounds = default.node_sound_stone_defaults(), }) +minetest.register_node("es:stone_with_purpellium", { + description = "Purlellium Ore - Oddly interesting", + tiles = {"default_stone.png^purpellium_ore.png"}, + is_ground_content = true, + groups = {cracky=2,level = 2, radioactive = (state == "source" and 2 or 2)}, + drop = "es:purpellium_lump", + sounds = default.node_sound_stone_defaults(), +}) + --Emerald located at -1000 minetest.register_node("es:emeraldblock", { description = "Emerald Block", - tiles = {"default_diamond_block.png^[colorize:#008000:134"}, + tiles = {"emerald_block.png"}, is_ground_content = true, groups = {cracky=1,level=2}, sounds = default.node_sound_stone_defaults(), @@ -386,13 +392,13 @@ minetest.register_node("es:emeraldblock", { minetest.register_craftitem("es:emerald_crystal", { description = "Emerald Crystal", - inventory_image = "default_diamond.png^[colorize:#008000:134", + inventory_image = "emerald.png", }) --Ruby located at -3000 minetest.register_node("es:rubyblock", { description = "Ruby Block", - tiles = {"default_diamond_block.png^[colorize:#FF0000:194"}, + tiles = {"ruby_block.png"}, is_ground_content = true, groups = {cracky=1,level=2}, sounds = default.node_sound_stone_defaults(), @@ -400,13 +406,13 @@ minetest.register_node("es:rubyblock", { minetest.register_craftitem("es:ruby_crystal", { description = "Ruby Crystal", - inventory_image = "default_diamond.png^[colorize:#FF0000:144", + inventory_image = "ruby.png", }) --Aikerum located at -4000 minetest.register_node("es:aikerumblock", { description = "Aikerum Block", - tiles = {"default_diamond_block.png^[colorize:#0000FF:134"}, + tiles = {"aikerum_block.png"}, is_ground_content = true, groups = {cracky=1,level=2}, sounds = default.node_sound_stone_defaults(), @@ -414,7 +420,7 @@ minetest.register_node("es:aikerumblock", { minetest.register_craftitem("es:aikerum_crystal", { description = "Aikerum Crystal", - inventory_image = "default_diamond.png^[colorize:#0000FF:134", + inventory_image = "aikerum.png", }) @@ -435,7 +441,7 @@ minetest.register_craftitem("es:infinium_goo", { minetest.register_craftitem("es:infinium_ingot", { description = "Infinium Ingot--TBD CRAFTING Special Armour and Lab Equipment", --inventory_image = "infinium_ingot.png", - inventory_image = "default_steel_ingot.png^[colorize:#B0171F:215", + inventory_image = "infinium_ingot.png", }) minetest.register_craftitem("es:infinium_container", { @@ -443,6 +449,26 @@ minetest.register_craftitem("es:infinium_container", { inventory_image = "infinium_container.png", }) +--Purpellium located at -4000 +minetest.register_node("es:purpelliumblock", { + description = "Purpellium Block", + tiles = {"purpellium_block.png"}, + is_ground_content = true, + groups = {cracky=1,level=2}, + sounds = default.node_sound_stone_defaults(), +}) + +minetest.register_craftitem("es:purpellium_lump", { + description = "Purpellium Lump", + inventory_image = "purpellium_lump.png", +}) + +minetest.register_craftitem("es:purpellium_ingot", { + description = "Purpellium Ingot", + inventory_image = "purpellium_ingot.png", +}) + + --BONEBLOCK minetest.register_node("es:boneblock", { @@ -495,7 +521,7 @@ minetest.register_node("es:stoneblock", { minetest.register_node("es:sandstonebrick", { description = "High Density Sandstone Brick", - tiles = {"default_sandstone_brick.png"}, + tiles = {"default_stone_brick.png^[colorize:#CCCC99:150"}, is_ground_content = false, groups = {immortal=1,cracky=0,not_in_creative_inventory = 1}, sounds = default.node_sound_stone_defaults(), @@ -567,8 +593,8 @@ minetest.register_node("es:what", { --Dry dirt added minetest.register_node("es:dry_dirt", { description = "Some dry dirt", - --tiles = {"default_dry_dirt.png"}, - tiles = {"default_dirt.png^[colorize:#B8860B:95"}, + tiles = {"default_dry_dirt.png"}, + --tiles = {"dry_dirt.png"}, groups = {crumbly = 3}, drop = 'es:dry_dirt', sounds = default.node_sound_dirt_defaults({ @@ -578,7 +604,7 @@ minetest.register_node("es:dry_dirt", { minetest.register_node("es:stone_with_mese", { description = "Cookable Mese Ore", - tiles = {"default_stone.png^(default_mineral_mese.png^[colorize:#F0E68C:195)"}, + tiles = {"default_stone.png^default_mineral_mese.png"}, paramtype = "light", groups = {cracky = 1}, drop = "es:mesecook_crystal", @@ -612,14 +638,235 @@ minetest.register_node("es:desert_stone_with_coal", { minetest.register_node("es:depleted_uranium", { description = "Depleted Uranium Ore RADIOACTIVE", - tiles = {"default_stone.png^(default_mineral_gold.png^[colorize:#00FF00:195)"}, + tiles = {"default_stone.png^uranium_ore.png"}, groups = {cracky = 3, radioactive = (state == "source" and 3 or 2)}, drop = 'es:depleted_uranium_lump', sounds = default.node_sound_stone_defaults(), - light_source = 1, + light_source = 12, }) minetest.register_craftitem("es:depleted_uranium_lump", { description = "Depleted Uranium use for long term fuel, first cook the lump into an ingot, then use ingot for fuel.", - inventory_image = "default_mineral_mese.png^[colorize:#7CFC00:195", + inventory_image = "uranium_lump.png", }) + + + +--ES CUSTOM LIQUIDS: +minetest.register_node("es:toxic_water_source", { + description = "Toxic_Water Source", + inventory_image = minetest.inventorycube("es_toxic_water.png"), + drawtype = "liquid", + tiles = { + { + name = "es_toxic_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + -- New-style water source material (mostly unused) + { + name = "es_toxic_water_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + }, + alpha = 240, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "source", + liquid_alternative_flowing = "es:toxic_water_flowing", + liquid_alternative_source = "es:toxic_water_source", + liquid_viscosity =3, + damage_per_second = 3*2, + post_effect_color = {a = 255, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, radioactive = (state == "source" and 2 or 2),}, +}) + +--NOTES: +-- radioactive = (state == "source" and 32 or 16), +--THIS IS DEFAULT SETTING FROM TECHNIC + + + +minetest.register_node("es:toxic_water_flowing", { + description = "Toxic_Flowing Water", + inventory_image = minetest.inventorycube("es_toxic_water.png"), + drawtype = "flowingliquid", + tiles = {"es_toxic_water.png"}, + special_tiles = { + { + name = "es_toxic_water_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = "es_toxic_water_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 240, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + liquidtype = "flowing", + liquid_alternative_flowing = "es:toxic_water_flowing", + liquid_alternative_source = "es:toxic_water_source", + liquid_viscosity = 2, + damage_per_second = 2*2, + post_effect_color = {a = 255, r = 30, g = 60, b = 90}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1, radioactive = (state == "source" and 2 or 2),}, +}) +--FOR REF +-- Quicksand (old style, sinking inside shows black instead of yellow effect, +-- works ok with noclip enabled though) +minetest.register_node("es:mud", { + description = "Mud", + tiles = {"es_mud.png"}, + --drop = "es:mud", + liquid_viscosity = 19, + liquidtype = "source", + liquid_alternative_flowing = "es:mud", + liquid_alternative_source = "es:mud", + liquid_renewable = false, + liquid_range = 0, + drowning = 1, + walkable = false, + climbable = false, + post_effect_color = { r=230, g=210, b=160, a=245 }, + groups = {crumbly=3, falling_node=1, sand=1, liquid=3, disable_jump=1}, + sounds = default.node_sound_sand_defaults(), +}) + + + +--this code is broken and makes the server not allow kindle players +--[[ +minetest.register_node("es:mud_source", { + description = "Mud Source", + inventory_image = minetest.inventorycube("es_mud.png"), + drawtype = "liquid", + tiles = {"es_mud.png"}, + tiles = { + { + name = "default_mud_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + }, + }, + special_tiles = { + -- New-style water source material (mostly unused) + { + name = "default_mud_source_animated.png", + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 2.0, + }, + backface_culling = false, + }, + }, + alpha = 255, + paramtype = "light", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + --damage_per_second = 3*2, + liquidtype = "source", + liquid_alternative_flowing = "es:mud_flowing", + liquid_alternative_source = "es:mud_source", + liquid_viscosity = 18, + post_effect_color = {a = 255, r = 43, g = 23, b = 9}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, }, +}) + +minetest.register_node("es:mud_flowing", { + description = "Flowing mud", + inventory_image = minetest.inventorycube("es_mud.png"), + drawtype = "liquid",--change to liquid for a solid look + tiles = {"es_mud.png"}, + special_tiles = { + { + name = "es_mud_flowing_animated.png", + backface_culling = false, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + { + name = "es_mud_flowing_animated.png", + backface_culling = true, + animation = { + type = "vertical_frames", + aspect_w = 16, + aspect_h = 16, + length = 0.8, + }, + }, + }, + alpha = 250, + paramtype = "light", + paramtype2 = "flowingliquid", + walkable = false, + pointable = false, + diggable = false, + buildable_to = true, + is_ground_content = false, + drop = "", + drowning = 1, + --damage_per_second = 3*2, + liquidtype = "flowing", + liquid_alternative_flowing = "es:mud_flowing", + liquid_alternative_source = "es:mud_source", + liquid_viscosity = 19, + post_effect_color = {a = 255, r = 43, g = 23, b = 9}, + groups = {water = 3, liquid = 3, puts_out_fire = 1, + not_in_creative_inventory = 1, }, +}) +]] diff --git a/oregen.lua b/oregen.lua index ee446dc..01b41a6 100644 --- a/oregen.lua +++ b/oregen.lua @@ -40,6 +40,31 @@ minetest.register_ore({ noise_params = {offset=0, scale=15, spread={x=130, y=130, z=130}, seed=24, octaves=3, persist=0.70} }) +--ES LIQUIDS +minetest.register_ore({ + ore_type = "scatter", + ore = "es:toxic_water_source", + wherein = {"default:dry_dirt", "default:dirt_with_dry_grass","default:dirt", "default:stone"}, + clust_scarcity = 24*24*24, + clust_num_ores = 4, + clust_size = 4, + y_min = -9000, + y_max = 50, + + }) + + +minetest.register_ore({ + ore_type = "scatter", + ore = "es:mud", + wherein = {"default:dry_dirt", "default:dirt_with_dry_grass", "default:dirt"}, + clust_scarcity = 11*5*10, + clust_num_ores = 4, + clust_size = 12, + y_min = -31, + y_max = 75, + + }) --ES Node Registration and location @@ -131,7 +156,19 @@ minetest.register_ore({ height_min = -31000, height_max = -190, }) - + + +minetest.register_ore({ + ore_type = "scatter", + ore = "es:stone_with_purpellium", + wherein = "default:stone", + clust_scarcity = 16*18*16, + clust_num_ores = 5, + clust_size = 5, + height_min = -31000, + height_max = -4090, + }) + minetest.register_ore({ ore_type = "scatter", ore = "es:stone_with_mese", @@ -150,8 +187,8 @@ minetest.register_ore({ clust_scarcity = 54 * 14 * 54, clust_num_ores = 3, clust_size = 8, - y_min = -310, - y_max = -256, + y_min = -14210, + y_max = -156, }) minetest.register_ore({ @@ -161,8 +198,8 @@ minetest.register_ore({ clust_scarcity = 14 * 14 * 14, clust_num_ores = 6, clust_size = 8, - y_min = -500, - y_max = -1256, + y_min = -15000, + y_max = -256, }) minetest.register_ore({ @@ -172,8 +209,8 @@ minetest.register_ore({ clust_scarcity = 15*15*10, clust_num_ores = 2, clust_size = 2, - y_min = 31, - y_max = -1140, + y_min = -31000, + y_max = 1140, }) minetest.register_ore({ @@ -183,7 +220,7 @@ minetest.register_ore({ clust_scarcity = 15*15*10, clust_num_ores = 2, clust_size = 2, - y_min = 21, + y_min = -31000, y_max = 1140, }) @@ -194,12 +231,12 @@ minetest.register_ore({ clust_scarcity = 15*15*10, clust_num_ores = 2, clust_size = 2, - y_min = 2, + y_min = -20000, y_max = 1140, }) - - + + minetest.register_ore({ ore_type = "scatter", ore = "es:desert_stone_with_coal", diff --git a/shutdown.lua b/shutdown.lua index e795465..2fa9605 100644 --- a/shutdown.lua +++ b/shutdown.lua @@ -20,13 +20,13 @@ es = {} --Modified by maikerumine -- Time to shut down server. -- Default is twice a day: at 06:05 and 18:05 -local H = 23 -local X = 05 -local Y = 11 -local Z = 17 +local H = 00 +local X = 06 +local Y = 12 +local Z = 18 -local M = 58 -local N = 59 +local M = 01 +local N = 02 -- Day to shut down server. -- Default is daily shutdown diff --git a/stair.lua b/stair.lua index e86da7a..696512c 100644 --- a/stair.lua +++ b/stair.lua @@ -47,21 +47,21 @@ stairs.register_stair_and_slab("marble bricks", "es:marble_bricks", --Extreme Survival Stairs stairs.register_stair_and_slab("Ruby", "es:rubyblock", {cracky = 1}, - {"default_diamond_block.png^[colorize:#FF0000:200"}, + {"ruby_block.png"}, "Ruby Block Stair", "Ruby Block Slab", default.node_sound_stone_defaults()) stairs.register_stair_and_slab("Emerald", "es:emeraldblock", {cracky = 1}, - {"default_diamond_block.png^[colorize:#7CFC00:195"}, + {"emerald_block.png"}, "Emerald Block Stair", "Emerald Block Slab", default.node_sound_stone_defaults()) stairs.register_stair_and_slab("Aikerum", "es:aikerumblock", {cracky = 1}, - {"default_diamond_block.png^[colorize:#0000CD:195"}, + {"aikerum_block.png"}, "Aikerum Block Stair", "Aikerum Block Slab", default.node_sound_stone_defaults()) @@ -72,8 +72,16 @@ stairs.register_stair_and_slab("Infinium", "es:infiniumblock", "Infinium Block Stair", "Infinium Block Slab", default.node_sound_stone_defaults()) -stairs.register_stair_and_slab("Dirt", "default:dirt", + +stairs.register_stair_and_slab("Purpellium", "es:purpelliumblock", {cracky = 1}, + {"purpellium_block.png"}, + "Purpellium Block Stair", + "Purpellium Block Slab", + default.node_sound_stone_defaults()) + +stairs.register_stair_and_slab("Dirt", "default:dirt", + {cracky = 3, crumbly = 3,}, {"default_dirt.png"}, "Dirt Block Stair", "Dirt Block Slab", diff --git a/thaw.lua b/thaw.lua new file mode 100644 index 0000000..876e0d2 --- /dev/null +++ b/thaw.lua @@ -0,0 +1,18 @@ +-- melt snow cover and ice around light sources +minetest.register_abm({ + nodenames = {"default:snow", "default:ice"}, + interval = 3, + chance = 10, + action = function(pos, node, active_object_count, active_object_count_wider) + if minetest.get_node_light(pos, 0) >= 5 then + if node.name == "default:snow" then + minetest.remove_node(pos) + if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "default:dirt_with_snow" then + minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="default:dirt_with_grass"}) + end + elseif node.name == "default:ice" then + minetest.set_node(pos, {name="default:water_source"}) + end + end + end, +}) diff --git a/tools.lua b/tools.lua index c9fb06e..8660b75 100644 --- a/tools.lua +++ b/tools.lua @@ -13,24 +13,9 @@ --(c) Copyright (2014-2015) maikerumine; CC-BY-SA 3.0 ---es_tool_emeraldsword ---es_tool_rubysword ---es_tool_aikerumsword - ---es_tool_emeraldpick ---es_tool_rubypick ---es_tool_aikerumpick - - - - - - - --SWORDS minetest.register_tool("es:sword_emerald", { description = "Extreme Survival Emerald Sword", - --inventory_image = "default_tool_diamondsword.png^[colorize:#008000:177", inventory_image = "es_tool_emeraldsword.png", tool_capabilities = { full_punch_interval = 0.5, @@ -44,7 +29,6 @@ minetest.register_tool("es:sword_emerald", { minetest.register_tool("es:sword_ruby", { description = "Extreme Survival Ruby Sword", - --inventory_image = "default_tool_diamondsword.png^[colorize:#FF0000:177", inventory_image = "es_tool_rubysword.png", tool_capabilities = { full_punch_interval = 0.4, @@ -58,7 +42,6 @@ minetest.register_tool("es:sword_ruby", { minetest.register_tool("es:sword_aikerum", { description = "Extreme Survival Aikerum Sword", - --inventory_image = "default_tool_diamondsword.png^[colorize:#0000CD:177", inventory_image = "es_tool_aikerumsword.png", tool_capabilities = { full_punch_interval = 0.3, @@ -74,7 +57,7 @@ minetest.register_tool("es:sword_aikerum", { --PICKS minetest.register_tool("es:pick_emerald", { description = "Extreme Survival Emerald Pickaxe", - inventory_image = "default_tool_diamondpick.png^[colorize:#008000:177", + inventory_image = "es_tool_emeraldpick.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=3, @@ -87,7 +70,7 @@ minetest.register_tool("es:pick_emerald", { minetest.register_tool("es:pick_ruby", { description = "Extreme Survival Ruby Pickaxe", - inventory_image = "default_tool_diamondpick.png^[colorize:#FF0000:177", + inventory_image = "es_tool_rubypick.png", tool_capabilities = { full_punch_interval = 0.7, max_drop_level=3, @@ -100,7 +83,7 @@ minetest.register_tool("es:pick_ruby", { minetest.register_tool("es:pick_aikerum", { description = "Extreme Survival Aikerum Pickaxe", - inventory_image = "default_tool_diamondpick.png^[colorize:#0000FF:177", + inventory_image = "es_tool_aikerumpick.png", tool_capabilities = { full_punch_interval = 0.25, max_drop_level=4, @@ -115,7 +98,7 @@ minetest.register_tool("es:pick_aikerum", { --AXES minetest.register_tool("es:axe_emerald", { description = "Extreme Survival Emerald Axe", - inventory_image = "default_tool_diamondaxe.png^[colorize:#008000:177", + inventory_image = "es_tool_emeraldaxe.png", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=2, @@ -127,7 +110,7 @@ minetest.register_tool("es:axe_emerald", { }) minetest.register_tool("es:axe_ruby", { description = "Extreme Survival Ruby Axe", - inventory_image = "default_tool_diamondaxe.png^[colorize:#FF0000:177", + inventory_image = "es_tool_rubyaxe.png", tool_capabilities = { full_punch_interval = 0.7, max_drop_level=3, @@ -139,7 +122,7 @@ minetest.register_tool("es:axe_ruby", { }) minetest.register_tool("es:axe_aikerum", { description = "Extreme Survival Aikerum Axe", - inventory_image = "default_tool_diamondaxe.png^[colorize:#0000FF:177", + inventory_image = "es_tool_aikerumaxe.png", tool_capabilities = { full_punch_interval = 0.25, max_drop_level=4, @@ -149,13 +132,13 @@ minetest.register_tool("es:axe_aikerum", { damage_groups = {fleshy=24}, }, }) - - + + --SHOVELS minetest.register_tool("es:shovel_emerald", { description = "Extreme Survival Emerald Shovel", - inventory_image = "default_tool_diamondaxe.png^[colorize:#008000:177", - --wield_image = "es_tool_emeraldshovel.png^[transformR90", + inventory_image = "es_tool_emeraldshovel.png", + wield_image = "es_tool_emeraldshovel.png^[transformR90", tool_capabilities = { full_punch_interval = 1.0, max_drop_level=2, @@ -167,8 +150,8 @@ minetest.register_tool("es:shovel_emerald", { }) minetest.register_tool("es:shovel_ruby", { description = "Extreme Survival Ruby Shovel", - inventory_image = "default_tool_diamondshovel.png^[colorize:#FF0000:177", - --wield_image = "es_tool_rubyshovel.png^[transformR90", + inventory_image = "es_tool_rubyshovel.png", + wield_image = "es_tool_rubyshovel.png^[transformR90", tool_capabilities = { full_punch_interval = 0.7, max_drop_level=3, @@ -180,8 +163,8 @@ minetest.register_tool("es:shovel_ruby", { }) minetest.register_tool("es:shovel_aikerum", { description = "Extreme Survival Aikerum Shovel", - inventory_image = "default_tool_diamondshovel.png^[colorize:#0000FF:177", - --wield_image = "es_tool_aikerumshovel.png^[transformR90", + inventory_image = "es_tool_aikerumshovel.png", + wield_image = "es_tool_aikerumshovel.png^[transformR90", tool_capabilities = { full_punch_interval = 0.25, max_drop_level=4, @@ -191,3 +174,114 @@ minetest.register_tool("es:shovel_aikerum", { damage_groups = {fleshy=24}, }, }) + + + + + +--[[ +--ARMOR_MOD_NAME = minetest.get_current_modname() +--dofile(minetest.get_modpath(ARMOR_MOD_NAME).."/armor.lua") +local use_3d_armor = minetest.get_modpath("3d_armor") + +--if use_3d_armor then +--ARMOR +minetest.register_tool("es:helmet_emerald", { + description = "Emerald Helmet", + inventory_image = "3d_armor_inv_helmet_emerald.png", + groups = {armor_head = 15, armor_heal = 12, armor_use = 100}, + wear = 0, +}) + +minetest.register_tool("es:helmet_infinium", { + description = "Infinium Helmet", + inventory_image = "3d_armor_inv_helmet_infinium.png", + groups = {armor_head = 20, armor_heal = 15, armor_use = 150}, + wear = 0, +}) + +minetest.register_tool("es:chestplate_emerald", { + description = "Emerald Chestplate", + inventory_image = "3d_armor_inv_chestplate_emerald.png", + groups = {armor_torso = 20, armor_heal = 12, armor_use = 100}, + wear = 0, +}) + +minetest.register_tool("es:chestplate_infinium", { + description = "Infinium Chestplate", + inventory_image = "3d_armor_inv_chestplate_infinium.png", + groups = {armor_torso = 50, armor_heal = 15, armor_use = 150}, + wear = 0, +}) + +minetest.register_tool("es:leggings_emerald", { + description = "Emerald Leggings", + inventory_image = "3d_armor_inv_leggings_emerald.png", + groups = {armor_legs = 20, armor_heal = 12, armor_use = 100}, + wear = 0, +}) + +minetest.register_tool("es:leggings_infinium", { + description = "Infinium Leggings", + inventory_image = "3d_armor_inv_leggings_infinium.png", + groups = {armor_legs = 50, armor_heal = 15, armor_use = 150}, + wear = 0, +}) + +minetest.register_tool("es:boots_emerald", { + description = "Emerald Boots", + inventory_image = "3d_armor_inv_boots_emerald.png", + groups = {armor_feet = 15, armor_heal = 12, armor_use = 100}, + wear = 0, +}) + +minetest.register_tool("es:boots_infinium", { + description = "Infinium Boots", + inventory_image = "3d_armor_inv_boots_infinium.png", + groups = {armor_feet = 30, armor_heal = 15, armor_use = 150}, + wear = 0, +}) + +-- Register crafting recipes: + +local craft_ingreds = { + + infinium = "es:infinium_ingot", + emerald = "es:emerald_crystal", +} + +--end +for k, v in pairs(craft_ingreds) do + minetest.register_craft({ + output = "es:helmet_"..k, + recipe = { + {v, v, v}, + {v, "", v}, + {"", "", ""}, + }, + }) + minetest.register_craft({ + output = "es:chestplate_"..k, + recipe = { + {v, "", v}, + {v, v, v}, + {v, v, v}, + }, + }) + minetest.register_craft({ + output = "es:leggings_"..k, + recipe = { + {v, v, v}, + {v, "", v}, + {v, "", v}, + }, + }) + minetest.register_craft({ + output = "es:boots_"..k, + recipe = { + {v, "", v}, + {v, "", v}, + }, + }) +--end +end]]