Skip to content

Commit

Permalink
0.5.74
Browse files Browse the repository at this point in the history
  • Loading branch information
gambit07 committed Oct 31, 2024
1 parent eb1139c commit b077136
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ jobs:
- name: Set Release Notes for Github
id: set-release-notes-github
run: |
echo "- Updates:" >> release_notes.txt
echo " - Vicious Mockery: Re-implemented everything to fix weird chat error. Added medkit enable/disable animation support." >> release_notes.txt
echo "- General:" >> release_notes.txt
echo " - Dialog Countdown Timer: I realized that theres not a good visual distinction between a dialog the GM is receiving for an NPC, and a dialog the GM is receiving from a PC due to Mirror Dialog being enabled. In order to create a better visual distinction between the two, I've modified the countdown timer colors for a GM. When a GM receives a reaction dialog for an NPC (or PC not logged in) it will be the standard orange to red countdown timer color. When a GM receives a mirrored dialog interaction, the countdown timer color will be a blue to purple fade. This should give a much clearer visual distinction between mirrored dialogs the GM doesnt have to interact with as often, and regular dialogs for reactions the GM is the owner of" >> release_notes.txt
echo "release-notes-github<<EOF" >> $GITHUB_ENV
cat release_notes.txt >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand Down
34 changes: 26 additions & 8 deletions scripts/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -789,14 +789,32 @@ export async function process3rdPartyReactionDialog({ dialogTitle, dialogContent
const progressPercentage = (this.timeLeft / initialTimeLeft) * 100;
const transitionStart = 75;
const transitionPercentage = Math.max((transitionStart - progressPercentage) / transitionStart, 0) * 100;

const redValue = Math.floor(181 + (transitionPercentage / 100) * (255 - 181));
const greenValue = Math.floor(99 - (transitionPercentage / 100) * 99);
const blueValue = Math.floor(69 - (transitionPercentage / 100) * 69);
const borderColorStop = `rgb(${redValue}, ${greenValue}, ${blueValue})`;

const colorStop1 = Math.max(progressPercentage - 5, 0);
const borderColor = `linear-gradient(to right, ${borderColorStop}, ${borderColorStop} ${colorStop1}%, rgba(0, 0, 0, 0.5) ${progressPercentage}%, rgba(0, 0, 0, 0.5))`;

let redValue;
let greenValue;
let blueValue;
let borderColorStop;
let colorStop1;
let borderColor;

if(type === "multiDialog" && source === "gm") {
redValue = Math.floor(0 + (transitionPercentage / 100) * (75 - 0));
greenValue = Math.floor(51 - (transitionPercentage / 100) * 51);
blueValue = Math.floor(153 - (transitionPercentage / 100) * (153 - 130));
borderColorStop = `rgb(${redValue}, ${greenValue}, ${blueValue})`;

colorStop1 = Math.max(progressPercentage - 5, 0);
borderColor = `linear-gradient(to right, ${borderColorStop}, ${borderColorStop} ${colorStop1}%, rgba(0, 0, 0, 0.5) ${progressPercentage}%, rgba(0, 0, 0, 0.5))`;
}
else {
redValue = Math.floor(181 + (transitionPercentage / 100) * (255 - 181));
greenValue = Math.floor(99 - (transitionPercentage / 100) * 99);
blueValue = Math.floor(69 - (transitionPercentage / 100) * 69);
borderColorStop = `rgb(${redValue}, ${greenValue}, ${blueValue})`;

colorStop1 = Math.max(progressPercentage - 5, 0);
borderColor = `linear-gradient(to right, ${borderColorStop}, ${borderColorStop} ${colorStop1}%, rgba(0, 0, 0, 0.5) ${progressPercentage}%, rgba(0, 0, 0, 0.5))`;
}

if (useFullTitleBar && titleBackground) {
titleBackground.style.background = borderColor;
Expand Down

0 comments on commit b077136

Please sign in to comment.