Fix bug on getFlavorText for creatures and ships
This commit is contained in:
@@ -60,21 +60,20 @@ 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') {
|
||||
systemclass = this.system.class.value.toLowerCase();
|
||||
}
|
||||
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(`Retrieved flavor text for ${locString}, which did not have an entry`);
|
||||
//return what we were asked
|
||||
return action;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user