Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dmobs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Illuna-Minetest
dmobs
Commits
8b68519a
Commit
8b68519a
authored
8 years ago
by
D00Med
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #10 from taikedz/baddies
Baddies use API to despawn; also keep pig
parents
d6315830
a61e5a76
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
baddies.lua
+15
-12
15 additions, 12 deletions
baddies.lua
init.lua
+2
-4
2 additions, 4 deletions
init.lua
with
17 additions
and
16 deletions
baddies.lua
+
15
−
12
View file @
8b68519a
-- Fox
if
dmobs
.
destructive
then
mobs
:
register_mob
(
"dmobs:pig_evil"
,
{
local
pigdef
=
{
type
=
"monster"
,
passive
=
true
,
reach
=
3
,
damage
=
2
,
attack_type
=
"
explode
"
,
attack_type
=
"
dogfight
"
,
explosion_radius
=
2
,
hp_min
=
12
,
hp_max
=
22
,
...
...
@@ -16,10 +14,10 @@ mobs:register_mob("dmobs:pig_evil", {
textures
=
{
{
"dmobs_flying_pig_mean.png"
},
},
jump
=
true
,
fly
=
true
,
fall_speed
=
0
,
stepheight
=
1
.
5
,
jump
=
true
,
fly
=
true
,
fall_speed
=
0
,
stepheight
=
1
.
5
,
blood_texture
=
"mobs_blood.png"
,
visual_size
=
{
x
=
1
,
y
=
1
},
makes_footstep_sound
=
true
,
...
...
@@ -32,8 +30,7 @@ mobs:register_mob("dmobs:pig_evil", {
{
name
=
"mobs:meat_raw"
,
chance
=
2
,
min
=
1
,
max
=
1
},
},
sounds
=
{
random
=
"mobs_pig"
,
explode
=
"tnt_explode"
,
random
=
"mobs_pig"
,
},
do_custom
=
function
(
self
)
if
self
.
state
==
"attack"
then
...
...
@@ -65,12 +62,18 @@ mobs:register_mob("dmobs:pig_evil", {
mobs
:
capture_mob
(
self
,
clicker
,
0
,
5
,
50
,
false
,
nil
)
end
,
})
}
if
dmobs
.
destructive
then
pigdef
.
sounds
.
explode
=
"tnt_explode"
pigdef
.
attack_type
=
"explode"
end
mobs
:
register_mob
(
"dmobs:pig_evil"
,
pigdef
)
mobs
:
register_spawn
(
"dmobs:pig_evil"
,
{
"default:pine_needles"
,
"default:leaves"
},
20
,
10
,
32000
,
2
,
31000
)
mobs
:
register_egg
(
"dmobs:pig_evil"
,
"kamikaze Pig"
,
"wool_pink.png"
,
1
)
end
-- Fox
mobs
:
register_mob
(
"dmobs:fox"
,
{
...
...
This diff is collapsed.
Click to expand it.
init.lua
+
2
−
4
View file @
8b68519a
...
...
@@ -12,11 +12,9 @@ dmobs.dragons = true
-- Enable fireballs/explosions
dmobs
.
destructive
=
false
--
peaceful mobs setting
--
load baddies
if
not
minetest
.
setting_getbool
(
"only_peaceful_mobs"
)
then
dofile
(
minetest
.
get_modpath
(
"dmobs"
)
..
"/baddies.lua"
)
end
dofile
(
minetest
.
get_modpath
(
"dmobs"
)
..
"/baddies.lua"
)
--friendly mobs
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment