File tree Expand file tree Collapse file tree 5 files changed +8
-5
lines changed
modules/server/sections/groups Expand file tree Collapse file tree 5 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -45,22 +45,25 @@ return {
4545 -- Default keybind for the '/scoreboard' command
4646 commandKey = ' DELETE' ,
4747
48- -- Whether to include off-duty players in group count
48+ -- Whether to include off-duty players in group count (if not defined in the group row itself)
4949 includeOffDuty = false ,
5050
5151 -- Group list shown in the scoreboard
5252 groups = {
5353 {
5454 label = ' Police' ,
5555 groups = {' police' , ' sheriff' },
56+ includeOffDuty = false ,
5657 },
5758 {
5859 label = ' EMS' ,
5960 groups = {' ambulance' },
61+ includeOffDuty = false ,
6062 },
6163 {
6264 label = ' Mechanics' ,
6365 groups = {' lsc' , ' bennys' , ' hayes' },
66+ includeOffDuty = true ,
6467 },
6568 {
6669 label = ' Taxi' ,
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ local function getAllGroupsCounts()
148148 local includeOffDuty = Config .includeOffDuty
149149
150150 for index , group in ipairs (Config .groups ) do
151- counts [index ] = getGroupsCount (group .groups , includeOffDuty )
151+ counts [index ] = getGroupsCount (group .groups , group . includeOffDuty or group . includeOffDuty == nil and includeOffDuty )
152152 end
153153
154154 return counts
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ local function getAllGroupsCounts()
2525 local includeOffDuty = Config .includeOffDuty
2626
2727 for index , group in ipairs (Config .groups ) do
28- counts [index ] = getGroupsCount (group .groups , includeOffDuty )
28+ counts [index ] = getGroupsCount (group .groups , group . includeOffDuty or group . includeOffDuty == nil and includeOffDuty )
2929 end
3030
3131 return counts
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ local function getAllGroupsCounts()
137137 local includeOffDuty = Config .includeOffDuty
138138
139139 for index , group in ipairs (Config .groups ) do
140- counts [index ] = getGroupsCount (group .groups , includeOffDuty )
140+ counts [index ] = getGroupsCount (group .groups , group . includeOffDuty or group . includeOffDuty == nil and includeOffDuty )
141141 end
142142
143143 return counts
Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ local function getAllGroupsCounts()
147147 local includeOffDuty = Config .includeOffDuty
148148
149149 for index , group in ipairs (Config .groups ) do
150- counts [index ] = getGroupsCount (group .groups , includeOffDuty )
150+ counts [index ] = getGroupsCount (group .groups , group . includeOffDuty or group . includeOffDuty == nil and includeOffDuty )
151151 end
152152
153153 return counts
You can’t perform that action at this time.
0 commit comments