Skip to content

Commit

Permalink
add descfunc 29
Browse files Browse the repository at this point in the history
  • Loading branch information
dschu012 committed Oct 5, 2022
1 parent e57f705 commit 54a5382
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dschu012/d2s",
"version": "2.0.25",
"version": "2.0.26",
"description": "",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
6 changes: 6 additions & 0 deletions src/d2/attribute_enhancer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ function _enhanceAttributeDescription(
}
let descFunc = prop.dF;
let descString = v >= 0 ? prop.dP : prop.dN;
//hack for d2r...?
if (property.id == 39 || property.id == 41 || property.id == 43 || property.id == 45) {
descString = prop.dP;
}
let descVal = prop.dV;
let desc2 = prop.d2;
if (prop.dg && dgrps[prop.dg - 1] === 4) {
Expand Down Expand Up @@ -400,6 +404,7 @@ function _descFunc(
}
case 19: {
property.description = descString.replace(/%d/, v.toString());
property.description = property.description.replace(/%\+d%/, v.toString());
break;
}
case 20: {
Expand Down Expand Up @@ -442,6 +447,7 @@ function _descFunc(
}
case 29: {
property.description = descString.replace(/%d%/, v.toString());
property.description = property.description.replace(/%\+d%/, v.toString());
break;
}
default: {
Expand Down

0 comments on commit 54a5382

Please sign in to comment.