RELEASE: 0.9.9
							parent
							
								
									c877a41e0a
								
							
						
					
					
						commit
						f00ed1bcca
					
				
										
											Binary file not shown.
										
									
								
							|  | @ -150,6 +150,21 @@ export class OseActorSheetMonster extends OseActorSheet { | |||
|     } | ||||
|   } | ||||
| 
 | ||||
|   async _onCountChange(event) { | ||||
|     event.preventDefault(); | ||||
|     const itemId = event.currentTarget.closest(".item").dataset.itemId; | ||||
|     const item = this.actor.getOwnedItem(itemId); | ||||
|     if (event.target.dataset.field == "value") { | ||||
|       return item.update({ | ||||
|         "data.counter.value": parseInt(event.target.value), | ||||
|       }); | ||||
|     } else if (event.target.dataset.field == "max") { | ||||
|       return item.update({ | ||||
|         "data.counter.max": parseInt(event.target.value), | ||||
|       }); | ||||
|     } | ||||
|   } | ||||
| 
 | ||||
|   /** | ||||
|    * Activate event listeners using the prepared sheet HTML | ||||
|    * @param html {HTML}   The prepared HTML object ready to be rendered into the DOM | ||||
|  | @ -221,10 +236,10 @@ export class OseActorSheetMonster extends OseActorSheet { | |||
|       actorObject.rollAppearing({ event: event, check: check }); | ||||
|     }); | ||||
| 
 | ||||
|     // html
 | ||||
|     //   .find(".counter input")
 | ||||
|     //   .click((ev) => ev.target.select())
 | ||||
|     //   .change(this._onCountChange.bind(this));
 | ||||
|     html | ||||
|       .find(".counter input") | ||||
|       .click((ev) => ev.target.select()) | ||||
|       .change(this._onCountChange.bind(this)); | ||||
| 
 | ||||
|     html.find(".hp-roll").click((ev) => { | ||||
|       let actorObject = this.actor; | ||||
|  |  | |||
|  | @ -2,7 +2,7 @@ | |||
|   "name": "ose", | ||||
|   "title": "Old-School Essentials", | ||||
|   "description": "Play B/X OSR modules with Old-School Essentials on Foundry VTT", | ||||
|   "version": "0.9.8", | ||||
|   "version": "0.9.9", | ||||
|   "minimumCoreVersion": "0.6.2", | ||||
|   "compatibleCoreVersion": "0.6.5", | ||||
|   "templateVersion": 2, | ||||
|  | @ -41,5 +41,5 @@ | |||
|   "gridUnits": "ft", | ||||
|   "url": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose", | ||||
|   "manifest": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/raw/master/src/system.json", | ||||
|   "download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.9.8.zip" | ||||
|   "download": "https://gitlab.com/mesfoliesludiques/foundryvtt-ose/-/raw/master/package/ose-v0.9.9.zip" | ||||
| } | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue