Update 0.7

This commit is contained in:
ElCeejo 2024-01-10 17:30:54 -08:00
parent 9bafed85ea
commit 05e7a125ed
16 changed files with 442 additions and 22 deletions

View file

@ -65,7 +65,7 @@ creatura.register_mob("animalia:bat", {
stand = {range = {x = 1, y = 40}, speed = 10, frame_blend = 0.3, loop = true},
walk = {range = {x = 51, y = 69}, speed = 30, frame_blend = 0.3, loop = true},
fly = {range = {x = 81, y = 99}, speed = 80, frame_blend = 0.3, loop = true},
cling = {range = {x = 110, y = 110}, speed = 1, frame_blend = 0, loop = false}
latch_ceiling = {range = {x = 110, y = 110}, speed = 1, frame_blend = 0, loop = false}
},
follow = {
"butterflies:butterfly_red",
@ -77,7 +77,7 @@ creatura.register_mob("animalia:bat", {
flee_puncher = true,
catch_with_net = true,
catch_with_lasso = false,
roost_action = animalia.action_cling,
roost_action = animalia.action_latch,
-- Functions
utility_stack = {

125
mobs/bear.lua Normal file
View file

@ -0,0 +1,125 @@
----------
-- Bear --
----------
creatura.register_mob("animalia:grizzly_bear", {
-- Engine Props
visual_size = {x = 10, y = 10},
mesh = "animalia_bear.b3d",
textures = {
"animalia_bear_grizzly.png"
},
makes_footstep_sound = true,
-- Creatura Props
max_health = 20,
armor_groups = {fleshy = 100},
damage = 6,
speed = 4,
tracking_range = 10,
despawn_after = 1000,
max_fall = 3,
stepheight = 1.1,
sounds = {
random = {
name = "animalia_bear",
gain = 0.5,
distance = 8
},
hurt = {
name = "animalia_bear_hurt",
gain = 0.5,
distance = 8
},
death = {
name = "animalia_bear_death",
gain = 0.5,
distance = 8
}
},
hitbox = {
width = 0.5,
height = 1
},
animations = {
stand = {range = {x = 1, y = 59}, speed = 10, frame_blend = 0.3, loop = true},
walk = {range = {x = 61, y = 79}, speed = 10, frame_blend = 0.3, loop = true},
run = {range = {x = 81, y = 99}, speed = 20, frame_blend = 0.3, loop = true},
melee = {range = {x = 101, y = 120}, speed = 30, frame_blend = 0.3, loop = false}
},
follow = {
"group:food_berry",
"group:food_fish"
},
drops = {
{name = "animalia:pelt_bear", min = 1, max = 3, chance = 1}
},
fancy_collide = false,
-- Behavior Parameters
attacks_players = true,
-- Animalia Parameters
catch_with_net = true,
catch_with_lasso = true,
head_data = {
offset = {x = 0, y = 0.35, z = 0.0},
pitch_correction = -45,
pivot_h = 0.75,
pivot_v = 1
},
-- Functions
utility_stack = {
animalia.mob_ai.basic_wander,
animalia.mob_ai.swim_seek_land,
animalia.mob_ai.basic_seek_food,
animalia.mob_ai.basic_attack,
animalia.mob_ai.basic_breed
},
on_eat_drop = function(self)
local feed_no = (self.feed_no or 0) + 1
if feed_no >= 5 then
feed_no = 0
if self.breeding then return false end
if self.breeding_cooldown <= 0 then
self.breeding = true
self.breeding_cooldown = 60
animalia.particle_spawner(self.stand_pos, "heart.png", "float")
end
self._despawn = self:memorize("_despawn", false)
self.despawn_after = self:memorize("despawn_after", false)
end
self.feed_no = feed_no
end,
activate_func = function(self)
animalia.initialize_api(self)
animalia.initialize_lasso(self)
end,
step_func = function(self)
animalia.step_timers(self)
animalia.head_tracking(self, 0.75, 0.75)
animalia.do_growth(self, 60)
animalia.update_lasso_effects(self)
animalia.random_sound(self)
end,
death_func = function(self)
if self:get_utility() ~= "animalia:die" then
self:initiate_utility("animalia:die", self)
end
end,
on_punch = animalia.punch
})
creatura.register_spawn_item("animalia:grizzly_bear", {
col1 = "64361d",
col2 = "2c0d03"
})

View file

@ -99,7 +99,7 @@ creatura.register_mob("animalia:cat", {
animalia.mob_ai.swim_seek_land,
animalia.mob_ai.cat_seek_vessel,
animalia.mob_ai.cat_stay,
--animalia.mob_ai.cat_play
animalia.mob_ai.cat_play_with_owner,
animalia.mob_ai.cat_follow_owner,
animalia.mob_ai.basic_attack,
animalia.mob_ai.basic_breed

View file

@ -211,7 +211,7 @@ creatura.register_mob("animalia:horse", {
walk = {range = {x = 70, y = 89}, speed = 20, frame_blend = 0.3, loop = true},
run = {range = {x = 101, y = 119}, speed = 40, frame_blend = 0.3, loop = true},
punch_aoe = {range = {x = 170, y = 205}, speed = 30, frame_blend = 0.2, loop = false},
rear = {range = {x = 130, y = 160}, speed = 20, frame_blend = 0.2, loop = false},
rear = {range = {x = 130, y = 160}, speed = 20, frame_blend = 0.1, loop = false},
eat = {range = {x = 210, y = 240}, speed = 30, frame_blend = 0.3, loop = false}
},
follow = animalia.food_wheat,
@ -371,7 +371,7 @@ creatura.register_mob("animalia:horse", {
local owner = self.owner
local name = clicker and clicker:get_player_name()
if owner and name ~= owner then return end
if not owner or name ~= owner then return end
if animalia.set_nametag(self, clicker) then
return

View file

@ -30,7 +30,8 @@ creatura.register_mob("animalia:opossum", {
stand = {range = {x = 1, y = 59}, speed = 10, frame_blend = 0.3, loop = true},
walk = {range = {x = 70, y = 89}, speed = 30, frame_blend = 0.3, loop = true},
run = {range = {x = 100, y = 119}, speed = 45, frame_blend = 0.3, loop = true},
feint = {range = {x = 130, y = 130}, speed = 45, frame_blend = 0.3, loop = false}
feint = {range = {x = 130, y = 130}, speed = 45, frame_blend = 0.3, loop = false},
clean_crop = {range = {x = 171, y = 200}, speed = 15, frame_blend = 0.2, loop = false}
},
follow = {
"animalia:song_bird_egg",
@ -62,6 +63,7 @@ creatura.register_mob("animalia:opossum", {
animalia.mob_ai.swim_seek_land,
animalia.mob_ai.basic_attack,
animalia.mob_ai.opossum_feint,
animalia.mob_ai.opossum_seek_crop,
animalia.mob_ai.basic_seek_food,
animalia.mob_ai.tamed_follow_owner,
animalia.mob_ai.basic_breed