WIP: Party sheet and Weapon tags
- Reworked the party sheet layout - Tags displayed as images in char sheet ?master
							parent
							
								
									38e4343588
								
							
						
					
					
						commit
						8de509be12
					
				
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 43 KiB | 
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 40 KiB | 
										
											Binary file not shown.
										
									
								
							| Before Width: | Height: | Size: 4.6 KiB After Width: | Height: | Size: 4.6 KiB | 
										
											Binary file not shown.
										
									
								
							| After Width: | Height: | Size: 197 KiB | 
|  | @ -49,6 +49,7 @@ | |||
|   "OSE.details.experience.base": "Experience", | ||||
|   "OSE.details.experience.bonus": "Bonus Experience", | ||||
|   "OSE.details.experience.next": "Next level", | ||||
|   "OSE.details.experience.share": "Experience Share", | ||||
|   "OSE.details.experience.award": "XP Award", | ||||
|   "OSE.details.treasure": "Treasure type", | ||||
|   "OSE.details.treasureTable": "Table", | ||||
|  |  | |||
|  | @ -70,5 +70,17 @@ export const OSE = { | |||
|     melee: "OSE.items.Melee", | ||||
|     missile: "OSE.items.Missile", | ||||
|     slow: "OSE.items.Slow", | ||||
|     blunt: "OSE.items.Blunt", | ||||
|     reload: "OSE.items.Reload", | ||||
|     splash: "OSE.items.Splash", | ||||
|     brace: "OSE.items.Brace", | ||||
|     twohanded: "OSE.items.TwoHanded", | ||||
|   }, | ||||
|   tag_images: { | ||||
|     melee: "/systems/ose/assets/melee.png", | ||||
|     missile: "/systems/ose/assets/missile.png", | ||||
|     slow: "<i class='fas fa-snail'></i>", | ||||
|     twohanded: "/systems/ose/assets/twohanded.png", | ||||
|   } | ||||
| }; | ||||
| // fa-sign-language
 | ||||
|  | @ -115,10 +115,10 @@ export class OsePartySheet extends FormApplication { | |||
|   activateListeners(html) { | ||||
|     super.activateListeners(html); | ||||
|     html | ||||
|       .find("button[data-action='select-actors']") | ||||
|       .find(".item-controls .item-control .select-actors") | ||||
|       .click(this._selectActors.bind(this)); | ||||
|      | ||||
|       html.find("button[data-action='deal-xp']").click(this._dealXP.bind(this)); | ||||
|       html.find(".item-controls .item-control .deal-xp").click(this._dealXP.bind(this)); | ||||
|      | ||||
|     html.find("a.resync").click(() => this.render(true)); | ||||
| 
 | ||||
|  |  | |||
|  | @ -34,6 +34,10 @@ export const registerHelpers = async function () { | |||
|     return parseFloat(lh) * parseFloat(rh); | ||||
|   }); | ||||
| 
 | ||||
|   Handlebars.registerHelper("roundWeight", function (weight) { | ||||
|     return Math.round(parseFloat(weight) / 100) / 10; | ||||
|   }); | ||||
| 
 | ||||
|   Handlebars.registerHelper("counter", function (status, value, max) { | ||||
|     return status | ||||
|       ? Math.clamped((100.0 * value) / max, 0, 100) | ||||
|  |  | |||
|  | @ -191,6 +191,8 @@ export class OseItem extends Item { | |||
|         if (matches) { | ||||
|           title = matches[1]; | ||||
|           val = val.substring(0, matches.index); | ||||
|         } else { | ||||
|           title = val; | ||||
|         } | ||||
|         // Auto fill checkboxes
 | ||||
|         switch (val) { | ||||
|  |  | |||
|  | @ -274,6 +274,7 @@ | |||
|           height: 30px; | ||||
|           margin: 0; | ||||
|           line-height: 30px; | ||||
|           flex-basis: 90px; | ||||
|           .item-image { | ||||
|             flex-basis: 30px; | ||||
|             flex-grow: 0; | ||||
|  | @ -285,12 +286,23 @@ | |||
|           } | ||||
|         } | ||||
|       } | ||||
|       .icon-row { | ||||
|         img { | ||||
|           border: none; | ||||
|           margin: 3px 1px; | ||||
|         } | ||||
|       } | ||||
|       .field-flex { | ||||
|         flex: 1; | ||||
|         text-align: left; | ||||
|         font-size: 12px; | ||||
|         text-indent: 8px; | ||||
|       } | ||||
|       .field-longer { | ||||
|         text-indent: 8px; | ||||
|         text-align: left; | ||||
|         flex-basis: 150px; | ||||
|         flex-basis: 90px; | ||||
|         font-size: 12px; | ||||
|         flex-grow: 0; | ||||
|       } | ||||
|       .field-long { | ||||
|         flex-basis: 65px; | ||||
|  |  | |||
|  | @ -15,7 +15,20 @@ | |||
|     color: whitesmoke; | ||||
|     background: $darkBackground; | ||||
|     padding: 4px 0; | ||||
|     text-align: center; | ||||
|     line-height: 20px; | ||||
|     text-align: left; | ||||
|     padding: 2px 10px; | ||||
|     .item-controls { | ||||
|       .item-control { | ||||
|         padding: 0 2px; | ||||
|         button { | ||||
|           line-height: 15px; | ||||
|           margin: 0 1px; | ||||
|           background: rgba(255, 255, 240, 0.8); | ||||
|           border: 1px solid #b5b3a4; | ||||
|         } | ||||
|       } | ||||
|     } | ||||
|   } | ||||
|   .actor-list { | ||||
|     margin: 0; | ||||
|  | @ -23,15 +36,20 @@ | |||
|     list-style: none; | ||||
|     padding: 0; | ||||
|     .actor { | ||||
|       &:nth-child(even) { | ||||
|         background-color: rgba(0, 0, 0, 0.1); | ||||
|       } | ||||
|       border-bottom: 1px solid $colorTan; | ||||
|       border-top: 1px solid $colorTan; | ||||
|       .fas { | ||||
|         padding: 0 2px; | ||||
|         font-size: 10px; | ||||
|       } | ||||
|       padding: 4px; | ||||
|       margin-bottom: 2px; | ||||
|       font-size: 12px; | ||||
|       text-align: center; | ||||
|       .fields .field-row{ | ||||
|         &:nth-child(odd) { | ||||
|           background-color: rgba(0, 0, 0, 0.1); | ||||
|         } | ||||
|       } | ||||
|       .field-img { | ||||
|         flex: 0 0 50px; | ||||
|         position: relative; | ||||
|  | @ -42,14 +60,14 @@ | |||
|         } | ||||
|         img { | ||||
|           border: none; | ||||
|           width: 50px; | ||||
|           height: 50px; | ||||
|           width: 45px; | ||||
|           height: 45px; | ||||
|         } | ||||
|         .img-btns { | ||||
|           position: absolute; | ||||
|           bottom: 0; | ||||
|           left: 0; | ||||
|           width: 50px; | ||||
|           width: 45px; | ||||
|           height: 12px; | ||||
|           button { | ||||
|             display: none; | ||||
|  |  | |||
|  | @ -91,6 +91,7 @@ | |||
|         "alignment": "", | ||||
|         "level": 1, | ||||
|         "xp": { | ||||
|           "share": 100, | ||||
|           "next": 2000, | ||||
|           "value": 0, | ||||
|           "bonus": 0 | ||||
|  |  | |||
|  | @ -33,6 +33,12 @@ | |||
|       <input type="text" name="data.details.xp.bonus" id="experience" value="{{data.details.xp.bonus}}" /> | ||||
|     </div> | ||||
|   </div> | ||||
|   <div class="form-group"> | ||||
|     <label>{{localize "OSE.details.experience.share"}} (%)</label> | ||||
|     <div class="form-fields"> | ||||
|       <input type="text" name="data.details.xp.share" id="experience-share" value="{{data.details.xp.share}}" /> | ||||
|     </div> | ||||
|   </div> | ||||
|   <div class="form-group"> | ||||
|     <label>{{localize "OSE.MeleeBonus"}}</label> | ||||
|     <div class="form-fields"> | ||||
|  |  | |||
|  | @ -22,9 +22,13 @@ | |||
|               </h4> | ||||
|             </a> | ||||
|           </div> | ||||
|           <div class="field-longer"> | ||||
|           <div class="icon-row field-longer"> | ||||
|             {{#each item.data.tags as |tag|}} | ||||
|               {{#if (lookup @root.config.tag_images tag.value)}} | ||||
|                 <img title="{{tag.title}}" src="{{lookup @root.config.tag_images tag.value}}" width="24" height="24"/> | ||||
|               {{else}} | ||||
|               <span title="{{tag.title}}">{{tag.value}}</span> | ||||
|               {{/if}} | ||||
|             {{/each}} | ||||
|           </div> | ||||
|           <div class="field-short"> | ||||
|  |  | |||
|  | @ -1,18 +1,18 @@ | |||
| <form autocomplete="off"> | ||||
|   <header class="flexrow"> | ||||
|     {{#if user.isGM}} | ||||
|     <button data-action="select-actors" type="button"> | ||||
|       {{localize "OSE.dialog.selectActors"}} | ||||
|     </button> | ||||
|     <button data-action="deal-xp" type="button"> | ||||
|       {{localize "OSE.dialog.dealXP"}} | ||||
|     </button> | ||||
|     {{/if}} | ||||
|   </header> | ||||
|   <div class="actor header flexrow"> | ||||
|     <div class="field-name"> | ||||
|       <a class="resync"><i class="fas fa-sync"></i></a> | ||||
|     <div> | ||||
|       <a class="item-control resync"><i class="fas fa-sync"></i></a> | ||||
|     </div> | ||||
|     {{#if user.isGM}} | ||||
|     <div class="item-controls flexrow"> | ||||
|       <div class="item-control"> | ||||
|         <button type="button" class="deal-xp" title="{{localize 'OSE.dialog.dealXP'}}"><i class="fas fa-hand-holding"></i></button> | ||||
|       </div> | ||||
|       <div class="item-control"> | ||||
|         <button type="button" class="select-actors" title="{{localize 'OSE.dialog.selectActors'}}"><i class="fas fa-users"></i></button> | ||||
|       </div> | ||||
|     </div> | ||||
|     {{/if}} | ||||
|   </div> | ||||
|   <ol class="actor-list"> | ||||
|     {{#each data.entities as |e|}} {{#if e.data.flags.ose.party}} | ||||
|  | @ -23,48 +23,61 @@ | |||
|           <button type="button" data-action="open-sheet"><i class="fas fa-user"></i></button> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div> | ||||
|         <div class="flexrow"> | ||||
|       <div class="fields"> | ||||
|         <div class="flexrow field-row"> | ||||
|           <div class="field-name flex2"> | ||||
|             <strong>{{e.name}}</strong> | ||||
|           </div> | ||||
|           <div class="field-long"> | ||||
|           <div class="field-long" title="{{localize 'OSE.Health'}}"> | ||||
|             <i class="fas fa-heart"></i> | ||||
|             {{e.data.data.hp.value}}/{{e.data.data.hp.max}} | ||||
|           </div> | ||||
|           <div class="field-short"> | ||||
|           <div class="field-short" title="{{localize 'OSE.ArmorClass'}}"> | ||||
|             <i class="fas fa-shield-alt"></i> | ||||
|             {{#if @root.settings.ascending}}<strong>{{e.data.data.aac.value}}</strong> <sub>{{e.data.data.aac.naked}}</sub> | ||||
|             {{#if @root.settings.ascending}}<strong>{{e.data.data.aac.value}}</strong> | ||||
|             <sub>{{e.data.data.aac.naked}}</sub> | ||||
|             {{else}}<strong>{{e.data.data.ac.value}}</strong> <sub>{{e.data.data.ac.naked}}</sub> | ||||
|             {{/if}} | ||||
|           </div> | ||||
|         </div> | ||||
|         <div class="flexrow"> | ||||
|           <div class="field-short"> | ||||
|             <i class="fas fa-fist-raised"></i> | ||||
|             <sub>{{e.data.data.thac0.mod.melee}}</sub> <strong>{{e.data.data.thac0.value}}</strong> <sub>{{e.data.data.thac0.mod.missile}}</sub> | ||||
|           </div> | ||||
|           <div class="field-short"> | ||||
|             <i class="fas fa-shoe-prints"></i> | ||||
|             {{e.data.data.movement.encounter}} | ||||
|         <div class="flexrow field-row"> | ||||
|           <div class="field-short" title="{{localize 'OSE.Thac0'}}"> | ||||
|             <i class="fas fa-crosshairs"></i> | ||||
|             {{#unless settings.ascendingAC}} | ||||
|             {{e.data.data.thac0.value}} | ||||
|             {{else}} | ||||
|             {{e.data.data.thac0.bba}} | ||||
|             {{/unless}} | ||||
|           </div> | ||||
|           {{#if (eq e.data.type 'character')}} | ||||
|           <div class="field-short"> | ||||
|             <i class="fas fa-weight-hanging"></i> | ||||
|             {{e.data.data.encumbrance.value}} | ||||
|           <div class="field-short" title="{{localize 'OSE.Melee'}}"> | ||||
|             <i class="fas fa-fist-raised"></i> | ||||
|             {{add e.data.data.scores.str.mod e.data.data.thac0.mod.melee}} | ||||
|           </div> | ||||
|           <div class="field-short"> | ||||
|             <i class="fas fa-circle"></i> | ||||
|             {{e.data.data.treasure}} | ||||
|           <div class="field-short" title="{{localize 'OSE.Missile'}}"> | ||||
|             <i class="fas fa-bullseye"></i> | ||||
|             {{add e.data.data.scores.dex.mod e.data.data.thac0.mod.missile}} | ||||
|           </div> | ||||
|           {{/if}} | ||||
|           <div class="field-short flex2"> | ||||
|             <i class="fas fa-shoe-prints" title="{{localize 'OSE.movement.base'}}"></i> | ||||
|             <span title="{{localize 'OSE.movement.encounter.long'}}">{{e.data.data.movement.encounter}}</span> <sub | ||||
|               title="{{localize 'OSE.movement.exploration.long'}}">{{e.data.data.movement.base}}</sub> | ||||
|           </div> | ||||
|           {{#if (eq e.data.type 'character')}} | ||||
|           <div class="field-short flex2"> | ||||
|             <i class="fas fa-weight-hanging" title="{{localize 'OSE.Encumbrance'}}"></i> | ||||
|             {{roundWeight e.data.data.encumbrance.value}}k | ||||
|           </div> | ||||
|           {{/if}} | ||||
|         </div> | ||||
|         <div class="flexrow"> | ||||
|         <div class="flexrow field-row"> | ||||
|           <div class="field-longer flexrow"> | ||||
|             {{#each e.data.data.saves as |s i|}} | ||||
|             <span>{{lookup @root.config.saves_short i}} {{s.value}}</span> | ||||
|             <span title="{{lookup @root.config.saves_long i}}">{{lookup @root.config.saves_short i}} {{s.value}}</span> | ||||
|             {{/each}} | ||||
|             <span>{{#if (eq e.data.type 'character')}}<i class="fas fa-magic"></i>{{mod e.data.data.scores.wis.mod}}{{/if}}</span> | ||||
|             {{#if (eq e.data.type 'character')}}<span><i class="fas fa-magic" | ||||
|                 title="{{localize 'OSE.saves.magic.long'}}"></i>{{mod e.data.data.scores.wis.mod}}</span>{{/if}} | ||||
|           </div> | ||||
|         </div> | ||||
|       </div> | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue