Compare commits

2 Commits

Author SHA1 Message Date
b3773c0470 Merge remote-tracking branch 'upstream/master' 2020-09-15 00:28:19 +02:00
afd3680984 Ajoute message de chargement au démarrage. 2020-06-16 22:15:54 +02:00
3 changed files with 5 additions and 33 deletions

View File

@ -1,11 +0,0 @@
on: [push, pull_request]
name: build
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: lint
uses: Roang-zero1/factorio-mod-luacheck@master
with:
luacheckrc_url: ""

View File

@ -1,19 +0,0 @@
allow_defined_top = true
unused_args = false
max_line_length = false
read_globals = {
string = {fields = {"split", "trim"}},
table = {fields = {"copy", "getn"}},
"player_monoids",
"playerphysics",
"hb",
"vector",
"hunger_ng",
}
globals = {
"minetest",
"hbhunger"
}

View File

@ -130,8 +130,8 @@ local function is_walkable(ground)
end
local function create_particles(player, name, ground)
local def = minetest.registered_nodes[ground.name] or {}
local tile = def.tiles and def.tiles[1] or def.inventory_image
local def = minetest.registered_nodes[ground.name]
local tile = def.tiles[1] or def.inventory_image
if type(tile) == "table" then
tile = tile.name
end
@ -237,7 +237,7 @@ local function sprint_step(player, dtime)
if (player_stamina > 0 and hunger > starve_limit and ground) or fast then
start_sprint(player)
if stamina and not fast then drain_stamina(player) end
if starve and not fast then drain_hunger(player, name) end
if starve then drain_hunger(player, name) end
if breath and not fast and breath_timer[name] >= 2 then
drain_breath(player)
breath_timer[name] = 0
@ -259,3 +259,5 @@ minetest.register_globalstep(function(dtime)
sprint_timer = 0
end
end)
minetest.log("action", "[hbsprint] loaded.")