Fix get_tool_wear_after_use for one use (insta-break) (#12945)

This commit is contained in:
Gregor Parzefall 2022-11-09 17:58:53 +01:00 committed by GitHub
parent 042f7917e7
commit 88b04eadc9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -166,8 +166,8 @@ int ModApiUtil::l_get_tool_wear_after_use(lua_State *L)
NO_MAP_LOCK_REQUIRED; NO_MAP_LOCK_REQUIRED;
u32 uses = readParam<int>(L, 1); u32 uses = readParam<int>(L, 1);
u16 initial_wear = readParam<int>(L, 2, 0); u16 initial_wear = readParam<int>(L, 2, 0);
u16 wear = calculateResultWear(uses, initial_wear); u32 add_wear = calculateResultWear(uses, initial_wear);
lua_pushnumber(L, wear); lua_pushnumber(L, add_wear);
return 1; return 1;
} }