diff --git a/lang/en.json b/lang/en.json index 1e8118cd..1decdafc 100644 --- a/lang/en.json +++ b/lang/en.json @@ -46,10 +46,10 @@ "SETTINGS.5eReset": "Reset", "SETTINGS.5eRestEpic": "Epic Heroism (LR: 1 hour, SR: 1 min)", "SETTINGS.5eRestGritty": "Gritty Realism (LR: 7 days, SR: 8 hours)", - "SETTINGS.5eUndoChanges": "Undo Changes", "SETTINGS.5eRestL": "Configure which rest variant should be used for games within this system.", "SETTINGS.5eRestN": "Rest Variant", "SETTINGS.5eRestPHB": "Player's Handbook (LR: 8 hours, SR: 1 hour)", + "SETTINGS.5eUndoChanges": "Undo Changes", "SETTINGS.SWColorDark": "Dark Theme", "SETTINGS.SWColorL": "Set the color theme of the game", "SETTINGS.SWColorLight": "Light Theme", @@ -80,6 +80,7 @@ "SW5E.AbilityUseCast": "Cast Power", "SW5E.AbilityUseChargedHint": "This {type} is charged and ready to use!", "SW5E.AbilityUseChargesLabel": "{value} Charges", + "SW5E.AbilityUseConfig": "Usage Configuration", "SW5E.AbilityUseConsumableChargeHint": "Using this {type} will consume 1 charge of {value} remaining.", "SW5E.AbilityUseConsumableDestroyHint": "Using this {type} will consume its final charge and it will be destroyed.", "SW5E.AbilityUseConsumableLabel": "{max} per {per}", @@ -109,7 +110,6 @@ "SW5E.ActorWarningInvalidItem": "{itemType} items cannot be added to a {actorType}.", "SW5E.Add": "Add", "SW5E.AddEmbeddedItemPromptHint": "Do you want to add these items to your character sheet?", - "SW5E.SelectItemsPromptTitle": "Select Items", "SW5E.AdditionalNotes": "Additional Notes", "SW5E.Advantage": "Advantage", "SW5E.Alignment": "Alignment", @@ -193,7 +193,7 @@ "SW5E.BonusSaveForm": "Update Bonuses", "SW5E.BonusTechPowerDC": "Global Tech Power DC Bonus", "SW5E.BonusTitle": "Configure Actor Bonuses", - "SW5E.BurnFuel": "Burn", + "SW5E.BurnFuel": "Burn", "SW5E.CapacityMultiplier": "Capacity Multiplier", "SW5E.CentStorageCapacity": "Central Storage Capacity", "SW5E.ChallengeRating": "Challenge Rating", @@ -267,6 +267,10 @@ "SW5E.ConUnconscious": "Unconscious", "SW5E.Core": "Core", "SW5E.CostGP": "Cost (CR)", + "SW5E.Cover": "Cover", + "SW5E.CoverHalf": "Half", + "SW5E.CoverThreeQuarters": "Three Quarters", + "SW5E.CoverTotal": "Total", "SW5E.CreatureAberration": "Aberration", "SW5E.CreatureAberrationPl": "Aberrations", "SW5E.CreatureBeast": "Beast", @@ -281,25 +285,20 @@ "SW5E.CreatureHumanoidPl": "Humanoids", "SW5E.CreaturePlant": "Plant", "SW5E.CreaturePlantPl": "Plants", - "SW5E.CreatureUndead": "Undead", - "SW5E.CreatureUndeadPl": "Undead", - "SW5E.CreatureType": "Creature Type", - "SW5E.CreatureTypeTitle": "Configure Creature Type", "SW5E.CreatureSwarm": "Swarm", - "SW5E.CreatureSwarmSize": "Swarm Size", "SW5E.CreatureSwarmPhrase": "Swarm of {size} {type}", + "SW5E.CreatureSwarmSize": "Swarm Size", + "SW5E.CreatureType": "Creature Type", "SW5E.CreatureTypeConfig": "Configure Creature Type", "SW5E.CreatureTypeSelectorCustom": "Custom Type", "SW5E.CreatureTypeSelectorSubtype": "Subtype", - "SW5E.Crewed": "Crewed", - "SW5E.Cover": "Cover", - "SW5E.CoverHalf": "Half", - "SW5E.CoverThreeQuarters": "Three Quarters", - "SW5E.CoverTotal": "Total", + "SW5E.CreatureTypeTitle": "Configure Creature Type", + "SW5E.CreatureUndead": "Undead", + "SW5E.CreatureUndeadPl": "Undead", "SW5E.CrewCap": "Crew Capacity", + "SW5E.Crewed": "Crewed", "SW5E.Critical": "Critical", "SW5E.CriticalHit": "Critical Hit", - "SW5E.PowerfulCritical": "Powerful Critical", "SW5E.Currency": "Currency", "SW5E.CurrencyConvert": "Convert All Currency", "SW5E.CurrencyConvertHint": "Convert all carried currency to the highest possible denomination to reduce the amount of coinage carried by the character. Be wary, this action cannot be undone.", @@ -319,7 +318,6 @@ "SW5E.DamageRoll": "Damage Roll", "SW5E.DamageSonic": "Sonic", "SW5E.DamImm": "Damage Immunities", - "SW5E.DmgRed": "Damage Reduction", "SW5E.DamRes": "Damage Resistances", "SW5E.DamVuln": "Damage Vulnerabilities", "SW5E.DarkPowerDC": "Dark Power DC", @@ -345,24 +343,29 @@ "SW5E.DistMi": "Miles", "SW5E.DistSelf": "Self", "SW5E.DistTouch": "Touch", + "SW5E.DmgRed": "Damage Reduction", "SW5E.Duration": "Duration", - "SW5E.EffectsCategoryTemporary": "Temporary Effects", - "SW5E.EffectsCategoryPassive": "Passive Effects", - "SW5E.EffectsCategoryInactive": "Inactive Effects", "SW5E.EffectCreate": "Create Effect", "SW5E.EffectDelete": "Delete Effect", "SW5E.EffectEdit": "Edit Effect", + "SW5E.EffectInactive": "Inactive Effects", + "SW5E.EffectNew": "New Effect", + "SW5E.EffectPassive": "Passive Effects", "SW5E.Effects": "Effects", + "SW5E.EffectTemporary": "Temporary Effects", + "SW5E.EffectsCategoryInactive": "Inactive Effects", + "SW5E.EffectsCategoryPassive": "Passive Effects", + "SW5E.EffectsCategoryTemporary": "Temporary Effects", "SW5E.EffectToggle": "Toggle Effect", "SW5E.Engine": "Engine", "SW5E.EnginePl": "Engines", "SW5E.EquipmentBonus": "Magical Bonus", "SW5E.EquipmentClothing": "Clothing", "SW5E.EquipmentHeavy": "Heavy Armor", + "SW5E.EquipmentHyperdrive": "Hyperdrive", "SW5E.EquipmentLight": "Light Armor", "SW5E.EquipmentMedium": "Medium Armor", "SW5E.EquipmentNatural": "Natural Armor", - "SW5E.EquipmentHyperdrive": "Hyperdrive", "SW5E.EquipmentPowerCoupling": "Power Coupling", "SW5E.EquipmentReactor": "Reactor", "SW5E.EquipmentShield": "Shield", @@ -377,6 +380,7 @@ "SW5E.Expertise": "Expertise", "SW5E.Favorites": "Favorites", "SW5E.FavoritesAndNotes": "Favorites & Notes", + "SW5E.Feats": "Feats", "SW5E.FeatureActionRecharge": "Action Recharge", "SW5E.FeatureActive": "Active Abilities", "SW5E.FeatureAdd": "Create Feature", @@ -387,8 +391,8 @@ "SW5E.FeatureRechargeOn": "Recharge On", "SW5E.FeatureRechargeResult": "1d6 Result", "SW5E.Features": "Features", - "SW5E.FeatureUsage": "Feature Usage", "SW5E.FeatureType": "Feature Type", + "SW5E.FeatureUsage": "Feature Usage", "SW5E.FeetAbbr": "ft.", "SW5E.Filter": "Filter", "SW5E.FilterNoPowers": "No powers found for this set of filters.", @@ -517,9 +521,9 @@ "SW5E.Flaws": "Flaws", "SW5E.ForcePowerbook": "Force Powers", "SW5E.Formula": "Formula", - "SW5E.FuelCapacity": "Fuel Capacity", + "SW5E.FuelCapacity": "Fuel Capacity", + "SW5E.FuelCostPerUnit": "Fuel Cost per Unit", "SW5E.FuelCostsMod": "Fuel Costs Modifier", - "SW5E.FuelCostPerUnit": "Fuel Cost per Unit", "SW5E.GrantedAbilities": "Granted Abilities", "SW5E.HalfProficient": "Half Proficient", "SW5E.HardpointSizeMod": "Hardpoint Size Modifier", @@ -585,6 +589,7 @@ "SW5E.ItemTypeArchetype": "Archetype", "SW5E.ItemTypeBackground": "Background", "Sw5E.ItemTypeBackgroundPl": "Backgrounds", + "SW5E.ItemTypeBackpack": "Container", "SW5E.ItemTypeClass": "Class", "SW5E.ItemTypeClassFeat": "Class Feature", "SW5E.ItemTypeClassFeats": "Class Features", @@ -594,9 +599,9 @@ "SW5E.ItemTypeContainer": "Container", "SW5E.ItemTypeContainerPl": "Containers", "SW5E.ItemTypeDeployment": "Deployment", - "SW5E.ItemTypeDeploymentPl": "Deployments", "SW5E.ItemTypeDeploymentFeature": "Deployment Feature", "SW5E.ItemTypeDeploymentFeaturePl": "Deployment Features", + "SW5E.ItemTypeDeploymentPl": "Deployments", "SW5E.ItemTypeEquipment": "Equipment", "SW5E.ItemTypeEquipmentPl": "Equipment", "SW5E.ItemTypeFeat": "Feat", @@ -751,6 +756,7 @@ "SW5E.LongRest": "Long Rest", "SW5E.LongRestEpic": "Long Rest (1 hour)", "SW5E.LongRestGritty": "Long Rest (7 days)", + "SW5E.LongRestHint": "Take a long rest? On a long rest you will recover hit points, half your maximum hit dice, class resources, limited use item charges, and power points.", "SW5E.LongRestNormal": "Long Rest (8 hours)", "SW5E.LongRestOvernight": "Long Rest (New Day)", "SW5E.LongRestResult": "{name} takes a long rest.", @@ -770,8 +776,8 @@ "SW5E.LongRestResultTP": "{name} takes a long rest and recovers {tech} Tech Points.", "SW5E.LongRestResultTPHD": "{name} takes a long rest and recovers {tech} Tech Points and {dice} Hit Dice.", "SW5E.Max": "Max", - "SW5E.Modifier": "Modifier", "SW5E.ModCap": "Modification Capacity", + "SW5E.Modifier": "Modifier", "SW5E.Movement": "Movement", "SW5E.MovementBurrow": "Burrow", "SW5E.MovementClimb": "Climb", @@ -780,13 +786,15 @@ "SW5E.MovementCrawl": "Crawl", "SW5E.MovementFly": "Fly", "SW5E.MovementHover": "Hover", - "SW5E.MovementRoll": "Roll", - "SW5E.MovementSpace": "Space Flight", + "SW5E.MovementRoll": "Roll", + "SW5E.MovementSpace": "Space Flight", "SW5E.MovementSwim": "Swim", "SW5E.MovementTurn": "Turning", "SW5E.MovementUnits": "Units", "SW5E.MovementWalk": "Walk", "SW5E.Name": "Character Name", + "SW5E.NewDay": "Is New Day?", + "SW5E.NewDayHint": "Recover limited use abilities which recharge \"per day\"?", "SW5E.NoCharges": "No Charges", "SW5E.None": "None", "SW5E.NoPowerLevels": "This character has no powercaster levels, but you may add powers manually.", @@ -839,11 +847,12 @@ "SW5E.PowerCreate": "Create Power", "SW5E.PowerDC": "Power DC", "SW5E.PowerDetails": "Power Details", - "SW5E.PowerDie": "Power Die", - "SW5E.PowerDiePl": "Power Dice", - "SW5E.PowerDieAlloc": "Power Die Allocation", "SW5E.PowerDiceRecovery": "Power Dice Recovery", + "SW5E.PowerDie": "Power Die", + "SW5E.PowerDieAlloc": "Power Die Allocation", + "SW5E.PowerDiePl": "Power Dice", "SW5E.PowerEffects": "Power Effects", + "SW5E.PowerfulCritical": "Powerful Critical", "SW5E.PowerLevel": "Power Level", "SW5E.PowerLevel0": "At-Will", "SW5E.PowerLevel1": "1st Level", @@ -873,9 +882,9 @@ "SW5E.PowerProgression": "Power Progression", "SW5E.PowerProgSct": "Scout", "SW5E.PowerProgSnt": "Sentinel", + "SW5E.PowerRouting": "Power Routing", "SW5E.PowerSchool": "Power School", "SW5E.PowersKnown": "Powers Known", - "SW5E.PowerRouting": "Power Routing", "SW5E.PowerTarget": "Power Target", "SW5E.PowerUnprepared": "Unprepared", "SW5E.PowerUsage": "Power Usage", @@ -891,15 +900,16 @@ "SW5E.Reaction": "Reaction", "SW5E.ReactionPl": "Reactions", "SW5E.Recharge": "Recharge", - "SW5E.Refitting": "Refitting", - "SW5E.Refuel": "Refuel", + "SW5E.Refitting": "Refitting", + "SW5E.Refuel": "Refuel", "SW5E.RegenerationRateCoefficient": "Regeneration Rate Coefficient", "SW5E.RequiredMaterials": "Required Materials", "SW5E.Requirements": "Requirements", - "SW5E.ResourcesAndTraits": "Resources & Traits", "SW5E.ResourcePrimary": "Resource 1", + "SW5E.ResourcesAndTraits": "Resources & Traits", "SW5E.ResourceSecondary": "Resource 2", "SW5E.ResourceTertiary": "Resource 3", + "SW5E.Rest": "Rest", "SW5E.RestL": "L. Rest", "SW5E.RestS": "S. Rest", "SW5E.Ritual": "Ritual", @@ -919,6 +929,7 @@ "SW5E.SchoolLgt": "Light", "SW5E.SchoolTec": "Tech", "SW5E.SchoolUni": "Universal", + "SW5E.SelectItemsPromptTitle": "Select Items", "SW5E.SenseBlindsight": "Blindsight", "SW5E.SenseBS": "Blindsight", "SW5E.SenseDarkvision": "Darkvision", @@ -937,10 +948,10 @@ "SW5E.SheetClassNPC": "Default NPC Sheet", "SW5E.SheetClassNPCOld": "Old NPC Sheet", "SW5E.SheetClassVehicle": "Default Vehicle Sheet", - "SW5E.ShieldDice": "Shield Dice", - "SW5E.ShieldPoints": "Shield Points", - "SW5E.ShieldPointsFormula": "Shield Points Formula", - "SW5E.ShieldRegen": "Regen", + "SW5E.ShieldDice": "Shield Dice", + "SW5E.ShieldPoints": "Shield Points", + "SW5E.ShieldPointsFormula": "Shield Points Formula", + "SW5E.ShieldRegen": "Regen", "SW5E.ShortRest": "Short Rest", "SW5E.ShortRestEpic": "Short Rest (5 minutes)", "SW5E.ShortRestGritty": "Short Rest (8 hours)", @@ -975,12 +986,12 @@ "SW5E.SkillPrc": "Perception", "SW5E.SkillPrf": "Performance", "SW5E.SkillPromptTitle": "{skill} Skill Check", - "SW5E.Skip": "Skip", "SW5E.Skills": "Skills", "SW5E.SkillSlt": "Sleight of Hand", "SW5E.SkillSte": "Stealth", "SW5E.SkillSur": "Survival", "SW5E.SkillTec": "Technology", + "SW5E.Skip": "Skip", "SW5E.Slots": "Slots", "SW5E.Source": "Source", "SW5E.Special": "Special", @@ -991,8 +1002,8 @@ "SW5E.Speed": "Speed", "SW5E.SpeedSpecial": "Special Movement", "SW5E.StarshipAmbassador": "Ambassador", - "SW5E.StarshipArmorandShields": "Starship Armor and Shields", "SW5E.StarshipArmorandShieldProps": "Starship Armor & Shield Properties", + "SW5E.StarshipArmorandShields": "Starship Armor and Shields", "SW5E.StarshipBattleship": "Battleship", "SW5E.StarshipBlockadeShip": "Blockade Ship", "SW5E.StarshipBomber": "Bomber", @@ -1117,6 +1128,7 @@ "SW5E.TraitToolProf": "Tool Proficiencies", "SW5E.TraitWeaponProf": "Weapon Proficiencies", "SW5E.Type": "Type", + "SW5E.Uncrewed": "Uncrewed", "SW5E.Unequipped": "Unequipped", "SW5E.UniversalPowerDC": "Universal Power DC", "SW5E.Unlimited": "Unlimited", @@ -1141,16 +1153,27 @@ "SW5E.VersatileDamage": "Versatile Damage", "SW5E.VsDC": "vs DC.", "SW5E.WeaponAmmo": "Ammunition", + "SW5E.WeaponBlasterPistolProficiency": "Blaster Pistol", + "SW5E.WeaponChakramProficiency": "Chakrams", + "SW5E.WeaponDoubleBladeProficiency": "Doubleblade", + "SW5E.WeaponDoubleSaberProficiency": "Doublesaber", + "SW5E.WeaponDoubleShotoProficiency": "Doubleshoto", + "SW5E.WeaponDoubleSwordProficiency": "Doublesword", + "SW5E.WeaponHiddenBladeProficiency": "Hidden Blade", "SW5E.WeaponImprov": "Improvised", + "SW5E.WeaponImprovisedProficiency": "Improvised Weapons", + "SW5E.WeaponLightFoilProficiency": "Lightfoil", + "SW5E.WeaponLightRingProficiency": "Light Ring", "SW5E.WeaponMartialB": "Martial Blaster", + "SW5E.WeaponMartialBlasterProficiency": "Martial Blasters", + "SW5E.WeaponMartialLightweaponProficiency": "Martial Lightweapons", "SW5E.WeaponMartialLW": "Martial Lightweapon", - "SW5E.WeaponPrimarySW": "Primary (Starship)", - "SW5E.WeaponSecondarySW": "Secondary (Starship)", - "SW5E.WeaponTertiarySW": "Tertiary (Starship)", - "SW5E.WeaponQuaternarySW": "Quaternary (Starship)", "SW5E.WeaponMartialProficiency": "Martial Weapons", + "SW5E.WeaponMartialVibroweaponProficiency": "Martial Vibroweapons", "SW5E.WeaponMartialVW": "Martial Vibroweapon", "SW5E.WeaponNatural": "Natural", + "SW5E.WeaponNaturalProficiency": "Natural Weapons", + "SW5E.WeaponPrimarySW": "Primary (Starship)", "SW5E.WeaponPropertiesAmm": "Ammunition", "SW5E.WeaponPropertiesAut": "Auto", "SW5E.WeaponPropertiesBur": "Burst", @@ -1168,14 +1191,14 @@ "SW5E.WeaponPropertiesFix": "Fixed", "SW5E.WeaponPropertiesFoc": "Focus", "SW5E.WeaponPropertiesHid": "Hidden", - "SW5E.WeaponPropertiesHvy": "Heavy", "SW5E.WeaponPropertiesHom": "Homing", + "SW5E.WeaponPropertiesHvy": "Heavy", "SW5E.WeaponPropertiesIon": "Ionizing", "SW5E.WeaponPropertiesKen": "Keen", "SW5E.WeaponPropertiesLgt": "Light", "SW5E.WeaponPropertiesLum": "Luminous", - "SW5E.WeaponPropertiesMlt": "Melt", "SW5E.WeaponPropertiesMig": "Mighty", + "SW5E.WeaponPropertiesMlt": "Melt", "SW5E.WeaponPropertiesOvr": "Overheat", "SW5E.WeaponPropertiesPic": "Piercing", "SW5E.WeaponPropertiesPow": "Power", @@ -1194,32 +1217,21 @@ "SW5E.WeaponPropertiesVer": "Versatile", "SW5E.WeaponPropertiesVic": "Vicious", "SW5E.WeaponPropertiesZon": "Zone", + "SW5E.WeaponQuaternarySW": "Quaternary (Starship)", + "SW5E.WeaponSaberWhipProficiency": "Saberwhip", + "SW5E.WeaponSecondarySW": "Secondary (Starship)", "SW5E.WeaponSiege": "Siege", "SW5E.WeaponSimpleB": "Simple Blaster", + "SW5E.WeaponSimpleBlasterProficiency": "Simple Blasters", + "SW5E.WeaponSimpleLightweaponProficiency": "Simple Lightweapons", "SW5E.WeaponSimpleLW": "Simple Lightweapon", - "SW5E.WeaponBlasterPistolProficiency": "Blaster Pistol", - "SW5E.WeaponChakramProficiency": "Chakrams", - "SW5E.WeaponDoubleBladeProficiency": "Doubleblade", - "SW5E.WeaponDoubleSaberProficiency": "Doublesaber", - "SW5E.WeaponDoubleShotoProficiency": "Doubleshoto", - "SW5E.WeaponDoubleSwordProficiency": "Doublesword", - "SW5E.WeaponHiddenBladeProficiency": "Hidden Blade", - "SW5E.WeaponImprovisedProficiency": "Improvised Weapons", "SW5E.WeaponSimpleProficiency": "Simple Weapons", - "SW5E.WeaponLightFoilProficiency": "Lightfoil", - "SW5E.WeaponLightRingProficiency": "Light Ring", - "SW5E.WeaponMartialBlasterProficiency": "Martial Blasters", - "SW5E.WeaponMartialLightweaponProficiency": "Martial Lightweapons", - "SW5E.WeaponMartialVibroweaponProficiency": "Martial Vibroweapons", - "SW5E.WeaponNaturalProficiency": "Natural Weapons", - "SW5E.WeaponSaberWhipProficiency": "Saberwhip", - "SW5E.WeaponSimpleBlasterProficiency": "Simple Blasters", - "SW5E.WeaponSimpleLightweaponProficiency": "Simple Lightweapons", - "SW5E.WeaponSimpleVibroweaponProficiency": "Simple Vibroweapons", + "SW5E.WeaponSimpleVibroweaponProficiency": "Simple Vibroweapons", "SW5E.WeaponSimpleVW": "Simple Vibroweapon", - "SW5E.WeaponTechbladeProficiency": "Techblades", - "SW5E.WeaponVibrorapierProficiency": "Vibrorapier", - "SW5E.WeaponVibrowhipProficiency": "Vibrowhip", "SW5E.WeaponSizeAbb": "Size", + "SW5E.WeaponTechbladeProficiency": "Techblades", + "SW5E.WeaponTertiarySW": "Tertiary (Starship)", + "SW5E.WeaponVibrorapierProficiency": "Vibrorapier", + "SW5E.WeaponVibrowhipProficiency": "Vibrowhip", "SW5E.Weight": "Weight" } \ No newline at end of file diff --git a/module/actor/entity.js b/module/actor/entity.js index 228b08d4..356ecb12 100644 --- a/module/actor/entity.js +++ b/module/actor/entity.js @@ -696,10 +696,10 @@ export default class Actor5e extends Actor { } /* -------------------------------------------- */ - /* Event Handlers + /* Event Handlers */ /* -------------------------------------------- */ - /** @inheritDoc */ + /** @inheritdoc */ async _preCreate(data, options, user) { await super._preCreate(data, options, user); @@ -1688,11 +1688,13 @@ export default class Actor5e extends Actor { // Get the Tokens which represent this actor if ( canvas.ready ) { const tokens = this.getActiveTokens(true); + const tokenData = await original.getTokenData(); const tokenUpdates = tokens.map(t => { - const tokenData = original.data.token.toJSON(); - tokenData._id = t.id; - tokenData.actorId = original.id; - return tokenData; + const update = duplicate(tokenData); + update._id = t.id; + delete update.x; + delete update.y; + return update; }); canvas.scene.updateEmbeddedDocuments("Token", tokenUpdates); } diff --git a/module/actor/sheets/newSheet/base.js b/module/actor/sheets/newSheet/base.js index 938601b7..ff0d483f 100644 --- a/module/actor/sheets/newSheet/base.js +++ b/module/actor/sheets/newSheet/base.js @@ -75,10 +75,10 @@ export default class ActorSheet5e extends ActorSheet { options: this.options, editable: this.isEditable, cssClass: isOwner ? "editable" : "locked", - isCharacter: this.actor.data.type === "character", - isNPC: this.actor.data.type === "npc", - isStarship: this.actor.data.type === "starship", - isVehicle: this.actor.data.type === 'vehicle', + isCharacter: this.actor.type === "character", + isNPC: this.actor.type === "npc", + isStarship: this.actor.type === "starship", + isVehicle: this.actor.type === 'vehicle', config: CONFIG.SW5E, rollData: this.actor.getRollData.bind(this.actor) }; @@ -109,7 +109,7 @@ export default class ActorSheet5e extends ActorSheet { // Skills if (actorData.data.skills) { - for ( let [s, skl] of Object.entries(actorData.data.skills)) { + for (let [s, skl] of Object.entries(actorData.data.skills)) { skl.ability = CONFIG.SW5E.abilityAbbreviations[skl.ability]; skl.icon = this._getProficiencyIcon(skl.value); skl.hover = CONFIG.SW5E.proficiencyLevels[skl.value]; @@ -781,7 +781,7 @@ export default class ActorSheet5e extends ActorSheet { const header = event.currentTarget; const type = header.dataset.type; const itemData = { - name: game.i18n.format("SW5E.ItemNew", {type: type.capitalize()}), + name: game.i18n.format("SW5E.ItemNew", {type: game.i18n.localize(`SW5E.ItemType${type.capitalize()}`)}), type: type, data: foundry.utils.deepClone(header.dataset) }; diff --git a/module/actor/sheets/newSheet/character.js b/module/actor/sheets/newSheet/character.js index 58176a54..3390c482 100644 --- a/module/actor/sheets/newSheet/character.js +++ b/module/actor/sheets/newSheet/character.js @@ -112,7 +112,7 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e { this._prepareItemToggleState(item); // Primary Class - if ( item.type === "class" ) item.isOriginalClass = ( item.data._id === this.actor.data.data.details.originalClass ); + if ( item.type === "class" ) item.isOriginalClass = ( item._id === this.actor.data.data.details.originalClass ); // Classify items into types if ( item.type === "power" && ["lgt", "drk", "uni"].includes(item.data.school) ) arr[1].push(item); @@ -143,7 +143,7 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e { for ( let i of items ) { i.data.quantity = i.data.quantity || 0; i.data.weight = i.data.weight || 0; - i.totalWeight = Math.round(i.data.quantity * i.data.weight * 10) / 10; + i.totalWeight = (i.data.quantity * i.data.weight).toNearest(0.1); inventory[i.type].items.push(i); } @@ -156,9 +156,9 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e { classes: { label: "SW5E.ItemTypeClassPl", items: [], hasActions: false, dataset: {type: "class"}, isClass: true }, classfeatures: { label: "SW5E.ItemTypeClassFeats", items: [], hasActions: true, dataset: {type: "classfeature"}, isClassfeature: true }, archetype: { label: "SW5E.ItemTypeArchetype", items: [], hasActions: false, dataset: {type: "archetype"}, isArchetype: true }, - deployments: { label: "SW5E.ItemTypeDeploymentPl", items: [], hasActions: false, dataset: {type: "deployment"}, isDeployment: true }, - deploymentfeatures: { label: "SW5E.ItemTypeDeploymentFeaturePl", items: [], hasActions: true, dataset: {type: "deploymentfeature"}, isDeploymentfeature: true }, - ventures: { label: "SW5E.ItemTypeVenturePl", items: [], hasActions: false, dataset: {type: "venture"}, isVenture: true }, + deployments: { label: "SW5E.ItemTypeDeploymentPl", items: [], hasActions: false, dataset: {type: "deployment"}, isDeployment: true }, + deploymentfeatures: { label: "SW5E.ItemTypeDeploymentFeaturePl", items: [], hasActions: true, dataset: {type: "deploymentfeature"}, isDeploymentfeature: true }, + ventures: { label: "SW5E.ItemTypeVenturePl", items: [], hasActions: false, dataset: {type: "venture"}, isVenture: true }, species: { label: "SW5E.ItemTypeSpecies", items: [], hasActions: false, dataset: {type: "species"}, isSpecies: true }, background: { label: "SW5E.ItemTypeBackground", items: [], hasActions: false, dataset: {type: "background"}, isBackground: true }, fightingstyles: { label: "SW5E.ItemTypeFightingStylePl", items: [], hasActions: false, dataset: {type: "fightingstyle"}, isFightingstyle: true }, @@ -175,9 +175,9 @@ export default class ActorSheet5eCharacterNew extends ActorSheet5e { features.classes.items = classes; features.classfeatures.items = classfeatures; features.archetype.items = archetypes; - features.deployments.items = deployments; - features.deploymentfeatures.items = deploymentfeatures; - features.ventures.items = ventures; + features.deployments.items = deployments; + features.deploymentfeatures.items = deploymentfeatures; + features.ventures.items = ventures; features.species.items = species; features.background.items = backgrounds; features.fightingstyles.items = fightingstyles; diff --git a/module/actor/sheets/newSheet/npc.js b/module/actor/sheets/newSheet/npc.js index dea59e8f..486dbf99 100644 --- a/module/actor/sheets/newSheet/npc.js +++ b/module/actor/sheets/newSheet/npc.js @@ -1,4 +1,4 @@ -import Actor5e from "../../entity.js"; +import Actor5e from "../entity.js"; import ActorSheet5e from "./base.js"; /** @@ -88,7 +88,7 @@ export default class ActorSheet5eNPCNew extends ActorSheet5e { /* -------------------------------------------- */ - /** @override */ + /** @inheritdoc */ getData(options) { const data = super.getData(options); diff --git a/module/actor/sheets/newSheet/vehicle.js b/module/actor/sheets/newSheet/vehicle.js index aea7f402..b5e28a1c 100644 --- a/module/actor/sheets/newSheet/vehicle.js +++ b/module/actor/sheets/newSheet/vehicle.js @@ -222,7 +222,7 @@ export default class ActorSheet5eVehicle extends ActorSheet5e { if ( isCargo ) { totalWeight += (item.data.weight || 0) * item.data.quantity; cargo.cargo.items.push(item); - continue + continue; } // Handle non-cargo item types @@ -371,6 +371,8 @@ export default class ActorSheet5eVehicle extends ActorSheet5e { return super._onItemDelete(event); } + /* -------------------------------------------- */ + /** @override */ async _onDropItemCreate(itemData) { const cargoTypes = ["weapon", "equipment", "consumable", "tool", "loot", "backpack"]; diff --git a/module/actor/sheets/oldSheets/base.js b/module/actor/sheets/oldSheets/base.js index 2fccb001..f0a7a83b 100644 --- a/module/actor/sheets/oldSheets/base.js +++ b/module/actor/sheets/oldSheets/base.js @@ -789,7 +789,7 @@ export default class ActorSheet5e extends ActorSheet { const header = event.currentTarget; const type = header.dataset.type; const itemData = { - name: game.i18n.format("SW5E.ItemNew", {type: type.capitalize()}), + name: game.i18n.format("SW5E.ItemNew", {type: game.i18n.localize(`SW5E.ItemType${type.capitalize()}`)}), type: type, data: foundry.utils.deepClone(header.dataset) }; @@ -820,6 +820,7 @@ export default class ActorSheet5e extends ActorSheet { */ _onItemDelete(event) { event.preventDefault(); + const li = event.currentTarget.closest(".item"); const item = this.actor.items.get(li.dataset.itemId); if ( item ) return item.delete(); } diff --git a/module/actor/sheets/oldSheets/character.js b/module/actor/sheets/oldSheets/character.js index bbd41b8e..dd82ecfe 100644 --- a/module/actor/sheets/oldSheets/character.js +++ b/module/actor/sheets/oldSheets/character.js @@ -101,7 +101,7 @@ export default class ActorSheet5eCharacter extends ActorSheet5e { this._prepareItemToggleState(item); // Primary Class - if ( item.type === "class" ) item.isOriginalClass = ( item.data._id === this.actor.data.data.details.originalClass ); + if ( item.type === "class" ) item.isOriginalClass = ( item._id === this.actor.data.data.details.originalClass ); // Classify items into types if ( item.type === "power" ) arr[1].push(item); diff --git a/module/actor/sheets/oldSheets/npc.js b/module/actor/sheets/oldSheets/npc.js index 12e85b1f..29c81993 100644 --- a/module/actor/sheets/oldSheets/npc.js +++ b/module/actor/sheets/oldSheets/npc.js @@ -1,3 +1,4 @@ +import Actor5e from "../entity.js"; import ActorSheet5e from "./base.js"; /** diff --git a/module/apps/ability-use-dialog.js b/module/apps/ability-use-dialog.js index ca9067d3..4b92b14d 100644 --- a/module/apps/ability-use-dialog.js +++ b/module/apps/ability-use-dialog.js @@ -39,7 +39,7 @@ export default class AbilityUseDialog extends Dialog { // Prepare dialog form data const data = { item: item.data, - title: game.i18n.format("SW5E.AbilityUseHint", item.data), + title: game.i18n.format("SW5E.AbilityUseHint", {type: game.i18n.localize(`SW5E.ItemType${item.type.capitalize()}`), name: item.name}), note: this._getAbilityUseNote(item.data, uses, recharge), consumePowerSlot: false, consumeRecharge: recharges, @@ -59,7 +59,7 @@ export default class AbilityUseDialog extends Dialog { const label = game.i18n.localize("SW5E.AbilityUse" + (data.isPower ? "Cast" : "Use")); return new Promise((resolve) => { const dlg = new this(item, { - title: `${item.name}: Usage Configuration`, + title: `${item.name}: ${game.i18n.localize("SW5E.AbilityUseConfig")}`, content: html, buttons: { use: { @@ -187,7 +187,7 @@ export default class AbilityUseDialog extends Dialog { // Abilities which use Recharge if ( !!recharge.value ) { return game.i18n.format(recharge.charged ? "SW5E.AbilityUseChargedHint" : "SW5E.AbilityUseRechargeHint", { - type: item.type, + type: game.i18n.localize(`SW5E.ItemType${item.type.capitalize()}`), }) } @@ -201,7 +201,7 @@ export default class AbilityUseDialog extends Dialog { else if ( item.data.quantity === 1 && uses.autoDestroy ) str = "SW5E.AbilityUseConsumableDestroyHint"; else if ( item.data.quantity > 1 ) str = "SW5E.AbilityUseConsumableQuantityHint"; return game.i18n.format(str, { - type: item.data.consumableType, + type: game.i18n.localize(`SW5E.Consumable${item.data.consumableType.capitalize()}`), value: uses.value, quantity: item.data.quantity, max: uses.max, @@ -212,7 +212,7 @@ export default class AbilityUseDialog extends Dialog { // Other Items else { return game.i18n.format("SW5E.AbilityUseNormalHint", { - type: item.type, + type: game.i18n.localize(`SW5E.ItemType${item.type.capitalize()}`), value: uses.value, max: uses.max, per: CONFIG.SW5E.limitedUsePeriods[uses.per] diff --git a/module/apps/actor-flags.js b/module/apps/actor-flags.js index d4599996..cb3a816c 100644 --- a/module/apps/actor-flags.js +++ b/module/apps/actor-flags.js @@ -1,6 +1,6 @@ /** * An application class which provides advanced configuration for special character flags which modify an Actor - * @extends {DocumentSheet} + * @implements {DocumentSheet} */ export default class ActorSheetFlags extends DocumentSheet { static get defaultOptions() { diff --git a/module/apps/long-rest.js b/module/apps/long-rest.js index 6287e0f8..3e57cea7 100644 --- a/module/apps/long-rest.js +++ b/module/apps/long-rest.js @@ -40,11 +40,11 @@ export default class LongRestDialog extends Dialog { static async longRestDialog({ actor } = {}) { return new Promise((resolve, reject) => { const dlg = new this(actor, { - title: "Long Rest", + title: game.i18n.localize("SW5E.LongRest"), buttons: { rest: { icon: '', - label: "Rest", + label: game.i18n.localize("SW5E.Rest"), callback: html => { let newDay = true; if (game.settings.get("sw5e", "restVariant") !== "gritty") @@ -54,7 +54,7 @@ export default class LongRestDialog extends Dialog { }, cancel: { icon: '', - label: "Cancel", + label: game.i18n.localize("Cancel"), callback: reject } }, diff --git a/module/apps/senses-config.js b/module/apps/senses-config.js index 69309493..707ca7fb 100644 --- a/module/apps/senses-config.js +++ b/module/apps/senses-config.js @@ -1,5 +1,5 @@ /** - * A simple form to set actor movement speeds + * A simple form to set Actor movement speeds. * @extends {DocumentSheet} */ export default class ActorSensesConfig extends DocumentSheet { diff --git a/module/apps/short-rest.js b/module/apps/short-rest.js index 8a164af7..22a186ab 100644 --- a/module/apps/short-rest.js +++ b/module/apps/short-rest.js @@ -93,11 +93,11 @@ export default class ShortRestDialog extends Dialog { static async shortRestDialog({actor}={}) { return new Promise((resolve, reject) => { const dlg = new this(actor, { - title: "Short Rest", + title: game.i18n.localize("SW5E.ShortRest"), buttons: { rest: { icon: '', - label: "Rest", + label: game.i18n.localize("SW5E.Rest"), callback: html => { let newDay = false; if (game.settings.get("sw5e", "restVariant") === "gritty") @@ -107,7 +107,7 @@ export default class ShortRestDialog extends Dialog { }, cancel: { icon: '', - label: "Cancel", + label: game.i18n.localize("Cancel"), callback: reject } }, diff --git a/module/apps/trait-selector.js b/module/apps/trait-selector.js index 5550aa3e..ef3c82c1 100644 --- a/module/apps/trait-selector.js +++ b/module/apps/trait-selector.js @@ -4,7 +4,7 @@ */ export default class TraitSelector extends DocumentSheet { - /** @inheritDoc */ + /** @inheritdoc */ static get defaultOptions() { return foundry.utils.mergeObject(super.defaultOptions, { id: "trait-selector", diff --git a/module/config.js b/module/config.js index 399fe55a..d68330d7 100644 --- a/module/config.js +++ b/module/config.js @@ -103,6 +103,21 @@ SW5E.weaponProficiencies = { "vbw": "SW5E.WeaponVibrowhipProficiency" }; +/** + * A map of weapon item proficiency to actor item proficiency + * Used when a new player owned item is created + * @type {Object} + */ + SW5E.weaponProficienciesMap = { + "natural": true, + "simpleVW": "sim", + "simpleB": "sim", + "simpleLW": "sim", + "martialVW": "mar", + "martialB": "mar", + "martialLW": "mar" +}; + // TODO: Check to see if this can be used // It's not actually been used anywhere in DND5e 1.3.2 // Note name mapped to ID in compendium @@ -270,8 +285,8 @@ SW5E.abilityActivationTypes = { "hour": SW5E.timePeriods.hour, "day": SW5E.timePeriods.day, "special": SW5E.timePeriods.spec, - "legendary": "SW5E.LegAct", - "lair": "SW5E.LairAct", + "legendary": "SW5E.LegendaryActionLabel", + "lair": "SW5E.LairActionLabel", "crew": "SW5E.VehicleCrewAction" }; @@ -413,6 +428,20 @@ SW5E.armorProficiencies = { "shl": "SW5E.EquipmentShieldProficiency" }; +/** + * A map of armor item proficiency to actor item proficiency + * Used when a new player owned item is created + * @type {Object} + */ + SW5E.armorProficienciesMap = { + "natural": true, + "clothing": true, + "light": "lgt", + "medium": "med", + "heavy": "hvy", + "shield": "shl" +} + /* -------------------------------------------- */ @@ -746,7 +775,7 @@ SW5E.starshipRolesgrg = { /** * The set of possible sensory perception types which an Actor may have - * @type {object} + * @enum {string} */ SW5E.senses = { "blindsight": "SW5E.SenseBlindsight", diff --git a/module/dice.js b/module/dice.js index 7d3c2489..fc70522b 100644 --- a/module/dice.js +++ b/module/dice.js @@ -42,7 +42,14 @@ export function simplifyRollFormula(formula, data, {constantFirst = false} = {}) const rollableFormula = Roll.getFormula(rollableTerms); // Cleans up the non-constant terms and produces a new formula string // Mathematically evaluate the constant formula to produce a single constant term - const constantPart = constantFormula ? Roll.safeEval(constantFormula) : undefined; + let constantPart = undefined; + if ( constantFormula ) { + try { + constantPart = Roll.safeEval(constantFormula) + } catch (err) { + console.warn(`Unable to evaluate constant term ${constantFormula} in simplifyRollFormula`); + } + } // Order the rollable and constant terms, either constant first or second depending on the optional argument const parts = constantFirst ? [constantPart, rollableFormula] : [rollableFormula, constantPart]; diff --git a/module/effects.js b/module/effects.js index 7a70430b..ef66ef77 100644 --- a/module/effects.js +++ b/module/effects.js @@ -11,7 +11,7 @@ export function onManageActiveEffect(event, owner) { switch ( a.dataset.action ) { case "create": return owner.createEmbeddedDocuments("ActiveEffect", [{ - label: "New Effect", + label: game.i18n.localize("SW5E.EffectNew"), icon: "icons/svg/aura.svg", origin: owner.uuid, "duration.rounds": li.dataset.effectType === "temporary" ? 1 : undefined, @@ -37,17 +37,17 @@ export function prepareActiveEffectCategories(effects) { const categories = { temporary: { type: "temporary", - label: "SW5E.EffectsCategoryTemporary", + label: game.i18n.localize("SW5E.EffectTemporary"), effects: [] }, passive: { type: "passive", - label: "SW5E.EffectsCategoryPassive", + label: game.i18n.localize("SW5E.EffectPassive"), effects: [] }, inactive: { type: "inactive", - label: "SW5E.EffectsCategoryInactive", + label: game.i18n.localize("SW5E.EffectInactive"), effects: [] } }; diff --git a/module/item/entity.js b/module/item/entity.js index 02824961..cf6374e5 100644 --- a/module/item/entity.js +++ b/module/item/entity.js @@ -255,7 +255,7 @@ export default class Item5e extends Item { // Range Label let rng = data.range || {}; - if (["none", "touch", "self"].includes(rng.units) || (rng.value === 0)) { + if ( ["none", "touch", "self"].includes(rng.units) ) { rng.value = null; rng.long = null; } @@ -1295,7 +1295,10 @@ export default class Item5e extends Item { const abl = this.abilityMod; if ( abl ) { const ability = rollData.abilities[abl]; - rollData["mod"] = ability.mod || 0; + if ( !ability ) { + console.warn(`Item ${this.name} in Actor ${this.actor.name} has an invalid item ability modifier of ${abl} defined`); + } + rollData["mod"] = ability?.mod || 0; } // Include a proficiency score @@ -1536,14 +1539,7 @@ export default class Item5e extends Item { if ( isNPC ) { updates["data.proficient"] = true; // NPCs automatically have equipment proficiency } else { - const armorProf = { - "natural": true, - "clothing": true, - "light": "lgt", - "medium": "med", - "heavy": "hvy", - "shield": "shl" - }[data.data?.armor?.type]; // Player characters check proficiency + const armorProf = CONFIG.SW5E.armorProficienciesMap[data.data?.armor?.type]; // Player characters check proficiency const actorArmorProfs = actorData.data.traits?.armorProf?.value || []; updates["data.proficient"] = (armorProf === true) || actorArmorProfs.includes(armorProf); } @@ -1579,15 +1575,7 @@ export default class Item5e extends Item { updates["data.proficient"] = true; // NPCs automatically have equipment proficiency } else { // TODO: With the changes to make weapon proficiencies more verbose, this may need revising - const weaponProf = { - "natural": true, - "simpleVW": "sim", - "simpleB": "sim", - "simpleLW": "sim", - "martialVW": "mar", - "martialB": "mar", - "martialLW": "mar" - }[data.data?.weaponType]; // Player characters check proficiency + const weaponProf = CONFIG.SW5E.weaponProficienciesMap[data.data?.weaponType]; // Player characters check proficiency const actorWeaponProfs = actorData.data.traits?.weaponProf?.value || []; updates["data.proficient"] = (weaponProf === true) || actorWeaponProfs.includes(weaponProf); } diff --git a/module/item/sheet.js b/module/item/sheet.js index 556032e7..87d67d7e 100644 --- a/module/item/sheet.js +++ b/module/item/sheet.js @@ -56,7 +56,7 @@ export default class ItemSheet5e extends ItemSheet { // Potential consumption targets data.abilityConsumptionTargets = this._getItemConsumptionTargets(itemData); - // Action Detail + // Action Details data.hasAttackRoll = this.item.hasAttack; data.isHealing = itemData.data.actionType === "heal"; data.isFlatDC = getProperty(itemData, "data.save.scaling") === "flat"; diff --git a/module/migration.js b/module/migration.js index ba772a1b..2867e191 100644 --- a/module/migration.js +++ b/module/migration.js @@ -142,7 +142,7 @@ export const migrateActorData = async function(actor) { const results = await memo; // Migrate the Owned Item - const itemData = i instanceof CONFIG.Item.documentClass ? i.toObject() : i + const itemData = i instanceof CONFIG.Item.documentClass ? i.toObject() : i; let itemUpdate = await migrateActorItemData(itemData, actor); // Prepared, Equipped, and Proficient for NPC actors @@ -154,7 +154,7 @@ export const migrateActorData = async function(actor) { // Update the Owned Item if ( !isObjectEmpty(itemUpdate) ) { - itemUpdate._id = itemData.id; + itemUpdate._id = itemData._id; console.log(`Migrating Actor ${actor.name}'s ${i.name}`); results.push(expandObject(itemUpdate)); } @@ -208,12 +208,15 @@ function cleanActorData(actorData) { /** * Migrate a single Item entity to incorporate latest data model changes - * @param item + * + * @param {object} item Item data to migrate + * @return {object} The updateData to apply */ export const migrateItemData = function(item) { const updateData = {}; _migrateItemClassPowerCasting(item, updateData); _migrateItemAttunement(item, updateData); + _migrateItemPowercasting(item, updateData); return updateData; }; @@ -228,6 +231,7 @@ export const migrateActorItemData = async function(item, actor) { const updateData = {}; _migrateItemClassPowerCasting(item, updateData); _migrateItemAttunement(item, updateData); + _migrateItemPowercasting(item, updateData); await _migrateItemPower(item, actor, updateData); return updateData; }; @@ -464,6 +468,8 @@ function _migrateActorSenses(actor, updateData) { return updateData; } +/* -------------------------------------------- */ + /** * Migrate the actor details.type string to object * @private @@ -643,12 +649,32 @@ async function _migrateItemPower(item, actor, updateData) { * @private */ function _migrateItemAttunement(item, updateData) { - if ( item.data.data.attuned === undefined ) return updateData; + if ( item.data?.attuned === undefined ) return updateData; updateData["data.attunement"] = CONFIG.SW5E.attunementTypes.NONE; updateData["data.-=attuned"] = null; return updateData; } +/* -------------------------------------------- */ + +/** + * Replace class powercasting string to object. + * + * @param {object} item Item data to migrate + * @param {object} updateData Existing update to expand upon + * @return {object} The updateData to apply + * @private + */ + function _migrateItemPowercasting(item, updateData) { + if ( item.type !== "class" || (foundry.utils.getType(item.data.powercasting) === "Object") ) return updateData; + updateData["data.powercasting"] = { + progression: item.data.powercasting, + ability: "" + }; + return updateData; +} + + /* -------------------------------------------- */ /** diff --git a/module/pixi/ability-template.js b/module/pixi/ability-template.js index d72cb886..3af99181 100644 --- a/module/pixi/ability-template.js +++ b/module/pixi/ability-template.js @@ -90,8 +90,7 @@ export default class AbilityTemplate extends MeasuredTemplate { if ( now - moveTime <= 20 ) return; const center = event.data.getLocalPosition(this.layer); const snapped = canvas.grid.getSnappedPosition(center.x, center.y, 2); - this.data.x = snapped.x; - this.data.y = snapped.y; + this.data.update({x: snapped.x, y: snapped.y}); this.refresh(); moveTime = now; }; diff --git a/sw5e.js b/sw5e.js index 3389f0b7..5bef2a6f 100644 --- a/sw5e.js +++ b/sw5e.js @@ -218,7 +218,7 @@ Hooks.once("ready", function() { // Determine whether a system migration is required and feasible if ( !game.user.isGM ) return; const currentVersion = game.settings.get("sw5e", "systemMigrationVersion"); - const NEEDS_MIGRATION_VERSION = "1.3.0.R1-A6"; + const NEEDS_MIGRATION_VERSION = "1.3.5.R1-A6"; // Check for R1 SW5E versions const SW5E_NEEDS_MIGRATION_VERSION = "R1-A6"; const COMPATIBLE_MIGRATION_VERSION = 0.80; diff --git a/system.json b/system.json index ac481ad6..ac8b4dc2 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "name": "sw5e", "title": "SW 5th Edition", "description": "A comprehensive game system for running games of SW 5th Edition in the Foundry VTT environment.", - "version": "1.3.3.R1-A6", + "version": "1.3.5.R1-A6", "author": "Dev Team", "scripts": [], "esmodules": ["sw5e.js"], @@ -151,8 +151,8 @@ "gridUnits": "ft", "primaryTokenAttribute": "attributes.hp", "secondaryTokenAttribute": null, - "minimumCoreVersion": "0.8.3", - "compatibleCoreVersion": "0.8.6", + "minimumCoreVersion": "0.8.2", + "compatibleCoreVersion": "0.8.7", "url": "https://github.com/unrealkakeman89/sw5e", "manifest": "https://raw.githubusercontent.com/unrealkakeman89/sw5e/master/system.json", "download": "https://github.com/unrealkakeman89/sw5e/archive/master.zip" diff --git a/templates/actors/newActor/npc-sheet.html b/templates/actors/newActor/npc-sheet.html index 70552323..463c6d57 100644 --- a/templates/actors/newActor/npc-sheet.html +++ b/templates/actors/newActor/npc-sheet.html @@ -97,13 +97,13 @@ value="{{ability.value}}" data-dtype="Number" placeholder="10" />
{{numberFormat ability.mod decimals=0 sign=true}} + title="{{ localize 'SW5E.Modifier' }}">{{numberFormat ability.mod decimals=0 sign=true}} {{numberFormat ability.save decimals=0 sign=true}} + title="{{ localize 'SW5E.SavingThrow' }}">{{numberFormat ability.save decimals=0 sign=true}}
{{/each}} diff --git a/templates/actors/newActor/parts/swalt-active-effects.html b/templates/actors/newActor/parts/swalt-active-effects.html index d712928d..70be6e1b 100644 --- a/templates/actors/newActor/parts/swalt-active-effects.html +++ b/templates/actors/newActor/parts/swalt-active-effects.html @@ -3,8 +3,8 @@ {{#each effects as |section sid|}}
  • {{localize section.label}}

    -
    Source
    -
    Duration
    +
    {{localize "SW5E.Source"}}
    +
    {{localize "SW5E.Duration"}}
    {{localize "SW5E.Add"}} diff --git a/templates/actors/newActor/parts/swalt-core.html b/templates/actors/newActor/parts/swalt-core.html index 5bdfdaf8..0f8a1dfe 100644 --- a/templates/actors/newActor/parts/swalt-core.html +++ b/templates/actors/newActor/parts/swalt-core.html @@ -10,13 +10,13 @@ value="{{ability.value}}" data-dtype="Number" placeholder="10" />
    {{numberFormat ability.mod decimals=0 sign=true}} + title="{{ localize 'SW5E.Modifier' }}">{{numberFormat ability.mod decimals=0 sign=true}} {{numberFormat ability.save decimals=0 sign=true}} + title="{{ localize 'SW5E.SavingThrow' }}">{{numberFormat ability.save decimals=0 sign=true}}
  • {{/each}} diff --git a/templates/actors/newActor/parts/swalt-crew.html b/templates/actors/newActor/parts/swalt-crew.html index c67e67fe..16c50787 100644 --- a/templates/actors/newActor/parts/swalt-crew.html +++ b/templates/actors/newActor/parts/swalt-crew.html @@ -66,7 +66,7 @@
    - Level {{item.data.levels}}       + {{localize "SW5E.Level"}} {{item.data.levels}}      
    - Level {{item.data.levels}}       + {{localize "SW5E.Level"}} {{item.data.levels}}