Skip to content

Commit 9ca2b93

Browse files
committed
stylua formatting
1 parent 122756d commit 9ca2b93

File tree

3 files changed

+26
-26
lines changed

3 files changed

+26
-26
lines changed

campaign/scripts/pfrpg_char_weapon.lua

+20-20
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function onDataChanged()
77
if super and super.onDataChanged then
88
super.onDataChanged()
99
end
10-
if sub_ranged.getValue() == "char_weapon_ranged" then
10+
if sub_ranged.getValue() == 'char_weapon_ranged' then
1111
sub_ranged.subwindow.onAmmoChanged()
1212
end
1313
end
@@ -42,38 +42,38 @@ end
4242

4343
-- luacheck: globals onFullAttackAction
4444
function onFullAttackAction(draginfo)
45-
local nodeWeapon = getDatabaseNode();
46-
local rActor, rAttack = CharManager.getWeaponAttackRollStructures(nodeWeapon);
45+
local nodeWeapon = getDatabaseNode()
46+
local rActor, rAttack = CharManager.getWeaponAttackRollStructures(nodeWeapon)
4747

48-
local rRolls = {};
49-
for i = 1, DB.getValue(nodeWeapon, "attacks", 1) do
48+
local rRolls = {}
49+
for i = 1, DB.getValue(nodeWeapon, 'attacks', 1) do
5050
if canShoot(rActor, nodeWeapon) then
51-
rAttack.modifier = self.calcAttackBonus(i);
52-
rAttack.order = i;
53-
table.insert(rRolls, ActionAttack.getRoll(rActor, rAttack));
51+
rAttack.modifier = self.calcAttackBonus(i)
52+
rAttack.order = i
53+
table.insert(rRolls, ActionAttack.getRoll(rActor, rAttack))
5454
else
55-
break;
55+
break
5656
end
5757
end
58-
if not OptionsManager.isOption("RMMT", "off") and (#rRolls > 1) then
59-
for _,v in ipairs(rRolls) do
60-
v.sDesc = v.sDesc .. " [FULL]";
58+
if not OptionsManager.isOption('RMMT', 'off') and (#rRolls > 1) then
59+
for _, v in ipairs(rRolls) do
60+
v.sDesc = v.sDesc .. ' [FULL]'
6161
end
6262
end
6363

64-
ActionsManager.performMultiAction(draginfo, rActor, "attack", rRolls);
65-
return true;
64+
ActionsManager.performMultiAction(draginfo, rActor, 'attack', rRolls)
65+
return true
6666
end
6767

6868
-- luacheck: globals onSingleAttackAction
6969
function onSingleAttackAction(n, draginfo)
70-
local nodeWeapon = getDatabaseNode();
71-
local rActor, rAttack = CharManager.getWeaponAttackRollStructures(nodeWeapon);
72-
rAttack.order = n or 1;
73-
rAttack.modifier = self.calcAttackBonus(n or 1);
70+
local nodeWeapon = getDatabaseNode()
71+
local rActor, rAttack = CharManager.getWeaponAttackRollStructures(nodeWeapon)
72+
rAttack.order = n or 1
73+
rAttack.modifier = self.calcAttackBonus(n or 1)
7474

7575
if self.canShoot(rActor, nodeWeapon) then
76-
ActionAttack.performRoll(draginfo, rActor, rAttack);
77-
return true;
76+
ActionAttack.performRoll(draginfo, rActor, rAttack)
77+
return true
7878
end
7979
end

campaign/scripts/pfrpg_char_weapon_ranged.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- luacheck: globals onAmmoChanged maxammo.setLink
22
function onAmmoChanged()
3-
local nodeWeapon = getDatabaseNode()
3+
local nodeWeapon = getDatabaseNode()
44
local nodeAmmoLink = AmmunitionManager.getAmmoNode(nodeWeapon)
55
local rActor = ActorManager.resolveActor(DB.getChild(nodeWeapon, '...'))
66
local _, bInfiniteAmmo = AmmunitionManager.getAmmoRemaining(rActor, nodeWeapon, nodeAmmoLink)
@@ -20,8 +20,8 @@ end
2020

2121
-- luacheck: globals onLockModeChanged
2222
function onLockModeChanged(bReadOnly)
23-
if super and super.onLockModeChanged then
24-
super.onLockModeChanged(bReadOnly)
25-
end
26-
self.onAmmoChanged()
23+
if super and super.onLockModeChanged then
24+
super.onLockModeChanged(bReadOnly)
25+
end
26+
self.onAmmoChanged()
2727
end

scripts/manager_ammunition.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ local function itemizeAmmunitionPackage(nodeItem)
260260
local sItemName = DB.getValue(nodeItem, 'name', '')
261261
local nPackageCount
262262
sItemName, nPackageCount = string.match(sItemName, '^(.-) %((%d+)%)$')
263-
sItemName = string.match(sItemName or "", "^(.-)s?$")
263+
sItemName = string.match(sItemName or '', '^(.-)s?$')
264264
if not nPackageCount then
265265
return nodeItem
266266
end

0 commit comments

Comments
 (0)