Castrum 1.3.0 upload
19
README.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
A subgame by 1248
|
||||||
|
|
||||||
|
Thanks to:
|
||||||
|
/
|
||||||
|
|
||||||
|
Info:
|
||||||
|
Castrum is my new game for Minetest.
|
||||||
|
You are on a floor plan of a castle.
|
||||||
|
Hit a diamond block to build and upgrade a building.
|
||||||
|
Go first to the quarry in the east.
|
||||||
|
Collect resources and rebuild the old castle
|
||||||
|
|
||||||
|
License:
|
||||||
|
See README.txt in each mod for more information
|
||||||
|
Every code written by me is LGPLv2.1 and CC-BY-SA
|
||||||
|
|
||||||
|
notes:
|
||||||
|
wood door in doors mod changed
|
||||||
|
chest in default mod changed
|
BIN
menu/Thumbs.db
Normal file
BIN
menu/header.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
menu/icon.png
Normal file
After Width: | Height: | Size: 222 B |
26
mods/beds/README.txt
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
Minetest Game mod: beds
|
||||||
|
=======================
|
||||||
|
See license.txt for license information.
|
||||||
|
|
||||||
|
Authors of source code
|
||||||
|
----------------------
|
||||||
|
Originally by BlockMen (MIT)
|
||||||
|
Various Minetest developers and contributors (MIT)
|
||||||
|
|
||||||
|
Authors of media (textures)
|
||||||
|
---------------------------
|
||||||
|
BlockMen (CC BY-SA 3.0)
|
||||||
|
|
||||||
|
This mod adds a bed to Minetest which allows to skip the night.
|
||||||
|
To sleep, rightclick the bed. If playing in singleplayer mode the night gets skipped
|
||||||
|
immediately. If playing multiplayer you get shown how many other players are in bed too,
|
||||||
|
if all players are sleeping the night gets skipped. The night skip can be forced if more
|
||||||
|
than 50% of the players are lying in bed and use this option.
|
||||||
|
|
||||||
|
Another feature is a controlled respawning. If you have slept in bed (not just lying in
|
||||||
|
it) your respawn point is set to the beds location and you will respawn there after
|
||||||
|
death.
|
||||||
|
You can disable the respawn at beds by setting "enable_bed_respawn = false" in
|
||||||
|
minetest.conf.
|
||||||
|
You can disable the night skip feature by setting "enable_bed_night_skip = false" in
|
||||||
|
minetest.conf or by using the /set command in-game.
|
167
mods/beds/api.lua
Normal file
@ -0,0 +1,167 @@
|
|||||||
|
|
||||||
|
local reverse = true
|
||||||
|
|
||||||
|
local function destruct_bed(pos, n)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
local other
|
||||||
|
|
||||||
|
if n == 2 then
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
other = vector.subtract(pos, dir)
|
||||||
|
elseif n == 1 then
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
other = vector.add(pos, dir)
|
||||||
|
end
|
||||||
|
|
||||||
|
if reverse then
|
||||||
|
reverse = not reverse
|
||||||
|
minetest.remove_node(other)
|
||||||
|
minetest.check_for_falling(other)
|
||||||
|
else
|
||||||
|
reverse = not reverse
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function beds.register_bed(name, def)
|
||||||
|
minetest.register_node(name .. "_bottom", {
|
||||||
|
description = def.description,
|
||||||
|
inventory_image = def.inventory_image,
|
||||||
|
wield_image = def.wield_image,
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = def.tiles.bottom,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = false,
|
||||||
|
stack_max = 1,
|
||||||
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 1},
|
||||||
|
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = def.nodebox.bottom,
|
||||||
|
},
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = def.selectionbox,
|
||||||
|
},
|
||||||
|
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
local under = pointed_thing.under
|
||||||
|
local node = minetest.get_node(under)
|
||||||
|
local udef = minetest.registered_nodes[node.name]
|
||||||
|
if udef and udef.on_rightclick and
|
||||||
|
not (placer and placer:get_player_control().sneak) then
|
||||||
|
return udef.on_rightclick(under, node, placer, itemstack,
|
||||||
|
pointed_thing) or itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos
|
||||||
|
if minetest.registered_items[minetest.get_node(under).name].buildable_to then
|
||||||
|
pos = under
|
||||||
|
else
|
||||||
|
pos = pointed_thing.above
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.is_protected(pos, placer:get_player_name()) and
|
||||||
|
not minetest.check_player_privs(placer, "protection_bypass") then
|
||||||
|
minetest.record_protection_violation(pos, placer:get_player_name())
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local node_def = minetest.registered_nodes[minetest.get_node(pos).name]
|
||||||
|
if not node_def or not node_def.buildable_to then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local dir = minetest.dir_to_facedir(placer:get_look_dir())
|
||||||
|
local botpos = vector.add(pos, minetest.facedir_to_dir(dir))
|
||||||
|
|
||||||
|
if minetest.is_protected(botpos, placer:get_player_name()) and
|
||||||
|
not minetest.check_player_privs(placer, "protection_bypass") then
|
||||||
|
minetest.record_protection_violation(botpos, placer:get_player_name())
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
local botdef = minetest.registered_nodes[minetest.get_node(botpos).name]
|
||||||
|
if not botdef or not botdef.buildable_to then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.set_node(pos, {name = name .. "_bottom", param2 = dir})
|
||||||
|
minetest.set_node(botpos, {name = name .. "_top", param2 = dir})
|
||||||
|
|
||||||
|
if not (creative and creative.is_enabled_for
|
||||||
|
and creative.is_enabled_for(placer:get_player_name())) then
|
||||||
|
itemstack:take_item()
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_destruct = function(pos)
|
||||||
|
destruct_bed(pos, 1)
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_rightclick = function(pos, node, clicker, itemstack, pointed_thing)
|
||||||
|
beds.on_rightclick(pos, clicker)
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_rotate = function(pos, node, user, mode, new_param2)
|
||||||
|
local dir = minetest.facedir_to_dir(node.param2)
|
||||||
|
local p = vector.add(pos, dir)
|
||||||
|
local node2 = minetest.get_node_or_nil(p)
|
||||||
|
if not node2 or not minetest.get_item_group(node2.name, "bed") == 2 or
|
||||||
|
not node.param2 == node2.param2 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if minetest.is_protected(p, user:get_player_name()) then
|
||||||
|
minetest.record_protection_violation(p, user:get_player_name())
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if mode ~= screwdriver.ROTATE_FACE then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
local newp = vector.add(pos, minetest.facedir_to_dir(new_param2))
|
||||||
|
local node3 = minetest.get_node_or_nil(newp)
|
||||||
|
local node_def = node3 and minetest.registered_nodes[node3.name]
|
||||||
|
if not node_def or not node_def.buildable_to then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if minetest.is_protected(newp, user:get_player_name()) then
|
||||||
|
minetest.record_protection_violation(newp, user:get_player_name())
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
node.param2 = new_param2
|
||||||
|
-- do not remove_node here - it will trigger destroy_bed()
|
||||||
|
minetest.set_node(p, {name = "air"})
|
||||||
|
minetest.set_node(pos, node)
|
||||||
|
minetest.set_node(newp, {name = name .. "_top", param2 = new_param2})
|
||||||
|
return true
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_node(name .. "_top", {
|
||||||
|
drawtype = "nodebox",
|
||||||
|
tiles = def.tiles.top,
|
||||||
|
paramtype = "light",
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
is_ground_content = false,
|
||||||
|
pointable = false,
|
||||||
|
groups = {choppy = 2, oddly_breakable_by_hand = 2, flammable = 3, bed = 2},
|
||||||
|
sounds = def.sounds or default.node_sound_wood_defaults(),
|
||||||
|
drop = name .. "_bottom",
|
||||||
|
node_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = def.nodebox.top,
|
||||||
|
},
|
||||||
|
on_destruct = function(pos)
|
||||||
|
destruct_bed(pos, 2)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias(name, name .. "_bottom")
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = name,
|
||||||
|
recipe = def.recipe
|
||||||
|
})
|
||||||
|
end
|
104
mods/beds/beds.lua
Normal file
@ -0,0 +1,104 @@
|
|||||||
|
-- Fancy shaped bed
|
||||||
|
|
||||||
|
beds.register_bed("beds:fancy_bed", {
|
||||||
|
description = "Fancy Bed",
|
||||||
|
inventory_image = "beds_bed_fancy.png",
|
||||||
|
wield_image = "beds_bed_fancy.png",
|
||||||
|
tiles = {
|
||||||
|
bottom = {
|
||||||
|
"beds_bed_top1.png",
|
||||||
|
"default_wood.png",
|
||||||
|
"beds_bed_side1.png",
|
||||||
|
"beds_bed_side1.png^[transformFX",
|
||||||
|
"default_wood.png",
|
||||||
|
"beds_bed_foot.png",
|
||||||
|
},
|
||||||
|
top = {
|
||||||
|
"beds_bed_top2.png",
|
||||||
|
"default_wood.png",
|
||||||
|
"beds_bed_side2.png",
|
||||||
|
"beds_bed_side2.png^[transformFX",
|
||||||
|
"beds_bed_head.png",
|
||||||
|
"default_wood.png",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nodebox = {
|
||||||
|
bottom = {
|
||||||
|
{-0.5, -0.5, -0.5, -0.375, -0.065, -0.4375},
|
||||||
|
{0.375, -0.5, -0.5, 0.5, -0.065, -0.4375},
|
||||||
|
{-0.5, -0.375, -0.5, 0.5, -0.125, -0.4375},
|
||||||
|
{-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
|
||||||
|
{0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
|
||||||
|
{-0.4375, -0.3125, -0.4375, 0.4375, -0.0625, 0.5},
|
||||||
|
},
|
||||||
|
top = {
|
||||||
|
{-0.5, -0.5, 0.4375, -0.375, 0.1875, 0.5},
|
||||||
|
{0.375, -0.5, 0.4375, 0.5, 0.1875, 0.5},
|
||||||
|
{-0.5, 0, 0.4375, 0.5, 0.125, 0.5},
|
||||||
|
{-0.5, -0.375, 0.4375, 0.5, -0.125, 0.5},
|
||||||
|
{-0.5, -0.375, -0.5, -0.4375, -0.125, 0.5},
|
||||||
|
{0.4375, -0.375, -0.5, 0.5, -0.125, 0.5},
|
||||||
|
{-0.4375, -0.3125, -0.5, 0.4375, -0.0625, 0.4375},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
||||||
|
recipe = {
|
||||||
|
{"", "", "group:stick"},
|
||||||
|
{"wool:red", "wool:red", "wool:white"},
|
||||||
|
{"group:wood", "group:wood", "group:wood"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Simple shaped bed
|
||||||
|
|
||||||
|
beds.register_bed("beds:bed", {
|
||||||
|
description = "Simple Bed",
|
||||||
|
inventory_image = "beds_bed.png",
|
||||||
|
wield_image = "beds_bed.png",
|
||||||
|
tiles = {
|
||||||
|
bottom = {
|
||||||
|
"beds_bed_top_bottom.png^[transformR90",
|
||||||
|
"default_wood.png",
|
||||||
|
"beds_bed_side_bottom_r.png",
|
||||||
|
"beds_bed_side_bottom_r.png^[transformfx",
|
||||||
|
"beds_transparent.png",
|
||||||
|
"beds_bed_side_bottom.png"
|
||||||
|
},
|
||||||
|
top = {
|
||||||
|
"beds_bed_top_top.png^[transformR90",
|
||||||
|
"default_wood.png",
|
||||||
|
"beds_bed_side_top_r.png",
|
||||||
|
"beds_bed_side_top_r.png^[transformfx",
|
||||||
|
"beds_bed_side_top.png",
|
||||||
|
"beds_transparent.png",
|
||||||
|
}
|
||||||
|
},
|
||||||
|
nodebox = {
|
||||||
|
bottom = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
||||||
|
top = {-0.5, -0.5, -0.5, 0.5, 0.06, 0.5},
|
||||||
|
},
|
||||||
|
selectionbox = {-0.5, -0.5, -0.5, 0.5, 0.06, 1.5},
|
||||||
|
recipe = {
|
||||||
|
{"wool:red", "wool:red", "wool:white"},
|
||||||
|
{"group:wood", "group:wood", "group:wood"}
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Aliases for PilzAdam's beds mod
|
||||||
|
|
||||||
|
minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom")
|
||||||
|
minetest.register_alias("beds:bed_top_red", "beds:bed_top")
|
||||||
|
|
||||||
|
-- Fuel
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "beds:fancy_bed_bottom",
|
||||||
|
burntime = 13,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "beds:bed_bottom",
|
||||||
|
burntime = 12,
|
||||||
|
})
|
2
mods/beds/depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
default
|
||||||
|
wool
|
220
mods/beds/functions.lua
Normal file
@ -0,0 +1,220 @@
|
|||||||
|
local pi = math.pi
|
||||||
|
local player_in_bed = 0
|
||||||
|
local is_sp = minetest.is_singleplayer()
|
||||||
|
local enable_respawn = minetest.settings:get_bool("enable_bed_respawn")
|
||||||
|
if enable_respawn == nil then
|
||||||
|
enable_respawn = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Helper functions
|
||||||
|
|
||||||
|
local function get_look_yaw(pos)
|
||||||
|
local n = minetest.get_node(pos)
|
||||||
|
if n.param2 == 1 then
|
||||||
|
return pi / 2, n.param2
|
||||||
|
elseif n.param2 == 3 then
|
||||||
|
return -pi / 2, n.param2
|
||||||
|
elseif n.param2 == 0 then
|
||||||
|
return pi, n.param2
|
||||||
|
else
|
||||||
|
return 0, n.param2
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function is_night_skip_enabled()
|
||||||
|
local enable_night_skip = minetest.settings:get_bool("enable_bed_night_skip")
|
||||||
|
if enable_night_skip == nil then
|
||||||
|
enable_night_skip = true
|
||||||
|
end
|
||||||
|
return enable_night_skip
|
||||||
|
end
|
||||||
|
|
||||||
|
local function check_in_beds(players)
|
||||||
|
local in_bed = beds.player
|
||||||
|
if not players then
|
||||||
|
players = minetest.get_connected_players()
|
||||||
|
end
|
||||||
|
|
||||||
|
for n, player in ipairs(players) do
|
||||||
|
local name = player:get_player_name()
|
||||||
|
if not in_bed[name] then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return #players > 0
|
||||||
|
end
|
||||||
|
|
||||||
|
local function lay_down(player, pos, bed_pos, state, skip)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local hud_flags = player:hud_get_flags()
|
||||||
|
|
||||||
|
if not player or not name then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- stand up
|
||||||
|
if state ~= nil and not state then
|
||||||
|
local p = beds.pos[name] or nil
|
||||||
|
if beds.player[name] ~= nil then
|
||||||
|
beds.player[name] = nil
|
||||||
|
player_in_bed = player_in_bed - 1
|
||||||
|
end
|
||||||
|
-- skip here to prevent sending player specific changes (used for leaving players)
|
||||||
|
if skip then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if p then
|
||||||
|
player:setpos(p)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- physics, eye_offset, etc
|
||||||
|
player:set_eye_offset({x = 0, y = 0, z = 0}, {x = 0, y = 0, z = 0})
|
||||||
|
player:set_look_horizontal(math.random(1, 180) / 100)
|
||||||
|
default.player_attached[name] = false
|
||||||
|
player:set_physics_override(1, 1, 1)
|
||||||
|
hud_flags.wielditem = true
|
||||||
|
default.player_set_animation(player, "stand" , 30)
|
||||||
|
|
||||||
|
-- lay down
|
||||||
|
else
|
||||||
|
beds.player[name] = 1
|
||||||
|
beds.pos[name] = pos
|
||||||
|
player_in_bed = player_in_bed + 1
|
||||||
|
|
||||||
|
-- physics, eye_offset, etc
|
||||||
|
player:set_eye_offset({x = 0, y = -13, z = 0}, {x = 0, y = 0, z = 0})
|
||||||
|
local yaw, param2 = get_look_yaw(bed_pos)
|
||||||
|
player:set_look_horizontal(yaw)
|
||||||
|
local dir = minetest.facedir_to_dir(param2)
|
||||||
|
local p = {x = bed_pos.x + dir.x / 2, y = bed_pos.y, z = bed_pos.z + dir.z / 2}
|
||||||
|
player:set_physics_override(0, 0, 0)
|
||||||
|
player:setpos(p)
|
||||||
|
default.player_attached[name] = true
|
||||||
|
hud_flags.wielditem = false
|
||||||
|
default.player_set_animation(player, "lay" , 0)
|
||||||
|
end
|
||||||
|
|
||||||
|
player:hud_set_flags(hud_flags)
|
||||||
|
end
|
||||||
|
|
||||||
|
local function update_formspecs(finished)
|
||||||
|
local ges = #minetest.get_connected_players()
|
||||||
|
local form_n
|
||||||
|
local is_majority = (ges / 2) < player_in_bed
|
||||||
|
|
||||||
|
if finished then
|
||||||
|
form_n = beds.formspec .. "label[2.7,11; Good morning.]"
|
||||||
|
else
|
||||||
|
form_n = beds.formspec .. "label[2.2,11;" .. tostring(player_in_bed) ..
|
||||||
|
" of " .. tostring(ges) .. " players are in bed]"
|
||||||
|
if is_majority and is_night_skip_enabled() then
|
||||||
|
form_n = form_n .. "button_exit[2,8;4,0.75;force;Force night skip]"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
for name,_ in pairs(beds.player) do
|
||||||
|
minetest.show_formspec(name, "beds_form", form_n)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Public functions
|
||||||
|
|
||||||
|
function beds.kick_players()
|
||||||
|
for name, _ in pairs(beds.player) do
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
lay_down(player, nil, nil, false)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function beds.skip_night()
|
||||||
|
minetest.set_timeofday(0.23)
|
||||||
|
end
|
||||||
|
|
||||||
|
function beds.on_rightclick(pos, player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local ppos = player:getpos()
|
||||||
|
local tod = minetest.get_timeofday()
|
||||||
|
|
||||||
|
if tod > 0.2 and tod < 0.805 then
|
||||||
|
if beds.player[name] then
|
||||||
|
lay_down(player, nil, nil, false)
|
||||||
|
end
|
||||||
|
minetest.chat_send_player(name, "You can only sleep at night.")
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- move to bed
|
||||||
|
if not beds.player[name] then
|
||||||
|
lay_down(player, ppos, pos)
|
||||||
|
beds.set_spawns() -- save respawn positions when entering bed
|
||||||
|
else
|
||||||
|
lay_down(player, nil, nil, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not is_sp then
|
||||||
|
update_formspecs(false)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- skip the night and let all players stand up
|
||||||
|
if check_in_beds() then
|
||||||
|
minetest.after(2, function()
|
||||||
|
if not is_sp then
|
||||||
|
update_formspecs(is_night_skip_enabled())
|
||||||
|
end
|
||||||
|
if is_night_skip_enabled() then
|
||||||
|
beds.skip_night()
|
||||||
|
beds.kick_players()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Callbacks
|
||||||
|
-- Only register respawn callback if respawn enabled
|
||||||
|
if enable_respawn then
|
||||||
|
-- respawn player at bed if enabled and valid position is found
|
||||||
|
minetest.register_on_respawnplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
local pos = beds.spawn[name]
|
||||||
|
if pos then
|
||||||
|
player:setpos(pos)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_leaveplayer(function(player)
|
||||||
|
local name = player:get_player_name()
|
||||||
|
lay_down(player, nil, nil, false, true)
|
||||||
|
beds.player[name] = nil
|
||||||
|
if check_in_beds() then
|
||||||
|
minetest.after(2, function()
|
||||||
|
update_formspecs(is_night_skip_enabled())
|
||||||
|
if is_night_skip_enabled() then
|
||||||
|
beds.skip_night()
|
||||||
|
beds.kick_players()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
minetest.register_on_player_receive_fields(function(player, formname, fields)
|
||||||
|
if formname ~= "beds_form" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if fields.quit or fields.leave then
|
||||||
|
lay_down(player, nil, nil, false)
|
||||||
|
update_formspecs(false)
|
||||||
|
end
|
||||||
|
|
||||||
|
if fields.force then
|
||||||
|
update_formspecs(is_night_skip_enabled())
|
||||||
|
if is_night_skip_enabled() then
|
||||||
|
beds.skip_night()
|
||||||
|
beds.kick_players()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
17
mods/beds/init.lua
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
beds = {}
|
||||||
|
beds.player = {}
|
||||||
|
beds.pos = {}
|
||||||
|
beds.spawn = {}
|
||||||
|
|
||||||
|
beds.formspec = "size[8,15;true]" ..
|
||||||
|
"bgcolor[#080808BB; true]" ..
|
||||||
|
"button_exit[2,12;4,0.75;leave;Leave Bed]"
|
||||||
|
|
||||||
|
local modpath = minetest.get_modpath("beds")
|
||||||
|
|
||||||
|
-- Load files
|
||||||
|
|
||||||
|
dofile(modpath .. "/functions.lua")
|
||||||
|
dofile(modpath .. "/api.lua")
|
||||||
|
dofile(modpath .. "/beds.lua")
|
||||||
|
dofile(modpath .. "/spawns.lua")
|
60
mods/beds/license.txt
Normal file
@ -0,0 +1,60 @@
|
|||||||
|
License of source code
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
Copyright (C) 2014-2016 BlockMen
|
||||||
|
Copyright (C) 2014-2016 Various Minetest developers and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||||
|
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
|
||||||
|
Licenses of media (textures)
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
|
Copyright (C) 2014-2016 BlockMen
|
||||||
|
|
||||||
|
You are free to:
|
||||||
|
Share — copy and redistribute the material in any medium or format.
|
||||||
|
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||||
|
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||||
|
|
||||||
|
Under the following terms:
|
||||||
|
|
||||||
|
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||||
|
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||||
|
that suggests the licensor endorses you or your use.
|
||||||
|
|
||||||
|
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||||
|
your contributions under the same license as the original.
|
||||||
|
|
||||||
|
No additional restrictions — You may not apply legal terms or technological measures that
|
||||||
|
legally restrict others from doing anything the license permits.
|
||||||
|
|
||||||
|
Notices:
|
||||||
|
|
||||||
|
You do not have to comply with the license for elements of the material in the public
|
||||||
|
domain or where your use is permitted by an applicable exception or limitation.
|
||||||
|
No warranties are given. The license may not give you all of the permissions necessary
|
||||||
|
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||||
|
rights may limit how you use the material.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
http://creativecommons.org/licenses/by-sa/3.0/
|
63
mods/beds/spawns.lua
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
local world_path = minetest.get_worldpath()
|
||||||
|
local org_file = world_path .. "/beds_spawns"
|
||||||
|
local file = world_path .. "/beds_spawns"
|
||||||
|
local bkwd = false
|
||||||
|
|
||||||
|
-- check for PA's beds mod spawns
|
||||||
|
local cf = io.open(world_path .. "/beds_player_spawns", "r")
|
||||||
|
if cf ~= nil then
|
||||||
|
io.close(cf)
|
||||||
|
file = world_path .. "/beds_player_spawns"
|
||||||
|
bkwd = true
|
||||||
|
end
|
||||||
|
|
||||||
|
function beds.read_spawns()
|
||||||
|
local spawns = beds.spawn
|
||||||
|
local input = io.open(file, "r")
|
||||||
|
if input and not bkwd then
|
||||||
|
repeat
|
||||||
|
local x = input:read("*n")
|
||||||
|
if x == nil then
|
||||||
|
break
|
||||||
|
end
|
||||||
|
local y = input:read("*n")
|
||||||
|
local z = input:read("*n")
|
||||||
|
local name = input:read("*l")
|
||||||
|
spawns[name:sub(2)] = {x = x, y = y, z = z}
|
||||||
|
until input:read(0) == nil
|
||||||
|
io.close(input)
|
||||||
|
elseif input and bkwd then
|
||||||
|
beds.spawn = minetest.deserialize(input:read("*all"))
|
||||||
|
input:close()
|
||||||
|
beds.save_spawns()
|
||||||
|
os.rename(file, file .. ".backup")
|
||||||
|
file = org_file
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
beds.read_spawns()
|
||||||
|
|
||||||
|
function beds.save_spawns()
|
||||||
|
if not beds.spawn then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local data = {}
|
||||||
|
local output = io.open(org_file, "w")
|
||||||
|
for k, v in pairs(beds.spawn) do
|
||||||
|
table.insert(data, string.format("%.1f %.1f %.1f %s\n", v.x, v.y, v.z, k))
|
||||||
|
end
|
||||||
|
output:write(table.concat(data))
|
||||||
|
io.close(output)
|
||||||
|
end
|
||||||
|
|
||||||
|
function beds.set_spawns()
|
||||||
|
for name,_ in pairs(beds.player) do
|
||||||
|
local player = minetest.get_player_by_name(name)
|
||||||
|
local p = player:getpos()
|
||||||
|
-- but don't change spawn location if borrowing a bed
|
||||||
|
if not minetest.is_protected(p, name) then
|
||||||
|
beds.spawn[name] = p
|
||||||
|
end
|
||||||
|
end
|
||||||
|
beds.save_spawns()
|
||||||
|
end
|
BIN
mods/beds/textures/beds_bed.png
Normal file
After Width: | Height: | Size: 540 B |
BIN
mods/beds/textures/beds_bed_fancy.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
mods/beds/textures/beds_bed_foot.png
Normal file
After Width: | Height: | Size: 390 B |
BIN
mods/beds/textures/beds_bed_head.png
Normal file
After Width: | Height: | Size: 387 B |
BIN
mods/beds/textures/beds_bed_side1.png
Normal file
After Width: | Height: | Size: 296 B |
BIN
mods/beds/textures/beds_bed_side2.png
Normal file
After Width: | Height: | Size: 316 B |
BIN
mods/beds/textures/beds_bed_side_bottom.png
Normal file
After Width: | Height: | Size: 561 B |
BIN
mods/beds/textures/beds_bed_side_bottom_r.png
Normal file
After Width: | Height: | Size: 537 B |
BIN
mods/beds/textures/beds_bed_side_top.png
Normal file
After Width: | Height: | Size: 611 B |
BIN
mods/beds/textures/beds_bed_side_top_r.png
Normal file
After Width: | Height: | Size: 596 B |
BIN
mods/beds/textures/beds_bed_top1.png
Normal file
After Width: | Height: | Size: 583 B |
BIN
mods/beds/textures/beds_bed_top2.png
Normal file
After Width: | Height: | Size: 616 B |
BIN
mods/beds/textures/beds_bed_top_bottom.png
Normal file
After Width: | Height: | Size: 495 B |
BIN
mods/beds/textures/beds_bed_top_top.png
Normal file
After Width: | Height: | Size: 556 B |
BIN
mods/beds/textures/beds_transparent.png
Normal file
After Width: | Height: | Size: 143 B |
15
mods/boats/README.txt
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
Minetest Game mod: boats
|
||||||
|
========================
|
||||||
|
See license.txt for license information.
|
||||||
|
|
||||||
|
Authors of source code
|
||||||
|
----------------------
|
||||||
|
Originally by PilzAdam (MIT)
|
||||||
|
Various Minetest developers and contributors (MIT)
|
||||||
|
|
||||||
|
Authors of media (textures and model)
|
||||||
|
-------------------------------------
|
||||||
|
Textures: Zeg9 (CC BY-SA 3.0)
|
||||||
|
Model: thetoon and Zeg9 (CC BY-SA 3.0),
|
||||||
|
modified by PavelS(SokolovPavel) (CC BY-SA 3.0),
|
||||||
|
modified by sofar (CC BY-SA 3.0)
|
1
mods/boats/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
271
mods/boats/init.lua
Normal file
@ -0,0 +1,271 @@
|
|||||||
|
--
|
||||||
|
-- Helper functions
|
||||||
|
--
|
||||||
|
|
||||||
|
local function is_water(pos)
|
||||||
|
local nn = minetest.get_node(pos).name
|
||||||
|
return minetest.get_item_group(nn, "water") ~= 0
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function get_sign(i)
|
||||||
|
if i == 0 then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return i / math.abs(i)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function get_velocity(v, yaw, y)
|
||||||
|
local x = -math.sin(yaw) * v
|
||||||
|
local z = math.cos(yaw) * v
|
||||||
|
return {x = x, y = y, z = z}
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
local function get_v(v)
|
||||||
|
return math.sqrt(v.x ^ 2 + v.z ^ 2)
|
||||||
|
end
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Boat entity
|
||||||
|
--
|
||||||
|
|
||||||
|
local boat = {
|
||||||
|
physical = true,
|
||||||
|
-- Warning: Do not change the position of the collisionbox top surface,
|
||||||
|
-- lowering it causes the boat to fall through the world if underwater
|
||||||
|
collisionbox = {-0.5, -0.35, -0.5, 0.5, 0.3, 0.5},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "boats_boat.obj",
|
||||||
|
textures = {"default_wood.png"},
|
||||||
|
|
||||||
|
driver = nil,
|
||||||
|
v = 0,
|
||||||
|
last_v = 0,
|
||||||
|
removed = false
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function boat.on_rightclick(self, clicker)
|
||||||
|
if not clicker or not clicker:is_player() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local name = clicker:get_player_name()
|
||||||
|
if self.driver and clicker == self.driver then
|
||||||
|
self.driver = nil
|
||||||
|
clicker:set_detach()
|
||||||
|
default.player_attached[name] = false
|
||||||
|
default.player_set_animation(clicker, "stand" , 30)
|
||||||
|
local pos = clicker:getpos()
|
||||||
|
pos = {x = pos.x, y = pos.y + 0.2, z = pos.z}
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
clicker:setpos(pos)
|
||||||
|
end)
|
||||||
|
elseif not self.driver then
|
||||||
|
local attach = clicker:get_attach()
|
||||||
|
if attach and attach:get_luaentity() then
|
||||||
|
local luaentity = attach:get_luaentity()
|
||||||
|
if luaentity.driver then
|
||||||
|
luaentity.driver = nil
|
||||||
|
end
|
||||||
|
clicker:set_detach()
|
||||||
|
end
|
||||||
|
self.driver = clicker
|
||||||
|
clicker:set_attach(self.object, "",
|
||||||
|
{x = 0, y = 11, z = -3}, {x = 0, y = 0, z = 0})
|
||||||
|
default.player_attached[name] = true
|
||||||
|
minetest.after(0.2, function()
|
||||||
|
default.player_set_animation(clicker, "sit" , 30)
|
||||||
|
end)
|
||||||
|
clicker:set_look_horizontal(self.object:getyaw())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function boat.on_activate(self, staticdata, dtime_s)
|
||||||
|
self.object:set_armor_groups({immortal = 1})
|
||||||
|
if staticdata then
|
||||||
|
self.v = tonumber(staticdata)
|
||||||
|
end
|
||||||
|
self.last_v = self.v
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function boat.get_staticdata(self)
|
||||||
|
return tostring(self.v)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function boat.on_punch(self, puncher)
|
||||||
|
if not puncher or not puncher:is_player() or self.removed then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if self.driver and puncher == self.driver then
|
||||||
|
self.driver = nil
|
||||||
|
puncher:set_detach()
|
||||||
|
default.player_attached[puncher:get_player_name()] = false
|
||||||
|
end
|
||||||
|
if not self.driver then
|
||||||
|
self.removed = true
|
||||||
|
local inv = puncher:get_inventory()
|
||||||
|
if not (creative and creative.is_enabled_for
|
||||||
|
and creative.is_enabled_for(puncher:get_player_name()))
|
||||||
|
or not inv:contains_item("main", "boats:boat") then
|
||||||
|
local leftover = inv:add_item("main", "boats:boat")
|
||||||
|
-- if no room in inventory add a replacement boat to the world
|
||||||
|
if not leftover:is_empty() then
|
||||||
|
minetest.add_item(self.object:getpos(), leftover)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- delay remove to ensure player is detached
|
||||||
|
minetest.after(0.1, function()
|
||||||
|
self.object:remove()
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function boat.on_step(self, dtime)
|
||||||
|
self.v = get_v(self.object:getvelocity()) * get_sign(self.v)
|
||||||
|
if self.driver then
|
||||||
|
local ctrl = self.driver:get_player_control()
|
||||||
|
local yaw = self.object:getyaw()
|
||||||
|
if ctrl.up then
|
||||||
|
self.v = self.v + 0.1
|
||||||
|
elseif ctrl.down then
|
||||||
|
self.v = self.v - 0.1
|
||||||
|
end
|
||||||
|
if ctrl.left then
|
||||||
|
if self.v < 0 then
|
||||||
|
self.object:setyaw(yaw - (1 + dtime) * 0.03)
|
||||||
|
else
|
||||||
|
self.object:setyaw(yaw + (1 + dtime) * 0.03)
|
||||||
|
end
|
||||||
|
elseif ctrl.right then
|
||||||
|
if self.v < 0 then
|
||||||
|
self.object:setyaw(yaw + (1 + dtime) * 0.03)
|
||||||
|
else
|
||||||
|
self.object:setyaw(yaw - (1 + dtime) * 0.03)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local velo = self.object:getvelocity()
|
||||||
|
if self.v == 0 and velo.x == 0 and velo.y == 0 and velo.z == 0 then
|
||||||
|
self.object:setpos(self.object:getpos())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local s = get_sign(self.v)
|
||||||
|
self.v = self.v - 0.02 * s
|
||||||
|
if s ~= get_sign(self.v) then
|
||||||
|
self.object:setvelocity({x = 0, y = 0, z = 0})
|
||||||
|
self.v = 0
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if math.abs(self.v) > 5 then
|
||||||
|
self.v = 5 * get_sign(self.v)
|
||||||
|
end
|
||||||
|
|
||||||
|
local p = self.object:getpos()
|
||||||
|
p.y = p.y - 0.5
|
||||||
|
local new_velo
|
||||||
|
local new_acce = {x = 0, y = 0, z = 0}
|
||||||
|
if not is_water(p) then
|
||||||
|
local nodedef = minetest.registered_nodes[minetest.get_node(p).name]
|
||||||
|
if (not nodedef) or nodedef.walkable then
|
||||||
|
self.v = 0
|
||||||
|
new_acce = {x = 0, y = 1, z = 0}
|
||||||
|
else
|
||||||
|
new_acce = {x = 0, y = -9.8, z = 0}
|
||||||
|
end
|
||||||
|
new_velo = get_velocity(self.v, self.object:getyaw(),
|
||||||
|
self.object:getvelocity().y)
|
||||||
|
self.object:setpos(self.object:getpos())
|
||||||
|
else
|
||||||
|
p.y = p.y + 1
|
||||||
|
if is_water(p) then
|
||||||
|
local y = self.object:getvelocity().y
|
||||||
|
if y >= 5 then
|
||||||
|
y = 5
|
||||||
|
elseif y < 0 then
|
||||||
|
new_acce = {x = 0, y = 20, z = 0}
|
||||||
|
else
|
||||||
|
new_acce = {x = 0, y = 5, z = 0}
|
||||||
|
end
|
||||||
|
new_velo = get_velocity(self.v, self.object:getyaw(), y)
|
||||||
|
self.object:setpos(self.object:getpos())
|
||||||
|
else
|
||||||
|
new_acce = {x = 0, y = 0, z = 0}
|
||||||
|
if math.abs(self.object:getvelocity().y) < 1 then
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
pos.y = math.floor(pos.y) + 0.5
|
||||||
|
self.object:setpos(pos)
|
||||||
|
new_velo = get_velocity(self.v, self.object:getyaw(), 0)
|
||||||
|
else
|
||||||
|
new_velo = get_velocity(self.v, self.object:getyaw(),
|
||||||
|
self.object:getvelocity().y)
|
||||||
|
self.object:setpos(self.object:getpos())
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.object:setvelocity(new_velo)
|
||||||
|
self.object:setacceleration(new_acce)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_entity("boats:boat", boat)
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craftitem("boats:boat", {
|
||||||
|
description = "Boat",
|
||||||
|
inventory_image = "boats_inventory.png",
|
||||||
|
wield_image = "boats_wield.png",
|
||||||
|
wield_scale = {x = 2, y = 2, z = 1},
|
||||||
|
liquids_pointable = true,
|
||||||
|
groups = {flammable = 2},
|
||||||
|
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
local under = pointed_thing.under
|
||||||
|
local node = minetest.get_node(under)
|
||||||
|
local udef = minetest.registered_nodes[node.name]
|
||||||
|
if udef and udef.on_rightclick and
|
||||||
|
not (placer and placer:get_player_control().sneak) then
|
||||||
|
return udef.on_rightclick(under, node, placer, itemstack,
|
||||||
|
pointed_thing) or itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
if not is_water(pointed_thing.under) then
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
pointed_thing.under.y = pointed_thing.under.y + 0.5
|
||||||
|
boat = minetest.add_entity(pointed_thing.under, "boats:boat")
|
||||||
|
if boat then
|
||||||
|
boat:setyaw(placer:get_look_horizontal())
|
||||||
|
if not (creative and creative.is_enabled_for
|
||||||
|
and creative.is_enabled_for(placer:get_player_name())) then
|
||||||
|
itemstack:take_item()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "boats:boat",
|
||||||
|
recipe = {
|
||||||
|
{"", "", "" },
|
||||||
|
{"group:wood", "", "group:wood"},
|
||||||
|
{"group:wood", "group:wood", "group:wood"},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "boats:boat",
|
||||||
|
burntime = 20,
|
||||||
|
})
|
63
mods/boats/license.txt
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
License of source code
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
Copyright (C) 2012-2016 PilzAdam
|
||||||
|
Copyright (C) 2012-2016 Various Minetest developers and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||||
|
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
|
||||||
|
Licenses of media (textures and model)
|
||||||
|
--------------------------------------
|
||||||
|
|
||||||
|
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
|
Copyright (C) 2012-2016 Zeg9
|
||||||
|
Copyright (C) 2012-2016 thetoon
|
||||||
|
Copyright (C) 2012-2016 PavelS(SokolovPavel)
|
||||||
|
Copyright (C) 2016 sofar (sofar@foo-projects.org)
|
||||||
|
|
||||||
|
You are free to:
|
||||||
|
Share — copy and redistribute the material in any medium or format.
|
||||||
|
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||||
|
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||||
|
|
||||||
|
Under the following terms:
|
||||||
|
|
||||||
|
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||||
|
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||||
|
that suggests the licensor endorses you or your use.
|
||||||
|
|
||||||
|
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||||
|
your contributions under the same license as the original.
|
||||||
|
|
||||||
|
No additional restrictions — You may not apply legal terms or technological measures that
|
||||||
|
legally restrict others from doing anything the license permits.
|
||||||
|
|
||||||
|
Notices:
|
||||||
|
|
||||||
|
You do not have to comply with the license for elements of the material in the public
|
||||||
|
domain or where your use is permitted by an applicable exception or limitation.
|
||||||
|
No warranties are given. The license may not give you all of the permissions necessary
|
||||||
|
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||||
|
rights may limit how you use the material.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
http://creativecommons.org/licenses/by-sa/3.0/
|
358
mods/boats/models/boats_boat.obj
Normal file
@ -0,0 +1,358 @@
|
|||||||
|
# Blender v2.76 (sub 11) OBJ File: 'boat.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib boat.mtl
|
||||||
|
o boats_boat
|
||||||
|
v -6.786140 -3.033999 -9.415440
|
||||||
|
v -6.786140 -1.967150 -9.415440
|
||||||
|
v -6.786140 -1.967150 8.793510
|
||||||
|
v -6.786140 -3.033999 8.793510
|
||||||
|
v 5.732520 -1.967150 -9.415440
|
||||||
|
v 5.732520 -3.033999 -9.415440
|
||||||
|
v 5.732520 -3.033999 8.793510
|
||||||
|
v 5.732520 -1.967150 8.793510
|
||||||
|
v -2.233900 -3.033999 -9.415440
|
||||||
|
v -2.233900 -1.967150 -9.415440
|
||||||
|
v -2.233900 -1.967150 8.793510
|
||||||
|
v -2.233900 -3.033999 8.793510
|
||||||
|
v 2.318340 -3.033999 -9.415440
|
||||||
|
v 2.318340 -1.967150 -9.415440
|
||||||
|
v 2.318340 -1.967150 8.793510
|
||||||
|
v 2.318340 -3.033999 8.793510
|
||||||
|
v -3.371960 -3.033999 8.793510
|
||||||
|
v -3.371960 -1.967150 8.793510
|
||||||
|
v -3.371960 -1.967150 -9.415440
|
||||||
|
v -3.371960 -3.033999 -9.415440
|
||||||
|
v 2.318340 0.276645 8.793510
|
||||||
|
v 1.180280 -1.967150 8.793510
|
||||||
|
v 5.732520 0.276645 8.793510
|
||||||
|
v 5.732520 1.039180 8.793510
|
||||||
|
v 6.870580 0.276645 8.793510
|
||||||
|
v 6.870580 -1.967150 8.793510
|
||||||
|
v 2.318340 1.039180 8.793510
|
||||||
|
v 1.180280 0.276645 8.793510
|
||||||
|
v 1.180280 1.039180 8.793510
|
||||||
|
v 1.180280 -3.033999 8.793510
|
||||||
|
v -2.233900 0.276645 8.793510
|
||||||
|
v -3.371960 0.276645 8.793510
|
||||||
|
v -2.233900 1.039180 8.793510
|
||||||
|
v -3.371960 1.039180 8.793510
|
||||||
|
v -6.786140 0.276645 8.793510
|
||||||
|
v -7.786200 0.276645 8.793510
|
||||||
|
v -7.786200 -1.967150 8.793510
|
||||||
|
v -6.786140 1.039180 8.793510
|
||||||
|
v 1.180280 -1.967150 -9.415440
|
||||||
|
v 1.180280 -3.033999 -9.415440
|
||||||
|
v 2.318340 0.276645 -9.415440
|
||||||
|
v 1.180280 0.276645 -9.415440
|
||||||
|
v 2.318340 1.039180 -9.415440
|
||||||
|
v 5.732520 0.276645 -9.415440
|
||||||
|
v 6.870580 -1.967150 -9.415440
|
||||||
|
v 5.732520 1.039180 -9.415440
|
||||||
|
v 6.870580 0.276645 -9.415440
|
||||||
|
v 0.042220 1.039180 -9.415440
|
||||||
|
v 1.180280 1.039180 -9.415440
|
||||||
|
v 0.042220 -1.967150 -9.415440
|
||||||
|
v -1.095840 -1.967150 -9.415440
|
||||||
|
v -2.233900 0.276645 -9.415440
|
||||||
|
v -3.371960 0.276645 -9.415440
|
||||||
|
v -2.233900 1.039180 -9.415440
|
||||||
|
v -1.095840 1.039180 -9.415440
|
||||||
|
v -3.371960 1.039180 -9.415440
|
||||||
|
v -6.786140 0.276645 -9.415440
|
||||||
|
v -6.786140 1.039180 -9.415440
|
||||||
|
v -7.786200 -1.967150 -9.415440
|
||||||
|
v -7.786200 0.276645 -9.415440
|
||||||
|
v -1.095840 0.156645 -12.044100
|
||||||
|
v -1.095840 -4.601110 -9.415440
|
||||||
|
v -1.095840 1.039181 -10.802900
|
||||||
|
v -1.095840 2.868579 -10.802900
|
||||||
|
v -1.095840 2.868580 -7.883420
|
||||||
|
v -1.095840 3.746069 -12.034100
|
||||||
|
v -1.095840 3.746070 -7.883420
|
||||||
|
v -1.095840 0.156645 -14.294900
|
||||||
|
v -1.095840 -4.601110 -14.284900
|
||||||
|
v 0.042220 -4.601110 -14.284900
|
||||||
|
v 0.042220 -4.601110 -9.415440
|
||||||
|
v 0.042220 1.039181 -10.802900
|
||||||
|
v 0.042220 0.156645 -12.044100
|
||||||
|
v 0.042220 2.868579 -10.802900
|
||||||
|
v 0.042220 0.156645 -14.294900
|
||||||
|
v 0.042220 3.746069 -12.034100
|
||||||
|
v 0.042220 3.746070 -7.883420
|
||||||
|
v 0.042220 2.868580 -7.883420
|
||||||
|
v -1.096322 -3.033999 -9.415440
|
||||||
|
v 0.044046 -3.035397 -9.415440
|
||||||
|
vt 1.000000 0.187500
|
||||||
|
vt -1.000000 0.312500
|
||||||
|
vt 1.000000 0.312500
|
||||||
|
vt 0.687500 1.000000
|
||||||
|
vt 0.500000 0.875000
|
||||||
|
vt 0.500000 0.625000
|
||||||
|
vt -1.000000 0.062500
|
||||||
|
vt 1.000000 0.062500
|
||||||
|
vt 1.000000 -0.000000
|
||||||
|
vt -1.000000 0.125000
|
||||||
|
vt 1.000000 0.125000
|
||||||
|
vt 0.437500 0.125000
|
||||||
|
vt 0.312500 0.500000
|
||||||
|
vt 0.312500 0.125000
|
||||||
|
vt 1.000000 0.625000
|
||||||
|
vt -1.000000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.187500 0.687500
|
||||||
|
vt -0.187500 0.687500
|
||||||
|
vt -0.187500 0.312500
|
||||||
|
vt 1.000000 0.812500
|
||||||
|
vt -1.000000 0.937500
|
||||||
|
vt -1.000000 0.812500
|
||||||
|
vt 0.812500 0.687500
|
||||||
|
vt 1.187500 0.687500
|
||||||
|
vt 0.812500 0.312500
|
||||||
|
vt 1.000000 0.562500
|
||||||
|
vt 0.312500 0.437500
|
||||||
|
vt 1.000000 0.437500
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt -1.000000 0.875000
|
||||||
|
vt -1.000000 0.750000
|
||||||
|
vt -1.000000 1.000000
|
||||||
|
vt 1.000000 1.000000
|
||||||
|
vt 0.437500 0.625000
|
||||||
|
vt 0.562500 0.437500
|
||||||
|
vt 0.562500 0.625000
|
||||||
|
vt -1.000000 0.437500
|
||||||
|
vt -1.000000 0.000000
|
||||||
|
vt 0.500000 0.062500
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt -1.000000 0.250000
|
||||||
|
vt -1.000000 0.687500
|
||||||
|
vt 1.000000 0.687500
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 1.000000 0.375000
|
||||||
|
vt 1.000000 0.250000
|
||||||
|
vt 1.000000 0.937500
|
||||||
|
vt 0.437500 0.812500
|
||||||
|
vt 0.312500 0.312500
|
||||||
|
vt 0.312500 0.812500
|
||||||
|
vt 0.437500 0.312500
|
||||||
|
vt 0.437500 0.437500
|
||||||
|
vt 0.687500 0.812500
|
||||||
|
vt 0.000000 0.687500
|
||||||
|
vt 0.000000 0.812500
|
||||||
|
vt -1.000000 0.562500
|
||||||
|
vt 0.875000 0.812500
|
||||||
|
vt 0.875000 0.687500
|
||||||
|
vt 0.250000 0.312500
|
||||||
|
vt 0.562500 0.187500
|
||||||
|
vt 0.250000 0.187500
|
||||||
|
vt -1.000000 0.187500
|
||||||
|
vt 0.312500 0.625000
|
||||||
|
vt 0.312500 0.187500
|
||||||
|
vt 0.312500 -0.187500
|
||||||
|
vt 1.000000 -0.187500
|
||||||
|
vt 0.687500 0.500000
|
||||||
|
vt -0.000000 1.000000
|
||||||
|
vt 0.000000 0.875000
|
||||||
|
vt 0.437500 0.500000
|
||||||
|
vt -1.000000 0.625000
|
||||||
|
vt 0.812500 0.187500
|
||||||
|
vt 1.187500 0.187500
|
||||||
|
vt 1.187500 0.312500
|
||||||
|
vt 1.312500 0.312500
|
||||||
|
vt 1.312500 0.687500
|
||||||
|
vt 0.687500 0.187500
|
||||||
|
vt 0.687500 0.312500
|
||||||
|
vt 1.187500 0.812500
|
||||||
|
vt 0.812500 0.812500
|
||||||
|
vt 0.187500 0.312500
|
||||||
|
vt 0.312500 0.687500
|
||||||
|
vt 0.687500 0.687500
|
||||||
|
vt -0.187500 0.187500
|
||||||
|
vt 0.187500 0.187500
|
||||||
|
vt -0.312500 0.687500
|
||||||
|
vt -0.312500 0.312500
|
||||||
|
vt 0.187500 0.812500
|
||||||
|
vt -0.187500 0.812500
|
||||||
|
vt 0.437500 0.687500
|
||||||
|
vt 0.437500 0.187500
|
||||||
|
vt 0.562500 0.812500
|
||||||
|
vt 0.562500 0.687500
|
||||||
|
vt 0.312500 0.562500
|
||||||
|
vt 1.000000 0.875000
|
||||||
|
vt 0.375000 0.062500
|
||||||
|
vt -1.000000 0.375000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.875000 0.562500
|
||||||
|
vt 0.937500 0.812500
|
||||||
|
vt 0.937500 0.687500
|
||||||
|
vt 0.875000 0.937500
|
||||||
|
vt 0.562500 0.312500
|
||||||
|
vn -1.000000 0.000000 0.000000
|
||||||
|
vn 1.000000 0.000000 0.000000
|
||||||
|
vn 0.000000 0.000000 1.000000
|
||||||
|
vn 0.000000 0.000000 -1.000000
|
||||||
|
vn 0.000000 -1.000000 0.000000
|
||||||
|
vn 0.000000 1.000000 0.000000
|
||||||
|
vn 0.000000 -0.002100 -1.000000
|
||||||
|
vn 0.001200 -1.000000 0.000000
|
||||||
|
vn 0.000000 0.002800 -1.000000
|
||||||
|
vn -0.001200 -1.000000 0.000200
|
||||||
|
g boats_boat_boats_boat_None
|
||||||
|
usemtl None
|
||||||
|
s off
|
||||||
|
f 41/1/1 27/2/1 43/3/1
|
||||||
|
f 76/4/2 74/5/2 72/6/2
|
||||||
|
f 8/7/2 6/1/2 5/8/2
|
||||||
|
f 15/9/1 13/10/1 16/11/1
|
||||||
|
f 51/12/3 71/13/3 50/14/3
|
||||||
|
f 56/15/2 32/16/2 53/17/2
|
||||||
|
f 15/18/3 8/19/3 23/20/3
|
||||||
|
f 22/21/2 40/22/2 39/23/2
|
||||||
|
f 19/24/4 2/25/4 53/26/4
|
||||||
|
f 70/27/5 62/28/5 69/29/5
|
||||||
|
f 11/30/5 19/31/5 10/32/5
|
||||||
|
f 4/15/5 20/33/5 17/34/5
|
||||||
|
f 72/35/3 64/36/3 63/37/3
|
||||||
|
f 13/8/5 7/38/5 16/7/5
|
||||||
|
f 23/39/6 47/11/6 44/9/6
|
||||||
|
f 68/40/7 70/41/7 69/42/7
|
||||||
|
f 80/43/8 40/10/8 30/11/8
|
||||||
|
f 3/15/1 1/32/1 4/30/1
|
||||||
|
f 20/44/2 18/27/2 17/45/2
|
||||||
|
f 74/17/5 65/46/5 64/47/5
|
||||||
|
f 31/43/1 54/47/1 52/48/1
|
||||||
|
f 22/47/5 14/43/5 15/48/5
|
||||||
|
f 46/1/2 23/7/2 44/8/2
|
||||||
|
f 57/21/1 38/22/1 58/49/1
|
||||||
|
f 61/50/9 76/51/9 73/52/9
|
||||||
|
f 37/45/5 2/23/5 3/21/5
|
||||||
|
f 78/28/3 67/53/3 65/54/3
|
||||||
|
f 64/5/1 66/4/1 63/6/1
|
||||||
|
f 76/55/6 67/56/6 77/57/6
|
||||||
|
f 47/17/2 26/10/2 45/11/2
|
||||||
|
f 5/16/5 26/47/5 8/17/5
|
||||||
|
f 33/58/6 48/59/6 55/60/6
|
||||||
|
f 29/38/2 42/3/2 49/29/2
|
||||||
|
f 32/44/6 52/21/6 53/45/6
|
||||||
|
f 58/15/6 34/33/6 56/34/6
|
||||||
|
f 27/7/6 46/29/6 43/8/6
|
||||||
|
f 73/61/6 68/62/6 61/63/6
|
||||||
|
f 21/58/6 42/29/6 28/38/6
|
||||||
|
f 11/29/1 9/58/1 12/27/1
|
||||||
|
f 59/45/1 36/2/1 60/3/1
|
||||||
|
f 60/9/6 35/10/6 57/11/6
|
||||||
|
f 41/1/1 21/64/1 27/2/1
|
||||||
|
f 72/6/2 48/65/2 50/66/2
|
||||||
|
f 50/66/2 71/67/2 70/68/2
|
||||||
|
f 70/68/2 75/17/2 73/69/2
|
||||||
|
f 76/4/2 77/70/2 74/5/2
|
||||||
|
f 77/70/2 78/71/2 74/5/2
|
||||||
|
f 50/66/2 70/68/2 73/69/2
|
||||||
|
f 73/69/2 76/4/2 72/6/2
|
||||||
|
f 72/6/2 50/66/2 73/69/2
|
||||||
|
f 8/7/2 7/64/2 6/1/2
|
||||||
|
f 15/9/1 14/39/1 13/10/1
|
||||||
|
f 51/12/3 62/72/3 71/13/3
|
||||||
|
f 56/15/2 34/73/2 32/16/2
|
||||||
|
f 32/26/3 34/74/3 38/75/3
|
||||||
|
f 35/76/3 36/77/3 37/78/3
|
||||||
|
f 32/26/3 38/75/3 35/76/3
|
||||||
|
f 29/66/3 33/79/3 31/80/3
|
||||||
|
f 32/26/3 35/76/3 3/25/3
|
||||||
|
f 28/51/3 29/66/3 31/80/3
|
||||||
|
f 31/80/3 32/26/3 18/24/3
|
||||||
|
f 3/25/3 4/81/3 17/82/3
|
||||||
|
f 35/76/3 37/78/3 3/25/3
|
||||||
|
f 21/83/3 28/51/3 22/84/3
|
||||||
|
f 3/25/3 17/82/3 18/24/3
|
||||||
|
f 11/85/3 12/55/3 30/52/3
|
||||||
|
f 32/26/3 3/25/3 18/24/3
|
||||||
|
f 11/85/3 30/52/3 22/84/3
|
||||||
|
f 31/80/3 18/24/3 11/85/3
|
||||||
|
f 24/86/3 27/87/3 21/83/3
|
||||||
|
f 28/51/3 31/80/3 11/85/3
|
||||||
|
f 11/85/3 22/84/3 28/51/3
|
||||||
|
f 24/86/3 21/83/3 23/20/3
|
||||||
|
f 26/88/3 25/89/3 23/20/3
|
||||||
|
f 23/20/3 21/83/3 15/18/3
|
||||||
|
f 15/18/3 16/90/3 7/91/3
|
||||||
|
f 21/83/3 22/84/3 15/18/3
|
||||||
|
f 8/19/3 26/88/3 23/20/3
|
||||||
|
f 15/18/3 7/91/3 8/19/3
|
||||||
|
f 22/21/2 30/49/2 40/22/2
|
||||||
|
f 47/89/4 45/88/4 5/19/4
|
||||||
|
f 5/19/4 6/91/4 13/90/4
|
||||||
|
f 5/19/4 13/90/4 14/18/4
|
||||||
|
f 44/20/4 47/89/4 5/19/4
|
||||||
|
f 43/87/4 46/86/4 44/20/4
|
||||||
|
f 41/83/4 43/87/4 44/20/4
|
||||||
|
f 44/20/4 5/19/4 14/18/4
|
||||||
|
f 39/84/4 40/52/4 80/50/4
|
||||||
|
f 44/20/4 14/18/4 41/83/4
|
||||||
|
f 42/51/4 41/83/4 39/84/4
|
||||||
|
f 39/84/4 80/50/4 50/92/4
|
||||||
|
f 41/83/4 14/18/4 39/84/4
|
||||||
|
f 48/93/4 49/66/4 42/51/4
|
||||||
|
f 50/92/4 48/93/4 42/51/4
|
||||||
|
f 80/50/4 79/94/4 50/92/4
|
||||||
|
f 50/92/4 42/51/4 39/84/4
|
||||||
|
f 54/79/4 55/62/4 52/80/4
|
||||||
|
f 50/92/4 79/94/4 51/95/4
|
||||||
|
f 52/80/4 55/62/4 51/95/4
|
||||||
|
f 51/95/4 79/94/4 10/85/4
|
||||||
|
f 79/94/4 9/55/4 10/85/4
|
||||||
|
f 53/26/4 52/80/4 10/85/4
|
||||||
|
f 58/75/4 56/74/4 53/26/4
|
||||||
|
f 59/78/4 60/77/4 57/76/4
|
||||||
|
f 57/76/4 58/75/4 53/26/4
|
||||||
|
f 52/80/4 51/95/4 10/85/4
|
||||||
|
f 19/24/4 20/82/4 1/81/4
|
||||||
|
f 53/26/4 10/85/4 19/24/4
|
||||||
|
f 59/78/4 57/76/4 2/25/4
|
||||||
|
f 19/24/4 1/81/4 2/25/4
|
||||||
|
f 2/25/4 57/76/4 53/26/4
|
||||||
|
f 70/27/5 71/96/5 62/28/5
|
||||||
|
f 11/30/5 18/97/5 19/31/5
|
||||||
|
f 4/15/5 1/73/5 20/33/5
|
||||||
|
f 72/35/3 74/54/3 64/36/3
|
||||||
|
f 13/8/5 6/29/5 7/38/5
|
||||||
|
f 23/39/6 25/10/6 47/11/6
|
||||||
|
f 68/40/7 75/98/7 70/41/7
|
||||||
|
f 30/11/5 12/17/5 79/99/5
|
||||||
|
f 79/99/10 80/43/10 30/11/10
|
||||||
|
f 12/17/5 9/16/5 79/99/5
|
||||||
|
f 3/15/1 2/73/1 1/32/1
|
||||||
|
f 20/44/2 19/58/2 18/27/2
|
||||||
|
f 74/17/5 78/100/5 65/46/5
|
||||||
|
f 31/43/1 33/99/1 54/47/1
|
||||||
|
f 22/47/5 39/99/5 14/43/5
|
||||||
|
f 46/1/2 24/64/2 23/7/2
|
||||||
|
f 57/21/1 35/23/1 38/22/1
|
||||||
|
f 61/50/9 66/53/9 76/51/9
|
||||||
|
f 37/45/5 59/44/5 2/23/5
|
||||||
|
f 78/28/3 77/51/3 67/53/3
|
||||||
|
f 62/67/1 51/66/1 69/68/1
|
||||||
|
f 51/66/1 55/65/1 63/6/1
|
||||||
|
f 68/17/1 69/68/1 61/69/1
|
||||||
|
f 61/69/1 69/68/1 51/66/1
|
||||||
|
f 61/69/1 51/66/1 63/6/1
|
||||||
|
f 65/71/1 67/70/1 64/5/1
|
||||||
|
f 61/69/1 63/6/1 66/4/1
|
||||||
|
f 64/5/1 67/70/1 66/4/1
|
||||||
|
f 76/55/6 66/85/6 67/56/6
|
||||||
|
f 47/17/2 25/16/2 26/10/2
|
||||||
|
f 5/16/5 45/99/5 26/47/5
|
||||||
|
f 55/60/6 54/101/6 33/58/6
|
||||||
|
f 33/58/6 29/22/6 48/59/6
|
||||||
|
f 48/59/6 72/102/6 63/103/6
|
||||||
|
f 29/22/6 49/104/6 48/59/6
|
||||||
|
f 48/59/6 63/103/6 55/60/6
|
||||||
|
f 29/38/2 28/2/2 42/3/2
|
||||||
|
f 32/44/6 31/23/6 52/21/6
|
||||||
|
f 58/15/6 38/73/6 34/33/6
|
||||||
|
f 27/7/6 24/38/6 46/29/6
|
||||||
|
f 73/61/6 75/105/6 68/62/6
|
||||||
|
f 21/58/6 41/27/6 42/29/6
|
||||||
|
f 11/29/1 10/38/1 9/58/1
|
||||||
|
f 59/45/1 37/44/1 36/2/1
|
||||||
|
f 60/9/6 36/39/6 35/10/6
|
BIN
mods/boats/textures/boats_inventory.png
Normal file
After Width: | Height: | Size: 851 B |
BIN
mods/boats/textures/boats_wield.png
Normal file
After Width: | Height: | Size: 546 B |
12
mods/bones/README.txt
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Minetest Game mod: bones
|
||||||
|
========================
|
||||||
|
See license.txt for license information.
|
||||||
|
|
||||||
|
Authors of source code
|
||||||
|
----------------------
|
||||||
|
Originally by PilzAdam (MIT)
|
||||||
|
Various Minetest developers and contributors (MIT)
|
||||||
|
|
||||||
|
Authors of media (textures)
|
||||||
|
---------------------------
|
||||||
|
All textures: paramat (CC BY-SA 3.0)
|
1
mods/bones/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
249
mods/bones/init.lua
Normal file
@ -0,0 +1,249 @@
|
|||||||
|
-- Minetest 0.4 mod: bones
|
||||||
|
-- See README.txt for licensing and other information.
|
||||||
|
|
||||||
|
local function is_owner(pos, name)
|
||||||
|
local owner = minetest.get_meta(pos):get_string("owner")
|
||||||
|
if owner == "" or owner == name or minetest.check_player_privs(name, "protection_bypass") then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
local bones_formspec =
|
||||||
|
"size[8,9]" ..
|
||||||
|
default.gui_bg ..
|
||||||
|
default.gui_bg_img ..
|
||||||
|
default.gui_slots ..
|
||||||
|
"list[current_name;main;0,0.3;8,4;]" ..
|
||||||
|
"list[current_player;main;0,4.85;8,1;]" ..
|
||||||
|
"list[current_player;main;0,6.08;8,3;8]" ..
|
||||||
|
"listring[current_name;main]" ..
|
||||||
|
"listring[current_player;main]" ..
|
||||||
|
default.get_hotbar_bg(0,4.85)
|
||||||
|
|
||||||
|
local share_bones_time = tonumber(minetest.settings:get("share_bones_time")) or 1200
|
||||||
|
local share_bones_time_early = tonumber(minetest.settings:get("share_bones_time_early")) or share_bones_time / 4
|
||||||
|
|
||||||
|
minetest.register_node("bones:bones", {
|
||||||
|
description = "Bones",
|
||||||
|
tiles = {
|
||||||
|
"bones_top.png^[transform2",
|
||||||
|
"bones_bottom.png",
|
||||||
|
"bones_side.png",
|
||||||
|
"bones_side.png",
|
||||||
|
"bones_rear.png",
|
||||||
|
"bones_front.png"
|
||||||
|
},
|
||||||
|
paramtype2 = "facedir",
|
||||||
|
groups = {dig_immediate = 2},
|
||||||
|
sounds = default.node_sound_gravel_defaults(),
|
||||||
|
|
||||||
|
can_dig = function(pos, player)
|
||||||
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
|
local name = ""
|
||||||
|
if player then
|
||||||
|
name = player:get_player_name()
|
||||||
|
end
|
||||||
|
return is_owner(pos, name) and inv:is_empty("main")
|
||||||
|
end,
|
||||||
|
|
||||||
|
allow_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
|
||||||
|
if is_owner(pos, player:get_player_name()) then
|
||||||
|
return count
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end,
|
||||||
|
|
||||||
|
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||||
|
return 0
|
||||||
|
end,
|
||||||
|
|
||||||
|
allow_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
if is_owner(pos, player:get_player_name()) then
|
||||||
|
return stack:get_count()
|
||||||
|
end
|
||||||
|
return 0
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
if meta:get_inventory():is_empty("main") then
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_punch = function(pos, node, player)
|
||||||
|
if not is_owner(pos, player:get_player_name()) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if minetest.get_meta(pos):get_string("infotext") == "" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local inv = minetest.get_meta(pos):get_inventory()
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
local has_space = true
|
||||||
|
|
||||||
|
for i = 1, inv:get_size("main") do
|
||||||
|
local stk = inv:get_stack("main", i)
|
||||||
|
if player_inv:room_for_item("main", stk) then
|
||||||
|
inv:set_stack("main", i, nil)
|
||||||
|
player_inv:add_item("main", stk)
|
||||||
|
else
|
||||||
|
has_space = false
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- remove bones if player emptied them
|
||||||
|
if has_space then
|
||||||
|
if player_inv:room_for_item("main", {name = "bones:bones"}) then
|
||||||
|
player_inv:add_item("main", {name = "bones:bones"})
|
||||||
|
else
|
||||||
|
minetest.add_item(pos,"bones:bones")
|
||||||
|
end
|
||||||
|
minetest.remove_node(pos)
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
|
||||||
|
on_timer = function(pos, elapsed)
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local time = meta:get_int("time") + elapsed
|
||||||
|
if time >= share_bones_time then
|
||||||
|
meta:set_string("infotext", meta:get_string("owner") .. "'s old bones")
|
||||||
|
meta:set_string("owner", "")
|
||||||
|
else
|
||||||
|
meta:set_int("time", time)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
on_blast = function(pos)
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
local function may_replace(pos, player)
|
||||||
|
local node_name = minetest.get_node(pos).name
|
||||||
|
local node_definition = minetest.registered_nodes[node_name]
|
||||||
|
|
||||||
|
-- if the node is unknown, we return false
|
||||||
|
if not node_definition then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- allow replacing air and liquids
|
||||||
|
if node_name == "air" or node_definition.liquidtype ~= "none" then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- don't replace filled chests and other nodes that don't allow it
|
||||||
|
local can_dig_func = node_definition.can_dig
|
||||||
|
if can_dig_func and not can_dig_func(pos, player) then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- default to each nodes buildable_to; if a placed block would replace it, why shouldn't bones?
|
||||||
|
-- flowers being squished by bones are more realistical than a squished stone, too
|
||||||
|
-- exception are of course any protected buildable_to
|
||||||
|
return node_definition.buildable_to and not minetest.is_protected(pos, player:get_player_name())
|
||||||
|
end
|
||||||
|
|
||||||
|
local drop = function(pos, itemstack)
|
||||||
|
local obj = minetest.add_item(pos, itemstack:take_item(itemstack:get_count()))
|
||||||
|
if obj then
|
||||||
|
obj:setvelocity({
|
||||||
|
x = math.random(-10, 10) / 9,
|
||||||
|
y = 5,
|
||||||
|
z = math.random(-10, 10) / 9,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_dieplayer(function(player)
|
||||||
|
|
||||||
|
local bones_mode = minetest.settings:get("bones_mode") or "bones"
|
||||||
|
if bones_mode ~= "bones" and bones_mode ~= "drop" and bones_mode ~= "keep" then
|
||||||
|
bones_mode = "bones"
|
||||||
|
end
|
||||||
|
|
||||||
|
-- return if keep inventory set or in creative mode
|
||||||
|
if bones_mode == "keep" or (creative and creative.is_enabled_for
|
||||||
|
and creative.is_enabled_for(player:get_player_name())) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local player_inv = player:get_inventory()
|
||||||
|
if player_inv:is_empty("main") and
|
||||||
|
player_inv:is_empty("craft") then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos = vector.round(player:getpos())
|
||||||
|
local player_name = player:get_player_name()
|
||||||
|
|
||||||
|
-- check if it's possible to place bones, if not find space near player
|
||||||
|
if bones_mode == "bones" and not may_replace(pos, player) then
|
||||||
|
local air = minetest.find_node_near(pos, 1, {"air"})
|
||||||
|
if air and not minetest.is_protected(air, player_name) then
|
||||||
|
pos = air
|
||||||
|
else
|
||||||
|
bones_mode = "drop"
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if bones_mode == "drop" then
|
||||||
|
|
||||||
|
-- drop inventory items
|
||||||
|
for i = 1, player_inv:get_size("main") do
|
||||||
|
drop(pos, player_inv:get_stack("main", i))
|
||||||
|
end
|
||||||
|
player_inv:set_list("main", {})
|
||||||
|
|
||||||
|
-- drop crafting grid items
|
||||||
|
for i = 1, player_inv:get_size("craft") do
|
||||||
|
drop(pos, player_inv:get_stack("craft", i))
|
||||||
|
end
|
||||||
|
player_inv:set_list("craft", {})
|
||||||
|
|
||||||
|
drop(pos, ItemStack("bones:bones"))
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local param2 = minetest.dir_to_facedir(player:get_look_dir())
|
||||||
|
minetest.set_node(pos, {name = "bones:bones", param2 = param2})
|
||||||
|
|
||||||
|
local meta = minetest.get_meta(pos)
|
||||||
|
local inv = meta:get_inventory()
|
||||||
|
inv:set_size("main", 8 * 4)
|
||||||
|
inv:set_list("main", player_inv:get_list("main"))
|
||||||
|
|
||||||
|
for i = 1, player_inv:get_size("craft") do
|
||||||
|
local stack = player_inv:get_stack("craft", i)
|
||||||
|
if inv:room_for_item("main", stack) then
|
||||||
|
inv:add_item("main", stack)
|
||||||
|
else
|
||||||
|
--drop if no space left
|
||||||
|
drop(pos, stack)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
player_inv:set_list("main", {})
|
||||||
|
player_inv:set_list("craft", {})
|
||||||
|
|
||||||
|
meta:set_string("formspec", bones_formspec)
|
||||||
|
meta:set_string("owner", player_name)
|
||||||
|
|
||||||
|
if share_bones_time ~= 0 then
|
||||||
|
meta:set_string("infotext", player_name .. "'s fresh bones")
|
||||||
|
|
||||||
|
if share_bones_time_early == 0 or not minetest.is_protected(pos, player_name) then
|
||||||
|
meta:set_int("time", 0)
|
||||||
|
else
|
||||||
|
meta:set_int("time", (share_bones_time - share_bones_time_early))
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.get_node_timer(pos):start(10)
|
||||||
|
else
|
||||||
|
meta:set_string("infotext", player_name.."'s bones")
|
||||||
|
end
|
||||||
|
end)
|
58
mods/bones/license.txt
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
License of source code
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
Copyright (C) 2012-2016 PilzAdam
|
||||||
|
Copyright (C) 2012-2016 Various Minetest developers and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||||
|
software and associated documentation files (the "Software"), to deal in the Software
|
||||||
|
without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||||
|
publish, distribute, sublicense, and/or sell copies of the Software, and to permit
|
||||||
|
persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all copies or
|
||||||
|
substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||||
|
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||||
|
PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||||
|
FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||||
|
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
|
||||||
|
Licenses of media (textures)
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
|
Copyright (C) 2016 paramat
|
||||||
|
|
||||||
|
You are free to:
|
||||||
|
Share — copy and redistribute the material in any medium or format.
|
||||||
|
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||||
|
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||||
|
|
||||||
|
Under the following terms:
|
||||||
|
|
||||||
|
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||||
|
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||||
|
that suggests the licensor endorses you or your use.
|
||||||
|
|
||||||
|
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||||
|
your contributions under the same license as the original.
|
||||||
|
|
||||||
|
No additional restrictions — You may not apply legal terms or technological measures that
|
||||||
|
legally restrict others from doing anything the license permits.
|
||||||
|
|
||||||
|
Notices:
|
||||||
|
|
||||||
|
You do not have to comply with the license for elements of the material in the public
|
||||||
|
domain or where your use is permitted by an applicable exception or limitation.
|
||||||
|
No warranties are given. The license may not give you all of the permissions necessary
|
||||||
|
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||||
|
rights may limit how you use the material.
|
||||||
|
|
BIN
mods/bones/textures/bones_bottom.png
Normal file
After Width: | Height: | Size: 740 B |
BIN
mods/bones/textures/bones_front.png
Normal file
After Width: | Height: | Size: 656 B |
BIN
mods/bones/textures/bones_rear.png
Normal file
After Width: | Height: | Size: 637 B |
BIN
mods/bones/textures/bones_side.png
Normal file
After Width: | Height: | Size: 700 B |
BIN
mods/bones/textures/bones_top.png
Normal file
After Width: | Height: | Size: 662 B |
13
mods/bucket/README.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
Minetest Game mod: bucket
|
||||||
|
=========================
|
||||||
|
See license.txt for license information.
|
||||||
|
|
||||||
|
Authors of source code
|
||||||
|
----------------------
|
||||||
|
Kahrl <kahrl@gmx.net> (LGPL 2.1)
|
||||||
|
celeron55, Perttu Ahola <celeron55@gmail.com> (LGPL 2.1)
|
||||||
|
Various Minetest developers and contributors (LGPL 2.1)
|
||||||
|
|
||||||
|
Authors of media (textures)
|
||||||
|
---------------------------
|
||||||
|
ElementW (CC BY-SA 3.0)
|
2
mods/bucket/depends.txt
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
default
|
||||||
|
|
215
mods/bucket/init.lua
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
-- Minetest 0.4 mod: bucket
|
||||||
|
-- See README.txt for licensing and other information.
|
||||||
|
|
||||||
|
minetest.register_alias("bucket", "bucket:bucket_empty")
|
||||||
|
minetest.register_alias("bucket_water", "bucket:bucket_water")
|
||||||
|
minetest.register_alias("bucket_lava", "bucket:bucket_lava")
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = 'bucket:bucket_empty 1',
|
||||||
|
recipe = {
|
||||||
|
{'default:steel_ingot', '', 'default:steel_ingot'},
|
||||||
|
{'', 'default:steel_ingot', ''},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
bucket = {}
|
||||||
|
bucket.liquids = {}
|
||||||
|
|
||||||
|
local function check_protection(pos, name, text)
|
||||||
|
if minetest.is_protected(pos, name) then
|
||||||
|
minetest.log("action", (name ~= "" and name or "A mod")
|
||||||
|
.. " tried to " .. text
|
||||||
|
.. " at protected position "
|
||||||
|
.. minetest.pos_to_string(pos)
|
||||||
|
.. " with a bucket")
|
||||||
|
minetest.record_protection_violation(pos, name)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Register a new liquid
|
||||||
|
-- source = name of the source node
|
||||||
|
-- flowing = name of the flowing node
|
||||||
|
-- itemname = name of the new bucket item (or nil if liquid is not takeable)
|
||||||
|
-- inventory_image = texture of the new bucket item (ignored if itemname == nil)
|
||||||
|
-- name = text description of the bucket item
|
||||||
|
-- groups = (optional) groups of the bucket item, for example {water_bucket = 1}
|
||||||
|
-- force_renew = (optional) bool. Force the liquid source to renew if it has a
|
||||||
|
-- source neighbour, even if defined as 'liquid_renewable = false'.
|
||||||
|
-- Needed to avoid creating holes in sloping rivers.
|
||||||
|
-- This function can be called from any mod (that depends on bucket).
|
||||||
|
function bucket.register_liquid(source, flowing, itemname, inventory_image, name,
|
||||||
|
groups, force_renew)
|
||||||
|
bucket.liquids[source] = {
|
||||||
|
source = source,
|
||||||
|
flowing = flowing,
|
||||||
|
itemname = itemname,
|
||||||
|
force_renew = force_renew,
|
||||||
|
}
|
||||||
|
bucket.liquids[flowing] = bucket.liquids[source]
|
||||||
|
|
||||||
|
if itemname ~= nil then
|
||||||
|
minetest.register_craftitem(itemname, {
|
||||||
|
description = name,
|
||||||
|
inventory_image = inventory_image,
|
||||||
|
stack_max = 1,
|
||||||
|
liquids_pointable = true,
|
||||||
|
groups = groups,
|
||||||
|
|
||||||
|
on_place = function(itemstack, user, pointed_thing)
|
||||||
|
-- Must be pointing to node
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local node = minetest.get_node_or_nil(pointed_thing.under)
|
||||||
|
local ndef = node and minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
|
-- Call on_rightclick if the pointed node defines it
|
||||||
|
if ndef and ndef.on_rightclick and
|
||||||
|
user and not user:get_player_control().sneak then
|
||||||
|
return ndef.on_rightclick(
|
||||||
|
pointed_thing.under,
|
||||||
|
node, user,
|
||||||
|
itemstack)
|
||||||
|
end
|
||||||
|
|
||||||
|
local lpos
|
||||||
|
|
||||||
|
-- Check if pointing to a buildable node
|
||||||
|
if ndef and ndef.buildable_to then
|
||||||
|
-- buildable; replace the node
|
||||||
|
lpos = pointed_thing.under
|
||||||
|
else
|
||||||
|
-- not buildable to; place the liquid above
|
||||||
|
-- check if the node above can be replaced
|
||||||
|
|
||||||
|
lpos = pointed_thing.above
|
||||||
|
node = minetest.get_node_or_nil(lpos)
|
||||||
|
local above_ndef = node and minetest.registered_nodes[node.name]
|
||||||
|
|
||||||
|
if not above_ndef or not above_ndef.buildable_to then
|
||||||
|
-- do not remove the bucket with the liquid
|
||||||
|
return itemstack
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if check_protection(lpos, user
|
||||||
|
and user:get_player_name()
|
||||||
|
or "", "place "..source) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.set_node(lpos, {name = source})
|
||||||
|
return ItemStack("bucket:bucket_empty")
|
||||||
|
end
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_craftitem("bucket:bucket_empty", {
|
||||||
|
description = "Empty Bucket",
|
||||||
|
inventory_image = "bucket.png",
|
||||||
|
stack_max = 99,
|
||||||
|
liquids_pointable = true,
|
||||||
|
on_use = function(itemstack, user, pointed_thing)
|
||||||
|
if pointed_thing.type == "object" then
|
||||||
|
pointed_thing.ref:punch(user, 1.0, { full_punch_interval=1.0 }, nil)
|
||||||
|
return user:get_wielded_item()
|
||||||
|
elseif pointed_thing.type ~= "node" then
|
||||||
|
-- do nothing if it's neither object nor node
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- Check if pointing to a liquid source
|
||||||
|
local node = minetest.get_node(pointed_thing.under)
|
||||||
|
local liquiddef = bucket.liquids[node.name]
|
||||||
|
local item_count = user:get_wielded_item():get_count()
|
||||||
|
|
||||||
|
if liquiddef ~= nil
|
||||||
|
and liquiddef.itemname ~= nil
|
||||||
|
and node.name == liquiddef.source then
|
||||||
|
if check_protection(pointed_thing.under,
|
||||||
|
user:get_player_name(),
|
||||||
|
"take ".. node.name) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
-- default set to return filled bucket
|
||||||
|
local giving_back = liquiddef.itemname
|
||||||
|
|
||||||
|
-- check if holding more than 1 empty bucket
|
||||||
|
if item_count > 1 then
|
||||||
|
|
||||||
|
-- if space in inventory add filled bucked, otherwise drop as item
|
||||||
|
local inv = user:get_inventory()
|
||||||
|
if inv:room_for_item("main", {name=liquiddef.itemname}) then
|
||||||
|
inv:add_item("main", liquiddef.itemname)
|
||||||
|
else
|
||||||
|
local pos = user:getpos()
|
||||||
|
pos.y = math.floor(pos.y + 0.5)
|
||||||
|
minetest.add_item(pos, liquiddef.itemname)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- set to return empty buckets minus 1
|
||||||
|
giving_back = "bucket:bucket_empty "..tostring(item_count-1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- force_renew requires a source neighbour
|
||||||
|
local source_neighbor = false
|
||||||
|
if liquiddef.force_renew then
|
||||||
|
source_neighbor =
|
||||||
|
minetest.find_node_near(pointed_thing.under, 1, liquiddef.source)
|
||||||
|
end
|
||||||
|
if not (source_neighbor and liquiddef.force_renew) then
|
||||||
|
minetest.add_node(pointed_thing.under, {name = "air"})
|
||||||
|
end
|
||||||
|
|
||||||
|
return ItemStack(giving_back)
|
||||||
|
else
|
||||||
|
-- non-liquid nodes will have their on_punch triggered
|
||||||
|
local node_def = minetest.registered_nodes[node.name]
|
||||||
|
if node_def then
|
||||||
|
node_def.on_punch(pointed_thing.under, node, user, pointed_thing)
|
||||||
|
end
|
||||||
|
return user:get_wielded_item()
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
bucket.register_liquid(
|
||||||
|
"default:water_source",
|
||||||
|
"default:water_flowing",
|
||||||
|
"bucket:bucket_water",
|
||||||
|
"bucket_water.png",
|
||||||
|
"Water Bucket",
|
||||||
|
{water_bucket = 1}
|
||||||
|
)
|
||||||
|
|
||||||
|
bucket.register_liquid(
|
||||||
|
"default:river_water_source",
|
||||||
|
"default:river_water_flowing",
|
||||||
|
"bucket:bucket_river_water",
|
||||||
|
"bucket_river_water.png",
|
||||||
|
"River Water Bucket",
|
||||||
|
{water_bucket = 1},
|
||||||
|
true
|
||||||
|
)
|
||||||
|
|
||||||
|
bucket.register_liquid(
|
||||||
|
"default:lava_source",
|
||||||
|
"default:lava_flowing",
|
||||||
|
"bucket:bucket_lava",
|
||||||
|
"bucket_lava.png",
|
||||||
|
"Lava Bucket"
|
||||||
|
)
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
type = "fuel",
|
||||||
|
recipe = "bucket:bucket_lava",
|
||||||
|
burntime = 60,
|
||||||
|
replacements = {{"bucket:bucket_lava", "bucket:bucket_empty"}},
|
||||||
|
})
|
||||||
|
|
51
mods/bucket/license.txt
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
License of source code
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
GNU Lesser General Public License, version 2.1
|
||||||
|
Copyright (C) 2011-2016 Kahrl <kahrl@gmx.net>
|
||||||
|
Copyright (C) 2011-2016 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||||
|
Copyright (C) 2011-2016 Various Minetest developers and contributors
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it under the terms
|
||||||
|
of the GNU Lesser General Public License as published by the Free Software Foundation;
|
||||||
|
either version 2.1 of the License, or (at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||||
|
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
|
See the GNU Lesser General Public License for more details:
|
||||||
|
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
|
||||||
|
|
||||||
|
|
||||||
|
Licenses of media (textures)
|
||||||
|
----------------------------
|
||||||
|
|
||||||
|
Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
|
||||||
|
Copyright (C) 2015-2016 ElementW
|
||||||
|
|
||||||
|
You are free to:
|
||||||
|
Share — copy and redistribute the material in any medium or format.
|
||||||
|
Adapt — remix, transform, and build upon the material for any purpose, even commercially.
|
||||||
|
The licensor cannot revoke these freedoms as long as you follow the license terms.
|
||||||
|
|
||||||
|
Under the following terms:
|
||||||
|
|
||||||
|
Attribution — You must give appropriate credit, provide a link to the license, and
|
||||||
|
indicate if changes were made. You may do so in any reasonable manner, but not in any way
|
||||||
|
that suggests the licensor endorses you or your use.
|
||||||
|
|
||||||
|
ShareAlike — If you remix, transform, or build upon the material, you must distribute
|
||||||
|
your contributions under the same license as the original.
|
||||||
|
|
||||||
|
No additional restrictions — You may not apply legal terms or technological measures that
|
||||||
|
legally restrict others from doing anything the license permits.
|
||||||
|
|
||||||
|
Notices:
|
||||||
|
|
||||||
|
You do not have to comply with the license for elements of the material in the public
|
||||||
|
domain or where your use is permitted by an applicable exception or limitation.
|
||||||
|
No warranties are given. The license may not give you all of the permissions necessary
|
||||||
|
for your intended use. For example, other rights such as publicity, privacy, or moral
|
||||||
|
rights may limit how you use the material.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
http://creativecommons.org/licenses/by-sa/3.0/
|
BIN
mods/bucket/textures/bucket.png
Normal file
After Width: | Height: | Size: 205 B |
BIN
mods/bucket/textures/bucket_lava.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
mods/bucket/textures/bucket_river_water.png
Normal file
After Width: | Height: | Size: 221 B |
BIN
mods/bucket/textures/bucket_water.png
Normal file
After Width: | Height: | Size: 221 B |
22
mods/carts/README.txt
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
Carts (formerly boost_cart)
|
||||||
|
==========================
|
||||||
|
|
||||||
|
Carts, based almost entirely on the mod boost_cart [1], which
|
||||||
|
itself is based on (and fully compatible with) the carts mod [2].
|
||||||
|
|
||||||
|
The model was originally designed by stujones11 [3] (CC-0).
|
||||||
|
|
||||||
|
Cart textures are based on original work from PixelBOX (WTFPL).
|
||||||
|
|
||||||
|
|
||||||
|
[1] https://github.com/SmallJoker/boost_cart/
|
||||||
|
[2] https://github.com/PilzAdam/carts/
|
||||||
|
[3] https://github.com/stujones11/railcart/
|
||||||
|
|
||||||
|
|
||||||
|
Features
|
||||||
|
----------
|
||||||
|
- A fast cart for your railway or roller coaster (up to 7 m/s!)
|
||||||
|
- Boost and brake rails
|
||||||
|
- Rail junction switching with the 'right-left' walking keys
|
||||||
|
- Handbrake with the 'back' key
|
403
mods/carts/cart_entity.lua
Normal file
@ -0,0 +1,403 @@
|
|||||||
|
local cart_entity = {
|
||||||
|
physical = false, -- otherwise going uphill breaks
|
||||||
|
collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5},
|
||||||
|
visual = "mesh",
|
||||||
|
mesh = "carts_cart.b3d",
|
||||||
|
visual_size = {x=1, y=1},
|
||||||
|
textures = {"carts_cart.png"},
|
||||||
|
|
||||||
|
driver = nil,
|
||||||
|
punched = false, -- used to re-send velocity and position
|
||||||
|
velocity = {x=0, y=0, z=0}, -- only used on punch
|
||||||
|
old_dir = {x=1, y=0, z=0}, -- random value to start the cart on punch
|
||||||
|
old_pos = nil,
|
||||||
|
old_switch = 0,
|
||||||
|
railtype = nil,
|
||||||
|
attached_items = {}
|
||||||
|
}
|
||||||
|
|
||||||
|
function cart_entity:on_rightclick(clicker)
|
||||||
|
if not clicker or not clicker:is_player() then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local player_name = clicker:get_player_name()
|
||||||
|
if self.driver and player_name == self.driver then
|
||||||
|
self.driver = nil
|
||||||
|
carts:manage_attachment(clicker, nil)
|
||||||
|
elseif not self.driver then
|
||||||
|
self.driver = player_name
|
||||||
|
carts:manage_attachment(clicker, self.object)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function cart_entity:on_activate(staticdata, dtime_s)
|
||||||
|
self.object:set_armor_groups({immortal=1})
|
||||||
|
if string.sub(staticdata, 1, string.len("return")) ~= "return" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local data = minetest.deserialize(staticdata)
|
||||||
|
if not data or type(data) ~= "table" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.railtype = data.railtype
|
||||||
|
if data.old_dir then
|
||||||
|
self.old_dir = data.old_dir
|
||||||
|
end
|
||||||
|
if data.old_vel then
|
||||||
|
self.old_vel = data.old_vel
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function cart_entity:get_staticdata()
|
||||||
|
return minetest.serialize({
|
||||||
|
railtype = self.railtype,
|
||||||
|
old_dir = self.old_dir,
|
||||||
|
old_vel = self.old_vel
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
function cart_entity:on_punch(puncher, time_from_last_punch, tool_capabilities, direction)
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
if not self.railtype then
|
||||||
|
local node = minetest.get_node(pos).name
|
||||||
|
self.railtype = minetest.get_item_group(node, "connect_to_raillike")
|
||||||
|
end
|
||||||
|
-- Punched by non-player
|
||||||
|
if not puncher or not puncher:is_player() then
|
||||||
|
local cart_dir = carts:get_rail_direction(pos, self.old_dir, nil, nil, self.railtype)
|
||||||
|
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.velocity = vector.multiply(cart_dir, 2)
|
||||||
|
self.punched = true
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- Player digs cart by sneak-punch
|
||||||
|
if puncher:get_player_control().sneak then
|
||||||
|
if self.sound_handle then
|
||||||
|
minetest.sound_stop(self.sound_handle)
|
||||||
|
end
|
||||||
|
-- Detach driver and items
|
||||||
|
if self.driver then
|
||||||
|
if self.old_pos then
|
||||||
|
self.object:setpos(self.old_pos)
|
||||||
|
end
|
||||||
|
local player = minetest.get_player_by_name(self.driver)
|
||||||
|
carts:manage_attachment(player, nil)
|
||||||
|
end
|
||||||
|
for _,obj_ in ipairs(self.attached_items) do
|
||||||
|
if obj_ then
|
||||||
|
obj_:set_detach()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Pick up cart
|
||||||
|
local inv = puncher:get_inventory()
|
||||||
|
if not (creative and creative.is_enabled_for
|
||||||
|
and creative.is_enabled_for(puncher:get_player_name()))
|
||||||
|
or not inv:contains_item("main", "carts:cart") then
|
||||||
|
local leftover = inv:add_item("main", "carts:cart")
|
||||||
|
-- If no room in inventory add a replacement cart to the world
|
||||||
|
if not leftover:is_empty() then
|
||||||
|
minetest.add_item(self.object:getpos(), leftover)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.object:remove()
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- Player punches cart to alter velocity
|
||||||
|
local vel = self.object:getvelocity()
|
||||||
|
if puncher:get_player_name() == self.driver then
|
||||||
|
if math.abs(vel.x + vel.z) > carts.punch_speed_max then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local punch_dir = carts:velocity_to_dir(puncher:get_look_dir())
|
||||||
|
punch_dir.y = 0
|
||||||
|
local cart_dir = carts:get_rail_direction(pos, punch_dir, nil, nil, self.railtype)
|
||||||
|
if vector.equals(cart_dir, {x=0, y=0, z=0}) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local punch_interval = 1
|
||||||
|
if tool_capabilities and tool_capabilities.full_punch_interval then
|
||||||
|
punch_interval = tool_capabilities.full_punch_interval
|
||||||
|
end
|
||||||
|
time_from_last_punch = math.min(time_from_last_punch or punch_interval, punch_interval)
|
||||||
|
local f = 2 * (time_from_last_punch / punch_interval)
|
||||||
|
|
||||||
|
self.velocity = vector.multiply(cart_dir, f)
|
||||||
|
self.old_dir = cart_dir
|
||||||
|
self.punched = true
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rail_on_step_event(handler, obj, dtime)
|
||||||
|
if handler then
|
||||||
|
handler(obj, dtime)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- sound refresh interval = 1.0sec
|
||||||
|
local function rail_sound(self, dtime)
|
||||||
|
if not self.sound_ttl then
|
||||||
|
self.sound_ttl = 1.0
|
||||||
|
return
|
||||||
|
elseif self.sound_ttl > 0 then
|
||||||
|
self.sound_ttl = self.sound_ttl - dtime
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.sound_ttl = 1.0
|
||||||
|
if self.sound_handle then
|
||||||
|
local handle = self.sound_handle
|
||||||
|
self.sound_handle = nil
|
||||||
|
minetest.after(0.2, minetest.sound_stop, handle)
|
||||||
|
end
|
||||||
|
local vel = self.object:getvelocity()
|
||||||
|
local speed = vector.length(vel)
|
||||||
|
if speed > 0 then
|
||||||
|
self.sound_handle = minetest.sound_play(
|
||||||
|
"carts_cart_moving", {
|
||||||
|
object = self.object,
|
||||||
|
gain = (speed / carts.speed_max) / 2,
|
||||||
|
loop = true,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local function get_railparams(pos)
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
return carts.railparams[node.name] or {}
|
||||||
|
end
|
||||||
|
|
||||||
|
local function rail_on_step(self, dtime)
|
||||||
|
local vel = self.object:getvelocity()
|
||||||
|
if self.punched then
|
||||||
|
vel = vector.add(vel, self.velocity)
|
||||||
|
self.object:setvelocity(vel)
|
||||||
|
self.old_dir.y = 0
|
||||||
|
elseif vector.equals(vel, {x=0, y=0, z=0}) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local pos = self.object:getpos()
|
||||||
|
local update = {}
|
||||||
|
|
||||||
|
-- stop cart if velocity vector flips
|
||||||
|
if self.old_vel and self.old_vel.y == 0 and
|
||||||
|
(self.old_vel.x * vel.x < 0 or self.old_vel.z * vel.z < 0) then
|
||||||
|
self.old_vel = {x = 0, y = 0, z = 0}
|
||||||
|
self.old_pos = pos
|
||||||
|
self.object:setvelocity(vector.new())
|
||||||
|
self.object:setacceleration(vector.new())
|
||||||
|
rail_on_step_event(get_railparams(pos).on_step, self, dtime)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
self.old_vel = vector.new(vel)
|
||||||
|
|
||||||
|
if self.old_pos and not self.punched then
|
||||||
|
local flo_pos = vector.round(pos)
|
||||||
|
local flo_old = vector.round(self.old_pos)
|
||||||
|
if vector.equals(flo_pos, flo_old) then
|
||||||
|
-- Do not check one node multiple times
|
||||||
|
return
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local ctrl, player
|
||||||
|
|
||||||
|
-- Get player controls
|
||||||
|
if self.driver then
|
||||||
|
player = minetest.get_player_by_name(self.driver)
|
||||||
|
if player then
|
||||||
|
ctrl = player:get_player_control()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
if self.old_pos then
|
||||||
|
-- Detection for "skipping" nodes
|
||||||
|
local found_path = carts:pathfinder(
|
||||||
|
pos, self.old_pos, self.old_dir, ctrl, self.old_switch, self.railtype
|
||||||
|
)
|
||||||
|
|
||||||
|
if not found_path then
|
||||||
|
-- No rail found: reset back to the expected position
|
||||||
|
pos = vector.new(self.old_pos)
|
||||||
|
update.pos = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
local cart_dir = carts:velocity_to_dir(vel)
|
||||||
|
local railparams
|
||||||
|
|
||||||
|
-- dir: New moving direction of the cart
|
||||||
|
-- switch_keys: Currently pressed L/R key, used to ignore the key on the next rail node
|
||||||
|
local dir, switch_keys = carts:get_rail_direction(
|
||||||
|
pos, cart_dir, ctrl, self.old_switch, self.railtype
|
||||||
|
)
|
||||||
|
|
||||||
|
local new_acc = {x=0, y=0, z=0}
|
||||||
|
if vector.equals(dir, {x=0, y=0, z=0}) then
|
||||||
|
vel = {x = 0, y = 0, z = 0}
|
||||||
|
pos = vector.round(pos)
|
||||||
|
update.pos = true
|
||||||
|
update.vel = true
|
||||||
|
else
|
||||||
|
-- Direction change detected
|
||||||
|
if not vector.equals(dir, self.old_dir) then
|
||||||
|
vel = vector.multiply(dir, math.abs(vel.x + vel.z))
|
||||||
|
update.vel = true
|
||||||
|
if dir.y ~= self.old_dir.y then
|
||||||
|
pos = vector.round(pos)
|
||||||
|
update.pos = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Center on the rail
|
||||||
|
if dir.z ~= 0 and math.floor(pos.x + 0.5) ~= pos.x then
|
||||||
|
pos.x = math.floor(pos.x + 0.5)
|
||||||
|
update.pos = true
|
||||||
|
end
|
||||||
|
if dir.x ~= 0 and math.floor(pos.z + 0.5) ~= pos.z then
|
||||||
|
pos.z = math.floor(pos.z + 0.5)
|
||||||
|
update.pos = true
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Slow down or speed up..
|
||||||
|
local acc = dir.y * -4.0
|
||||||
|
|
||||||
|
-- Get rail for corrected position
|
||||||
|
railparams = get_railparams(pos)
|
||||||
|
|
||||||
|
-- no need to check for railparams == nil since we always make it exist.
|
||||||
|
local speed_mod = railparams.acceleration
|
||||||
|
if speed_mod and speed_mod ~= 0 then
|
||||||
|
-- Try to make it similar to the original carts mod
|
||||||
|
acc = acc + speed_mod
|
||||||
|
else
|
||||||
|
-- Handbrake or coast
|
||||||
|
if ctrl and ctrl.down then
|
||||||
|
acc = acc - 3
|
||||||
|
else
|
||||||
|
acc = acc - 0.4
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
new_acc = vector.multiply(dir, acc)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Limits
|
||||||
|
local max_vel = carts.speed_max
|
||||||
|
for _, v in pairs({"x","y","z"}) do
|
||||||
|
if math.abs(vel[v]) > max_vel then
|
||||||
|
vel[v] = carts:get_sign(vel[v]) * max_vel
|
||||||
|
new_acc[v] = 0
|
||||||
|
update.vel = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
self.object:setacceleration(new_acc)
|
||||||
|
self.old_pos = vector.new(pos)
|
||||||
|
if not vector.equals(dir, {x=0, y=0, z=0}) then
|
||||||
|
self.old_dir = vector.new(dir)
|
||||||
|
end
|
||||||
|
self.old_switch = switch_keys
|
||||||
|
|
||||||
|
if self.punched then
|
||||||
|
-- Collect dropped items
|
||||||
|
for _, obj_ in pairs(minetest.get_objects_inside_radius(pos, 1)) do
|
||||||
|
if not obj_:is_player() and
|
||||||
|
obj_:get_luaentity() and
|
||||||
|
not obj_:get_luaentity().physical_state and
|
||||||
|
obj_:get_luaentity().name == "__builtin:item" then
|
||||||
|
|
||||||
|
obj_:set_attach(self.object, "", {x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||||
|
self.attached_items[#self.attached_items + 1] = obj_
|
||||||
|
end
|
||||||
|
end
|
||||||
|
self.punched = false
|
||||||
|
update.vel = true
|
||||||
|
end
|
||||||
|
|
||||||
|
railparams = railparams or get_railparams(pos)
|
||||||
|
|
||||||
|
if not (update.vel or update.pos) then
|
||||||
|
rail_on_step_event(railparams.on_step, self, dtime)
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local yaw = 0
|
||||||
|
if self.old_dir.x < 0 then
|
||||||
|
yaw = 0.5
|
||||||
|
elseif self.old_dir.x > 0 then
|
||||||
|
yaw = 1.5
|
||||||
|
elseif self.old_dir.z < 0 then
|
||||||
|
yaw = 1
|
||||||
|
end
|
||||||
|
self.object:setyaw(yaw * math.pi)
|
||||||
|
|
||||||
|
local anim = {x=0, y=0}
|
||||||
|
if dir.y == -1 then
|
||||||
|
anim = {x=1, y=1}
|
||||||
|
elseif dir.y == 1 then
|
||||||
|
anim = {x=2, y=2}
|
||||||
|
end
|
||||||
|
self.object:set_animation(anim, 1, 0)
|
||||||
|
|
||||||
|
self.object:setvelocity(vel)
|
||||||
|
if update.pos then
|
||||||
|
self.object:setpos(pos)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- call event handler
|
||||||
|
rail_on_step_event(railparams.on_step, self, dtime)
|
||||||
|
end
|
||||||
|
|
||||||
|
function cart_entity:on_step(dtime)
|
||||||
|
rail_on_step(self, dtime)
|
||||||
|
rail_sound(self, dtime)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_entity("carts:cart", cart_entity)
|
||||||
|
|
||||||
|
minetest.register_craftitem("carts:cart", {
|
||||||
|
description = "Cart (Sneak+Click to pick up)",
|
||||||
|
inventory_image = minetest.inventorycube("carts_cart_top.png", "carts_cart_side.png", "carts_cart_side.png"),
|
||||||
|
wield_image = "carts_cart_side.png",
|
||||||
|
on_place = function(itemstack, placer, pointed_thing)
|
||||||
|
local under = pointed_thing.under
|
||||||
|
local node = minetest.get_node(under)
|
||||||
|
local udef = minetest.registered_nodes[node.name]
|
||||||
|
if udef and udef.on_rightclick and
|
||||||
|
not (placer and placer:get_player_control().sneak) then
|
||||||
|
return udef.on_rightclick(under, node, placer, itemstack,
|
||||||
|
pointed_thing) or itemstack
|
||||||
|
end
|
||||||
|
|
||||||
|
if not pointed_thing.type == "node" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
if carts:is_rail(pointed_thing.under) then
|
||||||
|
minetest.add_entity(pointed_thing.under, "carts:cart")
|
||||||
|
elseif carts:is_rail(pointed_thing.above) then
|
||||||
|
minetest.add_entity(pointed_thing.above, "carts:cart")
|
||||||
|
else
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.sound_play({name = "default_place_node_metal", gain = 0.5},
|
||||||
|
{pos = pointed_thing.above})
|
||||||
|
|
||||||
|
if not (creative and creative.is_enabled_for
|
||||||
|
and creative.is_enabled_for(placer:get_player_name())) then
|
||||||
|
itemstack:take_item()
|
||||||
|
end
|
||||||
|
return itemstack
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "carts:cart",
|
||||||
|
recipe = {
|
||||||
|
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "default:steel_ingot", "default:steel_ingot"},
|
||||||
|
},
|
||||||
|
})
|
1
mods/carts/depends.txt
Normal file
@ -0,0 +1 @@
|
|||||||
|
default
|
221
mods/carts/functions.lua
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
function carts:get_sign(z)
|
||||||
|
if z == 0 then
|
||||||
|
return 0
|
||||||
|
else
|
||||||
|
return z / math.abs(z)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:manage_attachment(player, obj)
|
||||||
|
if not player then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local status = obj ~= nil
|
||||||
|
local player_name = player:get_player_name()
|
||||||
|
if default.player_attached[player_name] == status then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
default.player_attached[player_name] = status
|
||||||
|
|
||||||
|
if status then
|
||||||
|
player:set_attach(obj, "", {x=0, y=6, z=0}, {x=0, y=0, z=0})
|
||||||
|
player:set_eye_offset({x=0, y=-4, z=0},{x=0, y=-4, z=0})
|
||||||
|
else
|
||||||
|
player:set_detach()
|
||||||
|
player:set_eye_offset({x=0, y=0, z=0},{x=0, y=0, z=0})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:velocity_to_dir(v)
|
||||||
|
if math.abs(v.x) > math.abs(v.z) then
|
||||||
|
return {x=carts:get_sign(v.x), y=carts:get_sign(v.y), z=0}
|
||||||
|
else
|
||||||
|
return {x=0, y=carts:get_sign(v.y), z=carts:get_sign(v.z)}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:is_rail(pos, railtype)
|
||||||
|
local node = minetest.get_node(pos).name
|
||||||
|
if node == "ignore" then
|
||||||
|
local vm = minetest.get_voxel_manip()
|
||||||
|
local emin, emax = vm:read_from_map(pos, pos)
|
||||||
|
local area = VoxelArea:new{
|
||||||
|
MinEdge = emin,
|
||||||
|
MaxEdge = emax,
|
||||||
|
}
|
||||||
|
local data = vm:get_data()
|
||||||
|
local vi = area:indexp(pos)
|
||||||
|
node = minetest.get_name_from_content_id(data[vi])
|
||||||
|
end
|
||||||
|
if minetest.get_item_group(node, "rail") == 0 then
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
if not railtype then
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
return minetest.get_item_group(node, "connect_to_raillike") == railtype
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:check_front_up_down(pos, dir_, check_up, railtype)
|
||||||
|
local dir = vector.new(dir_)
|
||||||
|
local cur
|
||||||
|
|
||||||
|
-- Front
|
||||||
|
dir.y = 0
|
||||||
|
cur = vector.add(pos, dir)
|
||||||
|
if carts:is_rail(cur, railtype) then
|
||||||
|
return dir
|
||||||
|
end
|
||||||
|
-- Up
|
||||||
|
if check_up then
|
||||||
|
dir.y = 1
|
||||||
|
cur = vector.add(pos, dir)
|
||||||
|
if carts:is_rail(cur, railtype) then
|
||||||
|
return dir
|
||||||
|
end
|
||||||
|
end
|
||||||
|
-- Down
|
||||||
|
dir.y = -1
|
||||||
|
cur = vector.add(pos, dir)
|
||||||
|
if carts:is_rail(cur, railtype) then
|
||||||
|
return dir
|
||||||
|
end
|
||||||
|
return nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:get_rail_direction(pos_, dir, ctrl, old_switch, railtype)
|
||||||
|
local pos = vector.round(pos_)
|
||||||
|
local cur
|
||||||
|
local left_check, right_check = true, true
|
||||||
|
|
||||||
|
-- Check left and right
|
||||||
|
local left = {x=0, y=0, z=0}
|
||||||
|
local right = {x=0, y=0, z=0}
|
||||||
|
if dir.z ~= 0 and dir.x == 0 then
|
||||||
|
left.x = -dir.z
|
||||||
|
right.x = dir.z
|
||||||
|
elseif dir.x ~= 0 and dir.z == 0 then
|
||||||
|
left.z = dir.x
|
||||||
|
right.z = -dir.x
|
||||||
|
end
|
||||||
|
|
||||||
|
if ctrl then
|
||||||
|
if old_switch == 1 then
|
||||||
|
left_check = false
|
||||||
|
elseif old_switch == 2 then
|
||||||
|
right_check = false
|
||||||
|
end
|
||||||
|
if ctrl.left and left_check then
|
||||||
|
cur = carts:check_front_up_down(pos, left, false, railtype)
|
||||||
|
if cur then
|
||||||
|
return cur, 1
|
||||||
|
end
|
||||||
|
left_check = false
|
||||||
|
end
|
||||||
|
if ctrl.right and right_check then
|
||||||
|
cur = carts:check_front_up_down(pos, right, false, railtype)
|
||||||
|
if cur then
|
||||||
|
return cur, 2
|
||||||
|
end
|
||||||
|
right_check = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Normal
|
||||||
|
cur = carts:check_front_up_down(pos, dir, true, railtype)
|
||||||
|
if cur then
|
||||||
|
return cur
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Left, if not already checked
|
||||||
|
if left_check then
|
||||||
|
cur = carts:check_front_up_down(pos, left, false, railtype)
|
||||||
|
if cur then
|
||||||
|
return cur
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Right, if not already checked
|
||||||
|
if right_check then
|
||||||
|
cur = carts:check_front_up_down(pos, right, false, railtype)
|
||||||
|
if cur then
|
||||||
|
return cur
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Backwards
|
||||||
|
if not old_switch then
|
||||||
|
cur = carts:check_front_up_down(pos, {
|
||||||
|
x = -dir.x,
|
||||||
|
y = dir.y,
|
||||||
|
z = -dir.z
|
||||||
|
}, true, railtype)
|
||||||
|
if cur then
|
||||||
|
return cur
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return {x=0, y=0, z=0}
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:pathfinder(pos_, old_pos, old_dir, ctrl, pf_switch, railtype)
|
||||||
|
local pos = vector.round(pos_)
|
||||||
|
local pf_pos = vector.round(old_pos)
|
||||||
|
local pf_dir = vector.new(old_dir)
|
||||||
|
|
||||||
|
for i = 1, 3 do
|
||||||
|
if vector.equals(pf_pos, pos) then
|
||||||
|
-- Success! Cart moved on correctly
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
pf_dir, pf_switch = carts:get_rail_direction(pf_pos, pf_dir, ctrl, pf_switch, railtype)
|
||||||
|
if vector.equals(pf_dir, {x=0, y=0, z=0}) then
|
||||||
|
-- No way forwards
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
pf_pos = vector.add(pf_pos, pf_dir)
|
||||||
|
end
|
||||||
|
-- Cart not found
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:register_rail(name, def_overwrite, railparams)
|
||||||
|
local def = {
|
||||||
|
drawtype = "raillike",
|
||||||
|
paramtype = "light",
|
||||||
|
sunlight_propagates = true,
|
||||||
|
is_ground_content = false,
|
||||||
|
walkable = false,
|
||||||
|
selection_box = {
|
||||||
|
type = "fixed",
|
||||||
|
fixed = {-1/2, -1/2, -1/2, 1/2, -1/2+1/16, 1/2},
|
||||||
|
},
|
||||||
|
sounds = default.node_sound_metal_defaults()
|
||||||
|
}
|
||||||
|
for k, v in pairs(def_overwrite) do
|
||||||
|
def[k] = v
|
||||||
|
end
|
||||||
|
if not def.inventory_image then
|
||||||
|
def.wield_image = def.tiles[1]
|
||||||
|
def.inventory_image = def.tiles[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
if railparams then
|
||||||
|
carts.railparams[name] = table.copy(railparams)
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_node(name, def)
|
||||||
|
end
|
||||||
|
|
||||||
|
function carts:get_rail_groups(additional_groups)
|
||||||
|
-- Get the default rail groups and add more when a table is given
|
||||||
|
local groups = {dig_immediate = 2, attached_node = 1, rail = 1, connect_to_raillike = 1}
|
||||||
|
if type(additional_groups) == "table" then
|
||||||
|
for k, v in pairs(additional_groups) do
|
||||||
|
groups[k] = v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
return groups
|
||||||
|
end
|
20
mods/carts/init.lua
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
|
||||||
|
carts = {}
|
||||||
|
carts.modpath = minetest.get_modpath("carts")
|
||||||
|
carts.railparams = {}
|
||||||
|
|
||||||
|
-- Maximal speed of the cart in m/s (min = -1)
|
||||||
|
carts.speed_max = 7
|
||||||
|
-- Set to -1 to disable punching the cart from inside (min = -1)
|
||||||
|
carts.punch_speed_max = 5
|
||||||
|
|
||||||
|
|
||||||
|
dofile(carts.modpath.."/functions.lua")
|
||||||
|
dofile(carts.modpath.."/rails.lua")
|
||||||
|
|
||||||
|
-- Support for non-default games
|
||||||
|
if not default.player_attached then
|
||||||
|
default.player_attached = {}
|
||||||
|
end
|
||||||
|
|
||||||
|
dofile(carts.modpath.."/cart_entity.lua")
|
54
mods/carts/license.txt
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
|
||||||
|
License of source code
|
||||||
|
----------------------
|
||||||
|
|
||||||
|
The MIT License (MIT)
|
||||||
|
Copyright (C) 2012-2016 PilzAdam
|
||||||
|
Copyright (C) 2014-2016 SmallJoker
|
||||||
|
Copyright (C) 2012-2016 Various Minetest developers and contributors
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
copy of this software and associated documentation files (the "Software"),
|
||||||
|
to deal in the Software without restriction, including without limitation the
|
||||||
|
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||||
|
sell copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||||
|
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
||||||
|
|
||||||
|
For more details:
|
||||||
|
https://opensource.org/licenses/MIT
|
||||||
|
|
||||||
|
|
||||||
|
Licenses of media
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
CC-0, see: https://creativecommons.org/share-your-work/public-domain/cc0/, except
|
||||||
|
if other license is mentioned.
|
||||||
|
|
||||||
|
|
||||||
|
Authors
|
||||||
|
---------
|
||||||
|
Originally from PixelBOX (Gambit):
|
||||||
|
carts_cart_side.png
|
||||||
|
carts_cart_top.png
|
||||||
|
carts_cart_front.png*
|
||||||
|
carts_cart.png*
|
||||||
|
|
||||||
|
sofar + stujones11:
|
||||||
|
carts_cart.b3d and carts_cart.blend
|
||||||
|
|
||||||
|
hexafraction, modified by sofar
|
||||||
|
carts_rail_*.png
|
||||||
|
|
||||||
|
http://www.freesound.org/people/YleArkisto/sounds/253159/ - YleArkisto - CC-BY-3.0
|
||||||
|
carts_cart_moving.*.ogg
|
BIN
mods/carts/models/carts_cart.b3d
Normal file
BIN
mods/carts/models/carts_cart.blend
Normal file
59
mods/carts/rails.lua
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
carts:register_rail("carts:rail", {
|
||||||
|
description = "Rail",
|
||||||
|
tiles = {
|
||||||
|
"carts_rail_straight.png", "carts_rail_curved.png",
|
||||||
|
"carts_rail_t_junction.png", "carts_rail_crossing.png"
|
||||||
|
},
|
||||||
|
inventory_image = "carts_rail_straight.png",
|
||||||
|
wield_image = "carts_rail_straight.png",
|
||||||
|
groups = carts:get_rail_groups(),
|
||||||
|
}, {})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "carts:rail 18",
|
||||||
|
recipe = {
|
||||||
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
minetest.register_alias("default:rail", "carts:rail")
|
||||||
|
|
||||||
|
|
||||||
|
carts:register_rail("carts:powerrail", {
|
||||||
|
description = "Powered rail",
|
||||||
|
tiles = {
|
||||||
|
"carts_rail_straight_pwr.png", "carts_rail_curved_pwr.png",
|
||||||
|
"carts_rail_t_junction_pwr.png", "carts_rail_crossing_pwr.png"
|
||||||
|
},
|
||||||
|
groups = carts:get_rail_groups(),
|
||||||
|
}, {acceleration = 5})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "carts:powerrail 18",
|
||||||
|
recipe = {
|
||||||
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "default:mese_crystal", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
carts:register_rail("carts:brakerail", {
|
||||||
|
description = "Brake rail",
|
||||||
|
tiles = {
|
||||||
|
"carts_rail_straight_brk.png", "carts_rail_curved_brk.png",
|
||||||
|
"carts_rail_t_junction_brk.png", "carts_rail_crossing_brk.png"
|
||||||
|
},
|
||||||
|
groups = carts:get_rail_groups(),
|
||||||
|
}, {acceleration = -3})
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "carts:brakerail 18",
|
||||||
|
recipe = {
|
||||||
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "default:coal_lump", "default:steel_ingot"},
|
||||||
|
{"default:steel_ingot", "group:wood", "default:steel_ingot"},
|
||||||
|
}
|
||||||
|
})
|
BIN
mods/carts/sounds/carts_cart_moving.1.ogg
Normal file
BIN
mods/carts/sounds/carts_cart_moving.2.ogg
Normal file
BIN
mods/carts/sounds/carts_cart_moving.3.ogg
Normal file
BIN
mods/carts/textures/carts_cart.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
mods/carts/textures/carts_cart_front.png
Normal file
After Width: | Height: | Size: 459 B |
BIN
mods/carts/textures/carts_cart_side.png
Normal file
After Width: | Height: | Size: 486 B |
BIN
mods/carts/textures/carts_cart_top.png
Normal file
After Width: | Height: | Size: 522 B |
BIN
mods/carts/textures/carts_rail_crossing.png
Normal file
After Width: | Height: | Size: 612 B |
BIN
mods/carts/textures/carts_rail_crossing_brk.png
Normal file
After Width: | Height: | Size: 684 B |
BIN
mods/carts/textures/carts_rail_crossing_pwr.png
Normal file
After Width: | Height: | Size: 676 B |
BIN
mods/carts/textures/carts_rail_curved.png
Normal file
After Width: | Height: | Size: 580 B |
BIN
mods/carts/textures/carts_rail_curved_brk.png
Normal file
After Width: | Height: | Size: 618 B |
BIN
mods/carts/textures/carts_rail_curved_pwr.png
Normal file
After Width: | Height: | Size: 614 B |
BIN
mods/carts/textures/carts_rail_straight.png
Normal file
After Width: | Height: | Size: 602 B |
BIN
mods/carts/textures/carts_rail_straight_brk.png
Normal file
After Width: | Height: | Size: 660 B |
BIN
mods/carts/textures/carts_rail_straight_pwr.png
Normal file
After Width: | Height: | Size: 661 B |
BIN
mods/carts/textures/carts_rail_t_junction.png
Normal file
After Width: | Height: | Size: 707 B |
BIN
mods/carts/textures/carts_rail_t_junction_brk.png
Normal file
After Width: | Height: | Size: 698 B |
BIN
mods/carts/textures/carts_rail_t_junction_pwr.png
Normal file
After Width: | Height: | Size: 697 B |
171
mods/castrum/Chapter1.lua
Normal file
@ -0,0 +1,171 @@
|
|||||||
|
local list = {
|
||||||
|
{1, {x=-173, y=9, z=-70},{x=-172, y=9, z=-70},1},
|
||||||
|
{2, {x=-173, y=9, z=-62},{x=-172, y=9, z=-62},1},
|
||||||
|
{3, {x=-171, y=9, z=-69},{x=-170, y=9, z=-69},1},
|
||||||
|
{4, {x=-171, y=9, z=-63},{x=-170, y=9, z=-63},1},
|
||||||
|
{5, {x=-170, y=9, z=-67},{x=-169, y=9, z=-67},1},
|
||||||
|
{6, {x=-170, y=9, z=-65},{x=-169, y=9, z=-65},1},
|
||||||
|
{7, {x=-172, y=9, z=-70},{x=-171, y=9, z=-70},1},
|
||||||
|
{8, {x=-172, y=9, z=-62},{x=-171, y=9, z=-62},1},
|
||||||
|
{9, {x=-170, y=9, z=-69},{x=-169, y=9, z=-69},1},
|
||||||
|
{10, {x=-170, y=9, z=-63},{x=-169, y=9, z=-63},1},
|
||||||
|
{11, {x=-169, y=9, z=-67},{x=-168, y=9, z=-67},1},
|
||||||
|
{12, {x=-169, y=9, z=-65},{x=-168, y=9, z=-65},1},
|
||||||
|
{13, {x=-171, y=9, z=-70},{x=-170, y=9, z=-70},1},
|
||||||
|
{14, {x=-171, y=9, z=-62},{x=-170, y=9, z=-62},1},
|
||||||
|
{15, {x=-169, y=9, z=-69},{x=-168, y=9, z=-69},1},
|
||||||
|
{16, {x=-169, y=9, z=-63},{x=-168, y=9, z=-63},1},
|
||||||
|
{17, {x=-168, y=9, z=-67},{x=-167, y=9, z=-67},1},
|
||||||
|
{18, {x=-168, y=9, z=-65},{x=-167, y=9, z=-65},1},
|
||||||
|
{19, {x=-170, y=9, z=-70},{x=-169, y=9, z=-70},1},
|
||||||
|
{20, {x=-170, y=9, z=-62},{x=-169, y=9, z=-62},1},
|
||||||
|
{21, {x=-168, y=9, z=-69},{x=-167, y=9, z=-69},1},
|
||||||
|
{22, {x=-168, y=9, z=-63},{x=-167, y=9, z=-63},1},
|
||||||
|
{23, {x=-167, y=9, z=-67},{x=-166, y=9, z=-67},1},
|
||||||
|
{24, {x=-167, y=9, z=-65},{x=-166, y=9, z=-65},1},
|
||||||
|
{25, {x=-169, y=9, z=-70},{x=-168, y=9, z=-70},1},
|
||||||
|
{26, {x=-169, y=9, z=-62},{x=-168, y=9, z=-62},1},
|
||||||
|
{27, {x=-167, y=9, z=-69},{x=-166, y=9, z=-69},1},
|
||||||
|
{28, {x=-167, y=9, z=-63},{x=-166, y=9, z=-63},1},
|
||||||
|
{29, {x=-166, y=9, z=-67},{x=-165, y=9, z=-67},1},
|
||||||
|
{30, {x=-166, y=9, z=-65},{x=-165, y=9, z=-65},1},
|
||||||
|
{31, {x=-168, y=9, z=-70},{x=-167, y=9, z=-71},1},
|
||||||
|
{32, {x=-168, y=9, z=-62},{x=-167, y=9, z=-61},1},
|
||||||
|
{33, {x=-165, y=9, z=-67},{x=-164, y=9, z=-67},1},
|
||||||
|
{34, {x=-165, y=9, z=-65},{x=-164, y=9, z=-65},1},
|
||||||
|
{35, {x=-166, y=9, z=-69},{x=-165, y=9, z=-69},1},
|
||||||
|
{36, {x=-166, y=9, z=-63},{x=-165, y=9, z=-63},1},
|
||||||
|
{37, {x=-167, y=9, z=-71},{x=-166, y=9, z=-71},1},
|
||||||
|
{38, {x=-167, y=9, z=-61},{x=-166, y=9, z=-61},1},
|
||||||
|
{39, {x=-166, y=9, z=-71},{x=-165, y=9, z=-72},1},
|
||||||
|
{40, {x=-166, y=9, z=-61},{x=-165, y=9, z=-60},1},
|
||||||
|
{41, {x=-165, y=9, z=-69},{x=-164, y=9, z=-70},1},
|
||||||
|
{42, {x=-165, y=9, z=-63},{x=-164, y=9, z=-62},1},
|
||||||
|
{43, {x=-164, y=9, z=-67},{x=-163, y=9, z=-68},1},
|
||||||
|
{44, {x=-164, y=9, z=-65},{x=-163, y=9, z=-64},1},
|
||||||
|
{45, {x=-165, y=9, z=-72},{x=-164, y=9, z=-72},1},
|
||||||
|
{46, {x=-165, y=9, z=-60},{x=-164, y=9, z=-60},1},
|
||||||
|
{47, {x=-164, y=9, z=-70},{x=-163, y=9, z=-70},1},
|
||||||
|
{48, {x=-164, y=9, z=-62},{x=-163, y=9, z=-62},1},
|
||||||
|
{49, {x=-163, y=9, z=-68},{x=-162, y=9, z=-67},1},
|
||||||
|
{50, {x=-163, y=9, z=-64},{x=-162, y=9, z=-65},1},
|
||||||
|
{51, {x=-164, y=9, z=-72},{x=-163, y=9, z=-73},1},
|
||||||
|
{52, {x=-164, y=9, z=-60},{x=-163, y=9, z=-59},1},
|
||||||
|
{53, {x=-163, y=9, z=-70},{x=-162, y=9, z=-71},1},
|
||||||
|
{54, {x=-163, y=9, z=-62},{x=-162, y=9, z=-61},1},
|
||||||
|
{55, {x=-162, y=9, z=-67},{x=-161, y=9, z=-68},1},
|
||||||
|
{56, {x=-162, y=9, z=-65},{x=-161, y=9, z=-64},1},
|
||||||
|
{57, {x=-163, y=9, z=-73},{x=-162, y=9, z=-73},1},
|
||||||
|
{58, {x=-163, y=9, z=-59},{x=-162, y=9, z=-59},1},
|
||||||
|
{59, {x=-162, y=9, z=-71},{x=-161, y=9, z=-71},1},
|
||||||
|
{60, {x=-162, y=9, z=-61},{x=-161, y=9, z=-61},1},
|
||||||
|
{61, {x=-161, y=9, z=-68},{x=-160, y=9, z=-67},1},
|
||||||
|
{62, {x=-161, y=9, z=-64},{x=-160, y=9, z=-65},1},
|
||||||
|
{63, {x=-162, y=9, z=-73},{x=-161, y=9, z=-74},1},
|
||||||
|
{64, {x=-162, y=9, z=-59},{x=-161, y=9, z=-58},1},
|
||||||
|
{65, {x=-161, y=9, z=-71},{x=-160, y=9, z=-71},1},
|
||||||
|
{66, {x=-161, y=9, z=-61},{x=-160, y=9, z=-61},1},
|
||||||
|
{67, {x=-160, y=9, z=-67},{x=-159, y=9, z=-68},1},
|
||||||
|
{68, {x=-160, y=9, z=-65},{x=-159, y=9, z=-64},1},
|
||||||
|
{69, {x=-161, y=9, z=-74},{x=-160, y=9, z=-74},1},
|
||||||
|
{70, {x=-161, y=9, z=-58},{x=-160, y=9, z=-58},1},
|
||||||
|
{71, {x=-160, y=9, z=-74},{x=-159, y=9, z=-74},1},
|
||||||
|
{72, {x=-160, y=9, z=-58},{x=-159, y=9, z=-58},1},
|
||||||
|
{73, {x=-160, y=9, z=-71},{x=-159, y=9, z=-71},1},
|
||||||
|
{74, {x=-160, y=9, z=-61},{x=-159, y=9, z=-61},1},
|
||||||
|
{75, {x=-159, y=9, z=-68},{x=-158, y=9, z=-67},1},
|
||||||
|
{76, {x=-159, y=9, z=-64},{x=-158, y=9, z=-65},1},
|
||||||
|
{77, {x=-159, y=9, z=-74},{x=-158, y=9, z=-74},1},
|
||||||
|
{78, {x=-159, y=9, z=-58},{x=-158, y=9, z=-58},1},
|
||||||
|
{79, {x=-159, y=9, z=-71},{x=-158, y=9, z=-71},1},
|
||||||
|
{80, {x=-159, y=9, z=-61},{x=-158, y=9, z=-61},1},
|
||||||
|
{81, {x=-158, y=9, z=-67},{x=-157, y=9, z=-68},1},
|
||||||
|
{82, {x=-158, y=9, z=-65},{x=-157, y=9, z=-64},1},
|
||||||
|
{83, {x=-158, y=9, z=-74},{x=-157, y=9, z=-74},1},
|
||||||
|
{84, {x=-158, y=9, z=-58},{x=-157, y=9, z=-58},1},
|
||||||
|
{85, {x=-157, y=9, z=-74},{x=-156, y=9, z=-74},1},
|
||||||
|
{86, {x=-157, y=9, z=-58},{x=-156, y=9, z=-58},1},
|
||||||
|
{87, {x=-158, y=9, z=-71},{x=-157, y=9, z=-71},1},
|
||||||
|
{88, {x=-158, y=9, z=-61},{x=-157, y=9, z=-61},1},
|
||||||
|
{89, {x=-157, y=9, z=-68},{x=-156, y=9, z=-67},1},
|
||||||
|
{90, {x=-157, y=9, z=-64},{x=-156, y=9, z=-65},1},
|
||||||
|
{91, {x=-156, y=9, z=-74},{x=-155, y=9, z=-74},1},
|
||||||
|
{92, {x=-156, y=9, z=-58},{x=-155, y=9, z=-58},1},
|
||||||
|
{93, {x=-157, y=9, z=-71},{x=-156, y=9, z=-71},1},
|
||||||
|
{94, {x=-157, y=9, z=-61},{x=-156, y=9, z=-61},1},
|
||||||
|
{95, {x=-155, y=9, z=-74},{x=-154, y=9, z=-74},1},
|
||||||
|
{96, {x=-155, y=9, z=-58},{x=-154, y=9, z=-58},1},
|
||||||
|
{97, {x=-156, y=9, z=-71},{x=-155, y=9, z=-71},1},
|
||||||
|
{98, {x=-156, y=9, z=-61},{x=-155, y=9, z=-61},1},
|
||||||
|
{99, {x=-156, y=9, z=-67},{x=-155, y=9, z=-68},1},
|
||||||
|
{100, {x=-156, y=9, z=-65},{x=-155, y=9, z=-64},1},
|
||||||
|
{101, {x=-154, y=9, z=-74},{x=-153, y=9, z=-74},1},
|
||||||
|
{102, {x=-154, y=9, z=-58},{x=-153, y=9, z=-58},1},
|
||||||
|
{103, {x=-155, y=9, z=-71},{x=-154, y=9, z=-71},1},
|
||||||
|
{104, {x=-155, y=9, z=-61},{x=-154, y=9, z=-61},1},
|
||||||
|
{105, {x=-155, y=9, z=-68},{x=-154, y=9, z=-67},1},
|
||||||
|
{106, {x=-155, y=9, z=-64},{x=-154, y=9, z=-65},1},
|
||||||
|
{107, {x=-153, y=9, z=-74},{x=-152, y=9, z=-74},1},
|
||||||
|
{108, {x=-153, y=9, z=-58},{x=-152, y=9, z=-58},1},
|
||||||
|
{109, {x=-154, y=9, z=-71},{x=-153, y=9, z=-71},1},
|
||||||
|
{110, {x=-154, y=9, z=-61},{x=-153, y=9, z=-61},1},
|
||||||
|
{111, {x=-152, y=9, z=-74},{x=-151, y=9, z=-74},1},
|
||||||
|
{112, {x=-152, y=9, z=-58},{x=-151, y=9, z=-58},1},
|
||||||
|
{113, {x=-153, y=9, z=-71},{x=-152, y=9, z=-71},1},
|
||||||
|
{114, {x=-153, y=9, z=-61},{x=-152, y=9, z=-61},1},
|
||||||
|
{115, {x=-154, y=9, z=-67},{x=-153, y=9, z=-68},1},
|
||||||
|
{116, {x=-154, y=9, z=-65},{x=-153, y=9, z=-64},1},
|
||||||
|
{117, {x=-151, y=9, z=-74},{x=-150, y=9, z=-73},1},
|
||||||
|
{118, {x=-151, y=9, z=-58},{x=-150, y=9, z=-59},1},
|
||||||
|
{119, {x=-152, y=9, z=-71},{x=-151, y=9, z=-70},1},
|
||||||
|
{120, {x=-152, y=9, z=-61},{x=-151, y=9, z=-62},1},
|
||||||
|
{121, {x=-153, y=9, z=-68},{x=-152, y=9, z=-67},1},
|
||||||
|
{122, {x=-153, y=9, z=-64},{x=-152, y=9, z=-65},1},
|
||||||
|
{123, {x=-150, y=9, z=-73},{x=-149, y=9, z=-73},1},
|
||||||
|
{124, {x=-150, y=9, z=-59},{x=-149, y=9, z=-59},1},
|
||||||
|
{125, {x=-151, y=9, z=-70},{x=-150, y=9, z=-69},1},
|
||||||
|
{126, {x=-151, y=9, z=-62},{x=-150, y=9, z=-63},1},
|
||||||
|
{127, {x=-152, y=9, z=-67},{x=-151, y=9, z=-67},1},
|
||||||
|
{128, {x=-152, y=9, z=-65},{x=-151, y=9, z=-65},1},
|
||||||
|
{129, {x=-149, y=9, z=-73},{x=-148, y=9, z=-72},1},
|
||||||
|
{130, {x=-149, y=9, z=-59},{x=-148, y=9, z=-60},1},
|
||||||
|
{131, {x=-150, y=9, z=-69},{x=-149, y=9, z=-69},1},
|
||||||
|
{132, {x=-150, y=9, z=-63},{x=-149, y=9, z=-63},1},
|
||||||
|
{133, {x=-151, y=9, z=-67},{x=-150, y=9, z=-67},1},
|
||||||
|
{134, {x=-151, y=9, z=-65},{x=-150, y=9, z=-65},1},
|
||||||
|
{135, {x=-148, y=9, z=-72},{x=-147, y=9, z=-71},1},
|
||||||
|
{136, {x=-148, y=9, z=-60},{x=-147, y=9, z=-61},1},
|
||||||
|
{137, {x=-149, y=9, z=-69},{x=-148, y=9, z=-69},1},
|
||||||
|
{138, {x=-149, y=9, z=-63},{x=-148, y=9, z=-63},1},
|
||||||
|
{139, {x=-150, y=9, z=-67},{x=-149, y=9, z=-67},1},
|
||||||
|
{140, {x=-150, y=9, z=-65},{x=-149, y=9, z=-65},1},
|
||||||
|
{141, {x=-147, y=9, z=-71},{x=-146, y=9, z=-70},1},
|
||||||
|
{142, {x=-147, y=9, z=-61},{x=-146, y=9, z=-62},1},
|
||||||
|
{143, {x=-148, y=9, z=-69},{x=-147, y=9, z=-69},1},
|
||||||
|
{144, {x=-148, y=9, z=-63},{x=-147, y=9, z=-63},1},
|
||||||
|
{145, {x=-149, y=9, z=-67},{x=-148, y=9, z=-67},1},
|
||||||
|
{146, {x=-149, y=9, z=-65},{x=-148, y=9, z=-65},1},
|
||||||
|
{147, {x=-146, y=9, z=-70},{x=-145, y=9, z=-69},1},
|
||||||
|
{148, {x=-146, y=9, z=-62},{x=-145, y=9, z=-63},1},
|
||||||
|
{149, {x=-147, y=9, z=-69},{x=-146, y=9, z=-68},1},
|
||||||
|
{150, {x=-147, y=9, z=-63},{x=-146, y=9, z=-64},1},
|
||||||
|
{151, {x=-148, y=9, z=-67},{x=-147, y=9, z=-67},1},
|
||||||
|
{152, {x=-148, y=9, z=-65},{x=-147, y=9, z=-65},1},
|
||||||
|
{153, {x=-145, y=9, z=-69},{x=-144, y=9, z=-69},1},
|
||||||
|
{154, {x=-145, y=9, z=-63},{x=-144, y=9, z=-63},1},
|
||||||
|
{155, {x=-146, y=9, z=-68},{x=-145, y=9, z=-68},1},
|
||||||
|
{156, {x=-146, y=9, z=-64},{x=-145, y=9, z=-64},1},
|
||||||
|
{157, {x=-147, y=9, z=-67},{x=-146, y=9, z=-67},1},
|
||||||
|
{158, {x=-147, y=9, z=-65},{x=-146, y=9, z=-65},1},
|
||||||
|
{159, {x=-146, y=9, z=-67},{x=-145, y=9, z=-67},1},
|
||||||
|
{160, {x=-146, y=9, z=-65},{x=-145, y=9, z=-65},1},
|
||||||
|
{161, {x=-145, y=9, z=-68},{x=-144, y=9, z=-67},1},
|
||||||
|
{162, {x=-145, y=9, z=-64},{x=-144, y=9, z=-65},1},
|
||||||
|
{163, {x=-144, y=9, z=-69},{x=-144, y=9, z=-68},1},
|
||||||
|
{164, {x=-144, y=9, z=-63},{x=-144, y=9, z=-64},1},
|
||||||
|
{165, {x=-144, y=9, z=-68},{x=-144, y=9, z=-67},1},
|
||||||
|
{166, {x=-144, y=9, z=-64},{x=-144, y=9, z=-65},1},
|
||||||
|
}
|
||||||
|
function Chapter1()
|
||||||
|
return list
|
||||||
|
end
|
304
mods/castrum/Chapter2.lua
Normal file
@ -0,0 +1,304 @@
|
|||||||
|
local list = {
|
||||||
|
{1, {x=-173, y=9, z=-70},{x=-172, y=9, z=-70},1},
|
||||||
|
{2, {x=-173, y=9, z=-62},{x=-172, y=9, z=-62},1},
|
||||||
|
{3, {x=-171, y=9, z=-69},{x=-170, y=9, z=-69},1},
|
||||||
|
{4, {x=-171, y=9, z=-63},{x=-170, y=9, z=-63},1},
|
||||||
|
{5, {x=-170, y=9, z=-67},{x=-169, y=9, z=-67},1},
|
||||||
|
{6, {x=-170, y=9, z=-65},{x=-169, y=9, z=-65},1},
|
||||||
|
{7, {x=-172, y=9, z=-70},{x=-171, y=9, z=-71},1},
|
||||||
|
{8, {x=-172, y=9, z=-62},{x=-171, y=9, z=-61},1},
|
||||||
|
{9, {x=-171, y=9, z=-71},{x=-170, y=9, z=-71},1},
|
||||||
|
{10, {x=-171, y=9, z=-61},{x=-170, y=9, z=-61},1},
|
||||||
|
{11, {x=-170, y=9, z=-70},{x=-169, y=9, z=-70},1},
|
||||||
|
{12, {x=-170, y=9, z=-62},{x=-169, y=9, z=-62},1},
|
||||||
|
{13, {x=-170, y=9, z=-69},{x=-169, y=9, z=-69},1},
|
||||||
|
{14, {x=-170, y=9, z=-63},{x=-169, y=9, z=-63},1},
|
||||||
|
{15, {x=-169, y=9, z=-68},{x=-168, y=9, z=-68},1},
|
||||||
|
{16, {x=-169, y=9, z=-64},{x=-168, y=9, z=-64},1},
|
||||||
|
{17, {x=-169, y=9, z=-67},{x=-168, y=9, z=-67},1},
|
||||||
|
{18, {x=-169, y=9, z=-65},{x=-168, y=9, z=-65},1},
|
||||||
|
{19, {x=-168, y=9, z=-66},{x=-167, y=9, z=-66},1},
|
||||||
|
{20, {x=-170, y=9, z=-71},{x=-169, y=9, z=-71},1},
|
||||||
|
{21, {x=-170, y=9, z=-61},{x=-169, y=9, z=-61},1},
|
||||||
|
{22, {x=-169, y=9, z=-70},{x=-168, y=9, z=-70},1},
|
||||||
|
{23, {x=-169, y=9, z=-62},{x=-168, y=9, z=-62},1},
|
||||||
|
{24, {x=-169, y=9, z=-69},{x=-168, y=9, z=-69},1},
|
||||||
|
{25, {x=-169, y=9, z=-63},{x=-168, y=9, z=-63},1},
|
||||||
|
{26, {x=-168, y=9, z=-68},{x=-167, y=9, z=-68},1},
|
||||||
|
{27, {x=-168, y=9, z=-64},{x=-167, y=9, z=-64},1},
|
||||||
|
{28, {x=-168, y=9, z=-67},{x=-167, y=9, z=-67},1},
|
||||||
|
{29, {x=-168, y=9, z=-65},{x=-167, y=9, z=-65},1},
|
||||||
|
{30, {x=-167, y=9, z=-66},{x=-166, y=9, z=-66},1},
|
||||||
|
{31, {x=-169, y=9, z=-71},{x=-168, y=9, z=-71},1},
|
||||||
|
{32, {x=-169, y=9, z=-61},{x=-168, y=9, z=-61},1},
|
||||||
|
{33, {x=-168, y=9, z=-70},{x=-167, y=9, z=-70},1},
|
||||||
|
{34, {x=-168, y=9, z=-62},{x=-167, y=9, z=-62},1},
|
||||||
|
{35, {x=-168, y=9, z=-69},{x=-167, y=9, z=-69},1},
|
||||||
|
{36, {x=-168, y=9, z=-63},{x=-167, y=9, z=-63},1},
|
||||||
|
{37, {x=-167, y=9, z=-68},{x=-166, y=9, z=-68},1},
|
||||||
|
{38, {x=-167, y=9, z=-64},{x=-166, y=9, z=-64},1},
|
||||||
|
{39, {x=-167, y=9, z=-67},{x=-166, y=9, z=-67},1},
|
||||||
|
{40, {x=-167, y=9, z=-65},{x=-166, y=9, z=-65},1},
|
||||||
|
{41, {x=-166, y=9, z=-66},{x=-165, y=9, z=-66},1},
|
||||||
|
{42, {x=-168, y=9, z=-71},{x=-167, y=9, z=-72},1},
|
||||||
|
{43, {x=-168, y=9, z=-61},{x=-167, y=9, z=-60},1},
|
||||||
|
{44, {x=-167, y=9, z=-70},{x=-166, y=9, z=-70},1},
|
||||||
|
{45, {x=-167, y=9, z=-62},{x=-166, y=9, z=-62},1},
|
||||||
|
{46, {x=-167, y=9, z=-69},{x=-166, y=9, z=-69},1},
|
||||||
|
{47, {x=-167, y=9, z=-63},{x=-166, y=9, z=-63},1},
|
||||||
|
{48, {x=-166, y=9, z=-68},{x=-165, y=9, z=-68},1},
|
||||||
|
{49, {x=-166, y=9, z=-64},{x=-165, y=9, z=-64},1},
|
||||||
|
{50, {x=-166, y=9, z=-67},{x=-165, y=9, z=-67},1},
|
||||||
|
{51, {x=-166, y=9, z=-65},{x=-165, y=9, z=-65},1},
|
||||||
|
{52, {x=-165, y=9, z=-66},{x=-164, y=9, z=-66},1},
|
||||||
|
{53, {x=-167, y=9, z=-72},{x=-166, y=9, z=-73},1},
|
||||||
|
{54, {x=-167, y=9, z=-60},{x=-166, y=9, z=-59},1},
|
||||||
|
{55, {x=-166, y=9, z=-70},{x=-165, y=9, z=-71},1},
|
||||||
|
{56, {x=-166, y=9, z=-62},{x=-165, y=9, z=-61},1},
|
||||||
|
{57, {x=-166, y=9, z=-69},{x=-165, y=9, z=-69},1},
|
||||||
|
{58, {x=-166, y=9, z=-63},{x=-165, y=9, z=-63},1},
|
||||||
|
{59, {x=-165, y=9, z=-68},{x=-164, y=9, z=-68},1},
|
||||||
|
{60, {x=-165, y=9, z=-64},{x=-164, y=9, z=-64},1},
|
||||||
|
{61, {x=-165, y=9, z=-67},{x=-164, y=9, z=-67},1},
|
||||||
|
{62, {x=-165, y=9, z=-65},{x=-164, y=9, z=-65},1},
|
||||||
|
{63, {x=-164, y=9, z=-66},{x=-163, y=9, z=-66},1},
|
||||||
|
{64, {x=-166, y=9, z=-73},{x=-165, y=9, z=-73},1},
|
||||||
|
{65, {x=-166, y=9, z=-59},{x=-165, y=9, z=-59},1},
|
||||||
|
{66, {x=-165, y=9, z=-71},{x=-164, y=9, z=-71},1},
|
||||||
|
{67, {x=-165, y=9, z=-61},{x=-164, y=9, z=-61},1},
|
||||||
|
{68, {x=-165, y=9, z=-69},{x=-164, y=9, z=-69},1},
|
||||||
|
{69, {x=-165, y=9, z=-63},{x=-164, y=9, z=-63},1},
|
||||||
|
{70, {x=-164, y=9, z=-68},{x=-163, y=9, z=-68},1},
|
||||||
|
{71, {x=-164, y=9, z=-64},{x=-163, y=9, z=-64},1},
|
||||||
|
{72, {x=-164, y=9, z=-67},{x=-163, y=9, z=-67},1},
|
||||||
|
{73, {x=-164, y=9, z=-65},{x=-163, y=9, z=-65},1},
|
||||||
|
{74, {x=-163, y=9, z=-66},{x=-162, y=9, z=-66},1},
|
||||||
|
{75, {x=-165, y=9, z=-73},{x=-164, y=9, z=-74},1},
|
||||||
|
{76, {x=-165, y=9, z=-59},{x=-164, y=9, z=-58},1},
|
||||||
|
{77, {x=-164, y=9, z=-71},{x=-163, y=9, z=-72},1},
|
||||||
|
{78, {x=-164, y=9, z=-61},{x=-163, y=9, z=-60},1},
|
||||||
|
{79, {x=-164, y=9, z=-69},{x=-163, y=9, z=-69},1},
|
||||||
|
{80, {x=-164, y=9, z=-63},{x=-163, y=9, z=-63},1},
|
||||||
|
{81, {x=-163, y=9, z=-68},{x=-162, y=9, z=-68},1},
|
||||||
|
{82, {x=-163, y=9, z=-64},{x=-162, y=9, z=-64},1},
|
||||||
|
{83, {x=-163, y=9, z=-67},{x=-162, y=9, z=-67},1},
|
||||||
|
{84, {x=-163, y=9, z=-65},{x=-162, y=9, z=-65},1},
|
||||||
|
{85, {x=-162, y=9, z=-66},{x=-161, y=9, z=-66},1},
|
||||||
|
{86, {x=-164, y=9, z=-74},{x=-163, y=9, z=-74},1},
|
||||||
|
{87, {x=-164, y=9, z=-58},{x=-163, y=9, z=-58},1},
|
||||||
|
{88, {x=-163, y=9, z=-72},{x=-162, y=9, z=-72},1},
|
||||||
|
{89, {x=-163, y=9, z=-60},{x=-162, y=9, z=-60},1},
|
||||||
|
{90, {x=-163, y=9, z=-69},{x=-162, y=9, z=-70},1},
|
||||||
|
{91, {x=-163, y=9, z=-63},{x=-162, y=9, z=-62},1},
|
||||||
|
{92, {x=-162, y=9, z=-68},{x=-161, y=9, z=-68},1},
|
||||||
|
{93, {x=-162, y=9, z=-64},{x=-161, y=9, z=-64},1},
|
||||||
|
{94, {x=-162, y=9, z=-67},{x=-161, y=9, z=-67},1},
|
||||||
|
{95, {x=-162, y=9, z=-65},{x=-161, y=9, z=-65},1},
|
||||||
|
{96, {x=-161, y=9, z=-66},{x=-160, y=9, z=-66},1},
|
||||||
|
{97, {x=-163, y=9, z=-74},{x=-162, y=9, z=-75},1},
|
||||||
|
{98, {x=-163, y=9, z=-58},{x=-162, y=9, z=-57},1},
|
||||||
|
{99, {x=-162, y=9, z=-72},{x=-161, y=9, z=-73},1},
|
||||||
|
{100, {x=-162, y=9, z=-60},{x=-161, y=9, z=-59},1},
|
||||||
|
{101, {x=-162, y=9, z=-70},{x=-161, y=9, z=-70},1},
|
||||||
|
{102, {x=-162, y=9, z=-62},{x=-161, y=9, z=-62},1},
|
||||||
|
{103, {x=-161, y=9, z=-68},{x=-160, y=9, z=-68},1},
|
||||||
|
{104, {x=-161, y=9, z=-64},{x=-160, y=9, z=-64},1},
|
||||||
|
{105, {x=-161, y=9, z=-67},{x=-160, y=9, z=-67},1},
|
||||||
|
{106, {x=-161, y=9, z=-65},{x=-160, y=9, z=-65},1},
|
||||||
|
{107, {x=-160, y=9, z=-66},{x=-159, y=9, z=-66},1},
|
||||||
|
{108, {x=-162, y=9, z=-75},{x=-161, y=9, z=-75},1},
|
||||||
|
{109, {x=-162, y=9, z=-57},{x=-161, y=9, z=-57},1},
|
||||||
|
{110, {x=-161, y=9, z=-73},{x=-160, y=9, z=-73},1},
|
||||||
|
{111, {x=-161, y=9, z=-59},{x=-160, y=9, z=-59},1},
|
||||||
|
{112, {x=-161, y=9, z=-70},{x=-160, y=9, z=-71},1},
|
||||||
|
{113, {x=-161, y=9, z=-62},{x=-160, y=9, z=-61},1},
|
||||||
|
{114, {x=-160, y=9, z=-68},{x=-159, y=9, z=-69},1},
|
||||||
|
{115, {x=-160, y=9, z=-64},{x=-159, y=9, z=-63},1},
|
||||||
|
{116, {x=-160, y=9, z=-67},{x=-159, y=9, z=-67},1},
|
||||||
|
{117, {x=-160, y=9, z=-65},{x=-159, y=9, z=-65},1},
|
||||||
|
{118, {x=-159, y=9, z=-66},{x=-158, y=9, z=-66},1},
|
||||||
|
{119, {x=-161, y=9, z=-75},{x=-160, y=9, z=-76},1},
|
||||||
|
{120, {x=-161, y=9, z=-57},{x=-160, y=9, z=-56},1},
|
||||||
|
{121, {x=-160, y=9, z=-73},{x=-159, y=9, z=-74},1},
|
||||||
|
{122, {x=-160, y=9, z=-59},{x=-159, y=9, z=-58},1},
|
||||||
|
{123, {x=-160, y=9, z=-71},{x=-159, y=9, z=-71},1},
|
||||||
|
{124, {x=-160, y=9, z=-61},{x=-159, y=9, z=-61},1},
|
||||||
|
{125, {x=-159, y=9, z=-69},{x=-158, y=9, z=-69},1},
|
||||||
|
{126, {x=-159, y=9, z=-63},{x=-158, y=9, z=-63},1},
|
||||||
|
{127, {x=-159, y=9, z=-67},{x=-158, y=9, z=-67},1},
|
||||||
|
{128, {x=-159, y=9, z=-65},{x=-158, y=9, z=-65},1},
|
||||||
|
{129, {x=-160, y=9, z=-76},{x=-159, y=9, z=-76},1},
|
||||||
|
{130, {x=-160, y=9, z=-56},{x=-159, y=9, z=-56},1},
|
||||||
|
{131, {x=-159, y=9, z=-74},{x=-158, y=9, z=-74},1},
|
||||||
|
{132, {x=-159, y=9, z=-58},{x=-158, y=9, z=-58},1},
|
||||||
|
{133, {x=-159, y=9, z=-71},{x=-158, y=9, z=-71},1},
|
||||||
|
{134, {x=-159, y=9, z=-61},{x=-158, y=9, z=-61},1},
|
||||||
|
{135, {x=-159, y=9, z=-76},{x=-158, y=9, z=-76},1},
|
||||||
|
{136, {x=-159, y=9, z=-56},{x=-158, y=9, z=-56},1},
|
||||||
|
{137, {x=-158, y=9, z=-76},{x=-157, y=9, z=-75},1},
|
||||||
|
{138, {x=-158, y=9, z=-56},{x=-157, y=9, z=-57},1},
|
||||||
|
{139, {x=-157, y=9, z=-75},{x=-156, y=9, z=-75},1},
|
||||||
|
{140, {x=-157, y=9, z=-57},{x=-156, y=9, z=-57},1},
|
||||||
|
{141, {x=-158, y=9, z=-74},{x=-157, y=9, z=-73},1},
|
||||||
|
{142, {x=-158, y=9, z=-58},{x=-157, y=9, z=-59},1},
|
||||||
|
{143, {x=-158, y=9, z=-71},{x=-157, y=9, z=-71},1},
|
||||||
|
{144, {x=-158, y=9, z=-61},{x=-157, y=9, z=-61},1},
|
||||||
|
{145, {x=-156, y=9, z=-75},{x=-155, y=9, z=-75},1},
|
||||||
|
{146, {x=-156, y=9, z=-57},{x=-155, y=9, z=-57},1},
|
||||||
|
{147, {x=-157, y=9, z=-73},{x=-156, y=9, z=-73},1},
|
||||||
|
{148, {x=-157, y=9, z=-59},{x=-156, y=9, z=-59},1},
|
||||||
|
{149, {x=-157, y=9, z=-71},{x=-156, y=9, z=-70},1},
|
||||||
|
{150, {x=-157, y=9, z=-61},{x=-156, y=9, z=-62},1},
|
||||||
|
{151, {x=-158, y=9, z=-69},{x=-157, y=9, z=-69},1},
|
||||||
|
{152, {x=-158, y=9, z=-63},{x=-157, y=9, z=-63},1},
|
||||||
|
{153, {x=-158, y=9, z=-67},{x=-157, y=9, z=-67},1},
|
||||||
|
{154, {x=-158, y=9, z=-65},{x=-157, y=9, z=-65},1},
|
||||||
|
{155, {x=-155, y=9, z=-75},{x=-154, y=9, z=-74},1},
|
||||||
|
{156, {x=-155, y=9, z=-57},{x=-154, y=9, z=-58},1},
|
||||||
|
{157, {x=-156, y=9, z=-73},{x=-155, y=9, z=-72},1},
|
||||||
|
{158, {x=-156, y=9, z=-59},{x=-155, y=9, z=-60},1},
|
||||||
|
{159, {x=-156, y=9, z=-70},{x=-155, y=9, z=-70},1},
|
||||||
|
{160, {x=-156, y=9, z=-62},{x=-155, y=9, z=-62},1},
|
||||||
|
{161, {x=-157, y=9, z=-69},{x=-156, y=9, z=-68},1},
|
||||||
|
{162, {x=-157, y=9, z=-63},{x=-156, y=9, z=-64},1},
|
||||||
|
{163, {x=-157, y=9, z=-67},{x=-156, y=9, z=-67},1},
|
||||||
|
{164, {x=-157, y=9, z=-65},{x=-156, y=9, z=-65},1},
|
||||||
|
{165, {x=-158, y=9, z=-66},{x=-157, y=9, z=-66},1},
|
||||||
|
{166, {x=-154, y=9, z=-74},{x=-153, y=9, z=-74},1},
|
||||||
|
{167, {x=-154, y=9, z=-58},{x=-153, y=9, z=-58},1},
|
||||||
|
{168, {x=-155, y=9, z=-72},{x=-154, y=9, z=-72},1},
|
||||||
|
{169, {x=-155, y=9, z=-60},{x=-154, y=9, z=-60},1},
|
||||||
|
{170, {x=-155, y=9, z=-70},{x=-154, y=9, z=-70},1},
|
||||||
|
{171, {x=-155, y=9, z=-62},{x=-154, y=9, z=-62},1},
|
||||||
|
{172, {x=-156, y=9, z=-68},{x=-155, y=9, z=-68},1},
|
||||||
|
{173, {x=-156, y=9, z=-64},{x=-155, y=9, z=-64},1},
|
||||||
|
{174, {x=-156, y=9, z=-67},{x=-155, y=9, z=-67},1},
|
||||||
|
{175, {x=-156, y=9, z=-65},{x=-155, y=9, z=-65},1},
|
||||||
|
{176, {x=-157, y=9, z=-66},{x=-156, y=9, z=-66},1},
|
||||||
|
{177, {x=-153, y=9, z=-74},{x=-152, y=9, z=-74},1},
|
||||||
|
{178, {x=-153, y=9, z=-58},{x=-152, y=9, z=-58},1},
|
||||||
|
{179, {x=-154, y=9, z=-72},{x=-153, y=9, z=-72},1},
|
||||||
|
{180, {x=-154, y=9, z=-60},{x=-153, y=9, z=-60},1},
|
||||||
|
{181, {x=-154, y=9, z=-70},{x=-153, y=9, z=-69},1},
|
||||||
|
{182, {x=-154, y=9, z=-62},{x=-153, y=9, z=-63},1},
|
||||||
|
{183, {x=-155, y=9, z=-68},{x=-154, y=9, z=-68},1},
|
||||||
|
{184, {x=-155, y=9, z=-64},{x=-154, y=9, z=-64},1},
|
||||||
|
{185, {x=-155, y=9, z=-67},{x=-154, y=9, z=-67},1},
|
||||||
|
{186, {x=-155, y=9, z=-65},{x=-154, y=9, z=-65},1},
|
||||||
|
{187, {x=-156, y=9, z=-66},{x=-155, y=9, z=-66},1},
|
||||||
|
{188, {x=-152, y=9, z=-74},{x=-151, y=9, z=-73},1},
|
||||||
|
{189, {x=-152, y=9, z=-58},{x=-151, y=9, z=-59},1},
|
||||||
|
{190, {x=-153, y=9, z=-72},{x=-152, y=9, z=-71},1},
|
||||||
|
{191, {x=-153, y=9, z=-60},{x=-152, y=9, z=-61},1},
|
||||||
|
{192, {x=-153, y=9, z=-69},{x=-152, y=9, z=-69},1},
|
||||||
|
{193, {x=-153, y=9, z=-63},{x=-152, y=9, z=-63},1},
|
||||||
|
{194, {x=-154, y=9, z=-68},{x=-153, y=9, z=-68},1},
|
||||||
|
{195, {x=-154, y=9, z=-64},{x=-153, y=9, z=-64},1},
|
||||||
|
{196, {x=-154, y=9, z=-67},{x=-153, y=9, z=-67},1},
|
||||||
|
{197, {x=-154, y=9, z=-65},{x=-153, y=9, z=-65},1},
|
||||||
|
{198, {x=-155, y=9, z=-66},{x=-154, y=9, z=-66},1},
|
||||||
|
{199, {x=-151, y=9, z=-73},{x=-150, y=9, z=-73},1},
|
||||||
|
{200, {x=-151, y=9, z=-59},{x=-150, y=9, z=-59},1},
|
||||||
|
{201, {x=-152, y=9, z=-71},{x=-151, y=9, z=-71},1},
|
||||||
|
{202, {x=-152, y=9, z=-61},{x=-151, y=9, z=-61},1},
|
||||||
|
{203, {x=-152, y=9, z=-69},{x=-151, y=9, z=-69},1},
|
||||||
|
{204, {x=-152, y=9, z=-63},{x=-151, y=9, z=-63},1},
|
||||||
|
{205, {x=-153, y=9, z=-68},{x=-152, y=9, z=-68},1},
|
||||||
|
{206, {x=-153, y=9, z=-64},{x=-152, y=9, z=-64},1},
|
||||||
|
{207, {x=-153, y=9, z=-67},{x=-152, y=9, z=-67},1},
|
||||||
|
{208, {x=-153, y=9, z=-65},{x=-152, y=9, z=-65},1},
|
||||||
|
{209, {x=-154, y=9, z=-66},{x=-153, y=9, z=-66},1},
|
||||||
|
{210, {x=-150, y=9, z=-73},{x=-149, y=9, z=-73},1},
|
||||||
|
{211, {x=-150, y=9, z=-59},{x=-149, y=9, z=-59},1},
|
||||||
|
{212, {x=-151, y=9, z=-71},{x=-150, y=9, z=-71},1},
|
||||||
|
{213, {x=-151, y=9, z=-61},{x=-150, y=9, z=-61},1},
|
||||||
|
{214, {x=-151, y=9, z=-69},{x=-150, y=9, z=-69},1},
|
||||||
|
{215, {x=-151, y=9, z=-63},{x=-150, y=9, z=-63},1},
|
||||||
|
{216, {x=-152, y=9, z=-68},{x=-151, y=9, z=-68},1},
|
||||||
|
{217, {x=-152, y=9, z=-64},{x=-151, y=9, z=-64},1},
|
||||||
|
{218, {x=-152, y=9, z=-67},{x=-151, y=9, z=-67},1},
|
||||||
|
{219, {x=-152, y=9, z=-65},{x=-151, y=9, z=-65},1},
|
||||||
|
{220, {x=-153, y=9, z=-66},{x=-152, y=9, z=-66},1},
|
||||||
|
{221, {x=-149, y=9, z=-73},{x=-148, y=9, z=-72},1},
|
||||||
|
{222, {x=-149, y=9, z=-59},{x=-148, y=9, z=-60},1},
|
||||||
|
{223, {x=-150, y=9, z=-71},{x=-149, y=9, z=-70},1},
|
||||||
|
{224, {x=-150, y=9, z=-61},{x=-149, y=9, z=-62},1},
|
||||||
|
{225, {x=-150, y=9, z=-69},{x=-149, y=9, z=-69},1},
|
||||||
|
{226, {x=-150, y=9, z=-63},{x=-149, y=9, z=-63},1},
|
||||||
|
{227, {x=-151, y=9, z=-68},{x=-150, y=9, z=-68},1},
|
||||||
|
{228, {x=-151, y=9, z=-64},{x=-150, y=9, z=-64},1},
|
||||||
|
{229, {x=-151, y=9, z=-67},{x=-150, y=9, z=-67},1},
|
||||||
|
{230, {x=-151, y=9, z=-65},{x=-150, y=9, z=-65},1},
|
||||||
|
{231, {x=-152, y=9, z=-66},{x=-151, y=9, z=-66},1},
|
||||||
|
{232, {x=-148, y=9, z=-72},{x=-147, y=9, z=-72},1},
|
||||||
|
{233, {x=-148, y=9, z=-60},{x=-147, y=9, z=-60},1},
|
||||||
|
{234, {x=-149, y=9, z=-70},{x=-148, y=9, z=-70},1},
|
||||||
|
{235, {x=-149, y=9, z=-62},{x=-148, y=9, z=-62},1},
|
||||||
|
{236, {x=-149, y=9, z=-69},{x=-148, y=9, z=-69},1},
|
||||||
|
{237, {x=-149, y=9, z=-63},{x=-148, y=9, z=-63},1},
|
||||||
|
{238, {x=-150, y=9, z=-68},{x=-149, y=9, z=-68},1},
|
||||||
|
{239, {x=-150, y=9, z=-64},{x=-149, y=9, z=-64},1},
|
||||||
|
{240, {x=-150, y=9, z=-67},{x=-149, y=9, z=-67},1},
|
||||||
|
{241, {x=-150, y=9, z=-65},{x=-149, y=9, z=-65},1},
|
||||||
|
{242, {x=-151, y=9, z=-66},{x=-150, y=9, z=-66},1},
|
||||||
|
{243, {x=-147, y=9, z=-72},{x=-146, y=9, z=-72},1},
|
||||||
|
{244, {x=-147, y=9, z=-60},{x=-146, y=9, z=-60},1},
|
||||||
|
{245, {x=-148, y=9, z=-70},{x=-147, y=9, z=-70},1},
|
||||||
|
{246, {x=-148, y=9, z=-62},{x=-147, y=9, z=-62},1},
|
||||||
|
{247, {x=-148, y=9, z=-69},{x=-147, y=9, z=-69},1},
|
||||||
|
{248, {x=-148, y=9, z=-63},{x=-147, y=9, z=-63},1},
|
||||||
|
{249, {x=-149, y=9, z=-68},{x=-148, y=9, z=-68},1},
|
||||||
|
{250, {x=-149, y=9, z=-64},{x=-148, y=9, z=-64},1},
|
||||||
|
{251, {x=-149, y=9, z=-67},{x=-148, y=9, z=-67},1},
|
||||||
|
{252, {x=-149, y=9, z=-65},{x=-148, y=9, z=-65},1},
|
||||||
|
{253, {x=-150, y=9, z=-66},{x=-149, y=9, z=-66},1},
|
||||||
|
{254, {x=-146, y=9, z=-72},{x=-145, y=9, z=-71},1},
|
||||||
|
{255, {x=-146, y=9, z=-60},{x=-145, y=9, z=-61},1},
|
||||||
|
{256, {x=-147, y=9, z=-70},{x=-146, y=9, z=-70},1},
|
||||||
|
{257, {x=-147, y=9, z=-62},{x=-146, y=9, z=-62},1},
|
||||||
|
{258, {x=-145, y=9, z=-71},{x=-144, y=9, z=-71},1},
|
||||||
|
{259, {x=-145, y=9, z=-61},{x=-144, y=9, z=-61},1},
|
||||||
|
{260, {x=-146, y=9, z=-70},{x=-145, y=9, z=-70},1},
|
||||||
|
{261, {x=-146, y=9, z=-62},{x=-145, y=9, z=-62},1},
|
||||||
|
{262, {x=-147, y=9, z=-69},{x=-146, y=9, z=-69},1},
|
||||||
|
{263, {x=-147, y=9, z=-63},{x=-146, y=9, z=-63},1},
|
||||||
|
{264, {x=-148, y=9, z=-68},{x=-147, y=9, z=-68},1},
|
||||||
|
{265, {x=-148, y=9, z=-64},{x=-147, y=9, z=-64},1},
|
||||||
|
{266, {x=-144, y=9, z=-71},{x=-144, y=9, z=-70},1},
|
||||||
|
{267, {x=-144, y=9, z=-61},{x=-144, y=9, z=-62},1},
|
||||||
|
{268, {x=-145, y=9, z=-70},{x=-145, y=9, z=-69},1},
|
||||||
|
{269, {x=-145, y=9, z=-62},{x=-145, y=9, z=-63},1},
|
||||||
|
{270, {x=-147, y=9, z=-68},{x=-146, y=9, z=-68},1},
|
||||||
|
{271, {x=-147, y=9, z=-64},{x=-146, y=9, z=-64},1},
|
||||||
|
{272, {x=-148, y=9, z=-67},{x=-147, y=9, z=-67},1},
|
||||||
|
{273, {x=-148, y=9, z=-65},{x=-147, y=9, z=-65},1},
|
||||||
|
{274, {x=-149, y=9, z=-66},{x=-148, y=9, z=-66},1},
|
||||||
|
{275, {x=-147, y=9, z=-67},{x=-146, y=9, z=-67},1},
|
||||||
|
{276, {x=-147, y=9, z=-65},{x=-146, y=9, z=-65},1},
|
||||||
|
{277, {x=-148, y=9, z=-66},{x=-147, y=9, z=-66},1},
|
||||||
|
{278, {x=-146, y=9, z=-69},{x=-145, y=9, z=-68},1},
|
||||||
|
{279, {x=-146, y=9, z=-63},{x=-145, y=9, z=-64},1},
|
||||||
|
{280, {x=-144, y=9, z=-70},{x=-144, y=9, z=-69},1},
|
||||||
|
{281, {x=-144, y=9, z=-62},{x=-144, y=9, z=-63},1},
|
||||||
|
{282, {x=-145, y=9, z=-68},{x=-144, y=9, z=-67},1},
|
||||||
|
{283, {x=-145, y=9, z=-64},{x=-144, y=9, z=-65},1},
|
||||||
|
{284, {x=-147, y=9, z=-66},{x=-146, y=9, z=-66},1},
|
||||||
|
{285, {x=-146, y=9, z=-67},{x=-145, y=9, z=-67},1},
|
||||||
|
{286, {x=-146, y=9, z=-65},{x=-145, y=9, z=-65},1},
|
||||||
|
{287, {x=-146, y=9, z=-66},{x=-145, y=9, z=-66},1},
|
||||||
|
{288, {x=-146, y=9, z=-68},{x=-146, y=9, z=-67},1},
|
||||||
|
{289, {x=-146, y=9, z=-64},{x=-146, y=9, z=-65},1},
|
||||||
|
{290, {x=-145, y=9, z=-69},{x=-145, y=9, z=-68},1},
|
||||||
|
{291, {x=-145, y=9, z=-63},{x=-145, y=9, z=-64},1},
|
||||||
|
{292, {x=-144, y=9, z=-69},{x=-144, y=9, z=-68},1},
|
||||||
|
{293, {x=-144, y=9, z=-63},{x=-144, y=9, z=-64},1},
|
||||||
|
{294, {x=-146, y=9, z=-67},{x=-145, y=9, z=-67},1},
|
||||||
|
{295, {x=-146, y=9, z=-65},{x=-145, y=9, z=-65},1},
|
||||||
|
{296, {x=-145, y=9, z=-68},{x=-145, y=9, z=-67},1},
|
||||||
|
{297, {x=-145, y=9, z=-64},{x=-145, y=9, z=-65},1},
|
||||||
|
{298, {x=-144, y=9, z=-68},{x=-144, y=9, z=-67},1},
|
||||||
|
{299, {x=-144, y=9, z=-64},{x=-144, y=9, z=-65},1},
|
||||||
|
}
|
||||||
|
function Chapter2()
|
||||||
|
return list
|
||||||
|
end
|
361
mods/castrum/fight.lua
Normal file
@ -0,0 +1,361 @@
|
|||||||
|
function nextrange(x, max)
|
||||||
|
x = x + 1
|
||||||
|
if x > max then
|
||||||
|
x = 0
|
||||||
|
end
|
||||||
|
return x
|
||||||
|
end
|
||||||
|
function screwdriver_handler(user, pointed_thing, mode)
|
||||||
|
if pointed_thing.type ~= "node" then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local pos = pointed_thing.under
|
||||||
|
local keys = user:get_player_control()
|
||||||
|
local player_name = user:get_player_name()
|
||||||
|
|
||||||
|
if minetest.is_protected(pos, user:get_player_name()) then
|
||||||
|
minetest.record_protection_violation(pos, user:get_player_name())
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local node = minetest.get_node(pos)
|
||||||
|
local ndef = minetest.registered_nodes[node.name]
|
||||||
|
if not ndef or not ndef.paramtype2 == "facedir" or
|
||||||
|
(ndef.drawtype == "nodebox" and
|
||||||
|
not ndef.node_box.type == "fixed") or
|
||||||
|
node.param2 == nil then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
local n = node.param2
|
||||||
|
local axisdir = math.floor(n / 4)
|
||||||
|
local rotation = n - axisdir * 4
|
||||||
|
if mode == 1 then
|
||||||
|
n = axisdir * 4 + nextrange(rotation, 3)
|
||||||
|
elseif mode == 3 then
|
||||||
|
n = nextrange(axisdir, 5) * 4
|
||||||
|
end
|
||||||
|
|
||||||
|
node.param2 = n
|
||||||
|
minetest.swap_node(pos, node)
|
||||||
|
end
|
||||||
|
function turn(player,pos,num)
|
||||||
|
for i=1,num do
|
||||||
|
screwdriver_handler(player, {type="node", under=pos, above=pos}, 1)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
minetest.register_on_punchnode(function(pos, node, puncher, pointed_thing)
|
||||||
|
if minetest.get_node({x=pos.x, y=pos.y-1, z=pos.z}).name == "castrum:fight2" then
|
||||||
|
local dig = false
|
||||||
|
local dignum = 0
|
||||||
|
if node.name == "castrum:knight_dark" then
|
||||||
|
dig = true
|
||||||
|
elseif node.name == "castrum:knight_lv1_dark" then
|
||||||
|
local fightnode = puncher:get_attribute("fightnode")
|
||||||
|
if fightnode == "1" then
|
||||||
|
dignum = math.random(2)
|
||||||
|
else
|
||||||
|
dignum = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if dignum == 1 then
|
||||||
|
dig = true
|
||||||
|
end
|
||||||
|
if dig == true then
|
||||||
|
minetest.set_node(pos, {name="air"})
|
||||||
|
minetest.set_node({x=pos.x, y=pos.y-1, z=pos.z}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
local fightpos = puncher:get_attribute("fightpos")
|
||||||
|
local fightnode = puncher:get_attribute("fightnode")
|
||||||
|
if fightnode == "1" then
|
||||||
|
minetest.set_node(minetest.string_to_pos(fightpos), {name="castrum:knight_lv1"})
|
||||||
|
screwdriver_handler(puncher, {type="node", under=minetest.string_to_pos(fightpos), above=minetest.string_to_pos(fightpos)}, 1)
|
||||||
|
end
|
||||||
|
for j=144,174 do
|
||||||
|
for i=51,81 do
|
||||||
|
minetest.set_node({x=j*(-1), y=8, z=i*(-1)}, {name="default:dirt_with_grass"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
fight_step2(puncher)
|
||||||
|
local inv = puncher:get_inventory()
|
||||||
|
inv:remove_item("main", "castrum:knight_lv1")
|
||||||
|
puncher:set_attribute("fightdig", "false")
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
function get_fight(level,player)
|
||||||
|
for j=144,174 do
|
||||||
|
for i=51,81 do
|
||||||
|
minetest.set_node({x=j*(-1), y=9, z=i*(-1)}, {name="air"})
|
||||||
|
minetest.set_node({x=j*(-1), y=8, z=i*(-1)}, {name="default:dirt_with_grass"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
for i=67,76 do
|
||||||
|
minetest.set_node({x=-144, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=56,65 do
|
||||||
|
minetest.set_node({x=-144, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=57,75 do
|
||||||
|
minetest.set_node({x=-145, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=58,74 do
|
||||||
|
minetest.set_node({x=-146, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=59,73 do
|
||||||
|
minetest.set_node({x=-147, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=61,71 do
|
||||||
|
minetest.set_node({x=-148, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=63,69 do
|
||||||
|
minetest.set_node({x=-149, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
for i=65,67 do
|
||||||
|
minetest.set_node({x=-150, y=8, z=i*(-1)}, {name="castrum:fight1"})
|
||||||
|
end
|
||||||
|
minetest.set_node({x=-144, y=9, z=-66}, {name="castrum:castrum_knight1"})
|
||||||
|
minetest.set_node({x=-174, y=9, z=-66}, {name="castrum:knight_dark"})
|
||||||
|
player:setpos({x=-135, y=8.5, z=-66})
|
||||||
|
screwdriver_handler(player, {type="node", under={x=-144, y=9, z=-66}, above={x=-144, y=9, z=-66}}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under={x=-174, y=9, z=-66}, above={x=-174, y=9, z=-66}}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under={x=-174, y=9, z=-66}, above={x=-174, y=9, z=-66}}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under={x=-174, y=9, z=-66}, above={x=-174, y=9, z=-66}}, 1)
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Knight_1.txt", "r")
|
||||||
|
local knight_1 = file:read("*l")
|
||||||
|
file:close()
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
if tonumber(knight_1) > 0 then
|
||||||
|
inv:add_item("main","castrum:knight_lv1 "..knight_1)
|
||||||
|
end
|
||||||
|
player:set_attribute("fight", "false")
|
||||||
|
set_fight(player,level)
|
||||||
|
end
|
||||||
|
function set_fight(player,level)
|
||||||
|
if level == 1 then
|
||||||
|
minetest.set_node({x=-173, y=9, z=-65}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-65},3)
|
||||||
|
minetest.set_node({x=-173, y=9, z=-67}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-67},3)
|
||||||
|
minetest.set_node({x=-173, y=9, z=-62}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-62},3)
|
||||||
|
minetest.set_node({x=-173, y=9, z=-70}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-70},3)
|
||||||
|
minetest.set_node({x=-171, y=9, z=-69}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-171, y=9, z=-69},3)
|
||||||
|
minetest.set_node({x=-171, y=9, z=-63}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-171, y=9, z=-63},3)
|
||||||
|
minetest.set_node({x=-170, y=9, z=-65}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-170, y=9, z=-65},3)
|
||||||
|
minetest.set_node({x=-170, y=9, z=-67}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-170, y=9, z=-67},3)
|
||||||
|
elseif level == 2 then
|
||||||
|
minetest.set_node({x=-173, y=9, z=-65}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-65},3)
|
||||||
|
minetest.set_node({x=-173, y=9, z=-67}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-67},3)
|
||||||
|
minetest.set_node({x=-173, y=9, z=-62}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-62},3)
|
||||||
|
minetest.set_node({x=-173, y=9, z=-70}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-173, y=9, z=-70},3)
|
||||||
|
minetest.set_node({x=-171, y=9, z=-69}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-171, y=9, z=-69},3)
|
||||||
|
minetest.set_node({x=-171, y=9, z=-63}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-171, y=9, z=-63},3)
|
||||||
|
minetest.set_node({x=-170, y=9, z=-65}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-170, y=9, z=-65},3)
|
||||||
|
minetest.set_node({x=-170, y=9, z=-67}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-170, y=9, z=-67},3)
|
||||||
|
minetest.set_node({x=-170, y=9, z=-70}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-170, y=9, z=-70},3)
|
||||||
|
minetest.set_node({x=-169, y=9, z=-68}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-169, y=9, z=-68},3)
|
||||||
|
minetest.set_node({x=-168, y=9, z=-66}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-168, y=9, z=-66},3)
|
||||||
|
minetest.set_node({x=-170, y=9, z=-62}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-170, y=9, z=-62},3)
|
||||||
|
minetest.set_node({x=-169, y=9, z=-64}, {name="castrum:knight_lv1_dark"})
|
||||||
|
turn(player,{x=-169, y=9, z=-64},3)
|
||||||
|
end
|
||||||
|
player:set_attribute("fightlv", ""..level)
|
||||||
|
end
|
||||||
|
function fight_step1(player)
|
||||||
|
local fight = player:get_attribute("fight")
|
||||||
|
if fight == "false" then
|
||||||
|
local start = false
|
||||||
|
for j=144,174 do
|
||||||
|
for i=51,81 do
|
||||||
|
if minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:knight_lv1" then
|
||||||
|
start = true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if start == false then
|
||||||
|
minetest.chat_send_player(player:get_player_name(), "you have to place a knight")
|
||||||
|
else
|
||||||
|
player:set_attribute("fight", "true")
|
||||||
|
player:set_attribute("fightmove", "1")
|
||||||
|
player:set_attribute("fightkill", "0")
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
inv:remove_item("main", "castrum:knight_lv1 80")
|
||||||
|
for j=144,174 do
|
||||||
|
for i=51,81 do
|
||||||
|
minetest.set_node({x=j*(-1), y=8, z=i*(-1)}, {name="default:dirt_with_grass"})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function fight_step2(player)
|
||||||
|
local move = tonumber(player:get_attribute("fightmove"))
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Chapter.txt", "r")
|
||||||
|
local chapter = file:read("*l")
|
||||||
|
file:close()
|
||||||
|
local list = {}
|
||||||
|
if tonumber(chapter) == 1 then
|
||||||
|
list = Chapter1()
|
||||||
|
elseif tonumber(chapter) == 2 then
|
||||||
|
list = Chapter2()
|
||||||
|
end
|
||||||
|
local move2 = move
|
||||||
|
local d = 0
|
||||||
|
local dd = 0
|
||||||
|
local dignum = 0
|
||||||
|
for j=144,174 do
|
||||||
|
for i=51,81 do
|
||||||
|
dignum = math.random(2)
|
||||||
|
if minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:knight_lv1_dark" and dignum == 1 then
|
||||||
|
if minetest.get_node({x=j*(-1)+1, y=9, z=i*(-1)}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1)+1, y=9, z=i*(-1)}).name == "castrum:castrum_knight1" then
|
||||||
|
minetest.set_node({x=j*(-1)+1, y=9, z=i*(-1)}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1)-1, y=9, z=i*(-1)}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1)-1, y=9, z=i*(-1)}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1)-1, y=9, z=i*(-1)}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1), y=9, z=i*(-1)}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1)+1, y=9, z=i*(-1)-1}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1)+1, y=9, z=i*(-1)-1}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1)+1, y=9, z=i*(-1)-1}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1)-1, y=9, z=i*(-1)-1}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1)-1, y=9, z=i*(-1)-1}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1)-1, y=9, z=i*(-1)-1}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1), y=9, z=i*(-1)-1}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1), y=9, z=i*(-1)-1}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1), y=9, z=i*(-1)-1}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1)+1, y=9, z=i*(-1)+1}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1)+1, y=9, z=i*(-1)+1}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1)+1, y=9, z=i*(-1)+1}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1)-1, y=9, z=i*(-1)+1}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1)-1, y=9, z=i*(-1)+1}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1)-1, y=9, z=i*(-1)+1}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
if (minetest.get_node({x=j*(-1), y=9, z=i*(-1)+1}).name == "castrum:knight_lv1" or minetest.get_node({x=j*(-1), y=9, z=i*(-1)+1}).name == "castrum:castrum_knight1") and dd == 0 then
|
||||||
|
minetest.set_node({x=j*(-1), y=9, z=i*(-1)+1}, {name="air"})
|
||||||
|
player:set_attribute("fightkill", ""..(player:get_attribute("fightkill")+1))
|
||||||
|
dd = 1
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
while d == 0 and move2 < 167 and dd == 0 and tonumber(chapter) == 1 do
|
||||||
|
if minetest.get_node(list[move2][2]).name == "castrum:knight_lv1_dark" then
|
||||||
|
minetest.set_node(list[move2][2], {name="air"})
|
||||||
|
minetest.set_node(list[move2][3], {name="castrum:knight_lv1_dark"})
|
||||||
|
player:set_attribute("fightmove", ""..(move2+1))
|
||||||
|
screwdriver_handler(player, {type="node", under=list[move2][3], above=list[move2][3]}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under=list[move2][3], above=list[move2][3]}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under=list[move2][3], above=list[move2][3]}, 1)
|
||||||
|
d = 1
|
||||||
|
else
|
||||||
|
move2 = move2+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
while d == 0 and move2 < 300 and dd == 0 and tonumber(chapter) == 2 do
|
||||||
|
if minetest.get_node(list[move2][2]).name == "castrum:knight_lv1_dark" then
|
||||||
|
minetest.set_node(list[move2][2], {name="air"})
|
||||||
|
minetest.set_node(list[move2][3], {name="castrum:knight_lv1_dark"})
|
||||||
|
player:set_attribute("fightmove", ""..(move2+1))
|
||||||
|
screwdriver_handler(player, {type="node", under=list[move2][3], above=list[move2][3]}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under=list[move2][3], above=list[move2][3]}, 1)
|
||||||
|
screwdriver_handler(player, {type="node", under=list[move2][3], above=list[move2][3]}, 1)
|
||||||
|
d = 1
|
||||||
|
else
|
||||||
|
move2 = move2+1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
local kg = 0
|
||||||
|
local ky = 0
|
||||||
|
local tg = 0
|
||||||
|
local ty = 0
|
||||||
|
for j=144,174 do
|
||||||
|
for i=51,81 do
|
||||||
|
if minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:knight_lv1_dark" then
|
||||||
|
tg = 1
|
||||||
|
elseif minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:knight_lv1" then
|
||||||
|
ty = 1
|
||||||
|
elseif minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:castrum_knight1" then
|
||||||
|
ky = 1
|
||||||
|
elseif minetest.get_node({x=j*(-1), y=9, z=i*(-1)}).name == "castrum:knight_dark" then
|
||||||
|
kg = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
if tg == 0 then
|
||||||
|
minetest.chat_send_player(player:get_player_name(), "you win")
|
||||||
|
player:setpos({x=-74, y=8.5, z=-77})
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
inv:remove_item("main", "castrum:knight_lv1 80")
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Chapter.txt", "r")
|
||||||
|
local chapter = file:read("*l")
|
||||||
|
file:close()
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Chapter.txt", "w")
|
||||||
|
file:write((tonumber(chapter)+1))
|
||||||
|
file:close()
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Knight_1.txt", "r")
|
||||||
|
local knight_1 = file:read("*l")
|
||||||
|
file:close()
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Knight_1.txt", "w")
|
||||||
|
file:write((tonumber(knight_1)-player:get_attribute("fightkill")))
|
||||||
|
file:close()
|
||||||
|
Update_knight(player)
|
||||||
|
elseif ky == 0 or ty == 0 then
|
||||||
|
minetest.chat_send_player(player:get_player_name(), "you lose")
|
||||||
|
player:setpos({x=-74, y=8.5, z=-77})
|
||||||
|
local inv = player:get_inventory()
|
||||||
|
inv:remove_item("main", "castrum:knight_lv1 80")
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Knight_1.txt", "r")
|
||||||
|
local knight_1 = file:read("*l")
|
||||||
|
file:close()
|
||||||
|
file = io.open(minetest.get_worldpath().."/SAVE/Knight_1.txt", "w")
|
||||||
|
file:write((tonumber(knight_1)-player:get_attribute("fightkill")))
|
||||||
|
file:close()
|
||||||
|
Update_knight(player)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
minetest.register_node("castrum:start_fight",{
|
||||||
|
tiles = {"castrum_bridge_status.png"},
|
||||||
|
description = "Start fight",
|
||||||
|
--groups = {snappy=1,choppy=2,oddly_breakable_by_hand=2,flammable=3},
|
||||||
|
on_punch = function(pos, node, player, pointed_thing)
|
||||||
|
fight_step1(player)
|
||||||
|
|
||||||
|
end,
|
||||||
|
})
|
8950
mods/castrum/init.lua
Normal file
BIN
mods/castrum/models/castrum_knight.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
mods/castrum/models/castrum_knight2.png
Normal file
After Width: | Height: | Size: 2.3 KiB |
BIN
mods/castrum/models/castrum_knight_dark.png
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
mods/castrum/models/castrum_knight_lv1.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/castrum/models/castrum_knight_lv1_dark.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
mods/castrum/models/castrum_knight_lv2.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/castrum/models/castrum_knight_lv3.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/castrum/models/castrum_knight_lv4.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/castrum/models/castrum_knight_lv5.png
Normal file
After Width: | Height: | Size: 3.2 KiB |
BIN
mods/castrum/models/character.b3d
Normal file
13
mods/castrum/models/character.mtl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Blender MTL File: 'character.blend'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl Character
|
||||||
|
Ns 96.078431
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.640000 0.640000 0.640000
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 1
|
||||||
|
map_Kd D:\minetest-0.4.16\games\castrum\mods\default\models\character.png
|
256
mods/castrum/models/character.obj
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
# Blender v2.79 (sub 0) OBJ File: 'character.blend'
|
||||||
|
# www.blender.org
|
||||||
|
mtllib character.mtl
|
||||||
|
o Player_Cube
|
||||||
|
v -0.200000 0.180102 0.100754
|
||||||
|
v -0.200000 0.180102 -0.100755
|
||||||
|
v -0.200000 0.860203 0.100754
|
||||||
|
v -0.200000 0.860203 -0.100755
|
||||||
|
v -0.400000 0.860205 -0.100755
|
||||||
|
v -0.400000 0.860205 0.100754
|
||||||
|
v -0.200000 0.860205 0.100754
|
||||||
|
v -0.200000 0.860205 -0.100755
|
||||||
|
v -0.400000 0.180103 -0.100755
|
||||||
|
v -0.400000 0.180103 0.100754
|
||||||
|
v -0.200000 0.180103 0.100754
|
||||||
|
v -0.200000 0.180103 -0.100755
|
||||||
|
v -0.200000 -0.500000 0.100754
|
||||||
|
v -0.200000 -0.500000 -0.100755
|
||||||
|
v -0.200000 0.180102 0.100754
|
||||||
|
v -0.200000 0.180102 -0.100755
|
||||||
|
v -0.200000 0.860203 0.201509
|
||||||
|
v -0.200000 0.860203 -0.201510
|
||||||
|
v -0.200000 1.263227 0.201509
|
||||||
|
v -0.200000 1.263227 -0.201510
|
||||||
|
v 0.200000 0.180102 -0.100755
|
||||||
|
v 0.200000 0.180102 0.100754
|
||||||
|
v 0.200000 0.860203 -0.100755
|
||||||
|
v 0.200000 0.860203 0.100754
|
||||||
|
v 0.200000 0.180103 -0.100755
|
||||||
|
v 0.200000 0.180103 0.100754
|
||||||
|
v 0.400000 0.180103 0.100754
|
||||||
|
v 0.400000 0.180103 -0.100755
|
||||||
|
v 0.200000 0.860205 -0.100755
|
||||||
|
v 0.200000 0.860205 0.100754
|
||||||
|
v 0.400000 0.860205 0.100754
|
||||||
|
v 0.400000 0.860205 -0.100755
|
||||||
|
v 0.000000 -0.500000 -0.100755
|
||||||
|
v -0.000000 -0.500000 0.100754
|
||||||
|
v 0.000000 0.180102 0.100754
|
||||||
|
v 0.000000 0.180102 -0.100755
|
||||||
|
v 0.200000 0.860203 -0.201510
|
||||||
|
v 0.200000 0.860203 0.201509
|
||||||
|
v 0.200000 1.263227 -0.201510
|
||||||
|
v 0.200000 1.263227 0.201509
|
||||||
|
v 0.200000 0.180102 -0.100755
|
||||||
|
v 0.200000 0.180102 0.100754
|
||||||
|
v 0.200000 -0.500000 -0.100755
|
||||||
|
v 0.200000 -0.500000 0.100754
|
||||||
|
v 0.000000 -0.500000 -0.100755
|
||||||
|
v 0.000000 -0.500000 0.100754
|
||||||
|
v 0.000000 0.180102 0.100754
|
||||||
|
v 0.000000 0.180102 -0.100755
|
||||||
|
v -0.220000 0.840354 0.221660
|
||||||
|
v -0.220000 0.840354 -0.221660
|
||||||
|
v -0.220000 1.283679 0.221660
|
||||||
|
v -0.220000 1.283679 -0.221660
|
||||||
|
v 0.220000 0.840354 -0.221660
|
||||||
|
v 0.220000 0.840354 0.221660
|
||||||
|
v 0.220000 1.283679 -0.221660
|
||||||
|
v 0.220000 1.283679 0.221660
|
||||||
|
v -0.200000 0.180102 0.137469
|
||||||
|
v -0.200000 0.860203 0.137469
|
||||||
|
v 0.200000 0.180102 0.137469
|
||||||
|
v 0.200000 0.860203 0.137469
|
||||||
|
v 0.200000 0.860203 0.100754
|
||||||
|
v 0.200000 0.180102 0.100754
|
||||||
|
v -0.200000 0.180102 0.100754
|
||||||
|
v -0.200000 0.860203 0.100754
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 0.500000 0.375000
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.437500 0.375000
|
||||||
|
vt 0.437500 0.000000
|
||||||
|
vt 0.312500 0.375000
|
||||||
|
vt 0.312500 0.000000
|
||||||
|
vt 0.562500 0.375000
|
||||||
|
vt 0.562500 0.500000
|
||||||
|
vt 0.437500 0.500000
|
||||||
|
vt 0.437500 0.375000
|
||||||
|
vt 0.437500 0.500000
|
||||||
|
vt 0.312500 0.500000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.000000
|
||||||
|
vt 0.187500 0.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.812500 0.000000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.750000 0.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.187500 0.500000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.000000 0.375000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.062500 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.250000 1.000000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.250000 1.000000
|
||||||
|
vt 0.125000 1.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.250000 0.375000
|
||||||
|
vt 0.250000 0.000000
|
||||||
|
vt 0.187500 0.000000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.062500 0.000000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.000000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.812500 0.500000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.687500 0.375000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.687500 0.500000
|
||||||
|
vt 0.250000 0.000000
|
||||||
|
vt 0.250000 0.375000
|
||||||
|
vt 0.000000 0.375000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.250000 0.375000
|
||||||
|
vt 0.250000 0.000000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.062500 0.500000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.687500 0.375000
|
||||||
|
vt 0.687500 0.000000
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.687500 0.000000
|
||||||
|
vt 0.687500 0.500000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.750000 0.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.187500 0.500000
|
||||||
|
vt 0.812500 0.000000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.812500 0.500000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.062500 0.500000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.875000 1.000000
|
||||||
|
vt 0.750000 1.000000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.750000 1.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 1.000000 0.375000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 0.375000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 1.000000 0.343750
|
||||||
|
vt 0.875000 0.343750
|
||||||
|
vt 0.984375 0.000000
|
||||||
|
vt 0.984375 0.375000
|
||||||
|
vt 0.890625 0.375000
|
||||||
|
vt 0.890625 0.000000
|
||||||
|
vt 0.875000 0.031250
|
||||||
|
vt 1.000000 0.031250
|
||||||
|
vn -0.0000 0.0000 1.0000
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 0.0000 -1.0000
|
||||||
|
vn 0.0000 -1.0000 0.0000
|
||||||
|
vn 0.0000 1.0000 0.0000
|
||||||
|
vn 1.0000 0.0000 0.0000
|
||||||
|
usemtl Character
|
||||||
|
s off
|
||||||
|
f 24/1/1 3/2/1 1/3/1 22/4/1
|
||||||
|
f 3/2/2 4/5/2 2/6/2 1/3/2
|
||||||
|
f 4/5/3 23/7/3 21/8/3 2/6/3
|
||||||
|
f 21/9/4 22/10/4 1/11/4 2/12/4
|
||||||
|
f 4/5/5 3/13/5 24/14/5 23/7/5
|
||||||
|
f 48/15/2 45/16/2 46/17/2 47/18/2
|
||||||
|
f 7/19/1 6/20/1 10/21/1 11/22/1
|
||||||
|
f 8/23/6 7/19/6 11/22/6 12/24/6
|
||||||
|
f 33/25/4 34/26/4 13/27/4 14/28/4
|
||||||
|
f 15/29/2 16/30/2 14/31/2 13/32/2
|
||||||
|
f 40/33/1 19/34/1 17/35/1 38/36/1
|
||||||
|
f 19/34/2 20/37/2 18/38/2 17/35/2
|
||||||
|
f 20/37/3 39/39/3 37/40/3 18/38/3
|
||||||
|
f 37/41/4 38/42/4 17/43/4 18/44/4
|
||||||
|
f 20/37/5 19/45/5 40/46/5 39/39/5
|
||||||
|
f 35/47/1 15/48/1 13/49/1 34/50/1
|
||||||
|
f 41/51/3 43/52/3 45/16/3 48/15/3
|
||||||
|
f 16/30/3 36/53/3 33/54/3 14/31/3
|
||||||
|
f 25/55/4 28/56/4 27/57/4 26/58/4
|
||||||
|
f 32/59/5 29/60/5 30/61/5 31/62/5
|
||||||
|
f 47/18/1 46/17/1 44/63/1 42/64/1
|
||||||
|
f 36/53/6 35/47/6 34/50/6 33/54/6
|
||||||
|
f 42/65/6 44/66/6 43/52/6 41/51/6
|
||||||
|
f 24/67/6 22/68/6 21/8/6 23/7/6
|
||||||
|
f 40/69/6 38/70/6 37/40/6 39/39/6
|
||||||
|
f 16/71/5 15/72/5 35/73/5 36/74/5
|
||||||
|
f 5/75/3 8/23/3 12/24/3 9/76/3
|
||||||
|
f 6/77/2 5/75/2 9/76/2 10/78/2
|
||||||
|
f 31/79/6 27/80/6 28/81/6 32/59/6
|
||||||
|
f 5/75/5 6/82/5 7/83/5 8/23/5
|
||||||
|
f 32/59/3 28/81/3 25/84/3 29/60/3
|
||||||
|
f 45/85/4 43/86/4 44/87/4 46/88/4
|
||||||
|
f 29/60/2 25/84/2 26/89/2 30/90/2
|
||||||
|
f 12/91/4 11/92/4 10/93/4 9/94/4
|
||||||
|
f 30/90/1 26/89/1 27/95/1 31/96/1
|
||||||
|
f 41/97/5 48/98/5 47/99/5 42/100/5
|
||||||
|
f 56/101/1 51/102/1 49/103/1 54/104/1
|
||||||
|
f 51/102/2 52/105/2 50/106/2 49/103/2
|
||||||
|
f 52/105/3 55/107/3 53/108/3 50/106/3
|
||||||
|
f 53/109/4 54/110/4 49/111/4 50/112/4
|
||||||
|
f 52/105/5 51/113/5 56/114/5 55/107/5
|
||||||
|
f 56/115/6 54/116/6 53/108/6 55/107/6
|
||||||
|
f 60/117/1 58/118/1 57/119/1 59/120/1
|
||||||
|
f 61/121/3 62/122/3 63/123/3 64/124/3
|
||||||
|
f 58/118/5 60/117/5 61/125/5 64/126/5
|
||||||
|
f 60/117/6 59/120/6 62/127/6 61/128/6
|
||||||
|
f 57/119/2 58/118/2 64/129/2 63/130/2
|
||||||
|
f 59/120/4 57/119/4 63/131/4 62/132/4
|
BIN
mods/castrum/models/character.png
Normal file
After Width: | Height: | Size: 2.7 KiB |
13
mods/castrum/models/character2.mtl
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
# Blender MTL File: 'None'
|
||||||
|
# Material Count: 1
|
||||||
|
|
||||||
|
newmtl Character
|
||||||
|
Ns 94.117647
|
||||||
|
Ka 1.000000 1.000000 1.000000
|
||||||
|
Kd 0.640000 0.640000 0.640000
|
||||||
|
Ks 0.000000 0.000000 0.000000
|
||||||
|
Ke 0.000000 0.000000 0.000000
|
||||||
|
Ni 1.000000
|
||||||
|
d 1.000000
|
||||||
|
illum 2
|
||||||
|
map_Kd D:\minetest-0.4.16\games\castrum\mods\default\models\character.png
|
256
mods/castrum/models/character2.obj
Normal file
@ -0,0 +1,256 @@
|
|||||||
|
# Blender v2.79 (sub 0) OBJ File: ''
|
||||||
|
# www.blender.org
|
||||||
|
mtllib character2.mtl
|
||||||
|
o Player_Cube
|
||||||
|
v 0.198781 0.287138 0.300130
|
||||||
|
v -0.204244 0.287138 0.300129
|
||||||
|
v -0.204244 -0.392962 0.300129
|
||||||
|
v 0.198781 -0.392962 0.300129
|
||||||
|
v -0.204244 0.287138 0.098619
|
||||||
|
v -0.204244 -0.392962 0.098619
|
||||||
|
v 0.198781 0.287138 0.098619
|
||||||
|
v 0.198781 -0.392962 0.098619
|
||||||
|
v -0.002731 -0.292207 0.199374
|
||||||
|
v -0.002731 -0.292207 -0.480724
|
||||||
|
v -0.002731 -0.493718 -0.480724
|
||||||
|
v -0.002731 -0.493718 0.199374
|
||||||
|
v -0.204244 0.287138 0.300130
|
||||||
|
v -0.405756 0.287138 0.300130
|
||||||
|
v -0.405756 -0.392962 0.300129
|
||||||
|
v -0.204244 -0.392962 0.300129
|
||||||
|
v -0.204244 0.287138 0.098619
|
||||||
|
v -0.204244 -0.392962 0.098619
|
||||||
|
v -0.002731 -0.292207 -0.480724
|
||||||
|
v -0.002731 -0.493718 -0.480724
|
||||||
|
v -0.204244 -0.493718 -0.480724
|
||||||
|
v -0.204244 -0.292207 -0.480724
|
||||||
|
v -0.204244 -0.493718 0.199374
|
||||||
|
v -0.204244 -0.292207 0.199374
|
||||||
|
v 0.198781 0.690160 0.400885
|
||||||
|
v -0.204244 0.690160 0.400885
|
||||||
|
v -0.204244 0.287137 0.400885
|
||||||
|
v 0.198781 0.287137 0.400885
|
||||||
|
v -0.204244 0.690160 -0.002136
|
||||||
|
v -0.204244 0.287138 -0.002136
|
||||||
|
v 0.198781 0.690160 -0.002136
|
||||||
|
v 0.198781 0.287138 -0.002136
|
||||||
|
v -0.002731 -0.493718 0.199374
|
||||||
|
v 0.198781 -0.292207 0.199374
|
||||||
|
v 0.198781 -0.292207 -0.480724
|
||||||
|
v -0.002731 -0.292207 0.199374
|
||||||
|
v 0.198781 -0.392962 0.098619
|
||||||
|
v 0.400294 -0.392962 0.098619
|
||||||
|
v 0.400294 -0.392962 0.300129
|
||||||
|
v 0.198781 -0.392962 0.300129
|
||||||
|
v 0.400294 0.287138 0.098619
|
||||||
|
v 0.198781 0.287138 0.098619
|
||||||
|
v 0.198781 0.287138 0.300130
|
||||||
|
v 0.400294 0.287138 0.300130
|
||||||
|
v 0.198781 -0.493718 -0.480724
|
||||||
|
v 0.198781 -0.493718 0.199374
|
||||||
|
v -0.405756 0.287138 0.098619
|
||||||
|
v -0.405756 -0.392962 0.098619
|
||||||
|
v 0.218933 0.710612 0.421036
|
||||||
|
v -0.224395 0.710612 0.421036
|
||||||
|
v -0.224395 0.267288 0.421036
|
||||||
|
v 0.218933 0.267288 0.421036
|
||||||
|
v -0.224395 0.710612 -0.022287
|
||||||
|
v -0.224395 0.267288 -0.022287
|
||||||
|
v 0.218933 0.710612 -0.022287
|
||||||
|
v 0.218933 0.267288 -0.022287
|
||||||
|
v 0.198781 0.287138 0.336845
|
||||||
|
v -0.204244 0.287138 0.336845
|
||||||
|
v -0.204244 -0.392962 0.336845
|
||||||
|
v 0.198781 -0.392962 0.336845
|
||||||
|
v 0.198781 0.287138 0.300130
|
||||||
|
v 0.198781 -0.392962 0.300129
|
||||||
|
v -0.204244 -0.392962 0.300129
|
||||||
|
v -0.204244 0.287138 0.300130
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 0.500000 0.375000
|
||||||
|
vt 0.500000 0.000000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.437500 0.375000
|
||||||
|
vt 0.437500 0.000000
|
||||||
|
vt 0.312500 0.375000
|
||||||
|
vt 0.312500 0.000000
|
||||||
|
vt 0.562500 0.375000
|
||||||
|
vt 0.562500 0.500000
|
||||||
|
vt 0.437500 0.500000
|
||||||
|
vt 0.437500 0.375000
|
||||||
|
vt 0.437500 0.500000
|
||||||
|
vt 0.312500 0.500000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.000000
|
||||||
|
vt 0.187500 0.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.812500 0.000000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.750000 0.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.187500 0.500000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.000000 0.375000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.062500 0.000000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.375000 0.500000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.250000 0.500000
|
||||||
|
vt 0.125000 0.750000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.375000 0.750000
|
||||||
|
vt 0.375000 1.000000
|
||||||
|
vt 0.250000 1.000000
|
||||||
|
vt 0.250000 0.750000
|
||||||
|
vt 0.250000 1.000000
|
||||||
|
vt 0.125000 1.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.250000 0.375000
|
||||||
|
vt 0.250000 0.000000
|
||||||
|
vt 0.187500 0.000000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.062500 0.000000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.000000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.812500 0.500000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.687500 0.375000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.687500 0.500000
|
||||||
|
vt 0.250000 0.000000
|
||||||
|
vt 0.250000 0.375000
|
||||||
|
vt 0.000000 0.375000
|
||||||
|
vt 0.000000 0.000000
|
||||||
|
vt 0.250000 0.375000
|
||||||
|
vt 0.250000 0.000000
|
||||||
|
vt 0.000000 0.750000
|
||||||
|
vt 0.000000 0.500000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.062500 0.500000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.687500 0.375000
|
||||||
|
vt 0.687500 0.000000
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.625000 0.375000
|
||||||
|
vt 0.625000 0.000000
|
||||||
|
vt 0.687500 0.000000
|
||||||
|
vt 0.687500 0.500000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.750000 0.000000
|
||||||
|
vt 0.187500 0.375000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 0.187500 0.500000
|
||||||
|
vt 0.812500 0.000000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.750000 0.375000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.812500 0.500000
|
||||||
|
vt 0.812500 0.375000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 0.125000 0.375000
|
||||||
|
vt 0.062500 0.375000
|
||||||
|
vt 0.062500 0.500000
|
||||||
|
vt 0.125000 0.500000
|
||||||
|
vt 1.000000 0.750000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.875000 0.500000
|
||||||
|
vt 1.000000 0.500000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.750000 0.500000
|
||||||
|
vt 0.625000 0.750000
|
||||||
|
vt 0.625000 0.500000
|
||||||
|
vt 0.875000 0.750000
|
||||||
|
vt 0.875000 1.000000
|
||||||
|
vt 0.750000 1.000000
|
||||||
|
vt 0.750000 0.750000
|
||||||
|
vt 0.750000 1.000000
|
||||||
|
vt 0.625000 1.000000
|
||||||
|
vt 0.500000 0.750000
|
||||||
|
vt 0.500000 0.500000
|
||||||
|
vt 1.000000 0.375000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 1.000000 0.375000
|
||||||
|
vt 1.000000 0.000000
|
||||||
|
vt 0.875000 0.000000
|
||||||
|
vt 0.875000 0.375000
|
||||||
|
vt 1.000000 0.343750
|
||||||
|
vt 0.875000 0.343750
|
||||||
|
vt 0.984375 0.000000
|
||||||
|
vt 0.984375 0.375000
|
||||||
|
vt 0.890625 0.375000
|
||||||
|
vt 0.890625 0.000000
|
||||||
|
vt 0.875000 0.031250
|
||||||
|
vt 1.000000 0.031250
|
||||||
|
vn -0.0000 -0.0000 1.0000
|
||||||
|
vn -1.0000 0.0000 0.0000
|
||||||
|
vn 0.0000 0.0000 -1.0000
|
||||||
|
vn 0.0000 -1.0000 0.0000
|
||||||
|
vn 0.0000 1.0000 0.0000
|
||||||
|
vn 1.0000 0.0000 0.0000
|
||||||
|
usemtl Character
|
||||||
|
s 1
|
||||||
|
f 1/1/1 2/2/1 3/3/1 4/4/1
|
||||||
|
f 2/2/2 5/5/2 6/6/2 3/3/2
|
||||||
|
f 5/5/3 7/7/3 8/8/3 6/6/3
|
||||||
|
f 8/9/4 4/10/4 3/11/4 6/12/4
|
||||||
|
f 5/5/5 2/13/5 1/14/5 7/7/5
|
||||||
|
f 9/15/2 10/16/2 11/17/2 12/18/2
|
||||||
|
f 13/19/1 14/20/1 15/21/1 16/22/1
|
||||||
|
f 17/23/6 13/19/6 16/22/6 18/24/6
|
||||||
|
f 19/25/3 20/26/3 21/27/3 22/28/3
|
||||||
|
f 23/29/2 24/30/2 22/31/2 21/32/2
|
||||||
|
f 25/33/1 26/34/1 27/35/1 28/36/1
|
||||||
|
f 26/34/2 29/37/2 30/38/2 27/35/2
|
||||||
|
f 29/37/3 31/39/3 32/40/3 30/38/3
|
||||||
|
f 32/41/4 28/42/4 27/43/4 30/44/4
|
||||||
|
f 29/37/5 26/45/5 25/46/5 31/39/5
|
||||||
|
f 33/47/4 23/48/4 21/49/4 20/50/4
|
||||||
|
f 34/51/5 35/52/5 10/16/5 9/15/5
|
||||||
|
f 24/30/5 36/53/5 19/54/5 22/31/5
|
||||||
|
f 37/55/4 38/56/4 39/57/4 40/58/4
|
||||||
|
f 41/59/5 42/60/5 43/61/5 44/62/5
|
||||||
|
f 12/18/4 11/17/4 45/63/4 46/64/4
|
||||||
|
f 36/53/6 33/47/6 20/50/6 19/54/6
|
||||||
|
f 46/65/6 45/66/6 35/52/6 34/51/6
|
||||||
|
f 1/67/6 4/68/6 8/8/6 7/7/6
|
||||||
|
f 25/69/6 28/70/6 32/40/6 31/39/6
|
||||||
|
f 24/71/1 23/72/1 33/73/1 36/74/1
|
||||||
|
f 47/75/3 17/23/3 18/24/3 48/76/3
|
||||||
|
f 14/77/2 47/75/2 48/76/2 15/78/2
|
||||||
|
f 44/79/6 39/80/6 38/81/6 41/59/6
|
||||||
|
f 47/75/5 14/82/5 13/83/5 17/23/5
|
||||||
|
f 41/59/3 38/81/3 37/84/3 42/60/3
|
||||||
|
f 10/85/3 35/86/3 45/87/3 11/88/3
|
||||||
|
f 42/60/2 37/84/2 40/89/2 43/90/2
|
||||||
|
f 18/91/4 16/92/4 15/93/4 48/94/4
|
||||||
|
f 43/90/1 40/89/1 39/95/1 44/96/1
|
||||||
|
f 34/97/1 9/98/1 12/99/1 46/100/1
|
||||||
|
f 49/101/1 50/102/1 51/103/1 52/104/1
|
||||||
|
f 50/102/2 53/105/2 54/106/2 51/103/2
|
||||||
|
f 53/105/3 55/107/3 56/108/3 54/106/3
|
||||||
|
f 56/109/4 52/110/4 51/111/4 54/112/4
|
||||||
|
f 53/105/5 50/113/5 49/114/5 55/107/5
|
||||||
|
f 49/115/6 52/116/6 56/108/6 55/107/6
|
||||||
|
f 57/117/1 58/118/1 59/119/1 60/120/1
|
||||||
|
f 61/121/3 62/122/3 63/123/3 64/124/3
|
||||||
|
f 58/118/5 57/117/5 61/125/5 64/126/5
|
||||||
|
f 57/117/6 60/120/6 62/127/6 61/128/6
|
||||||
|
f 59/119/2 58/118/2 64/129/2 63/130/2
|
||||||
|
f 60/120/4 59/119/4 63/131/4 62/132/4
|
BIN
mods/castrum/textures/castrum_bridge_status.png
Normal file
After Width: | Height: | Size: 474 B |