diff --git a/fonts/heures.ttf b/fonts/heures.ttf
new file mode 100644
index 00000000..2200a65e
Binary files /dev/null and b/fonts/heures.ttf differ
diff --git a/icons/.directory b/icons/.directory
new file mode 100644
index 00000000..23ef5682
--- /dev/null
+++ b/icons/.directory
@@ -0,0 +1,6 @@
+[Dolphin]
+SortRole=modificationtime
+Timestamp=2020,9,20,16,0,24
+Version=4
+ViewMode=1
+VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails
diff --git a/icons/compcreature-beak.png b/icons/compcreature-beak.png
new file mode 100644
index 00000000..d35b090f
Binary files /dev/null and b/icons/compcreature-beak.png differ
diff --git a/icons/compcreature-brasbouche.png b/icons/compcreature-brasbouche.png
new file mode 100644
index 00000000..e45a7be2
Binary files /dev/null and b/icons/compcreature-brasbouche.png differ
diff --git a/icons/compcreature-contre.png b/icons/compcreature-contre.png
new file mode 100644
index 00000000..748a43b3
Binary files /dev/null and b/icons/compcreature-contre.png differ
diff --git a/icons/compcreature-corne.png b/icons/compcreature-corne.png
new file mode 100644
index 00000000..d7521ce4
Binary files /dev/null and b/icons/compcreature-corne.png differ
diff --git a/icons/compcreature-crete.png b/icons/compcreature-crete.png
new file mode 100644
index 00000000..c8f1db54
Binary files /dev/null and b/icons/compcreature-crete.png differ
diff --git a/icons/compcreature-griffes.png b/icons/compcreature-griffes.png
new file mode 100644
index 00000000..cfe06c9d
Binary files /dev/null and b/icons/compcreature-griffes.png differ
diff --git a/icons/compcreature-mandibules.png b/icons/compcreature-mandibules.png
new file mode 100644
index 00000000..e6f84f04
Binary files /dev/null and b/icons/compcreature-mandibules.png differ
diff --git a/icons/compcreature-morsure.png b/icons/compcreature-morsure.png
new file mode 100644
index 00000000..131dfef3
Binary files /dev/null and b/icons/compcreature-morsure.png differ
diff --git a/icons/compcreature-pierrelancee.png b/icons/compcreature-pierrelancee.png
new file mode 100644
index 00000000..5fc69476
Binary files /dev/null and b/icons/compcreature-pierrelancee.png differ
diff --git a/icons/compcreature-pierretenue.png b/icons/compcreature-pierretenue.png
new file mode 100644
index 00000000..619654f3
Binary files /dev/null and b/icons/compcreature-pierretenue.png differ
diff --git a/icons/compcreature-pinces.png b/icons/compcreature-pinces.png
new file mode 100644
index 00000000..f37f71dd
Binary files /dev/null and b/icons/compcreature-pinces.png differ
diff --git a/icons/compcreature-serres.png b/icons/compcreature-serres.png
new file mode 100644
index 00000000..1a64b96f
Binary files /dev/null and b/icons/compcreature-serres.png differ
diff --git a/icons/compcreature-tronconneuse.png b/icons/compcreature-tronconneuse.png
new file mode 100644
index 00000000..54811cad
Binary files /dev/null and b/icons/compcreature-tronconneuse.png differ
diff --git a/icons/compcreature-vol.png b/icons/compcreature-vol.png
new file mode 100644
index 00000000..ef8e1829
Binary files /dev/null and b/icons/compcreature-vol.png differ
diff --git a/module/actor.js b/module/actor.js
index 284daa92..64f77c54 100644
--- a/module/actor.js
+++ b/module/actor.js
@@ -31,21 +31,33 @@ export class RdDActor extends Actor {
data.items = [];
if (data.type == "personnage")
{
- let competences = [];
- const pack = game.packs.get("foundryvtt-reve-de-dragon.competences");
- await pack.getIndex().then(index => competences = index);
- for (let comp of competences)
- {
- let compItem = undefined;
- await pack.getEntity(comp._id).then(skill => compItem = skill);
- data.items.push(compItem);
- }
+ this.push_competence( data, "foundryvtt-reve-de-dragon.competences" );
+ }
+ if (data.type == "humanoide")
+ {
+ this.push_competence( data, "foundryvtt-reve-de-dragon.competences-humanoide" );
+ }
+ if (data.type == "creature")
+ {
+ this.push_competence( data, "foundryvtt-reve-de-dragon.competences-creature" );
}
super.create(data, options);
}
- /* -------------------------------------------- */
-
+ /* -------------------------------------------- */
+ async push_competence( data, compendiumName ) {
+ let competences = [];
+ const pack = game.packs.get(compendiumName);
+ await pack.getIndex().then(index => competences = index);
+ for (let comp of competences)
+ {
+ let compItem = undefined;
+ await pack.getEntity(comp._id).then(skill => compItem = skill);
+ data.items.push(compItem);
+ }
+ }
+
+ /* -------------------------------------------- */
prepareData() {
super.prepareData();
diff --git a/module/rdd-calendrier.js b/module/rdd-calendrier.js
new file mode 100644
index 00000000..99891407
--- /dev/null
+++ b/module/rdd-calendrier.js
@@ -0,0 +1,22 @@
+/* -------------------------------------------- */
+const heures = [ "Vaisseau", "Sirène", "Faucon", "Couronne", "Dragon", "Epées", "Lyre", "Serpent", "Poisson Acrobate", "Araignée", "Roseau", "Château Dormant" ]
+
+/* -------------------------------------------- */
+export class RdDCalendrier extends Application {
+ data = {
+ saisons: [],
+ };
+
+ static get defaultOptions() {
+ const options = super.defaultOptions;
+ options.template = "systems/foundryvtt-reve-de-dragon/templates/calendar-template.html";
+ options.popOut = false;
+ options.resizable = false;
+ return options;
+ }
+
+ /*getData() {
+ return templateData;
+ }*/
+
+}
\ No newline at end of file
diff --git a/module/rdd-main.js b/module/rdd-main.js
index 86acbc79..0e750729 100644
--- a/module/rdd-main.js
+++ b/module/rdd-main.js
@@ -13,6 +13,7 @@ import { RdDItemSheet } from "./item-sheet.js";
import { RdDActorSheet } from "./actor-sheet.js";
import { RdDUtility } from "./rdd-utility.js";
import { TMRUtility } from "./tmr-utility.js";
+import { RdDCalendrier } from "./rdd-calendrier.js";
/* -------------------------------------------- */
/* Foundry VTT Initialization */
@@ -133,7 +134,15 @@ Hooks.once("init", async function() {
Hooks.once("ready", function() {
ChatMessage.create( { title: "Bienvenu dans le Rêve !", content : "Bienvenu dans le Rêve des Dragons !
" +
"Vous trouverez quelques infos pour démarrer dans ce document : @Compendium[foundryvtt-reve-de-dragon.rappel-des-regles.7uGrUHGdPu0EmIu2]{Documentation MJ/Joueurs}" } );
-} );
+
+ /* Affiche le calendrier */
+ let calendrier = new RdDCalendrier();
+ let templatePath = "systems/foundryvtt-reve-de-dragon/templates/calendar-template.html";
+ let templateData = {};
+ renderTemplate(templatePath, templateData).then(html => {
+ calendrier.render(true);
+ } );
+});
/* -------------------------------------------- */
/* Foundry VTT Initialization */
diff --git a/module/rdd-utility.js b/module/rdd-utility.js
index 5494602c..58536106 100644
--- a/module/rdd-utility.js
+++ b/module/rdd-utility.js
@@ -94,6 +94,7 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/actor-sheet.html',
//Items
'systems/foundryvtt-reve-de-dragon/templates/item-competence-sheet.html',
+ 'systems/foundryvtt-reve-de-dragon/templates/item-competencecreature-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-arme-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-armure-sheet.html',
'systems/foundryvtt-reve-de-dragon/templates/item-objet-sheet.html',
@@ -119,7 +120,9 @@ export class RdDUtility {
'systems/foundryvtt-reve-de-dragon/templates/dialog-competence.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-carac.html',
'systems/foundryvtt-reve-de-dragon/templates/dialog-roll-sort.html',
- 'systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html'
+ 'systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.html',
+ // Calendrier
+ 'systems/foundryvtt-reve-de-dragon/templates/calendar_template.html'
];
return loadTemplates(templatePaths);
@@ -635,5 +638,4 @@ export class RdDUtility {
return true;
}
-
}
diff --git a/packs/competences-creatures.db b/packs/competences-creatures.db
new file mode 100644
index 00000000..3d5f7412
--- /dev/null
+++ b/packs/competences-creatures.db
@@ -0,0 +1,21 @@
+{"name":"Escalade","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"
Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_escalade.png","_id":"4GmpkphbsmQjvVVK"} +{"name":"Morsure","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-morsure.png","_id":"6DK46pyO0hzEuuUg"} +{"name":"Griffes et Crocs","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-griffes.png","_id":"BjqRrGtHtTzuNpZB"} +{"name":"Esquive","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_esquive.png","_id":"CYpxxf1uTa78NWR9"} +{"name":"Crête","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-crete.png","_id":"JTuBQCPdumw3DfxH"} +{"name":"Vol","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-vol.png","_id":"Kt7WlB5Ui97X211z"} +{"name":"Cornes","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-corne.png","_id":"LWQHz5ymNBzh6ZEr"} +{"name":"Bras-bouches","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-brasbouche.png","_id":"NctG7suzvGE7ZZzj"} +{"name":"Pierre Tenue","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-pierretenue.png","_id":"OzHBowOMADRwcVXR"} +{"name":"Contre","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-contre.png","_id":"QME3qvTducY1uqpw"} +{"name":"Pinces","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-pinces.png","_id":"RAnasKnoA3OQgwfv"} +{"name":"Mandibules","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-mandibules.png","_id":"XgfRxSj8Ty1d3JFM"} +{"name":"Pierre Lancée","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-pierrelancee.png","_id":"efl1HdDSKpBfImQ1"} +{"name":"Tronçonneuse","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-tronconneuse.png","_id":"h9ASt4vrvEgxfj7j"} +{"name":"Vigilance","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_vigilance.png","_id":"lzEdMrKXbOYrWG5S"} +{"name":"Serres","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-serres.png","_id":"ndNshntOYb1JFNqi"} +{"name":"Bec","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/compcreature-beak.png","_id":"os88Rsp7mBkahqmh"} +{"name":"Dague","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_dague.png","_id":"qilRzXpVaGceNmQp"} +{"name":"Pickpocket","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_pickpocket.png","_id":"sUdXhpuVVOAlcVpo"} +{"name":"Course","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_course.png","_id":"shsUV8UpU18c0RJK"} +{"name":"Discrétion","permission":{"default":0,"Q4cUvqxCxMoTJXDL":3},"type":"competencecreature","data":{"niveau":0,"carac-value":0,"dommages":0,"description":"Morsure de la créature
"},"flags":{},"img":"systems/foundryvtt-reve-de-dragon/icons/competence_discretion.png","_id":"yDHZfK4RmwQW4YaW"} diff --git a/styles/simple.css b/styles/simple.css index 2d89b296..474c7996 100644 --- a/styles/simple.css +++ b/styles/simple.css @@ -560,3 +560,249 @@ button { background-position:center !important; background-size:cover !important; } + +/*--------------------------------------------------------------------------*/ +/* CALENDAR STUFF */ +#calendar-time-container{ + position: absolute; + bottom: 75px; + left: 223px; + display: block; +} +#calendar{ +min-width: 150px; +grid-row: 1; +grid-column: 1; +width: fit-content; +height: 75px; +margin: 0; +padding: 0; +border: 1px solid #000; +border-radius: 3%; +background: rgba(0, 0, 0, 0.5); +} +#calendar-hdr{ + display: grid; + font-size: 16px; + margin: 3px; + padding: 4px; + text-align: center; + height: 25px; + width: fit-content; + min-width: 200px; + border-bottom: 1px solid #111; +} +#calendar-date{ + grid-row: 1; + grid-column: 2; + float: left; + text-align: center; + padding-top: 0px; + padding-bottom: 0px; + margin-bottom: 5px; + color: #CCC; + cursor: pointer; +} + +#calendar-date, +#calendar-date-num { + transition: 0.2s; +} +#calendar-date-num { + grid-row: 1; + grid-column: 2; + float: left; + text-align: center; + padding-top: 0px; + padding-bottom: 0px; + margin-bottom: 5px; + color: #CCC; + opacity: 0; + cursor: pointer; +} + +#calendar-hdr:hover #calendar-date { + opacity: 0; +} +#calendar-hdr:hover #calendar-date-num{ + opacity: 1; +} +#calendar-events{ + grid-row: 1; + grid-column: 1; + float: left; + margin-right: 5px; + width: 10%; + text-align: center; +} +#calendar-events:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-weather{ + grid-row: 1; + grid-column: 3; + float: inline-end; + margin-left: 5px; + width: 10%; + text-align: center; +} +#calendar-weather:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +.calendar-container{ + padding-top: 3px; + padding-bottom: 20px; +} +.calendar-btn-container-left{ + width: 20%; + display: grid; + float: left; + margin: 2px; + grid-row-gap: 3px; +} +.calendar-btn-container-right{ + width: 20%; + display: grid; + float: right; + margin: 2px; + grid-row-gap: 3px; +} +#calendar-btn-sec{ + grid-row: 1; + grid-column: 1; + margin: auto; + color: rgba(0, 0, 0, 0.5); + cursor: not-allowed; +} + +#calendar-btn-halfMin{ + grid-row: 1; + grid-column: 2; + margin: auto; + color: rgba(0, 0, 0, 0.5); + cursor: not-allowed; +} +#calendar-btn-min{ + grid-row: 2; + grid-column: 1; + margin-left: 10px; +} + +#calendar-btn-fiveMin{ + grid-row: 2; + grid-column: 2; + margin-left: 10px; +} + +#calendar-btn-night{ + grid-row: 1; + grid-column: 1; + height: fit-content; + text-align: center; + vertical-align: center; +} + +#calendar-btn-day{ + grid-row: 1; + grid-column: 2; + height: fit-content; + text-align: center; + vertical-align: center; +} + +#calendar-btn-quick{ + grid-row: 2; + grid-column: 1; + height: fit-content; + text-align: center; + vertical-align: center; +} + +#calendar-btn-long{ + grid-row: 2; + grid-column: 2; + height: fit-content; + text-align: center; + vertical-align: center; +} + +#calendar-btn-sec:hover { + border: 0px solid #000; + cursor: not-allowed; +} + +#calendar-btn-halfMin:hover { + border: 0px solid #000; + cursor: not-allowed; +} + +#calendar-btn-min:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-fiveMin:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-quick:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-long:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-day:hover { + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +#calendar-btn-night:hover{ + color: #FFF; + border: 0px solid #000; + cursor: pointer; +} + +.calendar-weekday-time{ + display: grid; + float: left; + width: 55%; + padding-top: 0px; + padding-bottom: 0px; + margin: auto; + color: #CCC; +} +#calendar-weekday{ + grid-column: 1; + grid-row: 1; + text-align: center; + margin: auto; + border-bottom: 1px solid #111; +} +.calendar-time{ + grid-column: 1; + grid-row: 2; + text-align: center; + margin: auto; + cursor: pointer; + display: inline-flex; +} +.calendar-time-disp{ + position: relative; + bottom: 6px; +} diff --git a/system.json b/system.json index a24f3aaa..7ad3bb4b 100644 --- a/system.json +++ b/system.json @@ -2,10 +2,10 @@ "name": "foundryvtt-reve-de-dragon", "title": "Rêve de Dragon", "description": "Rêve de Dragon RPG for FoundryVTT", - "version": "0.9.4", + "version": "0.9.5", "minimumCoreVersion": "0.6.0", "compatibleCoreVersion": "0.6.6", - "templateVersion": 28, + "templateVersion": 31, "author": "LeRatierBretonnien", "esmodules": [ "module/rdd-main.js", "module/hook-renderChatLog.js" ], "styles": ["styles/simple.css"], @@ -18,6 +18,15 @@ "path": "./packs/competences.db", "entity": "Item", "tag" : "item" + }, + { + "name": "competences-creatures", + "label": "Compétences de Créatures", + "system": "foundryvtt-reve-de-dragon", + "module": "foundryvtt-reve-de-dragon", + "path": "./packs/competences-creatures.db", + "entity": "Item", + "tag" : "item" }, { "name": "sorts", diff --git a/template.json b/template.json index 129b2be8..b4776ec8 100644 --- a/template.json +++ b/template.json @@ -1,7 +1,10 @@ { "Actor": { - "types": ["personnage"], + "types": ["personnage", "humanoide", "creature"], "templates": { + "description": { + "description": "Description ..." + }, "background": { "biographie": "Histoire personnelle...", "yeux": "", @@ -324,10 +327,16 @@ }, "personnage": { "templates": [ "background", "common"] + }, + "humanoide": { + "templates": [ "common", "description" ] + }, + "creature": { + "templates": [ "common", "description" ] } }, "Item": { - "types": ["objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle", "tete"], + "types": ["objet", "arme", "armure", "conteneur", "competence", "sort", "herbe", "ingredient", "livre", "potion", "munition", "rencontresTMR", "queue", "ombre", "souffle", "tete", "competencecreature"], "objet": { "description": "", "quantite": 1, @@ -385,7 +394,13 @@ "xp": 0, "description": "Compétence : ...", "defaut_carac": "" - }, + }, + "competencecreature": { + "niveau": 0, + "carac-value": 0, + "dommages": 0, + "description": "Compétence : ..." + }, "sort": { "description": "", "draconic": "", diff --git a/templates/calendar-template.html b/templates/calendar-template.html new file mode 100644 index 00000000..c4f1e96f --- /dev/null +++ b/templates/calendar-template.html @@ -0,0 +1,26 @@ +Day of the Week
+Time
• +