From 830fa97d42dceadb9b26087054100f59ef88d7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81ngel=20Montero=20Lamas?= Date: Tue, 16 Jan 2024 19:44:02 +0100 Subject: [PATCH] cultureName into cultureId + cultureName And deleted the incomplete code of showing culture name on datatip --- modules/ui/provinces-editor.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/modules/ui/provinces-editor.js b/modules/ui/provinces-editor.js index e5c4a9b71..22d8e9d97 100644 --- a/modules/ui/provinces-editor.js +++ b/modules/ui/provinces-editor.js @@ -501,7 +501,8 @@ function editProvinces() { applyOption(provinceNameEditorSelectForm, p.formName); document.getElementById("provinceNameEditorFull").value = p.fullName; - const cultureName = pack.cultures[pack.cells.culture[pack.provinces[province].center]].name; // to display the culture name + const cultureId = pack.cells.culture[p.center]; + const cultureName = pack.cultures[cultureId].name; const provinceLangID = pack.cultures[pack.cells.culture[pack.provinces[province].center]].base; const provinceNameBase = Names.getNameBases()[provinceLangID].name; document.getElementById("provinceCultureDisplay").innerText = cultureName; @@ -530,11 +531,6 @@ function editProvinces() { document.getElementById("provinceNameEditorShortRandom").addEventListener("click", regenerateShortNameRandom); document.getElementById("provinceNameEditorAddForm").addEventListener("click", addCustomForm); document.getElementById("provinceNameEditorFullRegenerate").addEventListener("click", regenerateFullName); - - document.getElementById("provinceNameEditorShortCulture").addEventListener("mouseover", showdatatipNamesbase); - function showdatatipNamesbase() { - tip("namesbase " + this.id + Names.getNameBases()[provinceCultureID].name); - } function regenerateShortNameCulture() { const province = +provinceNameEditor.dataset.province;