Skip to content

Commit

Permalink
Merge pull request #332 from Rayji96/dev
Browse files Browse the repository at this point in the history
Dev -> Main Merge for 4.3.2 Stable Release
  • Loading branch information
Rayji96 authored Jun 5, 2024
2 parents 6710922 + 71c361e commit 1480177
Show file tree
Hide file tree
Showing 19 changed files with 76 additions and 72 deletions.
2 changes: 1 addition & 1 deletion css/parts/tray.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
flex: 0;
padding: 5px;
margin: 3px;
background: url("/systems/vtm5e/assets/images/background-green-marble.webp"), #153b23;
background: url("systems/vtm5e/assets/images/background-green-marble.webp"), #153b23;
background-size: cover;
border: 2px solid #1e5e35;
border-radius: 5px 5px 0 0;
Expand Down
2 changes: 1 addition & 1 deletion css/wod5e.css
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ h3.item-name.chat-portrait-text-size-name-generic {
}

.dice-tray {
background: url("/systems/vtm5e/assets/images/background-black-marble.jpg"), #000;
background: url("systems/vtm5e/assets/images/background-black-marble.jpg"), #000;
border: 2px solid #000;
}

Expand Down
34 changes: 17 additions & 17 deletions lang/fr/core-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,28 +44,28 @@
},

"Bonus": {
"_NewSpecialty": "",
"_AddNewSpecialty": "",
"_NewBonus": "",
"_AddNewBonus": "",
"_Active": "",
"_ActiveWhen": "",
"_Always": "",
"_Never": "",
"_IfEquals": "",
"NewSpecialty": "Nouvelle spécialité",
"AddNewSpecialty": "Ajouter nouvelle spécialité",
"NewBonus": "Nouveau bonus",
"AddNewBonus": "Ajouter nouveau bonus",
"Active": "Actif",
"ActiveWhen": "Activé quand",
"Always": "Toujours",
"Never": "Jamais",
"IfEquals": "Seulement si",
"_Path": "",
"_PathsSeparatedBySemicolons": "",
"_DisplayWhenInactive": "",
"_Unless": "",
"DisplayWhenInactive": "Montrer quand inactif",
"Unless": "Minimum",
"_PathToCheck": "",
"_ValueToCheck": ""
"ValueToCheck": "Valeur vérifiée"
},

"SPC": {
"Label": "Personnage d'histoire",
"Label": "Antagoniste",
"GeneralDifficulty": "Difficulté générale",
"StandardDicePools": "Piscines de dés standard",
"ExceptionalDicePools": "Piscines de dés exceptionnelles",
"StandardDicePools": "Groupement de dés standard",
"ExceptionalDicePools": "Groupement de dés exceptionnelles",
"Physical": "Physique",
"Mental": "Mental",
"Social": "Social",
Expand All @@ -81,7 +81,7 @@
},

"Tabs": {
"_Members": "",
"Members": "Membres",
"Stats": "Stats",
"Features": "Atouts",
"Description": "Description",
Expand Down Expand Up @@ -184,7 +184,7 @@
"RollingWillpower": "Jet de Volonté",
"Rolling": "Jet",
"RollWillpower": "Test la volonté",
"WillpowerReroll": "Relance du test de Volonté",
"WillpowerReroll": "Relance de la Volonté",
"WillpowerFullTitle": "Compteur de volonté au max",
"WillpowerFull": "La volonté est entièrement endommagée, impossible de l'endommager davantage.",
"WillpowerDamage": "Dégâts de volonté",
Expand Down
16 changes: 8 additions & 8 deletions lang/fr/vampire-fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
"Clan": "Clan",
"Generation": "Génération",

"_Chasse": "",
"_Lien": "",
"_Portillon": "",
"_HuntingDifficulty": "",
"Chasse": "Viandis",
"Lien": "Servage",
"Portillon": "Rempart",
"HuntingDifficulty": "Difficulté de la chasse",

"VampireDice": "Dé de Vampire",
"HungerDice": "Dé de Soif",
"Humanity": "Humanité",
"Predator": "Prédateur",
"Predator": "Prédation",
"Hunger": "Soif",
"HungerFull1": "Soif au max",
"HungerFull2": "Déjà à la soif maximale, impossible de l'endommager davantage.",
Expand Down Expand Up @@ -85,9 +85,9 @@
"Sire": "Sire",
"ClanBane": "Fléau de clan",
"Amalgam": "Amalgame",
"RollRouse": "Test la Exaltation",
"RollFrenzy": "Test à la frénésie",
"RollRemorse": "Test à la Remords",
"RollRouse": "Test d'Exaltation",
"RollFrenzy": "Test de frénésie",
"RollRemorse": "Test de Remords",
"MessyCritical": "Triomphe Brutal",
"BestialFailure": "Échec Bestial",
"PossibleBestialFailure": "Potentiel Échec Bestial",
Expand Down
4 changes: 2 additions & 2 deletions module/actor/hunter-actor-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ export class HunterActorSheet extends WoDActor {
if (header.dataset.edge) {
// Get the image for the item, if one is available from the item definitions
const itemFromList = WOD5E.ItemTypes.getList().find(obj => 'perk' in obj)
const img = itemFromList.perk.img ? itemFromList.perk.img : '/systems/vtm5e/assets/icons/items/item-default.svg'
const img = itemFromList.perk.img ? itemFromList.perk.img : 'systems/vtm5e/assets/icons/items/item-default.svg'

// Prepare the item object.
const itemData = {
Expand Down Expand Up @@ -231,7 +231,7 @@ export class HunterActorSheet extends WoDActor {

// Get the image for the item, if one is available from the item definitions
const itemFromList = WOD5E.ItemTypes.getList().find(obj => 'perk' in obj)
const img = itemFromList.perk.img ? itemFromList.perk.img : '/systems/vtm5e/assets/icons/items/item-default.svg'
const img = itemFromList.perk.img ? itemFromList.perk.img : 'systems/vtm5e/assets/icons/items/item-default.svg'

// Prepare the item object.
const itemData = {
Expand Down
6 changes: 3 additions & 3 deletions module/actor/werewolf-actor-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export class WerewolfActorSheet extends WoDActor {
if (header.dataset.gift) {
// Get the image for the item, if one is available from the item definitions
const itemFromList = WOD5E.ItemTypes.getList().find(obj => 'gift' in obj)
const img = itemFromList.gift.img ? itemFromList.gift.img : '/systems/vtm5e/assets/icons/items/item-default.svg'
const img = itemFromList.gift.img ? itemFromList.gift.img : 'systems/vtm5e/assets/icons/items/item-default.svg'

// Prepare the item object.
const itemData = {
Expand Down Expand Up @@ -301,7 +301,7 @@ export class WerewolfActorSheet extends WoDActor {

// Get the image for the item, if one is available from the item definitions
const itemFromList = WOD5E.ItemTypes.getList().find(obj => 'gift' in obj)
const img = itemFromList.gift.img ? itemFromList.gift.img : '/systems/vtm5e/assets/icons/items/item-default.svg'
const img = itemFromList.gift.img ? itemFromList.gift.img : 'systems/vtm5e/assets/icons/items/item-default.svg'

// Prepare the item object.
const itemData = {
Expand Down Expand Up @@ -351,7 +351,7 @@ export class WerewolfActorSheet extends WoDActor {

// Get the image for the item, if one is available from the item definitions
const itemFromList = WOD5E.ItemTypes.getList().find(obj => 'gift' in obj)
const img = itemFromList.gift.img ? itemFromList.gift.img : '/systems/vtm5e/assets/icons/items/item-default.svg'
const img = itemFromList.gift.img ? itemFromList.gift.img : 'systems/vtm5e/assets/icons/items/item-default.svg'

// Prepare the item object.
const itemData = {
Expand Down
2 changes: 1 addition & 1 deletion module/actor/wod-v5-sheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ export class WoDActor extends ActorSheet {

// Get the image for the item, if one is available from the item definitions
const itemFromList = WOD5E.ItemTypes.getList().find(obj => type in obj)
const img = itemFromList[type].img ? itemFromList[type].img : '/systems/vtm5e/assets/icons/items/item-default.svg'
const img = itemFromList[type].img ? itemFromList[type].img : 'systems/vtm5e/assets/icons/items/item-default.svg'

// Initialize a default name.
const name = await WOD5E.api.generateLabelAndLocalize({ string: prelocalizeString })
Expand Down
5 changes: 3 additions & 2 deletions module/api/wod5e-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,8 @@ export class wod5eAPI {
renown,
attributesList,
skillsList,
hungerValue: system === 'vampire' ? actor.system.hunger.value : 0
hungerValue: system === 'vampire' && actor.type !== 'ghoul' && actor.type !== 'spc' ? actor.system.hunger.value : 0,
actorType: actor.type
}
// Render the template
const content = await renderTemplate(dialogTemplate, dialogData)
Expand Down Expand Up @@ -300,7 +301,7 @@ export class wod5eAPI {
// Define the actor's gamesystem, defaulting to "mortal" if it's not in the systems list
const system = WOD5E.Systems.getList().find(obj => actor.system.gamesystem in obj) ? actor.system.gamesystem : 'mortal'

if (system === 'vampire' && actor.type !== 'ghoul') {
if (system === 'vampire' && actor.type !== 'ghoul' && actor.type !== 'spc') {
// Define actor's hunger dice, ensuring it can't go below 0
const hungerDice = Math.max(actorData.hunger.value, 0)

Expand Down
12 changes: 6 additions & 6 deletions module/def/itemtypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@ export class ItemTypes {

static feature = {
label: 'WOD5E.Items.Feature',
img: '/systems/vtm5e/assets/icons/items/feature.svg'
img: 'systems/vtm5e/assets/icons/items/feature.svg'
}

static power = {
label: 'WOD5E.VTM.Discipline',
img: '/systems/vtm5e/assets/icons/items/discipline.png'
img: 'systems/vtm5e/assets/icons/items/discipline.png'
}

static boon = {
label: 'WOD5E.Items.Boon',
img: '/systems/vtm5e/assets/icons/items/boon.svg'
img: 'systems/vtm5e/assets/icons/items/boon.svg'
}

static customRoll = {
label: 'WOD5E.Items.CustomRoll',
img: '/systems/vtm5e/assets/icons/items/custom-roll.png'
img: 'systems/vtm5e/assets/icons/items/custom-roll.png'
}

static perk = {
label: 'WOD5E.HTR.Edge',
img: '/systems/vtm5e/assets/icons/items/edge.png'
img: 'systems/vtm5e/assets/icons/items/edge.png'
}

static gift = {
label: 'WOD5E.WTA.Gift',
img: '/systems/vtm5e/assets/icons/items/gift.png'
img: 'systems/vtm5e/assets/icons/items/gift.png'
}
}

Expand Down
8 changes: 4 additions & 4 deletions module/dice/icons.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Static locations of various sets of icons
const mortalDiceLocation = '/systems/vtm5e/assets/icons/dice/mortal/'
const vampireDiceLocation = '/systems/vtm5e/assets/icons/dice/vampire/'
const werewolfDiceLocation = '/systems/vtm5e/assets/icons/dice/werewolf/'
const hunterDiceLocation = '/systems/vtm5e/assets/icons/dice/hunter/'
const mortalDiceLocation = 'systems/vtm5e/assets/icons/dice/mortal/'
const vampireDiceLocation = 'systems/vtm5e/assets/icons/dice/vampire/'
const werewolfDiceLocation = 'systems/vtm5e/assets/icons/dice/werewolf/'
const hunterDiceLocation = 'systems/vtm5e/assets/icons/dice/hunter/'

// Baseline dice variables and icon filenames
const normalDiceFaces = {
Expand Down
2 changes: 1 addition & 1 deletion module/item/item.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class ItemInfo extends Item {
if (!data.name) data.name = game.i18n.format('DOCUMENT.New', { type: itemTypes[data.type] })
// Generate a default image depending on the item type
const itemFromList = WOD5E.ItemTypes.getList().find(obj => data.type in obj)
data.img = itemFromList[data.type].img ? itemFromList[data.type].img : '/systems/vtm5e/assets/icons/items/item-default.svg'
data.img = itemFromList[data.type].img ? itemFromList[data.type].img : 'systems/vtm5e/assets/icons/items/item-default.svg'
// If folder isn't given, delete the field
if (!data.folder) delete data.folder
// Choose the default item type if there's only one
Expand Down
4 changes: 2 additions & 2 deletions module/scripts/migration/migrate-item-images.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export const MigrateItemImages = async function () {

for (const item of actorItems) {
// Check if there are any instances of /systems/vtm5e/assets/icons/powers/ in the actor data
if (countInstances(item.img, '/systems/vtm5e/assets/icons/powers/') > 0) {
if (countInstances(item.img, 'systems/vtm5e/assets/icons/powers/') > 0) {
hasFixedItems = true

// Create a new object with the updated 'img' property
const updatedItem = {
_id: item._id, // Preserve the original _id
...item.toObject(),
img: item.img.replace(/\/systems\/vtm5e\/assets\/icons\/powers\//, '/systems/vtm5e/assets/icons/items/')
img: item.img.replace(/\/systems\/vtm5e\/assets\/icons\/powers\//, 'systems/vtm5e/assets/icons/items/')
}

// Push the updated item to the array
Expand Down
8 changes: 4 additions & 4 deletions system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"id": "vtm5e",
"title": "World of Darkness 5e",
"description": "World of Darkness 5e system for Foundry VTT",
"version": "4.3.0",
"version": "4.3.2",
"compatibility": {
"minimum": "11",
"verified": "12.324",
"verified": "12.325",
"maximum": ""
},
"authors": [
Expand Down Expand Up @@ -291,8 +291,8 @@
"url": "https://github.com/Rayji96/foundry-V5",
"bugs": "https://github.com/Rayji96/foundry-V5/issues",
"background": "systems/vtm5e/assets/images/wodcity.jpg",
"manifest": "https://github.com/Rayji96/foundry-V5/releases/download/4.3.0/system.json",
"download": "https://github.com/Rayji96/foundry-V5/releases/download/4.3.0/vtm5e-4.3.0.zip",
"manifest": "https://github.com/Rayji96/foundry-V5/releases/download/4.3.2/system.json",
"download": "https://github.com/Rayji96/foundry-V5/releases/download/4.3.2/vtm5e-4.3.2.zip",
"flags": {
"hotReload": {
"extensions": ["css", "hbs", "json"],
Expand Down
6 changes: 3 additions & 3 deletions templates/ui/hunter-roll-dialog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{#unless disableBasicDice}}
<div class="basic-dice">
<div class="dice-input">
<img width="50" height="50" src="/systems/vtm5e/assets/icons/dialog/hunter-dice.png"/>
<img width="50" height="50" src="systems/vtm5e/assets/icons/dialog/hunter-dice.png"/>
<div class="flexrow">
<i class="fas fa-minus dialog-control dialog-minus" data-resource="inputBasicDice" data-action="minus"></i>
<input type="text" id="inputBasicDice" value="{{basicDice}}">
Expand All @@ -23,7 +23,7 @@
{{#unless disableAdvancedDice}}
<div class="advanced-dice">
<div class="dice-input">
<img width="50" height="50" src="/systems/vtm5e/assets/icons/dialog/desperation-dice.png"/>
<img width="50" height="50" src="systems/vtm5e/assets/icons/dialog/desperation-dice.png"/>
<div class="flexrow">
<i class="fas fa-minus dialog-control dialog-minus" data-resource="inputAdvancedDice" data-action="minus"></i>
<input type="text" id="inputAdvancedDice" value="{{advancedDice}}">
Expand All @@ -34,4 +34,4 @@
{{/unless}}
</div>
{{> "systems/vtm5e/templates/ui/parts/roll-dialog-base.hbs"}}
</form>
</form>
4 changes: 2 additions & 2 deletions templates/ui/mortal-roll-dialog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div class="base-dice-group flex-group-center">
<div class="basic-dice">
<div class="dice-input">
<img width="50" height="50" src="/systems/vtm5e/assets/icons/dialog/mortal-dice.png"/>
<img width="50" height="50" src="systems/vtm5e/assets/icons/dialog/mortal-dice.png"/>
<div class="flexrow">
<i class="fas fa-minus dialog-control dialog-minus" data-resource="inputBasicDice" data-action="minus"></i>
<input type="text" id="inputBasicDice" value="{{basicDice}}">
Expand All @@ -15,4 +15,4 @@
</div>
</div>
{{> "systems/vtm5e/templates/ui/parts/roll-dialog-base.hbs"}}
</form>
</form>
17 changes: 10 additions & 7 deletions templates/ui/select-dice-dialog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,16 @@
</div>
{{/if}}

{{#ifnoteq hungerValue 5}}
<div class="secondary-selector">
<div class="selector-title">{{localize "WOD5E.VTM.BloodSurge"}}</div>
<div class="flexrow flex-center">
<input id="bloodSurge" type="checkbox"/>
</div>
</div>
<!-- If the actor isn't a ghoul and isn't at max hunger, show blood surge option -->
{{#ifnoteq actorType 'ghoul'}}
{{#ifnoteq hungerValue 5}}
<div class="secondary-selector">
<div class="selector-title">{{localize "WOD5E.VTM.BloodSurge"}}</div>
<div class="flexrow flex-center">
<input id="bloodSurge" type="checkbox"/>
</div>
</div>
{{/ifnoteq}}
{{/ifnoteq}}
</div>
{{/ifeq}}
Expand Down
4 changes: 2 additions & 2 deletions templates/ui/tray.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
{{/if}}
</div>
<button class="dice-tray-button roll-button" title="{{localize 'WOD5E.Roll.Label'}}">
<img class="roll-image" alt="{{localize 'WOD5E.Roll.Label'}}" src="/systems/vtm5e/assets/images/dice.svg" />
<img class="roll-image" alt="{{localize 'WOD5E.Roll.Label'}}" src="systems/vtm5e/assets/images/dice.svg" />
</button>
{{text value=pool1Selection}}
<div class="dice-tray-pool-filters flexrow pool1-filters">
Expand Down Expand Up @@ -76,4 +76,4 @@
{{localize 'WOD5E.VTM.Remorse'}}
</button>
</div>
</section>
</section>
6 changes: 3 additions & 3 deletions templates/ui/vampire-roll-dialog.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
{{#unless disableBasicDice}}
<div class="basic-dice">
<div class="dice-input">
<img width="50" height="50" src="/systems/vtm5e/assets/icons/dialog/vampire-dice.png"/>
<img width="50" height="50" src="systems/vtm5e/assets/icons/dialog/vampire-dice.png"/>
<div class="flexrow">
<i class="fas fa-minus dialog-control dialog-minus" data-resource="inputBasicDice" data-action="minus"></i>
<input type="text" id="inputBasicDice" value="{{basicDice}}">
Expand All @@ -23,7 +23,7 @@
{{#unless disableAdvancedDice}}
<div class="advanced-dice">
<div class="dice-input">
<img width="50" height="50" src="/systems/vtm5e/assets/icons/dialog/hunger-dice.png"/>
<img width="50" height="50" src="systems/vtm5e/assets/icons/dialog/hunger-dice.png"/>
<div class="flexrow">
<i class="fas fa-minus dialog-control dialog-minus" data-resource="inputAdvancedDice" data-action="minus"></i>
<input type="text" id="inputAdvancedDice" value="{{advancedDice}}">
Expand All @@ -34,4 +34,4 @@
{{/unless}}
</div>
{{> "systems/vtm5e/templates/ui/parts/roll-dialog-base.hbs"}}
</form>
</form>
Loading

0 comments on commit 1480177

Please sign in to comment.