ENH: Blind roll fixed
							parent
							
								
									fb232dfa81
								
							
						
					
					
						commit
						1eaf480c5b
					
				|  | @ -29,6 +29,12 @@ export const addChatMessageContextOptions = function(html, options) { | |||
| /* -------------------------------------------- */ | ||||
| 
 | ||||
| export const addChatMessageButtons = function(msg, html, data) { | ||||
|   // Hide blind rolls
 | ||||
|   let blindable = html.find('.blindable'); | ||||
|   if (msg.data.blind && !game.user.isGM && blindable && blindable.data('blind') === true) { | ||||
|     blindable.replaceWith("<div class='dice-roll'><div class='dice-result'><div class='dice-formula'>???</div></div></div>"); | ||||
|   } | ||||
|   // Buttons
 | ||||
|   let roll = html.find('.damage-roll'); | ||||
|   if (roll.length > 0) { | ||||
|     let total = roll.find('.dice-total'); | ||||
|  |  | |||
|  | @ -76,8 +76,8 @@ export class OseDice { | |||
|     rollMode = form ? form.rollMode.value : rollMode; | ||||
| 
 | ||||
|     // Force blind roll (ability formulas)
 | ||||
|     if (data.blindroll) { | ||||
|       rollMode = "blindroll"; | ||||
|     if (data.roll.blindroll) { | ||||
|       rollMode = game.user.isGM ? "selfroll" : "blindroll"; | ||||
|     } | ||||
| 
 | ||||
|     if (["gmroll", "blindroll"].includes(rollMode)) | ||||
|  |  | |||
|  | @ -8,6 +8,7 @@ | |||
|             <div class="chat-img" style="background-image:url('{{data.actor.img}}')"></div> | ||||
|             {{/if}} | ||||
|         </div> | ||||
|         <div class="blindable" data-blind="{{data.roll.blindroll}}"> | ||||
|             {{#if result.details}}<div class="chat-details">{{{result.details}}}</div>{{/if}} | ||||
|             {{#if result.isFailure}}<div class='roll-result roll-fail'><b>{{localize 'OSE.Failure'}}</b> ({{result.target}}) | ||||
|             </div>{{/if}} | ||||
|  | @ -15,4 +16,5 @@ | |||
|                 ({{result.target}})</div>{{/if}} | ||||
|             {{#if rollOSE}}<div>{{{rollOSE}}}</div>{{/if}} | ||||
|         </div> | ||||
|     </div> | ||||
| </section> | ||||
		Loading…
	
		Reference in New Issue