mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
Fix get_tool_wear_after_use for one use (insta-break) (#12945)
This commit is contained in:
parent
042f7917e7
commit
88b04eadc9
1 changed files with 2 additions and 2 deletions
|
@ -166,8 +166,8 @@ int ModApiUtil::l_get_tool_wear_after_use(lua_State *L)
|
|||
NO_MAP_LOCK_REQUIRED;
|
||||
u32 uses = readParam<int>(L, 1);
|
||||
u16 initial_wear = readParam<int>(L, 2, 0);
|
||||
u16 wear = calculateResultWear(uses, initial_wear);
|
||||
lua_pushnumber(L, wear);
|
||||
u32 add_wear = calculateResultWear(uses, initial_wear);
|
||||
lua_pushnumber(L, add_wear);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue