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') { if (game.settings.get("mosh", "useCalm") && context === 'stress') {
context = 'calm'; context = 'calm';
} }
let systemclass = "human";
let systemclass = this.system.class.value.toLowerCase(); if (this.type === 'character' && this.system.class && this.system.class.value.toLowerCase() === "android") {
if (systemclass != "android"){ systemclass = "android";
systemclass = "human"; //todo: get the class item for the character to check the "is robotic" flag
} }
let locString = `Mosh.${type}.${context}.${action}.${systemclass}`; let locString = `Mosh.${type}.${context}.${action}.${systemclass}`;
//check to see if this address exists in the library, return the action parameter if not //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. if(game.i18n.has(locString, true)){ // You can pass false as the second argument to ignore english-language fallback.
//log what was done //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 class appropriate text
return game.i18n.localize(locString); return game.i18n.localize(locString);
} else { } else {
//log what was done //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 what we were asked
return action; return action;
} }
+6 -1
View File
@@ -2,7 +2,7 @@
"id": "mosh", "id": "mosh",
"title": "MoSh - Unofficial Mothership", "title": "MoSh - Unofficial Mothership",
"description": "The unofficial Mothership system for FoundryVTT.", "description": "The unofficial Mothership system for FoundryVTT.",
"version": "0.5.26", "version": "0.5.27",
"esmodules": [ "esmodules": [
"module/mosh.js" "module/mosh.js"
], ],
@@ -138,6 +138,11 @@
"name": "English", "name": "English",
"path": "lang/en.json", "path": "lang/en.json",
"flags": {} "flags": {}
},
{
"lang": "pt-BR",
"path": "lang/pt-BR.json",
"flags": {}
} }
], ],
"grid.distance": 1, "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" 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' }}{{#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.Ammo' }}</div>
<div class="skill-stat">{{ localize 'Mosh.Shots' }}</div> <div class="skill-stat">{{ localize 'Mosh.Shots' }}</div>
<div class="skill-stat">{{ localize 'Mosh.Range' }}</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="Bleeding [-]" />
<option value="Bleeding [+]" /> <option value="Bleeding [+]" />
<option value="BluntForce" /> <option value="Blunt Force" />
<option value="BluntForce [-]" /> <option value="Blunt Force [-]" />
<option value="BluntForce [+]" /> <option value="Blunt Force [+]" />
<option value="FireAndExplosives" /> <option value="Fire & Explosives" />
<option value="FireAndExplosives [-]" /> <option value="Fire & Explosives [-]" />
<option value="FireAndExplosives [+]" /> <option value="Fire & Explosives [+]" />
<option value="GoreAndMassive" /> <option value="Gore & Massive" />
<option value="GoreAndMassive [-]" /> <option value="Gore & Massive [-]" />
<option value="GoreAndMassive [+]" /> <option value="Gore & Massive [+]" />
<option value="Gunshot'" /> <option value="Gunshot" />
<option value="Gunshot' [-]" /> <option value="Gunshot [-]" />
<option value="Gunshot' [+]" /> <option value="Gunshot [+]" />
</datalist> </datalist>
{{/if}} {{/if}}
</div> </div>