Skip to content

Commit

Permalink
Version 5, added 0 evidence guide
Browse files Browse the repository at this point in the history
  • Loading branch information
tybayn committed Apr 10, 2024
1 parent 846381c commit d6d0c26
Show file tree
Hide file tree
Showing 31 changed files with 1,850 additions and 938 deletions.
Binary file not shown.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions events-v4/events-v1.css → events-v5/events-v1.css
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
transform: translateZ(0);
-webkit-transform: translateZ(0);
will-change: transform;
font-size: 16px;
}

#event_details .spoilers{
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion feed-v4/feed-v1.js → feed-v5/feed-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $(window).on('load', function() {
var feed_html = `
<div id="feed_title">${data[i]['title']}</div>
<div id="feed_date">${data[i]['start_date'].replace('T',' ')}</div>
<img src="${data[i]['thumbnail']}" id="feed_image" onerror="this.style.display='none'" onload="this.style.display='block'">
<img loading="lazy" src="${data[i]['thumbnail']}" id="feed_image" onerror="this.style.display='none'" onload="this.style.display='block'">
<div id="feed_description">${data[i]['description']}</div>
<div id="feed_notes">${data[i]['notes']}</div>
<div id="feed_sentiment">
Expand Down
55 changes: 30 additions & 25 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
};
</script>
<script src="jquery/jquery-3.6.2.min.js"></script>
<script src="scripts-v4/ghost_template-v1.js"></script>
<link rel="stylesheet" href="styles-v4/style-v7.css"/>
<link rel="stylesheet" href="styles-v4/style-mobile-v7.css"/>
<link rel="stylesheet" href="themes-v4/themes-v1.css"/>
<link rel="stylesheet" href="discord-v4/discord-v1.css" >
<link rel="stylesheet" href="wiki-v4/wiki-v5.css" >
<link rel="stylesheet" href="events-v4/events-v1.css" >
<link rel="stylesheet" href="feed-v4/feed-v2.css" >
<link rel="stylesheet" href="styles-v4/sparkles-v1.css" >
<script src="scripts-v5/ghost_template-v1.js"></script>
<link rel="stylesheet" href="styles-v5/style-v1.css"/>
<link rel="stylesheet" href="styles-v5/style-mobile-v1.css"/>
<link rel="stylesheet" href="themes-v5/themes-v1.css"/>
<link rel="stylesheet" href="discord-v5/discord-v1.css" >
<link rel="stylesheet" href="wiki-v5/wiki-v1.css" >
<link rel="stylesheet" href="events-v5/events-v1.css" >
<link rel="stylesheet" href="feed-v5/feed-v1.css" >
<link rel="stylesheet" href="styles-v5/sparkles-v1.css" >
</head>

<body>
Expand Down Expand Up @@ -119,6 +119,7 @@ <h3>Voice Commands</h3>
<li class="discord_voice_commands" style="display:none;">"ghost guess &lt;ghost&gt;" -> Mark the ghost as an unconfirmed guess</li>
<li class="discord_voice_commands" style="display:none;">"ghost killed by &lt;ghost&gt;" -> Select the ghost AND mark that it killed you</li>
<li>"ghost show|info &lt;ghost&gt;" -> Scroll the specified ghost card into view</li>
<li>"ghost tests &lt;ghost&gt;" -> Show the 0 evidence tests for the specified ghost in the guide</li>
</ul>
<hr>
<strong>Timer:</strong>
Expand Down Expand Up @@ -152,6 +153,10 @@ <h3>Data Privacy</h3>
</div>
</div>

<div id="blackout_image" style="display: none;" onclick="zoomOutImage()">
<img loading="lazy" id="zoom_image" src="" onclick="zoomOutImage()">
</div>

<div id="settings_box" style="left: -1000px;">
<div id="settings_tab" onclick="showSettings()">
<div class="tab_rotate">Settings</div>
Expand Down Expand Up @@ -187,7 +192,7 @@ <h3>Data Privacy</h3>
<hr>
<div class="modifier_volume yfont white">
Desktop Link
<a class="download" href="assets/ZN-Desktop-Link-Installer-v2.9.0.msi" download="ZN-Desktop-Link-Installer-v2.9.0.msi"><img class="download_icon" src="imgs/download.png" alt="Download ZN-Desktop-Link"></a>
<a class="download" href="assets/ZN-Desktop-Link-Installer-v2.10.0.msi" download="ZN-Desktop-Link-Installer-v2.10.0.msi"><img class="download_icon" src="imgs/download.png" alt="Download ZN-Desktop-Link"></a>
</div>
<div class="journal_link">
<input type="text" placeholder="DL-XXXXX" id="link_id" class="text" value="DL-XXXXX" disabled style="color:#444;">
Expand Down Expand Up @@ -654,27 +659,27 @@ <h3>Data Privacy</h3>
document.getElementById("maps_box").style.left = "-388px";
}
</script>
<script src="themes-v4/themes-v2.js"></script>
<script src="scripts-v4/audio_controller-v1.js"></script>
<script src="scripts-v4/metronome-v3.js"></script>
<script src="scripts-v4/timer-v6.js"></script>
<script src="discord-v4/discord-v2.js"></script>
<script src="wiki-v4/wiki-v2.js"></script>
<script src="scripts-v4/filter-v10.js"></script>
<script src="scripts-v4/wslink-v9.js"></script>
<script src="scripts-v4/zn-v4.js"></script>
<script src="events-v4/events-v1.js"></script>
<script src="feed-v4/feed-v1.js"></script>
<script src="scripts-v4/voice_en-v3.js"></script>
<script src="scripts-v4/voice_recognition-v11.js"></script>
<script src="scripts-v4/sparkles-v1.js"></script>
<script src="themes-v5/themes-v1.js"></script>
<script src="scripts-v5/audio_controller-v1.js"></script>
<script src="scripts-v5/metronome-v1.js"></script>
<script src="scripts-v5/timer-v1.js"></script>
<script src="discord-v5/discord-v1.js"></script>
<script src="wiki-v5/wiki-v1.js"></script>
<script src="scripts-v5/filter-v1.js"></script>
<script src="scripts-v5/wslink-v1.js"></script>
<script src="scripts-v5/zn-v1.js"></script>
<script src="events-v5/events-v1.js"></script>
<script src="feed-v5/feed-v1.js"></script>
<script src="scripts-v5/voice_en-v1.js"></script>
<script src="scripts-v5/voice_recognition-v1.js"></script>
<script src="scripts-v5/sparkles-v1.js"></script>
<script>
document.getElementById('reset').oncontextmenu = showResetMenu;
document.onclick = hideResetMenu;

$(window).on('load', function() {
let load_wiki = new Promise((resolve, reject) => {
$("#wiki-body").load("wiki-v4/wiki-v7.html")
$("#wiki-body").load("wiki-v5/wiki-v1.html")
resolve("Ghost data loaded")
})
Promise.all([load_wiki,checkLink()])
Expand Down
4 changes: 2 additions & 2 deletions info/updates
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version":"2.9.0",
"path":"https://tybayn.github.io/phasmo-cheat-sheet/assets/ZN-Desktop-Link-Installer-v2.9.0.msi"
"version":"2.10.0",
"path":"https://tybayn.github.io/phasmo-cheat-sheet/assets/ZN-Desktop-Link-Installer-v2.10.0.msi"
}
File renamed without changes.
10 changes: 10 additions & 0 deletions scripts-v4/filter-v10.js → scripts-v5/filter-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -1095,11 +1095,13 @@ function showSettings(){
document.getElementById("maps_box").style.zIndex= "1"
document.getElementById("settings_box").style.zIndex = (mquery.matches ? "10" : "2")
document.getElementById("settings_box").style.left = (mquery.matches ? "0px" : "196px")
$("#settings_box").addClass("tab-open")
}
else {
document.getElementById("settings_box").style.left = (mquery.matches ? "calc(-60% - 40px)" : "-32px")
document.getElementById("settings_box").style.boxShadow = "none"
document.getElementById("settings_tab").style.boxShadow = "none"
$("#settings_box").removeClass("tab-open")
if(mquery.matches){
$("#cards").scrollTop($("#cards").scrollTop() - 1);
setTimeout(function(){
Expand All @@ -1120,11 +1122,13 @@ function showDiscordLink(){
document.getElementById("maps_box").style.zIndex= "1"
document.getElementById("discord_link_box").style.zIndex= (mquery.matches ? "10" : "2")
document.getElementById("discord_link_box").style.left = (mquery.matches ? "0px" : "196px")
$("#discord_link_box").addClass("tab-open")
}
else {
document.getElementById("discord_link_box").style.left = (mquery.matches ? "calc(-60% - 40px)" : "-32px")
document.getElementById("discord_link_box").style.boxShadow = "none"
document.getElementById("discord_link_tab").style.boxShadow = "none"
$("#discord_link_box").removeClass("tab-open")
if(mquery.matches){
$("#cards").scrollTop($("#cards").scrollTop() - 1);
setTimeout(function(){
Expand All @@ -1145,11 +1149,13 @@ function showEvent(){
document.getElementById("maps_box").style.zIndex= "1"
document.getElementById("event_box").style.zIndex= (mquery.matches ? "10" : "2")
document.getElementById("event_box").style.left = (mquery.matches ? "0px" : "196px")
$("#event_box").addClass("tab-open")
}
else {
document.getElementById("event_box").style.left = (mquery.matches ? "calc(-60% - 40px)" : "-182px")
document.getElementById("event_box").style.boxShadow = "none"
document.getElementById("event_tab").style.boxShadow = "none"
$("#event_box").removeClass("tab-open")
if(mquery.matches){
$("#cards").scrollTop($("#cards").scrollTop() - 1);
setTimeout(function(){
Expand All @@ -1170,11 +1176,13 @@ function showWiki(){
document.getElementById("maps_box").style.zIndex= "1"
document.getElementById("wiki_box").style.zIndex= (mquery.matches ? "10" : "2")
document.getElementById("wiki_box").style.left = (mquery.matches ? "0px" : "196px")
$("#wiki_box").addClass("tab-open")
}
else {
document.getElementById("wiki_box").style.left = (mquery.matches ? "calc(-60% - 40px)" : "-182px")
document.getElementById("wiki_box").style.boxShadow = "none"
document.getElementById("wiki_tab").style.boxShadow = "none"
$("#wiki_box").removeClass("tab-open")
if(mquery.matches){
$("#cards").scrollTop($("#cards").scrollTop() - 1);
setTimeout(function(){
Expand All @@ -1197,12 +1205,14 @@ function showMaps(forceOpen = false, forceClose = false){
document.getElementById("maps_box").style.zIndex= (mquery.matches ? "10" : "2")
document.getElementById("maps_box").style.left = (mquery.matches ? "0px" : "196px")
document.getElementById("maps_box").style.width = (mquery.matches ? "calc(100% - 100px)" : "calc(100% - 265px)")
$("#maps_box").addClass("tab-open")
}
else if(!forceOpen) {
document.getElementById("maps_box").style.width = (mquery.matches ? "calc(100% - 100px)" : "556px")
document.getElementById("maps_box").style.left = (mquery.matches ? "calc(-100% + 60px)" : "-388px")
document.getElementById("maps_box").style.boxShadow = "none"
document.getElementById("maps_box").style.boxShadow = "none"
$("#maps_box").removeClass("tab-open")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ class Ghost {
<div class="ghost_has_los">${data.has_los}</div>
<div class="ghost_behavior">
<div class="ghost_tests_button" onClick="openGhostInfo('${data.ghost}')">Tests >></div>
${this.behavior(data.behavior)}
</div>
<div class="ghost_clear">
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions scripts-v4/voice_en-v3.js → scripts-v5/voice_en-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const ZNLANG = {
"evidence emf5":["evan ncma 5"],
"journal":["channel"],
"sanity":["saturday","insanity","unsanity","sandy"],
"hunt":["hunts"],
"hunt":["hunts","aunt"],
"ghost ":["go ","goes ","just ","gross "],
"remove":["removes","removed","or move"],
"select":["like"],
Expand Down Expand Up @@ -40,8 +40,8 @@ const ZNLANG = {
"guess thaye":["guessing"],
"timer start":["thermostat"],
"hunt duration":["punctuation"],
"hunt start":["don't start","can't start"],
"hunt stop":["don't stop","can't stop"],
"hunt start":["don't start","can't start","on start"],
"hunt stop":["don't stop","can't stop","on stop"],
"start":["stat"],
"timer":["i'm a","im a"],
"cooldown":["pull down"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,11 @@ function parse_speech(vtext){
vvalue = -10
domovoi_msg = "showing info for "
}
else if(vtext.startsWith("test ") || vtext.startsWith("tests ")){
vtext = vtext.replace('tests ', "").replace('test ', "").trim()
vvalue = -11
domovoi_msg = "showing tests for "
}

// Common fixes to ghosts
var prevtext = vtext;
Expand Down Expand Up @@ -236,6 +241,13 @@ function parse_speech(vtext){

send_ghost_data_link(smallest_ghost)
}
else if(vvalue == -11){
if(!$(document.getElementById(smallest_ghost)).isInViewport())
document.getElementById(smallest_ghost).scrollIntoView({alignToTop:true,behavior:"smooth"})

openGhostInfo(smallest_ghost)
send_ghost_tests_link(smallest_ghost)
}

resetResetButton()
domovoi_heard(domovoi_msg)
Expand Down
24 changes: 24 additions & 0 deletions scripts-v4/wslink-v9.js → scripts-v5/wslink-v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,9 @@ function link_link(){
if (incoming_state['action'].toUpperCase() == "GHOSTDATA"){
send_ghost_data_link(incoming_state['ghost'])
}
if (incoming_state['action'].toUpperCase() == "GHOSTTESTS"){
send_ghost_tests_link(incoming_state['ghost'])
}
if (incoming_state['action'].toUpperCase() == "GHOSTSELECT"){
select(document.getElementById(incoming_state['ghost']))
}
Expand Down Expand Up @@ -498,6 +501,7 @@ function send_ghost_data_link(ghost){
data = data.replace("Hunt Sanity","\n<b>Hunt Sanity:<b>\n")
data = data.replace("Hunt Speed","\n<b>Hunt Speed:<b>\n")
data = data.replace("Evidence","\n<b>Evidence:<b>\n")
data = data.replace("Tests >>\n","")
data = data.replace("🔊","")
data = data.replaceAll("<b>\n\n","<b>\n")
data = data.replace(/[ ]+/g,' ').trim()
Expand All @@ -507,6 +511,26 @@ function send_ghost_data_link(ghost){
}
}

function send_ghost_tests_link(ghost){
if(hasDLLink){
data = `<b>${ghost} Tests:<b>\n`
data += document.getElementById(`wiki-0-evidence-${ghost.toLowerCase().replace(" ","-")}`).nextElementSibling.innerText
data = data.replace("Abilities, Behaviors, & Tells","<b>Abilities, Behaviors, & Tells:<b>")
data = data.replace("Confirmation Test(s)","<b>Confirmation Test(s):<b>")
data = data.replace("Elimination Test(s)","<b>Elimination Test(s):<b>")
data = data.replaceAll(/-.+?-/g,"")
data = data.replace(/[ ]+/g,' ')
data = data.replaceAll("\n ","\n")
data = data.replaceAll("\n\nT","\nT")
data = data.replaceAll("\n\nB","\nB")
data = data.replaceAll("\n\nA","\nA")
data = data.replaceAll("<b>\n\n","<b>\n").trim()


dlws.send(JSON.stringify({"action":"GHOSTDATA","ghost":`${ghost}|${data}`}))
}
}

function send_empty_data_link(){
if(hasDLLink){
dlws.send(JSON.stringify({"action":"GHOSTDATA","ghost":`None|<i>Click a ghost to see its tells and behaviors\n(Use ' [ ' and ' ] ' to cycle through ghosts)<i>`}))
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
39 changes: 35 additions & 4 deletions styles-v4/style-mobile-v7.css → styles-v5/style-mobile-v1.css
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
overflow: hidden;
}

#blackout, #blackout_voice{
#blackout, #blackout_voice, #blackout_image{
position: fixed;
background: rgba(0,0,0,0.9);
left: 0;
Expand All @@ -19,6 +19,24 @@
z-index: 110;
}

#blackout_image{
opacity: 0;
transition: opacity 0.5s;
cursor: zoom-out;
}

#zoom_image{
object-fit: contain;
max-width: 750px;
width: calc(100% - 50px);
cursor: zoom-out;
}

.zoomable{
cursor: zoom-in;
margin: 10px 0px;
}

#settings_box{
position: fixed;
top: 0;
Expand Down Expand Up @@ -437,7 +455,7 @@
color: #fff;
padding: 20px;
overflow-y: scroll;
font-size: 22px;
font-size: 12px;
}

#info_box .icon, #info_box_voice .icon{
Expand Down Expand Up @@ -511,7 +529,7 @@
margin-top: 20px;
text-align: center;
align-self: center;
font-size: 18px;
font-size: 11px;
width: 100%;
}

Expand All @@ -520,7 +538,7 @@
margin-top: 40px;
text-align: center;
align-self: center;
font-size: 20px;
font-size: 10px;
width: 100%;
}

Expand Down Expand Up @@ -1853,6 +1871,19 @@
padding: 0px;
}

.ghost_tests_button{
opacity: 0.4;
font-size: 18px;
cursor: pointer;
width: 100%;
text-align: right;
margin: 0px 0px -5px 0px;
}

.ghost_tests_button:hover{
opacity: 0.8;
}

.ghost_clear{
grid-column: 1 / 3;
grid-row: 4;
Expand Down
Loading

0 comments on commit d6d0c26

Please sign in to comment.