forked from GitHub-Mirrors/foundry-sw5e
Add Cyr's ugly update in to starship
Update entity.js add failovers to deployment Update swalt-crew.html Show important fields
This commit is contained in:
parent
5fe2740b5a
commit
ad6c694d16
2 changed files with 29 additions and 19 deletions
|
@ -1982,68 +1982,58 @@ export default class Actor5e extends Actor {
|
|||
const charName = char.data.name;
|
||||
const charRank = char.data.data.attributes.rank;
|
||||
let charProf = 0;
|
||||
if (charRank.total > 0) {
|
||||
if (charRank === undefined || charRank.total > 0) {
|
||||
charProf = char.data.data.attributes.prof;
|
||||
}
|
||||
|
||||
if (coord) {
|
||||
ssDeploy.coord.uuid = charUUID;
|
||||
ssDeploy.coord.name = charName;
|
||||
ssDeploy.coord.rank = charRank.coord;
|
||||
ssDeploy.coord.rank = charRank ? charRank.coord : 0;
|
||||
ssDeploy.coord.prof = charProf;
|
||||
}
|
||||
|
||||
if (gunner) {
|
||||
ssDeploy.gunner.uuid = charUUID;
|
||||
ssDeploy.gunner.name = charName;
|
||||
ssDeploy.gunner.rank = charRank.gunner;
|
||||
ssDeploy.gunner.rank = charRank ? charRank.gunner : 0;
|
||||
ssDeploy.gunner.prof = charProf;
|
||||
}
|
||||
|
||||
if (mech) {
|
||||
ssDeploy.mechanic.uuid = charUUID;
|
||||
ssDeploy.mechanic.name = charName;
|
||||
ssDeploy.mechanic.rank = charRank.mechanic;
|
||||
ssDeploy.mechanic.rank = charRank ? charRank.mechanic : 0;
|
||||
ssDeploy.mechanic.prof = charProf;
|
||||
}
|
||||
|
||||
if (oper) {
|
||||
ssDeploy.operator.uuid = charUUID;
|
||||
ssDeploy.operator.name = charName;
|
||||
ssDeploy.operator.rank = charRank.operator;
|
||||
ssDeploy.operator.rank = charRank ? charRank.operator : 0;
|
||||
ssDeploy.operator.prof = charProf;
|
||||
}
|
||||
|
||||
if (pilot) {
|
||||
ssDeploy.pilot.uuid = charUUID;
|
||||
ssDeploy.pilot.name = charName;
|
||||
ssDeploy.pilot.rank = charRank.pilot;
|
||||
ssDeploy.pilot.rank = charRank ? charRank.pilot : 0;
|
||||
ssDeploy.pilot.prof = charProf;
|
||||
}
|
||||
|
||||
if (tech) {
|
||||
ssDeploy.technician.uuid = charUUID;
|
||||
ssDeploy.technician.name = charName;
|
||||
ssDeploy.technician.rank = charRank.technician;
|
||||
ssDeploy.technician.rank = charRank ? charRank.technician : 0;
|
||||
ssDeploy.technician.prof = charProf;
|
||||
}
|
||||
|
||||
if (crew) {
|
||||
ssDeploy.crew.push({
|
||||
uuid: charUUID,
|
||||
name: charName,
|
||||
rank: charRank,
|
||||
prof: charProf
|
||||
});
|
||||
ssDeploy.crew.push({uuid: charUUID, name: charName, rank: charRank, prof: charProf});
|
||||
}
|
||||
|
||||
if (pass) {
|
||||
ssDeploy.passenger.push({
|
||||
uuid: charUUID,
|
||||
name: charName,
|
||||
rank: charRank,
|
||||
prof: charProf
|
||||
});
|
||||
ssDeploy.passenger.push({uuid: charUUID, name: charName, rank: charRank, prof: charProf});
|
||||
}
|
||||
this.update({"data.attributes.deployment": ssDeploy});
|
||||
}
|
||||
|
|
|
@ -8,6 +8,26 @@
|
|||
<li class="filter-item" data-filter="reaction">{{localize "SW5E.Reaction"}}</li>
|
||||
</ul>
|
||||
|
||||
<ol>
|
||||
<li>Coordinator: {{data.attributes.deployment.coord.name}}</li>
|
||||
<li> Rank: {{data.attributes.deployment.coord.rank}}</li>
|
||||
<li> Prof: {{data.attributes.deployment.coord.prof}}</li>
|
||||
<li>Gunner: {{data.attributes.deployment.gunner.name}}</li>
|
||||
<li> Rank: {{data.attributes.deployment.gunner.rank}}</li>
|
||||
<li> Prof: {{data.attributes.deployment.gunner.prof}}</li>
|
||||
<li>Mechanic: {{data.attributes.deployment.mechanic.name}}</li>
|
||||
<li> Rank: {{data.attributes.deployment.mechanic.rank}}</li>
|
||||
<li> Prof: {{data.attributes.deployment.mechanic.prof}}</li>
|
||||
<li>Operator: {{data.attributes.deployment.operator.name}}</li>
|
||||
<li> Rank: {{data.attributes.deployment.operator.rank}}</li>
|
||||
<li> Prof: {{data.attributes.deployment.operator.prof}}</li>
|
||||
<li>Pilot: {{data.attributes.deployment.pilot.name}}</li>
|
||||
<li> Rank: {{data.attributes.deployment.pilot.rank}}</li>
|
||||
<li> Prof: {{data.attributes.deployment.pilot.prof}}</li>
|
||||
<li>Technician: {{data.attributes.deployment.technician.name}}</li>
|
||||
<li> Rank: {{data.attributes.deployment.technician.rank}}</li>
|
||||
<li> Prof: {{data.attributes.deployment.technician.prof}}</li>
|
||||
</ol>
|
||||
|
||||
<ol class="group-list">
|
||||
{{#each sections as |section sid|}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue