Skip to content

Commit

Permalink
Fast >> Imp CSS fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
genbtc committed Nov 5, 2023
1 parent 8c1f40d commit aa3223c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 33 deletions.
53 changes: 21 additions & 32 deletions modules/fight-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,20 +45,12 @@
"Carbimp",
];

//Colors for special imps (This has been disabled)
M["fightinfo"].colors =
{
bone: '#ffffff',
exotic: '#000000',
powerful: '#000000'
}

M["fightinfo"].lastProcessedWorld = null;
M["fightinfo"].lastProcessedMap = null;

function Update()
{
// Check if we should update world or map info
// Check if we should update world grid or map grid cell info
if (game.global.mapsActive)
{
// (cant check if current MAP already infoed - because of maps repeating)
Expand All @@ -73,7 +65,7 @@
if (M["fightinfo"].lastProcessedWorld === null || M["fightinfo"].lastProcessedWorld !== game.global.world)
M["fightinfo"].lastProcessedWorld = game.global.world;
else
return;
return; //only process once

// Cell data - WORLD GRID
var cells = game.global.gridArray;
Expand All @@ -98,58 +90,55 @@
// Cell data Model
var cell = cells[i];

if (cell.name.toLowerCase().indexOf('skele') > -1) // Skeletimp cell
if (cell.name.toLowerCase().indexOf('skele') > -1) // Skeletimp imp
{
$cell.insertAdjacentHTML('beforeend', "<span class=\"glyphicon glyphicon-italic\"></span> ");
$cell.title = cell.name; //reveal on hover
$cell.style.textShadow = '0px 0px 10px #ffffff';
$cell.style.textShadow = '0 0 7px #fff, 0 0 11px #fff, 0 0 15px #fff, 0 0 19px #fff, 0 0 22px #fff'; //strong glow
}
else if (M["fightinfo"].exotics.indexOf(cell.name) > -1) // Exotic cell
else if (M["fightinfo"].exotics.indexOf(cell.name) > -1) // Exotic imps ALL
{
$cell.insertAdjacentHTML('beforeend', "<span class=\"glyphicon glyphicon-sunglasses\"></span> ");
$cell.title = cell.name; //reveal on hover
$cell.style.textShadow = '0px 0px 10px #fb753f';
$cell.style.textShadow = '0px 0px 12px #fb753f'; //glow
}
else if (M["fightinfo"].powerful.indexOf(cell.name) > -1) // Powerful imp
else if (M["fightinfo"].powerful.indexOf(cell.name) > -1) // Powerful imps ALL
{
$cell.insertAdjacentHTML('beforeend', "<span class=\"glyphicon glyphicon-hazard\"></span> ");
$cell.title = cell.name; //reveal on hover
$cell.style.textShadow = '0px 0px 10px #8c0000';
$cell.style.textShadow = '0px 0px 12px #8c0000'; //glow
}
else if (M["fightinfo"].fast.indexOf(cell.name) > -1) // Fast imp
else if (M["fightinfo"].fast.indexOf(cell.name) > -1) // Fast imp ALL
{
if (game.global.mapsActive && cell.special.length === 0)
$cell.innerHTML = "<span class=\"glyphicon glyphicon-forward\"></span>";
$cell.innerHTML = "<span class=\"glyphicon glyphicon-forward\"></span>";
else if ($cell.title != cell.name)
$cell.insertAdjacentHTML('beforeend', "<span class=\"glyphicon glyphicon-forward\"></span>");
$cell.insertAdjacentHTML('beforeend', "<span class=\"glyphicon glyphicon-forward\"></span>");
$cell.title = cell.name; //reveal on hover
//$cell.style.textShadow = '0px 0px 10px #ffffff'; //no glow
//$cell.style.textShadow = '0px 0px 2px #ffffff'; //slight glow
}

//?? Imps are labelled Toxic/Gusty/Frozen but that didin't work either ??
if (cell.name.toLowerCase().indexOf('poison') > -1) // Poison Token cell
if (cell.special.toLowerCase().indexOf('poison') > -1) // Poison Token
{
if (cell.special.length === 0)
$cell.innerHTML = "<span class=\"glyphicon glyphicon-flask\"></span> ";

$cell.innerHTML = "<span class=\"glyphicon glyphicon-flask\"></span> ";
$cell.title = cell.name;
$cell.style.textShadow = '0px 0px 10px #ffffff';
$cell.style.textShadow = '0px 0px 12px #ffffff';
}
if (cell.name.toLowerCase().indexOf('wind') > -1) // Wind Token cell
else if (cell.name.toLowerCase().indexOf('wind') > -1) // Wind Token
{
if (cell.special.length === 0)
$cell.innerHTML = "<span class=\"icomoon icon-air\"></span> ";

$cell.innerHTML = "<span class=\"icomoon icon-air\"></span> ";
$cell.title = cell.name;
$cell.style.textShadow = '0px 0px 10px #ffffff';
$cell.style.textShadow = '0px 0px 12px #ffffff';
}
if (cell.name.toLowerCase().indexOf('ice') > -1) // Ice Token cell
else if (cell.name.toLowerCase().indexOf('ice') > -1) // Ice Token
{
if (cell.special.length === 0)
$cell.innerHTML = "<span class=\"glyphicon glyphicon-certificate\"></span> ";

$cell.innerHTML = "<span class=\"glyphicon glyphicon-certificate\"></span> ";
$cell.title = cell.name;
$cell.style.textShadow = '0px 0px 10px #ffffff';
$cell.style.textShadow = '0px 0px 12px #ffffff';
}
}
}
Expand Down
7 changes: 6 additions & 1 deletion tabs.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,19 @@ ul.tab {
}
/* Rounded corners on AT inner tabs*/
div.tabcontent { border-radius: 1ex; }
/* Rounded corners for AT menu buttons */
/* Rounded corners for AT menu buttons + shadow */
div.ATbtn {
border-radius: 1ex;
box-shadow: 2px 2px 4px -2px #007bb7;
}
/* Rounded corners(small) for ALL menu buttons - no.
.settingsBtn { border-radius: 0.25ex; }
*/
/* spacing in map/world GRID between icons of
new Fast >> Icon and original loot icon */
span.glyphicon {
padding-left: 3px;
}

/* Float the list items side by side */
ul.tab li { float: left; }
Expand Down

0 comments on commit aa3223c

Please sign in to comment.