Ajout elements bio et fix mineurs
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								images/icons/archetype.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/icons/archetype.webp
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 31 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/equipement.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/icons/equipement.webp
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 29 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/tarot.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/icons/tarot.webp
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 38 KiB | 
							
								
								
									
										
											BIN
										
									
								
								images/icons/wisdom.webp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/icons/wisdom.webp
									
									
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 49 KiB | 
							
								
								
									
										22
									
								
								lang/fr.json
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								lang/fr.json
									
									
									
									
									
								
							| @@ -1,22 +1,12 @@ | ||||
| { | ||||
|   "ACTOR": { | ||||
|     "TypeCharacter": "Character", | ||||
|     "TypeNpc": "NPC" | ||||
|     "TypePersonnage": "Personnage" | ||||
|   }, | ||||
|   "ITEM": { | ||||
|     "TypeWeapon": "Weapon", | ||||
|     "TypeShield": "Shield", | ||||
|     "TypeArmor": "Armor", | ||||
|     "TypeSpell": "Spell", | ||||
|     "TypeModule": "Module", | ||||
|     "TypeMoney": "Money", | ||||
|     "TypeEquipment": "Equipment", | ||||
|     "TypeAction": "Action", | ||||
|     "TypeFreeaction": "Free Action", | ||||
|     "TypeReaction": "Reaction", | ||||
|     "TypeStance": "Stance", | ||||
|     "TypeTrait": "Trait", | ||||
|     "TypeCondition": "Condition", | ||||
|     "TypeCraftingskill": "Crafting Skill" | ||||
|     "TypeArme": "Arme", | ||||
|     "TypeEquipement": "Equipement", | ||||
|     "TypeTarot": "Tarot", | ||||
|     "TypeElementbio": "Element Biographique", | ||||
|     "TypeArchetype": "Archetype" | ||||
|   } | ||||
| } | ||||
| @@ -41,6 +41,7 @@ export class MaleficesActorSheet extends ActorSheet { | ||||
|       equipements: duplicate(this.actor.getEquipements()), | ||||
|       subActors: duplicate(this.actor.getSubActors()), | ||||
|       phyMalus: this.actor.getPhysiqueMalus(), | ||||
|       elementsbio: this.actor.getElementsBio(), | ||||
|       options: this.options, | ||||
|       owner: this.document.isOwner, | ||||
|       editScore: this.options.editScore, | ||||
|   | ||||
| @@ -95,6 +95,12 @@ export class MaleficesActor extends Actor { | ||||
|     return comp; | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   getElementsBio() { | ||||
|     let comp = duplicate(this.items.filter(item => item.type == 'elementbio') || []) | ||||
|     MaleficesUtility.sortArrayObjectsByName(comp) | ||||
|     return comp; | ||||
|   } | ||||
|   /* -------------------------------------------- */ | ||||
|   getTarots() { | ||||
|     let comp = duplicate(this.items.filter(item => item.type == 'tarot') || []) | ||||
|     MaleficesUtility.sortArrayObjectsByName(comp) | ||||
| @@ -297,6 +303,7 @@ export class MaleficesActor extends Actor { | ||||
|     rollData.actorId = this.id | ||||
|     rollData.img = this.img | ||||
|     rollData.phyMalus = this.getPhysiqueMalus() | ||||
|     rollData.elementsbio = this.getElementsBio() | ||||
|     rollData.destin = this.system.pointdestin | ||||
|     rollData.isReroll = false | ||||
|  | ||||
|   | ||||
| @@ -1,8 +1,11 @@ | ||||
| import { MaleficesUtility } from "./malefices-utility.js"; | ||||
|  | ||||
| export const defaultItemImg = { | ||||
|   //skill: "systems/fvtt-malefices/images/icons/skill1.webp", | ||||
|   arme: "systems/fvtt-malefices/images/icones/arme.webp" | ||||
|   arme: "systems/fvtt-malefices/images/icons/arme.webp", | ||||
|   equipement: "systems/fvtt-malefices/images/icons/equipement.webp", | ||||
|   elementbio: "systems/fvtt-malefices/images/icons/wisdom.webp", | ||||
|   archetype: "systems/fvtt-malefices/images/icons/archetype.webp", | ||||
|   tarot: "systems/fvtt-malefices/images/icons/tarot.webp", | ||||
| } | ||||
|  | ||||
| /** | ||||
|   | ||||
| @@ -64,7 +64,7 @@ | ||||
|   ], | ||||
|   "title": "Maléfices, le Jeu de Rôle", | ||||
|   "url": "https://www.uberwald.me/gitea/public/fvtt-malefices", | ||||
|   "version": "10.0.11", | ||||
|   "download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.11.zip", | ||||
|   "version": "10.0.13", | ||||
|   "download": "https://www.uberwald.me/gitea/public/fvtt-malefices/archive/fvtt-malefices-v10.0.13.zip", | ||||
|   "background": "systems/fvtt-malefices/images/ui/malefice_welcome_page.webp" | ||||
| } | ||||
| @@ -1,8 +1,7 @@ | ||||
| { | ||||
|   "Actor": { | ||||
|     "types": [ | ||||
|       "personnage", | ||||
|       "pnj" | ||||
|       "personnage" | ||||
|     ], | ||||
|     "templates": { | ||||
|       "biodata": { | ||||
| @@ -99,9 +98,13 @@ | ||||
|       "arme", | ||||
|       "equipement", | ||||
|       "archetype", | ||||
|       "tarot" | ||||
|       "tarot", | ||||
|       "elementbio" | ||||
|     ], | ||||
|     "templates": {}, | ||||
|     "elementbio": { | ||||
|       "description": "" | ||||
|     }, | ||||
|     "equipement": { | ||||
|       "description": "" | ||||
|     }, | ||||
|   | ||||
| @@ -31,7 +31,7 @@ | ||||
|   {{!-- Sheet Tab Navigation --}} | ||||
|   <nav class="sheet-tabs tabs" data-group="primary"> | ||||
|     <a class="item" data-tab="main">Principal</a> | ||||
|     <a class="item" data-tab="equipements">Equipements</a> | ||||
|     <a class="item" data-tab="equipements">Equipement</a> | ||||
|     <a class="item" data-tab="biodata">Biographie</a> | ||||
|     <a class="item" data-tab="notes">Notes</a> | ||||
|   </nav> | ||||
| @@ -95,6 +95,32 @@ | ||||
|             </li> | ||||
|             {{/each}} | ||||
|           </ul> | ||||
|  | ||||
|           <ul class="item-list alternate-list"> | ||||
|             <li class="item flexrow list-item items-title-bg"> | ||||
|               <span class="item-name-label-header"> | ||||
|                 <h3><label class="items-title-text">Elements biographiques</label></h3> | ||||
|               </span> | ||||
|               <div class="item-filler"> </div> | ||||
|               <div class="item-controls item-controls-fixed"> | ||||
|                 <a class="item-control item-add" data-type="elementbio" title="Create Item"><i class="fas fa-plus"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|  | ||||
|             {{#each elementsbio as |elem key|}} | ||||
|             <li class="item list-item flexrow list-item-shadow" data-item-id="{{elem._id}}"> | ||||
|               <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" | ||||
|                   src="{{elem.img}}" /></a> | ||||
|               <span class="item-name-label">{{elem.name}}</span> | ||||
|  | ||||
|               <div class="item-filler"> </div> | ||||
|               <div class="item-controls item-controls-fixed"> | ||||
|                 <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             {{/each}} | ||||
|           </ul> | ||||
|  | ||||
|         </div> | ||||
|  | ||||
|       </div> | ||||
| @@ -173,24 +199,19 @@ | ||||
|  | ||||
|     {{!-- Biography Tab --}} | ||||
|     <div class="tab biodata" data-group="primary" data-tab="biodata"> | ||||
|       <div> | ||||
|         <ul> | ||||
|           <li class="item flexrow" data-item-id="{{archetype._id}}"> | ||||
|             <label class="item-name-label-medium">Archetype : </label> | ||||
|             <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" src="{{archetype.img}}" /></a> | ||||
|             <span class="item-name-label-medium">{{archetype.name}}</span> | ||||
|             <label class="item-name-label-long">Lame tutélaire : </label> | ||||
|             <span class="item-name-label-medium">{{archetype.tarot.name}}</span> | ||||
|             <div class="item-controls item-controls-fixed"> | ||||
|               <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|             </div> | ||||
|           </li> | ||||
|         </ul> | ||||
|       </div> | ||||
|  | ||||
|       <div class="grid grid-2col"> | ||||
|         <div> | ||||
|           <ul class="item-list alternate-list"> | ||||
|             <li class="item flexrow" data-item-id="{{archetype._id}}"> | ||||
|               <label class="item-name-label-medium">Archetype</label> | ||||
|               <a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img" | ||||
|                   src="{{archetype.img}}" /></a> | ||||
|               <span class="item-name-label-medium">{{archetype.name}}</span> | ||||
|               <div class="item-controls item-controls-fixed"> | ||||
|                 <a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a> | ||||
|               </div> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Lieu de naissance</label> | ||||
|               <input type="text" class="" name="system.biodata.lieunaissance" value="{{system.biodata.lieunaissance}}" | ||||
| @@ -216,6 +237,10 @@ | ||||
|         </div> | ||||
|        <div> | ||||
|           <ul> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Lame tutélaire</label> | ||||
|               <span class="item-name-label-medium">{{archetype.tarot.name}}</span> | ||||
|             </li> | ||||
|             <li class="item flexrow"> | ||||
|               <label class="item-name-label-medium">Résidence</label> | ||||
|               <input type="text" class="" name="system.biodata.residence" value="{{system.biodata.residence}}" data-dtype="String" /> | ||||
| @@ -238,7 +263,7 @@ | ||||
|             </li> | ||||
|           </ul> | ||||
|         </div> | ||||
|   </div> | ||||
|       </div> | ||||
|    | ||||
|         <ul> | ||||
|           <li class="item flexrow"> | ||||
|   | ||||
| @@ -22,19 +22,15 @@ | ||||
|       </div> | ||||
|       {{/if}} | ||||
|        | ||||
|       <div class="flexrow"> | ||||
|         <span class="roll-dialog-label">Bonus/Malus biographique : </span> | ||||
|         <select id="bonusMalusPerso" name="bonusMalusPerso"> | ||||
|           {{#select bonusMalusPerso}}  | ||||
|             <option value="-3">-3</option> | ||||
|             <option value="-2">-2</option> | ||||
|             <option value="-1">-1</option> | ||||
|             <option value="0">0</option> | ||||
|             <option value="1">+1</option> | ||||
|             <option value="2">+2</option> | ||||
|             <option value="3">+3</option> | ||||
|           {{/select}} | ||||
|         </select>         | ||||
|       <div class="flexcol"> | ||||
|         <span class="roll-dialog-label">Rappel des élements biographiques : </span> | ||||
|         <ul class="ul-level1 item-list alternate-list"> | ||||
|           {{#each elementsbio as |elem key|}} | ||||
|             <li class="item flexrow"> | ||||
|               <span class="roll-dialog-label">{{elem.name}}</span> | ||||
|             </li> | ||||
|           {{/each}} | ||||
|         </ul> | ||||
|       </div> | ||||
|  | ||||
|       <div class="flexrow"> | ||||
|   | ||||
							
								
								
									
										27
									
								
								templates/items/item-elementbio-sheet.hbs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								templates/items/item-elementbio-sheet.hbs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,27 @@ | ||||
| <form class="{{cssClass}}" autocomplete="off"> | ||||
|   <header class="sheet-header"> | ||||
|       <img class="item-sheet-img" src="{{img}}" data-edit="img" title="{{name}}"/> | ||||
|       <div class="header-fields"> | ||||
|           <h1 class="charname"><input name="name" type="text" value="{{name}}" placeholder="Name"/></h1> | ||||
|       </div> | ||||
|   </header> | ||||
|    | ||||
|   {{> systems/fvtt-malefices/templates/items/partial-item-nav.hbs}} | ||||
|  | ||||
|  | ||||
|   {{!-- Sheet Body --}} | ||||
|   <section class="sheet-body"> | ||||
|  | ||||
|     {{> systems/fvtt-malefices/templates/items/partial-item-description.hbs}} | ||||
|      | ||||
|     <div class="tab details" data-group="primary" data-tab="details"> | ||||
|  | ||||
|       <div class="tab" data-group="primary"> | ||||
|         <ul> | ||||
|  | ||||
|         </ul> | ||||
|     </div> | ||||
|   </div> | ||||
|  | ||||
|   </section> | ||||
| </form> | ||||
		Reference in New Issue
	
	Block a user