Skip to content

Commit

Permalink
- Fixed a bug that prevented the inventory from loading, if only digi…
Browse files Browse the repository at this point in the history
…tal items are added

- Fixed a bug that lead to apps being shown in the gear section. They are now listed in their own "Apps" section
  • Loading branch information
Diemen committed Feb 14, 2023
1 parent 102df4a commit 01a9062
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 31 deletions.
4 changes: 2 additions & 2 deletions lang/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -368,8 +368,8 @@
"gearLabel": "Spezialausrüstung",
"consumablesLabel": "Konsumgüter",
"programs": {
"label": "Geladene Programme",
"copy": "Programme werden vorbereitet, indem man das Ziel analysiert und das Netzwerk auf Schwachstellen prüft und Codeschnipsel darauf massschneidert. Daher <u>kann ihre Nutzung weder gefunden, noch verhindert werden</u> und sie funktionieren in den meisten Situationen. <u>Drei Programme des gleichen Typs können genutzt werden um das gesamte Netzwerk lahmzulegen.</u> Obwohl so etwas durchaus auffällt benötigt es noch immer einen guten Hacker und etwas Zeit um den Grund für den Fehler zu finden.</i>"
"label": "Geladene Apps",
"copy": "Apps werden vorbereitet, indem man das Ziel analysiert und das Netzwerk auf Schwachstellen prüft und Codeschnipsel darauf massschneidert. Daher <u>kann ihre Nutzung weder gefunden, noch verhindert werden</u> und sie funktionieren in den meisten Situationen. <u>Drei Apps des gleichen Typs können genutzt werden um das gesamte Netzwerk lahmzulegen.</u> Obwohl so etwas durchaus auffällt benötigt es noch immer einen guten Hacker und etwas Zeit um den Grund für den Fehler zu finden.</i>"
},
"npcInventory": {
"quickAddRanged": "Fernkampaffe hinzufügen",
Expand Down
4 changes: 2 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -369,8 +369,8 @@
"gearLabel": "Gear",
"consumablesLabel": "Consumables",
"programs": {
"label": "Programs Loaded",
"copy": "Programs are prepared by analyzing the target network for vulnerabilities writing code snippets directly tailored to those. Therefore <u>they cannot be easily found nor prevented</u> and work in nearly any situation. <u>Three programs of the same type can be used to affect all devices in the network</u> at once. Although this is a quite obvious attack even this takes some time and a good hacker to find the source of such a malicious act.</i>"
"label": "Apps Loaded",
"copy": "Apps are prepared by analyzing the target network for vulnerabilities writing code snippets directly tailored to those. Therefore <u>they cannot be easily found nor prevented</u> and work in nearly any situation. <u>Three apps of the same type can be used to affect all devices in the network</u> at once. Although this is a quite obvious attack even this takes some time and a good hacker to find the source of such a malicious act.</i>"
},
"npcInventory": {
"quickAddRanged": "Quick Add Ranged",
Expand Down
13 changes: 7 additions & 6 deletions module/actor/EPactorSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,14 @@ export default class EPactorSheet extends ActorSheet {
}
aspect[itemModel.psiType].push(item);
}
else if (item.type === 'program') {
else if (item.type === 'program' || item.system.slotType === 'digital') {

if (itemModel.slotType = 'digital')
itemModel.slotName = "ep2e.item.general.table.slot.digital";

program.push(item);
}
else if (item.system.slotType === 'accessory' || item.system.slotType === 'bulky' || item.system.slotType === 'digital' || item.system.slotType === 'notMobile') {
else if (item.system.slotType === 'accessory' || item.system.slotType === 'bulky' || item.system.slotType === 'notMobile') {
let slotType = itemModel.slotType;
switch (slotType){
case 'accessory':
Expand All @@ -378,9 +382,6 @@ export default class EPactorSheet extends ActorSheet {
case 'bulky':
itemModel.slotName = "ep2e.item.general.table.slot.bulky";
break;
case 'digital':
itemModel.slotName = "ep2e.item.general.table.slot.digital";
break;
case 'notMobile':
itemModel.slotName = "ep2e.item.general.table.slot.notMobile";
break;
Expand All @@ -389,7 +390,7 @@ export default class EPactorSheet extends ActorSheet {
}
gear.push(item);
}
else if (item.system.slotType === 'consumable') {
else if (item.system.slotType === 'consumable' && item.system.slotType != 'digital') {
itemModel.slotName = "ep2e.item.general.table.slot.consumable";
consumable.push(item);
}
Expand Down
38 changes: 17 additions & 21 deletions templates/actor/partials/tabs/gear-tab.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,28 +126,24 @@ <h3 class="subheader">{{localize "ep2e.inventory.programs.label"}}</h3>
<div class="itemBackground" style="position: relative; z-index: 2;">
<div class="grid grid-2col">
{{#each actor.program as |item id|}}
<div>
<div class="item flexrow flex-group-center offHand" data-item-id="{{item._id}}">
<label class="flex-group-center noMargin flex-group-left"><strong>{{item.name}}</strong></label>
<label
class="input-small"><strong>Uses</strong></label><input
class="input-small sheet-inline-edit"
data-field="system.quantity" type="number"
name="item.system.quantity" value="{{item.system.quantity}}" placeholder="0"/>
<div class="flex-group-right slideShow" style="max-width: 45px;">
<a><i class="fas fa-plus icon-small"></i></a>
<a class="noShow"><i class="fas fa-minus icon-small"></i></a>
<div class="item flexrow offHand flex-group-center" data-item-id="{{item._id}}">
<div class="item-image flex-group-left input-small"><img src="{{item.img}}" title="{{item.name}}" width="24" height="24"/></div>
<label class="truncate alignLeft" style="flex: 3.5;"><strong>{{item.name}}</strong></label>
<label class="flex-group-center alignCenter" style="background: none; font-size: 12px; flex: 0.4; margin-left: 10px;"><i>{{localize item.system.slotName}}</i></label>
<input class="input-small sheet-inline-edit" data-field="system.quantity" type="number" name="item.system.quantity" value="{{item.system.quantity}}" placeholder="0"/>
<div class="flex-group-right slideShow">
<a><i class="fas fa-plus icon-small"></i></a>
<a class="noShow"><i class="fas fa-minus icon-small"></i></a>
</div>
<div class="item showMore descriptionContainer" data-item-id="{{item._id}}">
{{#if item.system.description}}
<div class="itemDescription shape3">
{{item.system.description}}
</div>
<div class="item showMore descriptionContainer" data-item-id="{{item._id}}">
{{#if item.system.description}}
<div class="itemDescription shape3">
{{item.system.description}}
</div>
{{/if}}
<div class="flexrow flex-between item-controls">
<a class="item-control item-delete resource-label editWithLabel" title="Delete Item"> {{localize "ep2e.actorSheet.button.delete"}} <i class="far fa-times-circle"></i></a>
<a class="item-control item-edit resource-label editWithLabel alignRight" title="Edit Item"> {{localize "ep2e.actorSheet.button.edit"}} <i class="far fa-edit"></i></a>
</div>
{{/if}}
<div class="flexrow flex-between item-controls">
<a class="item-control item-delete resource-label editWithLabel" title="Delete Item"> {{localize "ep2e.actorSheet.button.delete"}} <i class="far fa-times-circle"></i></a>
<a class="item-control item-edit resource-label editWithLabel alignRight" title="Edit Item"> {{localize "ep2e.actorSheet.button.edit"}} <i class="far fa-edit"></i></a>
</div>
</div>
</div>
Expand Down

0 comments on commit 01a9062

Please sign in to comment.