Added more stone carving stuff.

master
Nathan Salapat 2020-10-24 10:44:25 -05:00
parent d469e6db0d
commit f77ded606c
43 changed files with 407 additions and 140 deletions

View File

@ -69,9 +69,13 @@ bows.register_arrow('bolt_exploding',{
{'bows:bolt_3', 'tnt:gunpowder_stick'}
},
on_hit_node = function(self, pos, user, arrow_pos)
if self.node.name ~= '' and not minetest.is_protected(pos, user:get_player_name()) then
print (self.node.name)
tnt.boom(vector.round(pos), {radius = 2, damage_radius = 4})
local player_name = user:get_player_name()
if minetest.check_player_privs(player_name, { fire = true }) then
if self.node.name ~= '' and not minetest.is_protected(pos, player_name) then
tnt.boom(vector.round(pos), {radius = 2, damage_radius = 4})
end
else
minetest.chat_send_player(player_name, 'You need the fire priv for this arrow to work!')
end
end,
})

View File

@ -111,7 +111,6 @@ bows.shoot = function(itemstack, user, pointed_thing)
local ar = bows.registered_bows[name].uses
local wear = bows.registered_bows[name].uses
local arrow_speed = bows.registered_arrows[meta.arrow].speed
print ('arrow speed is '..arrow_speed)
local level = bows.registered_bows[name].level + arrow_speed
bows.tmp = {}
bows.tmp.arrow = meta.arrow

View File

@ -1,4 +1,15 @@
local MP = minetest.get_modpath(minetest.get_current_modname())
--dofile(MP.."/crossbow.lua")
dofile(MP.."/battleaxe.lua")
minetest.register_craftitem('castle_weapons:crossbow', {
description = 'Crossbow',
inventory_image = 'castle_crossbow_inv1.png',
})
minetest.register_craft({
output = 'bows:crossbow',
recipe = {
{'castle_weapons:crossbow',},
}
})

View File

@ -45,7 +45,7 @@ minetest.register_node('desert_life:barrel_cacti_'..num..'_sp', {
description = desc,
drawtype = 'mesh',
mesh = 'dl_barrel_cacti_'..num..'.obj',
tiles = {name='dl_barrel_cacti.png'},
tiles = {'dl_barrel_cacti.png'},
drop = 'desert_life:barrel_cacti_'..num,
groups = {oddly_breakable_by_hand=3, choppy=1, dl_bc=1, not_in_creative_inventory=1},
paramtype = 'light',

View File

@ -72,7 +72,7 @@ minetest.register_node('drinks:juice_press', {
_doc_items_usagehelp = "Right-click the press to access inventory and begin juicing.",
drawtype = 'mesh',
mesh = 'drinks_press.obj',
tiles = {name='drinks_press.png'},
tiles = {'drinks_press.png'},
groups = {choppy=2, dig_immediate=2,},
paramtype = 'light',
paramtype2 = 'facedir',
@ -389,7 +389,7 @@ minetest.register_node('drinks:liquid_barrel', {
_doc_items_usagehelp = "Add or remove liquids from the barrel using buckets, bottles, or cups.",
drawtype = 'mesh',
mesh = 'drinks_liquid_barrel.obj',
tiles = {name='drinks_barrel.png'},
tiles = {'drinks_barrel.png'},
groups = {choppy=2, dig_immediate=2,},
paramtype = 'light',
paramtype2 = 'facedir',
@ -513,7 +513,7 @@ minetest.register_node('drinks:liquid_silo', {
_doc_items_usagehelp = "Add or remove liquids from the silo using buckets, bottles, or cups.",
drawtype = 'mesh',
mesh = 'drinks_silo.obj',
tiles = {name='drinks_silo.png'},
tiles = {'drinks_silo.png'},
groups = {choppy=2, dig_immediate=2,},
paramtype = 'light',
paramtype2 = 'facedir',

View File

@ -13,7 +13,9 @@ doc.add_entry("epic_server", "armor", {
'Higher tier crystal armors require fabric to craft.\n'..
'Some mobs will drop special rings, gloves, and amulets which can be equipped to give you extra armor buffs.'..
'You can check out your specific armor levels by looking at the 3d_armor tab in your inventory. Play around with different combinations to find what fits your playstyle best.\n'..
'Check out episode 26 of the Dev-blog for more information on armor and the combat system.')
'Check out episode 26 of the Dev-blog for more information on armor and the combat system.\n'..
'You can increase the chance of getting higher power rings/amulets by placing rings/amulets with the perk you want in the relics slot. There are many other items you can use as relics. '..
'It\'s up to you to find clues and hints as to what items increase chances for what perks.')
}
})

View File

@ -1,8 +1,5 @@
local cavefreak_sounds = {
-- random = 'goblins_goblin_ambient',
-- warcry = 'goblins_goblin_attack',
attack = 'fantasy_cavefreak_punch',
-- damage = 'goblins_goblin_damage',
death = 'fantasy_cavefreak_die',
distance = 7,
}
@ -48,7 +45,6 @@ mobs:register_mob('fantasy_mobs:cavefreak_fire', {
sounds = cavefreak_sounds,
walk_velocity = 2,
run_velocity = 4,
immune_to = {{'castle_weapons:crossbow_bolt_entity', 30},},
jump = true,
water_damage = 5,
lava_damage = -5,
@ -59,7 +55,8 @@ mobs:register_mob('fantasy_mobs:cavefreak_fire', {
{name = 'scorpion:shell', chance = 2, min = 1, max = 6},
{name = 'epic:huntite', chance = 10, min = 0, max = 15},
{name = 'tnt:gunpowder', chance = 3, min = 4, max = 20},
{name = 'maxhp:lifeforce4', chance = 20, min = 0, max = 2}
{name = 'maxhp:lifeforce4', chance = 20, min = 0, max = 2},
{name = 'fantasy_mobs:cave_freak_sketch', chance = 10, min = 1, max = 1}
},
animation = {
die_start = 140,
@ -100,7 +97,6 @@ mobs:register_mob('fantasy_mobs:cavefreak_slash', {
sounds = cavefreak_sounds,
walk_velocity = 2,
run_velocity = 4,
immune_to = {{'castle_weapons:crossbow_bolt_entity', 30},},
jump = true,
water_damage = 5,
lava_damage = -5,
@ -110,7 +106,8 @@ mobs:register_mob('fantasy_mobs:cavefreak_slash', {
drops = {
{name = 'scorpion:shell', chance = 2, min = 1, max = 6},
{name = 'epic:huntite', chance = 2, min = 0 , max = 1},
{name = 'maxhp:lifeforce4', chance = 20, min = 0, max = 2}
{name = 'maxhp:lifeforce4', chance = 20, min = 0, max = 2},
{name = 'fantasy_mobs:cave_freak_sketch', chance = 10, min = 1, max = 1}
},
animation = {
die_start = 140,

View File

@ -1,7 +1,7 @@
drops = {
'stations:scroll_teleport', 'stations:scroll_healing', 'stations:scroll_bloodstone_powder',
'stations:scroll_anti_fire', 'stations:scroll_chitin', 'stations:scroll_sulfur_dust',
'stations:scroll_gunpowder', 'stations:scroll_poison', 'epic:deed',
'stations:scroll_gunpowder', 'stations:scroll_poison', 'epic:deed'
}
mobs:register_mob('fantasy_mobs:fairy', {
@ -45,12 +45,16 @@ mobs:register_mob('fantasy_mobs:fairy', {
punch_start = 0,
punch_end = 60,
},
drops = {
{name = 'fantasy_mobs:fairy_sketch', chance = 10, min = 1, max = 1},
},
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local pos = self.object:get_pos()
local player_name = clicker:get_player_name()
if item:get_name() == 'fantasy_mobs:fairy_mushroom' then
minetest.add_item(pos, {name = drops[math.random(1, #drops)]})
minetest.add_item(pos, {name = 'fantasy_mobs:fairy_dust'})
item:take_item(1)
clicker:set_wielded_item(item)
else
@ -93,6 +97,12 @@ minetest.register_node('fantasy_mobs:fairy_mushroom', {
},
})
minetest.register_craftitem('fantasy_mobs:fairy_dust', {
description = 'Fairy Dust',
inventory_image = 'fantasy_mobs_fairy_dust.png',
groups = {not_in_creative_inventory=1, relic_general=10}
})
minetest.register_abm({
label = 'fairy mushroom removal',
nodenames = {'fantasy_mobs:fairy_mushroom'},

View File

@ -56,6 +56,7 @@ mobs:register_mob('fantasy_mobs:gnome', {
{name = 'stations:scroll_coffee_grounds', chance = 20, min = 1, max = 1},
{name = 'illuminati:cone_off', chance = 250, min = 0, max = 1},
{name = 'illuminati:core_off', chance = 250, min = 0, max = 1},
{name = 'fantasy_mobs:gnome_sketch', chance = 10, min = 1, max = 1},
},
runaway_from = {'mobs_animal:kitten'},
do_custom = function(self, dtime)

View File

@ -102,6 +102,7 @@ mobs:register_mob('fantasy_mobs:goblin', {
{name = 'epic:reaver', chance = 150, min = 0, max = 1},
{name = 'illuminati:cone_off', chance = 150, min = 0, max = 1},
{name = 'illuminati:core_off', chance = 150, min = 0, max = 1},
{name = 'fantasy_mobs:goblin_sketch', chance = 10, min = 1, max = 1},
},
water_damage = 0,
lava_damage = 2,

View File

@ -1,5 +1,6 @@
dofile(minetest.get_modpath('fantasy_mobs')..'/cloudpuff.lua')
dofile(minetest.get_modpath('fantasy_mobs')..'/goblins.lua')
dofile(minetest.get_modpath('fantasy_mobs')..'/items.lua')
dofile(minetest.get_modpath('fantasy_mobs')..'/fairy.lua')
dofile(minetest.get_modpath('fantasy_mobs')..'/mummy.lua')
dofile(minetest.get_modpath('fantasy_mobs')..'/larva.lua')

View File

@ -0,0 +1,24 @@
minetest.register_craftitem('fantasy_mobs:cave_freak_sketch', {
description = 'Cave Freak Sketch',
inventory_image = 'fantasy_mobs_cave_freak_sketch.png'
})
minetest.register_craftitem('fantasy_mobs:fairy_sketch', {
description = 'Fairy Sketch',
inventory_image = 'fantasy_mobs_fairy_sketch.png'
})
minetest.register_craftitem('fantasy_mobs:gnome_sketch', {
description = 'Gnome Sketch',
inventory_image = 'fantasy_mobs_gnome_sketch.png'
})
minetest.register_craftitem('fantasy_mobs:larva_sketch', {
description = 'Larva Sketch',
inventory_image = 'fantasy_mobs_larva_sketch.png'
})
minetest.register_craftitem('fantasy_mobs:goblin_sketch', {
description = 'Goblin Sketch',
inventory_image = 'fantasy_mobs_goblin_sketch.png'
})

View File

@ -29,6 +29,7 @@ mobs:register_mob('fantasy_mobs:larva', {
{name = 'fantasy_mobs:larva_egg', chance = 100, min = 0, max = 1},
{name = 'maxhp:lifeforce1', chance = 10, min = 0, max = 3},
{name = 'maxhp:lifeforce5', chance = 150, min = 0, max = 1},
{name = 'fantasy_mobs:larva_sketch', chance = 10, min = 1, max = 1},
},
runaway_from = {'fantasy_mobs:larva_pet'},
animation = {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -1,5 +1,5 @@
minetest.register_node('hall:scorpion', {
description = 'Scorpion',
description = 'Scorpion Sculpture',
drawtype = 'mesh',
mesh = 'hall_scorpion.obj',
tiles = {'spawn_quartz1.png'},
@ -17,11 +17,11 @@ minetest.register_node('hall:scorpion', {
{-.6, -.5, -.6, .6, .4, .6}
}
},
groups = {oddly_breakable_by_hand = 2, choppy=3, not_in_creative_inventory=1},
groups = {cracky=3},
})
minetest.register_node('hall:Monster', {
description = 'Monster',
minetest.register_node('hall:cave_freak', {
description = 'Cave Freak Sculpture',
drawtype = 'mesh',
mesh = 'hall_monster.obj',
tiles = {'spawn_quartz1.png'},
@ -39,11 +39,11 @@ minetest.register_node('hall:Monster', {
{-.6, -.5, -.6, .6, .4, .6}
}
},
groups = {oddly_breakable_by_hand = 2, choppy=3, not_in_creative_inventory=1},
groups = {cracky=3},
})
minetest.register_node('hall:fairy', {
description = 'Fairy',
description = 'Fairy Sculpture',
drawtype = 'mesh',
mesh = 'hall_fairy.obj',
tiles = {'spawn_quartz1.png'},
@ -61,11 +61,11 @@ minetest.register_node('hall:fairy', {
{-.2, -.5, -.2, .2, .2, .2}
}
},
groups = {oddly_breakable_by_hand = 2, choppy=3, not_in_creative_inventory=1},
groups = {cracky=3},
})
minetest.register_node('hall:goblin', {
description = 'Goblin',
description = 'Goblin Sculpture',
drawtype = 'mesh',
mesh = 'hall_goblin.obj',
tiles = {'spawn_quartz1.png'},
@ -83,11 +83,11 @@ minetest.register_node('hall:goblin', {
{-.3, -.5, -.3, .3, .4, .3}
}
},
groups = {oddly_breakable_by_hand = 2, choppy=3, not_in_creative_inventory=1},
groups = {cracky=3},
})
minetest.register_node('hall:larva', {
description = 'Nether Lava',
description = 'Nether Lava Sculpture',
drawtype = 'mesh',
mesh = 'hall_larva.obj',
tiles = {'spawn_quartz1.png'},
@ -105,11 +105,11 @@ minetest.register_node('hall:larva', {
{-.3, 0, -.3, .3, .4, .3}
}
},
groups = {oddly_breakable_by_hand = 2, choppy=3, not_in_creative_inventory=1},
groups = {cracky=3},
})
minetest.register_node('hall:gnome', {
description = 'Gnome',
description = 'Gnome Sculpture',
drawtype = 'mesh',
mesh = 'hall_gnome.obj',
tiles = {'spawn_quartz1.png'},
@ -127,5 +127,5 @@ minetest.register_node('hall:gnome', {
{-.3, 0, -.3, .3, .4, .3}
}
},
groups = {oddly_breakable_by_hand = 2, choppy=3, not_in_creative_inventory=1},
groups = {cracky=3},
})

View File

@ -33,9 +33,10 @@ mobs:register_mob('mobs_monster:lava_flan', {
view_range = 10,
floats = 1,
drops = {
{name = 'mobs:lava_orb', chance = 15, min = 1, max = 8},
{name = 'mobs:lava_orb', chance = 15, min = 1, max = 12},
{name = 'commoditymarket:gold_coins', chance = 2, min = 5, max = 100},
{name = 'epic:slicer', chance = 100, min = 0, max = 1},
{name = 'fantasy_mobs:larva_sketch', chance = 10, min = 1, max = 1},
},
water_damage = 8,
lava_damage = 0,

View File

@ -173,39 +173,6 @@ function pkarcs.register_node(name)
pkarcs.register_all(node_name, node_def.description, node_def.tiles, node_def.sounds, node_def.groups, name)
end
--[[
pkarcs.register_node("default:cobble")
pkarcs.register_node("default:mossycobble")
pkarcs.register_node("default:desert_cobble")
pkarcs.register_node("default:stone")
pkarcs.register_node("default:stonebrick")
pkarcs.register_node("default:stone_block")
pkarcs.register_node("default:desert_stone")
pkarcs.register_node("default:desert_stonebrick")
pkarcs.register_node("default:desert_stone_block")
pkarcs.register_node("default:desert_sandstone")
pkarcs.register_node("default:desert_sandstone_block")
pkarcs.register_node("default:desert_sandstone_brick")
pkarcs.register_node("default:silver_sandstone")
pkarcs.register_node("default:silver_sandstone_block")
pkarcs.register_node("default:silver_sandstone_brick")
pkarcs.register_node("default:sandstone")
pkarcs.register_node("default:sandstonebrick")
pkarcs.register_node("default:sandstone_block")
pkarcs.register_node("default:brick")
pkarcs.register_node("default:obsidian")
pkarcs.register_node("default:obsidianbrick")
pkarcs.register_node("default:obsidian_block")
--]]
function pkarcs.register_craft(station, mod, node)
pkarcs.register_node(mod..':'..node)
@ -237,15 +204,27 @@ pkarcs.register_craft('woodworking', 'default', 'pine_wood')
pkarcs.register_craft('woodworking', 'default', 'acacia_wood')
pkarcs.register_craft('woodworking', 'default', 'aspen_wood')
pkarcs.register_craft('stone_carving', 'asteroid', 'redstone')
pkarcs.register_craft('stone_carving', 'caverealms', 'glow_obsidian')
pkarcs.register_craft('stone_carving', 'caverealms', 'glow_obsidian_2')
pkarcs.register_craft('stone_carving', 'darkage', 'basalt')
pkarcs.register_craft('stone_carving', 'darkage', 'gneiss')
pkarcs.register_craft('stone_carving', 'darkage', 'rhyolitic_tuff')
pkarcs.register_craft('stone_carving', 'darkage', 'marble')
pkarcs.register_craft('stone_carving', 'darkage', 'ors')
pkarcs.register_craft('stone_carving', 'darkage', 'schist')
pkarcs.register_craft('stone_carving', 'darkage', 'serpentine')
pkarcs.register_craft('stone_carving', 'darkage', 'shale')
pkarcs.register_craft('stone_carving', 'darkage', 'slate')
pkarcs.register_craft('stone_carving', 'darkage', 'tuff')
pkarcs.register_craft('stone_carving', 'default', 'brick')
pkarcs.register_craft('stone_carving', 'default', 'desert_stone')
pkarcs.register_craft('stone_carving', 'default', 'desert_sandstone')
pkarcs.register_craft('stone_carving', 'default', 'obsidian')
pkarcs.register_craft('stone_carving', 'default', 'sandstone')
pkarcs.register_craft('stone_carving', 'default', 'silver_sanstone')
pkarcs.register_craft('stone_carving', 'default', 'stone')
pkarcs.register_craft('stone_carving', 'default', 'obsidian')
pkarcs.register_craft('stone_carving', 'moreblocks', 'coal_stone')
pkarcs.register_craft('stone_carving', 'moreblocks', 'iron_stone')
pkarcs.register_craft('stone_carving', 'nether', 'rack')

View File

@ -34,6 +34,7 @@ mobs:register_mob('scorpion:boss', {
{name = 'stations:healing', chance = 5, min = 1, max = 1},
{name = 'stations:bloodstone_powder', chance = 5, min = 1, max = 1},
{name = 'scorpion:shell', chance = 1, min = 20, max = 100},
{name = 'scorpion:sketch', chance = 10, min = 1, max = 1},
},
water_damage = 20,
lava_damage = 60,

View File

@ -7,3 +7,8 @@ minetest.register_craftitem('scorpion:shell', {
description = 'Piece of insect shell',
inventory_image = 'scorpion_shell_piece.png',
})
minetest.register_craftitem('scorpion:sketch', {
description = 'Scorpion Sketch',
inventory_image = 'scorpion_sketch.png',
})

View File

@ -78,7 +78,6 @@ mobs:register_mob('scorpion:pet', {
if mobs:feed_tame(self, clicker, 10, false, true) then
return
end
if mobs:protect(self, clicker) then return end
if self.owner and self.owner == name then
if item ~= 'scorpion:saddle' then
if self.order == 'follow' then

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -31,14 +31,14 @@ if minetest.settings:get_bool("simplecrafting_lib_override_default_player_crafti
return "player", true
end
end)
simplecrafting_lib.register_postprocessing_callback(function()
-- Wait until all mods are loaded, in case default mod is loaded after simplecrafting_lib.
if minetest.registered_craftitems["default:book_written"] == nil then
-- If default:book_written doesn't exist, don't register these callbacks.
return
end
simplecrafting_lib.register_pre_craft(function(craft_type, recipe, output_stack, source_item_list)
-- screen for the recipe we care about. Note that you can't simply compare `recipe` to the
-- registered recipe, since pre_craft may be called on a modified copy of the registered original
@ -54,7 +54,7 @@ if minetest.settings:get_bool("simplecrafting_lib_override_default_player_crafti
return
end
end
end)
end)
simplecrafting_lib.register_post_craft(function(craft_type, recipe, output_stack, source_inv, source_listname, destination_inv, destination_listname)
-- screen for the recipes we care about
if craft_type ~= "player" or recipe.output == nil or recipe.output:get_name() ~= "default:book_written" then
@ -66,7 +66,7 @@ if minetest.settings:get_bool("simplecrafting_lib_override_default_player_crafti
end)
simplecrafting_lib.register_player_craft_type("player")
simplecrafting_lib.guide.guide_def["player"] = {
-- This matches the filtering done by the "craftguide" mod
is_recipe_included = function(recipe, player_name)
@ -83,9 +83,9 @@ if minetest.get_modpath("awards") then
simplecrafting_lib.award_crafting = function(player, stack)
-- The API changed at some point.
if awards.players then
awards.increment_item_counter(awards.players[player:get_player_name()], "craft", ItemStack(stack):get_name(), ItemStack(stack):get_count())
awards.increment_item_counter(awards.players[player:get_player_name()], "craft", ItemStack(stack):get_name(), ItemStack(stack):get_count())
elseif awards.notify_craft then
awards.notify_craft(player, stack:get_name(), stack:get_count())
end
end
end
end

View File

@ -1,7 +1,7 @@
-- Returns nil if there's no leftovers
-- Otherwise returns a countlist of leftovers
local add_count_list = function(inv, listname, count_list)
local leftover_list
local leftover_list
for item, count in pairs(count_list) do
local stack_max = ItemStack(item):get_stack_max()
while count > 0 do
@ -39,6 +39,7 @@ end
-- Returns true if there's room in the inventory for all of the items in the count list,
-- false otherwise.
--This should return true when there is space for more items, broken right now.
simplecrafting_lib.room_for_items = function(inv, listname, count_list)
local old_list = inv:get_list(listname) -- record current inventory
local result = add_count_list(inv, listname, count_list)
@ -66,7 +67,7 @@ simplecrafting_lib.remove_items = function(inv, listname, count_list)
end
count = count - removed:get_count()
end
end
end
return true
end

View File

@ -7,10 +7,17 @@ local register_heat = function()
groups = {simplecrafting_lib_intermediate=1, not_in_creative_inventory=1,},
inventory_image = "simplecrafting_lib_heat.png",
stack_max = 9999,
})
})
end
end
minetest.register_craftitem("simplecrafting_lib:heat", {
description = "Heat",
groups = {simplecrafting_lib_intermediate=1, not_in_creative_inventory=1,},
inventory_image = "simplecrafting_lib_heat.png",
stack_max = 9999,
})
local function create_recipe(legacy)
local items = legacy.items
local has_items = false
@ -38,12 +45,12 @@ local function get_item_and_quantity(item_string)
local string_split_list = {}
for v in string.gmatch(item_string, "%S+") do
table.insert(string_split_list, v)
end
end
if #string_split_list == 1 then
return item_string, 1 -- no number provided
else
return string_split_list[1], tonumber(string_split_list[#string_split_list])
end
end
end
local function get_replacement_group_haver(item_name, item_counts, recipe)
@ -59,7 +66,7 @@ local function get_replacement_group_haver(item_name, item_counts, recipe)
return false, "[simplecrafting_lib] recipe has a group replacement " .. item_name
.. " but an input belonging to that group can't be found."
end
-- If the item to be replaced doesn't exist in the recipe but there are groups in the recipe, see if the item has one of those groups
for input, _ in pairs(item_counts) do
if string.sub(input, 1, 6) == "group:" and
@ -70,7 +77,7 @@ local function get_replacement_group_haver(item_name, item_counts, recipe)
return false, "[simplecrafting_lib] recipe has a replacement target " .. item_name ..
" but an input matching it can't be found."
end
return item_name
end
@ -131,7 +138,7 @@ local function process_cooking_recipe(recipe)
legacy.output = recipe.output
legacy.input[recipe.recipe] = 1
legacy.input["simplecrafting_lib:heat"] = recipe.cooktime or 3
if recipe.replacements then
legacy.returns = {}
local count = {}
@ -155,7 +162,7 @@ local function process_fuel_recipe(recipe)
local item_name, item_quantity = get_item_and_quantity(pair[2])
legacy.returns[item_name] = item_quantity
end
end
end
return legacy
end
@ -172,7 +179,7 @@ end)
-- https://github.com/minetest/minetest/issues/5790
-- https://github.com/minetest/minetest/issues/7429
local function safe_clear_craft(recipe_to_clear)
local function safe_clear_craft(recipe_to_clear)
local parameter_recipe = {}
if recipe_to_clear.method == nil or recipe_to_clear.method == "normal" then
if recipe_to_clear.width == 0 then
@ -235,8 +242,8 @@ local function register_legacy_recipe(legacy_recipe)
register_heat()
end
simplecrafting_lib.register(craft_type, working_recipe)
end
clear_recipe = clear_this or clear_recipe
end
clear_recipe = clear_this or clear_recipe
end
return clear_recipe
end
@ -316,7 +323,7 @@ local function import_legacy_recipes()
-- was actually made before counting the returns as actual returns.
-- This is not an ideal solution since it may result in recipes losing their replacements,
-- but at this point I'm solving edge cases for edge cases and I need to sleep.
if output.item:get_count() > 0 then
if output.item:get_count() > 0 then
for _, returned_item in pairs(decremented_input.items) do
if returned_item:get_count() > 0 then
legacy_recipe.returns = legacy_recipe.returns or {}
@ -334,7 +341,7 @@ local function import_legacy_recipes()
elseif legacy_recipe.method == "cooking" then
local new_recipe = {input={}}
new_recipe.output = legacy_recipe.output
new_recipe.input[legacy_recipe.items[1]] = 1
new_recipe.input[legacy_recipe.items[1]] = 1
local cooked = minetest.get_craft_result({method = "cooking", width = 1, items = {legacy_recipe.items[1]}})
new_recipe.input["simplecrafting_lib:heat"] = cooked.time
if register_legacy_recipe(new_recipe) then
@ -375,4 +382,4 @@ simplecrafting_lib.import_filters = {}
simplecrafting_lib.register_recipe_import_filter = function(filter_function)
table.insert(simplecrafting_lib.import_filters, filter_function)
import_legacy_recipes()
end
end

View File

@ -33,7 +33,7 @@ if autocraft_def.hopper_node_name and minetest.get_modpath("hopper") and hopper
{"bottom", autocraft_def.hopper_node_name, "input"},
{"side", autocraft_def.hopper_node_name, "input"},
})
if autocraft_def.active_node then
hopper:add_container({
{"top", autocraft_def.active_node, "output"},
@ -62,24 +62,24 @@ local function refresh_formspec(pos)
local item_percent
if total_craft_time > 0 then item_percent = math.floor((math.min(craft_time, total_craft_time) / total_craft_time) * 100) else item_percent = 0 end
local inventory = {
"size[10,10.2]",
"list[context;input;0,0.5;2,5;]",
"image[3,0.5;1,1;gui_furnace_arrow_bg.png^[lowpart:"..(item_percent)..":gui_furnace_arrow_fg.png^[transformR270]",
"list[context;output;4,0;6,2;]",
"list[current_player;main;1,6.2;8,1;0]",
"list[current_player;main;1,7.4;8,3;8]",
"listring[context;output]",
"listring[current_player;main]",
"listring[context;input]",
"listring[current_player;main]",
}
if count_mode then
inventory[#inventory+1] = "field[3.3,1.5;1,0.25;product_count;;"..product_count.."]"
inventory[#inventory+1] = "field_close_on_enter[product_count;false]"
@ -87,13 +87,13 @@ local function refresh_formspec(pos)
inventory[#inventory+1] = "button[9,8.7;1,0.75;count_mode;"..S("Endless\nOutput").."]"
end
elseif autocraft_def.lock_in_mode == nil then
inventory[#inventory+1] = "button[9,8.7;1,0.75;count_mode;"..S("Counted\nOutput").."]"
inventory[#inventory+1] = "button[9,8.7;1,0.75;count_mode;"..S("Counted\nOutput").."]"
end
if autocraft_def.description then
inventory[#inventory+1] = "label[1.5,0;"..autocraft_def.description.."]"
end
if modpath_default then
inventory[#inventory+1] = default.gui_bg
inventory[#inventory+1] = default.gui_bg_img
@ -108,7 +108,7 @@ local function refresh_formspec(pos)
end
-- product selection buttons
local product_x_dim = 8
local product_y_dim = 4
local corner_x = 2
@ -118,7 +118,7 @@ local function refresh_formspec(pos)
local product_list = minetest.deserialize(meta:get_string("product_list"))
local product_page = meta:get_int("product_page") or 0
local max_pages = math.floor(#product_list / product_count)
if product_page > max_pages then
product_page = max_pages
meta:set_int("product_page", product_page)
@ -143,7 +143,7 @@ local function refresh_formspec(pos)
if pages then
inventory[#inventory+1] = "label[9.2,6.25;" .. S("Page @1", tostring(product_page+1)) .. "]"
end
for i = 1, product_count do
local current_item = product_list[i + product_page*product_count]
if current_item then
@ -157,17 +157,17 @@ local function refresh_formspec(pos)
";1,1;;empty;]"
end
end
-----------------
if autocraft_def.show_guides then
inventory[#inventory+1] = "button[9,9.5;1,0.75;show_guide;"..S("Show\nGuide").."]"
end
if autocraft_def.append_to_formspec then
inventory[#inventory+1] = autocraft_def.append_to_formspec
end
meta:set_string("formspec", table.concat(inventory))
meta:set_string("infotext", autocraft_def.get_infotext(pos))
end
@ -193,14 +193,14 @@ end
local function on_timer(pos, elapsed)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local craft_time = meta:get_float("craft_time") or 0.0
local total_craft_time = meta:get_float("total_craft_time") or 0.0
local product_count = meta:get_int("product_count") or 0
local count_mode = get_count_mode(meta)
local target_item = meta:get_string("target_item")
local recipe
local recipe_input_count
local room_for_items = false
@ -218,7 +218,7 @@ local function on_timer(pos, elapsed)
end
craft_time = craft_time + elapsed
if recipe == nil or not room_for_items or (product_count <= 0 and count_mode) then
-- we're not crafting anything.
craft_time = 0.0
@ -229,7 +229,7 @@ local function on_timer(pos, elapsed)
minetest.swap_node(pos, this_node)
end
else
while true do
if craft_time >= total_craft_time then
-- produce product
@ -257,7 +257,7 @@ local function on_timer(pos, elapsed)
end
end
meta:set_float("craft_time", craft_time)
meta:set_float("craft_time", craft_time)
meta:set_float("total_craft_time", total_craft_time)
refresh_products(meta)
@ -331,7 +331,7 @@ local function allow_metadata_inventory_move(pos, from_list, from_index, to_list
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
local stack = inv:get_stack(from_list, from_index)
return math.min(allow_metadata_inventory_put(pos, to_list, to_index, stack, player),
return math.min(allow_metadata_inventory_put(pos, to_list, to_index, stack, player),
allow_metadata_inventory_take(pos, from_list, from_index, stack, player))
end
@ -366,13 +366,13 @@ local can_dig = function(pos, player)
local inv = meta:get_inventory()
return inv:is_empty("output") and inv:is_empty("input")
end
local on_receive_fields = function(pos, formname, fields, sender)
local meta = minetest.get_meta(pos)
local product_list = minetest.deserialize(meta:get_string("product_list"))
local refresh = false
for field, _ in pairs(fields) do
if field == "target" then
meta:set_string("target_item", "")
@ -389,7 +389,7 @@ local on_receive_fields = function(pos, formname, fields, sender)
end
end
end
if fields.count_mode then
if meta:get_string("count_mode") == "" then
meta:set_string("count_mode", "true")
@ -398,28 +398,28 @@ local on_receive_fields = function(pos, formname, fields, sender)
end
refresh = true
end
if fields.product_count ~= nil then
meta:set_int("product_count", math.max((tonumber(fields.product_count) or 0), 0))
refresh = true
end
if fields.show_guide and autocraft_def.show_guides then
simplecrafting_lib.show_crafting_guide(craft_type, sender)
end
if fields.next_page then
meta:set_int("product_page", meta:get_int("product_page") + 1)
refresh = true
elseif fields.prev_page then
meta:set_int("product_page", meta:get_int("product_page") - 1)
meta:set_int("product_page", meta:get_int("product_page") - 1)
refresh = true
end
if refresh then
refresh_formspec(pos)
end
on_timer(pos, 0)
end
@ -436,17 +436,17 @@ local function default_infotext(pos)
local craft_time = meta:get_float("craft_time") or 0.0
local total_craft_time = meta:get_float("total_craft_time") or 0.0
local item_percent
if total_craft_time > 0 then item_percent = math.floor((math.min(craft_time, total_craft_time) / total_craft_time) * 100) else item_percent = 0 end
if total_craft_time > 0 then item_percent = math.floor((math.min(craft_time, total_craft_time) / total_craft_time) * 100) else item_percent = 0 end
infotext = infotext .. "\n" .. S("@1% done crafting @2", item_percent, minetest.registered_items[target].description)
if get_count_mode(meta) then
local product_count = meta:get_int("product_count") or 0
infotext = infotext .. "\n" .. S("@1 remaining to do", product_count)
end
end
return infotext
return infotext
end
autocraft_def.get_infotext = autocraft_def.get_infotext or default_infotext

View File

@ -52,16 +52,14 @@ minetest.register_on_joinplayer(function(player)
minetest.chat_send_player(player_name, 'Read the rules for information on how to get interact. Para español visite https://www.nathansalapat.com/server/epic-server_es')
minetest.show_formspec(player_name, 'rules', spawn_rules_formspec)
sounds.random_player()
--[[
else
local player_name = player:get_player_name()
local info_count = tonumber(spawn.storage:get_string(player_name..'_info_count')) or 10
local info_count = tonumber(spawn.storage:get_string(player_name..'_info_count')) or 15
if info_count < 15 then
local new_count = (info_count + 1)
spawn.storage:set_string(player_name..'_info_count', new_count)
minetest.show_formspec(player_name, '_info_message', spawn_info_formspec)
end
--]]
end
end)

View File

@ -1,6 +1,13 @@
local news = {
'10/24/20',
'Added some more stone arcs.',
'',
'10/20/20',
'Artificial bee hives now make normal honey that can be used in recipes.',
'',
'10/17/20',
'Added a second bow, tiered arrows, and exploding crossbow bolts.',
'Updated Scorpion bosses.',
'',
'10/13/20',
'Added stone carving station, and stone pkarcs.',

View File

@ -1,8 +1,7 @@
local esc = minetest.formspec_escape
local info = "Sorry!\n"..
"I broke curtains to fix them. Any curtains you placed in the world will be unknown. "..
"Please contact the admin to get your curtains replaced."
local info = "Help stop server crashes.\n"..
"If you have a crossbow that is displaying a placeholder texture please drop it in the craft grid to update it to the new crossbow."
spawn_info_formspec =
'size[11,6]'..

View File

@ -31,6 +31,7 @@ dofile(minetest.get_modpath('stations')..'/recipes_mortar.lua')
dofile(minetest.get_modpath('stations')..'/recipes_pottery_wheel.lua')
dofile(minetest.get_modpath('stations')..'/recipes_sewing.lua')
dofile(minetest.get_modpath('stations')..'/recipes_spinning_wheel.lua')
dofile(minetest.get_modpath('stations')..'/recipes_stone_carving.lua')
dofile(minetest.get_modpath('stations')..'/recipes_woodworking.lua')
dofile(minetest.get_modpath('stations')..'/recipes.lua')
dofile(minetest.get_modpath('stations')..'/scrolls.lua')

View File

@ -88,10 +88,17 @@ stations.dual_register_recipe('mortar', {
output = 'farming:cornstarch',
})
stations.dual_register_recipe('mortar', {
simplecrafting_lib.register('mortar', {
input = {
['nyancat:nyancat_rainbow'] = 1,
['vessels:glass_bottle'] = 1,
},
output = 'maxhp:lifeforce2',
})
simplecrafting_lib.register('mortar', {
input = {
['fantasy_mobs:fairy_mushroom'] = 1,
},
output = 'fantasy_mobs:fairy_dust 4',
})

View File

@ -8,8 +8,12 @@ stations.dual_register_recipe('pottery', {
stations.dual_register_recipe('pottery', {
input = {
['default:clay_lump'] = 2,
-- ['bucket:bucket_water'] = 1,
},
output = 'earthbuild:unfired_clay_pot',
-- returns = {
-- ["bucket:bucket_empty"] = 1,
-- },
})
stations.dual_register_recipe('pottery', {

View File

@ -0,0 +1,47 @@
stations.dual_register_recipe('stone_carving', {
input = {
['darkage:marble'] = 2,
['scorpion:sketch'] = 1,
},
output = 'hall:scorpion',
})
stations.dual_register_recipe('stone_carving', {
input = {
['darkage:marble'] = 2,
['fantasy_mobs:cave_freak_sketch'] = 1,
},
output = 'hall:cave_freak',
})
stations.dual_register_recipe('stone_carving', {
input = {
['darkage:marble'] = 1,
['fantasy_mobs:fairy_sketch'] = 1,
},
output = 'hall:fairy',
})
stations.dual_register_recipe('stone_carving', {
input = {
['darkage:marble'] = 1,
['fantasy_mobs:goblin_sketch'] = 1,
},
output = 'hall:goblin',
})
stations.dual_register_recipe('stone_carving', {
input = {
['darkage:marble'] = 1,
['fantasy_mobs:larva_sketch'] = 1,
},
output = 'hall:larva',
})
stations.dual_register_recipe('stone_carving', {
input = {
['darkage:marble'] = 1,
['fantasy_mobs:gnome_sketch'] = 1,
},
output = 'hall:gnome',
})

View File

@ -128,13 +128,10 @@ end
--minetest.register_node('stations:anvil0', anvil_multifurnace0_def)
minetest.register_node('stations:anvil_locked', anvil_locked_multifurnace_def)
local is_uninv = minetest.global_exists("unified_inventory") or false
if is_uninv then
unified_inventory.register_craft_type("anvil", {
description = "Smithy Station",
icon = 'stations_anvil_icon.png',
width = 4,
height = 2,
uses_crafting_grid = false
})
end
unified_inventory.register_craft_type("anvil", {
description = "Smithy Station",
icon = 'stations_anvil_icon.png',
width = 4,
height = 2,
uses_crafting_grid = false
})

View File

@ -0,0 +1,152 @@
local anvil_multifurnace0_def = { --off furnace
description = 'Smithy Station',
drawtype = 'mesh',
mesh = 'stations_anvil.obj',
tiles = {'default_dirt.png'},
sounds = default.node_sound_wood_defaults(),
paramtype2 = 'facedir',
paramtype = 'light',
selection_box = {
type = 'fixed',
fixed = {
{1.5, -.5, -.375, -.44, 0, .4},
{1.1, .1, 0, .38, .5, .38},
}
},
collision_box = {
type = 'fixed',
fixed = {
{1.5, -.5, -.375, -.44, 0, .4},
{1.1, .1, 0, .38, .5, .38},
}
},
groups = {oddly_breakable_by_hand = 1, choppy=3},
after_place_node = function(pos, placer, itemstack)
if not epic.space_to_side(pos) then
minetest.remove_node(pos)
return itemstack
end
local meta = minetest.get_meta(pos)
meta:set_string('infotext', 'Smithy Station')
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
epic.remove_side_node(pos, oldnode)
end,
on_rotate = function(pos, node)
return false
end,
}
local anvil_multifurnace_def = { --on furnace
description = 'Smithy Station',
drawtype = 'mesh',
mesh = 'stations_anvil.obj',
tiles = {'stations_anvil.png'},
sounds = default.node_sound_wood_defaults(),
paramtype2 = 'facedir',
paramtype = 'light',
selection_box = {
type = 'fixed',
fixed = {
{1.5, -.5, -.375, -.44, 0, .4},
{1.1, .1, 0, .38, .5, .38},
}
},
collision_box = {
type = 'fixed',
fixed = {
{1.5, -.5, -.375, -.44, 0, .4},
{1.1, .1, 0, .38, .5, .38},
}
},
groups = {oddly_breakable_by_hand = 1, choppy=3},
after_place_node = function(pos, placer, itemstack)
if not epic.space_to_side(pos) then
minetest.remove_node(pos)
return itemstack
end
local meta = minetest.get_meta(pos)
meta:set_string('infotext', 'Smithy Station')
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
epic.remove_side_node(pos, oldnode)
end,
on_rotate = function(pos, node)
return false
end,
}
local anvil_table_functions = simplecrafting_lib.generate_multifurnace_functions('anvil', "anvil_fuel", {
show_guides = true,
alphabetize_items = true,
description = 'Smithy Station',
active_node = 'stations:anvil1',
})
for k, v in pairs(anvil_table_functions) do
anvil_multifurnace0_def[k] = v
anvil_multifurnace_def[k] = v
end
minetest.register_node('stations:anvil0', anvil_multifurnace0_def)
minetest.register_node('stations:anvil1', anvil_multifurnace_def)
--[[
local anvil_locked_table_functions = simplecrafting_lib.generate_table_functions('anvil', {
show_guides = true,
alphabetize_items = true,
protect_inventory = true,
})
local anvil_locked_multifurnace_def = {
description = 'Smithy Station (locked)',
drawtype = 'mesh',
mesh = 'stations_anvil.obj',
tiles = {'stations_anvil.png'},
sounds = default.node_sound_wood_defaults(),
paramtype2 = 'facedir',
paramtype = 'light',
selection_box = {
type = 'fixed',
fixed = {
{1.5, -.5, -.375, -.44, 0, .4},
{1.1, .1, 0, .38, .5, .38},
}
},
collision_box = {
type = 'fixed',
fixed = {
{1.5, -.5, -.375, -.44, 0, .4},
{1.1, .1, 0, .38, .5, .38},
}
},
groups = {oddly_breakable_by_hand = 1, choppy=3},
after_place_node = function(pos, placer, itemstack)
if not epic.space_to_side(pos) then
minetest.remove_node(pos)
return itemstack
end
local meta = minetest.get_meta(pos)
meta:set_string('infotext', 'Smithy Station (locked)')
end,
after_dig_node = function(pos, oldnode, oldmetadata, digger)
epic.remove_side_node(pos, oldnode)
end,
on_rotate = function(pos, node)
return false
end,
}
for k, v in pairs(anvil_locked_table_functions) do
anvil_locked_multifurnace_def[k] = v
end
minetest.register_node('stations:anvil0_locked', anvil_locked_multifurnace0_def)
minetest.register_node('stations:anvil_locked', anvil_locked_multifurnace_def)
--]]
unified_inventory.register_craft_type("anvil", {
description = "Smithy Station",
icon = 'stations_anvil_icon.png',
width = 4,
height = 2,
uses_crafting_grid = false
})

View File

@ -39,7 +39,7 @@ function hive.timer(pos)
local flowers = minetest.find_nodes_in_area_under_air(minp, maxp, "group:flower")
if #flowers > 2 and honey < honey_max then
inv:add_item("honey", "xdecor:honey")
inv:add_item("honey", "mobs:honey")
elseif honey == honey_max then
local timer = minetest.get_node_timer(pos)
timer:stop()

View File

@ -1 +0,0 @@
This mod adds several styles of zombies, that spawn mainly on broken nodes from Duane's Cityscape mod.

View File

@ -179,6 +179,17 @@ mobs:register_mob('zombies:normal', {
})
end
end,
on_rightclick = function(self, clicker)
local item = clicker:get_wielded_item()
local player = clicker:get_player_name()
if item:get_name() == 'fantasy_mobs:fairy_dust' then
minetest.chat_send_player(player, '[Zombie] Braaaaaiiiiiiiiiinnnnnnnssssssssssssss')
self.owner = player
self.order = 'stand'
item:take_item(1)
clicker:set_wielded_item(item)
end
end,
})

View File

@ -1,2 +1,3 @@
name = zombies
depends = default, mobs, moon_phases
description = This mod adds several styles of zombies, that spawn mainly on broken nodes from Duane's Cityscape mod.