Skip to content

Commit

Permalink
House rules
Browse files Browse the repository at this point in the history
  • Loading branch information
RaaviArda committed May 22, 2020
1 parent fb964f8 commit 6ee06bb
Show file tree
Hide file tree
Showing 5 changed files with 134 additions and 116 deletions.
17 changes: 12 additions & 5 deletions src/module/actor/sheet/starship.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export class ActorSheetStarfinderStarship extends ActorSheetStarfinder {
static get defaultOptions() {
return mergeObject(super.defaultOptions, {
classes: ["starfinder", "sheet", "actor", "starship"],
witdh: 600,
width: 1200,
height: 800
});
}
Expand Down Expand Up @@ -39,6 +39,9 @@ export class ActorSheetStarfinderStarship extends ActorSheetStarfinder {


const systemsMap = {
"high": CONFIG.STARFINDER.highSlotSystems,
"mid": CONFIG.STARFINDER.midSlotSystems,
"low": CONFIG.STARFINDER.lowSlotSystems,
"bays": CONFIG.STARFINDER.expansionBaySystems,
"security": CONFIG.STARFINDER.securitySystems
};
Expand Down Expand Up @@ -176,7 +179,7 @@ export class ActorSheetStarfinderStarship extends ActorSheetStarfinder {

html.find('.crew-list').each((i, li) => {
li.addEventListener("dragover", this._onCrewDragOver.bind(this), false);
// li.addEventListener("drop", this._onCrewDrop.bind(this), false);
li.addEventListener("drop", this._onCrewDrop.bind(this), false);
});

html.find('li.crew-header').each((i, li) => {
Expand All @@ -185,8 +188,12 @@ export class ActorSheetStarfinderStarship extends ActorSheetStarfinder {
});
}

/** @override */
async _onDrop(event) {
/**
* Handles drop events for the Crew list
*
* @param {Event} event The originating drop event
*/
async _onCrewDrop(event) {
event.preventDefault();

let data;
Expand Down Expand Up @@ -406,4 +413,4 @@ export class ActorSheetStarfinderStarship extends ActorSheetStarfinder {

super._updateObject(event, formData);
}
}
}
21 changes: 21 additions & 0 deletions src/module/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -726,6 +726,27 @@ STARFINDER.shieldSystems = {
"600": "Superior Shields 600"
};

STARFINDER.highSlotSystems = {
"prblnch": "Probe Launcher",
"clk1": "Cloak Mk1",
"clk2": "Cloak Mk2",
"cvclk1": "Covops Cloak Mk1",
"cvclk2": "Covops Cloak Mk2",
"cvclk3": "Covops Cloak Mk3"
};

STARFINDER.midSlotSystems = {
"scram1": "Warp Scrambler Mk1",
"web1": "Stasis Webifier Mk1",
"shb1": "Shield Booster Mk1"
};

STARFINDER.lowSlotSystems = {
"arep1": "Armor Repairer Mk1",
"aplat1": "Armor Plates Mk1",
"sebo1": "Sensor Booster Mk1"
};

STARFINDER.expansionBaySystems = {
"arclab": "Arcane laboratory",
"cargo": "Cargo hold",
Expand Down
15 changes: 5 additions & 10 deletions src/system.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "starfinder",
"title": "Starfinder",
"title": "Starfinder Houserules Raavi",
"description": "A game system for running Starfinder in the Foundry VTT environment.",
"version": "0.2.4",
"author": "wildj79",
"author": "wildj79 + Raavi Arda",
"templateVersion": 2,
"scripts": [],
"esmodules": ["starfinder.js"],
Expand Down Expand Up @@ -36,11 +36,6 @@
"lang": "en",
"name": "English",
"path": "lang/en.json"
},
{
"lang": "ja",
"name": "日本語",
"path": "lang/js.json"
}
],
"socket": true,
Expand All @@ -51,7 +46,7 @@
"secondaryTokenAttribute": "attributes.sp",
"minimumCoreVersion": "0.5.6",
"compatibleCoreVersion": "0.5.7",
"url": "https://github.com/wildj79/foundryvtt-starfinder",
"manifest": "https://raw.githubusercontent.com/wildj79/foundryvtt-starfinder/master/src/system.json",
"download": "https://github.com/wildj79/foundryvtt-starfinder/releases/download/v0.2.4/starfinder-v0.2.4.zip"
"url": "https://github.com/RaaviArda/starfinder-hr-raavi",
"manifest": "https://raw.githubusercontent.com/RaaviArda/starfinder-hr-raavi/master/src/system.json",
"download": "https://github.com/RaaviArda/starfinder-hr-raavi/releases/download/v0.2.4/starfinder-hr-raavi-v0.2.4.zip"
}
35 changes: 33 additions & 2 deletions src/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,18 @@
"quarters": "",
"defense": "",
"driftEngine": "",
"high": {
"value": [],
"custom": ""
},
"mid": {
"value": [],
"custom": ""
},
"low": {
"value": [],
"custom": ""
},
"bays": {
"value": [],
"custom": ""
Expand Down Expand Up @@ -476,7 +488,26 @@
"max": 1,
"value": 0
},
"expansionBays": 0,
"highSlots": {
"min": 0,
"max": 1,
"value": 0
},
"midSlots": {
"min": 0,
"max": 1,
"value": 0
},
"lowSlots": {
"min": 0,
"max": 1,
"value": 0
},
"expansionBays": {
"min": 0,
"max": 1,
"value": 0
},
"mounts": {
"forward": [],
"aft": [],
Expand Down Expand Up @@ -782,4 +813,4 @@
}
}
}
}
}
Loading

0 comments on commit 6ee06bb

Please sign in to comment.