CodeWringer / strive-foundryVTT

STRIVE system for FoundryVTT
GNU General Public License v3.0
1 stars 0 forks source link

Register key to rotate item on item grid to FoundryVTT's key map #45

Closed CodeWringer closed 1 year ago

CodeWringer commented 2 years ago

When pressing 'r', the currently dragged item on the item grid is rotated. The key is currently hard-coded, but should be configurable, instead.

The following code snippet might help.

function registerSystemSettings() {
    /* Register the settings for the system. */
    /* Setup how damage types are to be handled. If Simple is selected, each weapon defaults
    to their highest value. */
    game.settings.register("cd10", "systemDamageTypes", {
        config: true,
        scope: "world",
        name: "SETTINGS.damageTypes.name",
        hint: "SETTINGS.damageTypes.label",
        type: String,
        choices: {
            "simple": "Single damage type",
            "standard": "Slash, Blunt, Pierce",
            "complex": "Slash, Blunt, Pierce, Energy"
        },
        default: "b",
    });

    game.settings.register("cd10", "systemModernity", {
        config: true,
        scope: "world",
        name: "SETTINGS.modernity.name",
        hint: "SETTINGS.modernity.label",
        type: Boolean,
        default: false,
    });
}
CodeWringer commented 1 year ago

Obsolete because the item grid will be removed, anyway.