Imported from trollstream "ContentDB"
This commit is contained in:
commit
079292d274
10
init.lua
Normal file
10
init.lua
Normal file
@ -0,0 +1,10 @@
|
||||
local register_node = minetest.register_node
|
||||
local register_alias = minetest.register_alias
|
||||
|
||||
|
||||
register_node('supertuxstuff:questionmarkblock', {
|
||||
description = 'Question Mark Block',
|
||||
tiles = { 'question_mark_block_texture.png' },
|
||||
groups = { oddly_breakable_by_hand = 3 },
|
||||
is_ground_content = true
|
||||
})
|
13
models/snowball_model.mtl
Normal file
13
models/snowball_model.mtl
Normal file
@ -0,0 +1,13 @@
|
||||
# Blender MTL File: 'None'
|
||||
# Material Count: 1
|
||||
|
||||
newmtl Material.001
|
||||
Ns 225.000000
|
||||
Ka 1.000000 1.000000 1.000000
|
||||
Kd 0.800000 0.800000 0.800000
|
||||
Ks 0.500000 0.500000 0.500000
|
||||
Ke 0.000000 0.000000 0.000000
|
||||
Ni 1.450000
|
||||
d 1.000000
|
||||
illum 2
|
||||
map_Bump .
|
4438
models/snowball_model.obj
Normal file
4438
models/snowball_model.obj
Normal file
File diff suppressed because it is too large
Load Diff
80
snowball_enemy.lua
Normal file
80
snowball_enemy.lua
Normal file
@ -0,0 +1,80 @@
|
||||
|
||||
local S = mobs.intllib
|
||||
|
||||
mobs:register_mob("supertuxstuff:snowballenemy", {
|
||||
stepheight = 0.6,
|
||||
type = "animal",
|
||||
passive = false,
|
||||
hp_min = 1,
|
||||
hp_max = 1,
|
||||
armor = 200,
|
||||
collisionbox = {-0.2, -1, -0.2, 0.2, -0.8, 0.2},
|
||||
visual = "mesh",
|
||||
mesh = "snowball_model.obj",
|
||||
textures = {
|
||||
{"snowball_enemy_texture.png"},
|
||||
},
|
||||
makes_footstep_sound = false,
|
||||
sounds = {
|
||||
random = "mobs_snowballenemy",
|
||||
},
|
||||
walk_velocity = 1,
|
||||
run_velocity = 1.5,
|
||||
runaway = false,
|
||||
jump = true,
|
||||
water_damage = 1,
|
||||
lava_damage = 1,
|
||||
light_damage = 0,
|
||||
fear_height = 2,
|
||||
on_rightclick = function(self, clicker)
|
||||
mobs:capture_mob(self, clicker, 50, 90, 0, true, "supertuxstuff:snowballenemy")
|
||||
end,
|
||||
--[[
|
||||
do_custom = function(self, dtime)
|
||||
|
||||
self.snowballenemy_timer = (self.snowballenemy_timer or 0) + dtime
|
||||
|
||||
if self.snowballenemy_timer < 1 then return end -- every 1 second
|
||||
|
||||
self.snowballenemy_timer = 0
|
||||
|
||||
local pos = self.object:get_pos()
|
||||
|
||||
print("snowballenemy pos", pos.x, pos.y, pos.z, dtime)
|
||||
|
||||
return false -- return but skip doing rest of API
|
||||
end,
|
||||
]]
|
||||
--[[
|
||||
on_blast = function(obj, damage)
|
||||
print ("--- damage is", damage)
|
||||
print ("--- mob is", obj.object:get_luaentity().name)
|
||||
-- return's do_damage, do_knockback and drops
|
||||
return false, true, {"default:mese"}
|
||||
end,
|
||||
]]
|
||||
})
|
||||
|
||||
|
||||
local function snowballenemy_spawn(self, pos)
|
||||
self = self:get_luaentity()
|
||||
print (self.name, pos.x, pos.y, pos.z)
|
||||
self.hp_max = 100
|
||||
self.health = 100
|
||||
end
|
||||
|
||||
if not mobs.custom_spawn_animal then
|
||||
mobs:spawn({
|
||||
name = "supertuxstuff:snowballenemy",
|
||||
nodes = {"default:dirt_with_snow"},
|
||||
min_light = 3,
|
||||
max_light = 9,
|
||||
interval = 60,
|
||||
chance = 8000,
|
||||
max_height = 0,
|
||||
-- on_spawn = snowballenemy_spawn,
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
mobs:register_egg("supertuxstuff:snowballenemy", S("snowballenemy"), "mobs_snowballenemy_inv.png")
|
BIN
textures/mobs_snowballenemy_inv.png
Normal file
BIN
textures/mobs_snowballenemy_inv.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 414 B |
BIN
textures/question_mark_block_texture.png
Normal file
BIN
textures/question_mark_block_texture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 468 B |
BIN
textures/snowball_enemy_texture.png
Normal file
BIN
textures/snowball_enemy_texture.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 71 KiB |
Loading…
x
Reference in New Issue
Block a user