Merge pull request #77 from Futil/0.5.27_bugfix

0.5.27 Fixes & Translations
This commit is contained in:
Chris Schmalz
2025-04-06 11:05:29 -07:00
committed by GitHub
5 changed files with 1159 additions and 20 deletions
+1133
View File
File diff suppressed because it is too large Load Diff
+8 -6
View File
@@ -60,21 +60,23 @@ export class MothershipActor extends Actor {
if (game.settings.get("mosh", "useCalm") && context === 'stress') {
context = 'calm';
}
let systemclass = this.system.class.value.toLowerCase();
if (systemclass != "android"){
systemclass = "human";
let systemclass = "human";
if (this.type === 'character' && this.system.class && this.system.class.value.toLowerCase() === "android") {
systemclass = "android";
//todo: get the class item for the character to check the "is robotic" flag
}
let locString = `Mosh.${type}.${context}.${action}.${systemclass}`;
//check to see if this address exists in the library, return the action parameter if not
if(game.i18n.has(locString, true)){ // You can pass false as the second argument to ignore english-language fallback.
//log what was done
console.log(`Retrieved flavor text for ${type}:${context}:${action}`);
console.log(`Retrieved flavor text for ${locString}`);
//return class appropriate text
return game.i18n.localize(locString);
} else {
//log what was done
console.log(`Retrieved flavor text for ${type}:${context}:${action}, which did not have an entry`);
console.log(`Using language: ${game.i18n.language}`);
console.log(`Retrieved flavor text for ${locString}, which did not have an entry`);
console.log(`Using language: ${game.i18n.lang}`);
//return what we were asked
return action;
}
+6 -1
View File
@@ -2,7 +2,7 @@
"id": "mosh",
"title": "MoSh - Unofficial Mothership",
"description": "The unofficial Mothership system for FoundryVTT.",
"version": "0.5.26",
"version": "0.5.27",
"esmodules": [
"module/mosh.js"
],
@@ -138,6 +138,11 @@
"name": "English",
"path": "lang/en.json",
"flags": {}
},
{
"lang": "pt-BR",
"path": "lang/pt-BR.json",
"flags": {}
}
],
"grid.distance": 1,
-1
View File
@@ -179,7 +179,6 @@
<div class="skill-stat" style="flex-grow: 2;">{{ localize 'Mosh.Name' }}</div>
<div class="skill-stat">{{ localize 'Mosh.Damage' }}{{#if system.swarm.enabled}} {{ localize 'Mosh.SwarmWoundShort' }}{{/if}}</div>
<div class="skill-stat">{{ localize 'Mosh.Damage' }}</div>
<div class="skill-stat">{{ localize 'Mosh.Ammo' }}</div>
<div class="skill-stat">{{ localize 'Mosh.Shots' }}</div>
<div class="skill-stat">{{ localize 'Mosh.Range' }}</div>
+12 -12
View File
@@ -91,18 +91,18 @@
<option value="Bleeding" />
<option value="Bleeding [-]" />
<option value="Bleeding [+]" />
<option value="BluntForce" />
<option value="BluntForce [-]" />
<option value="BluntForce [+]" />
<option value="FireAndExplosives" />
<option value="FireAndExplosives [-]" />
<option value="FireAndExplosives [+]" />
<option value="GoreAndMassive" />
<option value="GoreAndMassive [-]" />
<option value="GoreAndMassive [+]" />
<option value="Gunshot'" />
<option value="Gunshot' [-]" />
<option value="Gunshot' [+]" />
<option value="Blunt Force" />
<option value="Blunt Force [-]" />
<option value="Blunt Force [+]" />
<option value="Fire & Explosives" />
<option value="Fire & Explosives [-]" />
<option value="Fire & Explosives [+]" />
<option value="Gore & Massive" />
<option value="Gore & Massive [-]" />
<option value="Gore & Massive [+]" />
<option value="Gunshot" />
<option value="Gunshot [-]" />
<option value="Gunshot [+]" />
</datalist>
{{/if}}
</div>