Add medkits, remove apples

This commit is contained in:
Anand S 2018-11-18 18:45:32 +05:30 committed by rubenwardy
parent 3e57880520
commit b7bab11c3b
11 changed files with 134 additions and 65 deletions

View file

@ -48,7 +48,8 @@ end
function random_messages.read_messages()
random_messages.messages = {
"To talk to only your team, start your messages with /t. For example, /t Hello team!",
"Eat apples to restore health quickly.",
"Use medkits to gradually restore your health.",
"Moving or fighting while healing will interrupt the healing process.",
"Steel swords do more damage than guns, but you need to be up close.",
"Gain more score by killing more than you die, or by capturing the flag.",
"You gain more score the better the opponent you defeat.",

View file

@ -1 +1,2 @@
medkits
hudbars?

View file

@ -28,8 +28,8 @@ local players = {}
local function setSprinting(player, info, sprinting)
if info.sprinting ~= sprinting then
player:set_physics_override(SPRINT_MODIFIERS[sprinting])
info.sprinting = sprinting
end
info.sprinting = sprinting
end
minetest.register_globalstep(function(dtime)
@ -46,11 +46,10 @@ minetest.register_globalstep(function(dtime)
local sprintRequested = controls.aux1 and controls.up
-- ##1## replace info.sprintRequested with info.sprinting
if sprintRequested ~= info.sprintRequested then
if sprintRequested and info.stamina > MIN_SPRINT then
if sprintRequested and info.stamina > MIN_SPRINT
and not is_healing(player:get_player_name()) then
setSprinting(player, info, true)
end
if not sprintRequested then
elseif not sprintRequested then
setSprinting(player, info, false)
end
end