Skip to content

Commit

Permalink
Added 'Solo Mode,' which lets you only display your own DPS (#136)
Browse files Browse the repository at this point in the history
* Added 'Solo Mode,' which lets you only display your own DPS instead of the entire party's

* Making changes per PR comment
  • Loading branch information
Brafficus authored Jan 12, 2022
1 parent 5fe12bb commit 6603787
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/CombatantHorizontal.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ export default class CombatantHorizontal extends Component {
// don't need to render this component if this is a limit break
if (!data.Job && name === 'limit break') return null

// Also don't need to render if the player is in solo mode and this isn't the player's info
if (!isSelf && config.enableSoloMode) return null

// Color theme byRole
if (config.color === 'byRole') {
for (const role in jobRoles) {
Expand Down
11 changes: 11 additions & 0 deletions src/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,17 @@ class ConfigRaw extends Component {
{/* Enbale Streamer Mode (blur names) */}
{loc.toggleOption13}
</label>
<input
type="checkbox"
name="enableSoloMode"
id="enableSoloMode"
defaultChecked={config.enableSoloMode}
onChange={this.handleConfig}
/>
<label htmlFor="enableSoloMode">
{/* Enable Solo Mode (Only show own DPS) */}
{loc.toggleOption14}
</label>
<div className="combatants">
<label htmlFor="maxCombatants">
{/* # Combatants */}
Expand Down
1 change: 1 addition & 0 deletions src/SetupMode.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function SetupModeRaw(props) {
<div className="combatants">
{mockData.map((mock, index) => {
if (index >= maxCombatants) return false
if (!mock.isSelf && props.config.enableSoloMode) return false
let maxhit
if (mock.maxhit) maxhit = mock.maxhit.replace('-', ': ')
return (
Expand Down
1 change: 1 addition & 0 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const defaultConfig = {
showDiscord: false,
showLocale: false,
showJobless: false,
enableSoloMode: false,
zoom: '1',
discord: '',
maxCombatants: 8,
Expand Down
5 changes: 5 additions & 0 deletions src/locale.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const locale = {
toggleOption11: 'Max Hit',
toggleOption12: 'Show "jobless" Combatants',
toggleOption13: 'Enable streamer mode (blur all names)',
toggleOption14: 'Only show your DPS',
maxCombatantsTitle: 'Max Combatants',
zoomTitle: 'Zoom Scale',
zoomOption1: '80%',
Expand Down Expand Up @@ -83,6 +84,7 @@ const locale = {
toggleOption11: 'Max Hit',
toggleOption12: 'Show "jobless" Combatants',
toggleOption13: 'Enable streamer mode (blur all names)',
toggleOption14: 'Mostrar apenas o seu DPS',
maxCombatantsTitle: 'Máx. Personagens',
zoomTitle: 'Escala de Zoom',
zoomOption1: '80%',
Expand Down Expand Up @@ -141,6 +143,7 @@ const locale = {
toggleOption11: '最强伤害',
toggleOption12: 'Show "jobless" Combatants',
toggleOption13: 'Enable streamer mode (blur all names)',
toggleOption14: '只显示你的DPS',
maxCombatantsTitle: '最强战员',
zoomTitle: '缩放尺寸',
zoomOption1: '80%',
Expand Down Expand Up @@ -199,6 +202,7 @@ const locale = {
toggleOption11: '最強傷害',
toggleOption12: 'Show "jobless" Combatants',
toggleOption13: 'Enable streamer mode (blur all names)',
toggleOption14: '只顯示你的DPS',
maxCombatantsTitle: '最強戰員',
zoomTitle: '縮放尺寸',
zoomOption1: '80%',
Expand Down Expand Up @@ -257,6 +261,7 @@ const locale = {
toggleOption11: 'Max Hit',
toggleOption12: 'Afficher les combatants sans Job',
toggleOption13: 'Enable streamer mode (blur all names)',
toggleOption14: 'Afficher uniquement votre DPS',
maxCombatantsTitle: 'Combatants max',
zoomTitle: 'Échelle',
zoomOption1: '80%',
Expand Down

0 comments on commit 6603787

Please sign in to comment.