From 5db55dde3c97a137bd13d68d35c479f7fa63225f Mon Sep 17 00:00:00 2001 From: teknomunk Date: Thu, 5 Dec 2024 08:57:31 -0600 Subject: [PATCH] Update { ... } to {...} --- mods/ITEMS/mcl_bows/arrow.lua | 4 ++-- mods/ITEMS/mcl_bows/bow.lua | 2 +- mods/ITEMS/mcl_bows/rocket.lua | 2 +- mods/ITEMS/mcl_fishing/init.lua | 2 +- mods/ITEMS/mcl_throwing/egg.lua | 2 +- mods/ITEMS/mcl_throwing/ender_pearl.lua | 4 ++-- mods/ITEMS/mcl_throwing/snowball.lua | 8 ++++---- mods/ITEMS/vl_projectile/init.lua | 2 +- 8 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mods/ITEMS/mcl_bows/arrow.lua b/mods/ITEMS/mcl_bows/arrow.lua index e09b822da..3a42b0103 100644 --- a/mods/ITEMS/mcl_bows/arrow.lua +++ b/mods/ITEMS/mcl_bows/arrow.lua @@ -65,7 +65,7 @@ local arrow_entity = { damages_players = true, maximum_time = 60, damage_groups = function(self) - return { fleshy = self._damage } + return {fleshy = self._damage} end, hide_tracer = function(self) return self._stuck or self._damage < 9 or self._in_player @@ -165,7 +165,7 @@ local arrow_entity = { return core.serialize(out) end, on_activate = function(self, staticdata, dtime_s) - self.object:set_armor_groups({ immortal = 1 }) + self.object:set_armor_groups({immortal = 1}) self._time_in_air = 1.0 local data = core.deserialize(staticdata) diff --git a/mods/ITEMS/mcl_bows/bow.lua b/mods/ITEMS/mcl_bows/bow.lua index 0964c4aad..9bf02fd2f 100644 --- a/mods/ITEMS/mcl_bows/bow.lua +++ b/mods/ITEMS/mcl_bows/bow.lua @@ -70,7 +70,7 @@ function mcl_bows.shoot_arrow(arrow_item, pos, dir, yaw, shooter, power, damage, le._arrow_item = arrow_item local item_def = core.registered_items[le._arrow_item] if item_def and item_def._arrow_image then - obj:set_properties({ textures = item_def._arrow_image }) + obj:set_properties({textures = item_def._arrow_image}) end core.sound_play("mcl_bows_bow_shoot", {pos=pos, max_hear_distance=16}, true) if shooter and shooter:is_player() then diff --git a/mods/ITEMS/mcl_bows/rocket.lua b/mods/ITEMS/mcl_bows/rocket.lua index 48f91a026..86f91f211 100644 --- a/mods/ITEMS/mcl_bows/rocket.lua +++ b/mods/ITEMS/mcl_bows/rocket.lua @@ -223,7 +223,7 @@ core.register_craftitem("mcl_bows:rocket", { S("Arrows might get stuck on solid blocks and can be retrieved again. They are also capable of pushing wooden buttons."), _doc_items_usagehelp = S("To use arrows as ammunition for a bow, just put them anywhere in your inventory, they will be used up automatically. To use arrows as ammunition for a dispenser, place them in the dispenser's inventory. To retrieve an arrow that sticks in a block, simply walk close to it."), inventory_image = "mcl_bows_rocket.png", - groups = { ammo=1, ammo_crossbow=1, ammo_bow_regular=1 }, + groups = {ammo=1, ammo_crossbow=1, ammo_bow_regular=1}, _on_dispense = function(itemstack, dispenserpos, droppos, dropnode, dropdir) -- Shoot arrow local shootpos = vector.add(dispenserpos, vector.multiply(dropdir, 0.51)) diff --git a/mods/ITEMS/mcl_fishing/init.lua b/mods/ITEMS/mcl_fishing/init.lua index a3d51eb1c..fad3e71da 100644 --- a/mods/ITEMS/mcl_fishing/init.lua +++ b/mods/ITEMS/mcl_fishing/init.lua @@ -327,7 +327,7 @@ vl_projectile.register("mcl_fishing:flying_bobber_entity", { behaviors = { vl_projectile.collides_with_solids, }, - collides_with = { "group:liquid" }, + collides_with = {"group:liquid"}, on_collide_with_solid = function(self, pos, node) local player = self._owner diff --git a/mods/ITEMS/mcl_throwing/egg.lua b/mods/ITEMS/mcl_throwing/egg.lua index 7e4f92d51..bd3dc54e2 100644 --- a/mods/ITEMS/mcl_throwing/egg.lua +++ b/mods/ITEMS/mcl_throwing/egg.lua @@ -14,7 +14,7 @@ core.register_craftitem("mcl_throwing:egg", { stack_max = 64, on_use = mcl_throwing.get_player_throw_function("mcl_throwing:egg_entity"), _on_dispense = mcl_throwing.dispense_function, - groups = { craftitem = 1 }, + groups = {craftitem = 1}, }) local function egg_spawn_chicks(pos) diff --git a/mods/ITEMS/mcl_throwing/ender_pearl.lua b/mods/ITEMS/mcl_throwing/ender_pearl.lua index dd0497af3..c8c337c6b 100644 --- a/mods/ITEMS/mcl_throwing/ender_pearl.lua +++ b/mods/ITEMS/mcl_throwing/ender_pearl.lua @@ -17,7 +17,7 @@ core.register_craftitem("mcl_throwing:ender_pearl", { inventory_image = "mcl_throwing_ender_pearl.png", stack_max = 16, on_use = mcl_throwing.get_player_throw_function("mcl_throwing:ender_pearl_entity"), - groups = { transport = 1 }, + groups = {transport = 1}, }) function on_collide(self, pos, node) @@ -91,7 +91,7 @@ function on_collide(self, pos, node) local oldpos = player:get_pos() -- Teleport and hurt player player:set_pos(telepos) - player:set_hp(player:get_hp() - 5, { type = "fall", from = "mod" }) + player:set_hp(player:get_hp() - 5, {type = "fall", from = "mod"}) -- 5% chance to spawn endermite at the player's origin if math.random(1,20) == 1 then diff --git a/mods/ITEMS/mcl_throwing/snowball.lua b/mods/ITEMS/mcl_throwing/snowball.lua index 842f93dbb..20f9879c7 100644 --- a/mods/ITEMS/mcl_throwing/snowball.lua +++ b/mods/ITEMS/mcl_throwing/snowball.lua @@ -12,7 +12,7 @@ core.register_craftitem("mcl_throwing:snowball", { _doc_items_usagehelp = how_to_throw, inventory_image = "mcl_throwing_snowball.png", stack_max = 64, - groups = { weapon_ranged = 1 }, + groups = {weapon_ranged = 1}, on_use = mcl_throwing.get_player_throw_function("mcl_throwing:snowball_entity"), _on_dispense = mcl_throwing.dispense_function, }) @@ -71,10 +71,10 @@ vl_projectile.register("mcl_throwing:snowball_entity", { snowball_particles(self._last_pos or pos, self.object:get_velocity()) end, sounds = { - on_solid_collision = {"mcl_throwing_snowball_impact_hard", { max_hear_distance=16, gain=0.7 }, true}, - on_entity_collision = {"mcl_throwing_snowball_impact_soft", { max_hear_distance=16, gain=0.7 }, true} + on_solid_collision = {"mcl_throwing_snowball_impact_hard", {max_hear_distance=16, gain=0.7}, true}, + on_entity_collision = {"mcl_throwing_snowball_impact_soft", {max_hear_distance=16, gain=0.7}, true} }, - damage_groups = { snowball_vulnerable = 3 }, + damage_groups = {snowball_vulnerable = 3}, }, }) mcl_throwing.register_throwable_object("mcl_throwing:snowball", "mcl_throwing:snowball_entity", 22) diff --git a/mods/ITEMS/vl_projectile/init.lua b/mods/ITEMS/vl_projectile/init.lua index e05d084c9..25c4a8ba9 100644 --- a/mods/ITEMS/vl_projectile/init.lua +++ b/mods/ITEMS/vl_projectile/init.lua @@ -491,7 +491,7 @@ local function handle_entity_collision(self, entity_def, projectile_def, object) dmg = dmg(self, entity_def, projectile_def, object) end - object:punch(self.object, 1.0, projectile_def.tool or { full_punch_interval = 1.0, damage_groups = dmg }, dir ) + object:punch(self.object, 1.0, projectile_def.tool or {full_punch_interval = 1.0, damage_groups = dmg}, dir ) -- Guard against crashes when projectiles get destroyed in response to what it punched if not self.object:get_pos() then return true end