Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/gui/common/functions_utility.js
/** | /** | ||||
* Used for acoustic GUI notifications. | * Used for acoustic GUI notifications. | ||||
* Define the soundfile paths and specific time thresholds (avoid spam). | * Define the soundfile paths and specific time thresholds (avoid spam). | ||||
* And store the timestamp of last interaction for each notification. | * And store the timestamp of last interaction for each notification. | ||||
*/ | */ | ||||
var g_SoundNotifications = { | var g_SoundNotifications = { | ||||
"nick": { "soundfile": "audio/interface/ui/chat_alert.ogg", "threshold": 3000 }, | "nick": { "soundfile": "audio/interface/ui/chat_alert.ogg", "threshold": 3000 }, | ||||
"gamesetup.join": { "soundfile": "audio/interface/ui/gamesetup_join.ogg", "threshold": 0 } | "gamesetup.join": { "soundfile": "audio/interface/ui/gamesetup_join.ogg", "threshold": 0 } | ||||
}; | }; | ||||
/** | /** | ||||
* Save setting for current instance and write setting to the user config file. | |||||
*/ | |||||
function saveSettingAndWriteToUserConfig(setting, value) | |||||
{ | |||||
Engine.ConfigDB_CreateValue("user", setting, value); | |||||
Engine.ConfigDB_WriteValueToFile("user", setting, value, "config/user.cfg"); | |||||
} | |||||
/** | |||||
* Returns translated history and gameplay data of all civs, optionally including a mock gaia civ. | * Returns translated history and gameplay data of all civs, optionally including a mock gaia civ. | ||||
*/ | */ | ||||
function loadCivData(selectableOnly, gaia) | function loadCivData(selectableOnly, gaia) | ||||
{ | { | ||||
let civData = loadCivFiles(selectableOnly); | let civData = loadCivFiles(selectableOnly); | ||||
translateObjectKeys(civData, ["Name", "Description", "History", "Special"]); | translateObjectKeys(civData, ["Name", "Description", "History", "Special"]); | ||||
▲ Show 20 Lines • Show All 207 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator