Actor/Crew rolls
This commit is contained in:
		| @@ -1981,6 +1981,11 @@ export class PegasusActor extends Actor { | |||||||
|     crewList.push( {id: actorId})  |     crewList.push( {id: actorId})  | ||||||
|     this.update( { 'system.crew': crewList } ) |     this.update( { 'system.crew': crewList } ) | ||||||
|   } |   } | ||||||
|  |   /* -------------------------------------------- */ | ||||||
|  |   delCrew(actorId) { | ||||||
|  |     let crewList = duplicate( this.system.crew.filter( actorDef => actorDef.id != actorId ) || [] ) | ||||||
|  |     this.update( { 'system.crew': crewList } ) | ||||||
|  |   } | ||||||
|    |    | ||||||
|   /* -------------------------------------------- */ |   /* -------------------------------------------- */ | ||||||
|   rollPoolFromVehicle(statKey, useShield = false, subKey = "none") { |   rollPoolFromVehicle(statKey, useShield = false, subKey = "none") { | ||||||
|   | |||||||
| @@ -139,17 +139,10 @@ export class PegasusVehicleSheet extends ActorSheet { | |||||||
|       this.actor.perkEffectUsed( itemId) |       this.actor.perkEffectUsed( itemId) | ||||||
|     });       |     });       | ||||||
|          |          | ||||||
|     html.find('.subactor-edit').click(ev => { |     html.find('.member-delete').click(ev => { | ||||||
|       const li = $(ev.currentTarget).parents(".item"); |       const li = $(ev.currentTarget).parents(".item") | ||||||
|       let actorId = li.data("actor-id"); |       let actorId = li.data("actor-id") | ||||||
|       let actor = game.actors.get( actorId ); |       this.actor.delCrew(actorId) | ||||||
|       actor.sheet.render(true); |  | ||||||
|     }); |  | ||||||
|      |  | ||||||
|     html.find('.subactor-delete').click(ev => { |  | ||||||
|       const li = $(ev.currentTarget).parents(".item"); |  | ||||||
|       let actorId = li.data("actor-id"); |  | ||||||
|       this.actor.delSubActor(actorId); |  | ||||||
|     }); |     }); | ||||||
|      |      | ||||||
|     html.find('.quantity-minus').click(event => { |     html.find('.quantity-minus').click(event => { | ||||||
|   | |||||||
| @@ -253,7 +253,7 @@ | |||||||
|   ], |   ], | ||||||
|   "title": "Pegasus RPG", |   "title": "Pegasus RPG", | ||||||
|   "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", |   "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", | ||||||
|   "version": "10.0.11", |   "version": "10.0.12", | ||||||
|   "download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.11.zip", |   "download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.12.zip", | ||||||
|   "background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp" |   "background": "systems/fvtt-pegasus-rpg/images/ui/pegasus_welcome_page.webp" | ||||||
| } | } | ||||||
		Reference in New Issue
	
	Block a user