Compare commits

...

5 Commits
13.0.2 ... v13

Author SHA1 Message Date
c9d87851bd Merge pull request 'Corrections less/css v13' (#763) from VincentVk/foundryvtt-reve-de-dragon:v13 into v13
All checks were successful
Release Creation / build (release) Successful in 2m17s
Reviewed-on: #763
2025-06-10 20:45:15 +02:00
5b48fda3d0 Correction d'affichages lignes
Correction de plusieurs cas d'affichage en lignes qui étaient formatés
sur plusieurs lignes

- noms dans liste d'objets (et bouton des conteneurs)
- compétences de créatures sur une ligne
- acteur sur une ligne dans l'astrologie
- résultat de recherche
2025-06-10 01:22:25 +02:00
abae85157b Merge pull request 'v13' (#762) from VincentVk/foundryvtt-reve-de-dragon:v13 into v13
Reviewed-on: #762
2025-06-06 20:42:17 +02:00
da2dca1769 Fix: espaces description Grizzal 2025-06-06 00:35:41 +02:00
6e405ea753 Fix: on peut de nouveau acheter aux commerces 2025-06-06 00:34:58 +02:00
10 changed files with 69 additions and 46 deletions

View File

@ -1,5 +1,15 @@
# 13.0 # 13.0
## 13.0.3 - La dernière auberge d'Illysis
- On peut de nouveau acheter aux commerces
- La description des Grizzal a des espaces
- Corrections v13
- Affichage des images et noms d'objets en ligne
- affichage des compétences de créature sur une ligne
- Affichage des informations d'acteur sur une ligne dans l'astrologie
- Affichage des résultat de recherche
## 13.0.0 - Le début de l'errance d'Illysis ## 13.0.0 - Le début de l'errance d'Illysis
- Migration vers la version 13 de Foundry - Migration vers la version 13 de Foundry

View File

@ -721,6 +721,7 @@ select,
margin: 0; margin: 0;
justify-content: center; justify-content: center;
text-align: left; text-align: left;
display: ruby;
} }
.system-foundryvtt-reve-de-dragon .equipement-valeur { .system-foundryvtt-reve-de-dragon .equipement-valeur {
margin: 0; margin: 0;
@ -740,6 +741,8 @@ select,
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
display: flex;
flex-direction: row;
} }
.system-foundryvtt-reve-de-dragon .equipement-button { .system-foundryvtt-reve-de-dragon .equipement-button {
margin: 0; margin: 0;
@ -1291,8 +1294,7 @@ select,
white-space: nowrap; white-space: nowrap;
word-break: break-all; word-break: break-all;
} }
.system-foundryvtt-reve-de-dragon span.content-link, .system-foundryvtt-reve-de-dragon .content-link {
.system-foundryvtt-reve-de-dragon a.content-link {
background: hsla(45, 100%, 80%, 0.2); background: hsla(45, 100%, 80%, 0.2);
color: hsla(300, 70%, 20%, 0.8); color: hsla(300, 70%, 20%, 0.8);
font-weight: 560; font-weight: 560;
@ -1301,6 +1303,7 @@ select,
border-radius: 0.25rem; border-radius: 0.25rem;
white-space: nowrap; white-space: nowrap;
word-break: break-all; word-break: break-all;
display: ruby;
} }
.system-foundryvtt-reve-de-dragon a.roll-text i.fas { .system-foundryvtt-reve-de-dragon a.roll-text i.fas {
color: var(--color-text-dark-inactive); color: var(--color-text-dark-inactive);
@ -1537,6 +1540,8 @@ select,
.system-foundryvtt-reve-de-dragon .list-item-label, .system-foundryvtt-reve-de-dragon .list-item-label,
.system-foundryvtt-reve-de-dragon .list-title-label { .system-foundryvtt-reve-de-dragon .list-title-label {
flex-grow: 2; flex-grow: 2;
display: flex;
flex-direction: row;
} }
.system-foundryvtt-reve-de-dragon .attribut-value, .system-foundryvtt-reve-de-dragon .attribut-value,
.system-foundryvtt-reve-de-dragon .carac-value { .system-foundryvtt-reve-de-dragon .carac-value {
@ -1588,9 +1593,13 @@ select,
.system-foundryvtt-reve-de-dragon table.table-nombres-astraux th > td { .system-foundryvtt-reve-de-dragon table.table-nombres-astraux th > td {
font-size: 1rem; font-size: 1rem;
} }
.system-foundryvtt-reve-de-dragon table.table-nombres-astraux tr > td { .system-foundryvtt-reve-de-dragon table.table-nombres-astraux tr td {
font-size: 0.8rem; font-size: 0.8rem;
} }
.system-foundryvtt-reve-de-dragon table.table-nombres-astraux tr td.info-acteur {
flex-direction: row;
display: flex;
}
.system-foundryvtt-reve-de-dragon table.table-nombres-astraux :is(tr, th, td) { .system-foundryvtt-reve-de-dragon table.table-nombres-astraux :is(tr, th, td) {
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;

View File

@ -356,6 +356,7 @@
margin: 0; margin: 0;
justify-content: center; justify-content: center;
text-align: left; text-align: left;
display: ruby;
} }
.equipement-valeur { .equipement-valeur {
margin: 0; margin: 0;
@ -375,6 +376,8 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center; text-align: center;
display: flex;
flex-direction: row;
} }
.equipement-button { .equipement-button {
margin: 0; margin: 0;
@ -962,8 +965,7 @@
word-break: break-all; word-break: break-all;
} }
span.content-link, .content-link {
a.content-link {
background: hsla(45, 100%, 80%, 0.2); background: hsla(45, 100%, 80%, 0.2);
color: hsla(300, 70%, 20%, 0.8); color: hsla(300, 70%, 20%, 0.8);
font-weight: 560; font-weight: 560;
@ -972,6 +974,7 @@
border-radius: 0.25rem; border-radius: 0.25rem;
white-space: nowrap; white-space: nowrap;
word-break: break-all; word-break: break-all;
display: ruby;
} }
a.roll-text i.fas{ a.roll-text i.fas{
color: var(--color-text-dark-inactive); color: var(--color-text-dark-inactive);
@ -1222,6 +1225,8 @@
.list-item-label, .list-item-label,
.list-title-label { .list-title-label {
flex-grow: 2; flex-grow: 2;
display: flex;
flex-direction: row;
} }
.attribut-value, .attribut-value,
.carac-value { .carac-value {
@ -1275,9 +1280,13 @@
table.table-nombres-astraux th >td { table.table-nombres-astraux th >td {
font-size: 1rem; font-size: 1rem;
} }
table.table-nombres-astraux tr >td { table.table-nombres-astraux tr td {
font-size: 0.8rem; font-size: 0.8rem;
} }
table.table-nombres-astraux tr td.info-acteur {
flex-direction: row;
display: flex;
}
table.table-nombres-astraux :is(tr, th, td) { table.table-nombres-astraux :is(tr, th, td) {
border-style: solid; border-style: solid;
border-width: 1px; border-width: 1px;

View File

@ -1,6 +1,4 @@
import { DialogItemAchat } from "../achat-vente/dialog-item-achat.js";
import { RdDItem } from "../item.js"; import { RdDItem } from "../item.js";
import { RdDUtility } from "../rdd-utility.js";
import { RdDBaseActorSheet } from "./base-actor-sheet.js"; import { RdDBaseActorSheet } from "./base-actor-sheet.js";
/** /**
@ -44,13 +42,8 @@ export class RdDCommerceSheet extends RdDBaseActorSheet {
activateListeners(html) { activateListeners(html) {
super.activateListeners(html); super.activateListeners(html);
this.html.find('a.item-acheter').click(async event => await this.vente(this.getItem(event)));
this.html.find('.service-acheter').click(async event => await this.vente(this.getItem(event)));
if (!this.options.editable) return; if (!this.options.editable) return;
this.html.find('a.item-quantite-moins').click(async event => await this.getItem(event)?.quantiteIncDec(-1, { supprimerSiZero: false }));
this.html.find('a.item-quantite-plus').click(async event => await this.getItem(event)?.quantiteIncDec(1));
this.html.find('input.item-quantite').change(async event => { this.html.find('input.item-quantite').change(async event => {
const newQuantite = Math.max(0, Number.parseInt(this.html.find(event.currentTarget).val())); const newQuantite = Math.max(0, Number.parseInt(this.html.find(event.currentTarget).val()));
await this.getItem(event)?.update({ "system.quantite": newQuantite }); await this.getItem(event)?.update({ "system.quantite": newQuantite });
@ -64,28 +57,4 @@ export class RdDCommerceSheet extends RdDBaseActorSheet {
getTypesInventaire() { getTypesInventaire() {
return RdDItem.getItemTypesInventaire('all'); return RdDItem.getItemTypesInventaire('all');
} }
async vente(item) {
const acheteur = RdDUtility.getSelectedActor();
if (!acheteur) {
ui.notifications.warn(`Pas d'acheteur sélectionné`);
return;
}
const disponible = this.actor.getQuantiteDisponible(item)
if (disponible == 0) {
ui.notifications.warn(`${this.getAlias()} n'a plus de ${item.name} en vente`);
return;
}
await DialogItemAchat.onAcheter({
item,
vendeur: this.actor,
acheteur,
quantiteIllimite: disponible == undefined,
nbLots: disponible ?? 1,
tailleLot: 1,
prixLot: item.calculerPrixCommercant()
});
}
} }

View File

@ -1,4 +1,6 @@
import { DialogItemAchat } from "../achat-vente/dialog-item-achat.js";
import { Misc } from "../misc.js"; import { Misc } from "../misc.js";
import { RdDUtility } from "../rdd-utility.js";
import { RdDBaseActor } from "./base-actor.js"; import { RdDBaseActor } from "./base-actor.js";
export class RdDCommerce extends RdDBaseActor { export class RdDCommerce extends RdDBaseActor {
@ -37,4 +39,27 @@ export class RdDCommerce extends RdDBaseActor {
const pourcentage = this.system.pourcentage ?? 100; const pourcentage = this.system.pourcentage ?? 100;
return Misc.keepDecimals(Math.ceil(item.system.cout * pourcentage) / 100, 2); return Misc.keepDecimals(Math.ceil(item.system.cout * pourcentage) / 100, 2);
} }
async vente(item) {
const acheteur = RdDUtility.getSelectedActor();
if (!acheteur) {
ui.notifications.warn(`Pas d'acheteur sélectionné`);
return;
}
const disponible = this.getQuantiteDisponible(item)
if (disponible == 0) {
ui.notifications.warn(`${this.getAlias()} n'a plus de ${item.name} en vente`);
return;
}
await DialogItemAchat.onAcheter({
item,
vendeur: this,
acheteur,
quantiteIllimite: disponible == undefined,
nbLots: disponible ?? 1,
tailleLot: 1,
prixLot: item.calculerPrixCommercant()
});
}
} }

View File

@ -1,3 +1,4 @@
import { ACTOR_TYPES } from "../constants.js"
import { Misc } from "../misc.js" import { Misc } from "../misc.js"
import { RdDSheetUtility } from "../rdd-sheet-utility.js" import { RdDSheetUtility } from "../rdd-sheet-utility.js"
import { RdDUtility } from "../rdd-utility.js" import { RdDUtility } from "../rdd-utility.js"
@ -19,9 +20,8 @@ const _VENDRE = {
} }
const _ACHAT_SERVICE = { const _ACHAT_SERVICE = {
code: 'item-service-acheter', label: 'Acheter', icon: it => 'fa-regular fa-coins', code: 'item-service-acheter', label: 'Acheter', icon: it => 'fa-regular fa-coins',
//filter: it => Misc.toInt(it.system.quantite) > 0, filter: it => Misc.toInt(it.system.quantite) > 0 && it.parent?.type == ACTOR_TYPES.commerce,
//optionsFilter: options => options.editable, action: (item, actor) => actor.vente(item)
//action: (item, actor) => item.proposerVente()
} }
const _MONTRER = { const _MONTRER = {
code: 'item-montrer', label: 'Montrer', icon: it => 'fa-solid fa-comment', code: 'item-montrer', label: 'Montrer', icon: it => 'fa-solid fa-comment',

View File

@ -3,8 +3,8 @@ type: faune
img: systems/foundryvtt-reve-de-dragon/icons/faune/ours.webp img: systems/foundryvtt-reve-de-dragon/icons/faune/ours.webp
system: system:
description: >- description: >-
<p>Ours. For&ecirc;t, montagne, 300 kg, 600 sust.Surtout recherch&eacute; <p>Ours. For&ecirc;t, montagne, 300 kg, 600 sust. Surtout recherch&eacute;
pour sa peau (voir legrizzal, p405).</p> pour sa peau (voir le grizzal, p405).</p>
descriptionmj: '' descriptionmj: ''
encombrement: 150 encombrement: 150
quantite: 1 quantite: 1

View File

@ -1,7 +1,7 @@
{{#unless item.system.isHidden}} {{#unless item.system.isHidden}}
{{#if (ne item.type 'monnaie')}} {{#if (ne item.type 'monnaie')}}
<li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true"> <li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true">
<span class="equipement-nom {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} "> <span class="equipement-nom{{#if (eq item.type 'conteneur')}} conteneur-name{{/if}} ">
<a{{#if (and (ne item.type 'conteneur') options.isObserver)}} class="item-edit"{{/if}} > <a{{#if (and (ne item.type 'conteneur') options.isObserver)}} class="item-edit"{{/if}} >
{{#if (eq item.type 'conteneur')}} {{#if (eq item.type 'conteneur')}}
<i class="{{~#if vide}}far fa-square <i class="{{~#if vide}}far fa-square

View File

@ -1,7 +1,7 @@
{{#unless item.system.isHidden}} {{#unless item.system.isHidden}}
{{#if (or options.isObserver (ne item.type 'monnaie'))}} {{#if (or options.isObserver (ne item.type 'monnaie'))}}
<li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true" data-tooltip="{{#if (gt item.system.quantite 1)}}{{item.system.quantite}} {{/if}}{{item.name}}"> <li class="item flexrow list-item" data-item-id="{{item._id}}" draggable="true" data-tooltip="{{#if (gt item.system.quantite 1)}}{{item.system.quantite}} {{/if}}{{item.name}}">
<span class="equipement-nom flexrow {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} "> <span class="equipement-nom {{#if (eq item.type 'conteneur')}}conteneur-name{{/if}} ">
{{#if (eq item.type 'conteneur')}} {{#if (eq item.type 'conteneur')}}
<a> <a>
<i class="{{~#if vide}}far fa-square <i class="{{~#if vide}}far fa-square

View File

@ -36,9 +36,10 @@
</tr> </tr>
{{#each gmAstrologie.ajustementsActors as |ajustementActeur|}} {{#each gmAstrologie.ajustementsActors as |ajustementActeur|}}
<tr class="heure-naissance" data-heure-naissance="{{actor.system.heure}}"> <tr class="heure-naissance" data-heure-naissance="{{actor.system.heure}}">
<td> <td class="info-acteur">
<img class="img-signe-heure" src="{{actor.img}}" data-tooltip="{{actor.name}}" /> <img class="img-signe-heure" src="{{actor.img}}" data-tooltip="{{actor.name}}" />
{{actor.name}} {{timestamp-imgSigneHeure actor.system.heure}} <span>{{actor.name}}</span>
{{timestamp-imgSigneHeure actor.system.heure}}
</td> </td>
{{#each ajustementActeur.ajustements as |ajustement|}} {{#each ajustementActeur.ajustements as |ajustement|}}
<td>{{#if (ne ajustement.ajustement 0)}} <td>{{#if (ne ajustement.ajustement 0)}}