Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 697950e22a | |||
| 78d41d2a40 | |||
| c222d3019c | |||
| a2541bf934 | |||
| 3dbaf84db3 |
16
CHANGELOG.md
16
CHANGELOG.md
@@ -1,3 +1,19 @@
|
|||||||
|
## 1.3.1
|
||||||
|
### Bugfixes
|
||||||
|
- The keybinding to toggle secret doors no longer supresses other keybindings that are assigned to the same key
|
||||||
|
|
||||||
|
|
||||||
|
## 1.3.0
|
||||||
|
### New features
|
||||||
|
- The keybinding for the Toggle Secret Door feature can now be reconfigured via Foundries keybinding configuration (the default key has changed to AltLeft)
|
||||||
|
|
||||||
|
### Compatibility
|
||||||
|
- Smart Doors is now compatible with Foundry 9
|
||||||
|
|
||||||
|
### Translation
|
||||||
|
- Added french translation (thanks to Elfenduli)
|
||||||
|
|
||||||
|
|
||||||
## 1.2.9
|
## 1.2.9
|
||||||
### Feature revival
|
### Feature revival
|
||||||
- The "Tint secret doors" feature is back, but will remain disabled by default.
|
- The "Tint secret doors" feature is back, but will remain disabled by default.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ Door Control icons will be rendered the same size in every scene, regardless of
|
|||||||
### Toggle Secret Doors
|
### Toggle Secret Doors
|
||||||

|

|
||||||
|
|
||||||
Easily reveal secret doors to players. Ctrl+left click secrets doors to turn them into regular doors. Ctrl+left click can also be done on normal doors to turn them into secret doors. Using this in combination with Tint Secret Doors is recommended so you can actually see what you are doing.
|
Easily reveal secret doors to players. Alt+left click secrets doors to turn them into regular doors. Alt+left click can also be done on normal doors to turn them into secret doors. The keybinding for this feature can be reconfigured.
|
||||||
|
|
||||||
|
|
||||||
### Locked Door Alerts
|
### Locked Door Alerts
|
||||||
|
|||||||
10
lang/en.json
10
lang/en.json
@@ -1,5 +1,11 @@
|
|||||||
{
|
{
|
||||||
"smart-doors": {
|
"smart-doors": {
|
||||||
|
"keybindings": {
|
||||||
|
"toggleSecretDoor": {
|
||||||
|
"name": "Toggle Secret Door",
|
||||||
|
"hint": "While this key is being pressed, clicking on doors will cause the to toggle between normal and secret door"
|
||||||
|
}
|
||||||
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
"doorControlSizeFactor": {
|
"doorControlSizeFactor": {
|
||||||
"name": "Door Control Size Factor",
|
"name": "Door Control Size Factor",
|
||||||
@@ -16,10 +22,6 @@
|
|||||||
"synchronizedDoors": {
|
"synchronizedDoors": {
|
||||||
"name": "Synchronized Doors",
|
"name": "Synchronized Doors",
|
||||||
"hint": "Synchronize the state of configured doors"
|
"hint": "Synchronize the state of configured doors"
|
||||||
},
|
|
||||||
"toggleSecretDoors": {
|
|
||||||
"name": "Toggle Secret Doors",
|
|
||||||
"hint": "Toggle the door type between normal and secret using ctrl+left click"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"ui": {
|
"ui": {
|
||||||
|
|||||||
35
lang/fr.json
Normal file
35
lang/fr.json
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
{
|
||||||
|
"smart-doors": {
|
||||||
|
"settings": {
|
||||||
|
"doorControlSizeFactor": {
|
||||||
|
"name": "Facteur de taille de commande de porte",
|
||||||
|
"hint": "Définit par quel facteur la taille des icônes de contrôle de porte doit être agrandie"
|
||||||
|
},
|
||||||
|
"highlightSecretDoors": {
|
||||||
|
"name": "Teinte des portes secrètes",
|
||||||
|
"indice": "Ombragez les portes secrètes d'une couleur différente sur l'écran gm pour les différencier des portes normales"
|
||||||
|
},
|
||||||
|
"lockedDoorAlert": {
|
||||||
|
"name": "Alerte de porte verrouillée",
|
||||||
|
"hint": "Envoyer un message dans le chat lorsqu'un joueur essaie d'ouvrir une porte verrouillée"
|
||||||
|
},
|
||||||
|
"synchronizedDoors": {
|
||||||
|
"name": "Portes synchronisées",
|
||||||
|
"hint": "Synchroniser l'état des portes configurées"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"ui": {
|
||||||
|
"messages": {
|
||||||
|
"migrating": "Migration de Smart Doors vers la version {version}. Veuillez ne pas fermer l'application.",
|
||||||
|
"migrationDone": "Smart Doors a migré avec succès vers la version {version}.",
|
||||||
|
"unknownVersion": "La migration de Smart Doors a échoué avec l'erreur : Version inconnue {version}. Veuillez le signaler à l'outil de suivi des problèmes Smart Doors. Pour éviter une éventuelle perte de données, n'utilisez pas ce plug-in tant que cette erreur n'est pas corrigée."
|
||||||
|
},
|
||||||
|
"synchronizedDoors": {
|
||||||
|
"description": "Les changements d'état des portes dans le même groupe de synchronisation seront synchronisés entre les scènes. Laissez vide pour désactiver la synchronisation pour cette porte.",
|
||||||
|
"groupName": "Groupe de synchronisation",
|
||||||
|
"synchronizeSecretStatus": "Synchroniser le statut Secret"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
13
module.json
13
module.json
@@ -2,9 +2,9 @@
|
|||||||
"name": "smart-doors",
|
"name": "smart-doors",
|
||||||
"title": "Smart Doors",
|
"title": "Smart Doors",
|
||||||
"description": "Makes doors smarter. Allows doors to synchronize across multiple scenes and sends chat messages when players try to open locked doors.",
|
"description": "Makes doors smarter. Allows doors to synchronize across multiple scenes and sends chat messages when players try to open locked doors.",
|
||||||
"version": "1.2.9",
|
"version": "1.3.1",
|
||||||
"minimumCoreVersion" : "0.8.7",
|
"minimumCoreVersion" : "9.238",
|
||||||
"compatibleCoreVersion" : "0.8.8",
|
"compatibleCoreVersion" : "9",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Manuel Vögele",
|
"name": "Manuel Vögele",
|
||||||
@@ -21,11 +21,16 @@
|
|||||||
"lang": "en",
|
"lang": "en",
|
||||||
"name": "English",
|
"name": "English",
|
||||||
"path": "lang/en.json"
|
"path": "lang/en.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"lang": "fr",
|
||||||
|
"name": "Français",
|
||||||
|
"path": "lang/fr.json"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"url": "https://github.com/manuelVo/foundryvtt-smart-doors",
|
"url": "https://github.com/manuelVo/foundryvtt-smart-doors",
|
||||||
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-smart-doors/master/module.json",
|
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-smart-doors/master/module.json",
|
||||||
"download": "https://github.com/manuelVo/foundryvtt-smart-doors/archive/v1.2.9.zip",
|
"download": "https://github.com/manuelVo/foundryvtt-smart-doors/archive/v1.3.1.zip",
|
||||||
"readme": "https://github.com/manuelVo/foundryvtt-smart-doors/blob/master/README.md",
|
"readme": "https://github.com/manuelVo/foundryvtt-smart-doors/blob/master/README.md",
|
||||||
"changelog": "https://github.com/manuelVo/foundryvtt-smart-doors/blob/master/CHANGELOG.md",
|
"changelog": "https://github.com/manuelVo/foundryvtt-smart-doors/blob/master/CHANGELOG.md",
|
||||||
"bugs": "https://github.com/manuelVo/foundryvtt-smart-doors/issues",
|
"bugs": "https://github.com/manuelVo/foundryvtt-smart-doors/issues",
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
|
import {toggleSecretDoor} from "../keybindings.js";
|
||||||
import {settingsKey} from "../settings.js"
|
import {settingsKey} from "../settings.js"
|
||||||
import {updateSynchronizedDoors} from "./synchronized_doors.js";
|
import {updateSynchronizedDoors} from "./synchronized_doors.js";
|
||||||
|
|
||||||
// Toggles between normal and secret doors
|
// Toggles between normal and secret doors
|
||||||
export function onDoorLeftClick(event) {
|
export function onDoorLeftClick() {
|
||||||
// We don't trust the event to be filled with the expected data for compatibilty with arms reach (which passes a broken event)
|
// We don't trust the event to be filled with the expected data for compatibilty with arms reach (which passes a broken event)
|
||||||
if (game.settings.get(settingsKey, "toggleSecretDoors") && event.data?.originalEvent?.ctrlKey && game.user.isGM) {
|
if (toggleSecretDoor && game.user.isGM) {
|
||||||
const types = CONST.WALL_DOOR_TYPES
|
const types = CONST.WALL_DOOR_TYPES
|
||||||
const newtype = this.wall.data.door === types.DOOR ? types.SECRET : types.DOOR
|
const newtype = this.wall.data.door === types.DOOR ? types.SECRET : types.DOOR
|
||||||
const updateData = {door: newtype}
|
const updateData = {door: newtype}
|
||||||
|
|||||||
20
src/keybindings.js
Normal file
20
src/keybindings.js
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
import {settingsKey} from "./settings.js";
|
||||||
|
|
||||||
|
export let toggleSecretDoor = false;
|
||||||
|
|
||||||
|
export function registerKeybindings() {
|
||||||
|
game.keybindings.register(settingsKey, "toggleSecretDoor", {
|
||||||
|
name: "smart-doors.keybindings.toggleSecretDoor.name",
|
||||||
|
hint: "smart-doors.keybindings.toggleSecretDoor.hint",
|
||||||
|
onDown: handleToggleSecretDoor,
|
||||||
|
onUp: handleToggleSecretDoor,
|
||||||
|
restricted: true,
|
||||||
|
editable: [{key: "AltLeft"}],
|
||||||
|
precedence: -1,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleToggleSecretDoor(event) {
|
||||||
|
toggleSecretDoor = !event.up;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
@@ -8,10 +8,13 @@ import * as SynchronizedDoors from "./features/synchronized_doors.js"
|
|||||||
import * as ToggleSecretDoor from "./features/toggle_secret_door.js"
|
import * as ToggleSecretDoor from "./features/toggle_secret_door.js"
|
||||||
|
|
||||||
import {performMigrations} from "./migration.js"
|
import {performMigrations} from "./migration.js"
|
||||||
|
import {registerKeybindings} from "./keybindings.js"
|
||||||
import {registerSettings, settingsKey} from "./settings.js"
|
import {registerSettings, settingsKey} from "./settings.js"
|
||||||
|
|
||||||
Hooks.once("init", () => {
|
Hooks.once("init", () => {
|
||||||
registerSettings()
|
registerSettings()
|
||||||
|
registerKeybindings()
|
||||||
|
|
||||||
hookDoorEvents()
|
hookDoorEvents()
|
||||||
hookWallConfigUpdate()
|
hookWallConfigUpdate()
|
||||||
hookDoorControlDraw()
|
hookDoorControlDraw()
|
||||||
|
|||||||
@@ -30,14 +30,6 @@ export function registerSettings() {
|
|||||||
default: false,
|
default: false,
|
||||||
onChange: reloadGM,
|
onChange: reloadGM,
|
||||||
})
|
})
|
||||||
game.settings.register(settingsKey, "toggleSecretDoors", {
|
|
||||||
name: "smart-doors.settings.toggleSecretDoors.name",
|
|
||||||
hint: "smart-doors.settings.toggleSecretDoors.hint",
|
|
||||||
scope: "world",
|
|
||||||
config: true,
|
|
||||||
type: Boolean,
|
|
||||||
default: true,
|
|
||||||
})
|
|
||||||
game.settings.register(settingsKey, "lockedDoorAlert", {
|
game.settings.register(settingsKey, "lockedDoorAlert", {
|
||||||
name: "smart-doors.settings.lockedDoorAlert.name",
|
name: "smart-doors.settings.lockedDoorAlert.name",
|
||||||
hint: "smart-doors.settings.lockedDoorAlert.hint",
|
hint: "smart-doors.settings.lockedDoorAlert.hint",
|
||||||
|
|||||||
Reference in New Issue
Block a user