Better import and various stuff
This commit is contained in:
@ -90,11 +90,11 @@ export default class RMSSPlayerSheet extends ActorSheet {
|
||||
context.system.attributes.power_points.modifier = "PP Exhaustion Penalty: -20 ";
|
||||
break;
|
||||
case (powerpointPercentage < 75):
|
||||
console.log("Less than 75");
|
||||
//console.log("Less than 75");
|
||||
context.system.attributes.power_points.modifier = "PP Exhaustion Penalty: -10 ";
|
||||
break;
|
||||
default:
|
||||
console.log("Setting Default");
|
||||
//console.log("Setting Default");
|
||||
context.system.attributes.power_points.modifier = "PP Exhaustion Penalty: 0 ";
|
||||
}
|
||||
|
||||
@ -117,11 +117,11 @@ export default class RMSSPlayerSheet extends ActorSheet {
|
||||
context.system.attributes.exhaustion_points.modifier = "Exhaustion Penalty: -15 ";
|
||||
break;
|
||||
case (exhaustionPercentage < 75):
|
||||
console.log("Less than 75");
|
||||
//console.log("Less than 75");
|
||||
context.system.attributes.exhaustion_points.modifier = "Exhaustion Penalty: -5 ";
|
||||
break;
|
||||
default:
|
||||
console.log("Setting Default");
|
||||
//console.log("Setting Default");
|
||||
context.system.attributes.exhaustion_points.modifier = "Exhaustion Penalty: 0 ";
|
||||
}
|
||||
|
||||
@ -175,28 +175,17 @@ export default class RMSSPlayerSheet extends ActorSheet {
|
||||
s.skills.push(sk);
|
||||
}
|
||||
}
|
||||
// Sort skills with localcompare
|
||||
s.skills.sort((a, b) => a.name.localeCompare(b.name));
|
||||
}
|
||||
|
||||
// Sort Skill/Skillcat Arrays
|
||||
skillcat.sort(function(a, b) {
|
||||
if (a.name < b.name) {
|
||||
return -1;
|
||||
}
|
||||
if (a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
|
||||
playerskill.sort(function(a, b) {
|
||||
if (a.name < b.name) {
|
||||
return -1;
|
||||
}
|
||||
if (a.name > b.name) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
});
|
||||
// Sort all items
|
||||
skillcat.sort((a, b) => a.name.localeCompare(b.name));
|
||||
gear.sort((a, b) => a.name.localeCompare(b.name));
|
||||
weapons.sort((a, b) => a.name.localeCompare(b.name));
|
||||
armor.sort((a, b) => a.name.localeCompare(b.name));
|
||||
herbs.sort((a, b) => a.name.localeCompare(b.name));
|
||||
spells.sort((a, b) => a.name.localeCompare(b.name));
|
||||
|
||||
// Assign and return
|
||||
context.gear = gear;
|
||||
|
Reference in New Issue
Block a user