mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-12-13 13:13:15 +01:00
Resolve luacheck findings
This commit is contained in:
parent
d85c7c395f
commit
bd4a701322
@ -1,6 +1,6 @@
|
|||||||
name = mcl_bows
|
name = mcl_bows
|
||||||
author = Arcelmi
|
author = Arcelmi
|
||||||
description = This mod adds bows and arrows for MineClone 2.
|
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
|
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
|
local yaw = math.atan2(dropdir.z, dropdir.x) + YAW_OFFSET
|
||||||
mcl_bows.shoot_arrow(itemstack:get_name(), shootpos, dropdir, yaw, nil, 19, 3)
|
mcl_bows.shoot_arrow(itemstack:get_name(), shootpos, dropdir, yaw, nil, 19, 3)
|
||||||
end,
|
end,
|
||||||
_on_collide_with_entity = function(self, pos, obj)
|
_on_collide_with_entity = function(self, _, obj)
|
||||||
if self._in_player == false then
|
if self._in_player == false then
|
||||||
pos = self.object:get_pos()
|
pos = self.object:get_pos()
|
||||||
obj:punch(self.object, 1.0, {
|
obj:punch(self.object, 1.0, {
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
local mod = {}
|
vl_projectile = {}
|
||||||
vl_projectile = mod
|
local mod = vl_projectile
|
||||||
|
|
||||||
local vl_physics_path = minetest.get_modpath("vl_physics")
|
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 function handle_entity_collision(self, entity_def, projectile_def, object)
|
||||||
local pos = self.object:get_pos()
|
local pos = self.object:get_pos()
|
||||||
local dir = vector.normalize(self.object:get_velocity())
|
local dir = vector.normalize(self.object:get_velocity())
|
||||||
local self_vl_projectile = self._vl_projectile
|
|
||||||
|
|
||||||
-- Check if this is allowed
|
-- Check if this is allowed
|
||||||
local allow_punching = projectile_def.allow_punching or true
|
local allow_punching = projectile_def.allow_punching or true
|
||||||
|
Loading…
Reference in New Issue
Block a user