1
0
Fork 0
mirror of https://github.com/Acamaeda/The-Modding-Tree.git synced 2024-11-21 16:13:55 +00:00

Improved handling of multiple discord links

- Made mod-specific discord appear in end screen, if available
- Made discord button show list of discords
This commit is contained in:
thepaperpilot 2020-10-18 21:23:44 -05:00
parent 1df3fac4b6
commit a5a5f4b69f
3 changed files with 27 additions and 6 deletions

View file

@ -25,12 +25,13 @@
<br>
<h2>{{modInfo.name}} {{VERSION.withoutName}}</h2><br><br>
<h3>Congratulations! You have reached the end and beaten this game, but for now...</h3><br>
<h3>Please check the Discord to see there are new content updates!</h3><br><br>
<h3>Please check the Discord to see if there are new content updates!</h3><br><br>
<div v-if="!player.timePlayedReset">It took you {{formatTime(player.timePlayed)}} to beat the game.</div>
<div v-if="player.timePlayedReset">Make sure that you record the time in your stream or else your speedrun won't count!</div>
<br>
<button class="longUpg can" onclick="hardReset(true)">Play Again</button>&nbsp;&nbsp;&nbsp;&nbsp;<button class="longUpg can" onclick="keepGoing()">Keep Going</button>
<br><br><br>
<span v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink" target="_blank">{{modInfo.discordName}}</a><br></span>
<a class="link" href="https://discord.gg/F3xveHV" target="_blank">The Modding Tree Discord</a><br>
<a class="link" href="http://discord.gg/wwQfgPa" target="_blank">Main Prestige Tree Discord</a><br>
<br><br>
@ -94,7 +95,14 @@
<div id="version" class="overlayThing" style="margin-right: 13px">{{VERSION.withoutName}}</div>
<img id="optionWheel" class="overlayThing" v-if="player.tab!='options'" src="options_wheel.png" onclick="showTab('options')"></img>
<div id="info" v-if="player.tab!='info'" class="overlayThing" onclick="showTab('info')"><br>i</div>
<img id="discord" class="overlayThing" onclick="window.open((modInfo.discordLink ? modInfo.discordLink : 'https://discord.gg/F3xveHV'),'mywindow')" src="discord.png" target="_blank"></img>
<div id="discord" class="overlayThing">
<img onclick="window.open((modInfo.discordLink ? modInfo.discordLink : 'https://discord.gg/F3xveHV'),'mywindow')" src="discord.png" target="_blank"></img>
<ul id="discord-links">
<li v-if="modInfo.discordLink"><a class="link" v-bind:href="modInfo.discordLink" target="_blank">{{modInfo.discordName}}</a><br></li>
<li><a class="link" href="https://discord.gg/F3xveHV" target="_blank" v-bind:style="modInfo.discordLink ? {'font-size': '16px'} : {}">The Modding Tree Discord</a><br></li>
<li><a class="link" href="http://discord.gg/wwQfgPa" target="_blank" v-bind:style="{'font-size': '16px'}">Main Prestige Tree server</a></li>
</ul>
</div>
<div class="overlayThing" style="padding-bottom:7px; width: 90%">
<span v-if="player.devSpeed && player.devSpeed != 1" class="overlayThing">
<br>Dev Speed: {{format(player.devSpeed)}}x<br>

View file

@ -301,7 +301,7 @@ function gameLoop(diff) {
player.autosave = false;
NaNalert = true;
alert("We have detected a corruption in your save. Please visit https://discord.gg/wwQfgPa for help.")
alert("We have detected a corruption in your save. Please visit one of the discords in the info panel for help.")
}
}

View file

@ -300,11 +300,24 @@ h1, h2, h3, b, input {
left: 4px;
width: 40px;
height: 40px;
cursor: pointer
}
#discord:hover {
transform: scale(1.2, 1.2);
#discord img {
width: 100%;
height: 100%;
}
#discord-links {
position: absolute;
top: 0;
padding-top: 44px;
left: -244px;
width: 200px;
transition: left .3s ease;
}
#discord:hover #discord-links {
left: -4px;
}
#version {