Jump to content

list all mods in gui/pregame/ProjectInformation.js


seeh
 Share

Recommended Posts

I have seen that some mods place their name on the GUI start page at the bottom left and only one mod name is listed there. I think it would be nicer if others are also listed.
Here's an example of what that could look like:

Screenshot_20230626_200852.jpg.89cc9b80340bae5530d8693212263036.jpg

/**
 * IMPORTANT: Remember to update session/top_panel/BuildLabel.xml in sync with this.
 */
let modsString = '';
for (let [key, value] of Object.entries(Engine.GetEngineInfo().mods)) {
		if(key<1) continue;
		for (let [key2, value2] of Object.entries(Engine.GetEngineInfo().mods[key])) {
			if(key2 != 'name' && key2 != 'version') continue;
			modsString += ` ${value2}`; // mod/name/version : ... 
		}
}
modsString = modsString.replace(/\s+([a-z])/gi , "\n$1"  ) ; 
modsString = modsString.replace(/\s+(proGUI)/g , "\n$1(boonGUI, BetterQuickStart)"  ) ; 
modsString = modsString.replace(/\s+(autocivP)/g , "\n$1(autociv)"  ) ; 
var g_ProjectInformation = {
	"organizationName": {
		"caption": translate("WILDFIRE GAMES")
	},
	"organizationLogo": {
		"sprite": "WildfireGamesLogo"
	},
	"productLogo": {
		"sprite": "0ADLogo"
	},
	"productBuild": {
		"caption": getBuildString()
	},
	"productDescription": {
		"caption": setStringTags(translate("Alpha XXVI: Zhuangzi"), { "font": "sans-bold-18" })
		 + "\n"
		 + setStringTags(translate(modsString.trim(), { "font": "sans-16" }))
		 + "\n"
	}
};

 

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...