Skip to content

Commit 2f63d20

Browse files
committed
servers: infer CaptureSync from MaxPlayers
1 parent be34ab7 commit 2f63d20

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

.eslintrc.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module.exports = {
2424
'operator-linebreak' : [ 'error', 'before' ],
2525
'no-console' : [ (process.env.NODE_ENV === 'production' ? 'error' : 'warn'), { allow: [ 'warn', 'error' ] } ],
2626
'no-debugger' : process.env.NODE_ENV === 'production' ? 'error' : 'warn',
27+
'yoda' : 'off',
2728
},
2829

2930
extends: [

src/components/SmooServerState.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ export default class SmooServerState extends Vue {
9797
const playersColor = (players ? (players.length !== this.MaxPlayers ? 'text-success' : 'text-danger') : 'text-info')
9898
const playersValue = (players ? players.length : '') + (players && this.MaxPlayers != null ? ' / ' : '') + (this.MaxPlayers ?? '')
9999
settings.push(playersKey + ': <span class="' + playersColor + '">' + playersValue + '</span>')
100+
if (8 < (this.MaxPlayers ?? 0)) {
101+
settings.push('CaptureSync: <span class="text-danger">false</span>')
102+
} else if (7 < (this.MaxPlayers ?? 0)) {
103+
settings.push('CaptureSync: <span class="text-warning">not in Wooded</span>')
104+
} else if (0 < (this.MaxPlayers ?? 0)) {
105+
settings.push('CaptureSync: <span class="text-success">true</span>')
106+
}
100107
}
101108
bool('ScenarioMerge', 'Scenario', 'MergeEnabled')
102109
bool('ShineSync', 'Shines', 'Enabled')

src/views/servers.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
<b-tooltip target="servers-state" triggers="hover">
1313
Settings:
1414
<ul>
15+
<li>
16+
<code>CaptureSync</code>: if captures are visible to other players.
17+
</li>
1518
<li>
1619
<code>ScenarioMerge</code>: the server forces all players to be in the same scenario to see each other.
1720
</li>

0 commit comments

Comments
 (0)