Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
orome70 committed Jan 28, 2021
2 parents 4300c56 + 9fc7bfc commit df03cb5
Show file tree
Hide file tree
Showing 10 changed files with 113 additions and 57 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules
34 changes: 33 additions & 1 deletion lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,11 @@
"spellcraft": "Spellcraft"
},
"sheetLabels": {
"stats": "Stats",
"perks": "Perks",
"gear": "Gear",
"powers": "Powers",
"background": "Background",
"enhancements": "Enhancements",
"generalGear": "General Gear",
"armor": "Armor",
Expand All @@ -199,8 +203,36 @@
"skills": "Skills",
"possibilitypotential": "Possibilities (Potential)",
"possibilities": "Possibilities",
"up": "Up",
"equipment": "Equipment",
"specialabilities": "Special Abilities"
"specialabilities": "Special Abilities",
"wounds": "Wounds",
"shock": "Shock",
"attributes": "Attributes",
"move": "Move",
"run": "Run",
"toughness": "Toughness",
"magic": "Magic",
"social": "Social",
"spirit": "Spirit",
"tech": "Tech",
"attribute": "Attribute",
"adds": "Adds",
"total": "Total",
"defenses": "Defenses",
"melee": "Melee",
"unarmed": "Unarmed",
"xp": "XP",
"unspent": "Unspent",
"earned": "Earned",
"clearance": "Clearance",
"race": "Race",
"weapons": "Weapons",
"armorAndShields": "Armor and Shields",
"other": "Other",
"spell": "Spell",
"miracle": "Miracle",
"psionicPower": "Psionic Power"
},
"itemSheetDescriptions": {
"perk": "Perk",
Expand Down
30 changes: 26 additions & 4 deletions module/sheets/torgeternityActorSheet.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,32 @@ export default class torgeternityActorSheet extends ActorSheet {

// Delete Inventory Item
html.find('.item-delete').click(ev => {
const li = $(ev.currentTarget).parents(".item");
this.actor.deleteOwnedItem(li.data("itemId"));
li.slideUp(200, () => this.render(false));
});
let applyChanges = false;
new Dialog({
title: "Confirm Deletion",
content: "Are you sure you want to delete this? It will be permanently removed from the sheet.",
buttons: {
yes: {
icon: '<i class="fas fa-check"></i>',
label: "Yes",
callback: () => applyChanges = true
},
no: {
icon: '<i class="fas fa-times"></i>',
label: "No"
},
},
default: "yes",
close: html => {
if (applyChanges) {
const li = $(ev.currentTarget).parents(".item");
this.actor.deleteOwnedItem(li.data("itemId"));
li.slideUp(200, () => this.render(false));
}
}
}).render(true);
});

// Toggle Item Detail Visibility
html.find('.item-name').click(ev => {
let section = event.currentTarget.closest(".item");
Expand Down
2 changes: 1 addition & 1 deletion module/torgchecks.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function PossibilityCheck ({
icon: "<i class='fas fa-times'></i>",
label: `Cancel`
},
},
},
default: "yes",
close: html => {
if (applyChanges) {
Expand Down
1 change: 1 addition & 0 deletions module/torgeternityItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ export default class torgeternityItem extends Item {
var messageContent = `Bonus:` + bonus; }

// Calculate base damage

if (this.data.data.damageType == "flat") {
var baseDamage = this.data.data.damage;}
else if (this.data.data.damageType == "strengthPlus") {
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"title": "Torg Eternity",
"description": "Unofficial Torg Eternity character sheet for Foundry VTT.",
"author": "Matt Ritchie",
"version": "0.90.3",
"version": "0.90.4",
"minimumCoreVersion": "0.7.8",
"compatibleCoreVersion": "0.7.9",
"templateVersion": 2,
Expand Down
10 changes: 5 additions & 5 deletions template.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"value": 0
},
"attributes": {
"charisma": 5,
"dexterity": 5,
"mind": 5,
"spirit": 5,
"strength": 5
"charisma": 8,
"dexterity": 8,
"mind": 8,
"spirit": 8,
"strength": 8
},
"other": {
"move": 5,
Expand Down
4 changes: 2 additions & 2 deletions templates/sheets/gear-sheet.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<form class="{{cssClass}} item-sheet" autocomplete="off">
<header class="sheet-header">
<img src="{{item.img}}" data-edit="img" title="{{item.name}}" height="64" width="64"/>
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Firearm Name" style="background-color:white;border-radius:10px;width:320px;font-family:'Palatino Linotype"/></h1>
<h1 style="font-size:42px;text-align:right;font-family:'Palatino Linotype'">{{localize "torgeternity.itemSheetDescriptions.generalGear"}}</h1>
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Firearm Name" style="background-color:white;border-radius:10px;width:320px;font-family:'Palatino Linotype'" /></h1>
<h1 style="font-size:32px;text-align:right;font-family:'Palatino Linotype'">{{localize "torgeternity.itemSheetDescriptions.generalGear"}}</h1>
</header>
<div class="sheet-content">
<table style="background-color:transparent;border: 0px solid black">
Expand Down
4 changes: 2 additions & 2 deletions templates/sheets/shield-sheet.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<form class="{{cssClass}} item-sheet" autocomplete="off">
<header class="sheet-header">
<img src="{{item.img}}" data-edit="img" title="{{item.name}}" height="64" width="64"/>
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Firearm Name" style="background-color:white;border-radius:10px;width:320px;font-family:'Palatino Linotype"/></h1>
<h1 style="font-size:40px;text-align:right;font-family:'Palatino Linotype'">{{localize "torgeternity.itemSheetDescriptions.shield"}}</h1>
<h1><input name="name" type="text" value="{{item.name}}" placeholder="Firearm Name" style="background-color:white;border-radius:10px;width:320px;font-family:'Palatino Linotype'"/></h1>
<h1 style="font-size:36px;text-align:right;font-family:'Palatino Linotype'">{{localize "torgeternity.itemSheetDescriptions.shield"}}</h1>
</header>
<div class="sheet-content">
<table style="background-color:transparent;border: 0px solid black">
Expand Down
Loading

0 comments on commit df03cb5

Please sign in to comment.