master
maikerumine 2017-11-24 13:40:26 -05:00
parent 50eea3c223
commit c0fbdf9fc0
11 changed files with 58 additions and 28 deletions

View File

@ -1,5 +1,5 @@
Extreme Survival created by maikerumine<br>
Minetest 0.4.16 mod: "Extreme Survival"<br>
Minetest 0.5.0 mod: "Extreme Survival"<br>
namespace: extreme_survival<br>
(c) 2014-2017 by: maikerumine<br>
https://github.com/maikerumine<br>

View File

@ -1 +1 @@
name = Extreme-Survival-Minetest-04.16
name = ESM5

View File

@ -1,17 +1,17 @@
--Extreme Survival created by maikerumine
-- Minetest 0.4.13 mod: "Extreme Survival"
-- Minetest 0.5.0 mod: "Extreme Survival"
-- namespace: es
--version 1.8
--version 3.1
--https://github.com/maikerumine
--License:
--~~~~~~~~
--Code:
--(c) Copyright 2015 maikerumine; modified zlib-License
--(c) Copyright 2017 maikerumine; modified zlib-License
--see "LICENSE.txt" for details.
--Media(if not stated differently):
--(c) Copyright (2014-2015) maikerumine; CC-BY-SA 3.0
--(c) Copyright (2014-2017) maikerumine; CC-BY-SA 3.0
es = {}
--NOTE: THIS--v v--MUST BE FIRST IN THE INIT FOR EVERYTHING TO WORK

View File

@ -30,7 +30,8 @@ function add_HP_gauge(pl)
local pos = pl:getpos()
local ent = minetest.env:add_entity(pos, "gauges:hp_bar")
if ent ~= nil then
ent:set_attach(pl, "", {x = 0, y = 10, z = 0}, {x = 0, y = 0, z = 0})
--ent:set_attach(pl, "", {x = 0, y = 10, z = 0}, {x = 0, y = 0, z = 0})
ent:set_attach(pl, "", {x = 0, y = 20, z = 0}, {x = 0, y = 0, z = 0})
ent = ent:get_luaentity()
ent.wielder = pl
end

View File

@ -7,7 +7,8 @@ local vector_equals = vector.equals
local math_sin = math.sin
local math_deg = math.deg
local table_copy = table.copy
local get_animation = default.player_get_animation
local get_animation = default.player_get_animation--mt4
local get_animation = player_api.player_get_animation--mt5
-- Animation alias
local STAND = 1
@ -30,20 +31,20 @@ local RLEG = "Leg_Right"
local bone_position = {
normal = {
[BODY] = vector_new(0, -3.5, 0),
[HEAD] = vector_new(0, 6, 0),
[BODY] = vector_new(0, 6.5, 0),
[HEAD] = vector_new(0, 6.5, 0),
[CAPE] = vector_new(0, 6.5, 1.5),
[LARM] = vector_new(-3.9, 6.5, 0),
[RARM] = vector_new(3.9, 6.5, 0),
[LARM] = vector_new(-3, 5.5, 0),
[RARM] = vector_new(3, 5.5, 0),
[LLEG] = vector_new(-1, 0, 0),
[RLEG] = vector_new(1, 0, 0)
},
armor = {
[BODY] = vector_new(0, -3.5, 0),
[BODY] = vector_new(0, 6.5, 0),
[HEAD] = vector_new(0, 6.75, 0),
[CAPE] = vector_new(0, 6.75, 1.5),
[LARM] = vector_new(2, 6.5, 0),
[RARM] = vector_new(-2, 6.5, 0),
[LARM] = vector_new(3, 5.5, 0),
[RARM] = vector_new(-3, 5.5, 0),
[LLEG] = vector_new(1, 0, 0),
[RLEG] = vector_new(-1, 0, 0)
}
@ -54,19 +55,19 @@ local bone_rotation = {
[BODY] = vector_new(0, 0, 0),
[HEAD] = vector_new(0, 0, 0),
[CAPE] = vector_new(0, 0, 180),
[LARM] = vector_new(180, 0, 0),
[RARM] = vector_new(180, 0, 0),
[LLEG] = vector_new(0, 0, 0),
[RLEG] = vector_new(0, 0, 0)
[LARM] = vector_new(0, 0, -4),
[RARM] = vector_new(0, 0, 4),
[LLEG] = vector_new(0, 0, -3),
[RLEG] = vector_new(0, 0, 3)
},
armor = {
[BODY] = vector_new(0, 0, 0),
[HEAD] = vector_new(0, 0, 0),
[CAPE] = vector_new(180, 0, 180),
[LARM] = vector_new(180, 0, 9),
[RARM] = vector_new(180, 0, -9),
[LLEG] = vector_new(0, 0, 0),
[RLEG] = vector_new(0, 0, 0)
[LARM] = vector_new(0, 0, 4),
[RARM] = vector_new(0, 0, -4),
[LLEG] = vector_new(0, 0, 3),
[RLEG] = vector_new(0, 0, -3)
}
}
@ -206,7 +207,8 @@ minetest.register_globalstep(function(dtime)
end
for _, player in ipairs(minetest.get_connected_players()) do
local animation = get_animation(player).animation
--local animation = get_animation(player).animation--mt4
local animation = player_api.get_animation(player).animation--mt5
if animation == "lay" then -- No head rotate
set_animation(player, STAND) -- Reset
@ -238,3 +240,31 @@ minetest.register_globalstep(function(dtime)
end
end
end)
--[[
# playeranim
Makes the head, and the right arm when youre mining, face the way youre facing, similar to Minecraft. Compatible with 3d_armor. Forked from the animplus mod, which was an ugly hack.
The head only turns up and down relative to the body, except it turns slightly to the right/left when you strafe right/left. When you turn the body turns with the head.
Works in multiplayer, I tested it on a local server.
Created by Rui914, this document was written by sloantothebone.
Updated to Minetest engint 0.5++ by maikerumine
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. You just DO WHAT THE FUCK YOU WANT TO.
]]

View File

@ -1,11 +1,11 @@
tnt = {}
--[[
-- Default to enabled when in singleplayer
local enable_tnt = minetest.settings:get_bool("enable_tnt")
if enable_tnt == nil then
enable_tnt = minetest.is_singleplayer()
end
]]
-- loss probabilities array (one in X will be lost)
local loss_prob = {}

View File

@ -92,9 +92,8 @@ minetest.register_node("travelnet:travelnet", {
})
--[[
minetest.register_craft({
output = "travelnet:travelnet",
recipe = travelnet.travelnet_recipe,
})
]]