Initial import
This commit is contained in:
parent
9686b6bd35
commit
2b3a6ec13d
Binary file not shown.
Before Width: | Height: | Size: 132 KiB |
@ -3,9 +3,9 @@
|
||||
* @extends {ActorSheet}
|
||||
*/
|
||||
|
||||
import { HeritiersActorSheet } from "./hawkmoon-actor-sheet.js";
|
||||
import { HeritiersActorSheet } from "./heritiers-actor-sheet.js";
|
||||
import { HeritiersUtility } from "./heritiers-utility.js";
|
||||
import { HeritiersAutomation } from "./hawkmoon-automation.js";
|
||||
import { HeritiersAutomation } from "./heritiers-automation.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
export class HeritiersCreatureSheet extends HeritiersActorSheet {
|
||||
|
@ -10,7 +10,7 @@ export class HeritiersTokenHud {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async removeExtensionHud(app, html, tokenId) {
|
||||
html.find('.control-icon.hawkmoon-adversite').remove()
|
||||
html.find('.control-icon.heritiers-adversite').remove()
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -43,12 +43,12 @@ export class HeritiersTokenHud {
|
||||
/* -------------------------------------------- */
|
||||
static async _configureSubMenu(insertionPoint, template, hudData, onMenuItem) {
|
||||
const hud = $(await renderTemplate(template, hudData))
|
||||
const list = hud.find('div.hawkmoon-hud-list')
|
||||
const list = hud.find('div.heritiers-hud-list')
|
||||
|
||||
HeritiersTokenHud._toggleHudListActive(hud, list);
|
||||
|
||||
hud.find('img.hawkmoon-hud-togglebutton').click(event => HeritiersTokenHud._toggleHudListActive(hud, list));
|
||||
list.find('.hawkmoon-hud-adversite').click(onMenuItem);
|
||||
hud.find('img.heritiers-hud-togglebutton').click(event => HeritiersTokenHud._toggleHudListActive(hud, list));
|
||||
list.find('.heritiers-hud-adversite').click(onMenuItem);
|
||||
|
||||
insertionPoint.after(hud);
|
||||
}
|
||||
|
@ -8,16 +8,15 @@
|
||||
|
||||
/* -------------------------------------------- */
|
||||
// Import Modules
|
||||
import { HeritiersActor } from "./hawkmoon-actor.js";
|
||||
import { HeritiersItemSheet } from "./hawkmoon-item-sheet.js";
|
||||
import { HeritiersActorSheet } from "./hawkmoon-actor-sheet.js";
|
||||
import { HeritiersCreatureSheet } from "./hawkmoon-creature-sheet.js";
|
||||
import { HeritiersCelluleSheet } from "./hawkmoon-cellule-sheet.js";
|
||||
import { HeritiersActor } from "./heritiers-actor.js";
|
||||
import { HeritiersItemSheet } from "./heritiers-item-sheet.js";
|
||||
import { HeritiersActorSheet } from "./heritiers-actor-sheet.js";
|
||||
import { HeritiersCreatureSheet } from "./heritiers-creature-sheet.js";
|
||||
import { HeritiersUtility } from "./heritiers-utility.js";
|
||||
import { HeritiersCombat } from "./hawkmoon-combat.js";
|
||||
import { HeritiersItem } from "./hawkmoon-item.js";
|
||||
import { HeritiersAutomation } from "./hawkmoon-automation.js";
|
||||
import { HeritiersTokenHud } from "./hawkmoon-hud.js";
|
||||
import { HeritiersCombat } from "./heritiers-combat.js";
|
||||
import { HeritiersItem } from "./heritiers-item.js";
|
||||
import { HeritiersAutomation } from "./heritiers-automation.js";
|
||||
import { HeritiersTokenHud } from "./heritiers-hud.js";
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/* Foundry VTT Initialization */
|
||||
@ -58,7 +57,6 @@ Hooks.once("init", async function () {
|
||||
Actors.unregisterSheet("core", ActorSheet);
|
||||
Actors.registerSheet("fvtt-les-heritiers", HeritiersActorSheet, { types: ["personnage"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-les-heritiers", HeritiersCreatureSheet, { types: ["creature"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-les-heritiers", HeritiersCelluleSheet, { types: ["cellule"], makeDefault: true });
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet);
|
||||
Items.registerSheet("fvtt-les-heritiers", HeritiersItemSheet, { makeDefault: true })
|
||||
@ -74,10 +72,10 @@ function welcomeMessage() {
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
whisper: [game.user.id],
|
||||
content: `<div id="welcome-message-Heritiers"><span class="rdd-roll-part">
|
||||
<strong>Bienvenue dans Heritiers et le troisième Millénaire !</strong>
|
||||
<p>Les livres de Heritiers sont nécessaires pour jouer : https://www.titam-france.fr</p>
|
||||
<p>Heritiers est jeu de rôle publié par Titam France/Sombres projets, tout les droits leur appartiennent.</p>
|
||||
content: `<div id="welcome-message-heritiers"><span class="rdd-roll-part">
|
||||
<strong>Bienvenue dans Les Heritiers et la Belle Epoque !</strong>
|
||||
<p>Les livres du JDR Les Heritiers sont nécessaires pour jouer : https://www.titam-france.fr</p>
|
||||
<p>Les Heritiers est jeu de rôle publié par Titam France/Sombres projets, tout les droits leur appartiennent.</p>
|
||||
<p>Système développé par LeRatierBretonnien, support sur le <a href="https://discord.gg/pPSDNJk">Discord FR de Foundry</a>.</p>
|
||||
` });
|
||||
}
|
||||
|
@ -42,23 +42,6 @@ export class HeritiersUtility {
|
||||
return parseInt(a) * parseInt(b);
|
||||
})
|
||||
|
||||
game.settings.register("fvtt-les-heritiers", "hawkmoon-pause-logo", {
|
||||
name: "Logo de pause",
|
||||
scope: "world",
|
||||
config: true,
|
||||
requiresReload: true,
|
||||
default: "logo_pause_resistance",
|
||||
type: String,
|
||||
choices: { // If choices are defined, the resulting setting will be a select menu
|
||||
"hawkmoon_logo": "Hawmoon (Texte)",
|
||||
"logo_pause_resistance": "Résistance",
|
||||
"logo_pause_hawkmoon_stone": "Heritiers (Pierre)",
|
||||
"logo_pause_hawkmoon_violet": "Heritiers (Violet)",
|
||||
"logo_pause_hawkmoon_beige": "Heritiers (Beige)",
|
||||
"logo_pause_hawkmoon_rouge": "Heritiers (Rouge)"
|
||||
},
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -97,10 +80,6 @@ export class HeritiersUtility {
|
||||
const skills = await HeritiersUtility.loadCompendium("fvtt-les-heritiers.skills")
|
||||
this.skills = skills.map(i => i.toObject())
|
||||
|
||||
// Setup pause logo
|
||||
let logoPause = "systems/fvtt-les-heritiers/assets/logos/" + game.settings.get("fvtt-les-heritiers", "hawkmoon-pause-logo") + ".webp"
|
||||
let logoImg = document.querySelector('#pause').children[0]
|
||||
logoImg.setAttribute('style', `content: url(${logoPause})`)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -126,7 +105,7 @@ export class HeritiersUtility {
|
||||
let predIdx = $(event.currentTarget).data("predilection-index")
|
||||
let messageId = HeritiersUtility.findChatMessageId(event.currentTarget)
|
||||
let message = game.messages.get(messageId)
|
||||
let rollData = message.getFlag("world", "hawkmoon-roll")
|
||||
let rollData = message.getFlag("world", "heritiers-roll")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
await actor.setPredilectionUsed(rollData.competence._id, predIdx)
|
||||
rollData.competence = duplicate(actor.getCompetence(rollData.competence._id))
|
||||
@ -136,7 +115,7 @@ export class HeritiersUtility {
|
||||
html.on("click", '.roll-chat-degat', async event => {
|
||||
let messageId = HeritiersUtility.findChatMessageId(event.currentTarget)
|
||||
let message = game.messages.get(messageId)
|
||||
let rollData = message.getFlag("world", "hawkmoon-roll")
|
||||
let rollData = message.getFlag("world", "heritiers-roll")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
actor.rollArmeDegats(rollData.arme._id, rollData.targetVigueur)
|
||||
})
|
||||
@ -508,7 +487,7 @@ export class HeritiersUtility {
|
||||
chatOptions.alias = chatOptions.alias || name
|
||||
let msg = await ChatMessage.create(chatOptions)
|
||||
console.log("=======>", rollData)
|
||||
msg.setFlag("world", "hawkmoon-roll", rollData)
|
||||
msg.setFlag("world", "heritiers-roll", rollData)
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@ -551,7 +530,7 @@ export class HeritiersUtility {
|
||||
let msgId = li.data("message-id")
|
||||
let msg = game.messages.get(msgId)
|
||||
if (msg) {
|
||||
let rollData = msg.getFlag("world", "hawkmoon-roll")
|
||||
let rollData = msg.getFlag("world", "heritiers-roll")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
actor.changeBonneAventure(changed)
|
||||
rollData.isReroll = true
|
||||
@ -570,7 +549,7 @@ export class HeritiersUtility {
|
||||
let msgId = li.data("message-id")
|
||||
let msg = game.messages.get(msgId)
|
||||
if (msg) {
|
||||
let rollData = msg.getFlag("world", "hawkmoon-roll")
|
||||
let rollData = msg.getFlag("world", "heritiers-roll")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
actor.changeEclat(changed)
|
||||
rollData.isReroll = true
|
||||
@ -586,16 +565,16 @@ export class HeritiersUtility {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static chatRollMenu(html, options) {
|
||||
let canApply = li => canvas.tokens.controlled.length && li.find(".hawkmoon-roll").length
|
||||
let canApply = li => canvas.tokens.controlled.length && li.find(".heritiers-roll").length
|
||||
let canApplyBA = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "hawkmoon-roll")
|
||||
let rollData = message.getFlag("world", "heritiers-roll")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getBonneAventure() > 0)
|
||||
}
|
||||
let canApplyPE = function (li) {
|
||||
let message = game.messages.get(li.attr("data-message-id"))
|
||||
let rollData = message.getFlag("world", "hawkmoon-roll")
|
||||
let rollData = message.getFlag("world", "heritiers-roll")
|
||||
let actor = this.getActorFromRollData(rollData)
|
||||
return (!rollData.isReroll && actor.getEclat() > 0)
|
||||
}
|
||||
|
@ -48,7 +48,7 @@
|
||||
text-align: justify;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
background-image: url("../assets/ui/pc_sheet_bg.webp");
|
||||
background-image: url("../assets/ui/fiche_background_simple_01.webp");
|
||||
background-repeat: repeat;
|
||||
}
|
||||
/* Fonts */
|
||||
@ -66,13 +66,13 @@
|
||||
font-size: 0.8rem;
|
||||
color: #151c1f;
|
||||
} /* For nav and title */
|
||||
.window-app input, .fvtt-hawkmoon-cyd .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
|
||||
.window-app input, .fvtt-les-heritiers .item-form, .sheet header.sheet-header .flex-group-center.flex-compteurs, .sheet header.sheet-header .flex-group-center.flex-fatigue, select, button, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
|
||||
font-size: 0.8rem;
|
||||
}
|
||||
.fvtt-hawkmoon-cyd .sheet-header select option {
|
||||
.fvtt-les-heritiers .sheet-header select option {
|
||||
background-color: rgb(68, 25, 25);
|
||||
}
|
||||
.fvtt-hawkmoon-cyd .sheet-header input, .fvtt-hawkmoon-cyd .sheet-header select {
|
||||
.fvtt-les-heritiers .sheet-header input, .fvtt-les-heritiers .sheet-header select {
|
||||
color: lightgray;
|
||||
}
|
||||
.window-header{
|
||||
@ -82,7 +82,7 @@
|
||||
.window-app.sheet .window-content {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-image: url("../assets/ui/pc_sheet_bg.webp");
|
||||
background-image: url("../assets/ui/fiche_background_simple_01.webp");
|
||||
background-repeat: repeat;
|
||||
}
|
||||
.strong-text{
|
||||
@ -218,7 +218,7 @@ table {border: 1px solid #7a7971;}
|
||||
|
||||
/* Styles limited to foundryvtt-vadentis sheets */
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-header {
|
||||
.fvtt-les-heritiers .sheet-header {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 210px;
|
||||
flex: 0 0 210px;
|
||||
@ -245,7 +245,7 @@ table {border: 1px solid #7a7971;}
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-header .profile-img {
|
||||
.fvtt-les-heritiers .sheet-header .profile-img {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 128px;
|
||||
flex: 0 0 128px;
|
||||
@ -285,13 +285,13 @@ table {border: 1px solid #7a7971;}
|
||||
vertical-align: bottom;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-header .header-fields {
|
||||
.fvtt-les-heritiers .sheet-header .header-fields {
|
||||
-webkit-box-flex: 1;
|
||||
-ms-flex: 1;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-header h1.charname {
|
||||
.fvtt-les-heritiers .sheet-header h1.charname {
|
||||
height: 50px;
|
||||
padding: 0px;
|
||||
margin: 5px 0;
|
||||
@ -302,7 +302,7 @@ table {border: 1px solid #7a7971;}
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-header h1.charname input {
|
||||
.fvtt-les-heritiers .sheet-header h1.charname input {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
@ -312,21 +312,21 @@ table {border: 1px solid #7a7971;}
|
||||
color: lightgray;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-tabs {
|
||||
.fvtt-les-heritiers .sheet-tabs {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0;
|
||||
flex: 0;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-body,
|
||||
.fvtt-hawkmoon-cyd .sheet-body .tab,
|
||||
.fvtt-hawkmoon-cyd .sheet-body .tab .editor {
|
||||
.fvtt-les-heritiers .sheet-body,
|
||||
.fvtt-les-heritiers .sheet-body .tab,
|
||||
.fvtt-les-heritiers .sheet-body .tab .editor {
|
||||
height: 100%;
|
||||
font-size: 0.8rem;
|
||||
color:rgba(0,0,0,0.9)
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .sheet-body input, .fvtt-hawkmoon-cyd .sheet-body select {
|
||||
.fvtt-les-heritiers .sheet-body input, .fvtt-les-heritiers .sheet-body select {
|
||||
color:rgba(0,0,0,0.9)
|
||||
}
|
||||
|
||||
@ -348,70 +348,70 @@ table {border: 1px solid #7a7971;}
|
||||
padding: 0 3px;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .tox .tox-editor-container {
|
||||
.fvtt-les-heritiers .tox .tox-editor-container {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .tox .tox-edit-area {
|
||||
.fvtt-les-heritiers .tox .tox-edit-area {
|
||||
padding: 0 8px;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .resource-label {
|
||||
.fvtt-les-heritiers .resource-label {
|
||||
font-weight: bold;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .tabs {
|
||||
.fvtt-les-heritiers .tabs {
|
||||
height: 40px;
|
||||
border-top: 1px solid #AAA;
|
||||
border-bottom: 1px solid #AAA;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .tabs .item {
|
||||
.fvtt-les-heritiers .tabs .item {
|
||||
/*line-height: 40px;*/
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .tabs .item.active {
|
||||
.fvtt-les-heritiers .tabs .item.active {
|
||||
text-decoration: underline;
|
||||
text-shadow: none;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list {
|
||||
.fvtt-les-heritiers .items-list {
|
||||
list-style: none;
|
||||
margin: 1px 0;
|
||||
padding: 0;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list .item-header {
|
||||
.fvtt-les-heritiers .items-list .item-header {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list .item {
|
||||
.fvtt-les-heritiers .items-list .item {
|
||||
height: 30px;
|
||||
line-height: 24px;
|
||||
padding: 1px 0;
|
||||
border-bottom: 1px solid #BBB;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list .item .item-image {
|
||||
.fvtt-les-heritiers .items-list .item .item-image {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 24px;
|
||||
flex: 0 0 24px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list .item img {
|
||||
.fvtt-les-heritiers .items-list .item img {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list .item-name {
|
||||
.fvtt-les-heritiers .items-list .item-name {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.fvtt-hawkmoon-cyd .items-list .item-controls {
|
||||
.fvtt-les-heritiers .items-list .item-controls {
|
||||
-webkit-box-flex: 0;
|
||||
-ms-flex: 0 0 86px;
|
||||
flex: 0 0 86px;
|
||||
@ -1350,7 +1350,7 @@ ul, li {
|
||||
color: #CCC
|
||||
}
|
||||
#pause > img {
|
||||
content: url(../assets/logos/hawkmoon_logo.webp);
|
||||
content: url(../assets/ui/logo_main_01.webp);
|
||||
height: 256px;
|
||||
width: 256px;
|
||||
top: -80px;
|
||||
@ -1358,7 +1358,7 @@ ul, li {
|
||||
}
|
||||
|
||||
#logo {
|
||||
content : url(../assets/logos/hawkmoon_logo.webp);
|
||||
content : url(../assets/ui/logo_main_01.webp);
|
||||
width: 120px;
|
||||
height: 40px;
|
||||
}
|
||||
|
@ -19,7 +19,7 @@
|
||||
"gridUnits": "m",
|
||||
"license": "LICENSE.txt",
|
||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/raw/branch/master/system.json",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-hawkmoon-cyd-10.0.0.zip",
|
||||
"download": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers/archive/fvtt-les-heritiers-10.0.0.zip",
|
||||
"languages": [
|
||||
{
|
||||
"lang": "fr",
|
||||
@ -47,7 +47,7 @@
|
||||
],
|
||||
"title": "Les Héritiers",
|
||||
"url": "https://www.uberwald.me/gitea/public/fvtt-les-heritiers",
|
||||
"background": "systems/fvtt-les-heritiers/assets/ui/fond_hawkmoon.webp",
|
||||
"background": "systems/fvtt-les-heritiers/assets/ui/wallpaper_foundry2.webp",
|
||||
"compatibility": {
|
||||
"minimum": "10",
|
||||
"verified": "10",
|
||||
|
Loading…
Reference in New Issue
Block a user