[Shadowrun5thA] handle import of weapon without dv

This commit is contained in:
Stexinator
2021-05-20 08:24:47 +02:00
parent 8dd471a859
commit f562d640bc
+13 -2
View File
@@ -10934,7 +10934,13 @@ on("change:chummercheckbox", function(){
if(chummerfile.characters.character.weapons.weapon[i-1].type=="Ranged"){
attributes["weaponismelee"+i]=0;
attributes["weaponrc"+i]=chummerfile.characters.character.weapons.weapon[i-1].rc.match(/\d/g).pop()-Math.ceil(chummerfile.characters.character.attributes[1].attribute[3].total/3)- 1;
attributes["weapondv"+i]=chummerfile.characters.character.weapons.weapon[i-1].rawdamage.match(/\d/)[0];
if(chummerfile.characters.character.weapons.weapon[i-1].rawdamage.match(/\d/) !== null) {
attributes["weapondv"+i]=chummerfile.characters.character.weapons.weapon[i-1].rawdamage.match(/\d/)[0];
}
else {
attributes["weapondv"+i]=0;
}
attributes["weapondmgtype"+i]=chummerfile.characters.character.weapons.weapon[i-1].rawdamage.match(/\D+/)[0];
}else{
attributes["weaponismelee"+i]="on";
@@ -11034,7 +11040,12 @@ on("change:chummercheckbox", function(){
if(chummerfile.characters.character.weapons.weapon.type=="Ranged"){
attributes["weaponismelee1"]=0;
attributes["weaponrc1"]=chummerfile.characters.character.weapons.weapon.rc.match(/\d/g).pop()-Math.ceil(chummerfile.characters.character.attributes[1].attribute[3].total/3)- 1;
attributes["weapondv1"]=chummerfile.characters.character.weapons.weapon.rawdamage.match(/\d*/)[0];
if(chummerfile.characters.character.weapons.weapon.rawdamage.match(/\d/) !== null) {
attributes["weapondv"+i]=chummerfile.characters.character.weapons.weapon.rawdamage.match(/\d/)[0];
}
else {
attributes["weapondv"+i]=0;
}
attributes["weapondmgtype1"]=chummerfile.characters.character.weapons.weapon.rawdamage.match(/\D+/)[0];
}else{
attributes["weaponismelee1"]="on";