Writes a string with a space instead of nothing when there's nothing to display to show update in OBS overlay

master
sigonasr2 2 years ago
parent 66b558991c
commit 817b21d1e7
  1. 1
      amt
  2. 1
      goalamt.txt
  3. 14
      inventory_monitor.js

1
amt

@ -0,0 +1 @@
undefined: 0/149 (0%)

@ -97,7 +97,7 @@ function update(){
if (i==386){
//Target Item Slot Amt. (4294967295 means invalid amt)
//387 should be item ID.
if (fileContents[387]!=0){
if (fileContents[387].split(" ")[0]!=0){
var tempLine=fileContents[387].split(" ")[0]
var tempLineAmt=fileContents[386].split(" ")[0]
var itemObj={id:Number(tempLine)}
@ -110,15 +110,15 @@ function update(){
lastDisplayString=tempString
}
} else {
if (lastDisplayString!=""){
fs.writeFile("amt","",()=>{})
lastDisplayString=""
if (lastDisplayString!=" "){
fs.writeFile("amt"," ",()=>{})
lastDisplayString=" "
}
}
} else {
if (lastDisplayString!=""){
fs.writeFile("amt","",()=>{})
lastDisplayString=""
if (lastDisplayString!=" "){
fs.writeFile("amt"," ",()=>{})
lastDisplayString=" "
}
}
}

Loading…
Cancel
Save