11 Commits ef873d8b0b ... ddae4b0660

Author SHA1 Message Date
  xachman ddae4b0660 Merge branch 'master' of notabug.org:NathanS21/Epic into add_rideable_ostrich 4 years ago
  NathanSalapat 866e0312c9 Tweaked lavacooling 4 years ago
  NathanSalapat 58c718a372 fixed orange tree spawning 4 years ago
  NathanSalapat 35206fd654 cleaned up Hangglider mod. 4 years ago
  NathanSalapat 7152a7ae1c armor tweaks 4 years ago
  NathanSalapat 505d29daba printing press checks for space above. 4 years ago
  NathanSalapat 367f364f60 replaced playeranim with headanim. 4 years ago
  NathanSalapat 7a3f08d1bc major overhaul of armor/combat 4 years ago
  NathanSalapat 42493e6de6 fixed leafdecay 4 years ago
  NathanSalapat e63cc75238 Added new armor 4 years ago
  NathanSalapat dbd7fbb5a9 Added MaxHP and mob drops. 4 years ago

+ 50 - 48
mods/arctic_life/penguin.lua

@@ -1,57 +1,59 @@
 mobs:register_mob("arctic_life:penguin", {
-	type = "animal",
-	passive = false,
-	attack_type = "dogfight",
+   type = "animal",
+   passive = false,
+   attack_type = "dogfight",
    group_attack = true,
    reach = 1,
-	damage = 1,
-	hp_min = 5,
-	hp_max = 15,
-	armor = 200,
+   damage = 1,
+   damage_max = 6,
+   damage_chance = 30,
+   hp_min = 5,
+   hp_max = 15,
+   armor = 200,
    fly_in = "default:water_source",
-	collisionbox = {-0.25, -0.4, -0.25, 0.25, 0.3, 0.25},
-	visual = "mesh",
-	mesh = "arctic_life_penguin.b3d",
-	drawtype = "front",
-	textures = {
-		{"arctic_life_penguin.png"},
-		{"arctic_life_penguin_tux.png"},
-	},
-	blood_texture = "mobs_blood.png",
-	visual_size = {x=8,y=8},
-	makes_footstep_sound = true,
-	sounds = {
-		random = "penguin_chirrup",
-	},
-	-- speed and jump
-	walk_velocity = 1,
-	run_velocity = 2,
-	jump = true,
-	jump_height = 1,
-	stepheight = 1.1,
-	floats = 0,
-	-- drops raw meat when dead
-	drops = {
-		{name = "mobs:meat_raw", chance = 1, min = 1, max = 4},
+   collisionbox = {-0.25, -0.4, -0.25, 0.25, 0.3, 0.25},
+   visual = "mesh",
+   mesh = "arctic_life_penguin.b3d",
+   drawtype = "front",
+   textures = {
+      {"arctic_life_penguin.png"},
+      {"arctic_life_penguin_tux.png"},
+   },
+   blood_texture = "mobs_blood.png",
+   visual_size = {x=8,y=8},
+   makes_footstep_sound = true,
+   sounds = {
+      random = "penguin_chirrup",
+   },
+   -- speed and jump
+   walk_velocity = 1,
+   run_velocity = 2,
+   jump = true,
+   jump_height = 1,
+   stepheight = 1.1,
+   floats = 0,
+   -- drops raw meat when dead
+   drops = {
+      {name = "mobs:meat_raw", chance = 1, min = 1, max = 4},
       {name = 'bonemeal:bone', chance = 2, min = 1, max = 2},
-	},
-	-- damaged by
-	water_damage = 0,
-	lava_damage = 5,
-	light_damage = 0,
-	-- model animation
-	animation = {
-		speed_normal = 15,	speed_run = 15,
-		stand_start = 0,		stand_end = 60, -- head down/up
-		walk_start = 150,		walk_end = 170, -- walk
-		run_start = 150,		run_end = 170, -- walk
-		punch_start = 70,		punch_end = 140, -- attack
+   },
+   -- damaged by
+   water_damage = 0,
+   lava_damage = 5,
+   light_damage = 0,
+   -- model animation
+   animation = {
+      speed_normal = 15,   speed_run = 15,
+      stand_start = 0,      stand_end = 60, -- head down/up
+      walk_start = 150,      walk_end = 170, -- walk
+      run_start = 150,      run_end = 170, -- walk
+      punch_start = 70,      punch_end = 140, -- attack
       fly_start = 171,     fly_end = 201, -- swimming
-	},
-	follow = "fishing:fish_raw", view_range = 7,
-	replace_rate = 50,
-	replace_what = {"group:flora"},
-	replace_with = "air",
+   },
+   follow = "fishing:fish_raw", view_range = 7,
+   replace_rate = 50,
+   replace_what = {"group:flora"},
+   replace_with = "air",
 })
 
 mobs:register_spawn("arctic_life:penguin", {"default:dirt_with_snow", "default:snowblock"}, 20, 0, 20000, 1, 600)

+ 47 - 45
mods/arctic_life/walrus.lua

@@ -1,53 +1,55 @@
 mobs:register_mob("arctic_life:walrus", {
-	type = "animal",
-	passive = false,
-	attack_type = "dogfight",
+   type = "animal",
+   passive = false,
+   attack_type = "dogfight",
    reach = 1,
-	damage = 5,
-	hp_min = 15,
-	hp_max = 45,
-	armor = 200,
-	collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.4, 0.35},
-	visual = "mesh",
-	mesh = "arctic_life_walrus.b3d",
-	drawtype = "front",
-	textures = {
-		{"arctic_life_walrus1.png"},
-		{"arctic_life_walrus2.png"},
-	},
-	blood_texture = "mobs_blood.png",
-	visual_size = {x=10,y=10},
-	makes_footstep_sound = false,
-	sounds = {
-		random = "walrus_random.ogg",
+   damage = 5,
+   damage_max = 8,
+   damage_chance = 100,
+   hp_min = 15,
+   hp_max = 45,
+   armor = 200,
+   collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.4, 0.35},
+   visual = "mesh",
+   mesh = "arctic_life_walrus.b3d",
+   drawtype = "front",
+   textures = {
+      {"arctic_life_walrus1.png"},
+      {"arctic_life_walrus2.png"},
+   },
+   blood_texture = "mobs_blood.png",
+   visual_size = {x=10,y=10},
+   makes_footstep_sound = false,
+   sounds = {
+      random = "walrus_random.ogg",
       war_cry = 'walrus_war_cry.ogg',
       attack = 'walrus_attack.ogg'
-	},
-	-- speed and jump
-	walk_velocity = 1,
-	run_velocity = 2,
-	jump = true,
-	jump_height = 1,
-	stepheight = 1.1,
-	floats = 1,
-	-- drops raw meat when dead
-	drops = {
-		{name = "mobs:meat_raw", chance = 1, min = 2, max = 5},
+   },
+   -- speed and jump
+   walk_velocity = 1,
+   run_velocity = 2,
+   jump = true,
+   jump_height = 1,
+   stepheight = 1.1,
+   floats = 1,
+   -- drops raw meat when dead
+   drops = {
+      {name = "mobs:meat_raw", chance = 1, min = 2, max = 5},
       {name = 'bonemeal:bone', chance = 2, min = 1, max = 3},
-	},
-	-- damaged by
-	water_damage = 1,
-	lava_damage = 5,
-	light_damage = 0,
-	-- model animation
-	animation = {
-		speed_normal = 15,	speed_run = 15,
-		stand_start = 0,		stand_end = 50, -- head down/up
-		walk_start = 55,		walk_end = 95, -- walk
-		run_start = 55,		run_end = 95, -- walk
-		punch_start = 100,		punch_end = 145, -- attack
-	},
-	follow = {"fishing:fish_raw", "mobs_fish:clownfish", "fishing:pike"},
+   },
+   -- damaged by
+   water_damage = 1,
+   lava_damage = 5,
+   light_damage = 0,
+   -- model animation
+   animation = {
+      speed_normal = 15,   speed_run = 15,
+      stand_start = 0,      stand_end = 50, -- head down/up
+      walk_start = 55,      walk_end = 95, -- walk
+      run_start = 55,      run_end = 95, -- walk
+      punch_start = 100,      punch_end = 145, -- attack
+   },
+   follow = {"fishing:fish_raw", "mobs_fish:clownfish", "fishing:pike"},
    view_range = 7,
 })
 

+ 1 - 1
mods/bones/init.lua

@@ -182,7 +182,6 @@ local function is_all_empty(player_inv)
 end
 
 minetest.register_on_dieplayer(function(player)
-   print 'player died, bones reporting in.'
 
 	local bones_mode = minetest.settings:get("bones_mode") or "bones"
 	if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
@@ -193,6 +192,7 @@ minetest.register_on_dieplayer(function(player)
 	local player_name = player:get_player_name()
 	local pos = vector.round(player:get_pos())
 	local pos_string = minetest.pos_to_string(pos)
+   minetest.add_entity(pos, 'zombies:normal')
 
 	-- return if keep inventory set or in creative mode
 	if bones_mode == "keep" or (creative and creative.is_enabled_for

+ 10 - 1
mods/default/functions.lua

@@ -138,7 +138,16 @@ default.cool_lava = function(pos, node)
 	if node.name == "default:lava_source" then
 		minetest.set_node(pos, {name = "default:obsidian"})
 	else -- Lava flowing
-		minetest.set_node(pos, {name = "default:stone"})
+      local chance = math.random(7)
+      if chance == 1 then
+         minetest.set_node(pos, {name = "nether:basalt"})
+      elseif chance == 2 then
+         minetest.set_node(pos, {name = "nether:lava_crust"})
+      elseif chance == 3 or chance == 4 then
+         minetest.set_node(pos, {name = "darkage:basalt"})
+      else
+		   minetest.set_node(pos, {name = "default:stone"})
+      end
 	end
 	minetest.sound_play("default_cool_lava",
 		{pos = pos, max_hear_distance = 16, gain = 0.25}, true)

+ 45 - 43
mods/desert_life/armadillo.lua

@@ -2,51 +2,53 @@
 local S = mobs.intllib
 
 mobs:register_mob("desert_life:armadillo", {
-	type = "animal",
-	passive = false,
-	attack_type = "dogfight",
-	group_attack = true,
-	reach = 2,
-	damage = 1,
-	hp_min = 5,
-	hp_max = 10,
-	armor = 75,
-	collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.0, 0.35},
-	visual = "mesh",
-	mesh = "dl_armadillo.b3d",
-	textures = {
-		{'dl_armadillo_1.png'},
+   type = "animal",
+   passive = false,
+   attack_type = "dogfight",
+   group_attack = true,
+   reach = 2,
+   damage = 1,
+   damage_max = 10,
+   damage_chance = 150,
+   hp_min = 5,
+   hp_max = 10,
+   armor = 75,
+   collisionbox = {-0.35, -0.5, -0.35, 0.35, 0.0, 0.35},
+   visual = "mesh",
+   mesh = "dl_armadillo.b3d",
+   textures = {
+      {'dl_armadillo_1.png'},
         {'dl_armadillo_2.png'},
-	},
+   },
     visual_size = {x=9, y=9},
-	makes_footstep_sound = true,
---	sounds = {
---		random = "mobs_chicken",
---	},
-	walk_velocity = 1,
-	run_velocity = 3,
-	jump = true,
-	drops = {
-		{name = "mobs:meat_raw", chance = 1, min = 1, max =1},
-	},
-	water_damage = 1,
-	lava_damage = 5,
-	light_damage = 0,
-	fall_damage = 0,
-	fall_speed = -8,
-	fear_height = 5,
-	animation = {
-		speed_normal = 2,
-		speed_run = 8,
-		stand_start = 45,
-		stand_end = 70,
-		walk_start = 0,
-		walk_end = 40,
-		punch_start = 75,
-		punch_end = 95,
-	},
-	follow = {"farming:seed_wheat", "farming:seed_cotton"},
-	view_range = 5,
+   makes_footstep_sound = true,
+--   sounds = {
+--      random = "mobs_chicken",
+--   },
+   walk_velocity = 1,
+   run_velocity = 3,
+   jump = true,
+   drops = {
+      {name = "mobs:meat_raw", chance = 1, min = 1, max =1},
+   },
+   water_damage = 1,
+   lava_damage = 5,
+   light_damage = 0,
+   fall_damage = 0,
+   fall_speed = -8,
+   fear_height = 5,
+   animation = {
+      speed_normal = 2,
+      speed_run = 8,
+      stand_start = 45,
+      stand_end = 70,
+      walk_start = 0,
+      walk_end = 40,
+      punch_start = 75,
+      punch_end = 95,
+   },
+   follow = {"farming:seed_wheat", "farming:seed_cotton"},
+   view_range = 5,
    replace_what = {'group:flora', 'group:plant'},
    replace_with = 'air',
    replace_rate = 10,

+ 50 - 54
mods/desert_life/ostrich.lua

@@ -1,58 +1,54 @@
-
-local S = mobs.intllib
-
 mobs:register_mob("desert_life:ostrich", {
-	type = "animal",
-	passive = false,
-	attack_type = "dogfight",
-	group_attack = true,
-	reach = 2,
-	damage = 2,
-	hp_min = 5,
-	hp_max = 10,
-	armor = 200,
-	collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.75, 0.4},
-	visual = "mesh",
-	mesh = "dl_ostrich.b3d",
-	textures = {
-		{'dl_ostrich.png'},
-	},
-    visual_size = {x=9, y=9},
-	makes_footstep_sound = true,
---	sounds = {
---		random = "mobs_chicken",
---	},
-	walk_velocity = 1,
-	run_velocity = 3,
-	jump = true,
-	drops = {
-		{name = "mobs:chicken_raw", chance = 1, min = 2, max = 6},
-	},
-	water_damage = 1,
-	lava_damage = 5,
-	light_damage = 0,
-	fall_damage = 0,
-	fall_speed = -8,
-	fear_height = 5,
-	animation = {
-		speed_normal = 15,
-		speed_run = 30,
-		stand_start = 0,
-		stand_end = 60,
-		walk_start = 180,
-		walk_end = 229,
-		run_start = 180,
-		run_end = 229,
-		punch_start = 65,
-		punch_end = 90,
-		punch2_start = 95,
-		punch2_end = 125,
-	},
-	follow = {"farming:seed_wheat", "farming:seed_cotton"},
-	view_range = 5,
-    replace_what = {'group:flora', 'group:plant'},
-    replace_with = 'air',
-	replace_rate = 1,
+   type = "animal",
+   passive = false,
+   attack_type = "dogfight",
+   group_attack = true,
+   reach = 2,
+   damage = 2,
+   damage_max = 8,
+   damage_chance = 80,
+   hp_min = 5,
+   hp_max = 10,
+   armor = 200,
+   collisionbox = {-0.4, -0.5, -0.4, 0.4, 0.75, 0.4},
+   visual = "mesh",
+   mesh = "dl_ostrich.b3d",
+   textures = {
+      {'dl_ostrich.png'},
+   },
+   visual_size = {x=9, y=9},
+   makes_footstep_sound = true,
+   walk_velocity = 1,
+   run_velocity = 3,
+   jump = true,
+   drops = {
+      {name = "mobs:chicken_raw", chance = 1, min = 2, max = 6},
+   },
+   water_damage = 1,
+   lava_damage = 5,
+   light_damage = 0,
+   fall_damage = 0,
+   fall_speed = -8,
+   fear_height = 5,
+   animation = {
+      speed_normal = 15,
+      speed_run = 30,
+      stand_start = 0,
+      stand_end = 60,
+      walk_start = 180,
+      walk_end = 229,
+      run_start = 180,
+      run_end = 229,
+      punch_start = 65,
+      punch_end = 90,
+      punch2_start = 95,
+      punch2_end = 125,
+   },
+   follow = {"farming:seed_wheat", "farming:seed_cotton"},
+   view_range = 5,
+   replace_what = {'group:flora', 'group:plant'},
+   replace_with = 'air',
+   replace_rate = 1,
 	do_custom = function(self, dtime)
 
 		-- set needed values if not already present

+ 2 - 0
mods/dungeon_loot/loot.lua

@@ -37,6 +37,8 @@ dungeon_loot.registered_loot = {
    {name = "stations:scroll_chitin", chance = 0.6},
    {name = "stations:scroll_sulfur_dust", chance = 0.6},
    {name = "stations:scroll_poison", chance = 0.2},
+   {name = "stations:scroll_lifeforce_potion", chance = 0.01},
+   {name = "stations:scroll_lifeforce_potion2", chance = 0.09},
 
    --illuminati
    {name = "illuminati:core_off", chance = 0.1},

+ 4 - 0
mods/env_sounds/README.txt

@@ -11,3 +11,7 @@ Authors of media (sounds)
 Yuval (CC0 1.0)
 https://freesound.org/people/Yuval/sounds/197023/
   env_sounds_water.*.ogg
+
+Halion (CC0 1.0)
+https://freesound.org/people/Halion/sounds/17785/
+  env_sounds_lava.*.ogg

+ 76 - 26
mods/env_sounds/init.lua

@@ -1,11 +1,41 @@
 -- Parameters
 
-local radius = 8 -- Water node search radius around player
+-- Node search radius around player
+local radius = 8
+
+local allsounds = {
+	["env_sounds_water"] = {
+		trigger = {"default:water_flowing", "default:river_water_flowing"},
+		base_volume = 0.04,
+		max_volume = 0.4,
+		per_node = 0.004,
+	},
+	["env_sounds_lava"] = {
+		trigger = {"default:lava_source", "default:lava_flowing"},
+		base_volume = 0,
+		max_volume = 0.6,
+		per_node = {
+			["default:lava_source"] = 0.008,
+			["default:lava_flowing"] = 0.002,
+		},
+	},
+}
+
+if minetest.settings:get_bool("river_source_sounds") then
+	table.insert(allsounds["env_sounds_water"].trigger,
+		"default:river_water_source")
+end
+
 
+-- Cache the union of all trigger nodes
 
+local cache_triggers = {}
 
-local river_source_sounds = minetest.settings:get_bool("river_source_sounds")
+for sound, def in pairs(allsounds) do
+	for _, name in ipairs(def.trigger) do
+		table.insert(cache_triggers, name)
+	end
+end
 
 
 -- Update sound for player
@@ -13,39 +43,57 @@ local river_source_sounds = minetest.settings:get_bool("river_source_sounds")
 local function update_sound(player)
 	local player_name = player:get_player_name()
 	local ppos = player:get_pos()
+	ppos = vector.add(ppos, player:get_properties().eye_height)
 	local areamin = vector.subtract(ppos, radius)
 	local areamax = vector.add(ppos, radius)
-	local water_nodes = {"default:water_flowing", "default:river_water_flowing"}
-	if river_source_sounds then
-		table.insert(water_nodes, "default:river_water_source")
-	end
-	local wpos, _ = minetest.find_nodes_in_area(areamin, areamax, water_nodes)
-	local waters = #wpos
-	if waters == 0 then
+
+	local pos = minetest.find_nodes_in_area(areamin, areamax, cache_triggers, true)
+	if next(pos) == nil then -- If table empty
 		return
 	end
-
-	-- Find average position of water positions
-	local wposav = vector.new()
-	for _, pos in ipairs(wpos) do
-		wposav.x = wposav.x + pos.x
-		wposav.y = wposav.y + pos.y
-		wposav.z = wposav.z + pos.z
+	for sound, def in pairs(allsounds) do
+		-- Find average position
+		local posav = {0, 0, 0}
+		local count = 0
+		for _, name in ipairs(def.trigger) do
+			if pos[name] then
+				for _, p in ipairs(pos[name]) do
+					posav[1] = posav[1] + p.x
+					posav[2] = posav[2] + p.y
+					posav[3] = posav[3] + p.z
+				end
+				count = count + #pos[name]
+			end
+		end
+
+		if count > 0 then
+			posav = vector.new(posav[1] / count, posav[2] / count,
+				posav[3] / count)
+
+			-- Calculate gain
+			local gain = def.base_volume
+			if type(def.per_node) == 'table' then
+				for name, multiplier in pairs(def.per_node) do
+					if pos[name] then
+						gain = gain + #pos[name] * multiplier
+					end
+				end
+			else
+				gain = gain + count * def.per_node
+			end
+			gain = math.min(gain, def.max_volume)
+
+			minetest.sound_play(sound, {
+				pos = posav,
+				to_player = player_name,
+				gain = gain,
+			}, true)
+		end
 	end
-	wposav = vector.divide(wposav, waters)
-
-	minetest.sound_play(
-		"env_sounds_water",
-		{
-			pos = wposav,
-			to_player = player_name,
-			gain = math.min(0.04 + waters * 0.004, 0.4),
-		}
-	)
 end
 
 
+-- Update sound when player joins
 
 minetest.register_on_joinplayer(function(player)
 	update_sound(player)

+ 0 - 0
mods/env_sounds/sounds/env_sounds_lava.1.ogg


Some files were not shown because too many files changed in this diff