Blade runner RPG: Fix npcs being dropped without names
This commit is contained in:
@@ -2045,6 +2045,7 @@ const getSkillDice = (skillName,attributes) => {
|
||||
* @param {object} casc - Expanded cascade object
|
||||
*/
|
||||
const rollAttribute = function({trigger,attributes,sections,casc}){
|
||||
debugger;
|
||||
const rollName = trigger.name.replace(/-action/,'').replace(/-/g,' ');
|
||||
|
||||
const rollObj = {
|
||||
@@ -2119,6 +2120,7 @@ const executeRoll = async (rollObj,attributes,templateStart) => {
|
||||
}
|
||||
|
||||
finishRoll(roll.rollId,computedObj);
|
||||
debugger;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2506,6 +2508,7 @@ const handleCompendiumDrop = function({attributes,sections,casc}){
|
||||
attributes,sections,casc,
|
||||
callback: async (lookupObj)=>{
|
||||
if(data.Category === 'NPCs'){
|
||||
debugger;
|
||||
clearSheet(attributes,sections,casc);
|
||||
attributes.queue.push('character_name');
|
||||
attributes.character_name = data['data-cs-name'];
|
||||
@@ -2576,7 +2579,7 @@ const clearSheet = function(attributes,sections,casc){
|
||||
});
|
||||
});
|
||||
Object.keys(attributes.attributes).forEach((attr)=>{
|
||||
if(casc[`attr_${attr}`]){
|
||||
if(casc[`attr_${attr}`] && attr !== 'character_name'){
|
||||
attributes.updates[attr] = casc[`attr_${attr}`].hasOwnProperty('defaultValue') && casc[`attr_${attr}`].defaultValue !== 0 ?
|
||||
casc[`attr_${attr}`].defaultValue :
|
||||
'';
|
||||
|
||||
Reference in New Issue
Block a user