Skip to content

Commit

Permalink
cultureName into cultureId + cultureName
Browse files Browse the repository at this point in the history
And deleted the incomplete code of showing culture name on datatip
  • Loading branch information
Avengium committed Jan 16, 2024
1 parent 44673c2 commit 830fa97
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions modules/ui/provinces-editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 830fa97

Please sign in to comment.