This commit is contained in:
sladecraven 2022-09-27 13:38:29 +02:00
parent 6554b1892e
commit f4fc6279b0
3 changed files with 2 additions and 289 deletions

View File

@ -24,8 +24,8 @@ const __isVehicleUnique = { vehiclehull: 1, powercoremodule: 1, mobilitymodule:
const __speed2Num = { fullstop: 0, crawling: 1, slow: 2, average: 3, fast: 4, extfast: 5 }
const __num2speed = ["fullstop", "crawling", "slow", "average", "fast", "extfast"]
const __isVehicle = { vehiclehull: 1, powercoremodule: 1, mobilitymodule: 1, combatmodule: 1,
propulsionmodule: 1, vehiclemodule: 1, vehicleweaponmodule: 1, effect: 1, equipment: 1, weapon: 1, armor: 1, shield:1, money: 1, cargo: 1 }
const __isVehicleCargo = {equipment: 1, weapon: 1, armor: 1, shield:1, money: 1, cargo: 1}
propulsionmodule: 1, vehiclemodule: 1, vehicleweaponmodule: 1, effect: 1, cargo: 1 }
const __isVehicleCargo = {cargo: 1}
const __bonusEffect = {
name: "Crawling MAN Bonus", type: "effect", img: "systems/fvtt-pegasus-rpg/images/icons/icon_effect.webp",
system: {

View File

@ -54,10 +54,6 @@ export class PegasusVehicleSheet extends ActorSheet {
propulsionModules: duplicate(this.actor.getPropulsionModules()),
vehicleModules: duplicate(this.actor.getVehicleModules()),
vehicleWeaponModules: duplicate(this.actor.getVehicleWeaponModules()),
weapons: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getWeapons()) ),
armors: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getArmors())),
shields: this.actor.checkAndPrepareEquipments( duplicate(this.actor.getShields()) ),
equipments: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getEquipmentsOnly()) ),
cargos: this.actor.checkAndPrepareEquipments(duplicate(this.actor.getCargos()) ),
cargoCurrent: this.actor.getCurrentCargoCapacity(),
moneys: duplicate(this.actor.getMoneys()),

View File

@ -650,289 +650,6 @@
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Money</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Qty</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="money" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each moneys as |money key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{money._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{money.img}}" /></a>
<span class="item-name-label">{{money.name}}</span>
<span class="item-field-label-long"><label>
{{money.system.quantity}}
(<a class="quantity-minus plus-minus-button"> -</a>/<a class="quantity-plus plus-minus-button">+</a>)
</label>
</span>
<span class="item-field-label-medium">
<label>{{money.system.weight}}</label>
</span>
<span class="item-field-label-medium">
{{#if money.system.idrDice}}
<a class="roll-idr" data-dice-value="{{money.system.idrDice}}">{{money.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Weapons</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Attack</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Damage</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">DMGT</label>
</span>
<span class="item-field-label-long">
<label class="short-label">Ammo</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="weapon" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each weapons as |weapon key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{weapon._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{weapon.img}}" /></a>
<span class="item-name-label">{{weapon.name}}</span>
<span class="item-field-label-short"><label>{{upper weapon.system.statistic}}</label></span>
<span class="item-field-label-short"><label>{{upper weapon.system.damagestatistic}}</label></span>
<span class="item-field-label-short"><label>{{weapon.system.damageDice}}</label></span>
<span class="item-field-label-medium"><label>{{weapon.system.damagetype}} ({{weapon.system.damagetypelevel}})</label></span>
{{#if (gt weapon.system.ammomax 0)}}
<span class="item-field-label-long"><label>{{weapon.system.ammocurrent}}/{{weapon.system.ammomax}}
(<a class="ammo-minus plus-minus-button"> -</a>/<a class="ammo-plus plus-minus-button">+</a>)
</label></span>
{{else}}
<span class="item-field-label-long"><label>-</label>
</span>
{{/if}}
<span class="item-field-label-medium">
{{#if (count weapon.system.effects)}}
{{#if weapon.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short"><label>{{weapon.system.weight}}</label></span>
<span class="item-field-label-medium">
{{#if weapon.system.idrDice}}
<a class="roll-idr" data-dice-value="{{weapon.system.idrDice}}">{{weapon.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Armors</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Stat</label>
</span>
<span class="item-field-label-short">
<label class="short-label">DMG RES</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Loc</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="armor" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each armors as |armor key|}}
<li class="item list-item flexrow list-item-shadow" data-item-id="{{armor._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{armor.img}}" /></a>
<span class="item-name-label">{{armor.name}}</span>
<span class="item-field-label-short">{{upper armor.system.statistic}}</span>
<span class="item-field-label-short">{{armor.system.resistanceDice}}</span>
<span class="item-field-label-medium">{{armor.system.locationprotected}}</span>
<span class="item-field-label-medium">
{{#if (count armor.system.effects)}}
{{#if armor.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{armor.system.weight}}</span>
<span class="item-field-label-medium">
{{#if armor.system.idrDice}}
<a class="roll-idr" data-dice-value="{{armor.system.idrDice}}">{{armor.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Shields</label></h3>
</span>
<span class="item-field-label-short">
<label class="short-label">Dice</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="shield" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each shields as |shield key|}}
<li class="item flexrow list-item list-item-shadow" data-item-id="{{shield._id}}">
<a class="item-edit item-name-img" title="Edit Item"><img class="sheet-competence-img"
src="{{shield.img}}" /></a>
<span class="item-name-label">{{shield.name}}</span>
<span class="item-field-label-short">{{shield.system.levelDice}}</span>
<span class="item-field-label-medium">
{{#if (count shield.system.effects)}}
{{#if shield.system.activated}}
<a class="equip-deactivate">Deactivate</a>
{{else}}
<a class="equip-activate">Activate</a>
{{/if}}
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<span class="item-field-label-short">{{shield.system.weight}}</span>
<span class="item-field-label-medium">
{{#if shield.system.idrDice}}
<a class="roll-idr" data-dice-value="{{shield.system.idrDice}}">{{shield.system.idrDice}}</a>
{{else}}
&nbsp;-&nbsp;
{{/if}}
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
</div>
</li>
{{/each}}
</ul>
<ul class="item-list alternate-list">
<li class="item flexrow list-item items-title-bg">
<span class="item-name-label-header">
<h3><label class="items-title-text">Equipment</label></h3>
</span>
<span class="item-field-label-long">
<label class="short-label">Quantity</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">Act/Deact</label>
</span>
<span class="item-field-label-short">
<label class="short-label">Weight</label>
</span>
<span class="item-field-label-medium">
<label class="short-label">IDR</label>
</span>
<div class="item-filler">&nbsp;</div>
<div class="item-controls item-controls-fixed">
<a class="item-control item-add" data-type="equipment" title="Create Item"><i class="fas fa-plus"></i></a>
</div>
</li>
{{#each equipments as |equip key|}}
{{> systems/fvtt-pegasus-rpg/templates/partial-actor-equipment.html equip=equip level=1 canequip=false}}
{{/each}}
</ul>
<hr>
<h3>Cargo information : </h3>
<div class="form-group editor">