Add missing items/actors
This commit is contained in:
@@ -34,7 +34,8 @@ Hooks.once("init", function () {
|
||||
CONFIG.Actor.dataModels = {
|
||||
protagonist: models.FTLNomadCharacter,
|
||||
vehicle: models.FTLNomadVehicle,
|
||||
creature: models.FTLNomadNPC
|
||||
creature: models.FTLNomadNPC,
|
||||
starship: models.FTLNomadStarship
|
||||
}
|
||||
|
||||
CONFIG.Item.documentClass = documents.FTLNomadItem
|
||||
@@ -44,14 +45,16 @@ Hooks.once("init", function () {
|
||||
armor: models.FTLNomadArmor,
|
||||
talent: models.FTLNomadTalent,
|
||||
language: models.FTLNomadLanguage,
|
||||
equipment: models.FTLNomadEquipment
|
||||
equipment: models.FTLNomadEquipment,
|
||||
implant: models.FTLNomadImplant
|
||||
}
|
||||
|
||||
// Register sheet application classes
|
||||
Actors.unregisterSheet("core", ActorSheet)
|
||||
Actors.registerSheet("fvtt-ftl-nomad", applications.FTLNomadCharacterSheet , { types: ["character"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-ftl-nomad", applications.FTLNomadVehicleSheet, { types: ["vehicle"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-ftl-nomad", applications.FTLNomadNPCSheet, { types: ["npc"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-ftl-nomad", applications.FTLNomadCreatureSheet, { types: ["creature"], makeDefault: true })
|
||||
Actors.registerSheet("fvtt-ftl-nomad", applications.FTLNomadStarshipSheet, { types: ["starship"], makeDefault: true })
|
||||
|
||||
Items.unregisterSheet("core", ItemSheet)
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadPsionicSheet, { types: ["psionic"], makeDefault: true })
|
||||
@@ -60,6 +63,9 @@ Hooks.once("init", function () {
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadWeaponSheet, { types: ["weapon"], makeDefault: true })
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadArmorSheet, { types: ["armor"], makeDefault: true })
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadEquipmentSheet, { types: ["equipment"], makeDefault: true })
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadImplantSheet, { types: ["implant"], makeDefault: true })
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadCreatureTraitSheet, { types: ["creature-trait"], makeDefault: true })
|
||||
Items.registerSheet("fvtt-ftl-nomad", applications.FTLNomadCreatureAbilitySheet, { types: ["creature-ability"], makeDefault: true })
|
||||
|
||||
// Other Document Configuration
|
||||
CONFIG.ChatMessage.documentClass = documents.FTLNomadChatMessage
|
||||
|
@@ -6,5 +6,9 @@ export { default as FTLNomadLanguageSheet } from "./sheets/language-sheet.mjs"
|
||||
export { default as FTLNomadTalentSheet } from "./sheets/talent-sheet.mjs"
|
||||
export { default as FTLNomadCharacterSheet } from "./sheets/character-sheet.mjs"
|
||||
export { default as FTLNomadEquipmentSheet } from "./sheets/equipment-sheet.mjs"
|
||||
export { default as FTLNomadNPCSheet } from "./sheets/npc-sheet.mjs"
|
||||
export { default as FTLNomadNPCSheet } from "./sheets/creature-sheet.mjs"
|
||||
export { default as FTLNomadImplantSheet } from "./sheets/implant-sheet.mjs"
|
||||
export { default as FTLNomadStarshipSheet } from "./sheets/starship-sheet.mjs"
|
||||
export { default as FTLNomadCreatureTraitSheet } from "./sheets/creature-trait-sheet.mjs"
|
||||
export { default as FTLNomadCreatureAbilitySheet } from "./sheets/creature-ability-sheet.mjs"
|
||||
|
||||
|
28
module/applications/sheets/creature-ability-sheet.mjs
Normal file
28
module/applications/sheets/creature-ability-sheet.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import FTLNomadItemSheet from "./base-item-sheet.mjs"
|
||||
|
||||
export default class FTLNomadCreatureAbilitySheet extends FTLNomadItemSheet {
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["creature-ability"],
|
||||
position: {
|
||||
width: 600,
|
||||
},
|
||||
window: {
|
||||
contentClasses: ["creature-ability-content"],
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/fvtt-ftl-nomad/templates/creature-ability.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
28
module/applications/sheets/creature-trait-sheet.mjs
Normal file
28
module/applications/sheets/creature-trait-sheet.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import FTLNomadItemSheet from "./base-item-sheet.mjs"
|
||||
|
||||
export default class FTLNomadCreatureTraitSheet extends FTLNomadItemSheet {
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["creature-trait"],
|
||||
position: {
|
||||
width: 600,
|
||||
},
|
||||
window: {
|
||||
contentClasses: ["creature-trait-content"],
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/fvtt-ftl-nomad/templates/creature-trait.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
return context
|
||||
}
|
||||
}
|
27
module/applications/sheets/implant-sheet.mjs
Normal file
27
module/applications/sheets/implant-sheet.mjs
Normal file
@@ -0,0 +1,27 @@
|
||||
import FTLNomadItemSheet from "./base-item-sheet.mjs"
|
||||
|
||||
export default class FTLNomadImplantSheet extends FTLNomadItemSheet {
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["implant"],
|
||||
position: {
|
||||
width: 600,
|
||||
},
|
||||
window: {
|
||||
contentClasses: ["implant-content"],
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/fvtt-cthulhu-eternal/templates/implant.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
return context
|
||||
}
|
||||
}
|
117
module/applications/sheets/starship-sheet.mjs
Normal file
117
module/applications/sheets/starship-sheet.mjs
Normal file
@@ -0,0 +1,117 @@
|
||||
import FTLNomadActorSheet from "./base-actor-sheet.mjs"
|
||||
|
||||
export default class FTLNomadStarshipSheet extends FTLNomadActorSheet {
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["vehicle"],
|
||||
position: {
|
||||
width: 680,
|
||||
height: 540,
|
||||
},
|
||||
window: {
|
||||
contentClasses: ["vehicle-content"],
|
||||
},
|
||||
actions: {
|
||||
createGear: FTLNomadStarshipSheet.#onCreateGear,
|
||||
createWeapon: FTLNomadStarshipSheet.#onCreateWeapon,
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/fvtt-ftl-nomad/templates/starship-main.hbs",
|
||||
},
|
||||
tabs: {
|
||||
template: "templates/generic/tab-navigation.hbs",
|
||||
},
|
||||
equipment: {
|
||||
template: "systems/fvtt-ftl-nomad/templates/starship-equipment.hbs",
|
||||
},
|
||||
description: {
|
||||
template: "systems/fvtt-ftl-nomad/templates/starship-description.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
tabGroups = {
|
||||
sheet: "equipment",
|
||||
}
|
||||
|
||||
/**
|
||||
* Prepare an array of form header tabs.
|
||||
* @returns {Record<string, Partial<ApplicationTab>>}
|
||||
*/
|
||||
#getTabs() {
|
||||
const tabs = {
|
||||
equipment: { id: "equipment", group: "sheet", icon: "fa-solid fa-shapes", label: "FTLNOMAD.Label.equipment" },
|
||||
description: { id: "description", group: "sheet", icon: "fa-solid fa-book", label: "FTLNOMAD.Label.description" },
|
||||
}
|
||||
for (const v of Object.values(tabs)) {
|
||||
v.active = this.tabGroups[v.group] === v.id
|
||||
v.cssClass = v.active ? "active" : ""
|
||||
}
|
||||
return tabs
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.tabs = this.#getTabs()
|
||||
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true })
|
||||
|
||||
return context
|
||||
}
|
||||
|
||||
_generateTooltip(type, target) {
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _preparePartContext(partId, context) {
|
||||
const doc = this.document
|
||||
switch (partId) {
|
||||
case "main":
|
||||
break
|
||||
case "equipment":
|
||||
context.tab = context.tabs.equipment
|
||||
context.weapons = doc.itemTypes.weapon
|
||||
context.gears = doc.itemTypes.gear
|
||||
break
|
||||
case "description":
|
||||
context.tab = context.tabs.description
|
||||
context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true })
|
||||
context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true })
|
||||
break
|
||||
}
|
||||
return context
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new attack item directly from the sheet and embeds it into the document.
|
||||
* @param {Event} event The initiating click event.
|
||||
* @param {HTMLElement} target The current target of the event listener.
|
||||
*/
|
||||
static #onCreateGear(event, target) {
|
||||
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newGear"), type: "gear" }])
|
||||
}
|
||||
|
||||
static #onCreateWeapon(event, target) {
|
||||
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newWeapon"), type: "weapon" }])
|
||||
}
|
||||
|
||||
|
||||
async _onDrop(event) {
|
||||
if (!this.isEditable || !this.isEditMode) return
|
||||
const data = TextEditor.getDragEventData(event)
|
||||
|
||||
// Handle different data types
|
||||
switch (data.type) {
|
||||
case "Item":
|
||||
const item = await fromUuid(data.uuid)
|
||||
return super._onDropItem(item)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -15,7 +15,7 @@ export default class FTLNomadTalentSheet extends FTLNomadItemSheet {
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/fvtt-cthulhu-eternal/templates/talent.hbs",
|
||||
template: "systems/fvtt-ftl-nomad/templates/talent.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
|
@@ -12,24 +12,24 @@ export default class FTLNomadVehicleSheet extends FTLNomadActorSheet {
|
||||
contentClasses: ["vehicle-content"],
|
||||
},
|
||||
actions: {
|
||||
createGear: CthulhuEternalVehicleSheet.#onCreateGear,
|
||||
createWeapon: CthulhuEternalVehicleSheet.#onCreateWeapon,
|
||||
createGear: FTLNomadVehicleSheet.#onCreateGear,
|
||||
createWeapon: FTLNomadVehicleSheet.#onCreateWeapon,
|
||||
},
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: {
|
||||
template: "systems/fvtt-cthulhu-eternal/templates/vehicle-main.hbs",
|
||||
template: "systems/fvtt-ftl-nomad/templates/vehicle-main.hbs",
|
||||
},
|
||||
tabs: {
|
||||
template: "templates/generic/tab-navigation.hbs",
|
||||
},
|
||||
equipment: {
|
||||
template: "systems/fvtt-cthulhu-eternal/templates/vehicle-equipment.hbs",
|
||||
template: "systems/fvtt-ftl-nomad/templates/vehicle-equipment.hbs",
|
||||
},
|
||||
description: {
|
||||
template: "systems/fvtt-cthulhu-eternal/templates/vehicle-description.hbs",
|
||||
template: "systems/fvtt-ftl-nomad/templates/vehicle-description.hbs",
|
||||
},
|
||||
}
|
||||
|
||||
|
@@ -35,12 +35,38 @@ export const SKILLS = {
|
||||
"technology": { id: "technology", label: "FTLNOMAD.Skill.Technology" }
|
||||
}
|
||||
|
||||
export const TECH_AGES = {
|
||||
"notech": { id: "notech", level: 0, label: "FTLNOMAD.TechAge.NoTech" },
|
||||
"earlyprimitive": { id: "earlyprimitive", label: "FTLNOMAD.TechAge.EarlyPrimitive", level: 1 },
|
||||
"lateprimitive": { id: "lateprimitive", label: "FTLNOMAD.TechAge.LatePrimitive", level: 2 },
|
||||
"earlymechanical": { id: "earlymechanical", label: "FTLNOMAD.TechAge.EarlyMechanical", level: 3 },
|
||||
"latemechanical": { id: "latemechanical", label: "FTLNOMAD.TechAge.LateMechanical", level: 4 },
|
||||
"earlyatomic": { id: "earlyatomic", label: "FTLNOMAD.TechAge.EarlyAtomic", level: 5 },
|
||||
"lateatomic": { id: "lateatomic", label: "FTLNOMAD.TechAge.LateAtomic", level: 6 },
|
||||
"earlyspace": { id: "earlyspace", label: "FTLNOMAD.TechAge.EarlySpace", level: 7 },
|
||||
"latespace": { id: "latespace", label: "FTLNOMAD.TechAge.LateSpace", level: 8 },
|
||||
"earlyinterstellar": { id: "earlyinterstellar", label: "FTLNOMAD.TechAge.EarlyInterstellar", level: 9 },
|
||||
"lateinterstellar": { id: "lateinterstellar", label: "FTLNOMAD.TechAge.LateInterstellar", level: 10 },
|
||||
"earlygalactic" : { id: "earlygalactic", label: "FTLNOMAD.TechAge.EarlyGalactic", level: 11 },
|
||||
"lategalactic": { id: "lategalactic", label: "FTLNOMAD.TechAge.LateGalactic", level: 12 },
|
||||
"cosmic": { id: "cosmic", label: "FTLNOMAD.TechAge.Cosmic", level: 13 }
|
||||
}
|
||||
|
||||
export const WEAPON_RANGE = {
|
||||
"melee": {id: "melee", label: "FTLNOMAD.Weapon.Range.Melee"},
|
||||
"handgun": {id: "handgun", label: "FTLNOMAD.Weapon.Range.Handgun"},
|
||||
"rifle" : {id: "rifle", label: "FTLNOMAD.Weapon.Range.Rifle"},
|
||||
"longrange": {id: "longrange", label: "FTLNOMAD.Weapon.Range.LongRange"},
|
||||
}
|
||||
|
||||
/**
|
||||
* Include all constant definitions within the SYSTEM global export
|
||||
* @type {Object}
|
||||
*/
|
||||
export const SYSTEM = {
|
||||
id: SYSTEM_ID,
|
||||
SKILLS: SKILLS,
|
||||
TECH_AGES,
|
||||
WEAPON_RANGE,
|
||||
SKILLS,
|
||||
ASCII
|
||||
}
|
||||
|
@@ -3,8 +3,12 @@ export { default as FTLNomadPsionic } from "./psionic.mjs"
|
||||
export { default as FTLNomadLanguage } from "./language.mjs"
|
||||
export { default as FTLNomadTalent } from "./talent.mjs"
|
||||
export { default as FTLNomadArmor } from "./armor.mjs"
|
||||
export { default as FTLNomadNPC } from "./npc.mjs"
|
||||
export { default as FTLNomadCreature } from "./creature.mjs"
|
||||
export { default as FTLNomadVehicle } from "./vehicle.mjs"
|
||||
export { default as FTLNomadCharacter } from "./character.mjs"
|
||||
export { default as FTLNomadEquipment } from "./equipment.mjs"
|
||||
export { default as FTLNomadImplant } from "./implant.mjs"
|
||||
export { default as FTLNomadStarship } from "./starship.mjs"
|
||||
export { default as FTLNomadCreatureTrait } from "./creature-trait.mjs"
|
||||
export { default as FTLNomadCreatureAbility } from "./creature-ability.mjs"
|
||||
|
||||
|
@@ -7,11 +7,10 @@ export default class FTLNomadArmor extends foundry.abstract.TypeDataModel {
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
let setting = game.settings.get("fvtt-cthulhu-eternal", "settings-era") || "modern"
|
||||
schema.settings = new fields.StringField({ required: true, initial: setting, choices: SYSTEM.AVAILABLE_SETTINGS })
|
||||
|
||||
schema.techage = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "latenuclear" })
|
||||
schema.protection = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
16
module/models/creature-ability.mjs
Normal file
16
module/models/creature-ability.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import { SYSTEM } from "../config/system.mjs";
|
||||
|
||||
export default class FTLNomadCreatureAbility extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
const schema = {};
|
||||
|
||||
schema.isadvantage = new fields.BooleanField({ required: true, initial: false });
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
return schema;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["FTLNomad.CreatureAbility"];
|
||||
}
|
16
module/models/creature-trait.mjs
Normal file
16
module/models/creature-trait.mjs
Normal file
@@ -0,0 +1,16 @@
|
||||
import { SYSTEM } from "../config/system.mjs";
|
||||
|
||||
export default class FTLNomadCreatureTrait extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
const schema = {};
|
||||
|
||||
schema.isadvantage = new fields.BooleanField({ required: true, initial: false });
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
return schema;
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["FTLNomad.CreatureTrait"];
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
import FTLNomadRoll from "../documents/roll.mjs"
|
||||
|
||||
export default class FTLNomadNPC extends foundry.abstract.TypeDataModel {
|
||||
export default class FTLNomadCreature extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
@@ -8,11 +8,10 @@ export default class FTLNomadEquipment extends foundry.abstract.TypeDataModel {
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
let setting = game.settings.get("fvtt-cthulhu-eternal", "settings-era") || "modern"
|
||||
schema.settings = new fields.StringField({ required: true, initial: setting, choices: SYSTEM.AVAILABLE_SETTINGS })
|
||||
|
||||
schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.state = new fields.StringField({ required: true, initial: "pristine", choices: SYSTEM.EQUIPMENT_STATES })
|
||||
schema.techage = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "latenuclear" })
|
||||
|
||||
schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
22
module/models/implant.mjs
Normal file
22
module/models/implant.mjs
Normal file
@@ -0,0 +1,22 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
|
||||
export default class FTLNomadImplant extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const schema = {}
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
schema.techage = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "latenuclear" })
|
||||
|
||||
schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["FTLNOMAD.Implant"]
|
||||
|
||||
}
|
@@ -8,15 +8,6 @@ export default class FTLNomadPsionic extends foundry.abstract.TypeDataModel {
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
let setting = game.settings.get("fvtt-cthulhu-eternal", "settings-era") || "modern"
|
||||
schema.settings = new fields.StringField({ required: true, initial: setting, choices: SYSTEM.AVAILABLE_SETTINGS })
|
||||
|
||||
schema.base = new fields.StringField({ required: true, initial: "0" })
|
||||
schema.bonus = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.diceEvolved = new fields.BooleanField({ required: true, initial: true })
|
||||
schema.rollFailed = new fields.BooleanField({ required: true, initial: false })
|
||||
schema.isAdversary = new fields.BooleanField({ required: true, initial: false })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
|
31
module/models/starship.mjs
Normal file
31
module/models/starship.mjs
Normal file
@@ -0,0 +1,31 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
import FTLNomadRoll from "../documents/roll.mjs"
|
||||
|
||||
export default class FTLNomadStarship extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
||||
const schema = {}
|
||||
|
||||
schema.agility = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
schema.hullType = new fields.StringField({ required: true, initial: "small", choices: SYSTEM.STARSHIP_HULL })
|
||||
schema.endurance = new fields.StringField({ required: true, initial: "" })
|
||||
schema.armor = new fields.StringField({ required: true, initial: "" })
|
||||
schema.crew = new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 })
|
||||
schema.cargo = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
schema.guns = new fields.StringField({ required: true, initial: "1d6" })
|
||||
schema.travelMultiplier = new fields.NumberField({ required: true, initial: 1, min: 0 })
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.monthlyCost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
schema.modifications = new fields.HTMLField({ required: true, textSearch: true })
|
||||
schema.notes = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static LOCALIZATION_PREFIXES = ["FTLNomad.Starship"]
|
||||
|
||||
}
|
@@ -5,55 +5,8 @@ export default class FTLNomadTalent extends foundry.abstract.TypeDataModel {
|
||||
const fields = foundry.data.fields;
|
||||
const schema = {};
|
||||
|
||||
let setting = game.settings.get("fvtt-cthulhu-eternal", "settings-era") || "modern"
|
||||
schema.minimumEra = new fields.StringField({ required: true, initial: setting, choices: SYSTEM.AVAILABLE_SETTINGS })
|
||||
|
||||
schema.creationDate = new fields.StringField({
|
||||
required: true,
|
||||
initial: "",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// Language field
|
||||
schema.language = new fields.StringField({
|
||||
required: true,
|
||||
initial: "Latin",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// studyTime field
|
||||
schema.studyTime = new fields.StringField({
|
||||
required: true,
|
||||
initial: "X days",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// SAN loss field
|
||||
schema.sanLoss = new fields.StringField({
|
||||
required: true,
|
||||
initial: "1d4",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
// Unnatural skill field
|
||||
schema.unnaturalSkill = new fields.StringField({
|
||||
required: true,
|
||||
initial: "1d4",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
schema.rituals = new fields.StringField({
|
||||
required: true,
|
||||
initial: "",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
schema.otherBenefits = new fields.StringField({
|
||||
required: true,
|
||||
initial: "",
|
||||
textSearch: true
|
||||
});
|
||||
|
||||
schema.isadvantage = new fields.BooleanField({ required: true, initial: false });
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
return schema;
|
||||
|
@@ -1,15 +1,12 @@
|
||||
import { SYSTEM } from "../config/system.mjs"
|
||||
import FTLNomadRoll from "../documents/roll.mjs"
|
||||
|
||||
export default class CthulhuEternalVehicle extends foundry.abstract.TypeDataModel {
|
||||
export default class FTLNomadVehicle extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields
|
||||
const requiredInteger = { required: true, nullable: false, integer: true }
|
||||
const schema = {}
|
||||
|
||||
let setting = game.settings.get("fvtt-cthulhu-eternal", "settings-era") || "modern"
|
||||
schema.settings = new fields.StringField({ required: true, initial: setting, choices: SYSTEM.AVAILABLE_SETTINGS })
|
||||
|
||||
schema.hp = new fields.SchemaField({
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 })
|
||||
|
@@ -8,9 +8,11 @@ export default class FTLNomadWeapon extends foundry.abstract.TypeDataModel {
|
||||
|
||||
schema.description = new fields.HTMLField({ required: true, textSearch: true })
|
||||
|
||||
schema.weaponType = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.WEAPON_TYPE })
|
||||
schema.rangeType = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.WEAPON_RANGE })
|
||||
|
||||
schema.damage = new fields.StringField({required: true, initial: "1d6"})
|
||||
schema.magazine = new fields.NumberField({ required: true, initial: 1, min: 0 })
|
||||
|
||||
schema.range = new fields.SchemaField({
|
||||
close: new fields.NumberField({ ...requiredInteger, initial: 0 }),
|
||||
near: new fields.NumberField({ ...requiredInteger, initial: 0 }),
|
||||
@@ -22,6 +24,7 @@ export default class FTLNomadWeapon extends foundry.abstract.TypeDataModel {
|
||||
schema.aspect = new fields.StringField({ required: true, initial: ""})
|
||||
|
||||
schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
schema.ammoCost = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
@@ -1,6 +1,6 @@
|
||||
.protagonist-content {
|
||||
.character-content {
|
||||
.sheet-common();
|
||||
.protagonist-sheet-common();
|
||||
.character-sheet-common();
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
@@ -8,33 +8,33 @@
|
||||
background-color: var(--color-light-1);
|
||||
}
|
||||
|
||||
.protagonist-main {
|
||||
.character-main {
|
||||
background-color: var(--color-light-1);
|
||||
display: flex;
|
||||
|
||||
.protagonist-pc {
|
||||
.character-pc {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
|
||||
.protagonist-left {
|
||||
.character-left {
|
||||
min-width: 180px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.protagonist-left-image {
|
||||
.character-left-image {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-bottom: 8px;
|
||||
.protagonist-img {
|
||||
.character-img {
|
||||
height: 140px;
|
||||
width: auto;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
.protagonist-hp {
|
||||
.character-hp {
|
||||
gap: 2px;
|
||||
align-items: center;
|
||||
input {
|
||||
@@ -53,13 +53,13 @@
|
||||
}
|
||||
}
|
||||
|
||||
.protagonist-dv,
|
||||
.protagonist-dmax {
|
||||
.character-dv,
|
||||
.character-dmax {
|
||||
.form-fields {
|
||||
flex: none;
|
||||
}
|
||||
}
|
||||
.protagonist-dmax-edit {
|
||||
.character-dmax-edit {
|
||||
input {
|
||||
display: flex;
|
||||
width: 60px;
|
||||
@@ -72,12 +72,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
.protagonist-right {
|
||||
.character-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
.protagonist-name {
|
||||
.character-name {
|
||||
display: flex;
|
||||
input {
|
||||
font-family: var(--font-title);
|
||||
@@ -172,22 +172,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
.protagonist-pc-play {
|
||||
.character-pc-play {
|
||||
min-width: 500px;
|
||||
}
|
||||
|
||||
.protagonist-pc-edit {
|
||||
.character-pc-edit {
|
||||
min-width: 650px;
|
||||
}
|
||||
|
||||
.protagonist-characteristics {
|
||||
.character-characteristics {
|
||||
background-color: var(--color-light-1);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
flex: 1;
|
||||
|
||||
.protagonist-characteristic {
|
||||
.character-characteristic {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.rollable:hover,
|
||||
@@ -218,16 +218,16 @@
|
||||
}
|
||||
}
|
||||
|
||||
.protagonist-characteristic-play {
|
||||
.character-characteristic-play {
|
||||
min-width: 225px;
|
||||
}
|
||||
|
||||
.protagonist-characteristic-edit {
|
||||
.character-characteristic-edit {
|
||||
min-width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.protagonist-biography {
|
||||
.character-biography {
|
||||
background-color: var(--color-light-1);
|
||||
prose-mirror.inactive {
|
||||
min-height: 40px;
|
||||
@@ -275,7 +275,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tab.protagonist-skills {
|
||||
.tab.character-skills {
|
||||
background-color: var(--color-light-1);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
@@ -323,7 +323,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tab.protagonist-status {
|
||||
.tab.character-status {
|
||||
background-color: var(--color-light-1);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
@@ -455,7 +455,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.tab.protagonist-equipment {
|
||||
.tab.character-equipment {
|
||||
background-color: var(--color-light-1);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
|
@@ -1,17 +1,20 @@
|
||||
@import "fonts.less";
|
||||
@import "global.less";
|
||||
|
||||
.fvtt-cthulhu-eternal {
|
||||
.fvtt-ftl-nomad {
|
||||
@import "mixins.less";
|
||||
@import "character.less";
|
||||
@import "vehicle.less";
|
||||
@import "npc.less";
|
||||
@import "starship.less";
|
||||
@import "creature.less";
|
||||
@import "weapon.less";
|
||||
@import "armor.less";
|
||||
@import "equipment.less";
|
||||
@import "language.less";
|
||||
@import "psionic.less";
|
||||
@import "talent.less";
|
||||
@import "creature-trait.less";
|
||||
@import "creature-ability.less";
|
||||
@import "chat.less";
|
||||
}
|
||||
|
||||
|
22
styles/implant.less
Normal file
22
styles/implant.less
Normal file
@@ -0,0 +1,22 @@
|
||||
.implant-content {
|
||||
.sheet-common();
|
||||
.item-sheet-common();
|
||||
|
||||
fieldset {
|
||||
margin-top: 8px;
|
||||
background-color: var(--color-light-1);
|
||||
}
|
||||
|
||||
.header {
|
||||
background-color: var(--color-light-1);
|
||||
display: flex;
|
||||
img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
flex: 10%;
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
.ritual-content {
|
||||
.psionic-content {
|
||||
.sheet-common();
|
||||
.item-sheet-common();
|
||||
|
||||
|
223
styles/starship.less
Normal file
223
styles/starship.less
Normal file
@@ -0,0 +1,223 @@
|
||||
.starship-content {
|
||||
.sheet-common();
|
||||
.starship-sheet-common();
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
.sheet-tabs {
|
||||
background-color: var(--color-light-1);
|
||||
}
|
||||
|
||||
.starship-main {
|
||||
background-color: var(--color-light-1);
|
||||
display: flex;
|
||||
|
||||
.starship-pc {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex: 1;
|
||||
|
||||
.starship-left {
|
||||
min-width: 180px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
.starship-left-image {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-bottom: 8px;
|
||||
.starship-img {
|
||||
height: 140px;
|
||||
width: auto;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.starship-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
|
||||
.starship-name {
|
||||
display: flex;
|
||||
input {
|
||||
font-family: var(--font-title);
|
||||
font-size: calc(var(--font-size-standard) * 1.4);
|
||||
width: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
.starship-infos {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
|
||||
label {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.starship-hp {
|
||||
display: flex;
|
||||
gap: 2px;
|
||||
align-items: center;
|
||||
.starship-hp-value {
|
||||
.form-fields input {
|
||||
flex: none;
|
||||
width: 50px;
|
||||
margin-left: 4px;
|
||||
font-size: calc(var(--font-size-standard) * 1.4);
|
||||
}
|
||||
}
|
||||
.starship-hp-max {
|
||||
clear: both;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
margin: 3px 0;
|
||||
align-items: center;
|
||||
input {
|
||||
width: 50px;
|
||||
text-align: center;
|
||||
font-size: calc(var(--font-size-standard) * 1.4);
|
||||
}
|
||||
}
|
||||
.hp-separator {
|
||||
font-size: calc(var(--font-size-standard) * 1.2);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.starship-pc-play {
|
||||
min-width: 500px;
|
||||
}
|
||||
|
||||
.starship-pc-edit {
|
||||
min-width: 650px;
|
||||
}
|
||||
}
|
||||
|
||||
.starship-biography {
|
||||
background-color: var(--color-light-1);
|
||||
prose-mirror.inactive {
|
||||
min-height: 40px;
|
||||
}
|
||||
prose-mirror.active {
|
||||
min-height: 150px;
|
||||
}
|
||||
.field-label {
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
|
||||
.biodata {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
label {
|
||||
min-width: 3.0rem;
|
||||
}
|
||||
.feature {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 18rem;
|
||||
max-width: 18rem;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.tab.starship-equipment {
|
||||
background-color: var(--color-light-1);
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
legend {
|
||||
a {
|
||||
font-size: calc(var(--font-size-standard) * 1.4);
|
||||
padding-left: 5px;
|
||||
}
|
||||
}
|
||||
.weapons {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 4px;
|
||||
.weapon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 13rem;
|
||||
max-width: 13srem;
|
||||
.rollable:hover,
|
||||
.rollable:focus {
|
||||
text-shadow: 0 0 8px var(--color-shadow-primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
.controls {
|
||||
min-width: 2rem;
|
||||
max-width: 2rem;
|
||||
}
|
||||
.damage {
|
||||
min-width: 5rem;
|
||||
max-width: 5rem;
|
||||
}
|
||||
.name {
|
||||
min-width: 8rem;
|
||||
max-width: 8rem;
|
||||
}
|
||||
.item-img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.gears {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 4px;
|
||||
.gear {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
min-width: 13rem;
|
||||
max-width: 13srem;
|
||||
.rollable:hover,
|
||||
.rollable:focus {
|
||||
text-shadow: 0 0 8px var(--color-shadow-primary);
|
||||
cursor: pointer;
|
||||
}
|
||||
.controls {
|
||||
min-width: 2rem;
|
||||
max-width: 2rem;
|
||||
}
|
||||
.damage {
|
||||
min-width: 5rem;
|
||||
max-width: 5rem;
|
||||
}
|
||||
.name {
|
||||
min-width: 8rem;
|
||||
max-width: 8rem;
|
||||
}
|
||||
.item-img {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: 4px 0 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
prose-mirror.inactive {
|
||||
min-height: 40px;
|
||||
}
|
||||
prose-mirror.active {
|
||||
min-height: 150px;
|
||||
}
|
||||
}
|
@@ -1,4 +1,4 @@
|
||||
.tome-content {
|
||||
.talent-content {
|
||||
.sheet-common();
|
||||
.item-sheet-common();
|
||||
|
||||
|
13
system.json
13
system.json
@@ -35,15 +35,20 @@
|
||||
"documentTypes": {
|
||||
"Actor": {
|
||||
"character": { "htmlFields": ["description", "notes"] },
|
||||
"npc": { "htmlFields": ["description", "notes"] },
|
||||
"creature": { "htmlFields": ["description", "notes"] },
|
||||
"vehicle": { "htmlFields": ["description", "notes"] },
|
||||
"ship": { "htmlFields": ["description", "notes"] }
|
||||
"starship": { "htmlFields": ["description", "notes"] }
|
||||
},
|
||||
"Item": {
|
||||
"skill": { "htmlFields": ["description"] },
|
||||
"talent": { "htmlFields": ["description"] },
|
||||
"weapon": { "htmlFields": ["description"] },
|
||||
"armor": { "htmlFields": ["description"] },
|
||||
"gear": { "htmlFields": ["description"] }
|
||||
"equipment": { "htmlFields": ["description"] },
|
||||
"psionic": { "htmlFields": ["description"] },
|
||||
"creature-trait": { "htmlFields": ["description"] },
|
||||
"creature-ability": { "htmlFields": ["description"] },
|
||||
"implant": { "htmlFields": ["description"] },
|
||||
"language": { "htmlFields": ["description"] }
|
||||
}
|
||||
},
|
||||
"packs": [
|
||||
|
Reference in New Issue
Block a user