mirror of
				https://github.com/ElCeejo/animalia
				synced 2025-11-04 04:03:05 +01:00 
			
		
		
		
	More Settings
This commit is contained in:
		
							parent
							
								
									85c1493c85
								
							
						
					
					
						commit
						d41679d41d
					
				@ -9,6 +9,8 @@ local find_string = mob_core.find_val
 | 
			
		||||
 | 
			
		||||
local creative = minetest.settings:get_bool("creative_mode")
 | 
			
		||||
 | 
			
		||||
local fancy_step = minetest.settings:get_bool("animalia_fancy_step")
 | 
			
		||||
 | 
			
		||||
----------
 | 
			
		||||
-- Math --
 | 
			
		||||
----------
 | 
			
		||||
@ -596,6 +598,7 @@ local function vec_center(vec)
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local function do_step(self, moveresult)
 | 
			
		||||
    if not fancy_step then return end
 | 
			
		||||
    local pos = mobkit.get_stand_pos(self)
 | 
			
		||||
    local width = hitbox(self)[4] - 0.1
 | 
			
		||||
    if not self._step then
 | 
			
		||||
@ -644,9 +647,9 @@ function animalia.on_step(self, dtime, moveresult)
 | 
			
		||||
        table.remove(self.target_blacklist, 1)
 | 
			
		||||
    end
 | 
			
		||||
    if self.caught_with_lasso then
 | 
			
		||||
        if self.lasso_player
 | 
			
		||||
        if self.point_to
 | 
			
		||||
        and mobkit.is_alive(self) then
 | 
			
		||||
            local player = self.lasso_player
 | 
			
		||||
            local player = self.point_to
 | 
			
		||||
            local pos = mobkit.get_stand_pos(self)
 | 
			
		||||
            pos.y = pos.y + (self.height * 0.5)
 | 
			
		||||
            local ppos = player:get_pos()
 | 
			
		||||
@ -672,7 +675,7 @@ function animalia.on_step(self, dtime, moveresult)
 | 
			
		||||
            if player:get_wielded_item():get_name() ~= "animalia:lasso"
 | 
			
		||||
            or vector.distance(pos, ppos) > 20 then
 | 
			
		||||
                self.caught_with_lasso = nil
 | 
			
		||||
                self.lasso_player = nil
 | 
			
		||||
                self.point_to = nil
 | 
			
		||||
                if self.lasso_visual then
 | 
			
		||||
                    self.lasso_visual:remove()
 | 
			
		||||
                    self.lasso_visual = nil
 | 
			
		||||
 | 
			
		||||
@ -41,7 +41,7 @@ minetest.register_on_mods_loaded(function()
 | 
			
		||||
					end
 | 
			
		||||
				elseif turf:find("litter") then
 | 
			
		||||
					if heat >= 40
 | 
			
		||||
					and humidity >= 60 then
 | 
			
		||||
					and humidity >= 80 then
 | 
			
		||||
						table.insert(animalia.tropical_biomes, name)
 | 
			
		||||
					else
 | 
			
		||||
						table.insert(animalia.temperate_biomes, name)
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										12
									
								
								init.lua
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								init.lua
									
									
									
									
									
								
							@ -3,7 +3,7 @@ better_fauna = animalia
 | 
			
		||||
 | 
			
		||||
animalia.mobkit_mobs = {}
 | 
			
		||||
animalia.walkable_nodes = {}
 | 
			
		||||
animalia.spawn_interval = 60
 | 
			
		||||
animalia.spawn_interval = tonumber(minetest.settings:get("animalia_spawn_int")) or 60
 | 
			
		||||
animalia.mobs = {}
 | 
			
		||||
 | 
			
		||||
minetest.register_on_mods_loaded(function()
 | 
			
		||||
@ -28,6 +28,14 @@ if minetest.has_feature("object_step_has_moveresult") then
 | 
			
		||||
	animalia.frame_blend = 0.3
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
local fancy_step = minetest.settings:get_bool("animalia_fancy_step")
 | 
			
		||||
 | 
			
		||||
local stepheight = 1.1
 | 
			
		||||
 | 
			
		||||
if fancy_step then
 | 
			
		||||
	stepheight = 0.1
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
function animalia.register_mob(name, def)
 | 
			
		||||
	minetest.register_entity("animalia:".. name, {
 | 
			
		||||
		physical = true,
 | 
			
		||||
@ -59,7 +67,7 @@ function animalia.register_mob(name, def)
 | 
			
		||||
		buoyancy = def.buoyancy or 0.25,
 | 
			
		||||
		max_speed = def.speed,
 | 
			
		||||
		jump_height = def.jump_height or 1.1,
 | 
			
		||||
		stepheight = def.stepheight or 0,
 | 
			
		||||
		stepheight = stepheight,
 | 
			
		||||
		max_fall = def.max_fall or 2,
 | 
			
		||||
		-- Attributes
 | 
			
		||||
		sounds = def.sounds,
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										2
									
								
								mod.conf
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								mod.conf
									
									
									
									
									
								
							@ -1,4 +1,4 @@
 | 
			
		||||
name = animalia
 | 
			
		||||
depends = mobkit, mob_core
 | 
			
		||||
optional_depends = default
 | 
			
		||||
description = Basic Fauna for Minetest Game
 | 
			
		||||
description = Adds useful Animals for food, ambiance, and more
 | 
			
		||||
 | 
			
		||||
@ -4,8 +4,14 @@ chunk_spawn_add_int (Chunk Spawning Addition Interval) float 64
 | 
			
		||||
#    How often (in seconds) the spawn queue is executed and cleared
 | 
			
		||||
chunk_spawn_queue_int (Chunk Spawning Queue Execution Interval) float 16
 | 
			
		||||
 | 
			
		||||
#    How often (in seconds) mob spawns are attempted (higher number means less spawning)
 | 
			
		||||
animalia_spawn_int (Spawn Interval) float 60
 | 
			
		||||
 | 
			
		||||
#    If true, mobs will spawn in the wild
 | 
			
		||||
spawn_mobs (Spawn Mobs) bool true
 | 
			
		||||
 | 
			
		||||
#    If true, items from mobs_redo and mobs_animal will be converted to Animalia items
 | 
			
		||||
convert_redo_items(Convert Mobs Redo Items) bool false
 | 
			
		||||
convert_redo_items (Convert Mobs Redo Items) bool false
 | 
			
		||||
 | 
			
		||||
#    If true, mobs will do a small hop to step up blocks
 | 
			
		||||
animalia_fancy_step (Fancy Stepping) bool true
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user