- Container behavior for Weapons, Def. Weapons and Armor is now the same as for items

- Fixed some Bugs
This commit is contained in:
Ender
2024-01-21 00:33:31 +01:00
parent 33c65735bd
commit 9da36e6a6f
7 changed files with 324 additions and 196 deletions
+10
View File
@@ -90,6 +90,16 @@ Hooks.once("init", async () => {
return label.toLowerCase().includes(contains.toLowerCase());
});
Handlebars.registerHelper("count", (object: any) => {
var length = 0;
for( var key in object ) {
if( object.hasOwnProperty(key) ) {
++length;
}
}
return length;
});
// Default Sheet für Items definieren und das Standardsheet deaktivieren
Items.unregisterSheet("core", ItemSheet);
Items.registerSheet("midgard5", M5ItemSheet, { makeDefault: true });
+1
View File
@@ -157,6 +157,7 @@ export interface M5AttributeCalculated extends M5ModResult {
export interface M5CharacterCalculatedData {
level: number;
initiative: number;
attributes: {
st: M5AttributeCalculated;
gs: M5AttributeCalculated;
+3
View File
@@ -39,6 +39,7 @@ export class M5Character extends Actor {
): M5CharacterCalculatedData {
let ret: M5CharacterCalculatedData = {
level: 0,
initiative: 0,
attributes: {
st: { value: 0, bonus: 0, mods: [] },
gs: { value: 0, bonus: 0, mods: [] },
@@ -101,6 +102,8 @@ export class M5Character extends Actor {
ret.level = M5Character.levelFromExp(data.info.race === "Zwerg" ? Math.min(data.calc.stats?.hoard * 2 || 0, data.es) : data.es);
ret.initiative = data.skills.general.anfuehren.fw;
ret.attributes.st.value = M5Character.attributeMinMax(data.attributes.st); // TODO item effects
ret.attributes.gs.value = M5Character.attributeMinMax(data.attributes.gs);
ret.attributes.gw.value = M5Character.attributeMinMax(data.attributes.gw);
+6 -5
View File
@@ -11,30 +11,31 @@
.flexcolumn {
flex-wrap: wrap;
flex-direction: column;
}
.flexcolumn-1 {
flex: 100%;
flex-basis: 100%;
flex-wrap: wrap;
}
.flexcolumn-2 {
flex: 50%;
flex-basis: 50%;
flex-wrap: wrap;
}
.flexcolumn-3 {
flex: 33%;
flex-basis: 33%;
flex-wrap: wrap;
}
.flexcolumn-4 {
flex: 25%;
flex-basis: 25%;
flex-wrap: wrap;
}
.flexcolumn-5 {
flex: 20%;
flex-basis: 20%;
flex-wrap: wrap;
}