mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-12 12:43:15 +01:00
Resolve luacheck findings
This commit is contained in:
parent
d85c7c395f
commit
bd4a701322
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user