Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
c9d87851bd | |||
5b48fda3d0 | |||
abae85157b | |||
da2dca1769 | |||
6e405ea753 | |||
a96f4bf641 |
@ -64,13 +64,13 @@ jobs:
|
||||
system.json
|
||||
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
|
||||
|
||||
#- name: Publish to Foundry server
|
||||
# uses: djlechuck/foundryvtt-publish-package-action@v1
|
||||
# with:
|
||||
# token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
|
||||
# id: 'foundryvtt-reve-de-dragon'
|
||||
# version: ${{github.event.release.tag_name}}
|
||||
# manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
|
||||
# notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v13/changelog.md'
|
||||
# compatibility-minimum: '13'
|
||||
# compatibility-verified: '13'
|
||||
- name: Publish to Foundry server
|
||||
uses: djlechuck/foundryvtt-publish-package-action@v1
|
||||
with:
|
||||
token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
|
||||
id: 'foundryvtt-reve-de-dragon'
|
||||
version: ${{github.event.release.tag_name}}
|
||||
manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
|
||||
notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v13/changelog.md'
|
||||
compatibility-minimum: '13'
|
||||
compatibility-verified: '13'
|
10
changelog.md
10
changelog.md
@ -1,5 +1,15 @@
|
||||
# 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
|
||||
|
||||
- Migration vers la version 13 de Foundry
|
||||
|
@ -721,6 +721,7 @@ select,
|
||||
margin: 0;
|
||||
justify-content: center;
|
||||
text-align: left;
|
||||
display: ruby;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .equipement-valeur {
|
||||
margin: 0;
|
||||
@ -740,6 +741,8 @@ select,
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .equipement-button {
|
||||
margin: 0;
|
||||
@ -1291,8 +1294,7 @@ select,
|
||||
white-space: nowrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon span.content-link,
|
||||
.system-foundryvtt-reve-de-dragon a.content-link {
|
||||
.system-foundryvtt-reve-de-dragon .content-link {
|
||||
background: hsla(45, 100%, 80%, 0.2);
|
||||
color: hsla(300, 70%, 20%, 0.8);
|
||||
font-weight: 560;
|
||||
@ -1301,6 +1303,7 @@ select,
|
||||
border-radius: 0.25rem;
|
||||
white-space: nowrap;
|
||||
word-break: break-all;
|
||||
display: ruby;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon a.roll-text i.fas {
|
||||
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-title-label {
|
||||
flex-grow: 2;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.system-foundryvtt-reve-de-dragon .attribut-value,
|
||||
.system-foundryvtt-reve-de-dragon .carac-value {
|
||||
@ -1588,9 +1593,13 @@ select,
|
||||
.system-foundryvtt-reve-de-dragon table.table-nombres-astraux th > td {
|
||||
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;
|
||||
}
|
||||
.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) {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
|
@ -356,6 +356,7 @@
|
||||
margin: 0;
|
||||
justify-content: center;
|
||||
text-align: left;
|
||||
display: ruby;
|
||||
}
|
||||
.equipement-valeur {
|
||||
margin: 0;
|
||||
@ -375,6 +376,8 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.equipement-button {
|
||||
margin: 0;
|
||||
@ -962,8 +965,7 @@
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
span.content-link,
|
||||
a.content-link {
|
||||
.content-link {
|
||||
background: hsla(45, 100%, 80%, 0.2);
|
||||
color: hsla(300, 70%, 20%, 0.8);
|
||||
font-weight: 560;
|
||||
@ -972,6 +974,7 @@
|
||||
border-radius: 0.25rem;
|
||||
white-space: nowrap;
|
||||
word-break: break-all;
|
||||
display: ruby;
|
||||
}
|
||||
a.roll-text i.fas{
|
||||
color: var(--color-text-dark-inactive);
|
||||
@ -1222,6 +1225,8 @@
|
||||
.list-item-label,
|
||||
.list-title-label {
|
||||
flex-grow: 2;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
.attribut-value,
|
||||
.carac-value {
|
||||
@ -1275,9 +1280,13 @@
|
||||
table.table-nombres-astraux th >td {
|
||||
font-size: 1rem;
|
||||
}
|
||||
table.table-nombres-astraux tr >td {
|
||||
table.table-nombres-astraux tr td {
|
||||
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) {
|
||||
border-style: solid;
|
||||
border-width: 1px;
|
||||
|
@ -1,6 +1,4 @@
|
||||
import { DialogItemAchat } from "../achat-vente/dialog-item-achat.js";
|
||||
import { RdDItem } from "../item.js";
|
||||
import { RdDUtility } from "../rdd-utility.js";
|
||||
import { RdDBaseActorSheet } from "./base-actor-sheet.js";
|
||||
|
||||
/**
|
||||
@ -44,13 +42,8 @@ export class RdDCommerceSheet extends RdDBaseActorSheet {
|
||||
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;
|
||||
|
||||
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 => {
|
||||
const newQuantite = Math.max(0, Number.parseInt(this.html.find(event.currentTarget).val()));
|
||||
await this.getItem(event)?.update({ "system.quantite": newQuantite });
|
||||
@ -64,28 +57,4 @@ export class RdDCommerceSheet extends RdDBaseActorSheet {
|
||||
getTypesInventaire() {
|
||||
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()
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,4 +1,6 @@
|
||||
import { DialogItemAchat } from "../achat-vente/dialog-item-achat.js";
|
||||
import { Misc } from "../misc.js";
|
||||
import { RdDUtility } from "../rdd-utility.js";
|
||||
import { RdDBaseActor } from "./base-actor.js";
|
||||
|
||||
export class RdDCommerce extends RdDBaseActor {
|
||||
@ -37,4 +39,27 @@ export class RdDCommerce extends RdDBaseActor {
|
||||
const pourcentage = this.system.pourcentage ?? 100;
|
||||
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()
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
import { ACTOR_TYPES } from "../constants.js"
|
||||
import { Misc } from "../misc.js"
|
||||
import { RdDSheetUtility } from "../rdd-sheet-utility.js"
|
||||
import { RdDUtility } from "../rdd-utility.js"
|
||||
@ -19,9 +20,8 @@ const _VENDRE = {
|
||||
}
|
||||
const _ACHAT_SERVICE = {
|
||||
code: 'item-service-acheter', label: 'Acheter', icon: it => 'fa-regular fa-coins',
|
||||
//filter: it => Misc.toInt(it.system.quantite) > 0,
|
||||
//optionsFilter: options => options.editable,
|
||||
//action: (item, actor) => item.proposerVente()
|
||||
filter: it => Misc.toInt(it.system.quantite) > 0 && it.parent?.type == ACTOR_TYPES.commerce,
|
||||
action: (item, actor) => actor.vente(item)
|
||||
}
|
||||
const _MONTRER = {
|
||||
code: 'item-montrer', label: 'Montrer', icon: it => 'fa-solid fa-comment',
|
||||
|
@ -3,8 +3,8 @@ type: faune
|
||||
img: systems/foundryvtt-reve-de-dragon/icons/faune/ours.webp
|
||||
system:
|
||||
description: >-
|
||||
<p>Ours. Forêt, montagne, 300 kg, 600 sust.Surtout recherché
|
||||
pour sa peau (voir legrizzal, p405).</p>
|
||||
<p>Ours. Forêt, montagne, 300 kg, 600 sust. Surtout recherché
|
||||
pour sa peau (voir le grizzal, p405).</p>
|
||||
descriptionmj: ''
|
||||
encombrement: 150
|
||||
quantite: 1
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{#unless item.system.isHidden}}
|
||||
{{#if (ne item.type 'monnaie')}}
|
||||
<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}} >
|
||||
{{#if (eq item.type 'conteneur')}}
|
||||
<i class="{{~#if vide}}far fa-square
|
||||
|
@ -1,7 +1,7 @@
|
||||
{{#unless item.system.isHidden}}
|
||||
{{#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}}">
|
||||
<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')}}
|
||||
<a>
|
||||
<i class="{{~#if vide}}far fa-square
|
||||
|
@ -36,9 +36,10 @@
|
||||
</tr>
|
||||
{{#each gmAstrologie.ajustementsActors as |ajustementActeur|}}
|
||||
<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}}" />
|
||||
{{actor.name}} {{timestamp-imgSigneHeure actor.system.heure}}
|
||||
<span>{{actor.name}}</span>
|
||||
{{timestamp-imgSigneHeure actor.system.heure}}
|
||||
</td>
|
||||
{{#each ajustementActeur.ajustements as |ajustement|}}
|
||||
<td>{{#if (ne ajustement.ajustement 0)}}
|
||||
|
Reference in New Issue
Block a user