Skip to content

Commit 6603787

Browse files
authored
Added 'Solo Mode,' which lets you only display your own DPS (#136)
* Added 'Solo Mode,' which lets you only display your own DPS instead of the entire party's * Making changes per PR comment
1 parent 5fe12bb commit 6603787

5 files changed

Lines changed: 21 additions & 0 deletions

File tree

src/CombatantHorizontal.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export default class CombatantHorizontal extends Component {
3636
// don't need to render this component if this is a limit break
3737
if (!data.Job && name === 'limit break') return null
3838

39+
// Also don't need to render if the player is in solo mode and this isn't the player's info
40+
if (!isSelf && config.enableSoloMode) return null
41+
3942
// Color theme byRole
4043
if (config.color === 'byRole') {
4144
for (const role in jobRoles) {

src/Config.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,17 @@ class ConfigRaw extends Component {
262262
{/* Enbale Streamer Mode (blur names) */}
263263
{loc.toggleOption13}
264264
</label>
265+
<input
266+
type="checkbox"
267+
name="enableSoloMode"
268+
id="enableSoloMode"
269+
defaultChecked={config.enableSoloMode}
270+
onChange={this.handleConfig}
271+
/>
272+
<label htmlFor="enableSoloMode">
273+
{/* Enable Solo Mode (Only show own DPS) */}
274+
{loc.toggleOption14}
275+
</label>
265276
<div className="combatants">
266277
<label htmlFor="maxCombatants">
267278
{/* # Combatants */}

src/SetupMode.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ function SetupModeRaw(props) {
2727
<div className="combatants">
2828
{mockData.map((mock, index) => {
2929
if (index >= maxCombatants) return false
30+
if (!mock.isSelf && props.config.enableSoloMode) return false
3031
let maxhit
3132
if (mock.maxhit) maxhit = mock.maxhit.replace('-', ': ')
3233
return (

src/helpers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ export const defaultConfig = {
1717
showDiscord: false,
1818
showLocale: false,
1919
showJobless: false,
20+
enableSoloMode: false,
2021
zoom: '1',
2122
discord: '',
2223
maxCombatants: 8,

src/locale.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const locale = {
2525
toggleOption11: 'Max Hit',
2626
toggleOption12: 'Show "jobless" Combatants',
2727
toggleOption13: 'Enable streamer mode (blur all names)',
28+
toggleOption14: 'Only show your DPS',
2829
maxCombatantsTitle: 'Max Combatants',
2930
zoomTitle: 'Zoom Scale',
3031
zoomOption1: '80%',
@@ -83,6 +84,7 @@ const locale = {
8384
toggleOption11: 'Max Hit',
8485
toggleOption12: 'Show "jobless" Combatants',
8586
toggleOption13: 'Enable streamer mode (blur all names)',
87+
toggleOption14: 'Mostrar apenas o seu DPS',
8688
maxCombatantsTitle: 'Máx. Personagens',
8789
zoomTitle: 'Escala de Zoom',
8890
zoomOption1: '80%',
@@ -141,6 +143,7 @@ const locale = {
141143
toggleOption11: '最强伤害',
142144
toggleOption12: 'Show "jobless" Combatants',
143145
toggleOption13: 'Enable streamer mode (blur all names)',
146+
toggleOption14: '只显示你的DPS',
144147
maxCombatantsTitle: '最强战员',
145148
zoomTitle: '缩放尺寸',
146149
zoomOption1: '80%',
@@ -199,6 +202,7 @@ const locale = {
199202
toggleOption11: '最強傷害',
200203
toggleOption12: 'Show "jobless" Combatants',
201204
toggleOption13: 'Enable streamer mode (blur all names)',
205+
toggleOption14: '只顯示你的DPS',
202206
maxCombatantsTitle: '最強戰員',
203207
zoomTitle: '縮放尺寸',
204208
zoomOption1: '80%',
@@ -257,6 +261,7 @@ const locale = {
257261
toggleOption11: 'Max Hit',
258262
toggleOption12: 'Afficher les combatants sans Job',
259263
toggleOption13: 'Enable streamer mode (blur all names)',
264+
toggleOption14: 'Afficher uniquement votre DPS',
260265
maxCombatantsTitle: 'Combatants max',
261266
zoomTitle: 'Échelle',
262267
zoomOption1: '80%',

0 commit comments

Comments
 (0)