diff --git a/modules/pegasus-actor.js b/modules/pegasus-actor.js index ecfd8a8..819a86b 100644 --- a/modules/pegasus-actor.js +++ b/modules/pegasus-actor.js @@ -1981,7 +1981,12 @@ export class PegasusActor extends Actor { crewList.push( {id: actorId}) 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") { // Find relevant actor diff --git a/modules/pegasus-vehicle-sheet.js b/modules/pegasus-vehicle-sheet.js index 47bc3f2..decc8ef 100644 --- a/modules/pegasus-vehicle-sheet.js +++ b/modules/pegasus-vehicle-sheet.js @@ -138,18 +138,11 @@ export class PegasusVehicleSheet extends ActorSheet { let itemId = li.data("item-id"); this.actor.perkEffectUsed( itemId) }); - - html.find('.subactor-edit').click(ev => { - const li = $(ev.currentTarget).parents(".item"); - let actorId = li.data("actor-id"); - let actor = game.actors.get( 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('.member-delete').click(ev => { + const li = $(ev.currentTarget).parents(".item") + let actorId = li.data("actor-id") + this.actor.delCrew(actorId) }); html.find('.quantity-minus').click(event => { diff --git a/system.json b/system.json index 7d343c1..375a8fc 100644 --- a/system.json +++ b/system.json @@ -253,7 +253,7 @@ ], "title": "Pegasus RPG", "url": "https://www.uberwald.me/data/files/fvtt-pegasus-rpg", - "version": "10.0.11", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-pegasus-rpg/archive/fvtt-pegasus-rpg-v10.0.11.zip", + "version": "10.0.12", + "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" } \ No newline at end of file