Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge XPEvo fixed/changes into main repository #317

Merged
merged 42 commits into from
Feb 16, 2025
Merged
Changes from 1 commit
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
4bb9894
Merge XPEvo repo without ContactAdmin, ServerSync and Toornament modules
Chris92de Oct 22, 2024
7cb9c3c
Re-enable SmallScoresTable default visibility
Chris92de Oct 22, 2024
01fe467
Update example docker-compose.yml and README.md
Chris92de Oct 22, 2024
a25b27b
Fix RoundRankingModule test
Chris92de Oct 22, 2024
61b1069
Typo
araszka Oct 27, 2024
d8a4954
Remove debug controller
araszka Oct 27, 2024
448d130
Add display winner during teams mode in RoundRankingModule
araszka Nov 2, 2024
70d71d3
Update `docker/docker-compose.yml` to add build parameter
Chris92de Nov 5, 2024
88b401f
Update src/Modules/RoundRankingModule/Config/IRoundRankingSettings.cs
araszka Nov 9, 2024
baaadb1
Add doc comments to CheckpointData
araszka Nov 9, 2024
ed5524e
Use ConcurrentDictionary instead of default dictionary with mutex
araszka Nov 9, 2024
826ff13
Update doc comment
araszka Nov 9, 2024
0aebb70
Add CheckpointsRepository doc comments
araszka Nov 9, 2024
edc2c04
Add PointsRepartition doc comments
araszka Nov 9, 2024
2b3822d
Remove empty continuation line from Dockerfile
araszka Nov 9, 2024
0f53789
Merge remote-tracking branch 'origin/316-merge-xpevo-fixes-into-main-…
araszka Nov 9, 2024
d3fd641
Make ConcurrentDictionary thread safe
araszka Nov 9, 2024
041b00e
Improve concurrent property access in RoundRankingService
araszka Nov 9, 2024
bc80da3
Move utility methods from service to own class
araszka Nov 9, 2024
5e0321b
Add helper methods to CheckpointData for cleaner widget templates
araszka Nov 9, 2024
6dec31e
Add CheckpointData tests
araszka Nov 17, 2024
e03896a
Add round ranking controller tests
araszka Nov 17, 2024
b67347a
Add checkpoint repository tests
araszka Nov 17, 2024
d3f7de8
Add points repartition tests
araszka Nov 17, 2024
0975589
Add rank ranking utils tests
araszka Nov 17, 2024
301b9dc
Add round ranking service tests
araszka Nov 17, 2024
4e6f848
Add ScoreboardNicknameUtils and outsource utility methods from main s…
araszka Nov 30, 2024
e3a5ef7
Add ScoreboardStateService and outsource methods from ScoreboardService
araszka Nov 30, 2024
0fc9c43
Replace usage of volatile in RoundRankingService with locks
araszka Nov 30, 2024
699c66c
Replace decimal numbers in templates with float values
araszka Nov 30, 2024
712e7fb
Revert "Replace decimal numbers in templates with float values"
araszka Nov 30, 2024
26141b0
Move large maniascripts to separate file
araszka Nov 30, 2024
54d4b14
Improve code maintainability
araszka Dec 1, 2024
cf2fb60
Fix round ranking row template
araszka Dec 1, 2024
75130f5
Replace whole decimal numbers with f annotation
araszka Dec 1, 2024
84d79b8
Use style class for textsize where applicable in scoreboard templates
araszka Dec 1, 2024
29de2ea
Merge branch 'master' into 316-merge-xpevo-fixes-into-main-repository
araszka Dec 1, 2024
7e4a718
Add ScoreboardNicknameServiceTests
araszka Dec 1, 2024
aca38fb
Merge remote-tracking branch 'origin/316-merge-xpevo-fixes-into-main-…
araszka Dec 1, 2024
cac600b
Create singleton RoundRankingStateService and make RoundRankingServic…
araszka Feb 6, 2025
997d363
Merge branch 'master' into 316-merge-xpevo-fixes-into-main-repository
araszka Feb 6, 2025
ee3e73a
Merge branch 'master' into 316-merge-xpevo-fixes-into-main-repository
Chris92de Feb 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace whole decimal numbers with f annotation
  • Loading branch information
araszka committed Dec 1, 2024
commit 75130f50d10cd9962fdf700cdbf98c611360f805
10 changes: 5 additions & 5 deletions src/Modules/ScoreboardModule/Templates/Components/Body/Legend.mt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<component>
<property type="double" name="width"/>
<property type="double" name="height"/>
<property type="double" name="columnSpacing" default="2.0"/>
<property type="double" name="columnSpacing" default="2f"/>
<property type="double" name="positionBoxWidth" default="9.6"/>
<property type="double" name="flagWidth" default="9.6"/>
<property type="double" name="clubTagWidth" default="9.6"/>
@@ -13,7 +13,7 @@
/>
<label text="POS"
class="text-primary"
pos="{{ positionBoxWidth/2.0 }} {{ height / -2 + 0.25 }}"
pos="{{ positionBoxWidth/2f }} {{ height / -2 + 0.25 }}"
halign="center"
valign="center"
textsize="{{ Theme.UI_FontSize*0.2 }}"
@@ -22,7 +22,7 @@
/>
<label text="NAT."
class="text-primary"
pos="{{ positionBoxWidth+columnSpacing+(flagWidth/2.0) }} {{ height / -2 + 0.25 }}"
pos="{{ positionBoxWidth+columnSpacing+(flagWidth/2f) }} {{ height / -2 + 0.25 }}"
halign="center"
valign="center"
textsize="{{ Theme.UI_FontSize*0.2 }}"
@@ -31,7 +31,7 @@
/>
<label text="CLUB"
class="text-primary"
pos="{{ positionBoxWidth+columnSpacing+flagWidth+columnSpacing+(clubTagWidth/2.0) }} {{ height / -2 + 0.25 }}"
pos="{{ positionBoxWidth+columnSpacing+flagWidth+columnSpacing+(clubTagWidth/2f) }} {{ height / -2 + 0.25 }}"
halign="center"
valign="center"
textsize="{{ Theme.UI_FontSize*0.2 }}"
@@ -50,7 +50,7 @@
<label id="legend_best_time"
text="BEST TIME"
class="text-primary"
pos="{{ width-columnSpacing - 55.0 }} {{ height / -2 + 0.25 }}"
pos="{{ width-columnSpacing - 55f }} {{ height / -2 + 0.25 }}"
valign="center"
halign="right"
textsize="{{ Theme.UI_FontSize*0.2 }}"
Original file line number Diff line number Diff line change
@@ -8,19 +8,19 @@
<property type="double" name="padding" default="3.4"/>

<template>
<frame id="header_content" pos="{{ width / 2.0 }} {{ height / -2.0 }}">
<frame id="header_content" pos="{{ width / 2f }} {{ height / -2f }}">
<label id="header_text_left"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * -0.5 - 4.0 }} 1.75"
size="{{ width/2.0-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2.0 }} {{ height }}"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * -0.5 - 4f }} 1.75"
size="{{ width/2f-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2f }} {{ height }}"
textcolor="{{ Theme.UI_TextPrimary }}"
class="text-lg"
textfont="{{ Font.Regular }}"
halign="right"
valign="center2"
/>
<label id="header_text_left_small"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * -0.5 - 4.0 }} -1.75"
size="{{ width/2.0-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2.0 }} {{ height }}"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * -0.5 - 4f }} -1.75"
size="{{ width/2f-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2f }} {{ height }}"
textcolor="{{ Theme.UI_TextPrimary }}"
class="text-primary"
textfont="{{ Font.Regular }}"
@@ -30,16 +30,16 @@
opacity="0.8"
/>
<label id="header_text_right"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * 0.5 + 4.0 }} 1.75"
size="{{ width/2.0-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2.0 }} {{ height }}"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * 0.5 + 4f }} 1.75"
size="{{ width/2f-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2f }} {{ height }}"
textcolor="{{ Theme.UI_TextPrimary }}"
class="text-lg"
textfont="{{ Font.Regular }}"
valign="center2"
/>
<label id="header_text_right_small"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * 0.5 + 4.0 }} -1.75"
size="{{ width/2.0-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2.0 }} {{ height }}"
pos="{{ float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture) * 0.5 + 4f }} -1.75"
size="{{ width/2f-float.Parse(Theme.ScoreboardModule_Logo_Width, CultureInfo.InvariantCulture)-2f }} {{ height }}"
textcolor="{{ Theme.UI_TextPrimary }}"
class="text-primary"
textfont="{{ Font.Regular }}"
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<component>
<property type="double" name="x" default="0.0"/>
<property type="double" name="y" default="0.0"/>
<property type="double" name="x" default="0f"/>
<property type="double" name="y" default="0f"/>

<template>
<quad pos="{{ x }} {{ y }}"
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<component>
<property type="string" name="id" />
<property type="double" name="x" default="0.0"/>
<property type="double" name="y" default="0.0"/>
<property type="double" name="width" default="0.0"/>
<property type="double" name="height" default="0.0"/>
<property type="double" name="x" default="0f"/>
<property type="double" name="y" default="0f"/>
<property type="double" name="width" default="0f"/>
<property type="double" name="height" default="0f"/>

<template>
<frame id="{{ id }}" pos="{{ x }} {{ y }}">
20 changes: 10 additions & 10 deletions src/Modules/ScoreboardModule/Templates/Components/Row/Framemodel.mt
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@
height="{{ rowHeight }}"
/>

<frame pos="{{ positionBoxWidth + columnSpacing }} {{ rowHeight / -2.0 }}" z-index="10">
<frame pos="{{ positionBoxWidth + columnSpacing }} {{ rowHeight / -2f }}" z-index="10">
<!-- Flag -->
<Flag height="{{ rowInnerHeight }}" />

@@ -66,7 +66,7 @@
class="text-primary"
text="CLUB"
pos="{{ rowInnerHeight * 0.75 }} 0"
size="{{ rowInnerHeight * 2.0 }} {{ rowInnerHeight }}"
size="{{ rowInnerHeight * 2f }} {{ rowInnerHeight }}"
valign="center2"
halign="center"
textsize="{{ Theme.UI_FontSize*2 }}"
@@ -76,8 +76,8 @@

<!-- Player Name -->
<label id="name"
pos="{{ rowInnerHeight * 3.0 + columnSpacing * 2.0 }} 0"
size="{{ w / 3.0 }} {{ rowHeight }}"
pos="{{ rowInnerHeight * 3f + columnSpacing * 2f }} 0"
size="{{ w / 3f }} {{ rowHeight }}"
valign="center2"
textsize="{{ Theme.UI_FontSize*2 }}"
textfont="{{ Font.Regular }}"
@@ -86,15 +86,15 @@
</frame>
<frame id="details_wrapper" z-index="10">
<!-- Spec/Disconnected -->
<label id="spec_disconnected_label" pos="0 {{ rowHeight / -2.0 }}"
<label id="spec_disconnected_label" pos="0 {{ rowHeight / -2f }}"
class="text-muted"
valign="center2"
halign="right"
textsize="{{ Theme.UI_FontSize*2 }}"
/>

<!-- Round Points -->
<label id="round_points" pos="0 {{ rowHeight / -2.0 }}"
<label id="round_points" pos="0 {{ rowHeight / -2f }}"
class="text-primary"
valign="center2"
halign="right"
@@ -105,7 +105,7 @@
<!-- Custom Label (FINALIST, etc) -->
<label id="custom_label"
class="text-primary"
pos="0 {{ rowHeight / -2.0 }}"
pos="0 {{ rowHeight / -2f }}"
valign="center2"
halign="right"
textsize="{{ Theme.UI_FontSize*2 }}"
@@ -115,7 +115,7 @@
<!-- Best Time -->
<label id="best_time"
class="text-primary"
pos="{{ w - columnSpacing - 55.0 }} {{ rowHeight / -2.0 }}"
pos="{{ w - columnSpacing - 55f }} {{ rowHeight / -2f }}"
valign="center2"
halign="right"
textsize="{{ Theme.UI_FontSize*2 }}"
@@ -126,15 +126,15 @@
<!-- Player Score -->
<label id="score"
class="text-primary"
pos="{{ w - columnSpacing }} {{ rowHeight / -2.0 }}"
pos="{{ w - columnSpacing }} {{ rowHeight / -2f }}"
valign="center2"
halign="right"
textsize="{{ Theme.UI_FontSize*2 }}"
textcolor="{{ Theme.ScoreboardModule_Text_Color }}"
/>
</frame>
<PlayerActions x="{{ w }}"
y="{{ rowHeight / -2.0 }}"
y="{{ rowHeight / -2f }}"
rowHeight="{{ rowHeight }}"
rowSpacing="{{ rowSpacing }}"
textsize="{{ textSize }}"
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<component>
<property type="double" name="x" default="0.0"/>
<property type="double" name="y" default="0.0"/>
<property type="double" name="rowHeight" default="0.0"/>
<property type="double" name="x" default="0f"/>
<property type="double" name="y" default="0f"/>
<property type="double" name="rowHeight" default="0f"/>
<property type="double" name="rowSpacing" default="0.5"/>

<template>
<frame id="player_actions" pos="{{ x - (rowHeight*1.2)/2.0 }} {{ y }}" hidden="1">
<frame id="player_actions" pos="{{ x - (rowHeight*1.2)/2f }} {{ y }}" hidden="1">
<!-- SPECTATE -->
<label id="spectate_player"
class="text-primary"
Original file line number Diff line number Diff line change
@@ -15,10 +15,10 @@
bgcolor="{{ Theme.ScoreboardModule_Background_Row_Color }}"
opacity="{{ Theme.ScoreboardModule_Background_Row_Opacity }}"
/>
<frame pos="{{ w / 2.0 }} {{ h / -2.0 }}">
<frame pos="{{ w / 2f }} {{ h / -2f }}">
<quad id="custom_gradient"
size="{{ h }} {{ w }}"
pos="{{ w / -2.0 }} {{ h / -2.0 }}"
pos="{{ w / -2f }} {{ h / -2f }}"
rot="-90"
image="file:///Media/Painter/Stencils/04-SquareGradient/Brush.tga"
modulatecolor="{{ Theme.UI_AccentPrimary }}"
Original file line number Diff line number Diff line change
@@ -2,9 +2,9 @@
<using namespace="EvoSC.Modules.Official.ScoreboardModule.Config"/>

<property type="IScoreboardSettings" name="settings"/>
<property type="double" name="accentBarWidth" default="1.0"/>
<property type="double" name="x" default="0.0"/>
<property type="double" name="y" default="0.0"/>
<property type="double" name="accentBarWidth" default="1f"/>
<property type="double" name="x" default="0f"/>
<property type="double" name="y" default="0f"/>
<property type="double" name="width"/>
<property type="double" name="height"/>

@@ -23,7 +23,7 @@
opacity="{{ Theme.ScoreboardModule_PositionBox_Opacity }}"
/>
<label id="position_box_position_rank"
pos='{{ (width-(Theme.ScoreboardModule_PositionBox_ShowAccent=="True" ? accentBarWidth : 0)) / 2.0 + (Theme.ScoreboardModule_PositionBox_ShowAccent=="True" ? accentBarWidth : 0) }} {{ height / -2.0 + 0.25 }}'
pos='{{ (width-(Theme.ScoreboardModule_PositionBox_ShowAccent=="True" ? accentBarWidth : 0)) / 2f + (Theme.ScoreboardModule_PositionBox_ShowAccent=="True" ? accentBarWidth : 0) }} {{ height / -2f + 0.25 }}'
valign="center"
halign="center"
textsize="{{ Theme.UI_FontSize*2 }}"
Original file line number Diff line number Diff line change
@@ -3,12 +3,12 @@

<property type="double" name="width"/>
<property type="double" name="height"/>
<property type="double" name="y" default="0.0"/>
<property type="double" name="y" default="0f"/>
<property type="double" name="rowSpacing" default="0.25"/>
<property type="double" name="columnSpacing" default="2.0"/>
<property type="double" name="legendHeight" default="4.0"/>
<property type="double" name="flagWidth" default="4.0"/>
<property type="double" name="clubTagWidth" default="4.0"/>
<property type="double" name="columnSpacing" default="2f"/>
<property type="double" name="legendHeight" default="4f"/>
<property type="double" name="flagWidth" default="4f"/>
<property type="double" name="clubTagWidth" default="4f"/>

<template>
<frame pos="0 {{ y }}">
24 changes: 12 additions & 12 deletions src/Modules/ScoreboardModule/Templates/Scoreboard.mt
Original file line number Diff line number Diff line change
@@ -11,14 +11,14 @@
<property type="IScoreboardSettings" name="settings"/>
<property type="int" name="MaxPlayers" default="0"/>

<property type="double" name="backgroundBorderRadius" default="3.0"/>
<property type="double" name="headerHeight" default="14.0"/>
<property type="double" name="rowHeight" default="8.0"/>
<property type="double" name="rowInnerHeight" default="5.0"/>
<property type="double" name="rowSpacing" default="0.3"/>
<property type="double" name="columnSpacing" default="4.0"/>
<property type="double" name="pointsWidth" default="16.0"/>
<property type="double" name="padding" default="2.0"/>
<property type="double" name="backgroundBorderRadius" default="3f"/>
<property type="double" name="headerHeight" default="14f"/>
<property type="double" name="rowHeight" default="8f"/>
<property type="double" name="rowInnerHeight" default="5f"/>
<property type="double" name="rowSpacing" default="0f"/>
<property type="double" name="columnSpacing" default="4f"/>
<property type="double" name="pointsWidth" default="16f"/>
<property type="double" name="padding" default="2f"/>
<property type="double" name="innerSpacing" default="1.6"/>
<property type="double" name="legendHeight" default="3.8"/>
<property type="int" name="actionButtonCount" default="2"/>
@@ -41,7 +41,7 @@
/>

<!-- Scoreboard Content -->
<frame pos="{{ settings.Width / -2.0 }} {{ settings.Height / 2.0 }}">
<frame pos="{{ settings.Width / -2f }} {{ settings.Height / 2f }}">
<!-- Background -->
<ScoreboardBg
width="{{ settings.Width }}"
@@ -353,15 +353,15 @@
declare x = scoreLabel.RelativePosition_V3.X;

if(scoreLabel.Value != ""){
offset += scoreLabel.ComputeWidth(scoreLabel.Value) + {{ columnSpacing / 2.0 }};
offset += scoreLabel.ComputeWidth(scoreLabel.Value) + {{ columnSpacing / 2f }};
}
customLabel.RelativePosition_V3.X = x - offset;
if(customLabel.Value != ""){
offset += customLabel.ComputeWidth(customLabel.Value) + {{ columnSpacing / 2.0 }};
offset += customLabel.ComputeWidth(customLabel.Value) + {{ columnSpacing / 2f }};
}
roundPointsLabel.RelativePosition_V3.X = x - offset;
if(roundPointsLabel.Value != ""){
offset += roundPointsLabel.ComputeWidth(roundPointsLabel.Value) + {{ columnSpacing / 2.0 }};
offset += roundPointsLabel.ComputeWidth(roundPointsLabel.Value) + {{ columnSpacing / 2f }};
}
specDisconnectedLabel.RelativePosition_V3.X = x - offset;
}