Skip to content

Commit 6a85f18

Browse files
authored
fix some typos in the scoreboard (#607)
1 parent 1fef215 commit 6a85f18

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

[gameplay]/scoreboard/dxscoreboard_client.lua

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
local triggerKey = "tab" -- default button to open/close scoreboard
44
local settingsKey = "F7" -- default button to open the settings window
5-
local seperationSpace = 80 -- the space between top/bottom screen and scoreboard top/bottom in pixels
5+
local separationSpace = 80 -- the space between top/bottom screen and scoreboard top/bottom in pixels
66

77
drawOverGUI = true -- draw scoreboard over gui?
88

@@ -538,7 +538,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
538538

539539
for key2 = 1, #sortTableTeam do
540540
local value = sortTableTeam[key2]
541-
541+
542542
scoreboardContent[index] = value
543543
index = index + 1
544544
end
@@ -701,7 +701,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
701701

702702
local partOfName = string.sub( playerName, firstCodePos, secondCodePos )
703703
local textLength4 = dxGetTextWidth( partOfName, fontscale(contentFont, s(1)), contentFont )
704-
704+
705705
dxDrawText( partOfName, xPos+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(teamHeaderFont, scoreboardScale), teamHeaderFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(teamHeaderFont, s(1)), teamHeaderFont, "left", "top", true, false, drawOverGUI )
706706
dxDrawText( partOfName, xPos, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(teamHeaderFont, scoreboardScale), teamHeaderFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(teamHeaderFont, s(1)), teamHeaderFont, "left", "top", true, false, drawOverGUI )
707707
xPos = xPos + textLength4
@@ -777,7 +777,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
777777
local firstPos = 1
778778
local partOfName = string.sub( playerName, firstPos, secondPos )
779779
local textLength3 = dxGetTextWidth( partOfName, fontscale(contentFont, s(1)), contentFont )
780-
780+
781781
dxDrawText( partOfName, xPos+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI )
782782
dxDrawText( partOfName, xPos, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI )
783783
xPos = xPos + textLength3
@@ -789,7 +789,7 @@ function doDrawScoreboard( rtPass, onlyAnim, sX, sY )
789789

790790
local partOfName = string.sub( playerName, firstCodePos, secondCodePos )
791791
local textLength2 = dxGetTextWidth( partOfName, fontscale(contentFont, s(1)), contentFont )
792-
792+
793793
dxDrawText( partOfName, xPos+s(1), y+s(1), topX+x+s(1+column.width), y+s(11)+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( 0, 0, 0, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI )
794794
dxDrawText( partOfName, xPos, y, topX+x+s(column.width), y+dxGetFontHeight( fontscale(contentFont, scoreboardScale), contentFont ), tocolor( r or 255, g or 255, b or 255, a or 255 ), fontscale(contentFont, s(1)), contentFont, "left", "top", true, false, drawOverGUI )
795795
xPos = xPos + textLength2
@@ -880,7 +880,7 @@ function scoreboardAddColumn(name, width, friendlyName, priority, textFunction,
880880
textFunction = textFunction or nil
881881
fromResource = sourceResource or fromResource or nil
882882

883-
if not (priority > MAX_PRIRORITY_SLOT or priority < 1) then
883+
if not (priority > MAX_PRIORITY_SLOT or priority < 1) then
884884

885885
for key = 1, #scoreboardColumns do
886886
local value = scoreboardColumns[key]
@@ -929,10 +929,10 @@ function scoreboardRemoveColumn(name)
929929

930930
for key = 1, #scoreboardColumns do
931931
local value = scoreboardColumns[key]
932-
932+
933933
if name == value.name then
934934
table.remove(scoreboardColumns, key)
935-
935+
936936
for resource, content in pairs(resourceColumns) do
937937
table.removevalue(content, name)
938938
end
@@ -1062,7 +1062,7 @@ function scoreboardSetColumnPriority(name, priority)
10621062
return false
10631063
end
10641064

1065-
if not (priority > MAX_PRIRORITY_SLOT or priority < 1) then
1065+
if not (priority > MAX_PRIORITY_SLOT or priority < 1) then
10661066
local columnIndex = false
10671067

10681068
for key = 1, #scoreboardColumns do
@@ -1126,7 +1126,7 @@ function scoreboardGetTopCornerPosition()
11261126
local topX, topY = (sX/2) - (calculateWidth()/2), (sY/2) - (calculateHeight()/2)
11271127

11281128
topY = topY - 15 -- Extra 15 pixels for the scroll up button
1129-
1129+
11301130
return math.floor(topX), math.floor(topY + 1)
11311131
end
11321132

@@ -1136,7 +1136,7 @@ function scoreboardGetSize()
11361136
end
11371137

11381138
local width, height = calculateWidth(), calculateHeight()
1139-
1139+
11401140
return width, height
11411141
end
11421142

@@ -1214,7 +1214,7 @@ function math.clamp( low, value, high )
12141214
end
12151215

12161216
function fromcolor( color )
1217-
-- Propably not the most efficient way, but only way it works
1217+
-- Probably not the most efficient way, but only way it works
12181218
local colorCode = string.format( "%x", color )
12191219
local a = string.sub( colorCode, 1, 2 ) or "FF"
12201220
local r = string.sub( colorCode, 3, 4 ) or "FF"
@@ -1280,7 +1280,7 @@ end
12801280

12811281
function getMaxPerWindow()
12821282
local sX, sY = SCREEN_X, SCREEN_Y
1283-
local availableHeight = sY-(seperationSpace*2)-s(5)
1283+
local availableHeight = sY-(separationSpace*2)-s(5)
12841284
if (serverInfo.server or serverInfo.players) and showServerInfo then availableHeight = availableHeight-dxGetFontHeight( fontscale(serverInfoFont, scoreboardScale), serverInfoFont ) end
12851285
if (serverInfo.gamemode or serverInfo.map) and showGamemodeInfo then availableHeight = availableHeight-dxGetFontHeight( fontscale(serverInfoFont, scoreboardScale), serverInfoFont ) end
12861286
availableHeight = availableHeight-s(3)

[gameplay]/scoreboard/dxscoreboard_exports.lua

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
scoreboardColumns = {
22
{ ["name"] = "name", ["width"] = 200, ["friendlyName"] = "Name", ["priority"] = 1 },
3-
{ ["name"] = "ping", ["width"] = 40, ["friendlyName"] = "Ping", ["priority"] = MAX_PRIRORITY_SLOT },
3+
{ ["name"] = "ping", ["width"] = 40, ["friendlyName"] = "Ping", ["priority"] = MAX_PRIORITY_SLOT },
44
}
55

66
resourceColumns = {}
@@ -23,7 +23,7 @@ showCountries = toboolean( get( "showCountries" ) ) or false
2323
scrollStep = tonumber( get( "scrollStep" ) ) or 1
2424

2525
if showCountries then
26-
table.insert (scoreboardColumns, { ["name"] = "Country", ["width"] = 50, ["friendlyName"] = "Country", ["priority"] = MAX_PRIRORITY_SLOT-1, ["isImage"] = true, ["imageW"] = 18, ["imageH"] = 12 })
26+
table.insert (scoreboardColumns, { ["name"] = "Country", ["width"] = 50, ["friendlyName"] = "Country", ["priority"] = MAX_PRIORITY_SLOT-1, ["isImage"] = true, ["imageW"] = 18, ["imageH"] = 12 })
2727
end
2828

2929
local function iif( cond, arg1, arg2 )
@@ -43,7 +43,7 @@ function scoreboardAddColumn( name, forElement, width, friendlyName, priority, i
4343
forElement = iif( type( forElement ) == "userdata" and isElement( forElement ), forElement, root )
4444

4545
if forElement == root then
46-
if not (priority > MAX_PRIRORITY_SLOT or priority < 1) then
46+
if not (priority > MAX_PRIORITY_SLOT or priority < 1) then
4747
for key, value in ipairs( scoreboardColumns ) do
4848
if name == value.name then
4949
return false
@@ -155,7 +155,7 @@ end
155155

156156
function scoreboardSetColumnPriority( name, priority, forElement )
157157
if type( name ) == "string" and type( priority ) == "number" then
158-
if not (priority > MAX_PRIRORITY_SLOT or priority < 1) then
158+
if not (priority > MAX_PRIORITY_SLOT or priority < 1) then
159159
forElement = iif( type( forElement ) == "userdata" and isElement( forElement ), forElement, root )
160160
if forElement == root then
161161
local columnIndex = false
@@ -247,7 +247,7 @@ function removeResourceScoreboardColumns( resource )
247247
end
248248
addEventHandler( "onResourceStop", root, removeResourceScoreboardColumns )
249249

250-
-- Compability
250+
-- Compatibility
251251
addScoreboardColumn = function( name, forElement, position, size )
252252
if type( size ) == "number" and size >= 0 and size <= 1.0 then
253253
size = size*700

[gameplay]/scoreboard/dxscoreboard_shared.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
MAX_PRIRORITY_SLOT = 500
1+
MAX_PRIORITY_SLOT = 500
22

33
function getNextFreePrioritySlot( startAt )
44
startAt = tonumber( startAt ) or 1
@@ -15,7 +15,7 @@ end
1515

1616
function isPrioritySlotFree( slot )
1717
if type( slot ) == "number" then
18-
if not (slot > MAX_PRIRORITY_SLOT or slot < 1) then
18+
if not (slot > MAX_PRIORITY_SLOT or slot < 1) then
1919
local priorities = {}
2020
for key, value in ipairs( scoreboardColumns ) do
2121
priorities[tonumber(value.priority)] = true

[gameplay]/scoreboard/meta.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
<export function="getNextFreePrioritySlot" type="client" />
5959
<export function="scoreboardGetSelectedRows" type="client" />
6060

61-
<!-- Compability -->
61+
<!-- Compatibility -->
6262
<export function="addScoreboardColumn" type="server"/>
6363
<export function="removeScoreboardColumn" type="server"/>
6464
<export function="resetScoreboardColumns" type="server"/>

0 commit comments

Comments
 (0)