Skip to content

Commit

Permalink
less mentions of patreon
Browse files Browse the repository at this point in the history
  • Loading branch information
KhafraDev committed Jan 24, 2025
1 parent 0583b19 commit 1196386
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 64 deletions.
6 changes: 3 additions & 3 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
# github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
# patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
Expand All @@ -12,4 +12,4 @@ otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

github: [khafradev, pseudonian]
patreon: synergism
patreon: synergism
46 changes: 0 additions & 46 deletions CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion Synergism.css
Original file line number Diff line number Diff line change
Expand Up @@ -907,7 +907,7 @@ p#themesTitle {
margin: 0 auto;
}

/* Third party URLs (Discord, Patreon, patch notes) */
/* Third party URLs (Discord or patch notes) */
#thirdParty > div {
flex-wrap: wrap;
display: flex;
Expand Down
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3026,16 +3026,16 @@
<div id="thirdParty">
<div id="discord">
<p style="color: gold" i18n="settings.joinDiscord"></p>
<a id="discordhref" href="https://www.discord.gg/ameCknq" target="_blank" rel="noopener noreferrer nofollow">
<img id="discordicon" alt="Discord Icon" src="Pictures/Default/icon.gif" title="Click to join the official Discord!" width="100" height="100" loading="lazy">
</a>
<button>
<img alt="Discord Icon" src="Pictures/Default/icon.gif" title="Click to join the official Discord!" width="100" height="100" loading="lazy">
</button>
</div>
<div id="patreon">
<p style="color: gold" i18n="settings.joinPatreon"></p>
<a id="patreonhref" href="https://www.patreon.com/synergism" target="_blank" rel="noopener noreferrer nofollow">
<img id="patreonicon" alt="Patreon Icon" src="Pictures/Default/Patreonlogo.png" title="Click to support development!" loading="lazy">
</a>
<p id="currentBonus" style="color: springgreen">Current Bonus: 0%</p>
<button href="https://www.patreon.com/synergism">
<img alt="Store Icon" src="Pictures/PseudoShop/GOLDEN_QUARK_BUFF.png" title="Click to support development!" loading="lazy">
<p id="currentBonus" style="color: springgreen">Current Bonus: 0%</p>
</button>
</div>
<div id="patchnotes">
<a href="https://docs.google.com/document/d/1pyxbvacfMgfdPXed1Ga433s_ZuzTY9YcwPAHyuWYaDA/edit?usp=sharing" target="_blank" rel="noopener noreferrer nofollow">
Expand Down
12 changes: 11 additions & 1 deletion src/EventListeners.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import { buyGoldenQuarks, getLastUpgradeInfo, singularityPerks } from './singula
import { displayStats } from './Statistics'
import { generateExportSummary } from './Summary'
import { player, resetCheck, saveSynergy } from './Synergism'
import { changeSubTab, Tabs } from './Tabs'
import { changeSubTab, changeTab, Tabs } from './Tabs'
import {
buyAllTalismanResources,
buyTalismanEnhance,
Expand Down Expand Up @@ -885,11 +885,21 @@ export const generateEventHandlers = () => {
DOMCacheGetOrSet('notation').addEventListener('click', () => toggleAnnotation())
DOMCacheGetOrSet('iconSet').addEventListener('click', () => toggleIconSet(player.iconSet + 1))

document.querySelector('#thirdParty > #discord > button')?.addEventListener(
'click',
() => location.href = 'https://www.discord.gg/ameCknq' // TODO: redirect with synergism.cc
)
document.querySelector('#thirdParty > #patreon > button')?.addEventListener('click', () => {
changeTab(Tabs.Purchase)
changeSubTab(Tabs.Purchase, { page: 1 })
})

// SHOP TAB

/*
TODO: Fix this entire tab it's utter shit
- Update (Jan. 23rd 2025) this is still shit PLATONIC! - Khafra
*/

Expand Down
4 changes: 2 additions & 2 deletions src/Login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function handleLogin () {
}

const response = await fetch('https://synergism.cc/api/v1/users/me').catch(
() => new Response(JSON.stringify({ member: null, globalBonus: 0, personalBonus: 0 }))
() => new Response(JSON.stringify({ member: null, globalBonus: 0, personalBonus: 0 }), { status: 401 })
)

if (!response.ok) {
Expand All @@ -122,7 +122,7 @@ export async function handleLogin () {

setQuarkBonus(100 * (1 + globalBonus / 100) * (1 + personalBonus / 100) - 100)
player.worlds = new QuarkHandler(Number(player.worlds))
loggedIn = accountType !== 'none'
loggedIn = accountType !== 'none' && response.ok

currentBonus.textContent = `Generous patrons give you a bonus of ${globalBonus}% more Quarks!`

Expand Down
3 changes: 1 addition & 2 deletions src/Tabs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,7 @@ export const changeSubTab = (tabs: Tabs, { page, step }: SubTabSwitchOptions) =>
let subTabList = subTabs.subTabList[player.subtabNumber]

while (!subTabList.unlocked) {
assert(page === undefined)
player.subtabNumber = limitRange(player.subtabNumber + step, 0, subTabs.subTabList.length - 1)
player.subtabNumber = limitRange(player.subtabNumber + (step ?? 1), 0, subTabs.subTabList.length - 1)
subTabList = subTabs.subTabList[player.subtabNumber]
}

Expand Down
4 changes: 2 additions & 2 deletions translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@
"ambrosiaPatreon": {
"name": "Shameless, Ambrosial Patreon Reminder",
"description": "In every realm, Platonic sells out. +1% Blueberry Generation Speed for every +1% Quarks by the Patreon bonus!",
"effect": "Generous Patreon supporters grant you {{amount}}% more Blueberry Time Generation. If you are not already, consider becoming a Patreon supporter to support development!"
"effect": "Generous Patreon supporters grant you {{amount}}% more Blueberry Time Generation. If you are not already, consider buying PseudoCoins to support development!"
},
"ambrosiaObtainium1": {
"name": "RNG-based Obtainium Booster",
Expand Down Expand Up @@ -3253,7 +3253,7 @@
"monotonous": "Monotonous"
},
"joinDiscord": "Click the image below to join the Discord!",
"joinPatreon": "Support Development on Patreon!",
"joinPatreon": "Support Development!",
"exportQuark": "{{x}}s until +{{y}} export Quark",
"exportGoldenQuark": "{{x}}s until +{{y}} export Golden Quark",
"quarksOnExport": "Quarks on export: {{x}} [Max {{y}}]",
Expand Down

0 comments on commit 1196386

Please sign in to comment.