Resolve luacheck findings

This commit is contained in:
teknomunk 2024-09-29 06:38:41 -05:00
parent e53bb82a3c
commit 64dc0e6277
3 changed files with 4 additions and 5 deletions

@ -1,6 +1,6 @@
name = mcl_bows
author = Arcelmi
description = This mod adds bows and arrows for MineClone 2.
depends = controls, mcl_particles, mcl_enchanting, mcl_init, mcl_util, mcl_shields, mcl_fovapi, mcl_luck, vl_projectile
depends = controls, mcl_particles, mcl_enchanting, mcl_init, mcl_util, mcl_shields, mcl_fovapi, mcl_luck, vl_projectile, mcl_explosions
optional_depends = awards, mcl_achievements, mcl_core, mcl_mobitems, playerphysics, doc, doc_identifier, mesecons_button

@ -230,7 +230,7 @@ minetest.register_craftitem("mcl_bows:rocket", {
local yaw = math.atan2(dropdir.z, dropdir.x) + YAW_OFFSET
mcl_bows.shoot_arrow(itemstack:get_name(), shootpos, dropdir, yaw, nil, 19, 3)
end,
_on_collide_with_entity = function(self, pos, obj)
_on_collide_with_entity = function(self, _, obj)
if self._in_player == false then
pos = self.object:get_pos()
obj:punch(self.object, 1.0, {

@ -1,5 +1,5 @@
local mod = {}
vl_projectile = mod
vl_projectile = {}
local mod = vl_projectile
local vl_physics_path = minetest.get_modpath("vl_physics")
@ -256,7 +256,6 @@ end
local function handle_entity_collision(self, entity_def, projectile_def, object)
local pos = self.object:get_pos()
local dir = vector.normalize(self.object:get_velocity())
local self_vl_projectile = self._vl_projectile
-- Check if this is allowed
local allow_punching = projectile_def.allow_punching or true