Skip to content

Commit 9505b06

Browse files
committed
v0.2.1 release
1 parent b9179e9 commit 9505b06

File tree

5 files changed

+31
-9
lines changed

5 files changed

+31
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44

55
### Bug Fixes
66

7-
* Empties and disables the Swarms Modifier field on the Flood Actor sheet when the unit does not swarm (the "Swarms?" checkbox is unchecked).
8-
* Fixes a bug where the carrying capacity tier label for the bar at the top of the Inventory tab on the Named Character and Bestiary Enemy Actor sheets would break when the inventory total weight as 0 kg.
7+
* Empties and disables the Swarm Modifier field on the Flood Actor sheet when the unit does not swarm (the "Swarms?" checkbox is unchecked).
8+
* Fixes a bug where the carrying capacity tier label for the bar at the top of the Inventory tab on the Named Character and Bestiary Enemy Actor sheets would break when the inventory total weight is 0 kg.
99
* Updates the Cauterize special rule on the Weapon Item sheet for the new 5.0 rules. This means removing the numerical value it carried that previously represented the die result required to score a critical hit for a given weapon.
10+
* Adds a few fields to the Weapon Item that may be required in the future. These are on a new Settings tab, and have no bearing on play.
1011

1112
## 0.2.0
1213

Gruntfile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ module.exports = function(grunt) {
2323
expand: true,
2424
cwd: RELEASE_PATH,
2525
src: "**/*",
26-
dest: "/"
26+
dest: "/mythic"
2727
}]
2828
}
2929
},

module/migrations.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@ export async function migrateWorld() {
66
}
77

88
export async function migrateCauterize() {
9+
for (let item of game.items) {
10+
if (item.type === "weapon") {
11+
let updateData = {};
12+
13+
updateData["data.special.cauterize"] = {
14+
"has": item.data.data.special.cauterize.has,
15+
"needsInput": false
16+
};
17+
18+
if (!foundry.utils.isObjectEmpty(updateData)) {
19+
console.log(`Migrating Item entity ${item.name}...`);
20+
await item.update(updateData);
21+
}
22+
}
23+
}
24+
};
25+
26+
export async function migrateV2_1() {
927
for (let item of game.items) {
1028
if (item.type === "weapon") {
1129
let updateData = {};

mythic.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import { mythic } from "./module/config.js";
44
import * as Chat from "./module/chat.js";
55
import * as Helpers from "./module/helpers.js";
6-
import { migrateCauterize, migrateWorld } from "./module/migrations.js";
6+
import { migrateCauterize, migrateV2_1, migrateWorld } from "./module/migrations.js";
77
import MythicActor from "./module/MythicActor.js";
88
import MythicCombat from "./module/MythicCombat.js";
99
import MythicItem from "./module/MythicItem.js";
@@ -55,7 +55,7 @@ function registerSystemSettings() {
5555
config: false,
5656
scope: "world",
5757
type: String,
58-
default: ""
58+
default: "0.2.1"
5959
});
6060

6161
// Critical Failure Threshold
@@ -150,7 +150,7 @@ function registerSystemSettings() {
150150

151151
/** Hook to set up config, Actor and Item sheets, and load Handlebars templates. */
152152
Hooks.once("init", function() {
153-
console.log("mythic | Initializing Mythic 4.0 System");
153+
console.log("mythic | Initializing Mythic 5.0 System");
154154

155155
CONFIG.mythic = mythic;
156156
CONFIG.Actor.documentClass = MythicActor;
@@ -175,11 +175,14 @@ Hooks.once("init", function() {
175175
Hooks.once("ready", function () {
176176
if (game.user.isGM) {
177177
const current = game.settings.get("mythic", "systemMigrationVersion");
178+
179+
migrateCauterize();
178180
if (!current) {
179181
if (isNewerVersion("0.01", current)) migrateWorld();
180-
if (isNewerVersion ("0.2.1", current)) migrateCauterize();
182+
if (isNewerVersion("0.2.1", current)) migrateV2_1();
181183
}
182184
}
185+
183186
game.settings.set("mythic", "systemMigrationVersion", game.system.data.version);
184187
});
185188

system.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "mythic",
33
"title": "Mythic 5.0",
44
"description": "An unofficial system implementation for playing the fan-made Halo: Mythic game on Foundry Virtual Tabletop.",
5-
"version": "0.2.0",
5+
"version": "0.2.1",
66
"author": "Tyler Baum",
77
"authors": [
88
{
@@ -34,4 +34,4 @@
3434
"license": "LICENSE",
3535
"readme": "README.md",
3636
"changelog": "https://github.com/AugmenTab/mythic/blob/main/CHANGELOG.md"
37-
}
37+
}

0 commit comments

Comments
 (0)