cave, skin changes, village spawner
|
@ -291,6 +291,16 @@ awards.register_achievement("award_marchand_de_sable",{
|
|||
})
|
||||
|
||||
-- Join
|
||||
awards.register_achievement("award_welcome",{
|
||||
title = S("Welcome!"),
|
||||
description = ("To spawn a village, find somewhere flat and place the spawner (+X, +Z)"),
|
||||
trigger = {
|
||||
type = "join",
|
||||
target = 1
|
||||
},
|
||||
secret = false
|
||||
})
|
||||
|
||||
awards.register_achievement("award_join2",{
|
||||
title = S("Frequent Visitor"),
|
||||
description = S("Connect to the server 50 times."),
|
||||
|
|
Before Width: | Height: | Size: 3.3 KiB After Width: | Height: | Size: 1.9 KiB |
|
@ -0,0 +1,2 @@
|
|||
Player texture by D00Med
|
||||
liscense: CC-BY-SA 3.0
|
|
@ -1,2 +0,0 @@
|
|||
Player texture by tux_peng
|
||||
liscense: CC-BY-NC-SA 3.0
|
|
@ -2,7 +2,7 @@ minetest.register_on_newplayer(function(player)
|
|||
--print("on_newplayer")
|
||||
if minetest.setting_getbool("give_initial_stuff") then
|
||||
minetest.log("action", "Giving initial stuff to player "..player:get_player_name())
|
||||
player:get_inventory():add_item('main', 'default:sword_wood')
|
||||
player:get_inventory():add_item('main', 'hyrule_mapgen:village_spawner')
|
||||
player:get_inventory():add_item('main', 'xdecor:worktable')
|
||||
end
|
||||
end)
|
||||
|
|
|
@ -5,6 +5,20 @@ if mg_name ~= "v6" then
|
|||
dofile(minetest.get_modpath("hyrule_mapgen").."/mapgen.lua")
|
||||
end
|
||||
|
||||
--village spawner
|
||||
|
||||
minetest.register_craftitem("hyrule_mapgen:village_spawner", {
|
||||
description = "Village Spawner",
|
||||
inventory_image = "hyrule_mapgen_spawner.png",
|
||||
on_place = function(itemstack, placer, pointed_thing)
|
||||
local pos = pointed_thing.above
|
||||
minetest.place_schematic({x=pos.x, y=pos.y-1, z=pos.z}, minetest.get_modpath("hyrule_mapgen").."/schematics/village.mts", 0, {}, true)
|
||||
local obj = minetest.env:add_entity({x=pos.x+14, y=pos.y+2, z=pos.z+24}, "mobs_npc:trader")
|
||||
itemstack:take_item()
|
||||
return itemstack
|
||||
end,
|
||||
})
|
||||
|
||||
--functions
|
||||
hyrule_mapgen = {}
|
||||
|
||||
|
|
|
@ -1418,10 +1418,14 @@ minetest.register_on_newplayer(function(player)
|
|||
if not village_spawned and minetest.get_day_count() == 0 then
|
||||
local name = player:get_player_name()
|
||||
if name == "singleplayer" then
|
||||
minetest.after(2, function()
|
||||
minetest.after(1, function()
|
||||
local pos = player:getpos()
|
||||
minetest.place_schematic({x=pos.x, y=pos.y-1, z=pos.z}, minetest.get_modpath("hyrule_mapgen").."/schematics/village.mts", 0, {}, true)
|
||||
minetest.env:add_entity({x=pos.x+14, y=pos.y+2, z=pos.z+24}, "mobs_npc:trader")
|
||||
minetest.place_schematic({x=pos.x-6, y=pos.y-1, z=pos.z-4}, minetest.get_modpath("hyrule_mapgen").."/schematics/cave.mts", 0, {}, true)
|
||||
local obj = minetest.env:add_entity({x=pos.x-2, y=pos.y+1, z=pos.z}, "mobs_npc:npc_custom")
|
||||
local npc = obj:get_luaentity()
|
||||
npc.xdir = 1
|
||||
npc.item = "default:sword_wood"
|
||||
npc.text = "It's dangerous to go alone, take this!"
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
|
After Width: | Height: | Size: 240 B |
|
@ -26,5 +26,5 @@ CC-BY-SA 3.0 UNPORTED. Created by D00Med
|
|||
|
||||
hyruletools_bomb.b3d, hyruletools_medallion*.png, hyruletools_bombflower.png, hyruletools_bomb.png, hyruletools_bombflower_plant.png, hyruletools_boomer_*.png - CC-BY-SA 3.0 UNPORTED. Created by toby109tt(aka tobyplowy) and D00Med
|
||||
|
||||
hyruletools_ocarina_*.png, hyruletools_gameboy.png, hyruletools_letter_inv_*.png - CC-BY-SA 3.0 UNPORTED. Created by toby109tt(aka tobyplowy)
|
||||
hyruletools_ocarina_*.png, hyruletools_gameboy.png, hyruletools_letter_inv_*.png, hyruletools_bluerupee_ore.png, hyruletools_redrupee_ore.png, hyruletools_greenrupee_ore.png - CC-BY-SA 3.0 UNPORTED. Created by toby109tt(aka tobyplowy)
|
||||
|
||||
|
|
Before Width: | Height: | Size: 172 B After Width: | Height: | Size: 566 B |
Before Width: | Height: | Size: 187 B |
Before Width: | Height: | Size: 182 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 707 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 548 B |
Before Width: | Height: | Size: 186 B After Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 697 B After Width: | Height: | Size: 561 B |
|
@ -206,3 +206,70 @@ mobs:register_mob("mobs_npc:npc_quest", {
|
|||
--mobs:spawn_specific("mobs:npc", {"default:brick"}, {"air"}, 0, 15, 1, 1, 1, 0, 200, true)
|
||||
|
||||
mobs:register_egg("mobs_npc:npc_quest", "Npc (quest)", "hyrule_mapgen_chest.png", 1)
|
||||
|
||||
|
||||
mobs:register_mob("mobs_npc:npc_custom", {
|
||||
type = "npc",
|
||||
passive = false,
|
||||
damage = 3,
|
||||
reach = 4,
|
||||
attack_type = "dogfight",
|
||||
attacks_monsters = false,
|
||||
pathfinding = true,
|
||||
hp_min = 50,
|
||||
hp_max = 60,
|
||||
armor = 90,
|
||||
collisionbox = {-0.35,-1.0,-0.35, 0.35,0.8,0.35},
|
||||
visual = "mesh",
|
||||
mesh = "character.b3d",
|
||||
drawtype = "front",
|
||||
textures = {
|
||||
{"mobs_npc_doomed.png"},
|
||||
{"mobs_npc_toby109tt.png"},
|
||||
{"mobs_npc.png"},
|
||||
{"mobs_npc2.png"}, -- female by nuttmeg20
|
||||
},
|
||||
makes_footstep_sound = true,
|
||||
sounds = {},
|
||||
walk_velocity = 0.00001,
|
||||
run_velocity = 5,
|
||||
jump = false,
|
||||
jumpheight = 0,
|
||||
water_damage = 0,
|
||||
lava_damage = 0,
|
||||
light_damage = 0,
|
||||
view_range = 15,
|
||||
owner = "",
|
||||
order = "stand",
|
||||
fear_height = 3,
|
||||
animation = {
|
||||
speed_normal = 30,
|
||||
speed_run = 30,
|
||||
stand_start = 0,
|
||||
stand_end = 79,
|
||||
walk_start = 168,
|
||||
walk_end = 187,
|
||||
run_start = 168,
|
||||
run_end = 187,
|
||||
punch_start = 200,
|
||||
punch_end = 219,
|
||||
},
|
||||
on_activate = function(self)
|
||||
self.order = "stand"
|
||||
end,
|
||||
on_rightclick = function(self, clicker)
|
||||
local pos = self.object:getpos()
|
||||
if self.item ~= nil and not self.inactive then
|
||||
local xdir = self.xdir or 0
|
||||
local zdir = self.zdir or 0
|
||||
minetest.env:add_item({x=pos.x+xdir, y=pos.y, z=pos.z+zdir}, self.item)
|
||||
self.inactive = true
|
||||
end
|
||||
if self.text ~= nil and not self.spoken then
|
||||
minetest.chat_send_player(clicker:get_player_name(), self.text)
|
||||
self.spoken = true
|
||||
elseif self.text ~= nil then
|
||||
minetest.chat_send_player(clicker:get_player_name(), self.text.."... I've said that already")
|
||||
end
|
||||
end,
|
||||
})
|