From 8930d529455b1b083bd2cd8d7588f65f0a59f6c6 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Thu, 11 Jan 2024 20:42:35 +0000 Subject: [PATCH] Lua code format - (Stylua) --- .../scripts/actions/rookgaard/rapier_quest.lua | 18 +++++++++--------- data/libs/functions/player.lua | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua b/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua index 553db8e9a73..350fa7afb81 100644 --- a/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua +++ b/data-otservbr-global/scripts/actions/rookgaard/rapier_quest.lua @@ -1,15 +1,15 @@ local rapierQuest = Action() function rapierQuest.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if player:questKV('rapier'):get('completed') then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.") - else - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a rapier.") - player:addItem(3272, 1) - player:kv():scoped('quests'):scoped('rapier'):set('completed', true) - end - return true + if player:questKV("rapier"):get("completed") then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The box is empty.") + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have found a rapier.") + player:addItem(3272, 1) + player:kv():scoped("quests"):scoped("rapier"):set("completed", true) + end + return true end -rapierQuest:position{x = 32099, y = 32198, z = 9} +rapierQuest:position({ x = 32099, y = 32198, z = 9 }) rapierQuest:register() diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index f5a2a874124..965e8def297 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -750,5 +750,5 @@ function Player:canFightBoss(bossNameOrId) end function Player:questKV(questName) - return self:kv():scoped('quests'):scoped(questName) + return self:kv():scoped("quests"):scoped(questName) end