12 Commits

4 changed files with 60 additions and 8 deletions

View File

@@ -1,3 +1,32 @@
## 1.0.12
### Compatibility
- Foundry 10 will no longer show a deprecation warning when modules or systems register in socketlib
## 1.0.11
### Compatibility
- Updated for compatibility with Foundry 10
## 1.0.10
### Compatibility
- Verified compatibility with Foundry 9
## 1.0.9
### Compatibility
- Verified compatibility with Foundry 0.8.9
## 1.0.8
### Compatibility
- Verified compatibility with Foundry 0.8.8
## 1.0.7
### Compatibility
- Verified compatibility with Foundry 0.8.7
## 1.0.6 ## 1.0.6
### Compatibility ### Compatibility
- Verified compatibility with Foundry 0.8.5 - Verified compatibility with Foundry 0.8.5

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Manuel Vögele
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,10 +1,12 @@
{ {
"name": "socketlib", "id": "socketlib",
"title": "socketlib", "title": "socketlib",
"description": "A library for easier handling of foundry sockets", "description": "A library for easier handling of foundry sockets",
"version": "1.0.6", "version": "1.0.12",
"minimumCoreVersion" : "0.7.9", "compatibility": {
"compatibleCoreVersion" : "0.8.5", "minimum": "10",
"verified": "10"
},
"library": true, "library": true,
"authors": [ "authors": [
{ {
@@ -18,7 +20,7 @@
"src/socketlib.js" "src/socketlib.js"
], ],
"url": "https://github.com/manuelVo/foundryvtt-socketlib", "url": "https://github.com/manuelVo/foundryvtt-socketlib",
"download": "https://github.com/manuelVo/foundryvtt-socketlib/archive/v1.0.6.zip", "download": "https://github.com/manuelVo/foundryvtt-socketlib/archive/v1.0.12.zip",
"manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-socketlib/master/module.json", "manifest": "https://raw.githubusercontent.com/manuelVo/foundryvtt-socketlib/master/module.json",
"readme": "https://github.com/manuelVo/foundryvtt-socketlib/blob/master/README.md", "readme": "https://github.com/manuelVo/foundryvtt-socketlib/blob/master/README.md",
"changelog": "https://github.com/manuelVo/foundryvtt-socketlib/blob/master/CHANGELOG.md", "changelog": "https://github.com/manuelVo/foundryvtt-socketlib/blob/master/CHANGELOG.md",

View File

@@ -38,7 +38,7 @@ class Socketlib {
console.error(`socketlib | Someone tried to register module '${moduleName}', but no module with that name is active. As a result the registration request has been ignored.`); console.error(`socketlib | Someone tried to register module '${moduleName}', but no module with that name is active. As a result the registration request has been ignored.`);
return undefined; return undefined;
} }
if (!module.data.socket) { if (!module.socket) {
console.error(`socketlib | Failed to register socket for module '${moduleName}'. Please set '"socket":true' in your manifset and restart foundry (you need to reload your world - simply reloading your browser won't do).`); console.error(`socketlib | Failed to register socket for module '${moduleName}'. Please set '"socket":true' in your manifset and restart foundry (you need to reload your world - simply reloading your browser won't do).`);
return undefined; return undefined;
} }
@@ -55,7 +55,7 @@ class Socketlib {
const existingSocket = this.system; const existingSocket = this.system;
if (existingSocket) if (existingSocket)
return existingSocket; return existingSocket;
if (!game.system.data.socket) { if (!game.system.socket) {
console.error(`socketlib | Failed to register socket for system '${systemId}'. Please set '"socket":true' in your manifest and restart foundry (you need to reload your world - simply reloading your browser won't do).`); console.error(`socketlib | Failed to register socket for system '${systemId}'. Please set '"socket":true' in your manifest and restart foundry (you need to reload your world - simply reloading your browser won't do).`);
} }
const newSocket = new SocketlibSocket(systemId, "system"); const newSocket = new SocketlibSocket(systemId, "system");
@@ -307,7 +307,7 @@ function isResponsibleGM() {
if (!game.user.isGM) if (!game.user.isGM)
return false; return false;
const connectedGMs = game.users.filter(isActiveGM); const connectedGMs = game.users.filter(isActiveGM);
return !connectedGMs.some(other => other.data._id < game.user.data._id); return !connectedGMs.some(other => other.id < game.user.id);
} }
function isActiveGM(user) { function isActiveGM(user) {