From 0904778c00018f9c861c9e7a55c2e044c41d9a72 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 14 Nov 2024 13:28:58 +0100 Subject: [PATCH 001/130] productions - fix sorting for QI boosts --- js/web/productions/js/productions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index b358cf4fd..f2943601f 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -487,9 +487,9 @@ let Productions = { for (let type of Object.keys(MainParser.BoostSums)) { if (type.includes('guild_raids')) { if (boosts[type] != undefined) - rowA.push(''+ HTML.Format(boosts[type]) +'') + rowA.push(''+ HTML.Format(boosts[type]) +'') else - rowA.push('-') + rowA.push('-') } } } From 3b7e1f72abcc1a40a454be5f2d0f588192a8494e Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 15 Nov 2024 14:49:26 +0100 Subject: [PATCH 002/130] Qi Progress Tracker #2778 --- js/web/_i18n/en.json | 9 + js/web/_main/js/_main.js | 1 + js/web/qiprogress/css/qiprogress.css | 31 ++ js/web/qiprogress/js/qiprogress.js | 708 +++++++++++++++++++++++++++ 4 files changed, 749 insertions(+) create mode 100644 js/web/qiprogress/css/qiprogress.css create mode 100644 js/web/qiprogress/js/qiprogress.js diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 7ad668ec3..611d21307 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -986,6 +986,14 @@ "Boxes.PvPArena.Tabs.DefenseFights": "Defense", "Boxes.PvPArena.Tabs.LostAttackFights": "lost Attacks", "Boxes.QIMap.Title": "Quantum Incursion Map", + "Boxes.QiProgress.Actions": "Actions", + "Boxes.QiProgress.Progress": "Progress", + "Boxes.QiProgress.QiRound": "QI Round", + "Boxes.QiProgress.ShowProgressFilter": "Show progress filter", + "Boxes.QiProgress.ShowRoundSelector": "Show QI round selector", + "Boxes.QiProgress.SnapshotLog": "QI Snapshot Log", + "Boxes.QiProgress.SnapShotLogDisclaimer": "Disclaimer: This data is based on your collected data. The numbers shown here are probably not 100% accurate. You'd have to open the list at midnight for them to be correct.", + "Boxes.QiProgress.Title": "QI Overview", "Boxes.RecurringQuests.AND": "AND", "Boxes.RecurringQuests.OR": "OR", "Boxes.RecurringQuests.Table.Quest": "Quest name", @@ -1215,6 +1223,7 @@ "Eras.9.short": "PE", "Eras.GvGAllAge": "All Ages", "General.Boost":"Boost", + "General.Date":"Date", "General.GB": "Great Building", "General.Guild": "Guild", "General.Level": "Level", diff --git a/js/web/_main/js/_main.js b/js/web/_main/js/_main.js index 029641500..e686ef9ae 100644 --- a/js/web/_main/js/_main.js +++ b/js/web/_main/js/_main.js @@ -243,6 +243,7 @@ GetFights = () =>{ GuildMemberStat.checkForDB(ExtPlayerID); GexStat.checkForDB(ExtPlayerID); GuildFights.checkForDB(ExtPlayerID); + QiProgress.checkForDB(ExtPlayerID); // which tab is active in StartUp Object? let vals = { diff --git a/js/web/qiprogress/css/qiprogress.css b/js/web/qiprogress/css/qiprogress.css new file mode 100644 index 000000000..825a7eaf2 --- /dev/null +++ b/js/web/qiprogress/css/qiprogress.css @@ -0,0 +1,31 @@ +#QiProgressList { + width: 570px; + height: 500px; +} + +#QiProgressListBody { + overflow: auto; +} + +#qi_roundswitch { + padding: 2px; +} + +#QiProgressTable img { + max-height: 25px; + border-radius: 2px; +} + +#QiProgressTable thead { + position: sticky; + top: 0; +} + +#QiProgressTable .tdmin { + width: 1%; + white-space: nowrap; +} + +#QiProgressPlayerDetails { + width: 400px; +} \ No newline at end of file diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js new file mode 100644 index 000000000..376e5b6a0 --- /dev/null +++ b/js/web/qiprogress/js/qiprogress.js @@ -0,0 +1,708 @@ +/* + * + * * ************************************************************************************** + * * Copyright (C) 2024 FoE-Helper team - All Rights Reserved + * * You may use, distribute and modify this code under the + * * terms of the AGPL license. + * * + * * See file LICENSE.md or go to + * * https://github.com/mainIine/foe-helfer-extension/blob/master/LICENSE.md + * * for full license details. + * * + * * ************************************************************************************** + * + */ + + +FoEproxy.addHandler('GuildRaidsService', 'getMemberActivityOverview', (data, postData) => { + QiProgress.HandleQiProgress(data.responseData.rows); +}); + +FoEproxy.addHandler('GuildRaidsService', 'getState', (data, postData) => { + QiProgress.GlobalRankingTimeout = setTimeout(()=>{ + if (data.responseData.__class__ == 'GuildRaidsRunningState') { + QiProgress.CurrentQIRound = data.responseData.endsAt + + if (QiProgress.curDateFilter === null || QiProgress.curDateEndFilter === null) { + QiProgress.curDateFilter = moment.unix(QiProgress.CurrentQIRound).subtract(11, 'd').format('YYYYMMDD') + QiProgress.curDateEndFilter = moment.unix(QiProgress.CurrentQIRound).format('YYYYMMDD') + } + } + },500) +}); + +let QiProgress = { + ProgressListContent: [], + PrevAction: null, + PrevActionTimestamp: null, + NewAction: null, + NewActionTimestamp: null, + CurrentQIRound: null, + AllRounds: null, + ProgressContent: [], + curDateFilter: null, + curDateEndFilter: null, + GlobalRankingTimeout: null, + NewActionTimestamp: null, + HistoryView: false, + ProgressSettings: { + showRoundSelector: 1, + showProgressFilter: 1, + showOnlyActivePlayers: 0, + }, + + /** + * + * @returns {Promise} + */ + checkForDB: async (playerID) => { + const DBName = `FoeHelperDB_Qi_${playerID}`; + + QiProgress.db = new Dexie(DBName); + + QiProgress.db.version(1).stores({ + snapshots: '&[player_id+qiround+time],[qiround+player_id], [date+player_id], qiround', + history: '&qiround' + }); + + QiProgress.db.open(); + }, + + + /** + * Shows the player overview + */ + ShowProgressList: () => { + if ($('#QiProgressList').length === 0) { + + HTML.Box({ + id: 'QiProgressList', + title: i18n('Boxes.QiProgress.Title'), + auto_close: true, + dragdrop: true, + minimize: true, + resize: true, + settings: 'QiProgress.ShowSettings()' + }); + HTML.AddCssFile('qiprogress'); + } + + QiProgress.BuildProgressList(QiProgress.CurrentQIRound); + }, + + /** + * Built the player content content + * @param qiRound + * @returns {Promise} + */ + BuildProgressList: async (qiRound) => { + + let newRound = false; + let updateDetailView = false; + + await QiProgress.SetBoxNavigation(qiRound); + + let CurrentSnapshot = await QiProgress.db.snapshots + .where({ + qiround: QiProgress.CurrentQIRound + }) + .first(); + + if (CurrentSnapshot === undefined) { + newRound = true; + // if there is a new round delete previous snapshots + QiProgress.DeleteOldSnapshots(QiProgress.CurrentQIRound); + } + + let t = [], + b = [], + tA = 0, + histView = false; + + QiProgress.ProgressContent = []; + + QiProgress.ProgressContent.push({ + player_id: 'player_id', + player: 'player', + actions: 'actions', + progress: 'progress', + }); + + if (qiRound && qiRound !== null && qiRound !== QiProgress.CurrentQIRound) { + let d = await QiProgress.db.history.where({ qiround: qiRound }).toArray(); + QiProgress.qiRound = d[0].participation.sort(function (a, b) { + return a.rank - b.rank; + }); + histView = true; + } + else { + QiProgress.qiRound = QiProgress.NewAction; + } + + for (let i in QiProgress.qiRound) { + if (!QiProgress.qiRound.hasOwnProperty(i)) break; + + let playerNew = QiProgress.qiRound[i]; + + let newActions = '', + diffActions = 0, + newProgress = '', + diffProgress = 0, + newProgressClass = '', + change = false; + + // older snapshot available? + if (QiProgress.PrevAction !== null && histView === false) { + let playerOld = QiProgress.PrevAction.find(p => (p['player_id'] === playerNew['player_id'])); + + // any data on this player? + if (playerOld !== undefined) { + if (playerOld.actions < playerNew.actions) { + diffActions = playerNew.actions - playerOld.actions + newActions = ' ↑ ' + HTML.Format(diffActions) + ''; + change = true; + } + if (playerOld.progress < playerNew.progress) { + diffProgress = playerNew.progress - playerOld.progress + newProgress = ' ↑ ' + diffProgress + ''; + change = true; + } + } + } + + if ((change === true || newRound === true) && QiProgress.HistoryView === false) { + await QiProgress.UpdateDB('player', { + qiRound: QiProgress.CurrentQIRound, + player_id: playerNew.player_id, + name: playerNew.name, + actions: playerNew.actions, + progress: playerNew.progress, + diffActions: diffActions, + diffProgress: diffProgress, + time: moment().unix() + }); + updateDetailView = true; + } + + newProgressClass = change && !newRound ? 'new ' : ''; + + tA += playerNew.actions + + b.push(''); + b.push('' + (parseInt(i) + 1) + '.'); + b.push(''); + b.push('' + playerNew.name + ''); + b.push('' + HTML.Format(playerNew.actions)+ newActions + ''); + b.push('' + HTML.Format(playerNew.progress) + newProgress + ''); + b.push(''); + + QiProgress.ProgressContent.push({ + player_id: playerNew.player_id, + player: playerNew.name, + actions: playerNew.actions, + progress: playerNew.progress + }) + } + + t.push(''); + t.push(''); + t.push(''); + t.push(''); + t.push(''); + t.push(''); + t.push(''); + t.push(''); + + t.push(''); + t.push(b.join('')); + t.push(''); + + $('#qiContentWrapper').html(t.join('')).promise().done(function () { + + $('#QiProgressListBody tr.showdetailview').off('click').on('click', function () { + let player_id = $(this).data('player'); + let qiRound = $(this).data('qiround'); + + QiProgress.curDetailViewFilter = { content: 'player', player_id: player_id, qiround: qiRound }; + + if ($('#QiProgressDetailView').length === 0) { + QiProgress.ShowPlayerDetailsBox(QiProgress.curDetailViewFilter); + } + }); + + $("#QiProgress").on("remove", function () { + if ($('#QiProgressDetailView').length !== 0) { + $('#QiProgressDetailView').fadeOut(50, function () { + $(this).remove(); + }); + } + }); + + // check if member has a new progress + let newPlayerProgress = $('#QiProgressTable tbody').find('tr.new').length; + if (newPlayerProgress > 0) { + $('button#qi_filterProgressList').html('↑ ' + newPlayerProgress); + $('button#qi_filterProgressList').attr("disabled", false); + + if (QiProgress.ProgressSettings.showOnlyActivePlayers === 1) { + QiProgress.ToggleProgressList('qi_filterProgressList'); + } + } + }); + + if ($('#QiProgressHeader .title').find('.time-diff').length === 0) { + $('#QiProgressHeader .title').append($('').addClass('time-diff')); + } + + // es gibt schon einen Snapshot vorher + if (QiProgress.PrevActionTimestamp !== null) { + let start = moment.unix(QiProgress.PrevActionTimestamp), + end = moment.unix(QiProgress.NewActionTimestamp), + duration = moment.duration(end.diff(start)); + + let time = duration.humanize(); + + $('.time-diff').text( + HTML.i18nReplacer(i18n('Boxes.QiProgress.LastSnapshot'), { time: time }) + ); + } + }, + + + ProgressListSettingsSaveValues: () => { + QiProgress.ProgressSettings.showRoundSelector = $("#gf_showRoundSelector").is(':checked') ? 1 : 0; + QiProgress.ProgressSettings.showProgressFilter = $("#gf_showProgressFilter").is(':checked') ? 1 : 0; + + localStorage.setItem('QiProgressProgressSettings', JSON.stringify(QiProgress.ProgressSettings)); + + $(`#QiProgressListSettingsBox`).fadeToggle('fast', function () { + $(this).remove(); + QiProgress.BuildProgressList(QiProgress.CurrentQIRound); + }); + }, + + + /** + * Filters the list for players with new progress + */ + ToggleProgressList: (id) => { + let elem = $('#QiProgressTable > tbody'); + let nelem = elem.find('tr.new'); + let act = $('#' + id).hasClass('filtered') ? 'show' : 'hide'; + + if (act === 'hide') { + if (nelem.length !== 0) { + let oelem = elem.find('tr:not(.new)'); + QiProgress.ProgressSettings.showOnlyActivePlayers = 1; + localStorage.setItem('QiProgressProgressSettings', JSON.stringify(QiProgress.ProgressSettings)); + $('#QiProgressTable > thead .text-warning').hide(); + oelem.hide(); + $('#' + id).addClass('filtered btn-green'); + } + } + else if (act === 'show') { + elem.find('tr').show(); + QiProgress.ProgressSettings.showOnlyActivePlayers = 0; + localStorage.setItem('QiProgressProgressSettings', JSON.stringify(QiProgress.ProgressSettings)); + $('#QiProgressTable > thead .text-warning').show(); + $('#' + id).removeClass('filtered btn-green'); + } + }, + + ShowPlayerDetailsBox: (d) => { + if ($('#QiProgressPlayerDetails').length === 0) { + let ptop = null, + pright = null; + + HTML.Box({ + id: 'QiProgressPlayerDetails', + title: i18n('Boxes.QiProgress.SnapshotLog'), + auto_close: true, + dragdrop: true, + minimize: true, + resize: true + }); + + if (localStorage.getItem('QiProgressPlayerDetailsCords') === null) { + ptop = $('#QiProgress').length !== 0 ? $('#QiProgress').position().top : 0; + pright = $('#QiProgress').length !== 0 ? ($('#QiProgress').position().left + $('#QiProgress').width() + 10) : 0; + $('#QiProgressPlayerDetails').css('top', ptop + 'px').css('left', (pright * 1) + 'px'); + } + } + + QiProgress.BuildPlayerDetailContent(d); + }, + + + BuildPlayerDetailContent: async (d) => { + let player_id = d.player_id ? d.player_id : null, + content = d.content ? d.content : 'player', + qiround = d.qiround ? d.qiround : QiProgress.CurrentQIRound, + playerName = null, + dailyProgress = [], + detaildata = [], + h = []; + + if (player_id === null && content === "player") return; + + if (content === "player") { + detaildata = await QiProgress.db.snapshots.where({ qiround: qiround, player_id: player_id }).toArray(); + + playerName = detaildata[0].name; + dailyProgress = detaildata.reduce(function (res, obj) { + let date = moment.unix(obj.time).format('YYYYMMDD'); + + if (!(date in res)) { + res.__array.push(res[date] = { date: date, time: obj.time, actions: obj.actions, progress: obj.progress }); + } + else { + res[date].actions += +obj.actions; + res[date].progress += +obj.progress; + } + return res; + }, { __array: [] }).__array.sort(function (a, b) { return b.date - a.date }); + + + h.push('
' + playerName + ': ' + moment.unix(qiround).subtract(11, 'd').format(i18n('DateShort')) + ` - ` + moment.unix(qiround).format(i18n('Date')) + '
'); + h.push('

' + i18n('Boxes.QiProgress.SnapShotLogDisclaimer') + '

') + h.push('
' + i18n('General.Player') + '' + i18n('Boxes.QiProgress.Actions') + '
(' + HTML.Format(tA) + ')
' + i18n('Boxes.QiProgress.Progress') + '
(' + HTML.Format(tA) + ')
'); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + + dailyProgress.forEach(day => { + let id = moment.unix(day.time).format(i18n('DateTime')); + h.push(''); + h.push(``); + h.push(``); + h.push(``); + h.push(''); + + }); + + h.push('
' + i18n('General.Date') + '' + HTML.i18nTooltip(i18n('Boxes.QiProgress.Actions')) + '' + HTML.i18nTooltip(i18n('Boxes.QiProgress.Progress')) + '
${moment.unix(day.time).format(i18n('Date'))}${HTML.Format(day.actions)}${HTML.Format(day.progress)}
'); + } + else if (content === "filter") { + detaildata = await QiProgress.db.snapshots.where({ qiround: qiround }).and(function (item) { + return (item.date >= QiProgress.curDateFilter && item.date <= QiProgress.curDateEndFilter) + }).toArray(); + + detaildata.sort(function (a, b) { return b.time - a.time }); + + h.push('
'); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + h.push(''); + + detaildata.forEach(e => { + h.push(''); + h.push(``); + h.push(``); + h.push(``); + h.push(``); + h.push(''); + }); + + h.push('
' + i18n('Boxes.QiProgress.Date') + '' + i18n('Boxes.QiProgress.Player') + '' + HTML.i18nTooltip(i18n('Boxes.QiProgress.Actions')) + '' + HTML.i18nTooltip(i18n('Boxes.QiProgress.Progress')) + '
${moment.unix(e.time).format(i18n('DateTime'))}${e.name}${HTML.Format(e.actions)}${HTML.Format(e.progress)}
'); + } + + $('#QiProgressPlayerDetailsBody').html(h.join('')).promise().done(function () { + + $('#QiProgressPlayerDetailsBody .qilog').tableSorter(); + + if ($('#qiLogDatepicker').length !== 0) { + QiProgress.intiateDatePicker(); + } + $('#QiProgressPlayerDetailsBody tr.sorter-header').on('click', function () { + $(this).parents('.foe-table').find('tr.open').removeClass("open"); + + }); + + $('#QiProgressPlayerDetailsBody > .foe-table tr').on('click', function () { + + if ($(this).next("tr.detailview").length) { + $(this).next("tr.detailview").remove(); + $(this).removeClass('open'); + } + else { + if (!$(this).hasClass("hasdetail")) return; + + let date = $(this).data("id"); + let player = $(this).data("player"); + let awidth = $(this).find('td:first-child').width(); + let bwidth = $(this).find('td:nth-child(2)').width(); + let cwidth = $(this).find('td:nth-child(3)').width(); + let dwidth = $(this).find('td:nth-child(4)').width(); + let ewidth = $(this).find('td:last-child').width(); + + $(this).addClass('open'); + + QiProgress.BuildDetailViewLog({ date: date, player: player, width: { a: awidth, b: bwidth, c: cwidth, d: dwidth, e: ewidth } }); + } + }); + + }); + }, + + + formatRange: () => { + let text = undefined; + let dateStart = moment(QiProgress.curDateFilter); + let dateEnd = moment(QiProgress.curDateEndFilter); + + if (dateStart.isSame(dateEnd)) { + text = `${dateStart.format(i18n('Date'))}`; + } + else if (dateStart.year() !== (dateEnd.year())) { + text = `${dateStart.format(i18n('Date'))}` + ' - ' + `${dateEnd.format(i18n('Date'))}`; + } + else { + text = `${dateStart.format(i18n('DateShort'))}` + ' - ' + `${dateEnd.format(i18n('Date'))}`; + } + + return text; + }, + + + /** + * @param qiRound + * @returns {Promise} + */ + SetBoxNavigation: async (qiRound) => { + let h = []; + let i = 0; + let storageSettings = localStorage.getItem('QiProgressProgressSettings') + let ProgressSettings = (storageSettings != null && storageSettings != 'undefined') ? JSON.parse(localStorage.getItem('QiProgressProgressSettings')) : '{}'; + + QiProgress.ProgressSettings.showRoundSelector = (ProgressSettings.showRoundSelector !== null) ? ProgressSettings.showRoundSelector : QiProgress.ProgressSettings.showRoundSelector; + QiProgress.ProgressSettings.showProgressFilter = (ProgressSettings.showProgressFilter !== null) ? ProgressSettings.showProgressFilter : QiProgress.ProgressSettings.showProgressFilter; + + if (QiProgress.AllRounds === undefined || QiProgress.AllRounds === null) { + // get all available entires + const qiRounds = await QiProgress.db.history.where('qiround').above(0).keys(); + qiRounds.sort(function (a, b) { return b - a }); + QiProgress.AllRounds = qiRounds; + + } + + //set latest round to show if available and no specific round is set + if (!qiRound && QiProgress.AllRounds && QiProgress.AllRounds.length) { + qiRound = QiProgress.AllRounds[i]; + } + + if (qiRound && QiProgress.AllRounds && QiProgress.AllRounds.length) { + let index = QiProgress.AllRounds.indexOf(qiRound); + let previousweek = QiProgress.AllRounds[index + 1] || null; + let nextweek = QiProgress.AllRounds[index - 1] || null; + + h.push(`
`); + + if (QiProgress.ProgressSettings.showRoundSelector) { + h.push(`${i18n('Boxes.QiProgress.QiRound')} `); + h.push(` `); + h.push(``); + } + + if (qiRound === QiProgress.CurrentQIRound) { + h.push(`
`); + if (QiProgress.ProgressSettings.showProgressFilter === 1) { + h.push(``); + } + h.push(`
`); + } + h.push(`
`); + } + + h.push(`
`); + + $('#QiProgressListBody').html(h.join('')).promise().done(function () { + + $('.btn-set-week').off().on('click', function () { + QiProgress.HistoryView = true; + let week = $(this).data('week'); + + if (!QiProgress.AllRounds.includes(week)) { return } + + QiProgress.BuildProgressList(week); + }); + + $('#qi-select-qiRound').off().on('change', function () { + QiProgress.HistoryView = true; + let week = parseInt($(this).val()); + + if (!QiProgress.AllRounds.includes(week) || week === QiProgress.CurrentqiRound) { return} + + QiProgress.BuildPlayerContent(week); + }); + + $('button#qi_showLog').off('click').on('click', function () { + QiProgress.curDetailViewFilter = { content: 'filter', qiRound: QiProgress.CurrentqiRound }; + QiProgress.ShowPlayerDetailsBox(QiProgress.curDetailViewFilter) + }); + + $('button#qi_filterProgressList').on('click', function () { + QiProgress.ToggleProgressList('qi_filterProgressList'); + }); + }); + }, + + + ShowSettings: () => { + let c = []; + let Settings = QiProgress.ProgressSettings; + c.push(`

`); + c.push(`

`); + c.push(`

`); + c.push(`

${i18n('Boxes.General.Export')}: `); + c.push(`

`); + + $('#QiProgressListSettingsBox').html(c.join('')); + }, + + /** + * @param d + * @returns {Promise} + */ + HandleQiProgress: async (d) => { + // immer zwei vorhalten, für Referenz Daten (LiveUpdate) + if (localStorage.getItem('QiProgress.NewAction') !== null) { + QiProgress.PrevAction = JSON.parse(localStorage.getItem('QiProgress.NewAction')); + QiProgress.PrevActionTimestamp = parseInt(localStorage.getItem('QiProgress.NewActionTimestamp')); + } + else if (QiProgress.NewAction !== null) { + QiProgress.PrevAction = QiProgress.NewAction; + QiProgress.PrevActionTimestamp = QiProgress.NewActionTimestamp; + } + + let players = [] + let sumActions = 0 + let sumProgress = 0 + + for (let i in d) { + if (!d.hasOwnProperty(i)) { break; } + sumActions += d[i].actionPoints || 0; + sumProgress += d[i].progressContribution || 0; + + players.push({ + qiround: QiProgress.CurrentQIRound, + rank: i * 1 + 1, + player_id: d[i].player.player_id, + name: d[i].player.name, + avatar: d[i].player.avatar, + actions: d[i].actionPoints || 0, + progress: d[i].progressContribution || 0 + }); + } + + await QiProgress.UpdateDB('history', { participation: players, actions: sumActions, progress: sumProgress }); + + QiProgress.HistoryView = false; + QiProgress.NewAction = players; + localStorage.setItem('QiProgress.NewAction', JSON.stringify(QiProgress.NewAction)); + + QiProgress.NewActionTimestamp = moment().unix(); + localStorage.setItem('QiProgress.NewActionTimestamp', QiProgress.NewActionTimestamp); + + if ($('#QiProgress').length > 0) { + QiProgress.BuildProgressList(QiProgress.CurrentQIRound); + console.log(1) + } + else { + QiProgress.ShowProgressList(); + } + }, + + + /** + * @param content + * @param data + * @returns {Promise} + */ + UpdateDB: async (content, data) => { + if (content === 'history') { + await QiProgress.db.history.put({ + qiround: QiProgress.CurrentQIRound, + actions: data.actions, + progress: data.progress + }); + } + + if (content === 'player') { + let actions = 0 + + let CurrentSnapshot = await QiProgress.db.snapshots + .where({ + qiround: QiProgress.CurrentQIRound, + player_id: data.player_id + }) + .first(); + + if (CurrentSnapshot === undefined) { + actions = data.actions + progress = data.progress + } + else { + actions = data.diffActions + progress = data.diffProgress + } + + await QiProgress.db.snapshots.add({ + qiround: QiProgress.CurrentQIRound, + player_id: data.player_id, + name: data.name, + date: parseInt(moment.unix(data.time).format("YYYYMMDD")), + time: data.time, + actions: actions, + progress: progress + }); + } + + }, + + /** + * Filters the list for players with new progress + */ + ToggleProgressList: (id) => { + let elem = $('#QiProgressTable > tbody'); + let nelem = elem.find('tr.new'); + let act = $('#' + id).hasClass('filtered') ? 'show' : 'hide'; + + if (act === 'hide') { + if (nelem.length !== 0) { + let oelem = elem.find('tr:not(.new)'); + QiProgress.ProgressSettings.showOnlyActivePlayers = 1; + localStorage.setItem('QiProgressProgressSettings', JSON.stringify(QiProgress.PlayerBoxSettings)); + $('#QiProgressTable > thead .text-warning').hide(); + oelem.hide(); + $('#' + id).addClass('filtered btn-green'); + } + } + + else if (act === 'show') { + elem.find('tr').show(); + QiProgress.ProgressSettings.showOnlyActivePlayers = 0; + localStorage.setItem('QiProgressProgressSettings', JSON.stringify(QiProgress.PlayerBoxSettings)); + $('#QiProgressTable > thead .text-warning').show(); + $('#' + id).removeClass('filtered btn-green'); + } + }, + + + DeleteOldSnapshots: async (qiround) => { + let deleteCount = await QiProgress.db.snapshots.where("qiround").notEqual(qiround).delete(); + }, +} \ No newline at end of file From 9f810e469b6b222040ca903a26e6469579438779 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 15 Nov 2024 14:52:09 +0100 Subject: [PATCH 003/130] export helper: added date #2503 --- js/web/_helper/js/_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/_helper/js/_helper.js b/js/web/_helper/js/_helper.js index d2a6f9552..1d2e127b8 100644 --- a/js/web/_helper/js/_helper.js +++ b/js/web/_helper/js/_helper.js @@ -990,7 +990,7 @@ let HTML = { // with UTF-8 BOM let BlobData = new Blob(["\uFEFF" + FileContent], { type: "application/octet-binary;charset=ANSI" }); - MainParser.ExportFile(BlobData, FileName + '.' + Format); + MainParser.ExportFile(BlobData, FileName + '-' + moment().format('YYYY-MM-DD') + '.' + Format); }); }, From dacf4a0a8e1ec1defb20d3eda0f9507976babda6 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 15 Nov 2024 14:55:56 +0100 Subject: [PATCH 004/130] QI DE Translations --- js/web/_i18n/de.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index ce3743548..7d446a3c0 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -986,6 +986,14 @@ "Boxes.PvPArena.Tabs.DefenseFights": "Verteidigung", "Boxes.PvPArena.Tabs.LostAttackFights": "verl. Angriffe", "Boxes.QIMap.Title": "QI Karte", + "Boxes.QiProgress.Actions": "Aktionen", + "Boxes.QiProgress.Progress": "Fortschritt", + "Boxes.QiProgress.QiRound": "QI Runde", + "Boxes.QiProgress.ShowProgressFilter": "Forschrittsfilter anzeigen", + "Boxes.QiProgress.ShowRoundSelector": "Runden-Auswahl anzeigen", + "Boxes.QiProgress.SnapshotLog": "QI Snapshot Log", + "Boxes.QiProgress.SnapShotLogDisclaimer": "Diese Daten sind nicht zu 100% zutreffend, wenn du nicht um Mitternacht (Server-Zeit) den Spielerfortschritt trackst.", + "Boxes.QiProgress.Title": "QI Übersicht", "Boxes.ReconstructionList.Title":"Umbau-Menü Größenliste", "Boxes.RecurringQuests.Title": "Wiederkehrende Quests", "Boxes.RecurringQuests.showCounter": "Zeige Zähler für offene Quests im Menu", @@ -1217,6 +1225,7 @@ "Eras.9.short": "JHW", "Eras.GvGAllAge": "Alle Zeitalter", "General.Boost":"Boost", + "General.Date":"Datum", "General.GB": "Legendäres Bauwerk", "General.Level": "Stufe", "General.Player": "Spieler", From a02c58e3e948f01b3f256258586b8152381560a3 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 15 Nov 2024 15:03:59 +0100 Subject: [PATCH 005/130] i hate merging --- js/internal.json | 1 + 1 file changed, 1 insertion(+) diff --git a/js/internal.json b/js/internal.json index 67d08d255..843e4f3a5 100644 --- a/js/internal.json +++ b/js/internal.json @@ -39,6 +39,7 @@ "fp-collector", "maptradewarning", "guildmemberstat", + "qiprogress", "quests", "gexstat", "dbexport", From 7f8e4048d5207f8fb34413271c72e1bb95c7afc8 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 15 Nov 2024 20:32:15 +0100 Subject: [PATCH 006/130] tooltips - move icons function to srclinks --- js/web/customTooltip/js/customTooltip.js | 180 +++++++++++------------ js/web/srcLinks/js/srcLinks.js | 10 ++ 2 files changed, 96 insertions(+), 94 deletions(-) diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index 0507829b3..bd9d9f4f9 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -136,16 +136,6 @@ let Tooltips = { if (day>0) time = day + (hour+sec+min>0 ? (hour>9?hour:"0"+hour) + (sec+min>0 ? ":"+(min>9?min:"0"+min)+(sec>0?":"+(sec>9?sec:"0"+sec):""):""):"")+"d" return time } - let src=(x)=>{ - if (!x) return "" - x=x.replace(/(.*?)_[0-9]+/gm,"$1"); - let link = srcLinks.get(`/shared/icons/${x}.png`,true,true); - if (link.includes("antiquedealer_flag")) link = srcLinks.get(`/shared/icons/reward_icons/reward_icon_${x}.png`,true,true); - if (link.includes("antiquedealer_flag")) link = srcLinks.get(`/city/buildings/${x.replace(/(\D*?)_(.*)/,"$1_SS_$2")}.png`,true); - return link - } - - let icons = (x) => ``;// ${y ? `style="background: url(${src(y)}); background-size: contain; background-repeat: no-repeat;"`:""}>`; let genericEval = (rew) => { let [x1,amount,name] = rew.name.match(/^([+\-]?\d*)x? (.*)$/)||["",1,rew.name] @@ -153,19 +143,19 @@ let Tooltips = { let icon = "" let fragment = "" if (rew.iconAssetName=="icon_fragment") { - icon = icons(rew.assembledReward?.iconAssetName||rew.assembledReward?.subType) + icon = srcLinks.icons(rew.assembledReward?.iconAssetName||rew.assembledReward?.subType) name = name.replace(/Fragments? of/,"").replace(/.*?'(.*?)'.*/,"$1") - fragment = icons("icon_tooltip_fragment") + fragment = srcLinks.icons("icon_tooltip_fragment") } else if (rew.type=="unit") { name = /nextera/i.test(rew.id)? "of next era" : "" - icon = icons(rew.subType=="rogue"?"rogue":( + icon = srcLinks.icons(rew.subType=="rogue"?"rogue":( rew.subType.includes("champion")?"chivalry": Unit.Types.filter(x=>x.unitTypeId==rew.subType)[0].unitClass )) } else - icon = icons(rew.iconAssetName) + icon = srcLinks.icons(rew.iconAssetName) return {icon:icon,amount:amount,name:name,fragment:fragment} } @@ -205,16 +195,16 @@ let Tooltips = { traits = "", motMod = "", polMod = "", - ifMot = `${icons("when_motivated")}` + ifMot = `${srcLinks.icons("when_motivated")}` if (levels?.AllAge?.socialInteraction?.interactionType) { if (levels?.AllAge?.socialInteraction?.interactionType == "motivate") { - motMod = `${icons("reward_x2")+i18n("Boxes.Tooltip.Building.when")+icons("when_motivated")}` - traits+=`${icons("when_motivated")}${i18n("Boxes.Tooltip.Building.canPolish")}` + motMod = `${srcLinks.icons("reward_x2")+i18n("Boxes.Tooltip.Building.when")+srcLinks.icons("when_motivated")}` + traits+=`${srcLinks.icons("when_motivated")}${i18n("Boxes.Tooltip.Building.canPolish")}` } else if (levels?.AllAge?.socialInteraction?.interactionType == "polish") { - polMod = `${icons("reward_x2")+"when"+icons("when_motivated")}` - traits+=`${icons("when_motivated")}${i18n("Boxes.Tooltip.Building.canMotivate")}` + polMod = `${srcLinks.icons("reward_x2")+"when"+srcLinks.icons("when_motivated")}` + traits+=`${srcLinks.icons("when_motivated")}${i18n("Boxes.Tooltip.Building.canMotivate")}` } } for (let a of meta.abilities||[]) { @@ -231,39 +221,39 @@ let Tooltips = { } for (r of levels.AllAge?.ally?.rooms || []) { - ally += ''+icons("historical_allies_slot_tooltip_icon_empty") + capFirsts(r.allyType) + (r.rarity?.value ? (" ("+capFirsts(r.rarity?.value)+")"):"")+`` + ally += ''+srcLinks.icons("historical_allies_slot_tooltip_icon_empty") + capFirsts(r.allyType) + (r.rarity?.value ? (" ("+capFirsts(r.rarity?.value)+")"):"")+`` } if (levels.AllAge.eraRequirement?.era && era =="") { - era = icons("era") + " " + i18n("Eras."+(Technologies.Eras[levels.AllAge.eraRequirement?.era])) + era = srcLinks.icons("era") + " " + i18n("Eras."+(Technologies.Eras[levels.AllAge.eraRequirement?.era])) } if (era != "") out += "" + era + "" if (levels?.AllAge?.limited?.config?.expireTime) { - out += `${icons("limited_building_downgrade") + MainParser.CityEntities[levels.AllAge.limited.config.targetCityEntityId].name} (${i18n("Boxes.Tooltip.Building.after")} ${formatTime(levels.AllAge.limited.config.expireTime)})` + out += `${srcLinks.icons("limited_building_downgrade") + MainParser.CityEntities[levels.AllAge.limited.config.targetCityEntityId].name} (${i18n("Boxes.Tooltip.Building.after")} ${formatTime(levels.AllAge.limited.config.expireTime)})` } let provides="" for ([resource,amount] of Object.entries(levels.AllAge?.staticResources?.resources?.resources||{})) { - provides+=`${icons(resource)+" "+ span(amount,true)}` + provides+=`${srcLinks.icons(resource)+" "+ span(amount,true)}` } for ([resource,amount] of Object.entries(levels?.[minEra]?.staticResources?.resources?.resources||{})) { - provides+=`${icons(resource)+" "+ range(amount,levels[maxEra]?.staticResources?.resources?.resources?.[resource],true)}` + provides+=`${srcLinks.icons(resource)+" "+ range(amount,levels[maxEra]?.staticResources?.resources?.resources?.[resource],true)}` } if (levels.AllAge?.happiness?.provided) { - provides+=`${icons("happiness")+" "+ span(levels.AllAge?.happiness?.provided,true) + polMod}` + provides+=`${srcLinks.icons("happiness")+" "+ span(levels.AllAge?.happiness?.provided,true) + polMod}` } if (levels?.[minEra]?.happiness?.provided && levels[maxEra]?.happiness?.provided) { - provides+=`${icons("happiness") + " " + range(levels?.[minEra]?.happiness?.provided,levels[maxEra]?.happiness?.provided,true) + polMod}` + provides+=`${srcLinks.icons("happiness") + " " + range(levels?.[minEra]?.happiness?.provided,levels[maxEra]?.happiness?.provided,true) + polMod}` } for (let [i,b] of Object.entries(levels.AllAge?.boosts?.boosts||[])){ - provides+=`${icons(b.type+feature[b.targetedFeature]) + " " + span(b.value) + percent(b.type)}` + provides+=`${srcLinks.icons(b.type+feature[b.targetedFeature]) + " " + span(b.value) + percent(b.type)}` } for (let [i,b] of Object.entries(levels?.[minEra]?.boosts?.boosts||[])){ - provides+=`${icons(b.type+feature[b.targetedFeature]) + " " + range(b.value,levels[maxEra]?.boosts?.boosts[i].value) + percent(b.type)}` + provides+=`${srcLinks.icons(b.type+feature[b.targetedFeature]) + " " + range(b.value,levels[maxEra]?.boosts?.boosts[i].value) + percent(b.type)}` } let prods="" @@ -275,13 +265,13 @@ let Tooltips = { if (product.type == "resources") { for (let [res,amount] of Object.entries(product.playerResources?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"goods":res) + span(amount)+t + ((["supplies","coins","money"].includes(res) && !product.onlyWhenMotivated) ? motMod : "") + (product.onlyWhenMotivated?ifMot:"")}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"goods":res) + span(amount)+t + ((["supplies","coins","money"].includes(res) && !product.onlyWhenMotivated) ? motMod : "") + (product.onlyWhenMotivated?ifMot:"")}` } } if (product.type == "guildResources") { for (let [res,amount] of Object.entries(product.guildResources?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"treasury_goods":res) + span(amount)+t + (product.onlyWhenMotivated?ifMot:"")}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"treasury_goods":res) + span(amount)+t + (product.onlyWhenMotivated?ifMot:"")}` } } if (product.type == "unit") { @@ -290,7 +280,7 @@ let Tooltips = { product.unitTypeId.includes("champion")?"chivalry": Unit.Types.filter(x=>x.unitTypeId==product.unitTypeId)[0].unitClass )) - prods+=`${icons(iconId) + span(product.amount)+t + (product.onlyWhenMotivated?ifMot:"")}` + prods+=`${srcLinks.icons(iconId) + span(product.amount)+t + (product.onlyWhenMotivated?ifMot:"")}` } } if (product.type == "genericReward") { @@ -304,13 +294,13 @@ let Tooltips = { if (random.product.type == "resources") { for (let [res,amount] of Object.entries(random.product.playerResources?.resources||{})) { if (amount !=0) - prods+=icons(goodsList.includes(res)?"goods":res) + span(amount) + prods+=srcLinks.icons(goodsList.includes(res)?"goods":res) + span(amount) } } if (random.product.type == "guildResources") { for (let [res,amount] of Object.entries(random.product.guildResources?.resources||{})) { if (amount !=0) - prods+=icons(goodsList.includes(res)?"treasury_goods":res) + span(amount) + prods+=srcLinks.icons(goodsList.includes(res)?"treasury_goods":res) + span(amount) } } if (random.product.type == "unit") { @@ -319,7 +309,7 @@ let Tooltips = { random.product.unitTypeId.includes("champion")?"chivalry": Unit.Types.filter(x=>x.unitTypeId==random.product.unitTypeId)[0].unitClass )) - prods+=icons(iconId) + span(random.product.amount) + prods+=srcLinks.icons(iconId) + span(random.product.amount) } } if (random.product.type == "genericReward") { @@ -338,13 +328,13 @@ let Tooltips = { if (product.type == "resources") { for (let [res,amount] of Object.entries(product.playerResources?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.playerResources?.resources?.[res])+t + ((["supplies","coins","money"].includes(res) && !product.onlyWhenMotivated) ? motMod : "") + (product.onlyWhenMotivated?ifMot:"")}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.playerResources?.resources?.[res])+t + ((["supplies","coins","money"].includes(res) && !product.onlyWhenMotivated) ? motMod : "") + (product.onlyWhenMotivated?ifMot:"")}` } } if (product.type == "guildResources") { for (let [res,amount] of Object.entries(product.guildResources?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"treasury_goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.guildResources?.resources?.[res])+t + (product.onlyWhenMotivated?ifMot:"")}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"treasury_goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.guildResources?.resources?.[res])+t + (product.onlyWhenMotivated?ifMot:"")}` } } if (product.type == "unit") { @@ -353,7 +343,7 @@ let Tooltips = { product.unitTypeId.includes("champion")?"chivalry": Unit.Types.filter(x=>x.unitTypeId==product.unitTypeId)[0].unitClass )) - prods+=`${icons(iconId) + range(product.amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex].amount)+t + (product.onlyWhenMotivated?ifMot:"")}` + prods+=`${srcLinks.icons(iconId) + range(product.amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex].amount)+t + (product.onlyWhenMotivated?ifMot:"")}` } } if (product.type == "genericReward") { @@ -373,13 +363,13 @@ let Tooltips = { if (random.product.type == "resources") { for (let [res,amount] of Object.entries(random.product.playerResources?.resources||{})) { if (amount !=0) - prods+=icons(goodsList.includes(res)?"goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.products?.[rIndex]?.product?.playerResources?.resources?.[res]) + prods+=srcLinks.icons(goodsList.includes(res)?"goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.products?.[rIndex]?.product?.playerResources?.resources?.[res]) } } if (random.product.type == "guildResources") { for (let [res,amount] of Object.entries(random.product.guildResources?.resources||{})) { if (amount !=0) - prods+=icons(goodsList.includes(res)?"treasury_goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.products?.[rIndex]?.product?.guildResources?.resources?.[res]) + prods+=srcLinks.icons(goodsList.includes(res)?"treasury_goods":res) + range(amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex]?.products?.[rIndex]?.product?.guildResources?.resources?.[res]) } } if (random.product.type == "unit") { @@ -388,7 +378,7 @@ let Tooltips = { random.product.unitTypeId.includes("champion")?"chivalry": Unit.Types.filter(x=>x.unitTypeId==random.product.unitTypeId)[0].unitClass )) - prods+=icons(iconId) + range(random.product.amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex?.products?.[rIndex]?.product].amount) + prods+=srcLinks.icons(iconId) + range(random.product.amount,levels?.[maxEra]?.production?.options?.[oIndex]?.products?.[pIndex?.products?.[rIndex]?.product].amount) } } if (random.product.type == "genericReward") { @@ -410,7 +400,7 @@ let Tooltips = { let costs = "" for ([resource,amount] of Object.entries(levels.AllAge?.buildResourcesRequirement?.cost?.resources||{})) { - if (amount>0) costs += `
${icons(resource) + " " + span(amount)}
` + if (amount>0) costs += `
${srcLinks.icons(resource) + " " + span(amount)}
` } if (ally!="") out+=`${i18n("Boxes.Tooltip.Building.allyRooms")}`+ally @@ -419,12 +409,13 @@ let Tooltips = { if (costs !="") out+=`${i18n("Boxes.Tooltip.Building.costs")}`+costs+`` out+=`${i18n("Boxes.Tooltip.Building.size+time")}` - out+=`
${icons("size")} ${levels.AllAge.placement.size.y+"x"+levels.AllAge.placement.size.x}
${icons("icon_time")}${formatTime(levels.AllAge.constructionTime.time)}
` + out+=`
${srcLinks.icons("size")} ${levels.AllAge.placement.size.y+"x"+levels.AllAge.placement.size.x}
` + out+=levels.AllAge?.constructionTime?.time ? `
${srcLinks.icons("icon_time")}${formatTime(levels.AllAge.constructionTime.time)}
`:`` if (levels.AllAge.streetConnectionRequirement?.requiredLevel) { if (levels.AllAge.streetConnectionRequirement?.requiredLevel == 2) - out+=`
${icons("street_required")} ${i18n("Boxes.Tooltip.Building.road2")}
` + out+=`
${srcLinks.icons("street_required")} ${i18n("Boxes.Tooltip.Building.road2")}
` else if (levels.AllAge.streetConnectionRequirement?.requiredLevel == 1) - out+=`
${icons("road_required")} ${i18n("Boxes.Tooltip.Building.road")}
` + out+=`
${srcLinks.icons("road_required")} ${i18n("Boxes.Tooltip.Building.road")}
` } out+=`` @@ -447,7 +438,7 @@ let Tooltips = { info = "", boosts="", abilityList={}, - ifMot = `${icons("when_motivated")}` + ifMot = `${srcLinks.icons("when_motivated")}` for (let a of meta.abilities||[]) { if (a.__class__=="BuildingPlacementAbility") { @@ -459,30 +450,30 @@ let Tooltips = { } } if (a.__class__=="ChainStartAbility") { - set =icons(a.chainId) + MainParser.BuildingChains[a.chainId].name + '' + a.description + set =srcLinks.icons(a.chainId) + MainParser.BuildingChains[a.chainId].name + '' + a.description } if (a.__class__=="ChainLinkAbility") { - set =icons(a.chainId) + MainParser.BuildingChains[a.chainId].name + set =srcLinks.icons(a.chainId) + MainParser.BuildingChains[a.chainId].name } if (a.__class__=="BuildingSetAbility") { - set =icons(a.setId) + MainParser.BuildingSets[a.setId].name + set =srcLinks.icons(a.setId) + MainParser.BuildingSets[a.setId].name } if (a.__class__=="PolishableAbility") { - traits+=`${icons("when_motivated")}can be polished` - polMod = `${icons("reward_x2")+i18n("Boxes.Tooltip.Building.when")+icons("when_motivated")}` + traits+=`${srcLinks.icons("when_motivated")}can be polished` + polMod = `${srcLinks.icons("reward_x2")+i18n("Boxes.Tooltip.Building.when")+srcLinks.icons("when_motivated")}` } if (a.__class__ == "MotivatableAbility") { - traits+=`${icons("when_motivated")}can be motivated` - motMod = `${icons("reward_x2")+i18n("Boxes.Tooltip.Building.when")+icons("when_motivated")}` + traits+=`${srcLinks.icons("when_motivated")}can be motivated` + motMod = `${srcLinks.icons("reward_x2")+i18n("Boxes.Tooltip.Building.when")+srcLinks.icons("when_motivated")}` } if (a.__class__ == "AddCoinsToSupplyProductionWhenMotivatedAbility") { - motMod = `${"+"+icons("money")+i18n("Boxes.Tooltip.Building.when")+icons("when_motivated")}` + motMod = `${"+"+srcLinks.icons("money")+i18n("Boxes.Tooltip.Building.when")+srcLinks.icons("when_motivated")}` } if (a.__class__=="NotPlunderableAbility") { - traits+=``+icons("eventwindow_plunder_repel") + i18n("Boxes.Tooltip.Building.noPlunder")+`` + traits+=``+srcLinks.icons("eventwindow_plunder_repel") + i18n("Boxes.Tooltip.Building.noPlunder")+`` } if (a.__class__=="AffectedByLifeSupportAbility") { - traits+=``+icons("life_support") + i18n("Boxes.Tooltip.Building.lifeSupport")+`` + traits+=``+srcLinks.icons("life_support") + i18n("Boxes.Tooltip.Building.lifeSupport")+`` } if (a.__class__=="DisplayInfoTextAbility") { info += a.text @@ -492,10 +483,10 @@ let Tooltips = { if (a.boostHints){ for (let b of a.boostHints||[]){ if (b.boostHintEraMap?.AllAge) { - boosts+=`${icons(b.boostHintEraMap.AllAge.type+feature[b.boostHintEraMap.AllAge.targetedFeature]) + " " + span(b.boostHintEraMap.AllAge.value) + percent(b.boostHintEraMap.AllAge.type)}` + boosts+=`${srcLinks.icons(b.boostHintEraMap.AllAge.type+feature[b.boostHintEraMap.AllAge.targetedFeature]) + " " + span(b.boostHintEraMap.AllAge.value) + percent(b.boostHintEraMap.AllAge.type)}` } if (b.boostHintEraMap?.[minEra] && b.boostHintEraMap?.[maxEra]) { - boosts+=`${icons(b.boostHintEraMap?.[minEra].type+feature[b.boostHintEraMap?.[minEra].targetedFeature]) + " " + range(b.boostHintEraMap?.[minEra].value,b.boostHintEraMap[maxEra].value) + percent(b.boostHintEraMap?.[minEra].type)}` + boosts+=`${srcLinks.icons(b.boostHintEraMap?.[minEra].type+feature[b.boostHintEraMap?.[minEra].targetedFeature]) + " " + range(b.boostHintEraMap?.[minEra].value,b.boostHintEraMap[maxEra].value) + percent(b.boostHintEraMap?.[minEra].type)}` } } } @@ -504,7 +495,7 @@ let Tooltips = { } if (meta?.requirements?.min_era && meta?.requirements?.min_era != "MultiAge" && era =="") { - era = `${icons("era") + " " + i18n("Eras."+(Technologies.Eras[meta.requirements.min_era]))}` + era = `${srcLinks.icons("era") + " " + i18n("Eras."+(Technologies.Eras[meta.requirements.min_era]))}` } if (era != "") out += "" + era + "" @@ -513,31 +504,31 @@ let Tooltips = { let provides="" if (meta.provided_population || meta.required_population) { - provides+=`${icons("population")+" "+ span((meta.provided_population||0) - (meta.required_population||0),true)}` + provides+=`${srcLinks.icons("population")+" "+ span((meta.provided_population||0) - (meta.required_population||0),true)}` } else if ((levels?.[minEra]?.provided_population && levels?.[maxEra]?.provided_population)||(levels?.[minEra]?.required_population && levels?.[maxEra]?.required_population)) { - provides+=`${icons("population") + " " + range((levels?.[minEra].provided_population||0)-(levels?.[minEra].required_population||0),(levels?.[maxEra].provided_population||0)-(levels?.[maxEra].required_population||0),true)}` + provides+=`${srcLinks.icons("population") + " " + range((levels?.[minEra].provided_population||0)-(levels?.[minEra].required_population||0),(levels?.[maxEra].provided_population||0)-(levels?.[maxEra].required_population||0),true)}` } if (meta.provided_happiness) { - provides+=`${icons("happiness")+" "+ span((meta.provided_happiness||0),true)}` + provides+=`${srcLinks.icons("happiness")+" "+ span((meta.provided_happiness||0),true)}` } else if ((levels?.[minEra]?.provided_happiness && levels?.[maxEra]?.provided_happiness)) { - provides+=`${icons("happiness") + " " + range(levels?.[minEra].provided_happiness||0,levels?.[maxEra].provided_happiness||0,true) + polMod}` + provides+=`${srcLinks.icons("happiness") + " " + range(levels?.[minEra].provided_happiness||0,levels?.[maxEra].provided_happiness||0,true) + polMod}` } if (levels?.[minEra]?.ranking_points && levels?.[maxEra]?.ranking_points) { - provides+=`${icons("rank") + " " + range(levels?.[minEra].ranking_points,levels?.[maxEra].ranking_points)}` + provides+=`${srcLinks.icons("rank") + " " + range(levels?.[minEra].ranking_points,levels?.[maxEra].ranking_points)}` } for ([resource,amount] of Object.entries(meta?.static_resources?.resources||{})) { - if (amount>0) provides+=`${icons(resource)+" "+ span(amount)}` + if (amount>0) provides+=`${srcLinks.icons(resource)+" "+ span(amount)}` } let prods="" if (meta.available_products) { if (levels?.[minEra]?.produced_money && levels?.[maxEra]?.produced_money) { - prods+=`${icons("money") + range(levels?.[minEra].produced_money,levels?.[maxEra].produced_money) + motMod}` + prods+=`${srcLinks.icons("money") + range(levels?.[minEra].produced_money,levels?.[maxEra].produced_money) + motMod}` } if (levels?.[minEra]?.clan_power && levels?.[maxEra]?.clan_power) { - prods+=`${icons("clan_power") + range(levels?.[minEra].clan_power,levels?.[maxEra].clan_power) + motMod}` + prods+=`${srcLinks.icons("clan_power") + range(levels?.[minEra].clan_power,levels?.[maxEra].clan_power) + motMod}` } for (let p of meta.available_products) { @@ -547,49 +538,49 @@ let Tooltips = { if (goodsList.includes(res)) res="goods" if (amount !=0) - prods+=`${icons(res) + span(amount)+t + motMod}` + prods+=`${srcLinks.icons(res) + span(amount)+t + motMod}` else - prods+=`${icons(res) + range(levels?.[minEra].production_values[p.production_option-1].value,levels?.[maxEra].production_values[p.production_option-1].value)+t + motMod}` + prods+=`${srcLinks.icons(res) + range(levels?.[minEra].production_values[p.production_option-1].value,levels?.[maxEra].production_values[p.production_option-1].value)+t + motMod}` } if (p.unit_class) { - prods+=`${icons(p.unit_class) + p.name}` + prods+=`${srcLinks.icons(p.unit_class) + p.name}` } } for (let a of abilityList.AddResourcesAbility||[]) { for (let [res,amount] of Object.entries(a.additionalResources?.[minEra]?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"goods":res) + range(a.additionalResources?.[minEra].resources[res],a.additionalResources[maxEra].resources[res])}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"goods":res) + range(a.additionalResources?.[minEra].resources[res],a.additionalResources[maxEra].resources[res])}` } for (let [res,amount] of Object.entries(a.additionalResources?.AllAge?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"goods":res) + span(amount)}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"goods":res) + span(amount)}` } } for (let a of abilityList.AddResourcesToGuildTreasuryAbility||[]) { for (let [res,amount] of Object.entries(a.additionalResources?.[minEra]?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"treasury_goods":res) + range(a.additionalResources?.[minEra].resources[res],a.additionalResources[maxEra].resources[res])}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"treasury_goods":res) + range(a.additionalResources?.[minEra].resources[res],a.additionalResources[maxEra].resources[res])}` } for (let [res,amount] of Object.entries(a.additionalResources?.AllAge?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"treasury_goods":res) + span(amount)}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"treasury_goods":res) + span(amount)}` } } for (let a of abilityList.AddResourcesWhenMotivatedAbility||[]) { for (let [res,amount] of Object.entries(a.additionalResources?.[minEra]?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"goods":res) + range(a.additionalResources?.[minEra].resources[res],a.additionalResources[maxEra].resources[res])+ifMot}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"goods":res) + range(a.additionalResources?.[minEra].resources[res],a.additionalResources[maxEra].resources[res])+ifMot}` } for (let [res,amount] of Object.entries(a.additionalResources?.AllAge?.resources||{})) { if (amount !=0) - prods+=`${icons(goodsList.includes(res)?"goods":res) + span(amount)+ifMot}` + prods+=`${srcLinks.icons(goodsList.includes(res)?"goods":res) + span(amount)+ifMot}` } } for (let a of abilityList.RandomUnitOfAgeWhenMotivatedAbility||[]) { - prods+=`${icons("military")+(a.amount||1)+ifMot}` + prods+=`${srcLinks.icons("military")+(a.amount||1)+ifMot}` } for (let a of abilityList.RandomBlueprintWhenMotivatedAbility||[]) { - prods+=`${icons("blueprint")+(a.amount||1)+ifMot}` + prods+=`${srcLinks.icons("blueprint")+(a.amount||1)+ifMot}` } for (let a of abilityList.RandomChestRewardAbility||[]) { prods+=`` @@ -603,7 +594,7 @@ let Tooltips = { amountBA = rew.reward?.possible_rewards?.[0]?.reward?.amount||amountBA amountMax = a.rewards?.[maxEra]?.possible_rewards?.[id]?.reward?.possible_rewards?.[0]?.reward?.amount||amountMax } - prods+=icons(asset) + range(amountBA,amountMax) + prods+=srcLinks.icons(asset) + range(amountBA,amountMax) prods+=`${rew.drop_chance}%` } @@ -614,23 +605,23 @@ let Tooltips = { for (let a of abilityList.BonusOnSetAdjacencyAbility||[]) { for (let b of a.bonuses) { if (Object.values(b.boost).length>0) { - boosts+=`` } else { - prods+=`` } @@ -644,12 +635,12 @@ let Tooltips = { boosts+='" first=false } - boosts+=`` @@ -658,14 +649,14 @@ let Tooltips = { prods+='" first=false } - prods+=`` } @@ -675,7 +666,7 @@ let Tooltips = { let costs = "" for ([resource,amount] of Object.entries(meta?.requirements?.cost?.resources||{})) { - if (amount>0) costs += `
${icons(resource) + " " + span(amount)}
` + if (amount>0) costs += `
${srcLinks.icons(resource) + " " + span(amount)}
` } provides=provides+boosts if (provides!="") out+=``+provides @@ -683,11 +674,12 @@ let Tooltips = { if (costs !="") out+=`` out+=`` - out+=`` diff --git a/js/web/srcLinks/js/srcLinks.js b/js/web/srcLinks/js/srcLinks.js index ebe79de8d..bdc712208 100644 --- a/js/web/srcLinks/js/srcLinks.js +++ b/js/web/srcLinks/js/srcLinks.js @@ -133,7 +133,17 @@ let srcLinks = { } return url1; + }, + + icons: (x) => { + if (!x) return "" + x=x.replace(/(.*?)_[0-9]+/gm,"$1"); + let link = srcLinks.get(`/shared/icons/${x}.png`,true,true); + if (link.includes("antiquedealer_flag")) link = srcLinks.get(`/shared/icons/reward_icons/reward_icon_${x}.png`,true,true); + if (link.includes("antiquedealer_flag")) link = srcLinks.get(`/city/buildings/${x.replace(/(\D*?)_(.*)/,"$1_SS_$2")}.png`,true); + return ``; } + } srcLinks.init() \ No newline at end of file From 2981c5d70f6d4633b0f4c96a5205817c78a6e0fd Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 15 Nov 2024 20:33:24 +0100 Subject: [PATCH 007/130] gbg buildings - add "free" to template creator --- js/web/gbgbuildings/js/gbgbuildings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/gbgbuildings/js/gbgbuildings.js b/js/web/gbgbuildings/js/gbgbuildings.js index 840cc5819..bd9e46723 100644 --- a/js/web/gbgbuildings/js/gbgbuildings.js +++ b/js/web/gbgbuildings/js/gbgbuildings.js @@ -56,7 +56,7 @@ FoEproxy.addHandler('ClanService', 'getTreasury', (data, postData) => { let GBGBuildings = { oldGBG:true, treasury:{}, - block:{ // get from GBG building meta-data: Object.assign({},...x.map(b=>({id:b.id,value:Number(b.description.replace(/.*? (\d+)% chance to not increase.*/gm,"$1"))})).filter(b=>b.value).sort((a,b)=>a.value-b.value).map(b=>({[b.id]:b.value}))) + block:{ // get from GBG building meta-data: Object.assign({"free":0},...x.map(b=>({id:b.id,value:Number(b.description.replace(/.*? (\d+)% chance to not increase.*/gm,"$1"))})).filter(b=>b.value).sort((a,b)=>a.value-b.value).map(b=>({[b.id]:b.value}))) "free":0, "watchtower": 8, "guild_command_post_improvised": 20, From 8db34820890a295b95f55d7d3b2309761e204aec Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 15 Nov 2024 20:33:55 +0100 Subject: [PATCH 008/130] productions - add item source info to item-tab --- js/web/_i18n/de.json | 1 + js/web/_i18n/en.json | 1 + js/web/productions/css/productions.css | 19 +++++++++ js/web/productions/js/productions.js | 57 +++++++++++++++++++++++++- 4 files changed, 77 insertions(+), 1 deletion(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index ce3743548..900485db4 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -642,6 +642,7 @@ "Boxes.Investment.TotalFP": "Lager + Umlauf + Gewinn: ", "Boxes.Investment.UpToDate": "Die Investitionen wurden vor weniger als 30 Minuten aktualisiert.", "Boxes.Investment.UpdateRequired": "Deine Investitionen sind älter als 30 Minuten. Bitte aktualisiere sie über das Rathaus.", + "Boxes.ItemSources.Title": "Quellen für Gegenstände", "Boxes.Kits.Antiques_Dealer": "Antiquitätenhändler", "Boxes.Kits.Base": "Stufe 1 Gebäude oder Auswahlkit", "Boxes.Kits.Cultural_Settlements": "Kulturellen-Siedlungen", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index ea42ddc9e..d897c7379 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -641,6 +641,7 @@ "Boxes.Investment.TotalFP": "Stock + Invested + Profit = ", "Boxes.Investment.UpToDate": "The investment list was updated less than 30 minutes ago.", "Boxes.Investment.UpdateRequired": "The investment list is older than 30 minutes. Please update your investment list in the Town Hall.", + "Boxes.ItemSources.Title": "Item Sources", "Boxes.Kits.Antiques_Dealer": "Antiques Dealer", "Boxes.Kits.Base": "Level 1 building or selection kit", "Boxes.Kits.new_not_categorized": "New / not yet categorized", diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index a0c043ba0..a9cc246a8 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -554,3 +554,22 @@ input[id*="ProdPerTile"] { #ProductionsRating #ProductionsRatingBody span.resicon.goods-previous { background-position: -524px 2px; } +#ItemSourcesBody div { + overflow-y: auto; + height: 100%; + width: 50%; +} +#ItemSourcesBody > div { + display: flex; + width: 100%; +} +#ItemSourcesBody img { + width: 25px; +} +#ItemSourcesBody h2 img { + width:unset; + max-width: 50px; +} +#ItemSourcesBody table { + width: 100%; +} \ No newline at end of file diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index f2943601f..d978f2524 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -773,7 +773,7 @@ let Productions = { table.push('
${b.level + "x" + icons(a.setId)} ► ` + boosts+=`
${b.level + "x" + srcLinks.icons(a.setId)} ► ` if (b.boost.AllAge) { - boosts+=icons(b.boost.AllAge.type+feature[b.boost.AllAge.targetedFeature]) + " " + span(b.boost.AllAge.value) + percent(b.boost.AllAge.type) + boosts+=srcLinks.icons(b.boost.AllAge.type+feature[b.boost.AllAge.targetedFeature]) + " " + span(b.boost.AllAge.value) + percent(b.boost.AllAge.type) } if (b.boost?.[minEra] && b.boost[maxEra]) { - boosts+=icons(b.boost?.[minEra].type+feature[b.boost?.[minEra].targetedFeature]) + " " + range(b.boost?.[minEra].value,b.boost[maxEra].value) + percent(b.boost?.[minEra].type) + boosts+=srcLinks.icons(b.boost?.[minEra].type+feature[b.boost?.[minEra].targetedFeature]) + " " + range(b.boost?.[minEra].value,b.boost[maxEra].value) + percent(b.boost?.[minEra].type) } boosts+=`
${b.level + "x" + icons(a.setId)} ► ` + prods+=`
${b.level + "x" + srcLinks.icons(a.setId)} ► ` if (b.revenue?.AllAge) { let [res,amount] = Object.entries(b.revenue?.AllAge?.resources)[0] - prods+=icons(goodsList.includes(res)?"goods":res) + span(amount) + prods+=srcLinks.icons(goodsList.includes(res)?"goods":res) + span(amount) } if (b.revenue?.[minEra] && b.revenue?.[maxEra]) { let [res,amount] = Object.entries(b.revenue?.[minEra]?.resources)[0] - prods+=icons(goodsList.includes(res)?"goods":res) + range(amount,b.revenue?.[maxEra].resources[res]) + prods+=srcLinks.icons(goodsList.includes(res)?"goods":res) + range(amount,b.revenue?.[maxEra].resources[res]) } prods+=`
' + a.description+"
${b.level + "x" + icons(a.chainId)} ► ` + boosts+=`
${b.level + "x" + srcLinks.icons(a.chainId)} ► ` if (b.boost.AllAge) { - boosts+=icons(b.boost.AllAge.type+feature[b.boost.AllAge.targetedFeature]) + " " + span(b.boost.AllAge.value) + percent(b.boost.AllAge.type) + boosts+=srcLinks.icons(b.boost.AllAge.type+feature[b.boost.AllAge.targetedFeature]) + " " + span(b.boost.AllAge.value) + percent(b.boost.AllAge.type) } if (b.boost?.[minEra] && b.boost[maxEra]) { - boosts+=icons(b.boost?.[minEra].type+feature[b.boost?.[minEra].targetedFeature]) + " " + range(b.boost?.[minEra].value,b.boost[maxEra].value) + percent(b.boost?.[minEra].type) + boosts+=srcLinks.icons(b.boost?.[minEra].type+feature[b.boost?.[minEra].targetedFeature]) + " " + range(b.boost?.[minEra].value,b.boost[maxEra].value) + percent(b.boost?.[minEra].type) } boosts+=`
' + a.description+"
${b.level + "x" + icons(a.chainId)} ► ` + prods+=`
${b.level + "x" + srcLinks.icons(a.chainId)} ► ` if (b.revenue?.AllAge) { let [res,amount] = Object.entries(b.revenue?.AllAge?.resources)[0] - prods+=icons(goodsList.includes(res)?"goods":res) + span(amount) + prods+=srcLinks.icons(goodsList.includes(res)?"goods":res) + span(amount) } if (b.revenue?.[minEra] && b.revenue?.[maxEra]) { let [res,amount] = Object.entries(b.revenue?.[minEra]?.resources)[0] - prods+=icons(goodsList.includes(res)?"goods":res) + range(amount,b.revenue?.[maxEra].resources[res]) + prods+=srcLinks.icons(goodsList.includes(res)?"goods":res) + range(amount,b.revenue?.[maxEra].resources[res]) } prods+=`
${i18n("Boxes.Tooltip.Building.provides")}
${i18n("Boxes.Tooltip.Building.costs")}
`+costs+`
${i18n("Boxes.Tooltip.Building.size+time")}
${icons("size")} ${meta.width+"x"+meta.length}
${icons("icon_time")}${formatTime(meta.construction_time)}
` + out+=`
${srcLinks.icons("size")} ${meta.width+"x"+meta.length}
` + out+=meta.construction_time?`
${srcLinks.icons("icon_time")}${formatTime(meta.construction_time)}
`:`` if (meta.requirements?.street_connection_level == 2) - out+=`
${icons("street_required")} ${i18n("Boxes.Tooltip.Building.road2")}
` + out+=`
${srcLinks.icons("street_required")} ${i18n("Boxes.Tooltip.Building.road2")}
` else if (meta.requirements?.street_connection_level == 1) - out+=`
${icons("road_required")} ${i18n("Boxes.Tooltip.Building.road")}
` + out+=`
${srcLinks.icons("road_required")} ${i18n("Boxes.Tooltip.Building.road")}
` out+=`
') table.push('') table.push('') - table.push('') + table.push('') if (!type.includes('att') && !type.includes('def') && type!='items') { table.push(''); b.push(''); b.push(''); b.push(''); - b.push(''); - b.push(''); + b.push(''); + b.push(''); b.push(''); QiProgress.ProgressContent.push({ @@ -209,7 +211,7 @@ let QiProgress = { t.push(''); t.push(''); t.push(''); - t.push(''); + t.push(''); t.push(''); t.push(''); From 91fa6de6af5f22a75dfb4d16f5dd5877a339dc7d Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 17 Nov 2024 09:05:08 +0100 Subject: [PATCH 013/130] tooltips - remove tooltip when a box is closed --- js/web/_helper/js/_helper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/_helper/js/_helper.js b/js/web/_helper/js/_helper.js index 1d2e127b8..e1c363b00 100644 --- a/js/web/_helper/js/_helper.js +++ b/js/web/_helper/js/_helper.js @@ -281,6 +281,7 @@ let HTML = { $('#' + args['id']).fadeToggle('fast', function () { $(this).remove(); + Tooltips.deactivate() }); }); } From f0df3dbcc33650af664498d41e4782e360d54397 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 17 Nov 2024 09:05:28 +0100 Subject: [PATCH 014/130] reconstructoin - set standard height --- js/web/reconstruction/css/reconstruction.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/web/reconstruction/css/reconstruction.css b/js/web/reconstruction/css/reconstruction.css index e18dba7e1..9228b9aa4 100644 --- a/js/web/reconstruction/css/reconstruction.css +++ b/js/web/reconstruction/css/reconstruction.css @@ -13,9 +13,12 @@ -#ReconstructionListBody { + #ReconstructionListBody { overflow-y: auto; } +#ReconstructionList { + height: 400px; +} #ReconstructionListBody td:nth-last-child(2){ padding-right: 0; From 1e71ddf338ae1dbd33bdd4a3a1ce16183fdb603c Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 17 Nov 2024 10:53:34 +0100 Subject: [PATCH 015/130] changelog --- changelog-de.md | 7 +++++-- changelog-en.md | 9 ++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index 75668712a..20ff901bd 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -4,13 +4,16 @@ **Neu** - QI Fortschritts Übersicht hinzugefügt (öffnet sich automatisch, wenn die QI-Spieler Rangliste geöffnet wird) +- Quellen für Gegenstände: In der Produktionsübersicht für Gegenstände und Fragmente gibt es nun die Möglichkeit, sich eine Liste von Gebäude ausgeben zu lassen, die einen bestimmten Gegenstand produzieren (auch, wenn diese nicht gebaut sind) **Update** -- Quellen für Gegenstände: In der Produktionsübersicht für Gegenstände und Fragmente gibt es nun die Möglichkeit, sich eine Liste von Gebäude ausgeben zu lassen, die einen bestimmten Gegenstand produzieren (auch, wenn diese nicht gebaut sind) - Tooltip: Design der Gebäude-Tooltips angepasst **BugFix** -- Tooltip: manche Browser haben nicht das korrekte Design verwendet +- Tooltip: + - manche Browser haben nicht das korrekte Design verwendet + - konnte offen bleiben, obwohl zugehöriges Fenster geschlossen wurde +- Umbau-Liste: Standardhöhe gesetzt ##### 3.9.0.0 diff --git a/changelog-en.md b/changelog-en.md index c7006324a..e42f13e59 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -4,13 +4,16 @@ **New** - QI Progress Overview added (opens automatically when opening the QI player ranking) +- Item Sources: Production Overview for Items/Fragments now offers an option to display a list of buildings that produce a certain item (even if not currently build) **Update** -- Item Sources: Production Overview for Items/Fragments now offers an option to display a list of buildings that produce a certain item (even if not currently build) -- Tooltip: changed design +- Tooltip: made design similar to original FoE tooltips **BugFix** -- Tooltip: some browsers did not use the correct design +- Tooltip: + - some browsers did not use the correct design + - did sometimes not vanish when a box was closed +- Reconstruction List: set a default height ##### 3.9.0.0 From 047f304df4a985cd73f8708249e0993e20a979e5 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 17 Nov 2024 11:57:37 +0100 Subject: [PATCH 016/130] tooltips - add efficiency --- js/web/customTooltip/js/customTooltip.js | 11 ++++++----- js/web/productions/js/productions.js | 4 ++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index bf4b5edbf..845552e06 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -88,14 +88,15 @@ let Tooltips = { Tooltips.checkposition() }, buildingTT: (e)=>{ - let id=e?.currentTarget?.dataset?.meta_id||MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.cityentity_id - let era = Technologies.InnoEraNames[MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.level] + let id = e?.currentTarget?.dataset?.meta_id||MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.cityentity_id if (!id) return - - let meta=MainParser.CityEntities[id] + + let era = e?.currentTarget?.dataset?.era||Technologies.InnoEraNames[MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.level] + let eff = Math.round(100 * Productions.rateBuildings([id],true)[0].score||0) + let meta = MainParser.CityEntities[id] let h = `
-

${meta.name}

+

${meta.name} ${eff ? `(${i18n("Boxes.Kits.Efficiency")}: ${eff})`:''}

' + i18n('Boxes.Productions.ModeGroups') + ' ' + i18n('Boxes.Productions.ModeGroups') + ' ' + (type=="items" ? ''+i18n('Boxes.ItemSources.Title')+'' : '') + '') table.push((typeCurrentSum >= 10000 ? HTML.FormatNumberShort(typeCurrentSum) : HTML.Format(typeCurrentSum))+ "/" + (typeSum >= 10000 ? HTML.FormatNumberShort(typeSum) : HTML.Format(typeSum))) @@ -1920,4 +1920,59 @@ let Productions = { $(`#ProductionsSettingsBox`).remove() }, + showItemSources:()=>{ + if ( $('#ItemSources').length === 0 ) { + + HTML.Box({ + id: 'ItemSources', + title: i18n('Boxes.ItemSources.Title'), + auto_close: true, + dragdrop: true, + minimize: true, + resize: true + }); + } + + let temp = Object.assign({},...Object.values(MainParser.CityEntities).filter(b=>b.id[0]=="W").map(x=>({[x.id]:[...JSON.stringify(x).matchAll(/"name":"([^"]*?)"[^()[\]{}]*?"iconAssetName":"([^"]*?)"[^{}]*?"__class__":"GenericReward"/gm)].map(a=>({id:a[2],name:a[1]}))}))) + let gl = Object.values(GoodsList).map(g=>g.id) + let items={} + for (let [building,list] of Object.entries(temp)) { + for (let item of list) { + if (gl.includes(item.id)) continue + if (["","icon_fragment"].includes(item.id)) continue + if (items[item.id]) { + if (!items[item.id].buildings.includes(building)) items[item.id].buildings.push(building) + } else { + items[item.id] = {name:item.name,buildings:[building],id:item.id} + } + } + } + + h =`
+
+ + + + + ` + for (let item of Object.values(items)) { + h+=`` + } + h +=` +
Items
${srcLinks.icons(item.id)} ${item.name}
+
+
+
+
` + $('#ItemSourcesBody').html(h) + $('#ItemSourcesBody .sortable-table').tableSorter() + }, + updateItemSources:(item)=>{ + h=`

${srcLinks.icons(item.id)} ${item.name}:

` + for (b of item.buildings) { + h+=`` + } + h+=`
${MainParser.CityEntities[b].name}
` + $('#ItemSourceBuildings').html(h) + }, }; From 09bb73d9b856a6eeca2c97832f6809afbd8028a0 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 16 Nov 2024 00:09:55 +0100 Subject: [PATCH 009/130] tooltips - replace CSS for incompatible browsers --- js/web/customTooltip/css/customTooltip.css | 3 +-- js/web/customTooltip/js/customTooltip.js | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/js/web/customTooltip/css/customTooltip.css b/js/web/customTooltip/css/customTooltip.css index e50503ec3..42181b6c6 100644 --- a/js/web/customTooltip/css/customTooltip.css +++ b/js/web/customTooltip/css/customTooltip.css @@ -4,8 +4,7 @@ .HXBuilding td { width: 300px; display: flex; - white-space-collapse: preserve; - text-wrap-mode: nowrap; + white-space: nowrap; } .HXBuilding img { padding-right: 3px; diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index bd9d9f4f9..aba6c48d6 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -122,7 +122,7 @@ let Tooltips = { let span = (x,withHighlight=false) => `${numberWithCommas(x)}`; let longSpan = (x) => `
${x}
` - let range = (x,y,withHighlight=false) => span(x,withHighlight) + (x!=y ?` - `+ span(y,withHighlight):``); + let range = (x,y,withHighlight=false) => span(x,withHighlight) + (x!=y ?` - `+ span(y,withHighlight):``); let formatTime = (x) => { let min=Math.floor(x/60) let sec = x-min*60 From ae798049edf5f5f24d5759dd36176b7e65390c22 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 16 Nov 2024 16:47:51 +0100 Subject: [PATCH 010/130] building tooltips styling changes --- css/web/boxes.css | 6 +-- js/web/customTooltip/css/customTooltip.css | 44 +++++++++++++++++++++- js/web/customTooltip/js/customTooltip.js | 7 ++-- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/css/web/boxes.css b/css/web/boxes.css index ba1763464..c8ef373b8 100644 --- a/css/web/boxes.css +++ b/css/web/boxes.css @@ -1275,9 +1275,9 @@ FP-Bar */ max-width: 250px; padding: 8px; color: var(--text-tab-active); + background-color: var(--text-darkest); text-align: center; text-decoration: none; - background-color: var(--text-darkest); -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; @@ -1352,14 +1352,14 @@ FP-Bar */ width: 180px; border: 2px solid #373c32; background-color: var(--bg-tooltip); - z-index: 999; + box-shadow: 0 0 2px 1px var(--black-65); color: #f2ede1; + z-index: 999; padding: 5px; pointer-events: none; user-select: none; margin: 0; opacity: 1; - box-shadow: 0 0 2px 1px var(--black-65); box-sizing: border-box; } diff --git a/js/web/customTooltip/css/customTooltip.css b/js/web/customTooltip/css/customTooltip.css index 42181b6c6..d42322ae1 100644 --- a/js/web/customTooltip/css/customTooltip.css +++ b/js/web/customTooltip/css/customTooltip.css @@ -1,3 +1,45 @@ +#TooltipContainer.window-box { + border: 2px solid #353831; + background: #3b3f39; + color: #f2ede1; +} + +#TooltipContainer.window-box .foe-table tr td { + border-top: 1px solid #fff3; + border-bottom: 1px solid #0004; +} + +#TooltipContainer.window-box .foe-table th { + background: #0004; + box-shadow: inset 0 0 0 2000px var(--black-50), 0 1px 0 0 #fff3, 0 2px 0 0 #0004; +} + +table.foe-table tbody tr:nth-child(odd), ul.foe-table li:nth-child(odd) { + background-color: #fff1; +} + +.buildingTT { + width: min-content; +} + +.buildingTT h2 { + padding: 0.2em 0.5em; + color: #f2ede1; + background-color: #0002; +} + +.buildingTT .imgContainer { + min-width:150px; + max-width:150px; + vertical-align:top +} + +.buildingTT .imgContainer img { + display: block; + margin: 0 auto; + max-width: 100%; +} + .HXBuilding th { border-bottom: unset; } @@ -84,8 +126,6 @@ align-self: flex-start; } - - @keyframes bounce { 0% { transform: translateX(0%) } 30% { transform: translateX(0%) } diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index aba6c48d6..bf4b5edbf 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -94,9 +94,10 @@ let Tooltips = { let meta=MainParser.CityEntities[id] - let h = `
`+ + let h = `
+

${meta.name}

+
`+ - `
${meta.name}
`+ - `
+ `+ `
`; h += Tooltips.BuildingData(meta,era); h += "
" From dd14d331511238c3ed1fa24ed8aded54f838e7b4 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 16 Nov 2024 21:40:32 +0100 Subject: [PATCH 011/130] prep manifest/changelog v3.10.0.0 --- changelog-de.md | 12 ++++++++++++ changelog-en.md | 16 ++++++++++++++-- manifest.json | 2 +- manifests/chromium/manifest_.json | 2 +- manifests/firefox/manifest_.json | 2 +- 5 files changed, 29 insertions(+), 5 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index 4f6f14629..75668712a 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -1,5 +1,17 @@ ## Changelog - Extension +##### 3.10.0.0 + +**Neu** +- QI Fortschritts Übersicht hinzugefügt (öffnet sich automatisch, wenn die QI-Spieler Rangliste geöffnet wird) + +**Update** +- Quellen für Gegenstände: In der Produktionsübersicht für Gegenstände und Fragmente gibt es nun die Möglichkeit, sich eine Liste von Gebäude ausgeben zu lassen, die einen bestimmten Gegenstand produzieren (auch, wenn diese nicht gebaut sind) +- Tooltip: Design der Gebäude-Tooltips angepasst + +**BugFix** +- Tooltip: manche Browser haben nicht das korrekte Design verwendet + ##### 3.9.0.0 **Neu** diff --git a/changelog-en.md b/changelog-en.md index 2d3523476..c7006324a 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -1,12 +1,24 @@ ## Changelog - Extension +##### 3.10.0.0 + +**New** +- QI Progress Overview added (opens automatically when opening the QI player ranking) + +**Update** +- Item Sources: Production Overview for Items/Fragments now offers an option to display a list of buildings that produce a certain item (even if not currently build) +- Tooltip: changed design + +**BugFix** +- Tooltip: some browsers did not use the correct design + ##### 3.9.0.0 **New** - In reconstruction mode a building list, sortable by building size is offered - GE-Results: Menu icon now shows the current number of attempts - Tooltips: some modules now show the building information as a tooltip: - - Effiziency module - in the "add building" dialogue + - Efficiency module - in the "add building" dialogue - Boost Inventory - Reconstruction size-list - let us know on discord where else you would like to see that info @@ -20,7 +32,7 @@ - Broke for some players due to a game update - Same buildings with/without allies were not counted correctly - Porduction Overview: - - Fragment amount was not korrekt for some buildings + - Fragment amount was not correct for some buildings - Not all buildings were listed in fragments overview ##### 3.8.1.0 diff --git a/manifest.json b/manifest.json index 901dc284f..d10eec574 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "3.9.0.0", + "version": "3.9.1.0", "manifest_version": 3, "permissions": [ diff --git a/manifests/chromium/manifest_.json b/manifests/chromium/manifest_.json index 5ef67873b..d1068c589 100644 --- a/manifests/chromium/manifest_.json +++ b/manifests/chromium/manifest_.json @@ -2,7 +2,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "3.9.0.0", + "version": "3.10.0.0", "manifest_version": 3, "permissions": [ diff --git a/manifests/firefox/manifest_.json b/manifests/firefox/manifest_.json index 8a183895d..585829a23 100644 --- a/manifests/firefox/manifest_.json +++ b/manifests/firefox/manifest_.json @@ -2,7 +2,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "3.9.0.0", + "version": "3.10.0.0", "manifest_version": 3, "permissions": [ From 2a02a450bdfdf946de267c80633f55ea5979f837 Mon Sep 17 00:00:00 2001 From: GeniusTimo Date: Sat, 16 Nov 2024 23:27:51 +0100 Subject: [PATCH 012/130] feat(QiProgress): Added the total for the progress The total for the actions was previously used, see 3b7e1f72abcc1a40a454be5f2d0f588192a8494e --- js/web/qiprogress/js/qiprogress.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js index 376e5b6a0..cf3fd7d00 100644 --- a/js/web/qiprogress/js/qiprogress.js +++ b/js/web/qiprogress/js/qiprogress.js @@ -117,6 +117,7 @@ let QiProgress = { let t = [], b = [], tA = 0, + tP = 0, histView = false; QiProgress.ProgressContent = []; @@ -186,14 +187,15 @@ let QiProgress = { newProgressClass = change && !newRound ? 'new ' : ''; - tA += playerNew.actions + tA += playerNew.actions; + tP += playerNew.progress; b.push('
' + (parseInt(i) + 1) + '.' + playerNew.name + '' + HTML.Format(playerNew.actions)+ newActions + '' + HTML.Format(playerNew.progress) + newProgress + '' + HTML.Format(playerNew.actions) + newActions + '' + HTML.Format(playerNew.progress) + newProgress + '
' + i18n('General.Player') + '' + i18n('Boxes.QiProgress.Actions') + '
(' + HTML.Format(tA) + ')
' + i18n('Boxes.QiProgress.Progress') + '
(' + HTML.Format(tA) + ')
' + i18n('Boxes.QiProgress.Progress') + '
(' + HTML.Format(tP) + ')
`+ `` } + if (await CityMap.canAscend(meta.id)) { + out += `` + } + let provides="" for ([resource,amount] of Object.entries(levels.AllAge?.staticResources?.resources?.resources||{})) { From a4f62c3559cdc2f16adec201e42cc5f97e16de89 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 27 Nov 2024 14:30:41 +0100 Subject: [PATCH 072/130] reconstruction - fix bugs --- js/web/reconstruction/css/reconstruction.css | 6 ++++++ js/web/reconstruction/js/reconstruction.js | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/js/web/reconstruction/css/reconstruction.css b/js/web/reconstruction/css/reconstruction.css index 4114f71c4..443ae55fb 100644 --- a/js/web/reconstruction/css/reconstruction.css +++ b/js/web/reconstruction/css/reconstruction.css @@ -27,11 +27,17 @@ #ReconstructionListBody td:nth-child(3){ text-align: center; + min-width: 50px; +} +#ReconstructionListBody td:nth-child(4){ + text-align: center; + min-width: 35px; } #ReconstructionListBody .sorter-header { position: sticky; top: 0px; + z-index: 1; } #ReconstructionListBody tr.sorter-header th:last-child:before, diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 9ebcd3d73..07fad761a 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -115,7 +115,6 @@ let reconstruction = { "impediment", "hub_part", "off_grid", - "greatbuilding", "outpost_ship", "hub_main"].includes(meta.type)) return let page = reconstruction.pageMapper[meta.type]||meta.type From fa649aa8432417c8e3425af8584baa02cbec97cb Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 27 Nov 2024 14:57:49 +0100 Subject: [PATCH 073/130] reconstruction - add road sorting --- js/web/reconstruction/css/reconstruction.css | 4 --- js/web/reconstruction/js/reconstruction.js | 35 +++++++++++--------- 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/js/web/reconstruction/css/reconstruction.css b/js/web/reconstruction/css/reconstruction.css index 443ae55fb..937ec109f 100644 --- a/js/web/reconstruction/css/reconstruction.css +++ b/js/web/reconstruction/css/reconstruction.css @@ -29,10 +29,6 @@ text-align: center; min-width: 50px; } -#ReconstructionListBody td:nth-child(4){ - text-align: center; - min-width: 35px; -} #ReconstructionListBody .sorter-header { position: sticky; diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 07fad761a..3ba2928a9 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -102,12 +102,8 @@ let reconstruction = { "clan_power_production":"prod" }, pages: null, - rcIcons:{ - happ:srcLinks.get("/shared/gui/reconstructionmenu/rc_icon_happynessbuildings.png",true), - prod:srcLinks.get("/shared/gui/reconstructionmenu/rc_icon_productionbuildings.png",true), - greatbuilding:srcLinks.get("/shared/gui/constructionmenu/icon_greatbuilding.png",true), - street:srcLinks.get("/shared/gui/constructionmenu/icon_street.png",true), - }, + rcIcons:null, + roadIcons:null, pageUpdate:(id)=>{ let meta = MainParser.CityEntities[id] if (["friends_tavern", @@ -130,8 +126,22 @@ let reconstruction = { $('.reconstructionLine[data-meta_id="'+list[i]+'"] td:nth-child(3)').html(``+(Math.floor(i/4)+1)) } } - }, + }, showTable:()=>{ + if (!reconstruction.rcIcons) { + reconstruction.rcIcons = { + happ:srcLinks.get("/shared/gui/reconstructionmenu/rc_icon_happynessbuildings.png",true), + prod:srcLinks.get("/shared/gui/reconstructionmenu/rc_icon_productionbuildings.png",true), + greatbuilding:srcLinks.get("/shared/gui/constructionmenu/icon_greatbuilding.png",true), + street:srcLinks.get("/shared/gui/constructionmenu/icon_street.png",true), + } + reconstruction.roadIcons = { + 0:"", + 1:srcLinks.icons("road_required"), + 2:srcLinks.icons("street_required") + } + } + if ( $('#ReconstructionList').length === 0 ) { HTML.AddCssFile('reconstruction'); @@ -152,7 +162,7 @@ let reconstruction = { - + @@ -161,17 +171,12 @@ let reconstruction = { let meta=MainParser.CityEntities[id] let width = meta.width||meta.components.AllAge.placement.size.x let length = meta.length||meta.components.AllAge.placement.size.y - let road="" - if ((meta?.components?.AllAge?.streetConnectionRequirement?.requiredLevel || meta?.requirements?.street_connection_level) == 2) - road = srcLinks.icons("street_required") - else if ((meta?.components?.AllAge.streetConnectionRequirement?.requiredLevel || meta?.requirements?.street_connection_level) == 1) - road = srcLinks.icons("road_required") - + let road = meta?.components?.AllAge.streetConnectionRequirement?.requiredLevel || meta?.requirements?.street_connection_level || 0 h+=` - + ` From b42d767adf25d4a963441698c3aad162f4d3fb05 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 14:25:58 +0100 Subject: [PATCH 074/130] treasury - parse datetime --- js/web/treasury/js/treasury.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/js/web/treasury/js/treasury.js b/js/web/treasury/js/treasury.js index 2a9125d83..ed729bf3c 100644 --- a/js/web/treasury/js/treasury.js +++ b/js/web/treasury/js/treasury.js @@ -49,11 +49,13 @@ let Treasury = { }); } - let LogArray = Logs['responseData']['logs']; - for (let i = 0; i < LogArray.length; i++) { - Treasury.Logs[Treasury.Logs.length] = LogArray[i]; - } - + let LogArray = Logs['responseData']['logs'].map(x=>{ + let date = EventHandler.ParseDate(x.createdAt) + x.createdAt = date||x.createdAt + return x + }); + Treasury.Logs = Treasury.Logs.concat(LogArray); + Treasury.CalcBody(); }, @@ -97,7 +99,7 @@ let Treasury = { CurrentLine.push(GoodsData[GoodID]['name'].replace(/;/g, '')); CurrentLine.push(CurrentLog['amount']); CurrentLine.push(CurrentLog['action'].replace(/;/g, '')); - CurrentLine.push(CurrentLog['createdAt'].replace(/;/g, '')); + CurrentLine.push(typeof CurrentLog['createdAt'] == "object" ? CurrentLog['createdAt'].toLocaleString().replace(/,/g,"") : CurrentLog['createdAt'].replace(/;/g, '')); h.push(CurrentLine.join(';')); } From c261d7d42a8b76c8085de0a86acddf7fe4a42604 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 18:01:36 +0100 Subject: [PATCH 075/130] efficiency - fix and unify rating types --- js/web/productions/js/productions.js | 94 +++++++++++----------------- 1 file changed, 38 insertions(+), 56 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index e02e27360..01d7b31e2 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -69,7 +69,37 @@ let Productions = { RatingCurrentTab: 'Results', Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: {}, + RatingProdPerTiles: Object.assign({ + 'strategy_points': 5, + 'money': null, + 'supplies': null, + 'medals': null, + 'clan_power': null, + 'clan_goods': 10, + 'population': null, + 'happiness': null, + 'units': 1, + 'att_boost_attacker-all': 3 , + 'att_boost_attacker-guild_expedition': null, + 'att_boost_attacker-battleground': 3 , + 'att_boost_attacker-guild_raids': null, + 'def_boost_attacker-all': 3, + 'def_boost_attacker-guild_expedition': null, + 'def_boost_attacker-battleground': 3 , + 'def_boost_attacker-guild_raids': null, + 'att_boost_defender-all': 2, + 'att_boost_defender-guild_expedition': null, + 'att_boost_defender-battleground': null, + 'att_boost_defender-guild_raids': null, + 'def_boost_defender-all': 2, + 'def_boost_defender-guild_expedition': null, + 'def_boost_defender-battleground': null, + 'def_boost_defender-guild_raids': null, + 'goods-previous': 4, + 'goods-current': 5, + 'fsp': 1, + 'goods-next': null, + },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), RatingTypes: [ 'strategy_points', // Forge Punkte @@ -1432,15 +1462,9 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - let Rating = localStorage.getItem('ProductionRatingEnableds2'); - if (Rating !== null) Productions.Rating = JSON.parse(Rating) - - let RatingProdPerTiles = localStorage.getItem('ProductionRatingProdPerTiles'); - if (RatingProdPerTiles !== null) Productions.RatingProdPerTiles = JSON.parse(RatingProdPerTiles); - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = true - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = Productions.GetDefaultProdPerTile(type) + if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) + if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 } HTML.Box({ @@ -1548,12 +1572,7 @@ let Productions = { return 0 }) - let colNumber = 0 - for (let i = 0; i < Productions.RatingTypes.length; i++) { - let type = Productions.RatingTypes[i]; - if (!Productions.Rating[type]) continue; - colNumber++ - } + let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length h.push('
'); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1572,11 +1591,10 @@ let Productions = { h.push('
'); h.push(''); h.push(''); - let tileRatings = JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')) for (const type of Productions.RatingTypes) { if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1596,6 +1614,7 @@ let Productions = { if (!building.highlight) h.push(' ') h.push('') for (const type of Productions.RatingTypes) { + if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue if (building[type] != undefined) { h.push(`'); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`'); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`'); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`` for (let [id,b] of Object.entries(reconstruction.count)) { - let meta=MainParser.CityEntities[id] + let meta=MainParser.CityEntities[id.split("#")[0]] let width = meta.width||meta.components.AllAge.placement.size.x let length = meta.length||meta.components.AllAge.placement.size.y let road = meta?.components?.AllAge.streetConnectionRequirement?.requiredLevel || meta?.requirements?.street_connection_level || 0 - h+=` + h+=` From 77e88a372896f433cd8faf0ed915fcc9d0194c0e Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Tue, 3 Dec 2024 08:29:30 +0100 Subject: [PATCH 085/130] presents minigame - fix icons --- js/web/eventchests/js/eventchests.js | 11 +++++++++-- js/web/srcLinks/js/srcLinks.js | 17 ++++++++--------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/js/web/eventchests/js/eventchests.js b/js/web/eventchests/js/eventchests.js index cb9633810..5481dbfef 100644 --- a/js/web/eventchests/js/eventchests.js +++ b/js/web/eventchests/js/eventchests.js @@ -135,6 +135,7 @@ let EventPresents = { for (let present of EventPresents.Presents) { let icon; + let frag = "" if (present.status.value !== "used") { h.push(''); @@ -145,11 +146,17 @@ let EventPresents = { } } else { - icon = ``; + let asset = present.reward.type=="building" ? MainParser.CityEntities[present.reward.subType].asset_id : present.reward.iconAssetName + if (asset == "icon_fragment") { + asset = present.reward.assembledReward.type=="building" ? MainParser.CityEntities[present.reward.assembledReward.subType].asset_id : present.reward.assembledReward.iconAssetName + asset = present.reward.assembledReward.iconAssetName + frag = srcLinks.icons("icon_tooltip_fragment") + } + icon = ``; } h.push(''); - h.push(''); + h.push(''); h.push(''); } } diff --git a/js/web/srcLinks/js/srcLinks.js b/js/web/srcLinks/js/srcLinks.js index bdc712208..bb51532b2 100644 --- a/js/web/srcLinks/js/srcLinks.js +++ b/js/web/srcLinks/js/srcLinks.js @@ -110,15 +110,14 @@ let srcLinks = { getReward:(icon) => { - let url3 = srcLinks.get(`/shared/unit_portraits/armyuniticons_90x90/armyuniticons_90x90_${icon}.png`,true, true) // does not work :( - let url2 = srcLinks.get(`/shared/icons/goods_large/${icon}.png`,true, true) - let url1 = srcLinks.get(`/shared/icons/reward_icons/reward_icon_${icon}.png`,true, true) - let url = url3 + let url = srcLinks.get(`/shared/unit_portraits/armyuniticons_90x90/armyuniticons_90x90_${icon}.png`,true, true) // does not work :( - if (url3.indexOf("antiquedealer_flag") > -1) - url = url2 - if (url2.indexOf("antiquedealer_flag") > -1) - url = url1 + if (url.indexOf("antiquedealer_flag") > -1) + url = srcLinks.get(`/shared/icons/goods_large/${icon}.png`,true, true) + if (url.indexOf("antiquedealer_flag") > -1) + url = srcLinks.get(`/shared/icons/reward_icons/reward_icon_${icon}.png`,true, true) + if (url.indexOf("antiquedealer_flag") > -1) + url = srcLinks.get(`/city/buildings/${icon.replace(/(\D*?)_(.*)/,"$1_SS_$2")}.png`,true); return url; }, @@ -141,7 +140,7 @@ let srcLinks = { let link = srcLinks.get(`/shared/icons/${x}.png`,true,true); if (link.includes("antiquedealer_flag")) link = srcLinks.get(`/shared/icons/reward_icons/reward_icon_${x}.png`,true,true); if (link.includes("antiquedealer_flag")) link = srcLinks.get(`/city/buildings/${x.replace(/(\D*?)_(.*)/,"$1_SS_$2")}.png`,true); - return ``; + return ``; } } From 70706b969af5712b15a8c76307d58d46f3c10b2e Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 086/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..f57a7dead 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -981,6 +981,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1b30f770e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..5004a0e3c 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    '); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`'); if(present.reward.type === "unit") { - if(Unit.CoordsRaw) { - icon = ``; - } - + asset = present.reward.subType + } else if (present.reward.type=="building") { + asset = MainParser.CityEntities[present.reward.subType].asset_id } else { - let asset = present.reward.type=="building" ? MainParser.CityEntities[present.reward.subType].asset_id : present.reward.iconAssetName - if (asset == "icon_fragment") { - asset = present.reward.assembledReward.type=="building" ? MainParser.CityEntities[present.reward.assembledReward.subType].asset_id : present.reward.assembledReward.iconAssetName - asset = present.reward.assembledReward.iconAssetName - frag = srcLinks.icons("icon_tooltip_fragment") - } - icon = ``; + asset = present.reward.iconAssetName } + if (asset == "icon_fragment") { + if (present.reward.assembledReward.type=="building") + asset = MainParser.CityEntities[present.reward.assembledReward.subType].asset_id + else + asset = present.reward.assembledReward.iconAssetName + frag = srcLinks.icons("icon_tooltip_fragment") + } + icon = ``; + h.push(''); h.push(''); diff --git a/js/web/srcLinks/js/srcLinks.js b/js/web/srcLinks/js/srcLinks.js index 3106b309d..0a4275855 100644 --- a/js/web/srcLinks/js/srcLinks.js +++ b/js/web/srcLinks/js/srcLinks.js @@ -110,7 +110,7 @@ let srcLinks = { getReward:(icon) => { - let url = srcLinks.get(`/shared/unit_portraits/armyuniticons_90x90/armyuniticons_90x90_${icon}.png`,true, true) // does not work :( + let url = srcLinks.get(`/shared/unit_portraits/armyuniticons_90x90/armyuniticons_90x90_${icon}.jpg`,true, true) // does not work :( if (url.indexOf("antiquedealer_flag") > -1) url = srcLinks.get(`/shared/icons/goods_large/${icon}.png`,true, true) From b3ee872f1b061fe8c5d760125fdc205c22f1dad8 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 090/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..f57a7dead 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -981,6 +981,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1b30f770e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..5004a0e3c 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    '); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`'); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(``); - progress.push(``); + progress.push(``); if (GuildFights.showGuildColumn) progress.push(``); @@ -1257,12 +1257,17 @@ let GuildFights = { if (showCountdowns) { let countDownDate = moment.unix(prov[x]['lockedUntil'] - 2), color = GuildFights.SortedColors.find(e => e['id'] === prov[x]['ownerId']), + battleType = prov[x].isAttackBattleType ? '🔴' : '🔵', intervalID = setInterval(() => { GuildFights.UpdateCounter(countDownDate, intervalID, prov[x]['id']); }, 1000); nextup.push(``); - nextup.push(``); + nextup.push(``); GuildFights.UpdateCounter(countDownDate, intervalID, prov[x]['id']); @@ -1367,7 +1372,8 @@ let GuildFights = { copycache.sort(function (a, b) { return a.lockedUntil - b.lockedUntil }); copycache.forEach((mapElem) => { - copy += `${moment.unix(mapElem.lockedUntil - 2).format('HH:mm')} ${mapElem.title}\n`; + let battleType = mapElem.isAttackBattleType ? '🔴' : '🔵'; + copy += `${moment.unix(mapElem.lockedUntil - 2).format('HH:mm')} ${mapElem.title} ${battleType}\n`; }); if (copy !== '') @@ -1903,6 +1909,7 @@ let ProvinceMap = { this.short = data.short; this.links = data.links; this.flag = data.flag; + this.battleType = data.battleType; this.isSpawnSpot = data.isSpawnSpot; this.owner = { id: data.ownerID, @@ -2120,6 +2127,7 @@ let ProvinceMap = { data.ownerID = prov['ownerId']; data.ownerName = prov.owner; data.isSpawnSpot = false; + data.battleType = prov.isAttackBattleType ? '🔴' : '🔵'; if (prov.isSpawnSpot) { let clan = GuildFights.MapData['battlegroundParticipants'].find(c => c['participantId'] === prov['ownerId']); data['flagImg'] = clan['clan']['flag'].toLowerCase(); From 740e59d0ff446afff95b705c86ad18ba3c5eb3be Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 6 Dec 2024 21:06:41 +0100 Subject: [PATCH 096/130] GBG Map: added battle types --- js/web/guildfights/js/guildfights.js | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 7ae8b044f..ad702f260 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -1974,11 +1974,11 @@ let ProvinceMap = { mapStuff.y = mapStuff.y - 20; if (sector.lockedUntil === undefined && sector.conquestProgress.length === 0) - sector.drawTitleAndSlots(true, mapStuff.x, mapStuff.y); + sector.drawTitleAndSlots(mapType, true, mapStuff.x, mapStuff.y); else { if (mapType === 'waterfall_archipelago') mapStuff.y = mapStuff.y - 10; - sector.drawTitleAndSlots(false, mapStuff.x, mapStuff.y); + sector.drawTitleAndSlots(mapType, false, mapStuff.x, mapStuff.y); } mapStuff.y = mapStuff.y+23; @@ -2001,17 +2001,30 @@ let ProvinceMap = { ProvinceMap.MapCTX.fillText(provinceUnlockTime,mapStuff.x,mapStuff.y+5); } - Province.prototype.drawTitleAndSlots = function(drawCentered = true, x, y) { + Province.prototype.drawTitleAndSlots = function(mapType, drawCentered = true, x, y) { let titleY = y; let slotsY = y - 20; if (drawCentered) { titleY = y + 10; slotsY = y - 10; } - - ProvinceMap.MapCTX.font = 'bold 30px Arial'; ProvinceMap.MapCTX.strokeStyle = '#fff5'; + + ProvinceMap.MapCTX.beginPath(); + if (mapType === 'waterfall_archipelago') + ProvinceMap.MapCTX.arc(x-36, y+12, 5, 0, 2*Math.PI); + else + ProvinceMap.MapCTX.arc(x-36, y+25, 5, 0, 2*Math.PI); + + ProvinceMap.MapCTX.fillStyle = '#f00'; + if (this.battleType == 'blue') + ProvinceMap.MapCTX.fillStyle = '#00f'; + ProvinceMap.MapCTX.fill(); + ProvinceMap.MapCTX.stroke(); + + ProvinceMap.MapCTX.font = 'bold 28px Arial'; ProvinceMap.MapCTX.strokeText(this.short, x, titleY); + ProvinceMap.MapCTX.fillStyle = '#000'; ProvinceMap.MapCTX.fillText(this.short, x, titleY); @@ -2122,12 +2135,12 @@ let ProvinceMap = { }; let prov = GuildFights.MapData['map']['provinces'][i.id]; + data.battleType = prov.isAttackBattleType ? 'red' : 'blue'; if (prov['ownerId']) { data.ownerID = prov['ownerId']; data.ownerName = prov.owner; data.isSpawnSpot = false; - data.battleType = prov.isAttackBattleType ? '🔴' : '🔵'; if (prov.isSpawnSpot) { let clan = GuildFights.MapData['battlegroundParticipants'].find(c => c['participantId'] === prov['ownerId']); data['flagImg'] = clan['clan']['flag'].toLowerCase(); From 6510fdd4f79f1808f60ae8651740972b42f7d56c Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 6 Dec 2024 21:58:46 +0100 Subject: [PATCH 097/130] QI Progress: added missing data to DB --- js/web/qiprogress/js/qiprogress.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js index a0d4003fc..547652a33 100644 --- a/js/web/qiprogress/js/qiprogress.js +++ b/js/web/qiprogress/js/qiprogress.js @@ -138,7 +138,7 @@ let QiProgress = { if (qiRound && qiRound !== null && qiRound !== QiProgress.CurrentQISeason) { let d = await QiProgress.db.history.where({ qiround: qiRound }).toArray(); - QiProgress.qiRound = d[0].participation.sort(function (a, b) { + QiProgress.qiRound = d[0].participation?.sort(function (a, b) { return a.rank - b.rank; }); histView = true; @@ -618,7 +618,6 @@ let QiProgress = { progress: d[i].progressContribution || 0 }); } - console.log('history', { participation: players, actions: sumActions, progress: sumProgress }) await QiProgress.UpdateDB('history', { participation: players, actions: sumActions, progress: sumProgress }); @@ -649,7 +648,8 @@ let QiProgress = { await QiProgress.db.history.put({ qiround: QiProgress.CurrentQISeason, actions: data.actions, - progress: data.progress + progress: data.progress, + participation: data.participation }); } From a235e33dd04eadf1b5ba5876f0ad85d35598f352 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 7 Dec 2024 11:58:51 +0100 Subject: [PATCH 098/130] added sticky class, used it --- css/web/boxes.css | 10 ++++++ js/web/bettermusic/css/bettermusic.css | 5 --- js/web/bettermusic/js/bettermusic.js | 4 +-- js/web/bluegalaxy/css/bluegalaxy.css | 6 ---- js/web/bluegalaxy/js/bluegalaxy.js | 2 +- .../boost_inventory/css/boost_inventory.css | 3 -- js/web/boost_inventory/js/boost_inventory.js | 2 +- js/web/castle/css/castle.css | 2 -- js/web/castle/js/castle.js | 2 +- .../css/compare_friends_threads.css | 6 ++-- .../js/compare_friends_threads.js | 4 ++- js/web/findGB/css/findGB.css | 5 --- js/web/findGB/js/findGB.js | 4 +-- js/web/fp-collector/css/fp-collector.css | 3 -- js/web/fp-collector/js/fp-collector.js | 2 +- js/web/gexstat/css/gexstat.css | 6 ---- js/web/greatbuildings/css/greatbuildings.css | 3 -- js/web/greatbuildings/js/greatbuildings.js | 2 +- js/web/guildfights/css/guildfights.css | 9 ----- js/web/guildfights/js/guildfights.js | 6 ++-- .../guildmemberstat/css/guildmemberstat.css | 3 -- js/web/guildmemberstat/js/guildmemberstat.js | 34 +++++++++---------- js/web/infoboard/css/infoboard.css | 3 -- js/web/infoboard/js/infoboard.js | 2 +- js/web/investment/css/investment.css | 3 -- js/web/investment/js/investment.js | 2 +- js/web/kits/css/kits.css | 3 -- js/web/kits/js/kits.js | 2 +- js/web/market/css/market.css | 3 -- js/web/market/js/market.js | 4 +-- js/web/marketoffers/css/marketoffers.css | 6 ---- js/web/marketoffers/js/marketoffers.js | 4 +++ js/web/part-calc/css/part-calc.css | 5 --- js/web/part-calc/js/part-calc.js | 2 +- js/web/productions/css/productions.css | 7 ---- js/web/productions/js/productions.js | 16 ++++----- js/web/qiprogress/css/qiprogress.css | 5 --- js/web/qiprogress/js/qiprogress.js | 2 +- js/web/reconstruction/css/reconstruction.css | 6 ---- js/web/reconstruction/js/reconstruction.js | 2 +- .../recurring-quests/css/recurring-quests.css | 4 --- .../recurring-quests/js/recurring-quests.js | 2 +- js/web/technologies/css/technologies.css | 3 -- js/web/technologies/js/technologies.js | 2 +- 44 files changed, 66 insertions(+), 145 deletions(-) diff --git a/css/web/boxes.css b/css/web/boxes.css index 955583524..dc86d0627 100644 --- a/css/web/boxes.css +++ b/css/web/boxes.css @@ -2103,6 +2103,16 @@ tr.sorter-header th:not(.no-sort).descending:after { opacity: 1; } +.sticky { + top: 0; + position: sticky; + z-index: 200; +} + +.w-full { + width: 100% +} + .scrollup { border-radius: 50%; width: 30px; diff --git a/js/web/bettermusic/css/bettermusic.css b/js/web/bettermusic/css/bettermusic.css index 137bca8f0..d7a3c085b 100644 --- a/js/web/bettermusic/css/bettermusic.css +++ b/js/web/bettermusic/css/bettermusic.css @@ -41,11 +41,6 @@ width:auto; } -#musicSettingsScenesX tr th { - position: sticky; - top: 0px; -} - #betterMusicDialog .flex > div { min-width: 40%; padding: 0.5em; diff --git a/js/web/bettermusic/js/bettermusic.js b/js/web/bettermusic/js/bettermusic.js index 67ab30dd9..bfe095928 100644 --- a/js/web/bettermusic/js/bettermusic.js +++ b/js/web/bettermusic/js/bettermusic.js @@ -327,12 +327,12 @@ let betterMusic = { htmltext += ``; htmltext += ``; - htmltext += `
    `; diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index d978f2524..20237add4 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1690,11 +1690,11 @@ let Productions = { $('#ProductionsRatingBody .overlay .results').html("") let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && x.selected).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) + $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) } foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && !x.selected).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) + $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) } } filterMeta(/./) From aa2ada33e4eccee5cc50771d92a1383400922876 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 17 Nov 2024 12:09:17 +0100 Subject: [PATCH 017/130] tooltip - fix efficiency showing even if no era declared --- js/web/customTooltip/js/customTooltip.js | 4 ++-- js/web/productions/js/productions.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index 845552e06..16aa6c49b 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -92,11 +92,11 @@ let Tooltips = { if (!id) return let era = e?.currentTarget?.dataset?.era||Technologies.InnoEraNames[MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.level] - let eff = Math.round(100 * Productions.rateBuildings([id],true)[0].score||0) + let eff = Math.round(100 * Productions.rateBuildings([id],true,era)[0].score||0) let meta = MainParser.CityEntities[id] let h = `
    -

    ${meta.name} ${eff ? `(${i18n("Boxes.Kits.Efficiency")}: ${eff})`:''}

    +

    ${meta.name} ${era ? `(${i18n("Boxes.Kits.Efficiency")}: ${eff})`:''}

    `+ `` } - for (r of levels.AllAge?.ally?.rooms || []) { - ally += '` + for (let r of levels.AllAge?.ally?.rooms || []) { + let allydata = null + for (a of allies||[]) { + allydata = MainParser.Allies.getAllieData(a) + if (r.allyType == allydata.type && (!r.rarity?.value || r.rarity?.value == allydata.rarity)) break + allydata = null + } + ally += `` } if (levels.AllAge.eraRequirement?.era && era =="") { From a675ac3c9860447681102b00ad7deea5432a2e03 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 18 Nov 2024 22:14:28 +0000 Subject: [PATCH 033/130] Currently translated at 78.4% (1192 of 1519 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/ru/ --- js/web/_i18n/ru.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/web/_i18n/ru.json b/js/web/_i18n/ru.json index 25d394668..577aedb97 100644 --- a/js/web/_i18n/ru.json +++ b/js/web/_i18n/ru.json @@ -253,8 +253,11 @@ "Boxes.CityMap.street": "Дороги", "Boxes.CityMap.tower": "Башни", "Boxes.Citymap.Efficiency": "Эффективность", + "Boxes.CloseBox.ButtonSize": "Размер кнопки", "Boxes.CloseBox.CloseAllButton": "Кнопка Закрыть все", "Boxes.CloseBox.HideAllButton": "Кнопка Спрятать все", + "Boxes.CloseBox.Horizontal": "горизонтальный", + "Boxes.CloseBox.Vertical": "вертикальный", "Boxes.CombatCalculator.Efficiency": "Эффективность", "Boxes.CombatCalculator.EfficiencyTT": "Оценка эффективности в соответствии с настройками в модуле эффективности", "Boxes.CombatCalculator.Name": "Название здания", From 0b1935f58aae487a466c853ef11cea7302e75ad3 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Tue, 19 Nov 2024 16:33:31 +0100 Subject: [PATCH 034/130] gext attempts - improve edge case behaviour --- js/web/gexstat/js/gexstat.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/web/gexstat/js/gexstat.js b/js/web/gexstat/js/gexstat.js index 60d9913d4..fc9269da6 100644 --- a/js/web/gexstat/js/gexstat.js +++ b/js/web/gexstat/js/gexstat.js @@ -1046,6 +1046,7 @@ let GExAttempts = { }, deactivationTimer:null, activationTimer:null, + last:null, refreshGUI:()=>{ //hidenumber when GE completed, not running or out of attempts @@ -1090,10 +1091,14 @@ let GExAttempts = { setNext:(time)=>{ let timer=3600000 - if (time) + if (time) { timer = (time-GameTime+3600)*1000 - else - GExAttempts.setCount(Math.min(GExAttempts.count + 1,8)) + GExAttempts.last = time + } else { + let amount = Math.floor((moment().unix() - GExAttempts.last + 100)/3600) + GExAttempts.setCount(Math.min(GExAttempts.count + amount,8)) + GExAttempts.last = moment().unix() + } if (GExAttempts.next) clearTimeout(GExAttempts.next) From 839fc78fa53e4376ea5468744ed246856bed588d Mon Sep 17 00:00:00 2001 From: Weblate Date: Tue, 19 Nov 2024 16:14:30 +0000 Subject: [PATCH 035/130] Currently translated at 100.0% (1519 of 1519 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index 3e92420ab..9f1a9f3fa 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -637,6 +637,7 @@ "Boxes.Investment.TotalFP": "Total PF (stock + investis + gains) : ", "Boxes.Investment.UpToDate": "La liste des investissements a été mise à jour il y a moins de 30 minutes.", "Boxes.Investment.UpdateRequired": "La liste des investissements a plus de 30 minutes. Veuillez mettre à jour votre liste d'investissements à l'Hôtel de Ville.", + "Boxes.ItemSources.Title": "Origine Objet", "Boxes.Kits.Antiques_Dealer": "Antiquaire", "Boxes.Kits.Base": "Bâtiment niv 1 ou Kit de sélection", "Boxes.Kits.Cultural_Settlements": "Colonies culturelles", @@ -983,6 +984,15 @@ "Boxes.PvPArena.Title": "Arène JcJ", "Boxes.PvPArena.Type": "Type", "Boxes.QIMap.Title": "Carte des Incursions Quantiques", + "Boxes.QiProgress.Actions": "Actions", + "Boxes.QiProgress.Progress": "Progrès", + "Boxes.QiProgress.QiRound": "Tour IQ", + "Boxes.QiProgress.ShowProgressFilter": "Filtre Afficher Progrès", + "Boxes.QiProgress.ShowRoundSelector": "Afficher Sélecteur Tour QI", + "Boxes.QiProgress.SnapShotLogDisclaimer": "Avis de non-responsabilité : ces données sont basées sur vos données collectées. Les chiffres présentés ici ne sont probablement pas exacts à 100 %. Il faudrait ouvrir la liste à minuit pour qu'ils soient corrects.", + "Boxes.QiProgress.SnapshotLog": "IQ Log aperçu instantané", + "Boxes.QiProgress.Title": "Aperçu IQ", + "Boxes.ReconstructionList.Title": "Liste de tailles des objets en Reconstruction", "Boxes.RecurringQuests.AND": "ET", "Boxes.RecurringQuests.OR": "OU", "Boxes.RecurringQuests.Table.Quest": "Nom de la quête", @@ -1065,6 +1075,21 @@ "Boxes.Technologies.NoTechs": "Vous avez atteint la fin de cette ère.", "Boxes.Technologies.Resource": "Ressource", "Boxes.Technologies.Title": "Recherches technologiques", + "Boxes.Tooltip.Building.addInhabitant": "Ajouter un habitant unique", + "Boxes.Tooltip.Building.after": "Après", + "Boxes.Tooltip.Building.allyRooms": "Emplacement Alliés historiques", + "Boxes.Tooltip.Building.canMotivate": "Peut-être motivé", + "Boxes.Tooltip.Building.canPolish": "Peut être poli", + "Boxes.Tooltip.Building.costs": "Coûts", + "Boxes.Tooltip.Building.lifeSupport": "est affecté par le système de survie", + "Boxes.Tooltip.Building.noPlunder": "Ne peut pas être pillé", + "Boxes.Tooltip.Building.produces": "Produit", + "Boxes.Tooltip.Building.provides": "Fournit", + "Boxes.Tooltip.Building.road": "Route requise", + "Boxes.Tooltip.Building.road2": "route 2 voies requise", + "Boxes.Tooltip.Building.size+time": "Taille et temps de construction", + "Boxes.Tooltip.Building.traits": "Caractéristiques", + "Boxes.Tooltip.Building.when": "Quand", "Boxes.Treasury.Action": "Message", "Boxes.Treasury.Amount": "Montant", "Boxes.Treasury.DateTime": "Date/Heure", @@ -1201,10 +1226,12 @@ "Eras.9.short": "Prog", "Eras.GvGAllAge": "Toutes ères", "General.Boost": "Boost", + "General.Date": "Date", "General.GB": "Grand Monument", "General.Good": "Ressource", "General.Goods": "Ressources", "General.Guild": "Guilde", + "General.Items": "Objets", "General.Level": "Niveau", "General.Player": "Joueur", "General.Reset": "Réinitialiser", @@ -1363,6 +1390,7 @@ "Settings.Entry.Help": "Aide", "Settings.Entry.HideHelperDuringBattle": "Visibilité de l'assistant en bataille", "Settings.Entry.LoadBeta": "Charger la version Beta actuelle", + "Settings.Entry.LoadBeta2": "Charger la version Beta actuelle", "Settings.Entry.MenuContent": "Contenu du menu", "Settings.Entry.MenuLength": "Menu", "Settings.Entry.NotificationsPosition": "Emplacement de la notification", @@ -1388,6 +1416,7 @@ "Settings.Entry.ShowPlayersMotivation": "Activité PO/MO", "Settings.Entry.ShowPotions": "Potions de bataille", "Settings.Entry.ShowPvPArena": "Arène JcJ - Compte rendu", + "Settings.Entry.ShowReconstructionList": "Liste de taille en mode Reconstruction", "Settings.Entry.ShowRougeUnitWarning": "Voyou Alerte uniquement", "Settings.Entry.ShowScoutingTimes": "Info d'éclaireur", "Settings.Entry.Version": "Version", @@ -1411,6 +1440,9 @@ "Settings.InfoboxEntryCount.Title": "Nb d'infos techniques", "Settings.LoadBeta.Desc": "Uniquement disponible dans l'extension séparée !!!
    Il a à télécharger et à ajouter manuellement aux extensions.
    Elle ne peut pas être utilisée conjointement avec l'extension Helper habituelle !

    Dans la version bêta, les erreurs sont plus susceptibles de se produire que dans la version publiée ! Veuillez nous informer de tout bogue trouvé sur Discord ou Github !
    Les temps de chargement de l'extension peuvent être plus longs que d'habitude !
    Le jeu doit être rechargé pour changer de mode !", "Settings.LoadBeta.Title": "Charger la version Beta actuelle", + "Settings.LoadBeta2.Button": "Charger la version Beta", + "Settings.LoadBeta2.Desc": "L'extension bêta doit être installée et mise à jour manuellement. Soit cliquez régulièrement sur le bouton ci-dessous pour télécharger la version bêta actuelle, soit utilisez un Git-Manager>

    Décompressez le zip téléchargé et dans les paramètres de l'extension Chrome, activez le mode développeur pour « charger l'extension décompressée ».

    Une seule version du Helper doit être active à tout moment pour éviter les interférences !", + "Settings.LoadBeta2.Title": "Charger la version Beta actuelle", "Settings.MenuContent.Desc": "Quels boutons voulez-vous dans le menu ?
    Vert : afficher le bouton. Rouge : masquer le bouton.", "Settings.MenuContent.Title": "Contenu du menu", "Settings.MenuLength.Desc": "Combien d'éléments le menu devrait-il avoir ?
    Vide ou \"0\" pour une hauteur automatique.", @@ -1468,6 +1500,8 @@ "Settings.ShowPotions.Title": "Potions de bataille", "Settings.ShowPvPArena.Desc": "Afficher le compte-rendu de l'arène JcJ, lors de l'ouverture de l'arène JcJ ?", "Settings.ShowPvPArena.Title": "Compte-rendu Arène JcJ", + "Settings.ShowReconstructionList.Desc": "Fournit une liste triable de tous les bâtiments et de leurs tailles en mode reconstruction", + "Settings.ShowReconstructionList.Title": "Afficher la liste des tailles en mode reconstruction", "Settings.ShowRougeUnitWarning.Desc": "Masquer les boutons \"Attaque\" et \"Bataille auto.\" afin d'éviter une défaite s'il ne reste que des voyous après la première vague.", "Settings.ShowRougeUnitWarning.Title": "Alerte voyou Uniquement", "Settings.ShowScoutingTimes.Desc": "Affiche une fenêtre lors de l'ouverture de la carte, indiquant les durées d'exploration des provinces actuellement disponibles et la progression de l'exploration actuelle", From c76089011d34ad0e5539106ef6adfa76690ba275 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 20 Nov 2024 03:14:29 +0000 Subject: [PATCH 036/130] Currently translated at 100.0% (1519 of 1519 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index 9f1a9f3fa..cf81b146d 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -1390,7 +1390,7 @@ "Settings.Entry.Help": "Aide", "Settings.Entry.HideHelperDuringBattle": "Visibilité de l'assistant en bataille", "Settings.Entry.LoadBeta": "Charger la version Beta actuelle", - "Settings.Entry.LoadBeta2": "Charger la version Beta actuelle", + "Settings.Entry.LoadBeta2": "Charger la version Beta", "Settings.Entry.MenuContent": "Contenu du menu", "Settings.Entry.MenuLength": "Menu", "Settings.Entry.NotificationsPosition": "Emplacement de la notification", From 58831c9d2c95cd913bb6ffe7475e1c617aa3488d Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 10:30:39 +0100 Subject: [PATCH 037/130] efficiency rating - save settings and do column hiding via css classes --- js/web/productions/css/productions.css | 27 +++++++++++++++---- js/web/productions/js/productions.js | 37 +++++++++++++++----------- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index faa0f47af..717d0e668 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -144,6 +144,17 @@ background-repeat: no-repeat; background-position: center center, -312px 0px; } +#ProductionsRatingBody.tilevalues .buildingvalue { + display: none; +} +#ProductionsRatingBody:not(.tilevalues) .tilevalue { + display: none; +} + +#ProductionsRatingBody.showitems .items { + display: none; +} + #ProductionsRating #ProductionsRatingBody span.resicon.def_boost_attacker-guild_expedition { background-position: center center, -366px 0px; } @@ -270,10 +281,18 @@ color: var(--text-bright); font-weight: 600; } -#ProductionsRating #ProductionsRatingBody tr.highlighted-explained, #ProductionsRating #ProductionsRatingBody .only-highlighted tr { +#ProductionsRating #ProductionsRatingBody tr.highlighted-explained, +#ProductionsRating .showhighlighted tbody tr { display: none; } -#ProductionsRating #ProductionsRatingBody tr.highlighted-explained.highlighted-explained, #ProductionsRating #ProductionsRatingBody .only-highlighted tr.highlighted-explained, #ProductionsRating #ProductionsRatingBody tr.highlighted-explained.highlighted, #ProductionsRating #ProductionsRatingBody .only-highlighted tr.highlighted, #ProductionsRating #ProductionsRatingBody tr.highlighted-explained.highlighted2, #ProductionsRating #ProductionsRatingBody .only-highlighted tr.highlighted2, #ProductionsRating #ProductionsRatingBody tr.highlighted-explained.additional, #ProductionsRating #ProductionsRatingBody .only-highlighted tr.additional { +#ProductionsRating #ProductionsRatingBody tr.highlighted-explained.highlighted-explained, +#ProductionsRating #ProductionsRatingBody tr.highlighted-explained.highlighted, +#ProductionsRating #ProductionsRatingBody tr.highlighted-explained.highlighted2, +#ProductionsRating #ProductionsRatingBody tr.highlighted-explained.additional, +#ProductionsRating .showhighlighted tbody tr.highlighted-explained, +#ProductionsRating .showhighlighted tbody tr.highlighted, +#ProductionsRating .showhighlighted tbody tr.highlighted2, +#ProductionsRating .showhighlighted tbody tr.additional { display: table-row; } #ProductionsRating #ProductionsRatingBody tr.highlighted-explained td { @@ -451,9 +470,7 @@ float: right; margin-right: 5px; } -#ProductionsRating #ProductionsRatingBody .tilevalue { - display: none; -} + input[id*="ProdPerTile"] { width: 100px; } diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index eddf3fcba..1acfd52c3 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -99,7 +99,7 @@ let Productions = { 'goods-next', ], fragmentsSet: new Set(), - + efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), init: () => { if (CityMap.IsExtern) return @@ -1548,7 +1548,7 @@ let Productions = { h.push('
    ') h.push(''); h.push(''); } - h.push(''); + h.push(''); h.push(''); h.push(''); @@ -1593,7 +1593,7 @@ let Productions = { h.push('') } } - h.push('') + h.push('') h.push('') } h.push(''); @@ -1611,22 +1611,29 @@ let Productions = { else { h.push('Something went wrong'); } - + SaveSettings=(x)=>{ + Productions.efficiencySettings[x]=$('#'+x).is(':checked') + localStorage.setItem("Productions.efficiencySettings",JSON.stringify(Productions.efficiencySettings)) + if ($('#'+x).is(':checked')) { + $("#ProductionsRatingBody").addClass(x); + } else { + $("#ProductionsRatingBody").removeClass(x); + } + } $('#ProductionsRatingBody').html(h.join('')).promise().done(function () { $('.TSinactive').tableSorter() $('.TSinactive').removeClass('TSinactive') $('#tilevalues, label[tilevalues]').on('click', function () { - $("#ProductionsRatingBody .buildingvalue").toggle(); - $("#ProductionsRatingBody .tilevalue").toggle(); + SaveSettings("tilevalues") }); $('#showitems, label[showitems]').on('click', function () { - $("#ProductionsRatingBody table .items").toggle(); + SaveSettings("showitems") }); $('#showhighlighted, label[showhighlighted]').on('click', function () { - $("#ProductionsRatingBody tbody").toggleClass('only-highlighted'); + SaveSettings("showhighlighted") }); $('.show-all').on('click', function () { @@ -1648,9 +1655,6 @@ let Productions = { $(".ratingtable .highlighted td:nth-child(2)").each((x,el)=>{ marked.push(el.dataset.text) }) - tilevalues=$('#tilevalues').is(':checked') - showitems=$('#showitems').is(':checked') - showhighlighted=$('#showhighlighted').is(':checked') search=new RegExp($('#efficiencyBuildingFilter').val(),"i") Productions.CalcRatingBody() setTimeout(()=>{ @@ -1660,13 +1664,14 @@ let Productions = { } }) $('#efficiencyBuildingFilter').val(search.source=="(?:)"?"":search.source) - $('#efficiencyBuildingFilter').trigger("input") - if (tilevalues) $('#tilevalues').trigger("click") - if (showitems) $('#showitems').trigger("click") - if (showhighlighted) $('#showhighlighted').trigger("click") + $('#efficiencyBuildingFilter').trigger("input") },500) }) + if (Productions.efficiencySettings.tilevalues != $('#tilevalues').is(':checked')) $('#tilevalues').trigger("click") + if (Productions.efficiencySettings.showitems != $('#showitems').is(':checked')) $('#showitems').trigger("click") + if (Productions.efficiencySettings.showhighlighted != $('#showhighlighted').is(':checked')) $('#showhighlighted').trigger("click") + $('#findMetaBuilding').on('input', function () { let regEx=new RegExp($(this).val(),"i"); filterMeta(regEx) From cf721ec4b6de77132f082e2be35bd4cd736bda72 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 11:25:23 +0100 Subject: [PATCH 038/130] hidden reward - add warn text for 2 lane roads --- js/web/_i18n/de.json | 1 + js/web/_i18n/en.json | 1 + js/web/hidden-rewards/css/hidden-rewards.css | 9 ++++++++- js/web/hidden-rewards/js/hidden-rewards.js | 13 ++++++++++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 457eb7425..9bf79c3b4 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -580,6 +580,7 @@ "Boxes.HiddenRewards.Title": "Ereignisse", "Boxes.HiddenRewards.none": "keine", "Boxes.HiddenRewards.onlyVis": "nur aufgedeckte", + "Boxes.HiddenRewards.twolaneWarning": "Wenn ein Ereignis auf einer zweispurigen Straße angezeigt wird, muss eine zweispurige Straße gebaut werden, um es einsammeln zu könnnen!", "Boxes.InactivesSettings.Title":"Abgelaufen Alarme umschalten", "Boxes.InactivesSettings.Toggle":"Klick zum Umschalten", "Boxes.InactivesSettings.NoAlert":"kein Alarm", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 2fa889c55..b475adb35 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -579,6 +579,7 @@ "Boxes.HiddenRewards.Title": "Incidents Overview", "Boxes.HiddenRewards.none": "none", "Boxes.HiddenRewards.onlyVis": "only uncovered", + "Boxes.HiddenRewards.twolaneWarning": "If an incident is displayed to be on a two-lane road, such a road must be built in order to be able to collect the reward!", "Boxes.InactivesSettings.Title":"Toggle expiry Alert", "Boxes.InactivesSettings.Toggle":"Click to toggle:", "Boxes.InactivesSettings.NoAlert":"No alert", diff --git a/js/web/hidden-rewards/css/hidden-rewards.css b/js/web/hidden-rewards/css/hidden-rewards.css index ecd4e992c..fc5ef9166 100644 --- a/js/web/hidden-rewards/css/hidden-rewards.css +++ b/js/web/hidden-rewards/css/hidden-rewards.css @@ -64,4 +64,11 @@ td[title="incident_rhino"], td[title="incident_castaway"], td[title="incident_fi #HiddenRewardBox tr.unavailable { opacity: 0.5; font-style: italic; -} \ No newline at end of file +} + +#HiddenRewardBox .warning { + color: var(--text-bright); + max-width: 380px; + padding: 5px; + text-align: center; +} diff --git a/js/web/hidden-rewards/js/hidden-rewards.js b/js/web/hidden-rewards/js/hidden-rewards.js index a101495fc..873982936 100644 --- a/js/web/hidden-rewards/js/hidden-rewards.js +++ b/js/web/hidden-rewards/js/hidden-rewards.js @@ -94,11 +94,12 @@ let HiddenRewards = { let positionX = Rewards[idx].position.position || 0; let isGE = false; let SkipEvent = true; + let twolane = false // prüfen ob der Spieler in seiner Stadt eine zweispurige Straße hat if (position === 'cityRoadBig') { - if (CurrentEraID >= Technologies.Eras.ProgressiveEra) - SkipEvent = false; + if (CurrentEraID >= Technologies.Eras.ProgressiveEra) SkipEvent = false + twolane = true } else { SkipEvent = false; @@ -126,7 +127,8 @@ let HiddenRewards = { starts: Rewards[idx].startTime, expires: Rewards[idx].expireTime, isGE: isGE, - positionGE: positionX + positionGE: positionX, + twolane: twolane }); } @@ -179,6 +181,11 @@ let HiddenRewards = { BuildBox: () => { let h = []; + let twolane = 0 < [...new Set(Object.values(MainParser.CityMapData).filter(x=>x.type=="street").map(x=>x.cityentity_id))].filter(x=>MainParser.CityEntities[x].requirements.street_connection_level == 2).length + let warning = HiddenRewards.FilteredCache.filter(x=>x.twolane).length > 0 && !twolane + if (warning) { + h.push(`
    ${i18n("Boxes.HiddenRewards.twolaneWarning")}
    `) + } h.push('
    `; diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 20237add4..cac975f52 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1749,11 +1749,11 @@ let Productions = { }, - rateBuildings: (buildingType,additional=false) => { + rateBuildings: (buildingType,additional=false, era=null) => { let ratedBuildings = [] let tileRatings = JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')) if (additional) { - buildingType = buildingType.map(x=>CityMap.createNewCityMapEntity(x)) + buildingType = buildingType.map(x=>CityMap.createNewCityMapEntity(x,era||CurrentEra)) } for (const building of buildingType) { if (building.entityId.includes("L_AllAge_EasterBonus1") || building.entityId.includes("L_AllAge_Expedition16") || building.entityId.includes("L_AllAge_ShahBonus17") || (building.isSpecial == undefined && building.type != "greatbuilding")) continue // do not include wishingwell type buildings From cba6b242edfdc6b8f36638df2438ddc022453744 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 17 Nov 2024 15:15:47 +0100 Subject: [PATCH 018/130] reconstruction - do not reduce count, when moving building tooltip - do not calculate efficiency if no era set --- changelog-de.md | 4 ++- changelog-en.md | 4 ++- js/web/customTooltip/js/customTooltip.js | 3 +-- js/web/reconstruction/js/reconstruction.js | 29 ++++++++++++---------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index 20ff901bd..5c2e20144 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -13,7 +13,9 @@ - Tooltip: - manche Browser haben nicht das korrekte Design verwendet - konnte offen bleiben, obwohl zugehöriges Fenster geschlossen wurde -- Umbau-Liste: Standardhöhe gesetzt +- Umbau-Liste: + - Standardhöhe gesetzt + - Umplatzieren von Gebäuden verringerte den Zähler ##### 3.9.0.0 diff --git a/changelog-en.md b/changelog-en.md index e42f13e59..625b6564a 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -13,7 +13,9 @@ - Tooltip: - some browsers did not use the correct design - did sometimes not vanish when a box was closed -- Reconstruction List: set a default height +- Reconstruction List: + - set a default height + - moving buildings reduced counter ##### 3.9.0.0 diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index 16aa6c49b..f4cacc7ff 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -92,11 +92,10 @@ let Tooltips = { if (!id) return let era = e?.currentTarget?.dataset?.era||Technologies.InnoEraNames[MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.level] - let eff = Math.round(100 * Productions.rateBuildings([id],true,era)[0].score||0) let meta = MainParser.CityEntities[id] let h = `
    -

    ${meta.name} ${era ? `(${i18n("Boxes.Kits.Efficiency")}: ${eff})`:''}

    +

    ${meta.name} ${era ? `(${i18n("Boxes.Kits.Efficiency")}: ${Math.round(100 * Productions.rateBuildings([id],true,era)[0].score||0)})`:''}

    `+ `` - for (let [id,b] of Object.entries(reconstruction.draft)) { + for (let [id,b] of Object.entries(reconstruction.count)) { let meta=MainParser.CityEntities[id] let width = meta.width||meta.components.AllAge.placement.size.x let length = meta.length||meta.components.AllAge.placement.size.y From 3bcd67a1f27f94bdcf5cb29f7f01c818f95badac Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 17 Nov 2024 20:09:36 +0100 Subject: [PATCH 019/130] item sources: styling, added filter + general cleanup + helper for simple table filter --- css/web/boxes.css | 3 +- css/web/variables.css | 2 +- js/web/_helper/js/_helper.js | 20 +++++++ js/web/_i18n/de.json | 1 + js/web/_i18n/en.json | 1 + js/web/customTooltip/css/customTooltip.css | 9 +-- js/web/infoboard/css/infoboard.css | 3 +- js/web/investment/js/investment.js | 16 +++--- js/web/market/js/market.js | 4 +- js/web/marketoffers/js/marketoffers.js | 4 +- js/web/productions/css/productions.css | 30 ++++++---- js/web/productions/js/productions.js | 66 ++++++++-------------- 12 files changed, 87 insertions(+), 72 deletions(-) diff --git a/css/web/boxes.css b/css/web/boxes.css index c8ef373b8..8f3bfd4ca 100644 --- a/css/web/boxes.css +++ b/css/web/boxes.css @@ -376,7 +376,8 @@ table.foe-table thead th { } table.foe-table tbody tr:nth-child(odd), ul.foe-table li:nth-child(odd) { - background-color: var(--background-table-odd); + -webkit-backdrop-filter: brightness(1.1) saturate(1.1); + backdrop-filter: brightness(1.1) saturate(1.1); } table.foe-table:not(.no-hover) tbody tr:hover { diff --git a/css/web/variables.css b/css/web/variables.css index d1299e638..bae7ba6f4 100644 --- a/css/web/variables.css +++ b/css/web/variables.css @@ -53,7 +53,7 @@ --background-tabs: linear-gradient(#494241, #2b2c33); --background-tabs-active: linear-gradient(#4a5c7a, #3b4863); - --background-table-hover: rgba(243, 214, 160, 0.2); + --background-table-hover: #ffb45733; --background-table-odd: rgba(255, 158, 69, 0.07); --background-table-darker: #40190080; --background-table-info: #003c6d4d; diff --git a/js/web/_helper/js/_helper.js b/js/web/_helper/js/_helper.js index e1c363b00..9807c80cf 100644 --- a/js/web/_helper/js/_helper.js +++ b/js/web/_helper/js/_helper.js @@ -996,6 +996,26 @@ let HTML = { }, + FilterTable: (selector) => { + $(selector).on('click', (e) => {e.stopPropagation()}) + $(selector).on('keyup', function (e) { + let filter = $(this).val().toLowerCase() + let table = $(this).parents("table") + if (filter.length >= 2) { + $("tbody tr", table).hide() + $("tbody tr", table).filter(function() { + let foundText = ($(this).text().toLowerCase().indexOf(filter) > -1) + if (foundText) + $(this).show() + }); + } + else { + $("tbody tr", table).show() + } + }); + }, + + ParseFloatLocalIfPossible: (NumberString) => { if (HTML.IsReversedFloatFormat === undefined) { //FloatFormat bestimmen, wenn noch unbekannt let ExampleNumberString = Number(1.2).toLocaleString(i18n('Local')) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 8c816c613..457eb7425 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -1228,6 +1228,7 @@ "General.Boost":"Boost", "General.Date":"Datum", "General.GB": "Legendäres Bauwerk", + "General.Items": "Items", "General.Level": "Stufe", "General.Player": "Spieler", "General.Reset": "Zurücksetzen", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index db5dda110..2fa889c55 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -1228,6 +1228,7 @@ "General.Date":"Date", "General.GB": "Great Building", "General.Guild": "Guild", + "General.Items": "Items", "General.Level": "Level", "General.Player": "Player", "General.Reset": "Reset", diff --git a/js/web/customTooltip/css/customTooltip.css b/js/web/customTooltip/css/customTooltip.css index d42322ae1..de70c11be 100644 --- a/js/web/customTooltip/css/customTooltip.css +++ b/js/web/customTooltip/css/customTooltip.css @@ -1,7 +1,7 @@ #TooltipContainer.window-box { - border: 2px solid #353831; - background: #3b3f39; - color: #f2ede1; + border: 2px solid #2a2c27; + background: #343832; + color: #f7f4ed; } #TooltipContainer.window-box .foe-table tr td { @@ -14,8 +14,9 @@ box-shadow: inset 0 0 0 2000px var(--black-50), 0 1px 0 0 #fff3, 0 2px 0 0 #0004; } -table.foe-table tbody tr:nth-child(odd), ul.foe-table li:nth-child(odd) { +.buildingTT table.foe-table tbody tr:nth-child(odd), .buildingTT .foe-table li:nth-child(odd) { background-color: #fff1; + backdrop-filter: none; } .buildingTT { diff --git a/js/web/infoboard/css/infoboard.css b/js/web/infoboard/css/infoboard.css index a7bf3ba58..9bb313e40 100644 --- a/js/web/infoboard/css/infoboard.css +++ b/js/web/infoboard/css/infoboard.css @@ -108,7 +108,8 @@ table.info-table tr td { } #BackgroundInfoTable .welcome { - background-color: var(--background-table-odd); + -webkit-backdrop-filter: brightness(1.1) saturate(1.1); + backdrop-filter: brightness(1.1) saturate(1.1); } #BackgroundInfoTable .welcome td:first-child { diff --git a/js/web/investment/js/investment.js b/js/web/investment/js/investment.js index 48529ff9b..fc00b00c1 100644 --- a/js/web/investment/js/investment.js +++ b/js/web/investment/js/investment.js @@ -410,14 +410,14 @@ let Investment = { removeUnsafeCalc = (InvestmentSettings && InvestmentSettings.removeUnsafeCalc !== undefined) ? InvestmentSettings.removeUnsafeCalc : 0, showinvestmentsautomatically = Settings.GetSetting('ShowInvestments'); - c.push(`

    ${i18n('Boxes.Investment.Overview.AdditionalColumns')}:

    `); - c.push(`

    `); - c.push(`

    `); - c.push(`

    `); - c.push(`

    `); - c.push(`


    `); - c.push(`

    `); - c.push(`


    `); + c.push(`

    ${i18n('Boxes.Investment.Overview.AdditionalColumns')}:


    `); + c.push(`
    `); + c.push(`
    `); + c.push(`
    `); + c.push(`
    `); + c.push(`

    `); + c.push(` `); + c.push(`
    `); c.push(`

    `); $('#InvestmentSettingsBox').html(c.join('')); diff --git a/js/web/market/js/market.js b/js/web/market/js/market.js index 57dd878e1..95e013b71 100644 --- a/js/web/market/js/market.js +++ b/js/web/market/js/market.js @@ -514,8 +514,8 @@ let Market = { let autoOpen = Settings.GetSetting('ShowMarketFilter'); let h = []; - h.push(`


    `); - h.push(`

    `); + h.push(`${i18n('Boxes.General.Export')}: `); + h.push(``); h.push(`

    `); h.push(`

    `); diff --git a/js/web/marketoffers/js/marketoffers.js b/js/web/marketoffers/js/marketoffers.js index be3dc7867..f91703b66 100644 --- a/js/web/marketoffers/js/marketoffers.js +++ b/js/web/marketoffers/js/marketoffers.js @@ -214,8 +214,8 @@ let MarketOffers = { */ ShowSettingsButton: () => { let h = []; - h.push(`

    `); - h.push(`

    `); + h.push(`${i18n('Boxes.General.Export')}: `); + h.push(``); $('#MarketOffersSettingsBox').html(h.join('')); }, diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index a9cc246a8..8b16c6d2e 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -557,19 +557,29 @@ input[id*="ProdPerTile"] { #ItemSourcesBody div { overflow-y: auto; height: 100%; - width: 50%; -} -#ItemSourcesBody > div { - display: flex; - width: 100%; } #ItemSourcesBody img { width: 25px; } -#ItemSourcesBody h2 img { - width:unset; - max-width: 50px; -} #ItemSourcesBody table { width: 100%; -} \ No newline at end of file +} +#ItemSourcesBody td { + background-image: url('../../../../css/images/hud/chevron-down.svg'); + background-size: 20px 20px; + background-position: center right; + background-repeat: no-repeat; +} +#ItemSourcesBody td:hover { + cursor: url('../../../../css/images/cursor_hover.cur'), auto; +} +#ItemSourcesBody .filterTable { + float: right; +} +#ItemSourcesBody .innerTable { + background: var(--text-darker); + margin: 0 -5px; +} +#ItemSourcesBody .innerTable:not(:empty) { + margin-top: 5px; +} diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index cac975f52..45bae6c28 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -382,8 +382,8 @@ let Productions = { let content = Productions.buildTableByType(type) $("#Productions #"+type).html(content) $('.TSinactive').tableSorter() - $('.TSinactive').removeClass('TSinactive') - Productions.filterTable('#Productions .filterCurrentList') + $('.TSinactive').removeClass('TSinactive') + HTML.FilterTable('#Productions .filterCurrentList') } }); @@ -391,7 +391,7 @@ let Productions = { $('.production-tabs').tabslet({ active: Productions.ActiveTab }) $('.TSinactive').tableSorter() $('.TSinactive').removeClass('TSinactive') - Productions.filterTable('#Productions .filterCurrentList') + HTML.FilterTable('#Productions .filterCurrentList') // show a building on the map $('#Productions').on('click', '.foe-table .show-entity', function () { @@ -426,24 +426,6 @@ let Productions = { } }, - filterTable: (selector) => { - $(selector).on('keyup', function (e) { - let filter = $(this).val().toLowerCase() - let table = $(this).parents("table") - if (filter.length >= 2) { - $("tbody tr", table).hide() - $("tbody tr", table).filter(function() { - let foundText = ($(this).text().toLowerCase().indexOf(filter) > -1) - if (foundText) - $(this).show() - }); - } - else { - $("tbody tr", table).show() - } - }); - }, - buildQITable(type) { let table = [], tableGr = [], @@ -773,7 +755,7 @@ let Productions = { table.push('
    `; diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 2fc9683cb..04223edd1 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -25,14 +25,15 @@ FoEproxy.addHandler('CityReconstructionService', 'getDraft', (data, postData) => "__class__": "ReconstructionDraftEntity" })) } - reconstruction.draft = {} + reconstruction.draft = Object.assign({},...data.responseData.map(b=>({[b.entityId]:b}))) + reconstruction.count = {} for (let b of data.responseData) { let id = MainParser.CityMapData[b.entityId].cityentity_id - if (!reconstruction.draft[id]) reconstruction.draft[id] = {placed:0,stored:0} + if (!reconstruction.count[id]) reconstruction.count[id] = {placed:0,stored:0} if (b.position) - reconstruction.draft[id].placed++ + reconstruction.count[id].placed++ else - reconstruction.draft[id].stored++ + reconstruction.count[id].stored++ } reconstruction.showTable() @@ -46,15 +47,16 @@ FoEproxy.addHandler('AutoAidService', 'getStates', (data, postData) => { FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { for (let x of data.requestData[0]) { let id = MainParser.CityMapData[x.entityId].cityentity_id - if (x.position) { - reconstruction.draft[id].placed++ - reconstruction.draft[id].stored-- - } else { - reconstruction.draft[id].placed-- - reconstruction.draft[id].stored++ + if (x.position && !reconstruction.draft[x.entityId].position) { + reconstruction.count[id].placed++ + reconstruction.count[id].stored-- + } else if (!x.position) { + reconstruction.count[id].placed-- + reconstruction.count[id].stored++ } - $('.reconstructionLine[data-meta_id="'+id+'"] td:nth-child(2)').html("x"+reconstruction.draft[id].stored) - if (reconstruction.draft[id].stored > 0) + reconstruction.draft[x.entityId] = x + $('.reconstructionLine[data-meta_id="'+id+'"] td:nth-child(2)').html("x"+reconstruction.count[id].stored) + if (reconstruction.count[id].stored > 0) $('.reconstructionLine[data-meta_id="'+id+'"]').show() else $('.reconstructionLine[data-meta_id="'+id+'"]').hide() @@ -64,6 +66,7 @@ FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { let reconstruction = { draft:null, + count:null, showTable:()=>{ if ( $('#ReconstructionList').length === 0 ) { @@ -92,7 +95,7 @@ let reconstruction = {
    ') table.push('') table.push('') - table.push('') + table.push('') if (!type.includes('att') && !type.includes('def') && type!='items') { table.push('') } else { - table.push('') + table.push('') } table.push('') table.push('') @@ -1919,10 +1901,10 @@ let Productions = { Productions.CalcBody() $(`#ProductionsSettingsBox`).remove() - }, + }, + showItemSources:()=>{ if ( $('#ItemSources').length === 0 ) { - HTML.Box({ id: 'ItemSources', title: i18n('Boxes.ItemSources.Title'), @@ -1931,11 +1913,11 @@ let Productions = { minimize: true, resize: true }); - } + } let temp = Object.assign({},...Object.values(MainParser.CityEntities).filter(b=>b.id[0]=="W").map(x=>({[x.id]:[...JSON.stringify(x).matchAll(/"name":"([^"]*?)"[^()[\]{}]*?"iconAssetName":"([^"]*?)"[^{}]*?"__class__":"GenericReward"/gm)].map(a=>({id:a[2],name:a[1]}))}))) let gl = Object.values(GoodsList).map(g=>g.id) - let items={} + let items = {} for (let [building,list] of Object.entries(temp)) { for (let item of list) { if (gl.includes(item.id)) continue @@ -1946,33 +1928,31 @@ let Productions = { items[item.id] = {name:item.name,buildings:[building],id:item.id} } } - } - + } + h =`
    -
    ' + i18n('Boxes.Productions.ModeGroups') + ' ' + (type=="items" ? ''+i18n('Boxes.ItemSources.Title')+'' : '') + '' + i18n('Boxes.Productions.ModeGroups') + ' ') table.push((typeCurrentSum >= 10000 ? HTML.FormatNumberShort(typeCurrentSum) : HTML.Format(typeCurrentSum))+ "/" + (typeSum >= 10000 ? HTML.FormatNumberShort(typeSum) : HTML.Format(typeSum))) @@ -782,7 +764,7 @@ let Productions = { table.push(''+(type=="items" ? ''+i18n('Boxes.ItemSources.Title')+'' : '')+'
    - + ` - for (let item of Object.values(items)) { - h+=`` - } + for (let item of Object.values(items)) { + h+=`` + } h +=`
    Items
    Items
    ${srcLinks.icons(item.id)} ${item.name}
    ${srcLinks.icons(item.id)} ${item.name}
    -
    -
    -
    - ` + ` $('#ItemSourcesBody').html(h) - $('#ItemSourcesBody .sortable-table').tableSorter() + $('#ItemSourcesBody .sortable-table').tableSorter() + HTML.FilterTable('#ItemSourcesBody .filterTable') }, + updateItemSources:(item)=>{ - h=`

    ${srcLinks.icons(item.id)} ${item.name}:

    ` + h=`
      ` for (b of item.buildings) { - h+=`
    ` + h+=`
  • ${MainParser.CityEntities[b].name}
  • ` } - h+=`
    ${MainParser.CityEntities[b].name}
    ` - $('#ItemSourceBuildings').html(h) + h+=`` + $('#item-'+helper.str.cleanup(item.name)).html(h) }, }; From 2a304a11c81f0e10f1aba774d3312d0b02cb2038 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 17 Nov 2024 20:30:15 +0100 Subject: [PATCH 020/130] GBG player list export: switch to _helper function --- js/web/guildfights/js/guildfights.js | 68 ++++------------------------ 1 file changed, 9 insertions(+), 59 deletions(-) diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 35640ac66..d5b6eed33 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -767,17 +767,15 @@ let GuildFights = { let tNF = (tN * 2) + tF; - t.push(''); + t.push('
    '); t.push(''); t.push(''); - t.push(''); - t.push(''); - t.push(''); - t.push(''); - t.push(''); - t.push(''); + t.push(''); + t.push(''); + t.push(''); + t.push(''); t.push(''); t.push(''); @@ -796,13 +794,10 @@ let GuildFights = { GuildFights.curDetailViewFilter = { content: 'player', player_id: player_id, gbground: gbground }; - if ($('#GildPlayersDetailView').length === 0) - { + if ($('#GildPlayersDetailView').length === 0) { GuildFights.ShowDetailViewBox(GuildFights.curDetailViewFilter); } - else - { - + else { GuildFights.BuildDetailViewContent(GuildFights.curDetailViewFilter); } }); @@ -1578,15 +1573,14 @@ let GuildFights = { c.push(`

    `); c.push(`

    `); c.push(`

    `); - c.push(`

    ${i18n('Boxes.General.Export')}: `); - c.push(`

    `); + c.push(`

    ${i18n('Boxes.General.Export')}: `); + c.push(`

    `); $('#GildPlayersSettingsBox').html(c.join('')); }, PlayerBoxSettingsSaveValues: () => { - GuildFights.PlayerBoxSettings.showRoundSelector = $("#gf_showRoundSelector").is(':checked') ? 1 : 0; GuildFights.PlayerBoxSettings.showProgressFilter = $("#gf_showProgressFilter").is(':checked') ? 1 : 0; GuildFights.PlayerBoxSettings.showLogButton = $("#gf_showLogButton").is(':checked') ? 1 : 0; @@ -1595,51 +1589,7 @@ let GuildFights = { $(`#GildPlayersSettingsBox`).fadeToggle('fast', function () { $(this).remove(); - GuildFights.BuildPlayerContent(GuildFights.CurrentGBGRound); - - }); - - }, - - - SettingsExport: (type) => { - - let blob, file; - let BOM = "\uFEFF"; - - if (type === 'json') { - let json = JSON.stringify(GuildFights.PlayerBoxContent); - - blob = new Blob([BOM + json], { - type: 'application/json;charset=utf-8' - }); - file = `ggfights-${ExtWorld}.json`; - } - - else if (type === 'csv') { - let csv = []; - - for (let i in GuildFights.PlayerBoxContent) { - if (!GuildFights.PlayerBoxContent.hasOwnProperty(i)) { - break; - } - - let r = GuildFights.PlayerBoxContent[i]; - console.log(r); - csv.push(`${r['player_id']};${r['player']};${r['negotiationsWon']};${r['battlesWon']};${r['attrition']};${r['total']}`); - } - - blob = new Blob([BOM + csv.join('\r\n')], { - type: 'text/csv;charset=utf-8' - }); - file = `ggfights-${ExtWorld}.csv`; - } - - MainParser.ExportFile(blob, file); - - $(`#GildPlayersSettingsBox`).fadeToggle('fast', function () { - $(this).remove(); }); }, From 104919656b682acd1acc86ce3ed1ff87372de752 Mon Sep 17 00:00:00 2001 From: Daniel Siekiera Date: Mon, 18 Nov 2024 09:45:06 +0100 Subject: [PATCH 021/130] Planner > Added function to draw 1x1 squares for each expansion --- planner/planner.js | 60 ++++++++++++++++++++++++++++++---------------- 1 file changed, 40 insertions(+), 20 deletions(-) diff --git a/planner/planner.js b/planner/planner.js index fb2cd3dd9..91e4fcac5 100644 --- a/planner/planner.js +++ b/planner/planner.js @@ -58,16 +58,16 @@ function drawMap () { let city = Object.values(cityData) mapBuildings = [] - if (mapData != undefined) { + if (mapData !== undefined) { for (let expansion of mapData) { drawExpansion(expansion) } } for (let building of city) { - let buildingData = Object.values(metaData).find(x => x.id == building.cityentity_id) + let buildingData = Object.values(metaData).find(x => x.id === building.cityentity_id) - if (buildingData.type != "off_grid" && buildingData.type != "outpost_ship" && buildingData.type != "friends_tavern" && !buildingData.type.includes("hub")) { + if (buildingData.type !== "off_grid" && buildingData.type !== "outpost_ship" && buildingData.type !== "friends_tavern" && !buildingData.type.includes("hub")) { let newBuilding = new MapBuilding(building, buildingData) mapBuildings.push(newBuilding) newBuilding.draw() @@ -87,8 +87,28 @@ function drawExpansion (expansion) { ctx.fillStyle = '#fffead' ctx.strokeStyle = '#cbca4a' - ctx.fillRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) - ctx.strokeRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) + // ctx.fillRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) + // ctx.strokeRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) + + // draw the 1x1 squares for each expansion + for (let a = 0; a < expansion.length; a++) + { + for (let b = 0; b < expansion.width; b++) + { + createMapGridPart({ + x: ((expansion.x === undefined || isNaN(expansion.x)) ? 0 : expansion.x) + a, + y: (expansion.y === undefined ? 0 : expansion.y) + b + }); + } + } +} + +function createMapGridPart(data) { + let top = data.y * size, + left = data.x * size; + + ctx.fillRect(left, top, size, size); + ctx.strokeRect(left, top, size, size); } class MapBuilding { @@ -106,31 +126,31 @@ class MapBuilding { needsStreet = function() { let needsStreet = this.meta.requirements?.street_connection_level - if (needsStreet == undefined) { + if (needsStreet === undefined) { this.meta.abilities.forEach(ability => { - if (ability.__class__ == "StreetConnectionRequirementComponent") + if (ability.__class__ === "StreetConnectionRequirementComponent") needsStreet = 1 }); - if (this.meta.components?.AllAge?.streetConnectionRequirement != undefined) + if (this.meta.components?.AllAge?.streetConnectionRequirement !== undefined) needsStreet = this.meta.components.AllAge.streetConnectionRequirement.requiredLevel } - return (needsStreet == undefined ? 0 : needsStreet) + return (needsStreet === undefined ? 0 : needsStreet) } setColorByType = function() { let color = '#888' - if (this.meta.type == 'main_building') + if (this.meta.type === 'main_building') color = '#ffb300' - else if (this.meta.type == 'military') + else if (this.meta.type === 'military') color = '#fff' - else if (this.meta.type == 'greatbuilding') + else if (this.meta.type === 'greatbuilding') color = '#e6542f' - else if (this.meta.type == 'residential') + else if (this.meta.type === 'residential') color = '#7abaff' - else if (this.meta.type == 'production') + else if (this.meta.type === 'production') color = '#416dff' - if (this.needsStreet() == 0) + if (this.needsStreet() === 0) color = '#793bc9' return color @@ -206,7 +226,7 @@ class MapBuilding { function redrawMap () { ctx.clearRect(0,0,canvas.width,canvas.height) - if (mapData != undefined) { + if (mapData !== undefined) { for (let expansion of mapData) { drawExpansion(expansion) } @@ -233,18 +253,18 @@ function showStoredBuildings () { // generate amount for (let building of storedBuildings) { - if (building.meta.type == 'street') continue + if (building.meta.type === 'street') continue let amount = buildingsAmount.get(building.meta.id) - if (amount == undefined) + if (amount === undefined) buildingsAmount.set(building.meta.id, 1) else buildingsAmount.set(building.meta.id, ++amount) } buildingsAmount.forEach((amount, buildingId) => { - let building = storedBuildings.find(x => x.meta.id == buildingId) - let noStreet = (building.needsStreet() == 0) ? ' nostreet' : '' + let building = storedBuildings.find(x => x.meta.id === buildingId) + let noStreet = (building.needsStreet() === 0) ? ' nostreet' : '' html.push('
  • '+ ''+building.meta.name + ' (' + (building.meta.length || building.meta.components.AllAge.placement.size.y)+'x'+(building.meta.width || building.meta.components.AllAge.placement.size.x) +')' + ''+(amount > 1 ? amount : '')+'
  • ' From bc99b085d073732352cc1c60a04e026eb3a189ff Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 18 Nov 2024 09:09:20 +0000 Subject: [PATCH 022/130] Currently translated at 11.6% (173 of 1488 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/ja/ --- js/web/_i18n/ja.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/web/_i18n/ja.json b/js/web/_i18n/ja.json index 019e5d5d1..61d13be90 100644 --- a/js/web/_i18n/ja.json +++ b/js/web/_i18n/ja.json @@ -180,7 +180,7 @@ "Boxes.Campagne.Resource": "リソースアイテム", "Boxes.Campagne.Reward": "報酬 ", "Boxes.Campagne.Title": "セクターのリソースコスト ", - "Boxes.Castle.AntiqueDealer": "", + "Boxes.Castle.AntiqueDealer": "古物商", "Boxes.Castle.AuctionsWon": "", "Boxes.Castle.Battle": "", "Boxes.Castle.Battles": "", @@ -1093,8 +1093,8 @@ "Boxes.UnitsGex.Won": "", "Boxes.cardGame.Attack": "攻撃", "Boxes.cardGame.Bonus": "ボーナス", - "Boxes.cardGame.WarningCertainDeath": "", - "Boxes.cardGame.WarningPossibleDeath": "", + "Boxes.cardGame.WarningCertainDeath": "このカードをプレイすると負ける!引き直すか、体力回復を買うことを検討しよう!", + "Boxes.cardGame.WarningPossibleDeath": "このカードをプレイすると負けるかもしれない!引き直すか、体力回復を買うことを検討しよう!", "Boxes.doubleFPprevention.Text": "", "Boxes.doubleFPprevention.Title": "", "Boxes.findGB.Title": "", From b90d1d935c4967f7e4c30cdb76d82a49557762f8 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 10:12:31 +0100 Subject: [PATCH 023/130] Efficiency Rating: added building tooltips, result page first --- changelog-de.md | 4 ++ changelog-en.md | 4 ++ js/web/productions/js/productions.js | 61 ++++++++++++++++------------ js/web/qiprogress/css/qiprogress.css | 6 +++ 4 files changed, 48 insertions(+), 27 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index 5c2e20144..6b5f51f21 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -8,6 +8,10 @@ **Update** - Tooltip: Design der Gebäude-Tooltips angepasst +- Gebäude-Effizienz: + - Gebäude-Tooltips hinzugefügt + - Ergebnisseite wird nun zuerst angezeigt + - Itemliste versteckt **BugFix** - Tooltip: diff --git a/changelog-en.md b/changelog-en.md index 625b6564a..4d6d5603b 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -8,6 +8,10 @@ **Update** - Tooltip: made design similar to original FoE tooltips +- Building Efficiency: + - Added building tooltips + - Results will now be shown first + - Item list hidden to make the table less crowded **BugFix** - Tooltip: diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 45bae6c28..986192e48 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -64,7 +64,7 @@ let Productions = { 'generic_building' ], - RatingCurrentTab: 'Settings', + RatingCurrentTab: 'Results', Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), RatingProdPerTiles: {}, @@ -449,7 +449,7 @@ let Productions = { if (building.chainBuilding !== undefined) rowA.push('') rowA.push('') - rowA.push('
    ') + rowA.push('') if (building.boosts !== undefined) { boosts = {} @@ -1177,7 +1177,7 @@ let Productions = { if (production.type == "genericReward") { if (production.resources?.icon.includes("good")) return false let frag = production.resources.subType == "fragment" - allItems += production.resources.amount + "x " + (frag ? "🧩 " : "" ) + production.resources.name + "
    " + allItems += ''+production.resources.amount + "x " + (frag ? "🧩 " : "" ) + production.resources.name + "
    " itemArray.push({fragment:frag,name:production.resources.name,amount:production.resources.amount,random:0}) } }) @@ -1193,7 +1193,7 @@ let Productions = { if (resource.type == "unit") { allUnits += "Ø " + amount + "x " + (frag ? "🧩 " : "" ) + `` + "
    " } else { - allItems += "Ø " + amount + "x " + (frag ? "🧩 " : "" ) + resource.name + "
    " + allItems += "Ø " + amount + "x " + (frag ? "🧩 " : "" ) + resource.name + "
    " itemArray.push({fragment:frag,name:resource.name,amount:0,random:amount}) } } @@ -1205,8 +1205,10 @@ let Productions = { } } if (production.resources?.type == "consumable") { + let itemId = production.resources.id.split('#')[1] + itemId = (itemId == undefined) ? '' : itemId let frag = production.resources.subType == "fragment" - allItems += production.resources.amount + "x " + (frag ? "🧩 " : "" ) + production.resources.name + "
    " + allItems += ``+production.resources.amount + "x " + (frag ? "🧩 " : "" ) + production.resources.name + "
    " itemArray.push({fragment:frag,name:production.resources.name,amount:production.resources.amount,random:0}) } }) @@ -1545,7 +1547,7 @@ let Productions = { h.push('') h.push(''); h.push(''); } - h.push(''); + h.push(''); h.push(''); h.push(''); @@ -1569,7 +1571,7 @@ let Productions = { [randomItems,randomUnits]=Productions.showBuildingItems(false, building.building) h.push(``) h.push('') - h.push('') } } - h.push('') + h.push('') h.push('') } h.push(''); @@ -1672,7 +1674,7 @@ let Productions = { $('#ProductionsRatingBody .overlay .results').html("") let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && x.selected).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) + $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) } foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && !x.selected).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { @@ -1914,30 +1916,17 @@ let Productions = { resize: true }); } - - let temp = Object.assign({},...Object.values(MainParser.CityEntities).filter(b=>b.id[0]=="W").map(x=>({[x.id]:[...JSON.stringify(x).matchAll(/"name":"([^"]*?)"[^()[\]{}]*?"iconAssetName":"([^"]*?)"[^{}]*?"__class__":"GenericReward"/gm)].map(a=>({id:a[2],name:a[1]}))}))) - let gl = Object.values(GoodsList).map(g=>g.id) - let items = {} - for (let [building,list] of Object.entries(temp)) { - for (let item of list) { - if (gl.includes(item.id)) continue - if (["","icon_fragment"].includes(item.id)) continue - if (items[item.id]) { - if (!items[item.id].buildings.includes(building)) items[item.id].buildings.push(building) - } else { - items[item.id] = {name:item.name,buildings:[building],id:item.id} - } - } - } - h =`
    + let items = Productions.buildingItemList() + + h = `
      ' + i18n('Boxes.GuildFights.Player') + ' (' + HTML.Format(tN) + ') (' + HTML.Format(tF) + ')' + i18n('Boxes.GuildFights.Total') + ' (' + HTML.Format(tNF) + ')' + i18n('Boxes.GuildFights.Player') + ' (' + HTML.Format(tN) + ') (' + HTML.Format(tF) + ')' + i18n('Boxes.GuildFights.Total') + ' (' + HTML.Format(tNF) + ')' + i18n('Boxes.GuildFights.Attrition') + ' (' + HTML.Format(tA) + ')' + building.name + '' + building.name + '
    ') h.push('') - h.push('') + h.push('') h.push('') h.push('') h.push('' + i18n('Boxes.ProductionsRating.AddBuilding') + '') @@ -1560,7 +1562,7 @@ let Productions = { h.push(''+(tileRatings?.[type] !== undefined ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type))+''+(tileRatings?.[type] !== undefined ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type))+'Items
    '+Math.round(building.score * 100)+''+building.building.name) + h.push(''+building.building.name) let eraShortName = i18n("Eras."+Technologies.Eras[building.building.eraName]+".short") if (eraShortName != "-") h.push(" ("+i18n("Eras."+Technologies.Eras[building.building.eraName]+".short") +')') @@ -1590,7 +1592,7 @@ let Productions = { h.push(''+randomItems+'
    ` for (let item of Object.values(items)) { - h+=`` + h += `` } h +=`
    Items
    ${srcLinks.icons(item.id)} ${item.name}
    ${srcLinks.icons(item.id)} ${item.name}
    @@ -1947,6 +1936,24 @@ let Productions = { HTML.FilterTable('#ItemSourcesBody .filterTable') }, + buildingItemList: () => { + let temp = Object.assign({},...Object.values(MainParser.CityEntities).filter(b=>b.id[0]=="W").map(x=>({[x.id]:[...JSON.stringify(x).matchAll(/"name":"([^"]*?)"[^()[\]{}]*?"iconAssetName":"([^"]*?)"[^{}]*?"__class__":"GenericReward"/gm)].map(a=>({id:a[2],name:a[1]}))}))) + let gl = Object.values(GoodsList).map(g=>g.id) + let items = {} + for (let [building,list] of Object.entries(temp)) { + for (let item of list) { + if (gl.includes(item.id)) continue + if (["","icon_fragment"].includes(item.id)) continue + if (items[item.id]) { + if (!items[item.id].buildings.includes(building)) items[item.id].buildings.push(building) + } else { + items[item.id] = {name:item.name,buildings:[building],id:item.id} + } + } + } + return items + }, + updateItemSources:(item)=>{ h=`
      ` for (b of item.buildings) { diff --git a/js/web/qiprogress/css/qiprogress.css b/js/web/qiprogress/css/qiprogress.css index 825a7eaf2..a40af1374 100644 --- a/js/web/qiprogress/css/qiprogress.css +++ b/js/web/qiprogress/css/qiprogress.css @@ -28,4 +28,10 @@ #QiProgressPlayerDetails { width: 400px; +} + +#QiProgressPlayerDetails .pname { + padding: 10px 5px; + color: var(--text-bright); + font-size: 1.0rem; } \ No newline at end of file From 3dcc6313b7d97d00c649fc814c998ef9c02e23e7 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Mon, 18 Nov 2024 10:17:37 +0100 Subject: [PATCH 024/130] reconstruction - add page info --- js/web/reconstruction/css/reconstruction.css | 22 +++++- js/web/reconstruction/js/reconstruction.js | 80 +++++++++++++++++--- 2 files changed, 89 insertions(+), 13 deletions(-) diff --git a/js/web/reconstruction/css/reconstruction.css b/js/web/reconstruction/css/reconstruction.css index 9228b9aa4..4114f71c4 100644 --- a/js/web/reconstruction/css/reconstruction.css +++ b/js/web/reconstruction/css/reconstruction.css @@ -14,13 +14,27 @@ #ReconstructionListBody { - overflow-y: auto; + overflow-y: auto; } #ReconstructionList { - height: 400px; + height: 400px; } #ReconstructionListBody td:nth-last-child(2){ - padding-right: 0; - text-align: right; + padding-right: 0; + text-align: right; +} + +#ReconstructionListBody td:nth-child(3){ + text-align: center; +} + +#ReconstructionListBody .sorter-header { + position: sticky; + top: 0px; +} + +#ReconstructionListBody tr.sorter-header th:last-child:before, +#ReconstructionListBody tr.sorter-header th:last-child:after { + left: 5px; } \ No newline at end of file diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 04223edd1..0cf8323c2 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -27,13 +27,21 @@ FoEproxy.addHandler('CityReconstructionService', 'getDraft', (data, postData) => } reconstruction.draft = Object.assign({},...data.responseData.map(b=>({[b.entityId]:b}))) reconstruction.count = {} + reconstruction.pages = { + prod: [], + happ: [], + street: [], + greatbuilding: [], + } for (let b of data.responseData) { let id = MainParser.CityMapData[b.entityId].cityentity_id if (!reconstruction.count[id]) reconstruction.count[id] = {placed:0,stored:0} if (b.position) reconstruction.count[id].placed++ - else + else { reconstruction.count[id].stored++ + if (reconstruction.count[id].stored == 1) reconstruction.pageUpdate(id) + } } reconstruction.showTable() @@ -47,12 +55,21 @@ FoEproxy.addHandler('AutoAidService', 'getStates', (data, postData) => { FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { for (let x of data.requestData[0]) { let id = MainParser.CityMapData[x.entityId].cityentity_id + let pagesUpdated=false if (x.position && !reconstruction.draft[x.entityId].position) { reconstruction.count[id].placed++ reconstruction.count[id].stored-- + if (reconstruction.count[id].stored==0) { + reconstruction.pageUpdate(id) + pagesUpdated=true + } } else if (!x.position) { reconstruction.count[id].placed-- reconstruction.count[id].stored++ + if (reconstruction.count[id].stored==1) { + reconstruction.pageUpdate(id) + pagesUpdated=true + } } reconstruction.draft[x.entityId] = x $('.reconstructionLine[data-meta_id="'+id+'"] td:nth-child(2)').html("x"+reconstruction.count[id].stored) @@ -60,14 +77,58 @@ FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { $('.reconstructionLine[data-meta_id="'+id+'"]').show() else $('.reconstructionLine[data-meta_id="'+id+'"]').hide() - + if (pagesUpdated) reconstruction.updateTable() } }); let reconstruction = { draft:null, count:null, - + pageMapper:{ + "culture":"happ", + "cultural_goods_production":"prod", + "decoration":"happ", + "diplomacy":"happ", + "static_provider":"happ", + "random_production":"prod", + "military":"prod", + "goods":"prod", + "production":"prod", + "residential":"prod", + "tower":"prod", + "clan_power_production":"prod" + }, + pages: null, + rcIcons:{ + happ:srcLinks.get("/shared/gui/reconstructionmenu/rc_icon_happynessbuildings.png",true), + prod:srcLinks.get("/shared/gui/reconstructionmenu/rc_icon_productionbuildings.png",true), + greatbuilding:srcLinks.get("/shared/gui/constructionmenu/icon_greatbuilding.png",true), + street:srcLinks.get("/shared/gui/constructionmenu/icon_street.png",true), + }, + pageUpdate:(id)=>{ + let meta = MainParser.CityEntities[id] + if (["friends_tavern", + "main_building", + "impediment", + "hub_part", + "off_grid", + "greatbuilding", + "outpost_ship", + "hub_main"].includes(meta.type)) return + let page = reconstruction.pageMapper[meta.type]||meta.type + if (reconstruction.count[id]==0) { //remove from pages + reconstruction.pages[page].splice(reconstruction.pages[page].findIndex(id),1) + } else { //add to pages + reconstruction.pages[page].unshift(id) + } + }, + updateTable:()=>{ + for (let [page,list] of Object.entries(reconstruction.pages)) { + for (let i = 0;i`+(Math.floor(i/4)+1)) + } + } + }, showTable:()=>{ if ( $('#ReconstructionList').length === 0 ) { @@ -83,14 +144,13 @@ let reconstruction = { }); } - let icons = (x) => ``; - h =` - + + @@ -101,13 +161,14 @@ let reconstruction = { let length = meta.length||meta.components.AllAge.placement.size.y let road="" if ((meta?.components?.AllAge?.streetConnectionRequirement?.requiredLevel || meta?.requirements?.street_connection_level) == 2) - road = icons("street_required") + road = srcLinks.icons("street_required") else if ((meta?.components?.AllAge.streetConnectionRequirement?.requiredLevel || meta?.requirements?.street_connection_level) == 1) - road = icons("road_required") + road = srcLinks.icons("road_required") h+=` + @@ -117,7 +178,8 @@ let reconstruction = { $('#ReconstructionListBody').html(h) - $('#ReconstructionListBody .sortable-table').tableSorter() + $('#ReconstructionListBody .sortable-table').tableSorter() + setTimeout(reconstruction.updateTable,200) }, } From ac1f716f869e61ec342abb02ad6bdb0cd601cbe6 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 10:33:15 +0100 Subject: [PATCH 025/130] fixed QI Results after season end --- js/web/qiprogress/js/qiprogress.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js index cf3fd7d00..4dba91606 100644 --- a/js/web/qiprogress/js/qiprogress.js +++ b/js/web/qiprogress/js/qiprogress.js @@ -23,6 +23,15 @@ FoEproxy.addHandler('GuildRaidsService', 'getState', (data, postData) => { if (data.responseData.__class__ == 'GuildRaidsRunningState') { QiProgress.CurrentQIRound = data.responseData.endsAt + if (QiProgress.curDateFilter === null || QiProgress.curDateEndFilter === null) { + QiProgress.curDateFilter = moment.unix(QiProgress.CurrentQIRound).subtract(11, 'd').format('YYYYMMDD') + QiProgress.curDateEndFilter = moment.unix(QiProgress.CurrentQIRound).format('YYYYMMDD') + } + } + if (data.responseData.__class__ == 'GuildRaidsPendingState') { + // 259200 = 3 days + QiProgress.CurrentQIRound = data.responseData.startsAt - 259200 + if (QiProgress.curDateFilter === null || QiProgress.curDateEndFilter === null) { QiProgress.curDateFilter = moment.unix(QiProgress.CurrentQIRound).subtract(11, 'd').format('YYYYMMDD') QiProgress.curDateEndFilter = moment.unix(QiProgress.CurrentQIRound).format('YYYYMMDD') @@ -609,6 +618,7 @@ let QiProgress = { progress: d[i].progressContribution || 0 }); } + console.log('history', { participation: players, actions: sumActions, progress: sumProgress }) await QiProgress.UpdateDB('history', { participation: players, actions: sumActions, progress: sumProgress }); From 428204ba5119de449b0565c1daebf629fcc51477 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 10:55:02 +0100 Subject: [PATCH 026/130] item sources: toggle open/close --- js/web/productions/css/productions.css | 7 +++++-- js/web/productions/js/productions.js | 8 +++++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index 8b16c6d2e..ed60d36fb 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -567,9 +567,12 @@ input[id*="ProdPerTile"] { #ItemSourcesBody td { background-image: url('../../../../css/images/hud/chevron-down.svg'); background-size: 20px 20px; - background-position: center right; + background-position: right 5px; background-repeat: no-repeat; } +#ItemSourcesBody td.open { + background-image: url('../../../../css/images/hud/chevron-left.svg'); +} #ItemSourcesBody td:hover { cursor: url('../../../../css/images/cursor_hover.cur'), auto; } @@ -582,4 +585,4 @@ input[id*="ProdPerTile"] { } #ItemSourcesBody .innerTable:not(:empty) { margin-top: 5px; -} +} \ No newline at end of file diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 986192e48..4a2e82608 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1955,11 +1955,17 @@ let Productions = { }, updateItemSources:(item)=>{ + let itemId = '#item-'+helper.str.cleanup(item.name) + $(itemId).parent('td').toggleClass('open') + if ($(itemId).html() != '') { + $(itemId).html('') + return + } h=`
        ` for (b of item.buildings) { h+=`
      • ${MainParser.CityEntities[b].name}
      • ` } h+=`
      ` - $('#item-'+helper.str.cleanup(item.name)).html(h) + $(itemId).html(h) }, }; From 065c216aa9ee6d9dc24a21d6209e5aabdfe3d3ca Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Mon, 18 Nov 2024 11:16:45 +0100 Subject: [PATCH 027/130] reconstruction - add close condition --- js/web/reconstruction/js/reconstruction.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 0cf8323c2..9ebcd3d73 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -51,6 +51,9 @@ FoEproxy.addHandler('CityReconstructionService', 'getDraft', (data, postData) => FoEproxy.addHandler('AutoAidService', 'getStates', (data, postData) => { $('#ReconstructionList').remove() }); +FoEproxy.addHandler('InventoryService', 'getGreatBuildings', (data, postData) => { + $('#ReconstructionList').remove() +}); FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { for (let x of data.requestData[0]) { From 6782f7f974c875e81c29fbc5262c91e65a708cca Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 12:34:15 +0100 Subject: [PATCH 028/130] bugfix: other player efficiency rating era --- changelog-de.md | 2 ++ changelog-en.md | 10 ++++++---- js/web/citymap/js/citymap.js | 6 ++---- js/web/productions/js/productions.js | 13 +++++++------ 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index 6b5f51f21..2404628dd 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -20,6 +20,8 @@ - Umbau-Liste: - Standardhöhe gesetzt - Umplatzieren von Gebäuden verringerte den Zähler +- Gebäude-Effizienz: + - Die Bewertungen bei anderen Spielern haben dein aktuelles Zeitalter genutzt, statt ihr eigenes ##### 3.9.0.0 diff --git a/changelog-en.md b/changelog-en.md index 4d6d5603b..17dd41dce 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -15,11 +15,13 @@ **BugFix** - Tooltip: - - some browsers did not use the correct design - - did sometimes not vanish when a box was closed + - Some browsers did not use the correct design + - Did sometimes not vanish when a box was closed - Reconstruction List: - - set a default height - - moving buildings reduced counter + - Set a default height + - Moving buildings reduced counter +- Building Efficiency: + - Other players ratings were based on your age instead of theirs ##### 3.9.0.0 diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index d4cb8a454..d01354bd5 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -122,7 +122,6 @@ let CityMap = { /** * Stadtkarte vorbereiten => Menü rein - * * @param Title */ PrepareBox: (Title)=> { @@ -235,7 +234,8 @@ let CityMap = { $("#sidebar").append(CityMap.showQIBuildings()) } if (CityMap.IsExtern === true) { - $("#sidebar").append($(''+ i18n('Menu.ProductionsRating.Title') +'')); + let era = CityMap.CityData.find(x => x.type == 'main_building').cityentity_id.split('_')[1] + $("#sidebar").append($(''+ i18n('Menu.ProductionsRating.Title') +'')); } }, @@ -601,7 +601,6 @@ let CityMap = { if (building.eraName) { let era = Technologies.Eras[building.eraName] - f.attr({ title: `${building.name}, ${building.size.length}x${building.size.width}
      ${i18n('Eras.' + (era || 0) )}` }) @@ -648,7 +647,6 @@ let CityMap = { }); $('#grid-outer').draggable(); - CityMap.getAreas(); }, diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 4a2e82608..d89f0dc7f 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1408,8 +1408,9 @@ let Productions = { }, - ShowRating: (external = false) => { + ShowRating: (external = false, eraName = null) => { if (CityMap.IsExtern && !external) return + let era = (eraName == null) ? CurrentEra : eraName if ($('#ProductionsRating').length === 0) { @@ -1447,13 +1448,13 @@ let Productions = { HTML.CloseOpenBox('ProductionsRating'); } - Productions.CalcRatingBody(); + Productions.CalcRatingBody(era); }, //AdditionalBuildings:[], AdditionalSpecialBuildings:null, - CalcRatingBody: () => { + CalcRatingBody: (era = '') => { if (!Productions.AdditionalSpecialBuildings) { let spB = Object.values(MainParser.CityEntities).filter(x=> (x.is_special && !["O_","U_","V_","H_","Y_"].includes(x.id.substring(0,2))) || x.id.substring(0,11)=="W_MultiAge_") Productions.AdditionalSpecialBuildings = {} @@ -1524,7 +1525,7 @@ let Productions = { let selectedAdditionals = Object.values(Productions.AdditionalSpecialBuildings).filter(x=>x.selected).map(x=>x.id); - ratedBuildings = Productions.rateBuildings(uniqueBuildings).concat(Productions.rateBuildings(selectedAdditionals,true)) + ratedBuildings = Productions.rateBuildings(uniqueBuildings,false,era).concat(Productions.rateBuildings(selectedAdditionals,true,era)) ratedBuildings.sort((a, b) => { if (a.score < b.score) return -1 @@ -1674,11 +1675,11 @@ let Productions = { $('#ProductionsRatingBody .overlay .results').html("") let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && x.selected).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
    • ${building.name}
    • `) + $('#ProductionsRatingBody .overlay .results').append(`
    • ${building.name}
    • `) } foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && !x.selected).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
    • ${building.name}
    • `) + $('#ProductionsRatingBody .overlay .results').append(`
    • ${building.name}
    • `) } } filterMeta(/./) From dc38900716fe2b25787ef267e65c16b55abcd2c5 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 12:37:36 +0100 Subject: [PATCH 029/130] tooltips: visual bugfix --- js/web/customTooltip/css/customTooltip.css | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/customTooltip/css/customTooltip.css b/js/web/customTooltip/css/customTooltip.css index de70c11be..1cebafb9f 100644 --- a/js/web/customTooltip/css/customTooltip.css +++ b/js/web/customTooltip/css/customTooltip.css @@ -52,6 +52,7 @@ .HXBuilding img { padding-right: 3px; max-width: 24px; + max-height: 25px; } .HXBuilding .multiCol { flex-wrap: wrap; From bf64aeb57b09c9487b7a1a95c97243004443bd2d Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 13:08:59 +0100 Subject: [PATCH 030/130] #3057 --- js/web/citymap/js/citymap.js | 19 +++++++++++++++++-- js/web/productions/js/productions.js | 6 +++--- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index d01354bd5..d4d54c7dc 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -1345,6 +1345,20 @@ let CityMap = { return false }, + isBoostableBuilding(metaData) { + if (metaData.type == 'greatbuilding' || metaData.type == 'main_building') { + return false + } + else if (metaData.id.includes('CastleSystem')) { + return false + } + // wishingwell types + else if (metaData.id.includes("L_AllAge_EasterBonus1") || metaData.id.includes("L_AllAge_Expedition16") || metaData.id.includes("L_AllAge_ShahBonus17")) { + return false + } + return true + }, + // returns undefined or time the building was built setBuildTime(data) { if (data.type == "generic_building") @@ -2131,6 +2145,7 @@ let CityMap = { eraName: ((data.cityentity_id||metaData.id).includes("CastleSystem") ? CurrentEra : era), isSpecial: this.isSpecialBuilding(metaData), isLimited: this.isLimitedBuilding(metaData), + isBoostable: this.isBoostableBuilding(metaData), chainBuilding: this.setChainBuilding(metaData), setBuilding: this.setSetBuilding(metaData), size: this.setSize(metaData), @@ -2157,8 +2172,8 @@ let CityMap = { } } - //if (entity.entityId != "street") - // console.log('entity ', entity.name, entity, metaData, data) + if (entity.entityId != "street") + console.log('entity ', entity.name, entity, metaData, data) return entity }, }; diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index d89f0dc7f..eddf3fcba 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -580,15 +580,15 @@ let Productions = { hasRandomProductions = productionByCategoryFalse.hasRandomProductions let doubled = productionByCategoryFalse.doubleWhenMotivated - if (type == 'money' && building.type != "greatbuilding" && building.type != "main_building") { + if (type == 'money' && building.isBoostable) { amount = Math.round(amount + (amount * ((MainParser.BoostSums.coin_production + (Productions.HappinessBoost * 100)) / 100))) * (doubled ? 2 : 1) currentAmount = Math.round(currentAmount + (currentAmount * ((MainParser.BoostSums.coin_production + (Productions.HappinessBoost * 100)) / 100))) } - else if (type == 'supplies' && building.type != "greatbuilding") { + else if (type == 'supplies' && building.isBoostable) { amount = Math.round(amount + (amount * ((MainParser.BoostSums.supply_production + (Productions.HappinessBoost * 100)) / 100))) * (doubled ? 2 : 1) currentAmount = Math.round(currentAmount + (currentAmount *((MainParser.BoostSums.supply_production + (Productions.HappinessBoost * 100)) / 100))) } - else if (type == 'strategy_points' && building.type != "greatbuilding" && building.type != "main_building" && !building.entityId.includes("CastleSystem")) { + else if (type == 'strategy_points' && building.isBoostable) { amount = Math.round(amount + (amount *((MainParser.BoostSums.forge_points_production) / 100))) currentAmount = Math.round(currentAmount + (currentAmount *((MainParser.BoostSums.forge_points_production) / 100))) } From 1056879550e2490e022f9e88ef05c2a5e8fc5536 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 18 Nov 2024 22:07:27 +0100 Subject: [PATCH 031/130] set height for itemsources --- js/web/productions/css/productions.css | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index ed60d36fb..faa0f47af 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -554,6 +554,9 @@ input[id*="ProdPerTile"] { #ProductionsRating #ProductionsRatingBody span.resicon.goods-previous { background-position: -524px 2px; } +#ItemSources { + height: 500px; +} #ItemSourcesBody div { overflow-y: auto; height: 100%; From 31769c7bf7e2a6e9d740b05c234103225af62702 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Mon, 18 Nov 2024 22:50:00 +0100 Subject: [PATCH 032/130] efficiency - include ally info in building tooltip --- js/web/_main/js/_main.js | 29 ++++++++++++++++---- js/web/customTooltip/css/customTooltip.css | 1 + js/web/customTooltip/js/customTooltip.js | 32 ++++++++++++++++++---- 3 files changed, 52 insertions(+), 10 deletions(-) diff --git a/js/web/_main/js/_main.js b/js/web/_main/js/_main.js index e686ef9ae..537213616 100644 --- a/js/web/_main/js/_main.js +++ b/js/web/_main/js/_main.js @@ -1484,7 +1484,7 @@ let MainParser = { MainParser.Allies.names = Object.assign({}, ...rawStats.map(a=>({[a.id]:a.name}))) }, getProd:(CityMapId) => { - let M= MainParser.Allies + let M = MainParser.Allies if (!M.buildingList?.[CityMapId]) return null let prod={} Object.values(M.buildingList[CityMapId]).forEach(id=> { @@ -1502,13 +1502,32 @@ let MainParser = { }, tooltip:(id)=>{ if (!MainParser.Allies.buildingList?.[id]) return "" - return `data-original-title ="` + Object.keys(MainParser.Allies.buildingList[id]).map(a=> { - ally=MainParser.Allies.allyList[a] - return `` + MainParser.Allies.names[ally.allyId] + " (" + i18n("Boxes.Productions.AllyRarity."+ally.rarity.value) + " - " + i18n("General.Level") + " " + ally.level + ")" - }).join("
      ") + `"` + return `data-allies ="${JSON.stringify(Object.values(MainParser.Allies.buildingList[id]))}"` }, setRarities:(raw)=>{ MainParser.Allies.rarities=Object.assign({}, ...raw.map(r=>({[r.id.value]:r}))) + }, + getAllieData:(id)=>{ + ally={ + id:id, + allyId:MainParser.Allies.allyList[id].allyId, + rarity:MainParser.Allies.allyList[id].rarity.value, + level:MainParser.Allies.allyList[id].level, + name:MainParser.Allies.names[MainParser.Allies.allyList[id].allyId], + } + let prod = {} + let stat = MainParser.Allies.stats[ally.allyId][ally.rarity][ally.level] + let type = "military" + for (let s of Object.keys(stat)) { // ToDo: check stats to change type whenever implemented + if (s=="level") continue + if (prod[s]) + prod[s].concat(stat[s]) + else + prod[s]=stat[s] + } + ally.prod = prod + ally.type = type + return ally } }, diff --git a/js/web/customTooltip/css/customTooltip.css b/js/web/customTooltip/css/customTooltip.css index de70c11be..fc2be2592 100644 --- a/js/web/customTooltip/css/customTooltip.css +++ b/js/web/customTooltip/css/customTooltip.css @@ -52,6 +52,7 @@ .HXBuilding img { padding-right: 3px; max-width: 24px; + max-height: 24px; } .HXBuilding .multiCol { flex-wrap: wrap; diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index f4cacc7ff..09ca6f836 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -93,13 +93,16 @@ let Tooltips = { let era = e?.currentTarget?.dataset?.era||Technologies.InnoEraNames[MainParser?.CityMapData[e?.currentTarget?.dataset?.id]?.level] let meta = MainParser.CityEntities[id] + let allies = JSON.parse(e?.currentTarget?.dataset?.allies||"null") + let eff = Math.round(e?.currentTarget?.previousElementSibling?.dataset?.number) + if (!eff && era) eff=Math.round(100 * Productions.rateBuildings([id],true,era)?.[0]?.score||0) let h = `
      -

      ${meta.name} ${era ? `(${i18n("Boxes.Kits.Efficiency")}: ${Math.round(100 * Productions.rateBuildings([id],true,era)[0].score||0)})`:''}

      +

      ${meta.name} ${eff ? `(${i18n("Boxes.Kits.Efficiency")}: ${eff})`:''}

      ${i18n('Boxes.CityMap.Building')} #${icons("road_required")}?${srcLinks.icons("icon_copy")}${srcLinks.icons("road_required")}?
      `+ `
      `; - h += Tooltips.BuildingData(meta,era); + h += Tooltips.BuildingData(meta,era,allies); h += "
      " setTimeout(()=>{ $(".handleOverflow").each((index,e)=>{ @@ -112,7 +115,11 @@ let Tooltips = { },100) return h }, - BuildingData:(meta,onlyEra=null)=>{ + BuildingData:(meta,onlyEra=null,allies=null)=>{ + if (onlyEra && Array.isArray(onlyEra)) { + allies = [].concat(onlyEra) + onlyEra = null + } let numberWithCommas = (x) => { if (!x) return "" return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ","); @@ -221,8 +228,23 @@ let Tooltips = { traits += `
    ◄ ${i18n("Boxes.Tooltip.Building.addInhabitant")} (${capFirsts(a.action.animationId)})
    '+srcLinks.icons("historical_allies_slot_tooltip_icon_empty") + capFirsts(r.allyType) + (r.rarity?.value ? (" ("+capFirsts(r.rarity?.value)+")"):"")+`
    ${srcLinks.icons("historical_allies_slot_tooltip_icon_" + (allydata ? "full" :"empty"))}
    ${capFirsts(r.allyType) + (r.rarity?.value ? (" ("+i18n("Boxes.Productions.AllyRarity."+r.rarity?.value)+")"):"")}` + if (allydata) { + ally+=`
    ${MainParser.Allies.names[allydata.allyId]} (${i18n("Boxes.Productions.AllyRarity."+allydata.rarity)} - ${i18n("General.Level")} ${allydata.level})` + //productions: + for (b of allydata.prod.boosts||[]) { + ally+=`
    ${srcLinks.icons(b.type+feature[b.targetedFeature])} ${b.value + percent(b.type)}` + } + + } + ally+=`
    ') h.push('') - h.push('') + h.push('') h.push('') h.push('') h.push('' + i18n('Boxes.ProductionsRating.AddBuilding') + '') @@ -1563,7 +1563,7 @@ let Productions = { h.push(''+(tileRatings?.[type] !== undefined ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type))+''+(tileRatings?.[type] !== undefined ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type))+'Items
    '+randomItems+'
    '); h.push(''); From a612ba5510674bba497ba9fcb9ef8ad05e9f3432 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 11:39:04 +0100 Subject: [PATCH 039/130] hidden rewards - style changes for warning --- js/web/hidden-rewards/css/hidden-rewards.css | 3 +++ js/web/hidden-rewards/js/hidden-rewards.js | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/js/web/hidden-rewards/css/hidden-rewards.css b/js/web/hidden-rewards/css/hidden-rewards.css index fc5ef9166..f79c5adbd 100644 --- a/js/web/hidden-rewards/css/hidden-rewards.css +++ b/js/web/hidden-rewards/css/hidden-rewards.css @@ -72,3 +72,6 @@ td[title="incident_rhino"], td[title="incident_castaway"], td[title="incident_fi padding: 5px; text-align: center; } +#HiddenRewardBox .dark-bg { + border: 2px solid var(--text-bright); +} diff --git a/js/web/hidden-rewards/js/hidden-rewards.js b/js/web/hidden-rewards/js/hidden-rewards.js index 873982936..e94161051 100644 --- a/js/web/hidden-rewards/js/hidden-rewards.js +++ b/js/web/hidden-rewards/js/hidden-rewards.js @@ -184,7 +184,7 @@ let HiddenRewards = { let twolane = 0 < [...new Set(Object.values(MainParser.CityMapData).filter(x=>x.type=="street").map(x=>x.cityentity_id))].filter(x=>MainParser.CityEntities[x].requirements.street_connection_level == 2).length let warning = HiddenRewards.FilteredCache.filter(x=>x.twolane).length > 0 && !twolane if (warning) { - h.push(`
    ${i18n("Boxes.HiddenRewards.twolaneWarning")}
    `) + h.push(`
    ${i18n("Boxes.HiddenRewards.twolaneWarning")}
    `) } h.push('
    '); From 9cbc2a65857eeb2f9d2d5f6ed252633127421841 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 13:58:49 +0100 Subject: [PATCH 040/130] citymap - fix QI bonus actions --- js/web/citymap/js/citymap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index d4d54c7dc..1196fa7ed 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -400,7 +400,7 @@ let CityMap = { att_def_boost_attacker += boost.value if (boost.type === "att_def_boost_defender") att_def_boost_defender += boost.value - if (boost.type === "guild_raids_action_points_collection" && b.state.constructionFinishedAt < now) + if (boost.type === "guild_raids_action_points_collection" && !b.state.pausedAt) actions += boost.value } } From 2323437c5b2791d5aca56d003eb71a89bbdef289 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 14:23:54 +0100 Subject: [PATCH 041/130] gex attempts - better timer? --- js/web/gexstat/js/gexstat.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/web/gexstat/js/gexstat.js b/js/web/gexstat/js/gexstat.js index fc9269da6..b6ae09bca 100644 --- a/js/web/gexstat/js/gexstat.js +++ b/js/web/gexstat/js/gexstat.js @@ -1097,7 +1097,8 @@ let GExAttempts = { } else { let amount = Math.floor((moment().unix() - GExAttempts.last + 100)/3600) GExAttempts.setCount(Math.min(GExAttempts.count + amount,8)) - GExAttempts.last = moment().unix() + GExAttempts.last += 3600*amount + timer = (GExAttempts.last - moment().unix() + 3600)*1000 } if (GExAttempts.next) clearTimeout(GExAttempts.next) From 48f38507d8180ddceeb1ed5579ed29478d066709 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 14:43:12 +0100 Subject: [PATCH 042/130] citymap - remove left over code --- js/web/citymap/js/citymap.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index 1196fa7ed..64927c0ff 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -388,7 +388,6 @@ let CityMap = { else euphoriaBoost = 1.5 - let now = MainParser.getCurrentDateTime()/1000 for (let b of buildings) { let building = CityMap.setQIBuilding(MainParser.CityEntities[b.cityentity_id]) if (building.type !== "impediment" && building.type !== "street") { From d9355add0ec846be3d5ec59bf54772a16d4e3201 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Wed, 20 Nov 2024 15:28:01 +0100 Subject: [PATCH 043/130] added player_id to data export --- js/web/guildfights/js/guildfights.js | 5 +++-- js/web/qiprogress/js/qiprogress.js | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index d5b6eed33..bdfe60ee7 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -724,10 +724,10 @@ let GuildFights = { tA += playerNew['attrition'] b.push(''); - b.push(''); + b.push(''); + b.push(''); b.push(''); - b.push(''); b.push(''); t.push(''); + t.push(''); t.push(''); t.push(''); t.push(''); diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js index 4dba91606..19fa74fde 100644 --- a/js/web/qiprogress/js/qiprogress.js +++ b/js/web/qiprogress/js/qiprogress.js @@ -200,6 +200,7 @@ let QiProgress = { tP += playerNew.progress; b.push(''); + b.push(''); b.push(''); b.push(''); b.push(''); @@ -218,6 +219,7 @@ let QiProgress = { t.push('
    ' + (parseInt(i) + 1) + '.' + playerNew.player_id + '.' + (parseInt(i) + 1) + '.' + playerNew['name'] + ''); b.push(playerNew['negotiationsWon'] + negotaionAddOn); @@ -772,6 +772,7 @@ let GuildFights = { t.push('
    ' + i18n('Boxes.GuildFights.Player') + ' (' + HTML.Format(tN) + ') (' + HTML.Format(tF) + ')
    ' + playerNew.player_id + '' + (parseInt(i) + 1) + '.' + playerNew.name + '
    '); t.push(''); t.push(''); + t.push(''); t.push(''); t.push(''); t.push(''); From 8aaa0c555b78a52587f9136de2b1444658269576 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 20 Nov 2024 16:21:13 +0100 Subject: [PATCH 044/130] citymap - more fix for QI actions --- js/web/citymap/js/citymap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index 64927c0ff..1c770139d 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -399,7 +399,7 @@ let CityMap = { att_def_boost_attacker += boost.value if (boost.type === "att_def_boost_defender") att_def_boost_defender += boost.value - if (boost.type === "guild_raids_action_points_collection" && !b.state.pausedAt) + if (boost.type === "guild_raids_action_points_collection" && !b.state.pausedAt && b.__class__ != "ConstructionState") actions += boost.value } } From 1150730665a6cf5fd0878855b790acde98afdee4 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Thu, 21 Nov 2024 11:30:31 +0100 Subject: [PATCH 045/130] incidents css --- js/web/hidden-rewards/css/hidden-rewards.css | 69 +++++++++++++++----- js/web/hidden-rewards/js/hidden-rewards.js | 1 + 2 files changed, 53 insertions(+), 17 deletions(-) diff --git a/js/web/hidden-rewards/css/hidden-rewards.css b/js/web/hidden-rewards/css/hidden-rewards.css index f79c5adbd..ecdc90045 100644 --- a/js/web/hidden-rewards/css/hidden-rewards.css +++ b/js/web/hidden-rewards/css/hidden-rewards.css @@ -11,9 +11,11 @@ * ************************************************************************************** */ - #HiddenRewardBox { +#HiddenRewardBox { top: 30%; left: 30px; + height: 400px; + width: 350px; } #HiddenRewardBox img { @@ -22,16 +24,15 @@ max-width: 3.5em; max-height: 2.5em; } + #HiddenRewardBox #HiddenRewardBoxBody { - max-height: 400px; - min-width: 350px; - overflow: hidden; - overflow-y: auto; + overflow: hidden; + overflow-y: auto; } #HiddenRewardBox table td.incident { vertical-align: middle; - text-align: center; + text-align: center; min-height: 30px; } @@ -40,25 +41,59 @@ color: var(--text-bright); } -td[title="incident_sos"], td[title="incident_beach_gear"], td[title="incident_shipwreck"], td[title="incident_flotsam"] { - background: linear-gradient(to top right, #20423f, 15%, #20423f, 35%, #d4ab70, 65%, #d4ab70); +td[title="incident_sos"], +td[title="incident_beach_gear"], +td[title="incident_shipwreck"], +td[title="incident_flotsam"] { + background: linear-gradient(to top right, #20423f, 15%, #20423f, 35%, #d4ab70, 65%, #d4ab70); } td[title="incident_sos"] img { filter: drop-shadow(1px 1px 3px white); } -td[title="incident_fallen_tree_1x1"], td[title="incident_blocked_road_1x1"], td[title="incident_blocked_road_2x2"], td[title="incident_fallen_tree_2x2"], td[title="incident_pothole_1x1"], td[title="incident_pothole_2x2"] { - background-color: #818272; +td[title="incident_fallen_tree_1x1"], +td[title="incident_blocked_road_1x1"], +td[title="incident_blocked_road_2x2"], +td[title="incident_fallen_tree_2x2"], +td[title="incident_pothole_1x1"], +td[title="incident_pothole_2x2"] { + background-color: #818272; } -td[title="incident_sculptor"],td[title="incident_chest"],td[title="incident_hero"], td[title="incident_beehive"], td[title="incident_crates"], td[title="incident_broken_cart"], td[title="incident_car_accident"], td[title="incident_clothesline"], td[title="incident_dinosaur_bones"], td[title="incident_empty_clothesline"], td[title="incident_fruit_vendor"], td[title="incident_kite"], td[title="incident_mammoth_bones"], td[title="incident_musician"], td[title="incident_overgrowth"], td[title="incident_quicksand"], td[title="incident_statue"], td[title="incident_stick_hut"], td[title="incident_treasure_chest"], td[title="incident_wine_cask"], td[title="spring_cherry_tree"], td[title="ages_birthday_gift_1"], td[title="ages_birthday_gift_2"], td[title="ages_birthday_gift_3"] { - background-color: #5d6324; +td[title="incident_sculptor"], +td[title="incident_chest"], +td[title="incident_hero"], +td[title="incident_beehive"], +td[title="incident_crates"], +td[title="incident_broken_cart"], +td[title="incident_car_accident"], +td[title="incident_clothesline"], +td[title="incident_dinosaur_bones"], +td[title="incident_empty_clothesline"], +td[title="incident_fruit_vendor"], +td[title="incident_kite"], +td[title="incident_mammoth_bones"], +td[title="incident_musician"], +td[title="incident_overgrowth"], +td[title="incident_quicksand"], +td[title="incident_statue"], +td[title="incident_stick_hut"], +td[title="incident_treasure_chest"], +td[title="incident_wine_cask"], +td[title="spring_cherry_tree"], +td[title="ages_birthday_gift_1"], +td[title="ages_birthday_gift_2"], +td[title="ages_birthday_gift_3"] { + background-color: #5d6324; } -td[title="incident_rhino"], td[title="incident_castaway"], td[title="incident_fisherman"], td[title="incident_floating_chest"] { - background-color: #20423f; +td[title="incident_rhino"], +td[title="incident_castaway"], +td[title="incident_fisherman"], +td[title="incident_floating_chest"] { + background-color: #20423f; } #HiddenRewardBox tr.unavailable { @@ -68,10 +103,10 @@ td[title="incident_rhino"], td[title="incident_castaway"], td[title="incident_fi #HiddenRewardBox .warning { color: var(--text-bright); - max-width: 380px; padding: 5px; text-align: center; } + #HiddenRewardBox .dark-bg { - border: 2px solid var(--text-bright); -} + border-bottom: 1px solid var(--text-bright); +} \ No newline at end of file diff --git a/js/web/hidden-rewards/js/hidden-rewards.js b/js/web/hidden-rewards/js/hidden-rewards.js index e94161051..947e00ce5 100644 --- a/js/web/hidden-rewards/js/hidden-rewards.js +++ b/js/web/hidden-rewards/js/hidden-rewards.js @@ -68,6 +68,7 @@ let HiddenRewards = { 'auto_close': true, 'dragdrop': true, 'minimize': true, + 'resize': true, 'settings': 'HiddenRewards.ShowSettingsButton()' }); From 1b8b023d96be082d37578c9cb30a6bb02a09cfe5 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 21 Nov 2024 21:44:45 +0100 Subject: [PATCH 046/130] _helper - HTML.ExportTabel - remove thousand separator in cvs --- js/web/_helper/js/_helper.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/_helper/js/_helper.js b/js/web/_helper/js/_helper.js index 9807c80cf..1d236e6e5 100644 --- a/js/web/_helper/js/_helper.js +++ b/js/web/_helper/js/_helper.js @@ -971,7 +971,7 @@ let HTML = { let CurrentCell = DataRow[ValidColumnNames[j]]; if (CurrentCell !== undefined) { if ($.isNumeric(CurrentCell)) { - CurrentCells.push(Number(CurrentCell).toLocaleString(i18n('Local'))); + CurrentCells.push(Number(CurrentCell).toLocaleString(i18n('Local'),{useGrouping:false})); } else { CurrentCells.push(CurrentCell); From 8013075676dbbf682256c8ecf7307f41a468519d Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 21 Nov 2024 23:14:29 +0000 Subject: [PATCH 047/130] Currently translated at 100.0% (1519 of 1519 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index cf81b146d..de9fdeddc 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -1441,7 +1441,7 @@ "Settings.LoadBeta.Desc": "Uniquement disponible dans l'extension séparée !!!
    Il a à télécharger et à ajouter manuellement aux extensions.
    Elle ne peut pas être utilisée conjointement avec l'extension Helper habituelle !

    Dans la version bêta, les erreurs sont plus susceptibles de se produire que dans la version publiée ! Veuillez nous informer de tout bogue trouvé sur Discord ou Github !
    Les temps de chargement de l'extension peuvent être plus longs que d'habitude !
    Le jeu doit être rechargé pour changer de mode !", "Settings.LoadBeta.Title": "Charger la version Beta actuelle", "Settings.LoadBeta2.Button": "Charger la version Beta", - "Settings.LoadBeta2.Desc": "L'extension bêta doit être installée et mise à jour manuellement. Soit cliquez régulièrement sur le bouton ci-dessous pour télécharger la version bêta actuelle, soit utilisez un Git-Manager>

    Décompressez le zip téléchargé et dans les paramètres de l'extension Chrome, activez le mode développeur pour « charger l'extension décompressée ».

    Une seule version du Helper doit être active à tout moment pour éviter les interférences !", + "Settings.LoadBeta2.Desc": "L'extension bêta doit être installée et mise à jour manuellement. Soit cliquez régulièrement sur le bouton ci-dessous pour télécharger la version bêta actuelle, soit utilisez un Git-Manager

    Décompressez le zip téléchargé et dans les paramètres de l'extension Chrome, activez le mode développeur pour « charger l'extension décompressée ».

    Une seule version du Helper doit être active à tout moment pour éviter les interférences !", "Settings.LoadBeta2.Title": "Charger la version Beta actuelle", "Settings.MenuContent.Desc": "Quels boutons voulez-vous dans le menu ?
    Vert : afficher le bouton. Rouge : masquer le bouton.", "Settings.MenuContent.Title": "Contenu du menu", From 73214ffc87dddb1434c157ec0eeedfeb1469beec Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 22 Nov 2024 11:25:43 +0100 Subject: [PATCH 048/130] Productions: added FP boost table --- css/web/boxes.css | 5 ++ js/web/citymap/js/citymap.js | 4 +- js/web/productions/css/productions.css | 3 ++ js/web/productions/js/productions.js | 67 +++++++++++--------------- 4 files changed, 38 insertions(+), 41 deletions(-) diff --git a/css/web/boxes.css b/css/web/boxes.css index 8f3bfd4ca..0432dcbb9 100644 --- a/css/web/boxes.css +++ b/css/web/boxes.css @@ -187,6 +187,11 @@ a[target="_blank"] svg { outline: none !important; } +.btn-default a { + color: inherit; + text-decoration: inherit; +} + .btn-default[disabled], .btn-default[disabled]:hover { filter: saturate(10%) brightness(80%); } diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index 1c770139d..691423033 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -2171,8 +2171,8 @@ let CityMap = { } } - if (entity.entityId != "street") - console.log('entity ', entity.name, entity, metaData, data) + //if (entity.entityId != "street") + // console.log('entity ', entity.name, entity, metaData, data) return entity }, }; diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index 717d0e668..b7b192651 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -118,6 +118,9 @@ #Productions #ProductionsBody .tabs ul li a span, #Productions th.boost span { background: transparent url('../images/productions.png') -233px 2px no-repeat; } +#Productions #ProductionsBody .tabs ul li.forge_points_production { + display: none; +} #Productions th.boost span { height: 25px; display: block; diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 1acfd52c3..fa969800d 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -26,6 +26,7 @@ let Productions = { Types: [ 'strategy_points', // Forge Points + 'forge_points_production', // FP Boost 'goods', // Goods and special goods 'items', // Fragments, blueprints, boosts etc 'money', // Coins @@ -375,16 +376,18 @@ let Productions = { $("#Productions #"+type).html(firstTabContent) // fill other tables on demand - $('.production-tabs li').click(function() { + $('.production-tabs li, #Productions .typeBoost').click(function() { let type = $("a", this).attr("href").replace("#","") if ($("#Productions #"+type).html().length === 0) { let content = Productions.buildTableByType(type) $("#Productions #"+type).html(content) - $('.TSinactive').tableSorter() + $('.TSinactive').tableSorter() $('.TSinactive').removeClass('TSinactive') HTML.FilterTable('#Productions .filterCurrentList') } + $("#Productions .content").css('display','none') + $("#Productions #"+type).css('display','block') }); // extra functionality @@ -430,13 +433,9 @@ let Productions = { let table = [], tableGr = [], rowA = [], - groupedBuildings = [], boostCounter = {}, - typeSum = 0, - amount = 0, boosts = {}, - buildingIds = Productions.BuildingsProducts[type], - Sum = {} + buildingIds = Productions.BuildingsProducts[type] buildingIds.forEach(b => { let building = CityMap.getBuildingById(b.id) @@ -475,20 +474,6 @@ let Productions = { } } } - /* - let updateGroup = groupedBuildings.find(x => x.building.name == building.name) - if (updateGroup == undefined) { - groupedBuildings.push({ - building: building, - amount: 1, - values: amount, - boosts: boosts, - }) - } - else { - updateGroup.amount++ - updateGroup.values += amount - }*/ rowA.push('
    ') rowA.push('') } else { @@ -1078,7 +1064,7 @@ let Productions = { let prod = { amount: 0, type: null, // units - units:[], + units: [], hasRandomProductions: false, doubleWhenMotivated: false } @@ -1164,6 +1150,9 @@ let Productions = { if (category == "goods") { return CityMap.getBuildingGoodsByEra(current, building) } + if (category == "forge_points_production") { + prod.amount = building.boosts.filter(x => x.type[0] == category)[0].value // not really rock solid like this + } return prod }, @@ -1261,7 +1250,7 @@ let Productions = { // ab dem zweiten Eintrag verstecken let style = Productions.TabsContent.length > 0 ? ' style="display:none"' : ''; - Productions.TabsContent.push('
    ' + content + '
    '); + Productions.TabsContent.push('
    ' + content + '
    '); }, /** From 7dfa9b6fd5cee1aabcd988f61eaf5e4714091873 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 22 Nov 2024 11:59:23 +0100 Subject: [PATCH 049/130] gexattempts - fix number in GUI not vanishing when finishing GE --- js/web/gexstat/js/gexstat.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/js/web/gexstat/js/gexstat.js b/js/web/gexstat/js/gexstat.js index b6ae09bca..0f5fbb34a 100644 --- a/js/web/gexstat/js/gexstat.js +++ b/js/web/gexstat/js/gexstat.js @@ -1034,7 +1034,14 @@ FoEproxy.addHandler('GuildExpeditionService', 'getOverview', (data, postData) => FoEproxy.addHandler('GuildExpeditionNotificationService', 'GuildExpeditionStateNotification', (data, postData) => { if (data.responseData) GExAttempts.updateState(data.responseData) }); - +FoEproxy.addHandler('GuildExpeditionService', 'getState', (data, postData) => { + for (let x of data.responseData) { + if (!x.currentEntityId) continue; + GExAttempts.state.GEprogress = x.currentEntityId; + localStorage.setItem('GEx.state',JSON.stringify(GExAttempts.state)) + GExAttempts.refreshGUI() + } +}); let GExAttempts = { count:0, next:null, From 3faf1c2d05ac7ac3a5205472421e44629f09e334 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 22 Nov 2024 12:31:57 +0100 Subject: [PATCH 050/130] building tooltip - put rarity on new line when too long --- js/web/customTooltip/css/customTooltip.css | 5 +++++ js/web/customTooltip/js/customTooltip.js | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/js/web/customTooltip/css/customTooltip.css b/js/web/customTooltip/css/customTooltip.css index 1cebafb9f..c2091ff15 100644 --- a/js/web/customTooltip/css/customTooltip.css +++ b/js/web/customTooltip/css/customTooltip.css @@ -127,6 +127,11 @@ .HXBuilding .limited img{ align-self: flex-start; } +.HXBuilding .allyName { + display: flex; + flex-wrap: wrap; + column-gap: 0.5em; +} @keyframes bounce { 0% { transform: translateX(0%) } diff --git a/js/web/customTooltip/js/customTooltip.js b/js/web/customTooltip/js/customTooltip.js index 09ca6f836..eb7923866 100644 --- a/js/web/customTooltip/js/customTooltip.js +++ b/js/web/customTooltip/js/customTooltip.js @@ -237,10 +237,10 @@ let Tooltips = { } ally += `') } @@ -1150,7 +1175,7 @@ let Productions = { if (category == "goods") { return CityMap.getBuildingGoodsByEra(current, building) } - if (category == "forge_points_production") { + if (category == "forge_points_production" || category == "coin_production" || category == "supply_production") { prod.amount = building.boosts.filter(x => x.type[0] == category)[0].value // not really rock solid like this } return prod From c61ca1c32350beba7bed2ad0892b173f25147435 Mon Sep 17 00:00:00 2001 From: Weblate Date: Fri, 22 Nov 2024 14:14:30 +0000 Subject: [PATCH 052/130] Currently translated at 100.0% (1520 of 1520 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index de9fdeddc..c6803e315 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -575,6 +575,7 @@ "Boxes.HiddenRewards.Title": "Récompenses cachées", "Boxes.HiddenRewards.none": "aucun", "Boxes.HiddenRewards.onlyVis": "seulement découvert", + "Boxes.HiddenRewards.twolaneWarning": "Si un incident s'avère sur une route à deux voies, une telle route doit être construite afin de pouvoir récupérer la récompense !", "Boxes.InactivesSettings.AlertActive": "Alerte active", "Boxes.InactivesSettings.NoAlert": "Pas d'alerte", "Boxes.InactivesSettings.Title": "Activer/désactiver l'alerte d'expiration", From 82c9f6d7bc1c05d568200e19586f31299ca11989 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 22 Nov 2024 16:05:41 +0100 Subject: [PATCH 053/130] add other boosts to castlesystem --- js/web/citymap/js/citymap.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index 691423033..acf8f1e4d 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -1231,11 +1231,10 @@ let CityMap = { MainParser.Boosts[data.id].forEach(castleBoost => { let boost = { feature: "all", - type: MainParser.BoostMapper[castleBoost.type] || undefined, // do not include weird boosts + type: MainParser.BoostMapper[castleBoost.type] || [castleBoost.type], value: castleBoost.value } - if (boost.type !== undefined) - boosts.push(boost) + boosts.push(boost) }) } } From fb27e8ae70762e14b6381de909d4e27fdf33123b Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 22 Nov 2024 17:38:57 +0100 Subject: [PATCH 054/130] scouting times - add connections between ships --- js/web/scoutingtimes/js/scoutingtimes.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/js/web/scoutingtimes/js/scoutingtimes.js b/js/web/scoutingtimes/js/scoutingtimes.js index ce8b68d09..552cb6d62 100644 --- a/js/web/scoutingtimes/js/scoutingtimes.js +++ b/js/web/scoutingtimes/js/scoutingtimes.js @@ -48,8 +48,10 @@ FoEproxy.addHandler('CampaignService', 'start', (data, postData) => { } for (let province of data.responseData.provinces) { + if (province.provinceType=="ship" && province.id>100) province.parentIds.concat([...Array(Math.floor(province.id/100)).keys()].map(x=>x*100)) scoutingTimes.Provinces[province.id] = province; } + scoutingTimes.scoutPosition = data.responseData.scout?.current_province|0; scoutingTimes.scoutTarget = data.responseData.scout?.path[data.responseData.scout?.path?.length-1]|0; scoutingTimes.scoutTraveltime = data.responseData.scout.time_to_target; From 57efb31b0ecd87294d3c7c180f4b22c172d34798 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 22 Nov 2024 19:39:11 +0100 Subject: [PATCH 055/130] scoutingtimes - fix ship parents --- js/web/scoutingtimes/js/scoutingtimes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/web/scoutingtimes/js/scoutingtimes.js b/js/web/scoutingtimes/js/scoutingtimes.js index 552cb6d62..12071e7b6 100644 --- a/js/web/scoutingtimes/js/scoutingtimes.js +++ b/js/web/scoutingtimes/js/scoutingtimes.js @@ -46,10 +46,10 @@ FoEproxy.addHandler('CampaignService', 'start', (data, postData) => { if (!Settings.GetSetting('ShowScoutingTimes')) { return; } - + maxShip = Math.floor(Object.values(data.responseData.provinces).map(x=>x.id||0).pop()/100) for (let province of data.responseData.provinces) { - if (province.provinceType=="ship" && province.id>100) province.parentIds.concat([...Array(Math.floor(province.id/100)).keys()].map(x=>x*100)) - scoutingTimes.Provinces[province.id] = province; + if (province.provinceType=="ship" && province.id>100) province.parentIds.concat([...Array(maxShip - province.id/100).keys()].map(x=>(x+province.id/100+1)*100)) + scoutingTimes.Provinces[province.id||0] = province; } scoutingTimes.scoutPosition = data.responseData.scout?.current_province|0; From ad69dac1b43c7c6efddb03a4651834159cef15d5 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 22 Nov 2024 19:55:17 +0100 Subject: [PATCH 056/130] scoutig times - fix faulty commit --- js/web/scoutingtimes/js/scoutingtimes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/scoutingtimes/js/scoutingtimes.js b/js/web/scoutingtimes/js/scoutingtimes.js index 12071e7b6..2da49719f 100644 --- a/js/web/scoutingtimes/js/scoutingtimes.js +++ b/js/web/scoutingtimes/js/scoutingtimes.js @@ -48,7 +48,7 @@ FoEproxy.addHandler('CampaignService', 'start', (data, postData) => { } maxShip = Math.floor(Object.values(data.responseData.provinces).map(x=>x.id||0).pop()/100) for (let province of data.responseData.provinces) { - if (province.provinceType=="ship" && province.id>100) province.parentIds.concat([...Array(maxShip - province.id/100).keys()].map(x=>(x+province.id/100+1)*100)) + if (province.provinceType=="ship") province.parentIds=province.parentIds.concat([...Array(maxShip - province.id/100).keys()].map(x=>(x+province.id/100+1)*100)) scoutingTimes.Provinces[province.id||0] = province; } From 3cbc5f9959e6c49bc180712524d6a5881162931e Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 23 Nov 2024 19:27:49 +0100 Subject: [PATCH 057/130] fix height for battle assist window --- js/web/battle-assist/css/battle-assist.css | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/battle-assist/css/battle-assist.css b/js/web/battle-assist/css/battle-assist.css index 085f75199..3216bd41c 100644 --- a/js/web/battle-assist/css/battle-assist.css +++ b/js/web/battle-assist/css/battle-assist.css @@ -14,6 +14,7 @@ #battleAssistNextEraDialog { top: calc(50vh + 230px); left: calc(50vw - 298px); + height: 60vh; } #battleAssistNextEraDialog.BattleAssistNoTournamnt{ top: calc(50vh + 200px); From c55e9fd29b10941d21613c140151252c097aa582 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 23 Nov 2024 19:34:58 +0100 Subject: [PATCH 058/130] oops changed wrong window --- js/web/battle-assist/css/battle-assist.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/web/battle-assist/css/battle-assist.css b/js/web/battle-assist/css/battle-assist.css index 3216bd41c..99cae5832 100644 --- a/js/web/battle-assist/css/battle-assist.css +++ b/js/web/battle-assist/css/battle-assist.css @@ -14,7 +14,6 @@ #battleAssistNextEraDialog { top: calc(50vh + 230px); left: calc(50vw - 298px); - height: 60vh; } #battleAssistNextEraDialog.BattleAssistNoTournamnt{ top: calc(50vh + 200px); @@ -120,6 +119,10 @@ margin-left: 5px; } +#battleAssistAAConfig { + height: 60vh; +} + #battleAssistAAConfig .BattleWave { display: flex; flex-direction: column; From 0710bb6390dcc23ba14ce29227bef94f5d0f993e Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 23 Nov 2024 20:48:30 +0100 Subject: [PATCH 059/130] added fsp fragment to efficiency rating --- js/web/_i18n/de.json | 1 + js/web/_i18n/en.json | 1 + js/web/productions/css/productions.css | 3 +++ js/web/productions/images/productions.png | Bin 21214 -> 22942 bytes js/web/productions/js/productions.js | 30 ++++++++++++++++++++++ 5 files changed, 35 insertions(+) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 9bf79c3b4..bcbdb0655 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -906,6 +906,7 @@ "Boxes.Productions.Done": "Fertig", "Boxes.Productions.EmptyList": "Du hast keine Gebäude in dieser Kategorie.", "Boxes.Productions.FilterTable": "Gebäude filtern", + "Boxes.Productions.FSP": "Spezial-Production abschließen Fragment", "Boxes.Productions.GoodEraTotal": "Gesamt", "Boxes.Productions.GuildGoods": "Gildengüter", "Boxes.Productions.GuildPower": "Gildenmacht", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index b475adb35..3a8533c3d 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -906,6 +906,7 @@ "Boxes.Productions.Done": "Done", "Boxes.Productions.EmptyList": "There are no buildings in this category.", "Boxes.Productions.FilterTable": "Filter buildings", + "Boxes.Productions.FSP": "Finish Special Production Fragment", "Boxes.Productions.GoodEraTotal": "Total", "Boxes.Productions.GuildGoods": "Treasury Goods", "Boxes.Productions.GuildPower": "Guild Power", diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index b5791f76e..65a5a0a18 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -170,6 +170,9 @@ #ProductionsRating #ProductionsRatingBody span.resicon.def_boost_defender-guild_expedition { background-position: center center, -391px 0px; } +#ProductionsRating #ProductionsRatingBody span.resicon.fsp { + background-position: -762px 0px; +} #ProductionsRating #ProductionsRatingBody th i { display: block; } diff --git a/js/web/productions/images/productions.png b/js/web/productions/images/productions.png index 2e4d8f1e64fe562c6993a69eeae82c3f0f634aa7..b69a402c323f52fddf30a8b11dcc7611db3ef8c9 100644 GIT binary patch literal 22942 zcmV*9Kybf_P)aK(d)(ua*s&8QaY^j-eEH%e#z^Piv*?wV z%e_}ug2eInGtcwh-MeLGcXoF6oO#PAN;}h<2{v6Uk@n_)H{DHl)7>O#*nn<54dwg3 zrn~9CBL%E>oBw@Z!`<|QPaT?5&%VyiZ(#_gB*Kl9|P90yF zG^EG3x_mkq9&TrQU8$w?-Gf-=}spBi6i@V9&10OtE>Is zPMJ4}x{dqpg315;iO+XH{{fQ**z`zt7~K7RLzytNN8O-4z5VaDga1Dg34_RLH^*}! z%O*AXtXha2wFQkYzWhAi`|yM7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_zi^f5_2kn&2eZi+WB2+X#!2cb%4& zbZpuLQ{CEP$<*GM+}j16^#A(tn1;l2&uLsqZG*NV{$Z_0kDfp3H14i*bc>5~@=OV9 z+i7Qsr_;gm*cSWBGg=&6m)iVLMM$@exo&=b?k(6MFc#06F~ezSVq%9jd&?#}A1n`Z zKCo_K+av3|dzEFnhJ{UX_Du0?rrl{7RHc(Le0g`C^`5)u?zwxees`xMIrrQ>chB8D zN3d_mMB0CI=Ku?m_^wV(Uz7{|9Z)(h3632G;-p N002ovPDHLkV1j>1h1dW9 diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 45c964f61..66a143a1a 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -100,6 +100,7 @@ let Productions = { 'goods-previous', 'goods-current', 'goods-next', + 'fsp', ], fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), @@ -1411,6 +1412,9 @@ let Productions = { } else if (GoodType === 'items') { return i18n('Boxes.Productions.fragments'); + } + else if (GoodType === 'fsp') { + return i18n('Boxes.Productions.FSP'); } else { if(GoodType && GoodsData[GoodType]){ @@ -1832,6 +1836,31 @@ let Productions = { } } } + else if (type == "fsp") { + let fsp = 0 + if (building.production) { + let possibleProductions = building.production.filter(x => x.type == "genericReward").concat(building.production.filter(x => x.type == "random")) + let multiplier = 1 + for (let production of possibleProductions) { + if (production.type == "genericReward") { + if (!production.resources.id.includes('rush_event_buildings_instant')) return fsp + + if (production.resources.subType != 'fragment') + multiplier = 30 // 30, because 30 fragments are needed for one item + fsp = production.resources.amount * multiplier + } + else if (production.type == "random") { + let hasFsp = production.resources.filter(x => x.id?.includes('rush_event_buildings_instant')) + if (hasFsp.length === 0) return fsp + + if (production.resources.subType != 'fragment') + multiplier = 30 // 30, because 30 fragments are needed for one item + fsp = hasFsp[0].amount * hasFsp[0].dropChance * multiplier + } + } + } + return fsp + } else return 0 }, @@ -1879,6 +1908,7 @@ let Productions = { if (Type === 'def_boost_defender-guild_raids') return null if (Type === 'goods-previous') return 4 if (Type === 'goods-current') return 5 + if (Type === 'fsp') return 1 if (Type === 'goods-next') return null else return 0 }, From f4cc68266424de15bd4b39a35528391217171517 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 23 Nov 2024 20:58:06 +0100 Subject: [PATCH 060/130] fsp efficiency rating: mathed math --- js/web/productions/js/productions.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 66a143a1a..b6932a18e 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1845,7 +1845,7 @@ let Productions = { if (production.type == "genericReward") { if (!production.resources.id.includes('rush_event_buildings_instant')) return fsp - if (production.resources.subType != 'fragment') + if (production.resources.subType == 'rush_event_buildings_instant') multiplier = 30 // 30, because 30 fragments are needed for one item fsp = production.resources.amount * multiplier } @@ -1853,7 +1853,9 @@ let Productions = { let hasFsp = production.resources.filter(x => x.id?.includes('rush_event_buildings_instant')) if (hasFsp.length === 0) return fsp - if (production.resources.subType != 'fragment') + console.log(building.name, production.resources.subType) + + if (production.resources.subType == 'rush_event_buildings_instant') multiplier = 30 // 30, because 30 fragments are needed for one item fsp = hasFsp[0].amount * hasFsp[0].dropChance * multiplier } From baad6efb8608c2f4473f5492b05387ea12b3e20a Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 23 Nov 2024 21:10:23 +0100 Subject: [PATCH 061/130] fsp efficiency bugfix whole kit --- js/web/productions/js/productions.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index b6932a18e..a6b479a89 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1853,9 +1853,7 @@ let Productions = { let hasFsp = production.resources.filter(x => x.id?.includes('rush_event_buildings_instant')) if (hasFsp.length === 0) return fsp - console.log(building.name, production.resources.subType) - - if (production.resources.subType == 'rush_event_buildings_instant') + if (hasFsp[0].subType == "instant_finish_building") multiplier = 30 // 30, because 30 fragments are needed for one item fsp = hasFsp[0].amount * hasFsp[0].dropChance * multiplier } From bfa84c4dc9434597d3bb73670ca27e60a5a9a26f Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 23 Nov 2024 21:53:11 +0100 Subject: [PATCH 062/130] changelog --- changelog-de.md | 2 ++ changelog-en.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/changelog-de.md b/changelog-de.md index 2404628dd..7a648fb25 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -5,6 +5,8 @@ **Neu** - QI Fortschritts Übersicht hinzugefügt (öffnet sich automatisch, wenn die QI-Spieler Rangliste geöffnet wird) - Quellen für Gegenstände: In der Produktionsübersicht für Gegenstände und Fragmente gibt es nun die Möglichkeit, sich eine Liste von Gebäude ausgeben zu lassen, die einen bestimmten Gegenstand produzieren (auch, wenn diese nicht gebaut sind) +- Produktionsübersicht: Tabellen für Münz-, Vorrats- und FP-Boots hinzugefügt +- Effizienzbewertung: Feld für Spezialproduktion abschließen Fragmente hinzugefügt **Update** - Tooltip: Design der Gebäude-Tooltips angepasst diff --git a/changelog-en.md b/changelog-en.md index 17dd41dce..79d2d9a56 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -5,6 +5,8 @@ **New** - QI Progress Overview added (opens automatically when opening the QI player ranking) - Item Sources: Production Overview for Items/Fragments now offers an option to display a list of buildings that produce a certain item (even if not currently build) +- Production Overview: Added Tables for resources boosts (FP, coins, supplies) +- Efficiency rating: Added FSP Fragments to the evaluation **Update** - Tooltip: made design similar to original FoE tooltips From bd427eba167d78515350f45dfab5be897b6d9b13 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 24 Nov 2024 17:12:41 +0100 Subject: [PATCH 063/130] fsp efficiency bugfix --- js/web/productions/js/productions.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index a6b479a89..ad4bbb298 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1842,8 +1842,9 @@ let Productions = { let possibleProductions = building.production.filter(x => x.type == "genericReward").concat(building.production.filter(x => x.type == "random")) let multiplier = 1 for (let production of possibleProductions) { + console.log(building.name, production) if (production.type == "genericReward") { - if (!production.resources.id.includes('rush_event_buildings_instant')) return fsp + if (!production.resources.id.includes('rush_event_buildings_instant')) continue if (production.resources.subType == 'rush_event_buildings_instant') multiplier = 30 // 30, because 30 fragments are needed for one item @@ -1851,7 +1852,7 @@ let Productions = { } else if (production.type == "random") { let hasFsp = production.resources.filter(x => x.id?.includes('rush_event_buildings_instant')) - if (hasFsp.length === 0) return fsp + if (hasFsp.length === 0) continue if (hasFsp[0].subType == "instant_finish_building") multiplier = 30 // 30, because 30 fragments are needed for one item From 5e727473c0076bbbe52ae57e470f2e572fc7369a Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 24 Nov 2024 17:13:47 +0100 Subject: [PATCH 064/130] remove console log --- js/web/productions/js/productions.js | 1 - 1 file changed, 1 deletion(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index ad4bbb298..0954df488 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1842,7 +1842,6 @@ let Productions = { let possibleProductions = building.production.filter(x => x.type == "genericReward").concat(building.production.filter(x => x.type == "random")) let multiplier = 1 for (let production of possibleProductions) { - console.log(building.name, production) if (production.type == "genericReward") { if (!production.resources.id.includes('rush_event_buildings_instant')) continue From 732fabf8fa3d85dd3de52dd4b469d05239f06f03 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Mon, 25 Nov 2024 19:12:09 +0100 Subject: [PATCH 065/130] bugfix qi season end --- js/web/qiprogress/js/qiprogress.js | 54 ++++++++++++++---------------- 1 file changed, 26 insertions(+), 28 deletions(-) diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js index 19fa74fde..a0d4003fc 100644 --- a/js/web/qiprogress/js/qiprogress.js +++ b/js/web/qiprogress/js/qiprogress.js @@ -21,21 +21,19 @@ FoEproxy.addHandler('GuildRaidsService', 'getMemberActivityOverview', (data, pos FoEproxy.addHandler('GuildRaidsService', 'getState', (data, postData) => { QiProgress.GlobalRankingTimeout = setTimeout(()=>{ if (data.responseData.__class__ == 'GuildRaidsRunningState') { - QiProgress.CurrentQIRound = data.responseData.endsAt - - if (QiProgress.curDateFilter === null || QiProgress.curDateEndFilter === null) { - QiProgress.curDateFilter = moment.unix(QiProgress.CurrentQIRound).subtract(11, 'd').format('YYYYMMDD') - QiProgress.curDateEndFilter = moment.unix(QiProgress.CurrentQIRound).format('YYYYMMDD') - } + QiProgress.CurrentQISeason = data.responseData.endsAt } - if (data.responseData.__class__ == 'GuildRaidsPendingState') { + else if (data.responseData.__class__ == 'GuildRaidsPendingState') { // 259200 = 3 days - QiProgress.CurrentQIRound = data.responseData.startsAt - 259200 + QiProgress.CurrentQISeason = data.responseData.startsAt - 259200 + } + else if (data.responseData.__class__ == 'GuildRaidsFinishedState') { + QiProgress.CurrentQISeason = data.responseData.nextStartsAt - 259200 + } - if (QiProgress.curDateFilter === null || QiProgress.curDateEndFilter === null) { - QiProgress.curDateFilter = moment.unix(QiProgress.CurrentQIRound).subtract(11, 'd').format('YYYYMMDD') - QiProgress.curDateEndFilter = moment.unix(QiProgress.CurrentQIRound).format('YYYYMMDD') - } + if (QiProgress.curDateFilter === null || QiProgress.curDateEndFilter === null) { + QiProgress.curDateFilter = moment.unix(QiProgress.CurrentQISeason).subtract(11, 'd').format('YYYYMMDD') + QiProgress.curDateEndFilter = moment.unix(QiProgress.CurrentQISeason).format('YYYYMMDD') } },500) }); @@ -46,7 +44,7 @@ let QiProgress = { PrevActionTimestamp: null, NewAction: null, NewActionTimestamp: null, - CurrentQIRound: null, + CurrentQISeason: null, // timestamp of round end AllRounds: null, ProgressContent: [], curDateFilter: null, @@ -96,7 +94,7 @@ let QiProgress = { HTML.AddCssFile('qiprogress'); } - QiProgress.BuildProgressList(QiProgress.CurrentQIRound); + QiProgress.BuildProgressList(QiProgress.CurrentQISeason); }, /** @@ -113,14 +111,14 @@ let QiProgress = { let CurrentSnapshot = await QiProgress.db.snapshots .where({ - qiround: QiProgress.CurrentQIRound + qiround: QiProgress.CurrentQISeason }) .first(); if (CurrentSnapshot === undefined) { newRound = true; // if there is a new round delete previous snapshots - QiProgress.DeleteOldSnapshots(QiProgress.CurrentQIRound); + QiProgress.DeleteOldSnapshots(QiProgress.CurrentQISeason); } let t = [], @@ -138,7 +136,7 @@ let QiProgress = { progress: 'progress', }); - if (qiRound && qiRound !== null && qiRound !== QiProgress.CurrentQIRound) { + if (qiRound && qiRound !== null && qiRound !== QiProgress.CurrentQISeason) { let d = await QiProgress.db.history.where({ qiround: qiRound }).toArray(); QiProgress.qiRound = d[0].participation.sort(function (a, b) { return a.rank - b.rank; @@ -182,7 +180,7 @@ let QiProgress = { if ((change === true || newRound === true) && QiProgress.HistoryView === false) { await QiProgress.UpdateDB('player', { - qiRound: QiProgress.CurrentQIRound, + qiRound: QiProgress.CurrentQISeason, player_id: playerNew.player_id, name: playerNew.name, actions: playerNew.actions, @@ -290,7 +288,7 @@ let QiProgress = { $(`#QiProgressListSettingsBox`).fadeToggle('fast', function () { $(this).remove(); - QiProgress.BuildProgressList(QiProgress.CurrentQIRound); + QiProgress.BuildProgressList(QiProgress.CurrentQISeason); }); }, @@ -350,7 +348,7 @@ let QiProgress = { BuildPlayerDetailContent: async (d) => { let player_id = d.player_id ? d.player_id : null, content = d.content ? d.content : 'player', - qiround = d.qiround ? d.qiround : QiProgress.CurrentQIRound, + qiround = d.qiround ? d.qiround : QiProgress.CurrentQISeason, playerName = null, dailyProgress = [], detaildata = [], @@ -530,7 +528,7 @@ let QiProgress = { h.push(``); } - if (qiRound === QiProgress.CurrentQIRound) { + if (qiRound === QiProgress.CurrentQISeason) { h.push(`
    `); if (QiProgress.ProgressSettings.showProgressFilter === 1) { h.push(``); @@ -557,13 +555,13 @@ let QiProgress = { QiProgress.HistoryView = true; let week = parseInt($(this).val()); - if (!QiProgress.AllRounds.includes(week) || week === QiProgress.CurrentqiRound) { return} + if (!QiProgress.AllRounds.includes(week) || week === QiProgress.CurrentQISeason) { return} QiProgress.BuildPlayerContent(week); }); $('button#qi_showLog').off('click').on('click', function () { - QiProgress.curDetailViewFilter = { content: 'filter', qiRound: QiProgress.CurrentqiRound }; + QiProgress.curDetailViewFilter = { content: 'filter', qiRound: QiProgress.CurrentQISeason }; QiProgress.ShowPlayerDetailsBox(QiProgress.curDetailViewFilter) }); @@ -611,7 +609,7 @@ let QiProgress = { sumProgress += d[i].progressContribution || 0; players.push({ - qiround: QiProgress.CurrentQIRound, + qiround: QiProgress.CurrentQISeason, rank: i * 1 + 1, player_id: d[i].player.player_id, name: d[i].player.name, @@ -632,7 +630,7 @@ let QiProgress = { localStorage.setItem('QiProgress.NewActionTimestamp', QiProgress.NewActionTimestamp); if ($('#QiProgress').length > 0) { - QiProgress.BuildProgressList(QiProgress.CurrentQIRound); + QiProgress.BuildProgressList(QiProgress.CurrentQISeason); console.log(1) } else { @@ -649,7 +647,7 @@ let QiProgress = { UpdateDB: async (content, data) => { if (content === 'history') { await QiProgress.db.history.put({ - qiround: QiProgress.CurrentQIRound, + qiround: QiProgress.CurrentQISeason, actions: data.actions, progress: data.progress }); @@ -660,7 +658,7 @@ let QiProgress = { let CurrentSnapshot = await QiProgress.db.snapshots .where({ - qiround: QiProgress.CurrentQIRound, + qiround: QiProgress.CurrentQISeason, player_id: data.player_id }) .first(); @@ -675,7 +673,7 @@ let QiProgress = { } await QiProgress.db.snapshots.add({ - qiround: QiProgress.CurrentQIRound, + qiround: QiProgress.CurrentQISeason, player_id: data.player_id, name: data.name, date: parseInt(moment.unix(data.time).format("YYYYMMDD")), From fc0338e5ebfa3c262658f50373dbc4ec9d43778c Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Tue, 26 Nov 2024 10:57:24 +0100 Subject: [PATCH 066/130] citymap - add canAscend function --- js/web/citymap/js/citymap.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index acf8f1e4d..b435a4a13 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -2174,4 +2174,9 @@ let CityMap = { // console.log('entity ', entity.name, entity, metaData, data) return entity }, + ascendingBuildings:null, + canAscend:(buildingId)=>{ + if (!CityMap.ascendingBuildings) CityMap.ascendingBuildings = Object.values(MainParser.BuildingUpgrades).filter(x=>x.upgradeItem.id.includes("ascended")).map(x=>x.upgradeSteps[0].buildingIds).flat() + return (CityMap.ascendingBuildings.includes(MainParser.CityEntities[buildingId].cityentity_id)) + }, }; From 73520b46bf373acdfb84ca4cb6c9581b5ce2e537 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Tue, 26 Nov 2024 15:25:05 +0100 Subject: [PATCH 067/130] #3119 --- css/web/variables.css | 4 ++ js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/citymap/css/citymap.css | 35 +++++++++++------ js/web/citymap/js/citymap.js | 72 +++++++++++++++++++++++++--------- 5 files changed, 84 insertions(+), 31 deletions(-) diff --git a/css/web/variables.css b/css/web/variables.css index bae7ba6f4..1564f7f0d 100644 --- a/css/web/variables.css +++ b/css/web/variables.css @@ -81,6 +81,10 @@ --text-info: #42a1ee; --text-danger: #f34f4f; + --background-color-ascendable: #f37317; + --border-color-ascendable: #ce5900; + --background-color-decayed: #2b2b2b; + --border-color-decayed: #161616; --background-color-military: #fff; --border-color-military: #bbb; --background-color-residential: #7abaff; diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index bcbdb0655..091ae2bea 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -231,6 +231,8 @@ "Boxes.CityMap.QIActionRechargeCycle": "pro Stunde", "Boxes.CityMap.QICycle": "alle 10 Stunden", "Boxes.CityMap.QIHint": "Alle Werte, außer Aktionen pro Stunde, nehmen an, dass die Gebäude fertiggestellt sind.", + "Boxes.CityMap.ShowAscendableBuildings": "Markiere Gebäude, die erhaben sein können", + "Boxes.CityMap.ShowDecayedBuildings": "Markiere Gebäude, die abgelaufen sind", "Boxes.CityMap.ShowNoStreetBuildings": "Markiere Gebäude, die keine Straße brauchen", "Boxes.CityMap.ShowSubmitBox": "Stadtplaner", "Boxes.CityMap.StreetsAmount": "Anzahl Straßen: ", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 3a8533c3d..fbbe5eaf2 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -231,6 +231,8 @@ "Boxes.CityMap.QIActionRechargeCycle": "every hour", "Boxes.CityMap.QICycle": "every 10 hours", "Boxes.CityMap.QIHint": "All displayed values, except Actions per Hour, assume your buildings have finished construction.", + "Boxes.CityMap.ShowAscendableBuildings": "Highlight ascendable buildings", + "Boxes.CityMap.ShowDecayedBuildings": "Highlight decayed buildings", "Boxes.CityMap.ShowNoStreetBuildings": "Highlight buildings that do not need streets", "Boxes.CityMap.ShowSubmitBox": "City planner", "Boxes.CityMap.StreetsAmount": "Number of Streets: ", diff --git a/js/web/citymap/css/citymap.css b/js/web/citymap/css/citymap.css index fc82aef5d..4680038d3 100755 --- a/js/web/citymap/css/citymap.css +++ b/js/web/citymap/css/citymap.css @@ -292,15 +292,6 @@ background-color: var(--background-color-special); border-color: var(--border-color-special); }*/ -#grid-outer span.noStreet.highlight { - background-color: var(--background-color-noStreet); - border-color: var(--border-color-noStreet); - animation-name: color; - animation-duration: 1s; - animation-iteration-count: infinite; - animation-direction: alternate; - animation-timing-function: ease-in-out; -} /*#grid-outer span.chain { background-color: var(--background-color-chain); border-color: var(--border-color-chain); @@ -349,18 +340,36 @@ } /* mark old buildings*/ -span.older-1.diagonal { +#grid-outer span.older-1.diagonal { background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgb(128, 152, 93) 2px, rgb(128, 152, 93) 7px) } -span.older-2.diagonal { +#grid-outer span.older-2.diagonal { background-image: repeating-linear-gradient(317deg, transparent, transparent 5px, rgb(133, 95, 14) 2px, rgb(133, 95, 14) 7px) } -span.older-3.diagonal { +#grid-outer span.older-3.diagonal { background-image: repeating-linear-gradient(45deg, transparent, transparent 5px, rgb(165, 74, 62) 2px, rgb(165, 74, 62) 7px); } -span.to-old.diagonal { +#grid-outer span.to-old.diagonal { background-image: repeating-linear-gradient(202deg, transparent, transparent 5px, rgb(171, 26, 13) 2px, rgb(171, 26, 13) 7px) } +#grid-outer span.noStreet.highlight { + background-color: var(--background-color-noStreet); + border-color: var(--border-color-noStreet); + animation-name: color; + animation-duration: 1s; + animation-iteration-count: infinite; + animation-direction: alternate; + animation-timing-function: ease-in-out; +} +#grid-outer span.ascendable.highlight2 { + background-color: var(--background-color-ascendable); + border-color: var(--border-color-ascendable); +} +#grid-outer span.decayed.highlight3 { + background-image: linear-gradient(45deg, transparent 50%, var(--background-color-ascendable) 50%); + background-color: var(--background-color-decayed); + border-color: var(--border-color-decayed); +} [data-view="skew"] .older-1.diagonal { background-image: repeating-linear-gradient(15deg, transparent, transparent 5px, rgb(128, 152, 93) 2px, rgb(128, 152, 93) 7px) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index b435a4a13..74bd21c0e 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -34,6 +34,7 @@ let CityMap = { QIData: null, QIStats: null, QIAreas: [], + AscendingBuildings:null, /** @@ -186,6 +187,8 @@ let CityMap = { if(ActiveMap === 'main'){ $('#highlight-old-buildings')[0].checked=false; $('#show-nostreet-buildings')[0].checked=false; + $('#show-ascendable-buildings')[0].checked=false; + $('#show-decayed-buildings')[0].checked=false; } $('#grid-outer').attr('data-unit', unit); @@ -219,12 +222,22 @@ let CityMap = { mapfilters.append( $('
    ' + i18n('General.Player') + '' + i18n('Boxes.QiProgress.Actions') + '
    (' + HTML.Format(tA) + ')
    ' + i18n('Boxes.QiProgress.Progress') + '
    (' + HTML.Format(tP) + ')
    ' + i18n("Eras."+Technologies.Eras[building.eraName]+".short") + '') @@ -573,12 +558,12 @@ let Productions = { if (!type.includes('att') && !type.includes('def')) { if (type != 'items') { - let productionByCategoryTrue=Productions.getBuildingProductionByCategory(true, building, type) - let productionByCategoryFalse=Productions.getBuildingProductionByCategory(false, building, type) - currentAmount = parseFloat(productionByCategoryTrue.amount) - amount = parseFloat(productionByCategoryFalse.amount) - hasRandomProductions = productionByCategoryFalse.hasRandomProductions - let doubled = productionByCategoryFalse.doubleWhenMotivated + let currentProductionByCategory = Productions.getBuildingProductionByCategory(true, building, type) + let generalProductionByCategory = Productions.getBuildingProductionByCategory(false, building, type) + currentAmount = parseFloat(currentProductionByCategory.amount) + amount = parseFloat(generalProductionByCategory.amount) + hasRandomProductions = generalProductionByCategory.hasRandomProductions + let doubled = generalProductionByCategory.doubleWhenMotivated if (type == 'money' && building.isBoostable) { amount = Math.round(amount + (amount * ((MainParser.BoostSums.coin_production + (Productions.HappinessBoost * 100)) / 100))) * (doubled ? 2 : 1) @@ -597,15 +582,15 @@ let Productions = { let parsedCurrentAmount = (currentAmount >= 10000 ? HTML.FormatNumberShort(currentAmount) : HTML.Format(currentAmount)) let parsedAmount = (currentAmount >= 10000 ? HTML.FormatNumberShort(amount) : HTML.Format(amount)) - if (productionByCategoryFalse.units.length>0 || productionByCategoryTrue.units.length>0) { - if (productionByCategoryTrue.units.length > 0) - rowA.push(productionByCategoryTrue.units.map(x=>`${x.amount} `).join(" ")) + if (generalProductionByCategory.units.length>0 || currentProductionByCategory.units.length>0) { + if (currentProductionByCategory.units.length > 0) + rowA.push(currentProductionByCategory.units.map(x=>`${x.amount} `).join(" ")) else rowA.push(" - ") rowA.push(" / ") - if (productionByCategoryFalse.units.length > 0) - rowA.push(productionByCategoryFalse.units.map(x=>`${x.amount?x.amount:""}${x.amount && x. random ? "+":""}${x.random ? "Ø"+x.random:""} `).join(" ")) + if (generalProductionByCategory.units.length > 0) + rowA.push(generalProductionByCategory.units.map(x=>`${x.amount?x.amount:""}${x.amount && x. random ? "+":""}${x.random ? "Ø"+x.random:""} `).join(" ")) else rowA.push(" - ") } else { @@ -613,7 +598,7 @@ let Productions = { if (currentAmount < amount && building.type != 'production') rowA.push(parsedCurrentAmount + ' / ' + (hasRandomProductions ? 'Ø' : '') + parsedAmount) else { - unitType = productionByCategoryTrue.type + unitType = currentProductionByCategory.type if (unitType != null){ rowA.push(' ') } @@ -625,7 +610,7 @@ let Productions = { typeSum += amount typeCurrentSum += currentAmount - for (let u of productionByCategoryFalse.units) { + for (let u of generalProductionByCategory.units) { if (u.type.includes("next")) { a=a+1 } @@ -641,7 +626,7 @@ let Productions = { Sum[n] = {current:null,theory:u} } } - for (let u of productionByCategoryTrue.units) { + for (let u of currentProductionByCategory.units) { if (u.type.includes("next")) { a=a+1 } @@ -759,8 +744,9 @@ let Productions = { if (!type.includes('att') && !type.includes('def') && type!='items') { table.push('') table.push((typeCurrentSum >= 10000 ? HTML.FormatNumberShort(typeCurrentSum) : HTML.Format(typeCurrentSum))+ "/" + (typeSum >= 10000 ? HTML.FormatNumberShort(typeSum) : HTML.Format(typeSum))) - if (type == 'strategy_points') - table.push(' · '+i18n('General.Boost')+': '+MainParser.BoostSums.forge_points_production+'%') + if (type == 'strategy_points') { + table.push(' ') + } table.push('
    ${srcLinks.icons("historical_allies_slot_tooltip_icon_" + (allydata ? "full" :"empty"))}
    ${capFirsts(r.allyType) + (r.rarity?.value ? (" ("+i18n("Boxes.Productions.AllyRarity."+r.rarity?.value)+")"):"")}` if (allydata) { - ally+=`
    ${MainParser.Allies.names[allydata.allyId]} (${i18n("Boxes.Productions.AllyRarity."+allydata.rarity)} - ${i18n("General.Level")} ${allydata.level})` + ally+=`
    ${MainParser.Allies.names[allydata.allyId]}(${i18n("Boxes.Productions.AllyRarity."+allydata.rarity)} - ${i18n("General.Level")} ${allydata.level})
    ` //productions: for (b of allydata.prod.boosts||[]) { - ally+=`
    ${srcLinks.icons(b.type+feature[b.targetedFeature])} ${b.value + percent(b.type)}` + ally+=`${srcLinks.icons(b.type+feature[b.targetedFeature])} ${b.value + percent(b.type)}` } } From cafbe8ddf5e69305f2ba69cead98f2cbe02c5c5a Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 22 Nov 2024 13:42:25 +0100 Subject: [PATCH 051/130] productions: coin and supply boost table --- js/web/productions/css/productions.css | 5 +++- js/web/productions/js/productions.js | 33 ++++++++++++++++++++++---- 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index b7b192651..b5791f76e 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -118,9 +118,12 @@ #Productions #ProductionsBody .tabs ul li a span, #Productions th.boost span { background: transparent url('../images/productions.png') -233px 2px no-repeat; } -#Productions #ProductionsBody .tabs ul li.forge_points_production { +#Productions #ProductionsBody .tabs ul li.forge_points_production, #Productions #ProductionsBody .tabs ul li.coin_production, #Productions #ProductionsBody .tabs ul li.supply_production { display: none; } +#Productions #ProductionsBody .btn-tight.typeBoost { + border-radius: 3px; +} #Productions th.boost span { height: 25px; display: block; diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index fa969800d..45c964f61 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -30,7 +30,9 @@ let Productions = { 'goods', // Goods and special goods 'items', // Fragments, blueprints, boosts etc 'money', // Coins + 'coin_production', // Coin Boost 'supplies', + 'supply_production', // Supply Boost 'medals', 'premium', // Diamonds 'population', @@ -381,7 +383,24 @@ let Productions = { if ($("#Productions #"+type).html().length === 0) { let content = Productions.buildTableByType(type) - $("#Productions #"+type).html(content) + $("#Productions #"+type).html(content).promise().done(() => { + + $('#Productions .typeBoost').click(function(e) { + e.preventDefault() + let type = $("a", this).attr("href").replace("#","") + + if ($("#Productions #"+type).html().length === 0) { + let content = Productions.buildTableByType(type) + $("#Productions #"+type).html(content) + $('.TSinactive').tableSorter() + $('.TSinactive').removeClass('TSinactive') + HTML.FilterTable('#Productions .filterCurrentList') + } + $("#Productions .content").css('display','none') + $("#Productions #"+type).css('display','block') + }); + + }) $('.TSinactive').tableSorter() $('.TSinactive').removeClass('TSinactive') HTML.FilterTable('#Productions .filterCurrentList') @@ -400,7 +419,7 @@ let Productions = { $('#Productions').on('click', '.foe-table .show-entity', function () { Productions.ShowOnMap($(this).data('id')); }); - }); + }); }, setChainsAndSets(buildings) { @@ -745,7 +764,13 @@ let Productions = { table.push('
    ') table.push((typeCurrentSum >= 10000 ? HTML.FormatNumberShort(typeCurrentSum) : HTML.Format(typeCurrentSum))+ "/" + (typeSum >= 10000 ? HTML.FormatNumberShort(typeSum) : HTML.Format(typeSum))) if (type == 'strategy_points') { - table.push(' ') + table.push(' ') + } + else if (type == 'money') { + table.push(' ') + } + else if (type == 'supplies') { + table.push(' ') } table.push('
    `+ `
    `; - h += Tooltips.BuildingData(meta,era,allies); + h += await Tooltips.BuildingData(meta,era,allies); h += "
    " setTimeout(()=>{ $(".handleOverflow").each((index,e)=>{ @@ -115,7 +115,7 @@ let Tooltips = { },100) return h }, - BuildingData:(meta,onlyEra=null,allies=null)=>{ + BuildingData:async (meta,onlyEra=null,allies=null)=>{ if (onlyEra && Array.isArray(onlyEra)) { allies = [].concat(onlyEra) onlyEra = null @@ -257,6 +257,10 @@ let Tooltips = { out += `
    ${srcLinks.icons("limited_building_downgrade") + MainParser.CityEntities[levels.AllAge.limited.config.targetCityEntityId].name} (${i18n("Boxes.Tooltip.Building.after")} ${formatTime(levels.AllAge.limited.config.expireTime)})
    ${srcLinks.icons("limited_building_upgrade") + MainParser.CityEntities[(await CityMap.AscendingBuildings)[meta.id]].name}
    ${i18n('Boxes.CityMap.Building')} # ${srcLinks.icons("icon_copy")}${srcLinks.icons("road_required")}?${srcLinks.icons("road_required")}
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(tileRatings?.[type] !== undefined ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type))+''+(tileRatings?.[type] !== undefined ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type))+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1756,7 +1775,6 @@ let Productions = { rateBuildings: (buildingType,additional=false, era=null) => { let ratedBuildings = [] - let tileRatings = JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')) if (additional) { buildingType = buildingType.map(x=>CityMap.createNewCityMapEntity(x,era||CurrentEra)) } @@ -1770,7 +1788,7 @@ let Productions = { } for (const type of Object.keys(Productions.Rating)) { if (Productions.Rating[type] != false) { - let desiredValuePerTile = ((tileRatings != null && tileRatings != undefined) ? parseFloat(tileRatings[type]) : Productions.GetDefaultProdPerTile(type)) + let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size @@ -1876,42 +1894,6 @@ let Productions = { }) }, - - GetDefaultProdPerTile: (Type) => { - if (Type === 'strategy_points') return 5 - if (Type === 'money') return null - if (Type === 'supplies') return null - if (Type === 'medals') return null - if (Type === 'clan_power') return null - if (Type === 'clan_goods') return 10 - if (Type === 'population') return null - if (Type === 'happiness') return null - if (Type === 'units') return 1 - if (Type === 'att_boost_attacker-all') return 3 - if (Type === 'att_boost_attacker-guild_expedition') return null - if (Type === 'att_boost_attacker-battleground') return 3 - if (Type === 'att_boost_attacker-guild_raids') return null - if (Type === 'def_boost_attacker-all') return 3 - if (Type === 'def_boost_attacker-guild_expedition') return null - if (Type === 'def_boost_attacker-battleground') return 3 - if (Type === 'def_boost_attacker-guild_raids') return null - if (Type === 'att_boost_defender-all') return 2 - if (Type === 'att_boost_defender-guild_expedition') return null - if (Type === 'att_boost_defender-battleground') return null - if (Type === 'att_boost_defender-guild_raids') return null - if (Type === 'def_boost_defender-all') return 2 - if (Type === 'def_boost_defender-guild_expedition') return null - if (Type === 'def_boost_defender-battleground') return null - if (Type === 'def_boost_defender-guild_raids') return null - if (Type === 'goods-previous') return 4 - if (Type === 'goods-current') return 5 - if (Type === 'fsp') return 1 - if (Type === 'goods-next') return null - else return 0 - }, - - - /** * */ From b607c8804db0f8f79058cfac076fd38e23882103 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 076/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..f57a7dead 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -981,6 +981,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1b30f770e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..5004a0e3c 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From 233e008ddc3d5ba7b12a1b47e757ed905ed6377d Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 30 Nov 2024 10:23:14 +0100 Subject: [PATCH 077/130] QI-citymap - fix floating point error for happiness bonus --- js/web/citymap/js/citymap.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/citymap/js/citymap.js b/js/web/citymap/js/citymap.js index a0aa091f7..26caba898 100644 --- a/js/web/citymap/js/citymap.js +++ b/js/web/citymap/js/citymap.js @@ -451,7 +451,7 @@ let CityMap = { out = '
    ' out += '

    '+i18n('Boxes.CityMap.QIHint')+'

    ' out += ''+CityMap.QIStats.population+'/'+CityMap.QIStats.totalPopulation+' ' - out += ''+CityMap.QIStats.euphoriaBoost*100+'%
    ' + out += ''+Math.round(CityMap.QIStats.euphoriaBoost*100)+'%
    ' out += ''+HTML.Format(CityMap.QIStats.money)+' + ' out += ''+HTML.Format(CityMap.QIStats.supplies)+' '+i18n('Boxes.CityMap.QICycle')+'
    ' out += ''+CityMap.QIStats.att_def_boost_attacker+' ' From f11b8bad2f279371f27460aca6fc8c4c2c6edd3f Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 30 Nov 2024 10:24:47 +0100 Subject: [PATCH 078/130] evet handler - add parsing for date strings with explicit date (de + fr only so far) --- js/web/eventhandler/js/eventhandler.js | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/js/web/eventhandler/js/eventhandler.js b/js/web/eventhandler/js/eventhandler.js index 6ff59f5be..93ff19e5b 100644 --- a/js/web/eventhandler/js/eventhandler.js +++ b/js/web/eventhandler/js/eventhandler.js @@ -259,11 +259,7 @@ let EventHandler = { // get the correct 24h time if(match['groups']['half']) { - if(match['groups']['half'] === 'am' && h === 12) - { - h = 12; - } - else if(match['groups']['half'] === 'am' && h !== 12) + if(match['groups']['half'] === 'am' && h < 12) { h += 12; } @@ -280,7 +276,10 @@ let EventHandler = { case 'yesterday': refDate = moment().subtract(1, 'day'); break; - + case 'date': + moment.locale(OldLocale); + refDate = moment(match['groups']['d'],moment.defaultFormat) + break; default: refDate = moment().day(capitalize(day)); if (refDate.isAfter(MainParser.getCurrentDate())) refDate = refDate.subtract(7 * 86400000); //Date is in the future => subtract 1 week @@ -676,6 +675,7 @@ let EventHandler = { friday : /Freitag um (?[012]?\d):(?[0-5]?\d)/g, saturday : /Samstag um (?[012]?\d):(?[0-5]?\d)/g, sunday : /Sonntag um (?[012]?\d):(?[0-5]?\d)/g, + date : /am (?.*?) um (?[012]?\d):(?[0-5]?\d)/g, }, en: { today : /today at (?[012]?\d):(?[0-5]?\d) (?(a|p)m)/g, @@ -720,6 +720,7 @@ let EventHandler = { friday : /Vendredi à (?[012]?\d):(?[0-5]?\d)/g, saturday : /Samedi à (?[012]?\d):(?[0-5]?\d)/g, sunday : /Dimanche à (?[012]?\d):(?[0-5]?\d)/g, + date : /le (?.*?) à (?[012]?\d):(?[0-5]?\d)/g, }, it: { today : /oggi alle (?[012]?\d):(?[0-5]?\d)/g, From fadcf78abcdc6c5fb3213ffe6b0c5a9092cc62a8 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 079/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..f57a7dead 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -981,6 +981,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1b30f770e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..5004a0e3c 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From 919be6fae3285c8f13a50862deb8547bfe838ebd Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 30 Nov 2024 12:46:30 +0100 Subject: [PATCH 080/130] hidden rewards - fix timer... --- js/web/hidden-rewards/js/hidden-rewards.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/hidden-rewards/js/hidden-rewards.js b/js/web/hidden-rewards/js/hidden-rewards.js index cd7b250be..5a353797a 100644 --- a/js/web/hidden-rewards/js/hidden-rewards.js +++ b/js/web/hidden-rewards/js/hidden-rewards.js @@ -22,7 +22,7 @@ FoEproxy.addHandler('HiddenRewardService', 'getOverview', (data, postData) => { HiddenRewards.FirstCycle = false; data.responseData.hiddenRewards.forEach(x=>{ if (x.startTime && x.startTime>GameTime) - setTimeout(HiddenRewards.RefreshGui, (GameTime-x.startTime+5)*1000) + setTimeout(HiddenRewards.RefreshGui, (x.startTime+5-GameTime)*1000) }) } }); From 41ae387a8647b0a643d549554836fc0dd4698651 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 081/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..f57a7dead 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -981,6 +981,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1b30f770e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..5004a0e3c 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From 9c8bf9ead23068dd318388bf952f28ee65bc9afc Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 1 Dec 2024 14:43:22 +0100 Subject: [PATCH 082/130] event handler - add date parsing for en --- js/web/eventhandler/js/eventhandler.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/eventhandler/js/eventhandler.js b/js/web/eventhandler/js/eventhandler.js index 93ff19e5b..d4fb19e11 100644 --- a/js/web/eventhandler/js/eventhandler.js +++ b/js/web/eventhandler/js/eventhandler.js @@ -687,6 +687,7 @@ let EventHandler = { friday : /Friday at (?[012]?\d):(?[0-5]?\d) (?(a|p)m)/g, saturday : /Saturday at (?[012]?\d):(?[0-5]?\d) (?(a|p)m)/g, sunday : /Sunday at (?[012]?\d):(?[0-5]?\d) (?(a|p)m)/g, + date : /on (?.*?) at (?[012]?\d):(?[0-5]?\d) (?(a|p)m)/g, }, pt: { today : /hoje às (?[012]?\d):(?[0-5]?\d)( horas)?/g, From a3d7a30664f13faaf762f36450ef741ff7adc295 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Mon, 2 Dec 2024 18:05:19 +0100 Subject: [PATCH 083/130] reconstruction - W_ buildings always sorted as production --- js/web/reconstruction/js/reconstruction.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 3ba2928a9..99c989450 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -113,7 +113,7 @@ let reconstruction = { "off_grid", "outpost_ship", "hub_main"].includes(meta.type)) return - let page = reconstruction.pageMapper[meta.type]||meta.type + let page = id[1]=="W"? "prod" : reconstruction.pageMapper[meta.type]||meta.type if (reconstruction.count[id]==0) { //remove from pages reconstruction.pages[page].splice(reconstruction.pages[page].findIndex(id),1) } else { //add to pages From 963d38859b8f2eb4ff7f5d7927ca353fe8f3f596 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Mon, 2 Dec 2024 18:51:14 +0100 Subject: [PATCH 084/130] reconstruction - fix page bugs --- js/web/reconstruction/js/reconstruction.js | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 99c989450..4684ec112 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -34,7 +34,7 @@ FoEproxy.addHandler('CityReconstructionService', 'getDraft', (data, postData) => greatbuilding: [], } for (let b of data.responseData) { - let id = MainParser.CityMapData[b.entityId].cityentity_id + let id = MainParser.CityMapData[b.entityId].cityentity_id + "#" + (MainParser.CityMapData[b.entityId].level||0) if (!reconstruction.count[id]) reconstruction.count[id] = {placed:0,stored:0} if (b.position) reconstruction.count[id].placed++ @@ -57,7 +57,7 @@ FoEproxy.addHandler('InventoryService', 'getGreatBuildings', (data, postData) => FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { for (let x of data.requestData[0]) { - let id = MainParser.CityMapData[x.entityId].cityentity_id + let id = MainParser.CityMapData[x.entityId].cityentity_id + "#" + (MainParser.CityMapData[x.entityId].level||0) let pagesUpdated=false if (x.position && !reconstruction.draft[x.entityId].position) { reconstruction.count[id].placed++ @@ -75,11 +75,11 @@ FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { } } reconstruction.draft[x.entityId] = x - $('.reconstructionLine[data-meta_id="'+id+'"] td:nth-child(2)').html("x"+reconstruction.count[id].stored) + $('.reconstructionLine[data-page_id="'+id+'"] td:nth-child(2)').html("x"+reconstruction.count[id].stored) if (reconstruction.count[id].stored > 0) - $('.reconstructionLine[data-meta_id="'+id+'"]').show() + $('.reconstructionLine[data-page_id="'+id+'"]').show() else - $('.reconstructionLine[data-meta_id="'+id+'"]').hide() + $('.reconstructionLine[data-page_id="'+id+'"]').hide() if (pagesUpdated) reconstruction.updateTable() } }); @@ -105,7 +105,7 @@ let reconstruction = { rcIcons:null, roadIcons:null, pageUpdate:(id)=>{ - let meta = MainParser.CityEntities[id] + let meta = MainParser.CityEntities[id.split("#")[0]] if (["friends_tavern", "main_building", "impediment", @@ -113,9 +113,9 @@ let reconstruction = { "off_grid", "outpost_ship", "hub_main"].includes(meta.type)) return - let page = id[1]=="W"? "prod" : reconstruction.pageMapper[meta.type]||meta.type - if (reconstruction.count[id]==0) { //remove from pages - reconstruction.pages[page].splice(reconstruction.pages[page].findIndex(id),1) + let page = id[0]=="W"? "prod" : reconstruction.pageMapper[meta.type]||meta.type + if (reconstruction.count[id].stored==0) { //remove from pages + reconstruction.pages[page].splice(reconstruction.pages[page].indexOf(id),1) } else { //add to pages reconstruction.pages[page].unshift(id) } @@ -123,7 +123,7 @@ let reconstruction = { updateTable:()=>{ for (let [page,list] of Object.entries(reconstruction.pages)) { for (let i = 0;i`+(Math.floor(i/4)+1)) + $('.reconstructionLine[data-page_id="'+list[i]+'"] td:nth-child(3)').html(``+(Math.floor(i/4)+1)) } } }, @@ -168,11 +168,11 @@ let reconstruction = {
    '+ (icon.search("antiquedealer_flag") === -1 ? icon : '') + '' + present.reward.name + (present.status.value === "visible" ? '' : '') +'' + frag + present.reward.name + (present.status.value === "visible" ? '' : '') +'
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From 6d4a4b982daa400d57ea8754ba16314fb536c140 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Thu, 5 Dec 2024 13:04:10 +0100 Subject: [PATCH 087/130] bugfix srclinks? --- js/web/srcLinks/js/srcLinks.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/srcLinks/js/srcLinks.js b/js/web/srcLinks/js/srcLinks.js index bb51532b2..3106b309d 100644 --- a/js/web/srcLinks/js/srcLinks.js +++ b/js/web/srcLinks/js/srcLinks.js @@ -117,7 +117,7 @@ let srcLinks = { if (url.indexOf("antiquedealer_flag") > -1) url = srcLinks.get(`/shared/icons/reward_icons/reward_icon_${icon}.png`,true, true) if (url.indexOf("antiquedealer_flag") > -1) - url = srcLinks.get(`/city/buildings/${icon.replace(/(\D*?)_(.*)/,"$1_SS_$2")}.png`,true); + url = srcLinks.get(`/city/buildings/${icon?.replace(/(\D*?)_(.*)/,"$1_SS_$2")}.png`,true); return url; }, From d54a7508ec9e44ee3c0f9ac48cc27a2c440a3d71 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 5 Dec 2024 18:04:26 +0100 Subject: [PATCH 088/130] gbgbuildings - fix grafics for old buildings --- js/web/gbgbuildings/js/gbgbuildings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/web/gbgbuildings/js/gbgbuildings.js b/js/web/gbgbuildings/js/gbgbuildings.js index bd9e46723..77100da8d 100644 --- a/js/web/gbgbuildings/js/gbgbuildings.js +++ b/js/web/gbgbuildings/js/gbgbuildings.js @@ -218,8 +218,8 @@ let GBGBuildings = { let lastCost = 10000; let src = (b) => { let link="" - if (GBGBuildings.oldGBG) link = srcLinks.get("/guild_battlegrounds/hud/guild_battlegrounds_sector_buildings_"+b+".png",true,true) - if (!GBGBuildings.oldGBG || link.includes("antiquedealer_flag")) link = srcLinks.get("/guild_battlegrounds/hud/guild_battlegrounds_sector_buildings_"+b+"_gbg2024.png",true) + if (!GBGBuildings.oldGBG) link = srcLinks.get("/guild_battlegrounds/hud/guild_battlegrounds_sector_buildings_"+b+"_gbg2024.png",true,true) + if (GBGBuildings.oldGBG || link.includes("antiquedealer_flag")) link = srcLinks.get("/guild_battlegrounds/hud/guild_battlegrounds_sector_buildings_"+b+".png",true) return link } for (let s of sets) { From 7d6e7ee57f01d9a62f728879f7ea3b7736e66727 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 5 Dec 2024 18:04:59 +0100 Subject: [PATCH 089/130] presents - fix building fragments + units --- js/web/eventchests/js/eventchests.js | 24 +++++++++++++----------- js/web/srcLinks/js/srcLinks.js | 2 +- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/js/web/eventchests/js/eventchests.js b/js/web/eventchests/js/eventchests.js index 5481dbfef..298b77cb3 100644 --- a/js/web/eventchests/js/eventchests.js +++ b/js/web/eventchests/js/eventchests.js @@ -141,19 +141,21 @@ let EventPresents = { h.push('
    '+ (icon.search("antiquedealer_flag") === -1 ? icon : '') + '' + frag + present.reward.name + (present.status.value === "visible" ? '' : '') +'
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From f6e91865edc9ecd77d6239963413bce308fceb2f Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 6 Dec 2024 03:45:00 +0100 Subject: [PATCH 091/130] greatbuildings - add SASH up to 120 --- js/web/greatbuildings/js/greatbuildings.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/greatbuildings/js/greatbuildings.js b/js/web/greatbuildings/js/greatbuildings.js index 4c6db89a5..946dde991 100644 --- a/js/web/greatbuildings/js/greatbuildings.js +++ b/js/web/greatbuildings/js/greatbuildings.js @@ -36,7 +36,7 @@ let GreatBuildings = 20: [10, 15, 30, 40, 60, 70, 90, 105, 120, 135, 155, 170, 190, 210, 225, 245, 265, 285, 305, 325, 340, 360, 380, 405, 425, 445, 465, 485, 505, 530, 550, 570, 595, 615, 635, 660, 680, 705, 725, 750, 770, 795, 820, 840, 865, 890, 910, 935, 960, 980, 1005, 1030, 1055, 1080, 1100, 1125, 1150, 1175, 1200, 1225, 1250, 1275, 1300, 1325, 1350, 1375, 1400, 1425, 1450, 1475, 1500, 1525, 1550, 1575, 1600, 1630, 1655, 1680, 1705, 1730, 1760, 1785, 1810, 1835, 1865, 1890, 1915, 1945, 1970, 1995, 2025, 2050, 2075, 2105, 2130, 2160, 2185, 2210, 2240, 2265, 2295, 2320, 2350, 2375, 2405, 2430, 2460, 2485, 2515, 2540, 2570, 2600, 2625, 2655, 2680, 2710, 2740, 2765, 2795, 2825, 2850, 2880, 2910, 2935, 2965, 2995, 3025, 3050, 3080, 3110, 3135, 3165, 3195], 21: [10, 15, 30, 45, 60, 75, 90, 105, 125, 140, 160, 180, 195, 215, 235, 255, 275, 295, 315, 335, 355, 375, 395, 415, 440, 460, 480, 500, 525, 545, 570, 590, 615, 635, 660, 680, 705, 730, 750, 775, 800, 820, 845, 870, 895, 920, 940, 965, 990, 1015, 1040, 1065, 1090, 1115, 1140, 1165, 1190, 1215, 1240, 1265, 1290, 1315, 1340, 1370, 1395, 1420, 1445, 1475, 1500, 1525, 1550, 1575, 1605, 1630, 1660, 1685, 1710, 1740, 1765, 1790, 1820, 1845, 1875, 1900, 1930, 1955, 1980, 2010, 2035, 2065, 2095, 2120, 2150, 2175, 2205, 2230, 2260, 2290, 2315, 2345, 2375, 2400, 2430, 2460, 2485, 2515, 2545, 2570, 2600, 2630, 2660, 2690, 2715, 2745, 2775, 2805, 2830, 2860, 2890, 2920, 2950, 2980, 3010, 3040, 3065, 3095, 3125, 3155, 3185, 3215, 3245, 3275, 3305, 3335, 3365, 3395, 3425, 3455, 3485, 3515, 3545, 3575, 3605, 3635, 3670, 3700, 3730, 3760, 3790, 3820, 3850, 3880, 3910, 3945, 3975, 4005, 4035, 4065, 4100, 4130], 22: [10, 20, 30, 45, 60, 75, 95, 110, 130, 145, 165, 185, 205, 220, 240, 260, 280, 305, 325, 345, 365, 385, 410, 430, 450, 475, 495, 520, 540, 565, 590, 610, 635, 655, 680, 705, 730, 750, 775, 800, 825, 850, 875, 900, 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1180, 1205, 1230, 1255, 1280, 1310, 1335, 1360, 1390, 1415, 1440, 1465, 1495, 1520, 1550, 1575, 1605, 1630, 1655, 1685, 1715, 1740, 1770, 1795, 1825, 1850, 1880, 1905, 1935, 1965, 1990, 2020, 2050, 2075, 2105, 2135, 2160, 2190, 2220, 2250, 2275, 2305, 2335, 2365, 2395, 2420], - 23: [10, 20, 30, 45, 65, 80, 95, 115, 135, 150, 170, 190, 210, 230, 250, 270, 290, 310, 335, 355, 375, 400, 420, 445, 465, 490, 515, 535, 560, 585, 605, 630, 655, 680, 705, 730, 750, 775, 800, 825, 850, 875, 905, 930, 955, 980, 1005, 1030, 1055, 1085, 1110, 1135, 1160, 1190, 1215, 1240, 1270, 1295, 1325, 1350, 1375, 1405, 1430, 1460, 1485, 1515, 1545, 1570] //to be filled + 23: [10, 20, 30, 45, 65, 80, 95, 115, 135, 150, 170, 190, 210, 230, 250, 270, 290, 310, 335, 355, 375, 400, 420, 445, 465, 490, 515, 535, 560, 585, 605, 630, 655, 680, 705, 730, 750, 775, 800, 825, 850, 875, 905, 930, 955, 980, 1005, 1030, 1055, 1085, 1110, 1135, 1160, 1190, 1215, 1240, 1270, 1295, 1325, 1350, 1375, 1405, 1430, 1460, 1485, 1515, 1545, 1570, 1600, 1625, 1655, 1680, 1710, 1740, 1765, 1795, 1825, 1855, 1880, 1910, 1940, 1970, 1995, 2025, 2055, 2085, 2115, 2145, 2175, 2200, 2230, 2260, 2290, 2320, 2350, 2380, 2410, 2440, 2470, 2500, 2530, 2560, 2590, 2620, 2650, 2685, 2715, 2745, 2775, 2805, 2835, 2865, 2895, 2930, 2960, 2990, 3020, 3055, 3085, 3115, 3145] }, GreatBuildingsData: [ From d2e108f0b28b7c1fcbc34a21fa468e0b55d02dd0 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 092/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..f57a7dead 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -981,6 +981,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1b30f770e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..5004a0e3c 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From b89c13d8ec0e3e293abb30cff987a9089926a6ce Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 6 Dec 2024 18:11:39 +0100 Subject: [PATCH 093/130] slightly smaller menu, right menu as default --- css/web/_menu_bottom.css | 12 +-- css/web/_menu_box.css | 6 ++ css/web/_menu_right.css | 107 -------------------- css/web/boxes.css | 134 +++++++++++++++++++++++-- js/inject.js | 5 +- js/web/_helper/js/_helper.js | 2 +- js/web/_main/js/_main.js | 8 +- js/web/_menu/js/_menu.js | 16 +-- js/web/_menu_bottom/js/_menu_bottom.js | 2 +- js/web/_menu_right/js/_menu_right.js | 11 +- js/web/settings/js/settings.js | 2 +- 11 files changed, 157 insertions(+), 148 deletions(-) diff --git a/css/web/_menu_bottom.css b/css/web/_menu_bottom.css index 07457e0ed..3511623ce 100644 --- a/css/web/_menu_bottom.css +++ b/css/web/_menu_bottom.css @@ -15,11 +15,11 @@ left: 1035px; bottom: 0; width: 270px; - height: 48px; + height: 43px; border-radius: 2px 2px 0 0; transition: all 0.1s ease; border-bottom-width: 0; - background-color: #553419; + background-color: #301e0fcc; } .hud-bottom #foe-helper-hud-wrapper { @@ -32,7 +32,7 @@ .hud-bottom #foe-helper-hud-slider { position: absolute; left: 0; - top: 2px; + top: 0; transition: left 0.7s ease-in-out; height: inherit; } @@ -43,9 +43,9 @@ .hud-bottom .hud-btn span:first-child { display: inline-flex; - width: 76%; - height: 76%; - margin-top: 12%; + width: 80%; + height: 80%; + margin-top: 10%; } .hud-bottom .hud-btn span.hud-counter { diff --git a/css/web/_menu_box.css b/css/web/_menu_box.css index bbfc1936f..9ef84d91f 100644 --- a/css/web/_menu_box.css +++ b/css/web/_menu_box.css @@ -11,3 +11,9 @@ * ************************************************************************************** */ +#menu_box .hud-btn span:first-child { + display: inline-flex; + width: 80%; + height: 80%; + margin-top: 10%; +} \ No newline at end of file diff --git a/css/web/_menu_right.css b/css/web/_menu_right.css index 24cf65c08..bbfc1936f 100644 --- a/css/web/_menu_right.css +++ b/css/web/_menu_right.css @@ -11,110 +11,3 @@ * ************************************************************************************** */ - -#foe-helper-hud.hud-right { - right: 0; - top: 400px; - width: 51px; - height: 270px; - border-radius: 4px 0 0 4px; - transition: height 0.2s linear; - border-width: 0; - background-color: #301e0fcc; -} - -.hud-right::before { - top: 0; - border-bottom: 2px solid #755b43; -} - -.hud-right::after { - border-top: 2px solid #755b43; - left: 0; - bottom: 0; -} - -.hud-right #foe-helper-hud-wrapper { - width: inherit; - height: 218px; - right: 0; - top: 1px; -} - -.hud-right #foe-helper-hud-slider { - position: absolute; - top: 0; - right: 0; - transition: top 0.7s ease-in-out; -} - -.hud-right .hud-btn { - height: 47px; - width: 48px; - margin-bottom: 2px; -} - -.hud-right .menu-placeholder { - width: 49px; - height: 49px; -} - -.hud-right .hud-btn span.hud-counter { - padding: 2px; - width: 16px; - height: 16px; - bottom: 2px; - left: 2px; - line-height: 16px; -} - -.hud-btn-up, -.hud-btn-down { - position: absolute; - width: 50px; - height: 14px; - right: 0; - display: block; - z-index: 1; - box-shadow: 0 0 1px 1px var(--black-50); -} - -.hud-btn-up-active, .hud-btn-down-active { - background: var(--background-hud-btn); -} - -.hud-btn-up-active:hover, .hud-btn-down-active:hover { - filter: brightness(1.3) contrast(1.1); -} - -.hud-btn-up-active { - top: -15px; - border-radius: 5px 0 0 0; -} - -.hud-btn-down-active { - bottom: -14px; - border-radius: 0 0 0 5px; -} - -.hud-btn-up::before, -.hud-btn-down::before { - content: ''; - display: block; - position: absolute; - right: 30%; - top: 2px; - width: 0; - height: 0; - border-left: 12px solid transparent; - border-right: 12px solid transparent; -} - -.hud-btn-up::before { - border-bottom: 9px solid #48291b; -} - -.hud-btn-down::before { - bottom: 1px; - border-top: 9px solid #48291b; -} \ No newline at end of file diff --git a/css/web/boxes.css b/css/web/boxes.css index 0432dcbb9..955583524 100644 --- a/css/web/boxes.css +++ b/css/web/boxes.css @@ -1728,7 +1728,6 @@ input[type="range"]::-webkit-slider-thumb { font-size: 0.75rem; font-weight: 400; box-sizing: border-box; - border: 2px solid #755b43; box-shadow: 0 0 1px 1px var(--black-50); } @@ -1752,7 +1751,6 @@ input[type="range"]::-webkit-slider-thumb { } .hud-btn-left, .hud-btn-right { - border: 2px solid #624d3a; border-bottom-width: 0; } @@ -1777,7 +1775,7 @@ input[type="range"]::-webkit-slider-thumb { } .hud-btn-right-active { - right: -13px; + right: -14px; } .hud-btn-left-active { @@ -1797,7 +1795,7 @@ input[type="range"]::-webkit-slider-thumb { border-bottom: 12px solid transparent; position: relative; top: 25%; - left: 2px; + left: 4px; } .hud-btn-left-active::before { @@ -1817,16 +1815,16 @@ input[type="range"]::-webkit-slider-thumb { } .hud-btn { - width: 43px; - height: 43px; + width: 40px; + height: 40px; margin: 1px; display: block; position: relative; box-sizing: border-box; border: 2px solid transparent; border-radius: 4px; - box-shadow: inset 0 0 1px 2px #1f1309cc, 0 0 2px #00000087; - background: linear-gradient(#553419, #553419) padding-box, linear-gradient(to bottom, #82ae4c, #4f7421) border-box; + box-shadow: inset 0 0 1px 1px #1f1309cc, 0 0 2px #000000c9; + background: linear-gradient(#4d2e16, #492d16) padding-box, linear-gradient(to bottom, #82ae4c, #4f7421) border-box; text-align: center; } @@ -1843,9 +1841,9 @@ input[type="range"]::-webkit-slider-thumb { background-repeat: no-repeat; background-size: contain; display: inline-flex; - width: 70%; - height: 70%; - margin-top: 15%; + width: 76%; + height: 76%; + margin-top: 12%; } .hud-btn span.hud-counter { @@ -1867,6 +1865,120 @@ input[type="range"]::-webkit-slider-thumb { font-size: 0.8rem; } + +#foe-helper-hud.hud-right { + right: 0; + top: 400px; + width: 49px; + height: 270px; + border-radius: 4px 0 0 4px; + transition: height 0.2s linear; + border-width: 0; + background-color: #301e0fcc; +} + +.hud-right::before { + top: 0; + border-bottom: 2px solid #755b43; +} + +.hud-right::after { + border-top: 2px solid #755b43; + left: 0; + bottom: 0; +} + +.hud-right #foe-helper-hud-wrapper { + width: inherit; + height: 218px; + right: 0; + top: 1px; +} + +.hud-right #foe-helper-hud-slider { + position: absolute; + top: 0; + right: 0; + transition: top 0.7s ease-in-out; +} + +.hud-right .hud-btn { + height: 45px; + width: 46px; + margin-bottom: 2px; +} + +.hud-right .menu-placeholder { + width: 49px; + height: 49px; +} + +.hud-right .hud-btn span.hud-counter { + padding: 2px; + width: 16px; + height: 16px; + bottom: 2px; + left: 2px; + line-height: 16px; +} + +.hud-right .hud-btn-up, +.hud-right .hud-btn-down { + position: absolute; + width: 49px; + height: 14px; + right: 0; + z-index: 1; +} + +.hud-right .hud-btn-up { + top: -14px; +} + +.hud-right .hud-btn-down { + bottom: -14px; +} + +.hud-btn-up-active, .hud-btn-down-active { + background: var(--background-hud-btn); +} + +.hud-btn-up-active:hover, .hud-btn-down-active:hover { + filter: brightness(1.3) contrast(1.1); +} + +.hud-btn-up-active { + top: -15px; + border-radius: 5px 0 0 0; +} + +.hud-btn-down-active { + bottom: -14px; + border-radius: 0 0 0 5px; +} + +.hud-btn-up::before, +.hud-btn-down::before { + content: ''; + display: block; + position: absolute; + right: 25%; + top: 2px; + width: 0; + height: 0; + border-left: 12px solid transparent; + border-right: 12px solid transparent; +} + +.hud-btn-up::before { + border-bottom: 9px solid #48291b; +} + +.hud-btn-down::before { + bottom: 1px; + border-top: 9px solid #48291b; +} + .menu-placeholder { background: var(--black-50); border-radius: 4px; diff --git a/js/inject.js b/js/inject.js index 7984a5998..fc4568c54 100644 --- a/js/inject.js +++ b/js/inject.js @@ -132,7 +132,7 @@ function inject (loadBeta = false, extUrl = chrome.runtime.getURL(''), betaDate= // Document loaded if(document.head !== null){ let MenuSetting = localStorage.getItem('SelectedMenu'); - MenuSetting = MenuSetting ? MenuSetting : 'BottomBar'; + MenuSetting = MenuSetting ? MenuSetting : 'RightBar'; let cssname = "_menu_" + MenuSetting.toLowerCase().replace("bar",""); let cssFiles = [ @@ -143,8 +143,7 @@ function inject (loadBeta = false, extUrl = chrome.runtime.getURL(''), betaDate= ]; // insert stylesheet - for(let i in cssFiles) - { + for(let i in cssFiles) { if(!cssFiles.hasOwnProperty(i)) { break; } diff --git a/js/web/_helper/js/_helper.js b/js/web/_helper/js/_helper.js index 1d236e6e5..2bc260227 100644 --- a/js/web/_helper/js/_helper.js +++ b/js/web/_helper/js/_helper.js @@ -855,7 +855,7 @@ let HTML = { icon: d['type'], hideAfter: d['hideAfter'], position: Settings.GetSetting('NotificationsPosition', true), - extraClass: localStorage.getItem('SelectedMenu') || 'bottombar', + extraClass: localStorage.getItem('SelectedMenu') || 'RightBar', stack: localStorage.getItem('NotificationStack') || 4 }); }, diff --git a/js/web/_main/js/_main.js b/js/web/_main/js/_main.js index 537213616..4e2a474c7 100644 --- a/js/web/_main/js/_main.js +++ b/js/web/_main/js/_main.js @@ -814,13 +814,13 @@ GetFights = () =>{ GameTimeOffset = data.responseData.time * 1000 - new Date().getTime(); GameTime = data.responseData.time; if (MainMenuLoaded) return; + MainMenuLoaded = true; await StartUpDone; let MenuSetting = localStorage.getItem('SelectedMenu'); - MenuSetting = MenuSetting || 'BottomBar'; - MainParser.SelectedMenu = MenuSetting; - _menu.CallSelectedMenu(MenuSetting); + MainParser.SelectedMenu = MenuSetting || 'RightBar'; + _menu.CallSelectedMenu(MainParser.SelectedMenu); MainParser.setLanguage(); @@ -916,7 +916,7 @@ let MainParser = { savedFight: null, DebugMode: false, Language: 'en', - SelectedMenu: 'BottomBar', + SelectedMenu: 'RightBar', i18n: null, BonusService: null, Boosts: {}, diff --git a/js/web/_menu/js/_menu.js b/js/web/_menu/js/_menu.js index b65f47e4b..bdad9fb2a 100644 --- a/js/web/_menu/js/_menu.js +++ b/js/web/_menu/js/_menu.js @@ -15,7 +15,7 @@ let _menu = { isBottom: false, - selectedMenu: 'BottomBar', + selectedMenu: 'RightBar', MenuScrollTop: 0, MenuScrollLeft: 0, SlideParts: 0, @@ -77,20 +77,22 @@ let _menu = { * @param selMenu * @constructor */ - CallSelectedMenu: (selMenu = 'BottomBar') => { + CallSelectedMenu: (selMenu = 'RightBar') => { + console.log(selMenu) + window.onresize = (function(event){ if (event.target == window) _menu.OverflowCheck() }) - if (selMenu === 'BottomBar') { - _menu.selectedMenu = 'BottomBar'; - _menu_bottom.BuildOverlayMenu(); - } - else if (selMenu === 'RightBar') { + if (selMenu === 'RightBar') { _menu.selectedMenu = 'RightBar'; _menu_right.BuildOverlayMenu(); } + else if (selMenu === 'BottomBar') { + _menu.selectedMenu = 'BottomBar'; + _menu_bottom.BuildOverlayMenu(); + } else if (selMenu === 'Box') { _menu.selectedMenu = 'Box'; _menu_box.BuildBoxMenu(); diff --git a/js/web/_menu_bottom/js/_menu_bottom.js b/js/web/_menu_bottom/js/_menu_bottom.js index 28dce550a..33e8423c5 100644 --- a/js/web/_menu_bottom/js/_menu_bottom.js +++ b/js/web/_menu_bottom/js/_menu_bottom.js @@ -13,7 +13,7 @@ let _menu_bottom = { - btnSize: 45, + btnSize: 42, /** * Create the div holders and put them to the DOM diff --git a/js/web/_menu_right/js/_menu_right.js b/js/web/_menu_right/js/_menu_right.js index cf0f87c51..8591000db 100644 --- a/js/web/_menu_right/js/_menu_right.js +++ b/js/web/_menu_right/js/_menu_right.js @@ -23,7 +23,6 @@ let _menu_right = { hudWrapper.append(hudInner); - let btnUp = $('').addClass('hud-btn-up'), btnDown = $('').addClass('hud-btn-down hud-btn-down-active'); @@ -31,18 +30,15 @@ let _menu_right = { hud.append(hudWrapper) hud.append(btnDown); - // Wenn sie die Fenstergröße verändert, neu berechnen window.onresize = function (event) { if (event.target == window) _menu_right.SetMenuHeight(true); }; $('body').append(hud).ready(function () { - // Buttons einfügen _menu.ListLinks(_menu_right.InsertMenuItem); _menu_right.CheckButtons(); - // korrekten Platz für das Menu ermitteln _menu_right.SetMenuHeight(); window.dispatchEvent(new CustomEvent('foe-helper#menu_loaded')); @@ -100,21 +96,23 @@ let _menu_right = { _menu.HudCount = Math.floor((($(window).outerHeight() - 25) - $('#foe-helper-hud').offset().top) / 48); _menu.HudCount = Math.min(_menu.HudCount, MenuItemCount); + console.log(($(window).outerHeight() - 23)) if (_menu.HudCount <= 0) { $('#foe-helper-hud').remove(); _menu.CallSelectedMenu('Box') } - // hat der Spieler eine Länge vorgebeben? + // has a length been set manually? let MenuLength = localStorage.getItem('MenuLength'); if (MenuLength !== null && MenuLength < _menu.HudCount) { _menu.HudCount = _menu.HudLength = parseInt(MenuLength); } - _menu.HudHeight = (_menu.HudCount * 49); + _menu.HudHeight = (_menu.HudCount * 47); _menu.SlideParts = Math.ceil(MenuItemCount / _menu.HudCount); + console.log(_menu.HudCount, MenuItemCount, _menu.HudHeight, _menu.SlideParts); $('#foe-helper-hud').height(_menu.HudHeight + 2); $('#foe-helper-hud-wrapper').height(_menu.HudHeight); @@ -128,7 +126,6 @@ let _menu_right = { let activeIdx = 0; - $('.hud-btn').click(function () { activeIdx = $(this).index('.hud-btn'); }); diff --git a/js/web/settings/js/settings.js b/js/web/settings/js/settings.js index 295c0e3cd..9485a0a97 100644 --- a/js/web/settings/js/settings.js +++ b/js/web/settings/js/settings.js @@ -641,7 +641,7 @@ let Settings = { icon: 'success', hideAfter: 6000, position: pos, - extraClass: localStorage.getItem('SelectedMenu') || 'bottombar', + extraClass: localStorage.getItem('SelectedMenu') || 'RightBar', afterHidden: function () { $('.jq-toast-wrap').remove(); } From 1af313c70dcab7f6abe05e6c8547d17c7bb65365 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 6 Dec 2024 18:14:52 +0100 Subject: [PATCH 094/130] remove debug stuff --- js/web/_menu/js/_menu.js | 2 -- js/web/_menu_right/js/_menu_right.js | 2 -- 2 files changed, 4 deletions(-) diff --git a/js/web/_menu/js/_menu.js b/js/web/_menu/js/_menu.js index bdad9fb2a..382606779 100644 --- a/js/web/_menu/js/_menu.js +++ b/js/web/_menu/js/_menu.js @@ -79,8 +79,6 @@ let _menu = { */ CallSelectedMenu: (selMenu = 'RightBar') => { - console.log(selMenu) - window.onresize = (function(event){ if (event.target == window) _menu.OverflowCheck() }) diff --git a/js/web/_menu_right/js/_menu_right.js b/js/web/_menu_right/js/_menu_right.js index 8591000db..02236af33 100644 --- a/js/web/_menu_right/js/_menu_right.js +++ b/js/web/_menu_right/js/_menu_right.js @@ -96,7 +96,6 @@ let _menu_right = { _menu.HudCount = Math.floor((($(window).outerHeight() - 25) - $('#foe-helper-hud').offset().top) / 48); _menu.HudCount = Math.min(_menu.HudCount, MenuItemCount); - console.log(($(window).outerHeight() - 23)) if (_menu.HudCount <= 0) { $('#foe-helper-hud').remove(); @@ -112,7 +111,6 @@ let _menu_right = { _menu.HudHeight = (_menu.HudCount * 47); _menu.SlideParts = Math.ceil(MenuItemCount / _menu.HudCount); - console.log(_menu.HudCount, MenuItemCount, _menu.HudHeight, _menu.SlideParts); $('#foe-helper-hud').height(_menu.HudHeight + 2); $('#foe-helper-hud-wrapper').height(_menu.HudHeight); From 0197acfce09f7e8d7cd6b37230344e03856b7094 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 6 Dec 2024 19:40:34 +0100 Subject: [PATCH 095/130] GBG #3113 --- changelog-de.md | 2 ++ changelog-en.md | 2 ++ js/web/_main/js/_main.js | 2 +- js/web/guildfights/css/guildfights.css | 2 +- js/web/guildfights/js/guildfights.js | 14 +++++++++++--- 5 files changed, 17 insertions(+), 5 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index 626c107ae..ba2a04287 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -15,6 +15,8 @@ - Gebäude-Tooltips hinzugefügt - Ergebnisseite wird nun zuerst angezeigt - Itemliste versteckt +- Menü: Von unten nach rechts verschoben, weil die möglichen Einstellungen gerne übersehen werden +- Gefechte: Symbole für blauen/roten Angriff in die Liste hinzugefügt **BugFix** - Tooltip: diff --git a/changelog-en.md b/changelog-en.md index 5af65834c..42604ae7f 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -15,6 +15,8 @@ - Added building tooltips - Results will now be shown first - Item list hidden to make the table less crowded +- Menu: Moved it back to the right (default was bottom), because of a game update and y'all do not look at settings +- GBG: Added symbols for the battle type (red/blue) to the countdown list **BugFix** - Tooltip: diff --git a/js/web/_main/js/_main.js b/js/web/_main/js/_main.js index 4e2a474c7..2df438ad6 100644 --- a/js/web/_main/js/_main.js +++ b/js/web/_main/js/_main.js @@ -417,7 +417,7 @@ GetFights = () =>{ MainParser.UpdateActiveMap('gex'); }); - // gg is entered + // GBG is entered FoEproxy.addHandler('GuildBattlegroundService', 'getBattleground', (data, postData) => { MainParser.UpdateActiveMap('gg'); }); diff --git a/js/web/guildfights/css/guildfights.css b/js/web/guildfights/css/guildfights.css index 3dc1f0d2f..4630159b8 100644 --- a/js/web/guildfights/css/guildfights.css +++ b/js/web/guildfights/css/guildfights.css @@ -391,7 +391,7 @@ #LiveGildFightingBody #progress tr td:first-child, #LiveGildFightingBody #nextup tr td:first-child { - width: 60px; + width: 69px; } #LiveGildFightingBody table.foe-table tr.highlight-row { diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index bdfe60ee7..7ae8b044f 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -1177,7 +1177,7 @@ let GuildFights = { // If sectors doesnt belong to anyone if (mapdata[i]['ownerId'] === undefined && mapdata[i]['conquestProgress'].length > 0) { progress.push(`
    ${mapdata[i]['title']} ${GuildFights.MapData['title']}${i18n('Boxes.GuildFights.NoOwner')}
    ${prov[x]['title']}`) + nextup.push(` `) + nextup.push(battleType) + nextup.push(` ${prov[x]['title']} `) + nextup.push(`
    `; + htmltext += `
    ${i18n('Boxes.BetterMusic.Scenes')}
    ${i18n('Boxes.BetterMusic.TitleName')}
    >`; for (let scene in betterMusic.Scenes) { htmltext += ``; } - htmltext += ``; + htmltext += ``; for (let title in betterMusic.PossibleTracks) { htmltext += ``; diff --git a/js/web/bluegalaxy/css/bluegalaxy.css b/js/web/bluegalaxy/css/bluegalaxy.css index 7fce396ac..5095723e9 100644 --- a/js/web/bluegalaxy/css/bluegalaxy.css +++ b/js/web/bluegalaxy/css/bluegalaxy.css @@ -78,12 +78,6 @@ display: block; } -#bluegalaxy table th { - position: sticky; - top: 0px; - z-index: 1; -} - #bluegalaxy table th[data-type] { cursor: pointer } diff --git a/js/web/bluegalaxy/js/bluegalaxy.js b/js/web/bluegalaxy/js/bluegalaxy.js index e5de7cf36..a11c3253e 100644 --- a/js/web/bluegalaxy/js/bluegalaxy.js +++ b/js/web/bluegalaxy/js/bluegalaxy.js @@ -249,7 +249,7 @@ let BlueGalaxy = { table.push('
    ${i18n('Boxes.BetterMusic.Scenes')}
    ${i18n('Boxes.BetterMusic.TitleName')}${betterMusic.Scenes[scene].Name}
    ${betterMusic.PossibleTracks[title].Name}
    '); - table.push('' + + table.push('' + '' + ''+ '' + diff --git a/js/web/boost_inventory/css/boost_inventory.css b/js/web/boost_inventory/css/boost_inventory.css index cc4218774..633beec67 100644 --- a/js/web/boost_inventory/css/boost_inventory.css +++ b/js/web/boost_inventory/css/boost_inventory.css @@ -23,10 +23,7 @@ margin-left: 9px; } #BoostInventory thead { - position: sticky; - top: 0px; font-weight: 600; - z-index: 100; } #BoostInventory td:nth-child(3), #BoostInventory th:nth-child(3) { text-align: center; diff --git a/js/web/boost_inventory/js/boost_inventory.js b/js/web/boost_inventory/js/boost_inventory.js index 643868612..f0523c345 100644 --- a/js/web/boost_inventory/js/boost_inventory.js +++ b/js/web/boost_inventory/js/boost_inventory.js @@ -94,7 +94,7 @@ let BoostInventory = { c.push(`
    ' + i18n('Boxes.BlueGalaxy.Building') + '
    `) - c.push('') + c.push('') c.push('') c.push('') diff --git a/js/web/castle/css/castle.css b/js/web/castle/css/castle.css index 1ad941ddc..dc23dae49 100644 --- a/js/web/castle/css/castle.css +++ b/js/web/castle/css/castle.css @@ -41,8 +41,6 @@ #Castle .castle_wrapper .foe-table tr th { border-top: 1px solid var(--border-table-top); border-bottom: 1px solid var(--border-table-bottom); - position: sticky; - top: 0; } #Castle .castle_wrapper .icon { diff --git a/js/web/castle/js/castle.js b/js/web/castle/js/castle.js index 0fb46a2a8..e91dcf0e0 100644 --- a/js/web/castle/js/castle.js +++ b/js/web/castle/js/castle.js @@ -894,7 +894,7 @@ let Castle = { if (!Castle.Settings.showGroupNames) { - h.push(``); + h.push(``); } h.push(``); diff --git a/js/web/compare_friends_threads/css/compare_friends_threads.css b/js/web/compare_friends_threads/css/compare_friends_threads.css index 7bc7f4a58..2a1b86e04 100644 --- a/js/web/compare_friends_threads/css/compare_friends_threads.css +++ b/js/web/compare_friends_threads/css/compare_friends_threads.css @@ -23,11 +23,9 @@ } #friendsCompareTable th { - position: sticky; - top: 0px; - text-align: center; - z-index: 1; + text-align: center; } + #friendsCompareTable th:not(:first-child) span { writing-mode: vertical-lr; transform: rotate(180deg); diff --git a/js/web/compare_friends_threads/js/compare_friends_threads.js b/js/web/compare_friends_threads/js/compare_friends_threads.js index b0528c138..d355922d1 100644 --- a/js/web/compare_friends_threads/js/compare_friends_threads.js +++ b/js/web/compare_friends_threads/js/compare_friends_threads.js @@ -166,7 +166,7 @@ let CompareFriendsThreads = { t.push('
    ${i18n('Boxes.Castle.Type')}${HTML.i18nTooltip(i18n('Boxes.Castle.Progress'))}${HTML.i18nTooltip(i18n('Boxes.Castle.CastlePoints'))}
    ${i18n('Boxes.Castle.Type')}${HTML.i18nTooltip(i18n('Boxes.Castle.Progress'))}${HTML.i18nTooltip(i18n('Boxes.Castle.CastlePoints'))}
    '); - t.push(''); + t.push(''); t.push(''); t.push(''); @@ -182,6 +182,8 @@ let CompareFriendsThreads = { } t.push(''); + t.push(''); + t.push(''); let PlayerList = Object.values(PlayerDict).filter(obj => (obj['IsFriend'] === true)); diff --git a/js/web/findGB/css/findGB.css b/js/web/findGB/css/findGB.css index 21425b138..2c432c97d 100644 --- a/js/web/findGB/css/findGB.css +++ b/js/web/findGB/css/findGB.css @@ -21,11 +21,6 @@ overflow: auto; } -#foundGB th { - position:sticky; - top:0px; -} - #foundGB .progress { background: linear-gradient(90deg, var(--background-table-success) 0, var(--background-table-success) var(--p), transparent var(--p), transparent) } diff --git a/js/web/findGB/js/findGB.js b/js/web/findGB/js/findGB.js index e9f12284f..76713a0a3 100644 --- a/js/web/findGB/js/findGB.js +++ b/js/web/findGB/js/findGB.js @@ -53,7 +53,7 @@ let findGB = { } html = ``; - html += `
     
    `; + html += `
    `; html += ``; html += ``; html += `
    `; - html += `` + html += `
    ${i18n("General.Player")}${i18n("General.GB")}${i18n("General.Level")}
    ` for (i of findGB.found) { html += findGB.row(i) diff --git a/js/web/fp-collector/css/fp-collector.css b/js/web/fp-collector/css/fp-collector.css index 187bbcef4..734d5c47e 100644 --- a/js/web/fp-collector/css/fp-collector.css +++ b/js/web/fp-collector/css/fp-collector.css @@ -27,9 +27,6 @@ justify-content: space-between; align-items: center; padding: 2px 5px; - position: sticky; - top: 0; - z-index: 1; } #fp-collectorBody .btn-tight { diff --git a/js/web/fp-collector/js/fp-collector.js b/js/web/fp-collector/js/fp-collector.js index 25f92f358..aefc624aa 100644 --- a/js/web/fp-collector/js/fp-collector.js +++ b/js/web/fp-collector/js/fp-collector.js @@ -387,7 +387,7 @@ let FPCollector = { } $('#fp-collectorBody').append( - `
    + `
    ${i18n('Boxes.FPCollector.Total')} ${i18n('Boxes.FPCollector.FP')}
    `, diff --git a/js/web/gexstat/css/gexstat.css b/js/web/gexstat/css/gexstat.css index dc9c3de98..a32a370be 100644 --- a/js/web/gexstat/css/gexstat.css +++ b/js/web/gexstat/css/gexstat.css @@ -174,12 +174,6 @@ width: 50px; } -#GexStatBody table thead.sticky th { - position: sticky; - top: 0; - z-index: 1; -} - #GexStat table tbody td.progress { border-left: 1px solid var(--border-table-top); border-right: 1px solid var(--border-table-top); diff --git a/js/web/greatbuildings/css/greatbuildings.css b/js/web/greatbuildings/css/greatbuildings.css index 253f79d26..4240ff802 100644 --- a/js/web/greatbuildings/css/greatbuildings.css +++ b/js/web/greatbuildings/css/greatbuildings.css @@ -43,10 +43,7 @@ } #greatbuildings #greatbuildingsBody table th { - position: sticky; - top: 0; cursor: pointer; - z-index: 1; font-size: 85%; } diff --git a/js/web/greatbuildings/js/greatbuildings.js b/js/web/greatbuildings/js/greatbuildings.js index 946dde991..2e3757224 100644 --- a/js/web/greatbuildings/js/greatbuildings.js +++ b/js/web/greatbuildings/js/greatbuildings.js @@ -357,7 +357,7 @@ let GreatBuildings = h.push('
    ${i18n("General.Player")}${i18n("General.GB")}${i18n("General.Level")}
    '); - h.push(''); + h.push(''); h.push(''); h.push(''); h.push(''); diff --git a/js/web/guildfights/css/guildfights.css b/js/web/guildfights/css/guildfights.css index 4630159b8..9b17b44b0 100644 --- a/js/web/guildfights/css/guildfights.css +++ b/js/web/guildfights/css/guildfights.css @@ -45,8 +45,6 @@ #GildPlayersBody tr th, #GildPlayersDetailViewBody tr th { - position: sticky; - top: 0; background-color: rgba(0, 0, 0, 0.45); line-height: 25px; @@ -167,17 +165,10 @@ padding: 0; } - #GildPlayersDetailViewBody .datetimepicker { padding: 2px 0 0 2px; background-color: rgba(0, 0, 0, 0.45); height: 28px; - position: sticky; - top: 0; -} - -#GildPlayersDetailViewBody .gbglog th { - top: 30px; } #GildPlayersDetailViewBody .sorter-header th { diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index ad702f260..27f93a165 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -769,7 +769,7 @@ let GuildFights = { t.push('
    ' + i18n('Boxes.GreatBuildings.GreatBulding') + '' + i18n('Boxes.GreatBuildings.Level') + '
    '); - t.push(''); + t.push(''); t.push(''); t.push(''); @@ -890,7 +890,7 @@ let GuildFights = { h.push('
    ' + playerName + ': ' + moment.unix(gbground).subtract(11, 'd').format(i18n('DateShort')) + ` - ` + moment.unix(gbground).format(i18n('Date')) + '
    '); h.push('

    ' + i18n('Boxes.GuildFights.SnapShotLogDisclaimer') + '

    ') - h.push('
    '); + h.push('
    '); h.push(''); h.push(''); h.push(''); @@ -921,7 +921,7 @@ let GuildFights = { detaildata.sort(function (a, b) { return b.time - a.time }); - h.push('
    '); + h.push('
    '); h.push('
    ' + i18n('Boxes.GuildFights.Date') + '
    '); h.push(''); h.push(''); diff --git a/js/web/guildmemberstat/css/guildmemberstat.css b/js/web/guildmemberstat/css/guildmemberstat.css index e1209a72a..952d63bc6 100644 --- a/js/web/guildmemberstat/css/guildmemberstat.css +++ b/js/web/guildmemberstat/css/guildmemberstat.css @@ -189,10 +189,7 @@ #GuildMemberStatBody table th { line-height: 23px; - position: sticky; - top: 0; cursor: pointer; - z-index: 10; } #GuildMemberStatBody .detail-item>table th { diff --git a/js/web/guildmemberstat/js/guildmemberstat.js b/js/web/guildmemberstat/js/guildmemberstat.js index 462ba368d..0c0a668fa 100644 --- a/js/web/guildmemberstat/js/guildmemberstat.js +++ b/js/web/guildmemberstat/js/guildmemberstat.js @@ -968,7 +968,7 @@ let GuildMemberStat = { h.push(``); h.push(`
    `); h.push('
    ' + i18n('Boxes.GuildFights.Date') + '
    '); - h.push('' + + h.push('' + '' + `` + `` + @@ -1273,7 +1273,7 @@ let GuildMemberStat = { // Create Inactivity Overview if (Member['activity'] !== undefined) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.Member')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.Inactivity')}${i18n('Boxes.GuildMemberStat.Date')}
    `); let warnings = Member['activity']; @@ -1305,7 +1305,7 @@ let GuildMemberStat = { // Create GEX Overview if (Member['gex'] !== undefined) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.Inactivity')}${i18n('Boxes.GuildMemberStat.Date')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GEXWeek')}${i18n('Boxes.GuildMemberStat.Rank')}${i18n('Boxes.GuildMemberStat.Points')}${i18n('Boxes.GuildMemberStat.Level')}
    `); let gex = Member['gex']; for (let i in gex) { @@ -1335,7 +1335,7 @@ let GuildMemberStat = { // Create GBG Overview if (Member['gbg'] !== undefined) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.GEXWeek')}${i18n('Boxes.GuildMemberStat.Rank')}${i18n('Boxes.GuildMemberStat.Points')}${i18n('Boxes.GuildMemberStat.Level')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GBFRound')}${i18n('Boxes.GuildMemberStat.Rank')}${i18n('Boxes.GuildMemberStat.Battles')}${i18n('Boxes.GuildMemberStat.Negotiations')}
    `); let gbg = Member['gbg']; @@ -1376,7 +1376,7 @@ let GuildMemberStat = { let totalGoods = 0; let totalPower = 0; - d.push(`
    ${i18n('Boxes.GuildMemberStat.GBFRound')}${i18n('Boxes.GuildMemberStat.Rank')}${i18n('Boxes.GuildMemberStat.Battles')}${i18n('Boxes.GuildMemberStat.Negotiations')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildSupportBuildings')} (${i18n('Boxes.GuildMemberStat.LastUpdate') + ' ' + moment(guildbuildings.date).fromNow()})
    `); // Group GuildGoods buildings by name and their era let guildGoodsBuildings = guildbuildings['buildings'].filter(function (data) { return data.resources !== undefined }).reduce(function (res, obj) { @@ -1413,7 +1413,7 @@ let GuildMemberStat = { if (guildGoodsBuildings.length) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildSupportBuildings')} (${i18n('Boxes.GuildMemberStat.LastUpdate') + ' ' + moment(guildbuildings.date).fromNow()})
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildGoods')}
    `); guildGoodsBuildings.forEach(plbuilding => { let goodslist = ''; @@ -1452,7 +1452,7 @@ let GuildMemberStat = { if (guildPowerBuildings.length) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildGoods')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildPower')}
    `); guildPowerBuildings.forEach(plbuilding => { let countBuilding = typeof plbuilding.count != 'undefined' ? plbuilding.count : 1; @@ -1604,7 +1604,7 @@ let GuildMemberStat = { if (EraGroup) { d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildPower')}
    ` + - `` + + `` + `` + `` + ``); @@ -1728,7 +1728,7 @@ let GuildMemberStat = { let h = []; h.push(``); - nextup.push(``); From c7a0d5a05071096489cf4e16a775338e88428fe0 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 21 Dec 2024 06:49:52 +0100 Subject: [PATCH 119/130] remove other guild activity --- js/web/_i18n/de.json | 3 -- js/web/_i18n/en.json | 3 -- js/web/_i18n/fr.json | 3 -- js/web/_i18n/ja.json | 3 -- js/web/_i18n/nl.json | 3 -- js/web/_i18n/sr_Latn.json | 3 -- js/web/guildfights/js/guildfights.js | 50 +--------------------------- js/web/settings/config/config.json | 6 ---- 8 files changed, 1 insertion(+), 73 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 910726ebb..57ca5f35d 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -1504,9 +1504,6 @@ "Settings.Entry.ShowGBGBuildings": "GG Gebäude Empfehlung", "Settings.ShowGBGBuildings.Title": "GG Gebäude Empfehlung anzeigen", "Settings.ShowGBGBuildings.Desc": "Zeigt beim Öffnen des Baumenüs einer GG Provinz eine Tabelle an mit den möglichen Gebäudekombinationen die besser sind als die aktuell vorhandene, sortiert nach relativer Beanspruchung der Gildenkasse.", - "Settings.Entry.ShowOtherGuildActivity": "GG Aktive Spieler", - "Settings.ShowOtherGuildActivity.Title": "Aktive Spieler anderer Gilde", - "Settings.ShowOtherGuildActivity.Desc": "Wenn sich beim Besuch anderer Gilden die Anzahl Kämpfe der Spieler in kurzer Zeit geändert haben, wird eine Liste mit den aktiven Spielern ausgegeben.", "Settings.ShowPvPArena.Title": "PvP-Arena-Protokoll", "Settings.ShowPvPArena.Desc": "Soll das PvP-Arena-Protokoll angezeigt werden, wenn die PvP-Arena geöffnet wird?", "Settings.Tab.About": "Info + Website", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 8de63d88d..154db7821 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -1501,9 +1501,6 @@ "Settings.Entry.ShowGBGBuildings": "GBG Building Recommendation", "Settings.ShowGBGBuildings.Title": "Show GBG Building Recommendation", "Settings.ShowGBGBuildings.Desc": "When opening the building menu in a GBG Province, a table is displayed, showing the possible building combinations that would be better than the current one, sorted by their relative impact on the Guild Treasury.", - "Settings.Entry.ShowOtherGuildActivity": "GBG Active Players", - "Settings.ShowOtherGuildActivity.Title": "Other Guilds Active Players", - "Settings.ShowOtherGuildActivity.Desc": "If when visiting other guilds, the number of battles of any Player changed, a List of active players is shown.", "Settings.ShowPvPArena.Title": "PvP-Arena-Protocol", "Settings.ShowPvPArena.Desc": "Show PvP-Arena-Protocol, when opening the PvP-Arena?", "Settings.Tab.About": "Info + Website", diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index c6803e315..97f5fb431 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -1412,7 +1412,6 @@ "Settings.Entry.ShowMapTradeWarning": "Bloqueur de négociation", "Settings.Entry.ShowMarketFilter": "Filtre de marché", "Settings.Entry.ShowNotifications": "Notifications", - "Settings.Entry.ShowOtherGuildActivity": "Joueurs actifs en CbG", "Settings.Entry.ShowOwnPartOnAllGBs": "Calculatrice GM", "Settings.Entry.ShowPlayersMotivation": "Activité PO/MO", "Settings.Entry.ShowPotions": "Potions de bataille", @@ -1489,8 +1488,6 @@ "Settings.ShowMarketFilter.Title": "Afficher l'outil de filtrage du marché", "Settings.ShowNotifications.Desc": "FoE Helper utilise des notifications à divers endroits. Vous pouvez les activer ou les désactiver ici.", "Settings.ShowNotifications.Title": "Notifications", - "Settings.ShowOtherGuildActivity.Desc": "Si lors de la visite d'autres guildes, le nombre de batailles d'un joueur a changé, une liste des joueurs actifs s'affiche.", - "Settings.ShowOtherGuildActivity.Title": "Joueurs actifs des autres guildes", "Settings.ShowOwnPartBP.Desc": "Afficher les plans", "Settings.ShowOwnPartMedals.Desc": "Afficher les médailles", "Settings.ShowOwnPartOnAllGBs.Desc": "Modifie la 'Calculatrice GM interne' pour les GM des autres joueurs", diff --git a/js/web/_i18n/ja.json b/js/web/_i18n/ja.json index 61d13be90..3572bd09e 100644 --- a/js/web/_i18n/ja.json +++ b/js/web/_i18n/ja.json @@ -1365,7 +1365,6 @@ "Settings.Entry.ShowMapTradeWarning": "", "Settings.Entry.ShowMarketFilter": "", "Settings.Entry.ShowNotifications": "", - "Settings.Entry.ShowOtherGuildActivity": "", "Settings.Entry.ShowOwnPartOnAllGBs": "", "Settings.Entry.ShowPlayersMotivation": "", "Settings.Entry.ShowPotions": "", @@ -1438,8 +1437,6 @@ "Settings.ShowMarketFilter.Title": "", "Settings.ShowNotifications.Desc": "", "Settings.ShowNotifications.Title": "", - "Settings.ShowOtherGuildActivity.Desc": "", - "Settings.ShowOtherGuildActivity.Title": "", "Settings.ShowOwnPartBP.Desc": "", "Settings.ShowOwnPartMedals.Desc": "", "Settings.ShowOwnPartOnAllGBs.Desc": "", diff --git a/js/web/_i18n/nl.json b/js/web/_i18n/nl.json index 5a58097d0..4d1762363 100644 --- a/js/web/_i18n/nl.json +++ b/js/web/_i18n/nl.json @@ -1379,7 +1379,6 @@ "Settings.Entry.ShowMapTradeWarning": "Onderhandel blokkade", "Settings.Entry.ShowMarketFilter": "Markt filter", "Settings.Entry.ShowNotifications": "Meldingen", - "Settings.Entry.ShowOtherGuildActivity": "GSP Actieve Spelers", "Settings.Entry.ShowOwnPartOnAllGBs": "GG Calculator", "Settings.Entry.ShowPlayersMotivation": "Motivatie Activiteit", "Settings.Entry.ShowPotions": "Gevechtsdranken", @@ -1452,8 +1451,6 @@ "Settings.ShowMarketFilter.Title": "Toon de Markt filter tool", "Settings.ShowNotifications.Desc": "De assistent gebruikt op verschillende plekken meldingen. Je kan dit hier aan- of uitschakelen.", "Settings.ShowNotifications.Title": "Meldingen", - "Settings.ShowOtherGuildActivity.Desc": "Als, bij het bezoeken van andere gildes, het aantal gevechten van willekeurige spelers is veranderd dan verschijnt er een lijst van actieve spelers.", - "Settings.ShowOtherGuildActivity.Title": "Overige Gildes Actieve spelers", "Settings.ShowOwnPartBP.Desc": "Toon Blauwdrukken", "Settings.ShowOwnPartMedals.Desc": "Toon Medailles", "Settings.ShowOwnPartOnAllGBs.Desc": "Ververst de 'GG rekenmachine' voor GG's van andere spelers", diff --git a/js/web/_i18n/sr_Latn.json b/js/web/_i18n/sr_Latn.json index 613470cb9..988c684d9 100644 --- a/js/web/_i18n/sr_Latn.json +++ b/js/web/_i18n/sr_Latn.json @@ -1378,7 +1378,6 @@ "Settings.Entry.ShowMapTradeWarning": "Blokator pregovaranja ", "Settings.Entry.ShowMarketFilter": "Filter tržišta ", "Settings.Entry.ShowNotifications": "Upozorenja ", - "Settings.Entry.ShowOtherGuildActivity": "GBG Aktivni igraci ", "Settings.Entry.ShowOwnPartOnAllGBs": "GB Kalkulator ", "Settings.Entry.ShowPlayersMotivation": "Aktivnosti motivacije ", "Settings.Entry.ShowPotions": "Borbene napitke ", @@ -1451,8 +1450,6 @@ "Settings.ShowMarketFilter.Title": "Prikaži alat za filtriranje tržišta ", "Settings.ShowNotifications.Desc": "Pomoćnik koristi obaveštenja na raznim mestima. Ovde možete ovo uključiti ili isključiti.", "Settings.ShowNotifications.Title": "Upozorenja ", - "Settings.ShowOtherGuildActivity.Desc": "Ako se prilikom posete drugim gildovima promeni broj bitaka bilo kog igrača, prikazuje se lista aktivnih igrača.", - "Settings.ShowOtherGuildActivity.Title": "Aktivni igraci drugih gilda ", "Settings.ShowOwnPartBP.Desc": "Prikaži planove ", "Settings.ShowOwnPartMedals.Desc": "Prikaži medalje ", "Settings.ShowOwnPartOnAllGBs.Desc": "Ažurira 'GB kalkulator' za GB drugih igraca ", diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 6f6f02ea0..7dbb93e6f 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -75,11 +75,6 @@ FoEproxy.addHandler('GuildBattlegroundService', 'getBattleground', (data, postDa } }); -FoEproxy.addHandler("ClanService","getClanData",(data)=>{ - if (ActiveMap != 'gg') return - GuildFights.otherGuilds.check(data) -}) - /** * @type {{SettingsExport: GuildFights.SettingsExport, curDetailViewFilter: null, UpdateDB: ((function(*, *): Promise)|*), GBGRound: null, PrevActionTimestamp: null, NewActionTimestamp: null, InjectionLoaded: boolean, MapData: null, BuildPlayerContent: ((function(*=): Promise)|*), intiateDatePicker: ((function(): Promise)|*), GBGHistoryView: boolean, LogDatePicker: null, NewAction: null, PrevAction: null, init: GuildFights.init, PrepareColors: GuildFights.PrepareColors, SetBoxNavigation: ((function(*=): Promise)|*), PlayerBoxContent: *[], DeleteAlert: GuildFights.DeleteAlert, PlayerBoxSettingsSaveValues: GuildFights.PlayerBoxSettingsSaveValues, ToggleProgressList: GuildFights.ToggleProgressList, Colors: null, RefreshTable: GuildFights.RefreshTable, SetAlert: GuildFights.SetAlert, formatRange: (function(): string), GetAlertButton: (function(integer): string), Tabs: *[], ToggleCopyButton: GuildFights.ToggleCopyButton, Alerts: *[], PlayersPortraits: null, GetTabContent: (function(): string), ShowPlayerBox: GuildFights.ShowPlayerBox, CurrentGBGRound: null, showGuildColumn: number, curDateFilter: null, SortedColors: null, ShowGuildBox: GuildFights.ShowGuildBox, BuildFightContent: GuildFights.BuildFightContent, BuildDetailViewContent: ((function(*): Promise)|*), SetTabContent: GuildFights.SetTabContent, BuildDetailViewLog: ((function(*): Promise)|*), TabsContent: *[], GetAlerts: (function(): Promise), UpdateCounter: GuildFights.UpdateCounter, GBGAllRounds: null, ProvinceNames: null, checkForDB: ((function(*): Promise)|*), HandlePlayerLeaderboard: ((function(*): Promise)|*), SetTabs: GuildFights.SetTabs, CopyToClipBoard: GuildFights.CopyToClipBoard, GetTabs: (function(): string), DeleteOldSnapshots: ((function(*=): Promise)|*), PlayerBoxSettings: {showProgressFilter: number, showOnlyActivePlayers: number, showLogButton: number, showRoundSelector: number}, Neighbours: *[], curDateEndFilter: null, ShowPlayerBoxSettings: GuildFights.ShowPlayerBoxSettings, SaveLiveFightSettings: GuildFights.SaveLiveFightSettings, ShowLiveFightSettings: GuildFights.ShowLiveFightSettings, ShowDetailViewBox: GuildFights.ShowDetailViewBox}} */ @@ -1738,50 +1733,7 @@ let GuildFights = { GuildFights.ShowGuildBox(true) ); }); - }, - - otherGuilds: { - members:{}, - currentClan:null, - last:null, - check: (data) => { - id = data.responseData.id - if (id==ExtGuildID) return - let m=data.responseData.members - time = moment() - if (id!=GuildFights.otherGuilds.currentClan || GuildFights.otherGuilds.last.diff(time)>300000) { - GuildFights.otherGuilds.currentClan = id - GuildFights.otherGuilds.members = {} - for (x of m) GuildFights.otherGuilds.members[x.name] = x.won_battles; - } else { - let actives=[] - for (x of m) if (GuildFights.otherGuilds.members[x.name] < x.won_battles) { - actives.push(x.name) - GuildFights.otherGuilds.members[x.name] = x.won_battles - } - if (Object.values(actives).length>0) GuildFights.otherGuilds.show(data.responseData.name,actives) - } - GuildFights.otherGuilds.last=time - }, - show: (guildName,list)=> { - if(!Settings.GetSetting('ShowOtherGuildActivity')) return; - if ($('#OtherGuildActivity').length === 0) { - //HTML.AddCssFile(''); - HTML.Box({ - 'id': 'OtherGuildActivity', - 'title': i18n('Boxes.OtherGuildActivity.Title'), - 'auto_close': true, - 'minimize': true, - 'dragdrop': true - }); - } - let body=`

    ${guildName}

      `; - for (let x of list) body += `
    • ${x}
    • ` - body +=`
        `; - $('#OtherGuildActivityBody').html(body); - } - } - + }, }; /** diff --git a/js/web/settings/config/config.json b/js/web/settings/config/config.json index 41ef36ae7..cf7de19f3 100644 --- a/js/web/settings/config/config.json +++ b/js/web/settings/config/config.json @@ -41,12 +41,6 @@ "group": "Auto", "sort": 9 }, - { - "name": "ShowOtherGuildActivity", - "status": true, - "group": "Auto", - "sort": 9 - }, { "name": "AutoOpenInfoBox", "status": false, From efb880927c6ca7e88ff49a471b27a76a00eb37fa Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 21 Dec 2024 11:42:00 +0100 Subject: [PATCH 120/130] new moueActions handler + repeat last building --- js/internal.json | 3 +- js/web/_i18n/de.json | 3 + js/web/_i18n/en.json | 3 + js/web/mouseActions/js/mouseActions.js | 147 +++++++++++++++++++++ js/web/reconstruction/js/reconstruction.js | 2 +- js/web/settings/config/config.json | 6 + 6 files changed, 162 insertions(+), 2 deletions(-) create mode 100644 js/web/mouseActions/js/mouseActions.js diff --git a/js/internal.json b/js/internal.json index 843e4f3a5..a43147dcb 100644 --- a/js/internal.json +++ b/js/internal.json @@ -64,5 +64,6 @@ "worldchallenge", "boost-potions", "customTooltip", - "reconstruction" + "reconstruction", + "mouseActions" ] \ No newline at end of file diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 57ca5f35d..ef2699c67 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -1504,6 +1504,9 @@ "Settings.Entry.ShowGBGBuildings": "GG Gebäude Empfehlung", "Settings.ShowGBGBuildings.Title": "GG Gebäude Empfehlung anzeigen", "Settings.ShowGBGBuildings.Desc": "Zeigt beim Öffnen des Baumenüs einer GG Provinz eine Tabelle an mit den möglichen Gebäudekombinationen die besser sind als die aktuell vorhandene, sortiert nach relativer Beanspruchung der Gildenkasse.", + "Settings.Entry.RepeatSelectBuilding": "Wiederholtes Bauen", + "Settings.RepeatSelectBuilding.Title": "Wiederholtes Bauen", + "Settings.RepeatSelectBuilding.Desc": "Achtung - Obwohl von Inno erlaubt, kann Nutzung dieser Option trotzdem die automatischen Bot-Erkennung auslösen!!!

        Nachdem ein Gebäude aus dem Baumenu oder der Umbauleiste platziert wurde, wird das gleiche Gebäude automatisch nochmal ausgewählt (Straßen ausgenommen).", "Settings.ShowPvPArena.Title": "PvP-Arena-Protokoll", "Settings.ShowPvPArena.Desc": "Soll das PvP-Arena-Protokoll angezeigt werden, wenn die PvP-Arena geöffnet wird?", "Settings.Tab.About": "Info + Website", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 154db7821..a9bd4bed2 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -1501,6 +1501,9 @@ "Settings.Entry.ShowGBGBuildings": "GBG Building Recommendation", "Settings.ShowGBGBuildings.Title": "Show GBG Building Recommendation", "Settings.ShowGBGBuildings.Desc": "When opening the building menu in a GBG Province, a table is displayed, showing the possible building combinations that would be better than the current one, sorted by their relative impact on the Guild Treasury.", + "Settings.Entry.RepeatSelectBuilding": "Repeat Building Selection", + "Settings.RepeatSelectBuilding.Title": "Repeat last Building Selection", + "Settings.RepeatSelectBuilding.Desc": "Attention - Although permitted by Inno, using this option may lead to INNOs bot detection triggering!!!

        After placing a building from the build menu or the reconstruction side bar will cause the same building to be selected automatically (streets excluded).", "Settings.ShowPvPArena.Title": "PvP-Arena-Protocol", "Settings.ShowPvPArena.Desc": "Show PvP-Arena-Protocol, when opening the PvP-Arena?", "Settings.Tab.About": "Info + Website", diff --git a/js/web/mouseActions/js/mouseActions.js b/js/web/mouseActions/js/mouseActions.js new file mode 100644 index 000000000..59c37f979 --- /dev/null +++ b/js/web/mouseActions/js/mouseActions.js @@ -0,0 +1,147 @@ +/* + * ************************************************************************************* + * + * Copyright (C) 2024 FoE-Helper team - All Rights Reserved + * You may use, distribute and modify this code under the + * terms of the AGPL license. + * + * See file LICENSE.md or go to + * https://github.com/mainIine/foe-helfer-extension/blob/master/LICENSE.md + * for full license details. + * + * ************************************************************************************* + */ + +let mouseActions = { + actions:[], + randomClickRadius:3, + targetEl:null, + + init: () => { + mouseActions.targetEl= $("canvas")[0] + $("#openfl-content").on("click",(e) => { + X=e.clientX + Y=e.clientY + for (action of mouseActions.actions) { + let coords1=mouseActions.calcCoords(action.area[0]), + coords2=mouseActions.calcCoords(action.area[1]), + [X1,X2]=[coords1[0]=X && Y1<=Y && Y2>=Y) ^ !inside){ + action.callback(X,Y) + } + + } + }) + }, + + addAction:(area,callback)=>{ + mouseActions.actions.push({area:area,callback:callback}) + }, + + simulate: (element, eventName, vars={}) => { + + let options = Object.assign({ + pointerX: 0, + pointerY: 0, + button: 0, + ctrlKey: false, + altKey: false, + shiftKey: false, + metaKey: false, + bubbles: true, + cancelable: true + }, vars || {}), + oEvent, eventType = null; + if (!/^(?:click|dblclick|mouse(?:down|up|over|move|out))$/.test(eventName)) return + + if (document.createEvent) + { + oEvent = document.createEvent('MouseEvents'); + oEvent.initMouseEvent(eventName, options.bubbles, options.cancelable, document.defaultView, + options.button, options.pointerX, options.pointerY, options.pointerX, options.pointerY, + options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, element); + element.dispatchEvent(oEvent); + } + else + { + options.clientX = options.pointerX; + options.clientY = options.pointerY; + var evt = document.createEventObject(); + for (var property in options) + evt[property] = options[property]; + element.fireEvent('on' + eventName, evt); + } + return ; + }, + + click: (vars={})=> { + mouseActions.simulate(mouseActions.targetEl, "mousedown", vars) + mouseActions.simulate(mouseActions.targetEl, "mouseup", vars) + }, + + calcCoords: (coords,anchor="TopLeft")=> { + let H = window.innerHeight, + W = window.innerWidth, + xOld = coords[0], + yOld = coords[1], + x,y,xNew,yNew, + anchorOld = coords[2] || "TopLeft" + + if (anchorOld.includes("Center")){ + x = xOld + Math.floor(W/2) + y = yOld + Math.floor(H/2) + } + if (anchorOld.includes("Top")) y = yOld + if (anchorOld.includes("Bottom")) y = yOld + H + if (anchorOld.includes("Left")) x = xOld + if (anchorOld.includes("Right")) x = xOld + W + + if (anchor.includes("Center")){ + xNew = x - Math.floor(W/2) + yNew = y - Math.floor(H/2) + } + if (anchor.includes("Top")) yNew = y + if (anchor.includes("Bottom")) yNew = y - H + if (anchor.includes("Left")) xNew = x + if (anchor.includes("Right")) xNew = x - W + return [xNew,yNew,anchor] + }, + + randomClick: (coords,n=1)=> { + let TLCoords=mouseActions.calcCoords(coords,"TopLeft") + X=Math.max(TLCoords[0] + Math.floor(Math.random()*(2*mouseActions.randomClickRadius +1)) - mouseActions.randomClickRadius,0) + Y=Math.max(TLCoords[1] + Math.floor(Math.random()*(2*mouseActions.randomClickRadius +1)) - mouseActions.randomClickRadius,0) + + mouseActions.simulate(mouseActions.targetEl, "mousemove", {pointerX:X,pointerY:Y}) + for (let i=0;i{ + buildRepeat.lastBuildClick = mouseActions.calcCoords([X,Y],"BottomLeft") +}) + +FoEproxy.addRequestHandler("CityMapService","placeBuilding",(data)=>{ + if (MainParser.CityEntities[data.requestData[0].cityentity_id].type != "street") buildRepeat.click() +}) + +FoEproxy.addFoeHelperHandler('ReconstructionBuildingPlaced',(data)=>{ + if (MainParser.CityMapData[data.id].type != "street" && !data.last) buildRepeat.click() +}); + +let buildRepeat = { + lastBuildClick: null, + click: () => { + if(!Settings.GetSetting('RepeatSelectBuilding')) return; + mouseActions.randomClick(buildRepeat.lastBuildClick) + } +} + diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 9d289836e..b411b899a 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -66,7 +66,7 @@ FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { reconstruction.pageUpdate(id) pagesUpdated=true } - FoEproxy.triggerFoeHelperHandler('ReconstructionBuildingPlaced',x.entityId) + FoEproxy.triggerFoeHelperHandler('ReconstructionBuildingPlaced',{id:x.entityId,last:(reconstruction.count[id].stored==0)}) } else if (!x.position) { reconstruction.count[id].placed-- reconstruction.count[id].stored++ diff --git a/js/web/settings/config/config.json b/js/web/settings/config/config.json index cf7de19f3..a918d19bb 100644 --- a/js/web/settings/config/config.json +++ b/js/web/settings/config/config.json @@ -157,6 +157,12 @@ "group": "Boxes", "sort": 19 }, + { + "name": "RepeatSelectBuilding", + "status": false, + "group": "Boxes", + "sort": 20 + }, { "name": "SelectedMenu", "callback": "MenuSelected", From 0b4b02ec5cac106bb00065d21546d6fbec3c40ce Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 21 Dec 2024 15:50:09 +0100 Subject: [PATCH 121/130] mouseActions - fix bugs + change popgame reward click check to mouseAction --- js/internal.json | 4 +-- js/web/mouseActions/js/mouseActions.js | 4 +-- js/web/popgame/css/popgame.css | 2 +- js/web/popgame/js/popgame.js | 37 +++++++++++++------------- 4 files changed, 23 insertions(+), 24 deletions(-) diff --git a/js/internal.json b/js/internal.json index a43147dcb..83594d544 100644 --- a/js/internal.json +++ b/js/internal.json @@ -1,5 +1,6 @@ [ "srcLinks", + "mouseActions", "_languages", "_helper", "_menu", @@ -64,6 +65,5 @@ "worldchallenge", "boost-potions", "customTooltip", - "reconstruction", - "mouseActions" + "reconstruction" ] \ No newline at end of file diff --git a/js/web/mouseActions/js/mouseActions.js b/js/web/mouseActions/js/mouseActions.js index 59c37f979..02797a735 100644 --- a/js/web/mouseActions/js/mouseActions.js +++ b/js/web/mouseActions/js/mouseActions.js @@ -26,8 +26,8 @@ let mouseActions = { let coords1=mouseActions.calcCoords(action.area[0]), coords2=mouseActions.calcCoords(action.area[1]), [X1,X2]=[coords1[0]=X && Y1<=Y && Y2>=Y) ^ !inside){ action.callback(X,Y) diff --git a/js/web/popgame/css/popgame.css b/js/web/popgame/css/popgame.css index 50c928f8e..0ccbf06d3 100644 --- a/js/web/popgame/css/popgame.css +++ b/js/web/popgame/css/popgame.css @@ -34,7 +34,7 @@ } #PGwrapper.wildlife { position: relative; - top: calc(50% - 229px); + top: calc(50% - 225px); left: calc(50% - 260px); } #PGwarning { diff --git a/js/web/popgame/js/popgame.js b/js/web/popgame/js/popgame.js index a5bd9a427..78451b8fc 100644 --- a/js/web/popgame/js/popgame.js +++ b/js/web/popgame/js/popgame.js @@ -56,25 +56,12 @@ FoEproxy.addHandler('RewardService', 'collectReward', (data, postData) => { }); -$('#container').on("click", function (e) { - if ($('#Popgame').length === 0) return; - if (Popgame.rewardactive==0) return; - - let X=e.clientX, - Y=e.clientY, - Xc = window.innerWidth/2, - Yc = window.innerHeight/2; - - if (X>Xc-313 && XYc-324 && (XXc+73 || YYc+172)) return; - - if (Popgame.rewardactive > 0) Popgame.rewardactive -= 1; - if ($('#Popgame.closed').length === 0) return; - if (Popgame.rewardactive!==0) return; - if (Popgame.minimized) return; - $('#Popgame').addClass("open"); - $('#Popgame').removeClass("closed"); -}); - +mouseActions.addAction([[-57, 151, 'Center'],[72, 173, 'Center']],()=>{ + Popgame.clearReward() +}) +mouseActions.addAction([[285, 298, 'Center'],[-313, -338, 'Center'],false],()=>{ + Popgame.clearReward() +}) FoEproxy.addHandler('PopGameService', 'popTile', (data, postData) => { if ($('#Popgame').length === 0) return; @@ -315,6 +302,18 @@ let Popgame = { Popgame.grid[x][y] = tile.type + ((tile.popType === "default" || tile.type === "grandPrize") ? "" : "_reward"); } }, + clearReward:()=>{ + if ($('#Popgame').length === 0) return; + if (Popgame.rewardactive==0) return; + + if (Popgame.rewardactive > 0) Popgame.rewardactive -= 1; + if ($('#Popgame.closed').length === 0) return; + if (Popgame.rewardactive!==0) return; + if (Popgame.minimized) return; + $('#Popgame').addClass("open"); + $('#Popgame').removeClass("closed"); + }, + tracking: null, trackingReset:()=>{ Popgame.tracking = {start:{total:0,grandPrize:0},afterPop:{total:0,grandPrize:0},leftOnBoard:{grandPrize:0}}; From a5e7c5d676254f2ac5fd63f10896b196e0e1ccae Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 21 Dec 2024 16:12:20 +0100 Subject: [PATCH 122/130] changelog --- changelog-de.md | 4 ++++ changelog-en.md | 4 ++++ js/web/mouseActions/js/mouseActions.js | 4 ++-- js/web/popgame/js/popgame.js | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index e85fa3dd5..ac5e2192c 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -8,6 +8,10 @@ - Produktionsübersicht: Tabellen für Münz-, Vorrats- und FP-Boots hinzugefügt - Effizienzbewertung: Feld für Spezialproduktion abschließen Fragmente hinzugefügt - Stadtübersicht: Anzeigeoption für Gebäude, die eine erhabene Stufe haben und "abgelaufene" Gebäude +- Wiederholtes Bauen: + - !!! ACHTUNG !!! Obwohl das Feature an sich grünes Licht von Inno bekommen hat, könnte es trotzdem vorkommen, dass die Bot-Erkennung ausgelöst wird. Benutzung auf eigene Gefahr + - Kann in den Einstellungen aktiviert werden + - Wenn ein Gebäude aus dem Baumenü oder dem Umbaulager gebaut wird, wird das gleiche Gebäude automatisch erneut ausgewählt **Update** - Tooltip: Design der Gebäude-Tooltips angepasst diff --git a/changelog-en.md b/changelog-en.md index d18654eaa..018a2e8f9 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -8,6 +8,10 @@ - Production Overview: Added Tables for resources boosts (FP, coins, supplies) - Efficiency rating: Added FSP Fragments to the evaluation - City Overview: Highlight option for ascendable and decayed buildings +- Repeat Building Selection: + - !!! ATTENTION !!! Although the feature was green-lit by Inno, it might happen that the bot detection triggers. Use at your own risk! + - Can be activated in the settings + - When a building is built from the build menu or placed from the reconstruction storage, the same building is selected again automatically. **Update** - Tooltip: made design similar to original FoE tooltips diff --git a/js/web/mouseActions/js/mouseActions.js b/js/web/mouseActions/js/mouseActions.js index 02797a735..74dd7a233 100644 --- a/js/web/mouseActions/js/mouseActions.js +++ b/js/web/mouseActions/js/mouseActions.js @@ -25,8 +25,8 @@ let mouseActions = { for (action of mouseActions.actions) { let coords1=mouseActions.calcCoords(action.area[0]), coords2=mouseActions.calcCoords(action.area[1]), - [X1,X2]=[coords1[0]=X && Y1<=Y && Y2>=Y) ^ !inside){ diff --git a/js/web/popgame/js/popgame.js b/js/web/popgame/js/popgame.js index 78451b8fc..f74871867 100644 --- a/js/web/popgame/js/popgame.js +++ b/js/web/popgame/js/popgame.js @@ -59,7 +59,7 @@ FoEproxy.addHandler('RewardService', 'collectReward', (data, postData) => { mouseActions.addAction([[-57, 151, 'Center'],[72, 173, 'Center']],()=>{ Popgame.clearReward() }) -mouseActions.addAction([[285, 298, 'Center'],[-313, -338, 'Center'],false],()=>{ +mouseActions.addAction([[284, 297, 'Center'],[-312, -337, 'Center'],false],()=>{ Popgame.clearReward() }) From 3ddc2da3a4286c92e4a5d1b03c62540b12ad2e9f Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 21 Dec 2024 19:38:44 +0100 Subject: [PATCH 123/130] changelog/settings - update wording --- changelog-de.md | 2 +- changelog-en.md | 2 +- js/web/_i18n/de.json | 2 +- js/web/_i18n/en.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index ac5e2192c..435ef8182 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -9,7 +9,7 @@ - Effizienzbewertung: Feld für Spezialproduktion abschließen Fragmente hinzugefügt - Stadtübersicht: Anzeigeoption für Gebäude, die eine erhabene Stufe haben und "abgelaufene" Gebäude - Wiederholtes Bauen: - - !!! ACHTUNG !!! Obwohl das Feature an sich grünes Licht von Inno bekommen hat, könnte es trotzdem vorkommen, dass die Bot-Erkennung ausgelöst wird. Benutzung auf eigene Gefahr + - !!! ACHTUNG !!! Obwohl das Feature an sich grünes Licht von Inno bekommen hat, könnte es trotzdem vorkommen, dass die Bot-Erkennung ausgelöst wird. Benutzung auf eigene Gefahr!!! - Kann in den Einstellungen aktiviert werden - Wenn ein Gebäude aus dem Baumenü oder dem Umbaulager gebaut wird, wird das gleiche Gebäude automatisch erneut ausgewählt diff --git a/changelog-en.md b/changelog-en.md index 018a2e8f9..d57fe8b57 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -9,7 +9,7 @@ - Efficiency rating: Added FSP Fragments to the evaluation - City Overview: Highlight option for ascendable and decayed buildings - Repeat Building Selection: - - !!! ATTENTION !!! Although the feature was green-lit by Inno, it might happen that the bot detection triggers. Use at your own risk! + - !!! ATTENTION !!! Although the feature was green-lit by Inno, it might happen that the bot detection triggers. Use at your own risk!!! - Can be activated in the settings - When a building is built from the build menu or placed from the reconstruction storage, the same building is selected again automatically. diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index ef2699c67..a1af5c1d0 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -1506,7 +1506,7 @@ "Settings.ShowGBGBuildings.Desc": "Zeigt beim Öffnen des Baumenüs einer GG Provinz eine Tabelle an mit den möglichen Gebäudekombinationen die besser sind als die aktuell vorhandene, sortiert nach relativer Beanspruchung der Gildenkasse.", "Settings.Entry.RepeatSelectBuilding": "Wiederholtes Bauen", "Settings.RepeatSelectBuilding.Title": "Wiederholtes Bauen", - "Settings.RepeatSelectBuilding.Desc": "Achtung - Obwohl von Inno erlaubt, kann Nutzung dieser Option trotzdem die automatischen Bot-Erkennung auslösen!!!

        Nachdem ein Gebäude aus dem Baumenu oder der Umbauleiste platziert wurde, wird das gleiche Gebäude automatisch nochmal ausgewählt (Straßen ausgenommen).", + "Settings.RepeatSelectBuilding.Desc": " !!! Achtung - Auch wenn unwahrscheinlich, kann es bei Nutzung dieser Option dazu kommen, das Innos Bot-Erkennung ausgelöst wird mit einer damit verbundenen kurzen Sperre !!! Bitte gebt uns Bescheid, sollte es dazu kommen.

        Nachdem ein Gebäude aus dem Baumenu oder der Umbauleiste platziert wurde, wird das gleiche Gebäude automatisch nochmal ausgewählt (Straßen ausgenommen).", "Settings.ShowPvPArena.Title": "PvP-Arena-Protokoll", "Settings.ShowPvPArena.Desc": "Soll das PvP-Arena-Protokoll angezeigt werden, wenn die PvP-Arena geöffnet wird?", "Settings.Tab.About": "Info + Website", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index a9bd4bed2..7df33e9b8 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -1503,7 +1503,7 @@ "Settings.ShowGBGBuildings.Desc": "When opening the building menu in a GBG Province, a table is displayed, showing the possible building combinations that would be better than the current one, sorted by their relative impact on the Guild Treasury.", "Settings.Entry.RepeatSelectBuilding": "Repeat Building Selection", "Settings.RepeatSelectBuilding.Title": "Repeat last Building Selection", - "Settings.RepeatSelectBuilding.Desc": "Attention - Although permitted by Inno, using this option may lead to INNOs bot detection triggering!!!

        After placing a building from the build menu or the reconstruction side bar will cause the same building to be selected automatically (streets excluded).", + "Settings.RepeatSelectBuilding.Desc": "!!! Attention - Although unlikely, using this option might trigger INNOs bot detection and may cause a short ban period !!! Please let us know should that happen.

        After placing a building from the build menu or the reconstruction side bar will cause the same building to be selected automatically (streets excluded).", "Settings.ShowPvPArena.Title": "PvP-Arena-Protocol", "Settings.ShowPvPArena.Desc": "Show PvP-Arena-Protocol, when opening the PvP-Arena?", "Settings.Tab.About": "Info + Website", From 5c73c1678c102a58193d501eb6a125332ef04f83 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 21 Dec 2024 19:42:14 +0100 Subject: [PATCH 124/130] changelog - removal of active players --- changelog-de.md | 2 ++ changelog-en.md | 2 ++ 2 files changed, 4 insertions(+) diff --git a/changelog-de.md b/changelog-de.md index 435ef8182..97f4c581a 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -24,6 +24,8 @@ - Symbole für blauen/roten Angriff in die Countdown-Liste hinzugefügt - Angriffsfarben zur Karte hinzugefügt - Neue Kartenansicht, die die Angriffsfarben besser sichtbar macht +- GG Aktive Spieler: + - Modul entfernt auf Anfrage durch Inno **BugFix** - Tooltip: diff --git a/changelog-en.md b/changelog-en.md index d57fe8b57..5833e48be 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -24,6 +24,8 @@ - Added symbols for the battle type (red/blue) to the countdown list - Added attack colors to the map - Added map view to highlight attack colors better +- GBG active players: + - removed the module on Innos request **BugFix** - Tooltip: From 95ff50bc51967a74430ba4c7bd2d2c6153d8e5ae Mon Sep 17 00:00:00 2001 From: Weblate Date: Sun, 22 Dec 2024 01:20:08 +0000 Subject: [PATCH 125/130] Currently translated at 100.0% (1526 of 1526 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index 3e0321c52..deebb92bc 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -641,7 +641,7 @@ "Boxes.Investment.TotalFP": "Total PF (stock + investis + gains) : ", "Boxes.Investment.UpToDate": "La liste des investissements a été mise à jour il y a moins de 30 minutes.", "Boxes.Investment.UpdateRequired": "La liste des investissements a plus de 30 minutes. Veuillez mettre à jour votre liste d'investissements à l'Hôtel de Ville.", - "Boxes.ItemSources.Title": "Origine Objet", + "Boxes.ItemSources.Title": "Objet produit par ...", "Boxes.Kits.Antiques_Dealer": "Antiquaire", "Boxes.Kits.Base": "Bâtiment niv 1 ou Kit de sélection", "Boxes.Kits.Cultural_Settlements": "Colonies culturelles", From 4d560f2dc8a85e82029f7d1da0cc532aecba0623 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 22 Dec 2024 05:46:39 +0100 Subject: [PATCH 126/130] mouseActions - await DOM element before initialization --- js/web/mouseActions/js/mouseActions.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/js/web/mouseActions/js/mouseActions.js b/js/web/mouseActions/js/mouseActions.js index 74dd7a233..e0afe87fe 100644 --- a/js/web/mouseActions/js/mouseActions.js +++ b/js/web/mouseActions/js/mouseActions.js @@ -17,7 +17,18 @@ let mouseActions = { randomClickRadius:3, targetEl:null, - init: () => { + init: async () => { + x = new Promise((resolve) => { + let timer = () => { + if ($("#openfl-content").length==0) { + setTimeout(timer,50) + } else { + resolve() + } + } + timer() + }), + await x mouseActions.targetEl= $("canvas")[0] $("#openfl-content").on("click",(e) => { X=e.clientX From 0676ce2380e5cd677093f89802f116bbfabf6adf Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sun, 22 Dec 2024 06:39:35 +0100 Subject: [PATCH 127/130] mouseActions - replace deprecated function --- js/web/mouseActions/js/mouseActions.js | 47 ++++++-------------------- 1 file changed, 10 insertions(+), 37 deletions(-) diff --git a/js/web/mouseActions/js/mouseActions.js b/js/web/mouseActions/js/mouseActions.js index e0afe87fe..ce2d089f6 100644 --- a/js/web/mouseActions/js/mouseActions.js +++ b/js/web/mouseActions/js/mouseActions.js @@ -20,7 +20,7 @@ let mouseActions = { init: async () => { x = new Promise((resolve) => { let timer = () => { - if ($("#openfl-content").length==0) { + if ($("#openfl-content canvas").length==0) { setTimeout(timer,50) } else { resolve() @@ -29,10 +29,10 @@ let mouseActions = { timer() }), await x - mouseActions.targetEl= $("canvas")[0] + mouseActions.targetEl = $("#openfl-content canvas")[0] $("#openfl-content").on("click",(e) => { - X=e.clientX - Y=e.clientY + let X=e.clientX, + Y=e.clientY for (action of mouseActions.actions) { let coords1=mouseActions.calcCoords(action.area[0]), coords2=mouseActions.calcCoords(action.area[1]), @@ -52,39 +52,12 @@ let mouseActions = { mouseActions.actions.push({area:area,callback:callback}) }, - simulate: (element, eventName, vars={}) => { + simulate: (element, eventName, options={}) => { - let options = Object.assign({ - pointerX: 0, - pointerY: 0, - button: 0, - ctrlKey: false, - altKey: false, - shiftKey: false, - metaKey: false, - bubbles: true, - cancelable: true - }, vars || {}), - oEvent, eventType = null; - if (!/^(?:click|dblclick|mouse(?:down|up|over|move|out))$/.test(eventName)) return + if (!/^(?:click|dblclick|mouse(?:down|enter|leave|up|over|move|out))$/.test(eventName)) return - if (document.createEvent) - { - oEvent = document.createEvent('MouseEvents'); - oEvent.initMouseEvent(eventName, options.bubbles, options.cancelable, document.defaultView, - options.button, options.pointerX, options.pointerY, options.pointerX, options.pointerY, - options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, element); - element.dispatchEvent(oEvent); - } - else - { - options.clientX = options.pointerX; - options.clientY = options.pointerY; - var evt = document.createEventObject(); - for (var property in options) - evt[property] = options[property]; - element.fireEvent('on' + eventName, evt); - } + let oEvent = new MouseEvent(eventName,options) + element.dispatchEvent(oEvent) return ; }, @@ -126,9 +99,9 @@ let mouseActions = { X=Math.max(TLCoords[0] + Math.floor(Math.random()*(2*mouseActions.randomClickRadius +1)) - mouseActions.randomClickRadius,0) Y=Math.max(TLCoords[1] + Math.floor(Math.random()*(2*mouseActions.randomClickRadius +1)) - mouseActions.randomClickRadius,0) - mouseActions.simulate(mouseActions.targetEl, "mousemove", {pointerX:X,pointerY:Y}) + mouseActions.simulate(mouseActions.targetEl, "mousemove", {clientX:X,clientY:Y}) for (let i=0;i Date: Sun, 22 Dec 2024 07:39:04 +0100 Subject: [PATCH 128/130] update kits wildlive 25 --- js/web/battle-assist/js/battle-assist.js | 4 +- js/web/kits/data/sets.json | 52 ++++++++++++++++++++++-- 2 files changed, 50 insertions(+), 6 deletions(-) diff --git a/js/web/battle-assist/js/battle-assist.js b/js/web/battle-assist/js/battle-assist.js index 587fbe227..a0327c711 100644 --- a/js/web/battle-assist/js/battle-assist.js +++ b/js/web/battle-assist/js/battle-assist.js @@ -18,8 +18,8 @@ FoEproxy.addHandler('BattlefieldService', 'all', (data, postData) => { return; } - HTML.CloseOpenBox('battleAssistNextEraDialog'); - HTML.CloseOpenBox('battleAssistRogueDialog'); + $('#battleAssistNextEraDialog').remove(); + $('#battleAssistRogueDialog').remove(); const state = data.responseData.__class__ === 'BattleRealm' ? data.responseData.state : data.responseData; diff --git a/js/web/kits/data/sets.json b/js/web/kits/data/sets.json index f80c8c5ea..928d42220 100644 --- a/js/web/kits/data/sets.json +++ b/js/web/kits/data/sets.json @@ -1,6 +1,6 @@ [ { - "udate": "Winter Event 2024 (14 October 2024)" + "udate": "Wildlife Event 2024 (22 December 2024)" }, { "groupname": "Events" @@ -63,6 +63,24 @@ {"first": "A_MultiAge_PatrickBonusSet20a"} ] }, + { + "name": "Shika_Shrine", + "buildings": [ + {"first": "W_MultiAge_WILD25A1"} + ] + }, + { + "name": "Koi_Pond", + "buildings": [ + {"first": "W_MultiAge_WILD25B1"} + ] + }, + { + "name": "Usagi_Bonbori_Gate", + "buildings": [ + {"first": "W_MultiAge_WILD25C1"} + ] + }, { "name": "Flamingo_Habitat", "buildings": [ @@ -111,11 +129,18 @@ ] }, { + "comment":"OLD VERSION!!! remove at some point!!!", "name": "Mountain_Reserve", "buildings": [ {"first": "R_MultiAge_WildBonus21a"} ] }, + { + "name": "Mountain_Reserve", + "buildings": [ + {"first": "W_MultiAge_WILD21A1"} + ] + }, { "name": "Yukitomo_Tower", "buildings": [ @@ -988,15 +1013,35 @@ "buildings": [ {"first": "W_MultiAge_GR24D1"} ] - },{ + }, + { + "name": "Neo_Checkmate_Square", + "buildings": [ + {"first": "W_MultiAge_GR25A1"} + ] + }, + { + "name": "Neo_Aviary", + "buildings": [ + {"first": "W_MultiAge_GR25B1"} + ] + }, + { "groupname": "Guild_Expeditions" }, { + "comment":"OLD VERSION!!! remove at some point!!!", "name": "Terrace_Farm", "buildings": [ {"first": "P_MultiAge_Expedition16"} ] }, + { + "name": "Terrace_Farm", + "buildings": [ + {"first": "W_MultiAge_Expedition16aBase"} + ] + }, { "name": "Fountain_of_Youth", "buildings": [ @@ -1154,6 +1199,5 @@ "buildings": [ {"first": "L_AllAge_CupBonus1"} ] - } - + } ] \ No newline at end of file From 1dbade3f36571a67a79b8345c4684a5d12296202 Mon Sep 17 00:00:00 2001 From: Weblate Date: Mon, 23 Dec 2024 12:14:46 +0000 Subject: [PATCH 129/130] Currently translated at 100.0% (1526 of 1526 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index f1da1b794..4df2c0db7 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -1402,6 +1402,7 @@ "Settings.Entry.MenuLength": "Menu", "Settings.Entry.NotificationsPosition": "Emplacement de la notification", "Settings.Entry.NotificationsStack": "Notifications multiples", + "Settings.Entry.RepeatSelectBuilding": "Répéter le bâtiment sélectionné", "Settings.Entry.ResetBoxPositions": "Fenêtres", "Settings.Entry.RivalSound": "Rival son", "Settings.Entry.SelectedMenu": "Position du menu", @@ -1459,6 +1460,8 @@ "Settings.NotificationsPosition.Title": "Emplacement de la notification", "Settings.NotificationsStack.Desc": "Combien de notifications souhaitez-vous voir simultanément ? La valeur par défaut est 4.", "Settings.NotificationsStack.Title": "Notifications multiples", + "Settings.RepeatSelectBuilding.Desc": "! ! ! Attention - Bien que peu probable, l'utilisation de cette option pourrait déclencher la détection du bot INNO et entraîner une courte période de ban  ! ! ! Veuillez nous en informer si cela se produit.

        Après avoir placé un bâtiment à partir du menu de construction ou de la barre latérale de reconstruction, le même bâtiment sera automatiquement sélectionné (rues exclues).", + "Settings.RepeatSelectBuilding.Title": "Répéter le dernier bâtiment sélectionné", "Settings.ResetBoxPositions.Button": "Supprimer !", "Settings.ResetBoxPositions.Desc": "Toutes les positions des fenêtres doivent-elles être réinitialisées ? Ceci peut faire réapparaitre des fenêtres en dehors de votre vue.", "Settings.ResetBoxPositions.Title": "Positionnement des fenêtres", From 2ee85c13f65b926a6cbae9a1b33343ea4706e2c6 Mon Sep 17 00:00:00 2001 From: Daniel Siekiera <133780157+x-sitter@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:44:34 +0100 Subject: [PATCH 130/130] Version v3.10.0.0 --- manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifest.json b/manifest.json index d10eec574..982a1a8a2 100644 --- a/manifest.json +++ b/manifest.json @@ -2,7 +2,7 @@ "name": "__MSG_appName__", "description": "__MSG_appDesc__", "default_locale": "en", - "version": "3.9.1.0", + "version": "3.10.0.0", "manifest_version": 3, "permissions": [
    #${i18n('Boxes.GuildMemberStat.Eras')}${i18n('Boxes.GuildMemberStat.GuildMembers')}
    ` + - ``); + `
    ${i18n('Boxes.GuildMemberStat.Rank')}${i18n('Boxes.GuildMemberStat.Member')}${i18n('Boxes.GuildMemberStat.Eras')}${i18n('Boxes.GuildMemberStat.Points')}
    `); if (EraGroup[eraId].members !== undefined) { @@ -1747,7 +1747,7 @@ let GuildMemberStat = { { let EraTreasuryGoods = TreasuryGoodsData[EraGroup[eraId].era]; - h.push(`
    ${i18n('Boxes.GuildMemberStat.Rank')}${i18n('Boxes.GuildMemberStat.Member')}${i18n('Boxes.GuildMemberStat.Eras')}${i18n('Boxes.GuildMemberStat.Points')}
    `); + h.push(`
    ${i18n('Boxes.GuildMemberStat.EraTreasuryGoods')}
    `); EraTreasuryGoods.forEach(good => { h.push(``); }); @@ -1867,7 +1867,7 @@ let GuildMemberStat = { if (guildGoodsBuildings.length) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.EraTreasuryGoods')}
    ${good.name}${HTML.Format(good.value)}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildGoods')}
    `); guildGoodsBuildings.forEach(plbuilding => { let countBuilding = typeof plbuilding.count != 'undefined' ? plbuilding.count : 1; @@ -1882,7 +1882,7 @@ let GuildMemberStat = { if (guildPowerBuildings.length) { - d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildGoods')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildPower')}
    `); guildPowerBuildings.forEach(plbuilding => { let countBuilding = typeof plbuilding.count != 'undefined' ? plbuilding.count : 1; @@ -1898,7 +1898,7 @@ let GuildMemberStat = { d.push(``); d.push(`
    `); - d.push(`
    ${i18n('Boxes.GuildMemberStat.GuildPower')}
    ` + + d.push(`
    ` + `` + `` + `` + @@ -2003,7 +2003,7 @@ let GuildMemberStat = { return; } - d.push(`
    #${i18n('Boxes.GuildMemberStat.GuildBuildings')}${i18n('Boxes.GuildMemberStat.Level')}
    `); + d.push(`
    ${i18n('Boxes.GuildMemberStat.Eras')} ${i18n('Boxes.GuildMemberStat.ProducedTreasuryGoods')} ${i18n('Boxes.GuildMemberStat.TreasuryGoods')}
    `); ExportContent.push(['eraID', 'era', 'good', 'produceable', 'instock']); @@ -2201,7 +2201,7 @@ let GuildMemberStat = { }); d.push(`
    `); - d.push(`
    ${i18n('Boxes.GuildMemberStat.Eras')} ${i18n('Boxes.GuildMemberStat.ProducedTreasuryGoods')} ${i18n('Boxes.GuildMemberStat.TreasuryGoods')}
    ` + + d.push(`
    ` + `` + `` + `` + @@ -2223,7 +2223,7 @@ let GuildMemberStat = { d.push(``); d.push(`
    `); - d.push(`
    ${i18n('Boxes.GuildMemberStat.GreatBuildings')}${i18n('Boxes.GuildMemberStat.Available')}${i18n('Boxes.GuildMemberStat.MinLevel')}
    ` + + d.push(`
    ` + `` + `` + `` + @@ -2314,7 +2314,7 @@ let GuildMemberStat = { let NoGbMember = GBOverview[id]['NoGbMember']; d.push(`
    ` + - `
    ${i18n('Boxes.GuildMemberStat.GreatBuildings')}${i18n('Boxes.GuildMemberStat.Member')}${i18n('Boxes.GuildMemberStat.Level')}
    ` + + `
    ` + `` + `` + `` + diff --git a/js/web/infoboard/css/infoboard.css b/js/web/infoboard/css/infoboard.css index 9bb313e40..d0e2aacd0 100644 --- a/js/web/infoboard/css/infoboard.css +++ b/js/web/infoboard/css/infoboard.css @@ -61,10 +61,7 @@ table.info-table tr td { display: flex; align-items: center; background-color: rgba(0,0,0, 0.5); - position: sticky; - top: 0; padding: 5px; - z-index: 100; } #BackgroundInfo #BackgroundInfoBody .filter-row span { diff --git a/js/web/infoboard/js/infoboard.js b/js/web/infoboard/js/infoboard.js index 55cb35982..74b0c3c47 100644 --- a/js/web/infoboard/js/infoboard.js +++ b/js/web/infoboard/js/infoboard.js @@ -121,7 +121,7 @@ let Infoboard = { h = []; // Filter - h.push('
    '); + h.push('
    '); h.push('
    ${i18n('Boxes.GuildMemberStat.Member')}${i18n('Boxes.GuildMemberStat.Level')}${i18n('Boxes.GuildMemberStat.UnlockedLevel')}
    '); - h.push('' + + h.push('' + '' + '' + '' + diff --git a/js/web/kits/css/kits.css b/js/web/kits/css/kits.css index ab23117fb..39abb75d3 100644 --- a/js/web/kits/css/kits.css +++ b/js/web/kits/css/kits.css @@ -86,10 +86,7 @@ #kits h2 { background: linear-gradient(to bottom, var(--text-darker), #281207cc); padding: 5px; - position: sticky; - top: 0; width: 100%; - z-index: 500; box-sizing: border-box; } diff --git a/js/web/kits/js/kits.js b/js/web/kits/js/kits.js index 071eaa26e..56ed8862c 100644 --- a/js/web/kits/js/kits.js +++ b/js/web/kits/js/kits.js @@ -474,7 +474,7 @@ let Kits = { if (!GroupName) { t += '
    ' - t += `

    ` + favourite + ChainSetIco +' '+ KitText + (ChainSetIco!="" ? "": eff) + upgrades + '

    ' + t += `

    ` + favourite + ChainSetIco +' '+ KitText + (ChainSetIco!="" ? "": eff) + upgrades + '

    ' } if(buildings.length) { buildings.forEach((building) => { diff --git a/js/web/market/css/market.css b/js/web/market/css/market.css index 5f13cae7d..55fa7d8c8 100644 --- a/js/web/market/css/market.css +++ b/js/web/market/css/market.css @@ -24,10 +24,7 @@ } #Market #MarketBody table th { - position: sticky; - top: 0; cursor: pointer; - z-index: 1; font-size: 85%; } diff --git a/js/web/market/js/market.js b/js/web/market/js/market.js index 95e013b71..bc53d600b 100644 --- a/js/web/market/js/market.js +++ b/js/web/market/js/market.js @@ -187,7 +187,7 @@ let Market = { // Filters h.push('
    '); h.push('
    ' + i18n('Boxes.Investment.Overview.Player') + '' + i18n('Boxes.Investment.Overview.Building') + '
    '); - h.push(''); + h.push(''); h.push(''); h.push(''); @@ -312,7 +312,7 @@ let Market = { // Table h.push('
    '); h.push('' + i18n('Boxes.Market.TradePartner') + '
    '); - h.push(''); + h.push(''); h.push(''); h.push(''); h.push(''); diff --git a/js/web/marketoffers/css/marketoffers.css b/js/web/marketoffers/css/marketoffers.css index fa3370bb0..18f02ae96 100644 --- a/js/web/marketoffers/css/marketoffers.css +++ b/js/web/marketoffers/css/marketoffers.css @@ -25,10 +25,7 @@ } #MarketOffers #MarketOffersBody table th { - position: sticky; - top: 0; cursor: pointer; - z-index: 1; font-size: 85%; } @@ -92,10 +89,7 @@ } #MarketOffersEvents #MarketOffersEventsBody table th { - position: sticky; - top: 0; cursor: pointer; - z-index: 1; font-size: 85%; } diff --git a/js/web/marketoffers/js/marketoffers.js b/js/web/marketoffers/js/marketoffers.js index f91703b66..2b63e4f5d 100644 --- a/js/web/marketoffers/js/marketoffers.js +++ b/js/web/marketoffers/js/marketoffers.js @@ -134,6 +134,7 @@ let MarketOffers = { h.push('
    ' + i18n('Boxes.Market.OfferColumn') + '' + i18n('Boxes.Market.NeedColumn') + '
    '); h.push(''); + h.push(''); h.push(''); h.push('') h.push(''); @@ -144,6 +145,7 @@ let MarketOffers = { h.push(''); h.push(''); h.push(''); + h.push(''); for (let i = 0; i < GoodsList.length; i++) { let CurrentGood = GoodsList[i], @@ -298,6 +300,7 @@ let MarketOffers = { }); h.push(''); + h.push(''); h.push(''); h.push(''); @@ -312,6 +315,7 @@ let MarketOffers = { h.push(''); if (MarketOffers.CurrentEventsTab === 'accepted') h.push(''); h.push(''); + h.push(''); for (let i = 0; i < EventList.length; i++) { let Event = EventList[i]; diff --git a/js/web/part-calc/css/part-calc.css b/js/web/part-calc/css/part-calc.css index 364eda9e9..f21623e62 100644 --- a/js/web/part-calc/css/part-calc.css +++ b/js/web/part-calc/css/part-calc.css @@ -358,11 +358,6 @@ color: var(--text-success); } -#PowerLevelingBox table.foe-table th { - position: sticky; - top: 0; -} - #PowerLevelingBox .hidden-text { opacity: 0; display: inline-block; diff --git a/js/web/part-calc/js/part-calc.js b/js/web/part-calc/js/part-calc.js index 39c177572..f6754faca 100644 --- a/js/web/part-calc/js/part-calc.js +++ b/js/web/part-calc/js/part-calc.js @@ -1532,7 +1532,7 @@ let Parts = { h.push('
    ' + i18n('Boxes.MarketOffers.Era') + '' + i18n('Boxes.MarketOffers.InventoryOfferSum') + '' + i18n('Boxes.MarketOffers.InventoryNeedSum') + '
    ' + i18n('Boxes.MarketOffersEvents.Date') + '' + i18n('Boxes.Market.RateColumn') + '' + i18n('Boxes.Market.PlayerColumn') + '
    '); - h.push(''); + h.push(''); h.push(''); h.push(''); h.push(''); diff --git a/js/web/productions/css/productions.css b/js/web/productions/css/productions.css index 65a5a0a18..07cbc576e 100644 --- a/js/web/productions/css/productions.css +++ b/js/web/productions/css/productions.css @@ -57,8 +57,6 @@ background-color: #3f2a1b; color: var(--text-bright); padding-top: 15px; - position: sticky; - top: 0; } #Productions #ProductionsBody table tr.highlight-row { background-color: rgba(40, 18, 7, 0.8); @@ -72,8 +70,6 @@ line-height: 18px; } #Productions #ProductionsBody table thead { - position: sticky; - top: 0; background-color: rgba(0, 0, 0, 0.35); } #Productions #ProductionsBody table thead th small { @@ -489,10 +485,7 @@ input[id*="ProdPerTile"] { } #ProductionsRating #ProductionsRatingBody table thead { font-size: 85%; - position: sticky; - top: 0; cursor: pointer; - z-index: 1; } #ProductionsRating #ProductionsRatingBody table td { font-size: 85%; diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 01d7b31e2..7e60906ec 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -532,7 +532,7 @@ let Productions = { if (rowA.length > 0) { table.push('
    ' + i18n('Boxes.PowerLeveling.Level') + '' + i18n('Boxes.PowerLeveling.P1') + '
    ') - table.push('') + table.push('') table.push('') table.push('') table.push('') @@ -785,7 +785,7 @@ let Productions = { if (rowA.length > 0) { table.push('
    ') - table.push('') + table.push('') table.push('') table.push('') if (!type.includes('att') && !type.includes('def') && type!='items') { @@ -958,7 +958,7 @@ let Productions = { // single view table table.push('
    ' + i18n('Boxes.Productions.ModeGroups') + '
    ') - table.push('') + table.push('') table.push('') table.push('') table.push('') @@ -982,7 +982,7 @@ let Productions = { // grouped view table.push('
    ' + i18n('Boxes.Productions.ModeGroups') + '
    ') - table.push('') + table.push('') table.push('') table.push('') table.push('') @@ -1019,7 +1019,7 @@ let Productions = { buildGroupedTable: (type, groupedBuildings, boostCounter) => { let tableGr = [], rowB = [] tableGr.push('
    ' + i18n('Boxes.Productions.ModeSingle') + '
    ') - tableGr.push('') + tableGr.push('') tableGr.push('') tableGr.push('') tableGr.push('') @@ -1080,7 +1080,7 @@ let Productions = { } table.push('
    ' + (type=="items" || type=="units" ?i18n('Boxes.Productions.ModeSum') : i18n('Boxes.Productions.ModeSingle')) + '
    ') - table.push('') + table.push('') table.push('') table.push('') table.push('') @@ -1577,7 +1577,7 @@ let Productions = { h.push('
    ' + i18n('Boxes.Productions.ModeSingle') + '
    '); - h.push(''); + h.push(''); h.push('') h.push('` for (let item of Object.values(items)) { - h += `` + h += `` } h +=`
    ') @@ -1950,7 +1950,7 @@ let Productions = { h = `
    - + ` diff --git a/js/web/qiprogress/css/qiprogress.css b/js/web/qiprogress/css/qiprogress.css index a40af1374..f63dd0315 100644 --- a/js/web/qiprogress/css/qiprogress.css +++ b/js/web/qiprogress/css/qiprogress.css @@ -16,11 +16,6 @@ border-radius: 2px; } -#QiProgressTable thead { - position: sticky; - top: 0; -} - #QiProgressTable .tdmin { width: 1%; white-space: nowrap; diff --git a/js/web/qiprogress/js/qiprogress.js b/js/web/qiprogress/js/qiprogress.js index 547652a33..46bca8584 100644 --- a/js/web/qiprogress/js/qiprogress.js +++ b/js/web/qiprogress/js/qiprogress.js @@ -215,7 +215,7 @@ let QiProgress = { } t.push('
    Items
    '); - t.push(''); + t.push(''); t.push(''); t.push(''); t.push(''); diff --git a/js/web/reconstruction/css/reconstruction.css b/js/web/reconstruction/css/reconstruction.css index 937ec109f..03bebb32e 100644 --- a/js/web/reconstruction/css/reconstruction.css +++ b/js/web/reconstruction/css/reconstruction.css @@ -30,12 +30,6 @@ min-width: 50px; } -#ReconstructionListBody .sorter-header { - position: sticky; - top: 0px; - z-index: 1; -} - #ReconstructionListBody tr.sorter-header th:last-child:before, #ReconstructionListBody tr.sorter-header th:last-child:after { left: 5px; diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index 4684ec112..cdd824eae 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -157,7 +157,7 @@ let reconstruction = { } h =`
    ' + i18n('General.Player') + '
    - + diff --git a/js/web/recurring-quests/css/recurring-quests.css b/js/web/recurring-quests/css/recurring-quests.css index a2d214952..e9b654e9d 100644 --- a/js/web/recurring-quests/css/recurring-quests.css +++ b/js/web/recurring-quests/css/recurring-quests.css @@ -26,10 +26,6 @@ text-align: justify; } -#RecurringQuestsBoxBody thead { - position: sticky; - top:0; -} #RecurringQuestsBoxBody th:last-child, #RecurringQuestsBoxBody td:last-child { text-align: center; diff --git a/js/web/recurring-quests/js/recurring-quests.js b/js/web/recurring-quests/js/recurring-quests.js index 76a051211..28c677f1a 100644 --- a/js/web/recurring-quests/js/recurring-quests.js +++ b/js/web/recurring-quests/js/recurring-quests.js @@ -106,7 +106,7 @@ let Recurring = { h.push(`
    ${i18n('Boxes.CityMap.Building')} #
    `); - h.push(''); + h.push(''); h.push(''); h.push(``); h.push(``); diff --git a/js/web/technologies/css/technologies.css b/js/web/technologies/css/technologies.css index 83835285b..f7ecea5b7 100644 --- a/js/web/technologies/css/technologies.css +++ b/js/web/technologies/css/technologies.css @@ -39,10 +39,7 @@ } #technologies #technologiesBody table th { - position: sticky; - top: 0; cursor: pointer; - z-index: 1; font-size: 85%; } diff --git a/js/web/technologies/js/technologies.js b/js/web/technologies/js/technologies.js index 89d6b6dcb..2dafda0f0 100644 --- a/js/web/technologies/js/technologies.js +++ b/js/web/technologies/js/technologies.js @@ -366,7 +366,7 @@ let Technologies = { h.push('
    ${i18n('Boxes.RecurringQuests.Table.Quest')} ⇋${i18n('Boxes.RecurringQuests.Table.Tasks')} ⇋
    '); - h.push('' + + h.push('' + '' + '' + '' + From c54f9d968f4e8bda42516b4da5becfb68eef789d Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sat, 7 Dec 2024 22:32:31 +0100 Subject: [PATCH 099/130] event board styling --- js/web/eventchests/css/eventchests.css | 12 ++++++++++++ js/web/eventchests/js/eventchests.js | 7 +++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/js/web/eventchests/css/eventchests.css b/js/web/eventchests/css/eventchests.css index f7575b9f6..11e08fca0 100644 --- a/js/web/eventchests/css/eventchests.css +++ b/js/web/eventchests/css/eventchests.css @@ -45,6 +45,18 @@ float: right; } +#eventpresentsBody td.icon { + position: relative; +} + +#eventpresentsBody .fragment img { + position: absolute; + bottom: 3px; + right: 0; + height: 18px; + width: auto; +} + #eventpresentsBody tr.destroyed td { text-decoration: line-through; background-color: var(--black-65); diff --git a/js/web/eventchests/js/eventchests.js b/js/web/eventchests/js/eventchests.js index 298b77cb3..9fccd4bc3 100644 --- a/js/web/eventchests/js/eventchests.js +++ b/js/web/eventchests/js/eventchests.js @@ -152,13 +152,12 @@ let EventPresents = { asset = MainParser.CityEntities[present.reward.assembledReward.subType].asset_id else asset = present.reward.assembledReward.iconAssetName - frag = srcLinks.icons("icon_tooltip_fragment") + frag = ''+srcLinks.icons("icon_tooltip_fragment")+''; } icon = ``; - - h.push(''); - h.push(''); + h.push(''); + h.push(''); h.push(''); } } From 9b6f0602a42254940b005a3c74c5eb85371e58f0 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 8 Dec 2024 00:05:21 +0100 Subject: [PATCH 100/130] GBG Map view switch --- js/web/_i18n/de.json | 1 + js/web/_i18n/en.json | 1 + js/web/guildfights/css/guildfights.css | 6 ++++++ js/web/guildfights/js/guildfights.js | 22 +++++++++++++++++++--- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index 091ae2bea..e34536595 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -475,6 +475,7 @@ "Boxes.GuildFights.ShowRoundSelector": "zeige GG Rundenauswahl", "Boxes.GuildFights.SnapshotLog": "Snapshot Log", "Boxes.GuildFights.SnapShotLogDisclaimer": "Achtung: Diese Daten basieren auf den von dir erfassten Daten. Das bedeutet, dass die hier gezeigten Zahlen wahrscheinlich nicht 100%ig stimmen, da für ein exaktes Ergebnis die Rangliste immer um Mitternacht geöffnet werden muss. ", + "Boxes.GuildFights.Switch": "Ansicht ändern", "Boxes.GuildFights.Time": "um", "Boxes.GuildFights.Title": "Spieler Übersicht", "Boxes.GuildFights.Total": "Gesamt", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index fbbe5eaf2..1ba42597e 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -475,6 +475,7 @@ "Boxes.GuildFights.ShowRoundSelector": "show GBG round selector", "Boxes.GuildFights.SnapshotLog": "Snapshot Log", "Boxes.GuildFights.SnapShotLogDisclaimer": "Disclaimer: This data is based on your collected data. The numbers shown here are probably not 100% accurate. You'd have to open the list at midnight for them to be correct.", + "Boxes.GuildFights.Switch": "Switch view", "Boxes.GuildFights.Time": "at", "Boxes.GuildFights.Title": "GBG Overview", "Boxes.GuildFights.Total": "Total", diff --git a/js/web/guildfights/css/guildfights.css b/js/web/guildfights/css/guildfights.css index 9b17b44b0..df48363c4 100644 --- a/js/web/guildfights/css/guildfights.css +++ b/js/web/guildfights/css/guildfights.css @@ -494,4 +494,10 @@ position: absolute; top: 40px; left: 3px; +} + +#ProvinceMap #switchGBGMap { + position: absolute; + top: 40px; + right: 3px; } \ No newline at end of file diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 27f93a165..271e36d00 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -1874,6 +1874,7 @@ let ProvinceMap = { ProvinceMap.Map = document.createElement("canvas"); ProvinceMap.MapCTX = ProvinceMap.Map.getContext('2d'); + ProvinceMap.view = "battleType"; $(ProvinceMap.Map).attr({ id: 'province-map', @@ -1886,13 +1887,17 @@ let ProvinceMap = { id: 'province-map-wrap', }); $(wrapper).html(ProvinceMap.Map); - $('#ProvinceMapBody').html(wrapper).append(''+i18n('Boxes.GvGMap.Action.Zoom')+''); + $('#ProvinceMapBody').html(wrapper).append(''+i18n('Boxes.GvGMap.Action.Zoom')+''+i18n('Boxes.GuildFights.Switch')+''); ProvinceMap.mapDrag(); $('#zoomGBGMap').click(function (e) { $('#province-map').toggleClass('zoomed'); }); + $('#switchGBGMap').click(function (e) { + ProvinceMap.view = ProvinceMap.view == "battleType" ? "guildType" : "battleType"; + ProvinceMap.BuildMap(); + }); ProvinceMap.MapCTX.strokeStyle = ProvinceMap.StrokeColor; ProvinceMap.MapCTX.lineWidth = 2; @@ -1966,6 +1971,11 @@ let ProvinceMap = { else { ProvinceMap.MapCTX.fillStyle = sector.owner.colors.highlight; + if (ProvinceMap.view == "battleType" && sector.battleType == "red") + ProvinceMap.MapCTX.fillStyle = "#cf401e"; + else if (ProvinceMap.view == "battleType" && sector.battleType == "blue") + ProvinceMap.MapCTX.fillStyle = "#4a98dd"; + if (mapType === 'volcano_archipelago') sector.drawSectorShape(); else @@ -2008,7 +2018,7 @@ let ProvinceMap = { titleY = y + 10; slotsY = y - 10; } - ProvinceMap.MapCTX.strokeStyle = '#fff5'; + ProvinceMap.MapCTX.strokeStyle = '#000'; ProvinceMap.MapCTX.beginPath(); if (mapType === 'waterfall_archipelago') @@ -2019,8 +2029,13 @@ let ProvinceMap = { ProvinceMap.MapCTX.fillStyle = '#f00'; if (this.battleType == 'blue') ProvinceMap.MapCTX.fillStyle = '#00f'; - ProvinceMap.MapCTX.fill(); + + if (ProvinceMap.view == "battleType") + ProvinceMap.MapCTX.fillStyle = this.owner.colors.highlight; ProvinceMap.MapCTX.stroke(); + ProvinceMap.MapCTX.fill(); + + ProvinceMap.MapCTX.strokeStyle = '#fff5'; ProvinceMap.MapCTX.font = 'bold 28px Arial'; ProvinceMap.MapCTX.strokeText(this.short, x, titleY); @@ -2036,6 +2051,7 @@ let ProvinceMap = { slots = '··'; else if (this.totalBuildingSlots == 3) slots = '···'; + ProvinceMap.MapCTX.strokeText(slots, x, slotsY); ProvinceMap.MapCTX.fillText(slots, x, slotsY); } From d85f0573638357e440e3cb4823391feabd9e4994 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 101/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index e34536595..910726ebb 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 1ba42597e..8de63d88d 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -983,6 +983,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 7e60906ec..80ef866e2 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    '); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`'); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`'); h.push(''); h.push(''); - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue - h.push(''); - h.push(''); + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue + h.push(''); + h.push(''); } h.push(''); h.push(''); @@ -1613,8 +1616,8 @@ let Productions = { if (buildingCount[building.building.entityId]) h.push('' + buildingCount[building.building.entityId]+'x') if (!building.highlight) h.push(' ') h.push('') - for (const type of Productions.RatingTypes) { - if (!Productions.Rating[type] || Productions.RatingProdPerTiles[type] == null) continue + for (const type of Productions.Rating.Types) { + if (!Productions.Rating.Data[type].active || Productions.Rating.Data[type].perTile == null) continue if (building[type] != undefined) { h.push(`') table.push('') table.push('') - table.push('') + table.push(``) table.push('') table.push('') table.push('') @@ -984,7 +987,8 @@ let Productions = { table.push('
    ' + i18n('Boxes.Technologies.Resource') + '' + i18n('Boxes.Technologies.DescRequired') + ''+ (icon.search("antiquedealer_flag") === -1 ? icon : '') + '' + frag + present.reward.name + (present.status.value === "visible" ? '' : '') +''+ (icon.search("antiquedealer_flag") === -1 ? icon : '') + frag + '' + present.reward.name + (present.status.value === "visible" ? '' : '') +'
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From 564605ca2b1a21440a5020bbaf708c9cd814663a Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 8 Dec 2024 12:23:26 +0100 Subject: [PATCH 102/130] GBG Map: own sectors are always white --- js/web/guildfights/js/guildfights.js | 41 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 271e36d00..4ad4bee53 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -1874,7 +1874,7 @@ let ProvinceMap = { ProvinceMap.Map = document.createElement("canvas"); ProvinceMap.MapCTX = ProvinceMap.Map.getContext('2d'); - ProvinceMap.view = "battleType"; + ProvinceMap.view = "guildType"; $(ProvinceMap.Map).attr({ id: 'province-map', @@ -1932,7 +1932,7 @@ let ProvinceMap = { } Province.prototype.updateMapSector = function () { - this.drawMapSector(GuildFights.MapData.map['id']); + this.drawMapSector(GuildFights.MapData.map['id']); } Province.prototype.drawMapSector = function (mapType = 'waterfall_archipelago') { @@ -1971,9 +1971,9 @@ let ProvinceMap = { else { ProvinceMap.MapCTX.fillStyle = sector.owner.colors.highlight; - if (ProvinceMap.view == "battleType" && sector.battleType == "red") + if (ProvinceMap.view == "battleType" && sector.battleType == "red" && sector.owner.colors.cid !== "own_guild_colour") ProvinceMap.MapCTX.fillStyle = "#cf401e"; - else if (ProvinceMap.view == "battleType" && sector.battleType == "blue") + else if (ProvinceMap.view == "battleType" && sector.battleType == "blue" && sector.owner.colors.cid !== "own_guild_colour") ProvinceMap.MapCTX.fillStyle = "#4a98dd"; if (mapType === 'volcano_archipelago') @@ -2018,22 +2018,26 @@ let ProvinceMap = { titleY = y + 10; slotsY = y - 10; } - ProvinceMap.MapCTX.strokeStyle = '#000'; - ProvinceMap.MapCTX.beginPath(); - if (mapType === 'waterfall_archipelago') - ProvinceMap.MapCTX.arc(x-36, y+12, 5, 0, 2*Math.PI); - else - ProvinceMap.MapCTX.arc(x-36, y+25, 5, 0, 2*Math.PI); + // do not draw dots for own sectors + if (this.owner.colors.cid != "own_guild_colour") { + ProvinceMap.MapCTX.strokeStyle = '#000'; - ProvinceMap.MapCTX.fillStyle = '#f00'; - if (this.battleType == 'blue') - ProvinceMap.MapCTX.fillStyle = '#00f'; + ProvinceMap.MapCTX.beginPath(); + if (mapType === 'waterfall_archipelago') + ProvinceMap.MapCTX.arc(x-36, titleY+12, 5, 0, 2*Math.PI); + else + ProvinceMap.MapCTX.arc(x-36, titleY+25, 5, 0, 2*Math.PI); - if (ProvinceMap.view == "battleType") - ProvinceMap.MapCTX.fillStyle = this.owner.colors.highlight; - ProvinceMap.MapCTX.stroke(); - ProvinceMap.MapCTX.fill(); + ProvinceMap.MapCTX.fillStyle = '#f00'; + if (this.battleType == 'blue') + ProvinceMap.MapCTX.fillStyle = '#00f'; + + if (ProvinceMap.view == "battleType") + ProvinceMap.MapCTX.fillStyle = this.owner.colors.highlight; + ProvinceMap.MapCTX.stroke(); + ProvinceMap.MapCTX.fill(); + } ProvinceMap.MapCTX.strokeStyle = '#fff5'; @@ -2208,7 +2212,6 @@ let ProvinceMap = { * @constructor */ RefreshSector: (socketData = []) => { - // TO DO: check sector unlock times and refresh let updatedProvince = ProvinceMap.Provinces.find(p => p.id === 0); // first sector does not have an ID, make it the default one if (socketData['id'] !== undefined) @@ -2225,8 +2228,6 @@ let ProvinceMap = { updatedProvince.owner.colors = ProvinceMap.getSectorColors(socketData.ownerId); } - //GuildFights.MapData.map.provinces[socketData['id'] || 0] = updatedProvince; - updatedProvince.updateMapSector(); }, From 08ae7f1e4f3006651e71752d5cd3a91bbf0cc552 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 8 Dec 2024 12:37:30 +0100 Subject: [PATCH 103/130] GBG Map: small change for round map --- js/web/guildfights/js/guildfights.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 4ad4bee53..6f6f02ea0 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -2024,10 +2024,7 @@ let ProvinceMap = { ProvinceMap.MapCTX.strokeStyle = '#000'; ProvinceMap.MapCTX.beginPath(); - if (mapType === 'waterfall_archipelago') - ProvinceMap.MapCTX.arc(x-36, titleY+12, 5, 0, 2*Math.PI); - else - ProvinceMap.MapCTX.arc(x-36, titleY+25, 5, 0, 2*Math.PI); + ProvinceMap.MapCTX.arc(x-36, titleY+12, 5, 0, 2*Math.PI); ProvinceMap.MapCTX.fillStyle = '#f00'; if (this.battleType == 'blue') From 0e32075fb028d3e957a581afc752c7e28617359f Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 104/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index e34536595..910726ebb 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 1ba42597e..8de63d88d 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -983,6 +983,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 7e60906ec..80ef866e2 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From ba7f8c2f3e53f1747799ca4af70984b50c59e783 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Sun, 8 Dec 2024 13:00:14 +0100 Subject: [PATCH 105/130] changelog --- changelog-de.md | 5 ++++- changelog-en.md | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/changelog-de.md b/changelog-de.md index ba2a04287..e85fa3dd5 100644 --- a/changelog-de.md +++ b/changelog-de.md @@ -16,7 +16,10 @@ - Ergebnisseite wird nun zuerst angezeigt - Itemliste versteckt - Menü: Von unten nach rechts verschoben, weil die möglichen Einstellungen gerne übersehen werden -- Gefechte: Symbole für blauen/roten Angriff in die Liste hinzugefügt +- Gefechte: + - Symbole für blauen/roten Angriff in die Countdown-Liste hinzugefügt + - Angriffsfarben zur Karte hinzugefügt + - Neue Kartenansicht, die die Angriffsfarben besser sichtbar macht **BugFix** - Tooltip: diff --git a/changelog-en.md b/changelog-en.md index 42604ae7f..d18654eaa 100644 --- a/changelog-en.md +++ b/changelog-en.md @@ -16,7 +16,10 @@ - Results will now be shown first - Item list hidden to make the table less crowded - Menu: Moved it back to the right (default was bottom), because of a game update and y'all do not look at settings -- GBG: Added symbols for the battle type (red/blue) to the countdown list +- GBG: + - Added symbols for the battle type (red/blue) to the countdown list + - Added attack colors to the map + - Added map view to highlight attack colors better **BugFix** - Tooltip: From 1a3aae5401f4050df03322a2d6aaddc04f6385a0 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 12 Dec 2024 06:06:20 +0100 Subject: [PATCH 106/130] infoboard - wait for GBG colors to be loaded --- js/web/infoboard/js/infoboard.js | 18 ++++++++++++++---- js/web/reconstruction/js/reconstruction.js | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/js/web/infoboard/js/infoboard.js b/js/web/infoboard/js/infoboard.js index 74b0c3c47..666caae36 100644 --- a/js/web/infoboard/js/infoboard.js +++ b/js/web/infoboard/js/infoboard.js @@ -191,7 +191,7 @@ let Infoboard = { * @param dir * @param data */ - HandleMessage: (dir, data) => { + HandleMessage: async (dir, data) => { let Msg = data[0]; @@ -213,7 +213,7 @@ let Infoboard = { return; } - let bd = Info[s](Msg['responseData']); + let bd = await Info[s](Msg['responseData']); if (!bd) { return; @@ -521,9 +521,19 @@ let Info = { * @param d * @returns {{msg: string, type: string, class: string}} */ - GuildBattlegroundService_getProvinces: (d) => { + GuildBattlegroundService_getProvinces: async (d) => { - GuildFights.PrepareColors(); + x = new Promise((resolve) => { + let timer = () => { + if (!GuildFights.SortedColors) { + setTimeout(timer,50) + } else { + resolve() + } + } + timer() + }), + await x let data = d[0]; diff --git a/js/web/reconstruction/js/reconstruction.js b/js/web/reconstruction/js/reconstruction.js index cdd824eae..9d289836e 100644 --- a/js/web/reconstruction/js/reconstruction.js +++ b/js/web/reconstruction/js/reconstruction.js @@ -66,6 +66,7 @@ FoEproxy.addRequestHandler('CityReconstructionService', 'saveDraft', (data) => { reconstruction.pageUpdate(id) pagesUpdated=true } + FoEproxy.triggerFoeHelperHandler('ReconstructionBuildingPlaced',x.entityId) } else if (!x.position) { reconstruction.count[id].placed-- reconstruction.count[id].stored++ From 2c6a7bbc2deb4cf20572073602ad35322858df01 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Thu, 28 Nov 2024 22:50:22 +0100 Subject: [PATCH 107/130] efficiency - changed Rating Data structure --- js/web/_i18n/de.json | 2 + js/web/_i18n/en.json | 2 + js/web/productions/js/productions.js | 186 +++++++++++++-------------- 3 files changed, 97 insertions(+), 93 deletions(-) diff --git a/js/web/_i18n/de.json b/js/web/_i18n/de.json index e34536595..910726ebb 100644 --- a/js/web/_i18n/de.json +++ b/js/web/_i18n/de.json @@ -982,6 +982,8 @@ "Boxes.ProductionsRating.ShowValuesPerTile": "Werte pro Feld", "Boxes.ProductionsRating.Title": "Gebäude - Effizienzberechnung", "Boxes.ProductionsRating.Filter":"Suche", + "Boxes.ProductionsRating.Reset":"Auf Standartwerte zurücksetzen", + "Boxes.ProductionsRating.ConfirmReset":"Bestätige Rücksetzen?", "Boxes.ProductionsRating.FindSpecialBuilding":"Spezialgebäude finden", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Art", diff --git a/js/web/_i18n/en.json b/js/web/_i18n/en.json index 1ba42597e..8de63d88d 100644 --- a/js/web/_i18n/en.json +++ b/js/web/_i18n/en.json @@ -983,6 +983,8 @@ "Boxes.ProductionsRating.Title": "Buildings Efficiency Rating", "Boxes.ProductionsRating.Filter":"Search", "Boxes.ProductionsRating.FindSpecialBuilding":"Find Special Building", + "Boxes.ProductionsRating.Reset":"Reset to default", + "Boxes.ProductionsRating.ConfirmReset":"Confirm Reset?", "Boxes.PvPArena.Title": "PvP-Arena", "Boxes.PvPArena.Type": "Type", "Boxes.PvPArena.PlayerName": "Player", diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 7e60906ec..80ef866e2 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -68,73 +68,73 @@ let Productions = { ], RatingCurrentTab: 'Results', - Rating: JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}"), - RatingProdPerTiles: Object.assign({ - 'strategy_points': 5, - 'money': null, - 'supplies': null, - 'medals': null, - 'clan_power': null, - 'clan_goods': 10, - 'population': null, - 'happiness': null, - 'units': 1, - 'att_boost_attacker-all': 3 , - 'att_boost_attacker-guild_expedition': null, - 'att_boost_attacker-battleground': 3 , - 'att_boost_attacker-guild_raids': null, - 'def_boost_attacker-all': 3, - 'def_boost_attacker-guild_expedition': null, - 'def_boost_attacker-battleground': 3 , - 'def_boost_attacker-guild_raids': null, - 'att_boost_defender-all': 2, - 'att_boost_defender-guild_expedition': null, - 'att_boost_defender-battleground': null, - 'att_boost_defender-guild_raids': null, - 'def_boost_defender-all': 2, - 'def_boost_defender-guild_expedition': null, - 'def_boost_defender-battleground': null, - 'def_boost_defender-guild_raids': null, - 'goods-previous': 4, - 'goods-current': 5, - 'fsp': 1, - 'goods-next': null, - },JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")), - - RatingTypes: [ - 'strategy_points', // Forge Punkte - 'money', // Münzen - 'supplies', // Werkzeuge - 'medals', // Medaillien - 'clan_power', // Macht der Gilde - 'clan_goods', // Gildengüter (Arche, Ehrenstatue etc.) - 'population', // Bevölkerung - 'happiness', // Zufriedenheit - 'units', // Einheiten - 'att_boost_attacker-all', //Angriffsbonus angreifende Armee - 'att_boost_attacker-guild_expedition', - 'att_boost_attacker-battleground', - 'att_boost_attacker-guild_raids', - 'def_boost_attacker-all', //Verteidigungsbonus angreifende Armee - 'def_boost_attacker-guild_expedition', - 'def_boost_attacker-battleground', - 'def_boost_attacker-guild_raids', - 'att_boost_defender-all', //Angriffsbonus verteidigenden Armee - 'att_boost_defender-guild_expedition', - 'att_boost_defender-battleground', - 'att_boost_defender-guild_raids', - 'def_boost_defender-all', //Verteidigungsbonus verteidigenden Armee - 'def_boost_defender-guild_expedition', - 'def_boost_defender-battleground', - 'def_boost_defender-guild_raids', - 'goods-previous', - 'goods-current', - 'goods-next', - 'fsp', - ], + fragmentsSet: new Set(), efficiencySettings:Object.assign(JSON.parse(localStorage.getItem("Productions.efficiencySettings")||`{"tilevalues":false,"showitems":true,"showhighlighted":false}`),{showhighlighted:false}), + Rating: { + Data:null, + Types:null, + load: (overwrite=null) => { + Productions.Rating.Data = Object.assign({ + 'strategy_points': {order:1,perTile:5,active:true}, + 'money': {order:2,perTile:null,active:false}, + 'supplies': {order:3,perTile:null,active:false}, + 'medals': {order:4,perTile:null,active:false}, + 'clan_power': {order:5,perTile:null,active:false}, + 'clan_goods': {order:6,perTile:10,active:true}, + 'population': {order:7,perTile:null,active:false}, + 'happiness': {order:8,perTile:null,active:false}, + 'units': {order:9,perTile:1,active:true}, + 'att_boost_attacker-all': {order:10,perTile:3,active:true} , + 'att_boost_attacker-guild_expedition': {order:11,perTile:null,active:false}, + 'att_boost_attacker-battleground': {order:12,perTile:3,active:true} , + 'att_boost_attacker-guild_raids': {order:13,perTile:null,active:false}, + 'def_boost_attacker-all': {order:14,perTile:3,active:true}, + 'def_boost_attacker-guild_expedition': {order:15,perTile:null,active:false}, + 'def_boost_attacker-battleground': {order:16,perTile:3,active:true} , + 'def_boost_attacker-guild_raids': {order:17,perTile:null,active:false}, + 'att_boost_defender-all': {order:18,perTile:2,active:true}, + 'att_boost_defender-guild_expedition': {order:19,perTile:null,active:false}, + 'att_boost_defender-battleground': {order:20,perTile:null,active:false}, + 'att_boost_defender-guild_raids': {order:21,perTile:null,active:false}, + 'def_boost_defender-all': {order:22,perTile:2,active:true}, + 'def_boost_defender-guild_expedition': {order:23,perTile:null,active:false}, + 'def_boost_defender-battleground': {order:24,perTile:null,active:false}, + 'def_boost_defender-guild_raids': {order:25,perTile:null,active:false}, + 'goods-previous': {order:26,perTile:4,active:true}, + 'goods-current': {order:27,perTile:5,active:true}, + 'goods-next': {order:28,perTile:null,active:false}, + 'fsp': {order:29,perTile:1,active:true}, + }, overwrite || JSON.parse(localStorage.getItem('Productions.Rating.Data')||"{}")) + Productions.Rating.Types = Object.keys(Productions.Rating.Data).sort((a,b)=>Productions.Rating.Data[a].order-Productions.Rating.Data[b].order) + + + //conversion of old data - remove at some point------------------------------------ + if (localStorage.getItem('ProductionRatingEnableds2')) { + let Rating = JSON.parse(localStorage.getItem('ProductionRatingEnableds2')||"{}") + for (let [type,active] of Object.entries(Rating)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].active = active + } + localStorage.removeItem('ProductionRatingEnableds2') + Productions.Rating.save() + } + if (localStorage.getItem('ProductionRatingProdPerTiles')) { + let RatingProdPerTiles = Object.assign({},JSON.parse(localStorage.getItem('ProductionRatingProdPerTiles')||"{}")) + for (let [type,perTile] of Object.entries(RatingProdPerTiles)) { + if (Productions.Rating.Data[type]) Productions.Rating.Data[type].perTile = perTile + } + localStorage.removeItem('ProductionRatingProdPerTiles') + Productions.Rating.save() + } + //------------------------------------------------------------------------------ + }, + save:() => { + localStorage.setItem('Productions.Rating.Data', JSON.stringify(Productions.Rating.Data)) + } + + }, + init: () => { if (CityMap.IsExtern) return @@ -1454,6 +1454,7 @@ let Productions = { ShowRating: (external = false, eraName = null) => { + if (!Productions.Rating.Data) Productions.Rating.load() if (CityMap.IsExtern && !external) return let era = (eraName == null) ? CurrentEra : eraName @@ -1462,11 +1463,6 @@ let Productions = { Productions.BuildingsAll = Object.values(CityMap.createNewCityMapEntities()) Productions.setChainsAndSets(Productions.BuildingsAll) - for (let type of Productions.RatingTypes) { - if (Productions.Rating[type] === undefined) Productions.Rating[type] = (Productions.RatingProdPerTiles[type] ?? true) - if (Productions.RatingProdPerTiles[type] === undefined) Productions.RatingProdPerTiles[type] = 0 - } - HTML.Box({ id: 'ProductionsRating', title: i18n('Boxes.ProductionsRating.Title'), @@ -1482,6 +1478,13 @@ let Productions = { Productions.CalcRatingBody(); }); + $('#ProductionsRating').on('click', '.reset-button', function () { + if (window.confirm(i18n('Boxes.ProductionsRating.ConfirmReset'))) { + Productions.Rating.load("{}") + Productions.Rating.save() + Productions.CalcRatingBody(); + } + }); } else { HTML.CloseOpenBox('ProductionsRating'); @@ -1514,21 +1517,21 @@ let Productions = { h.push('' + i18n('Boxes.ProductionsRating.ProdPerTile') + '') h.push('') - for (let type of Productions.RatingTypes) { + for (let type of Productions.Rating.Types) { h.push('
  • ') - let activeSetting = (Productions.RatingProdPerTiles[type] != null && Productions.Rating[type] != false) + let activeSetting = (Productions.Rating.Data[type].perTile != null && Productions.Rating.Data[type].active != false) h.push('') h.push('') h.push('') - if (Productions.RatingProdPerTiles[type] != null) { - h.push('') + if (Productions.Rating.Data[type].perTile != null) { + h.push('') } else { h.push('') } h.push('
  • ') } - h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '
  • ') + h.push('
  • ' + i18n('Boxes.ProductionsRating.Results') + '' + i18n('Boxes.ProductionsRating.Reset') + '
  • ') h.push('') h.push('

    '+i18n('Boxes.ProductionsRating.Explainer')+'

    ') h.push('

    '+i18n('Boxes.ProductionsRating.Disclaimer')+'

    ') @@ -1572,7 +1575,7 @@ let Productions = { return 0 }) - let colNumber = Object.values(Productions.Rating).filter(x=>!!x).length + let colNumber = Object.values(Productions.Rating.Data).filter(x=>x.active && x.perTile!=null).length h.push('
    '); h.push('' + i18n('Boxes.ProductionsRating.Settings') + '') @@ -1591,10 +1594,10 @@ let Productions = { h.push('
    ' + i18n('Boxes.ProductionsRating.Score') + '' + i18n('Boxes.ProductionsRating.BuildingName') + ''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.RatingProdPerTiles?.[type] || 0)+''+(Productions.Rating.Data[type].perTile || 0)+''+(Productions.Rating.Data[type].perTile || 0)+'Items
    `) h.push(HTML.Format(building[type])) @@ -1734,24 +1737,21 @@ let Productions = { elem.parent().children('input[type=number]').toggleClass('hidden') - Productions.Rating[type] = isChecked - localStorage.setItem('ProductionRatingEnableds2', JSON.stringify(Productions.Rating)) + Productions.Rating.Data[type].active = isChecked + if (isChecked) { - Productions.RatingProdPerTiles[type] = parseFloat(elem.parent().children('input[type=number]').val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 - - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.Data[type].perTile = parseFloat(elem.parent().children('input[type=number]').val()) || 0 } + Productions.Rating.save() }) $('#ProductionsRating input[type=number]').on('blur', function () { let elem = $(this) let type = elem.attr('id').replace('ProdPerTile-','') - Productions.RatingProdPerTiles[type] = parseFloat(elem.val()) - if (isNaN(Productions.RatingProdPerTiles[type])) Productions.RatingProdPerTiles[type] = 0 + Productions.Rating.Data[type].perTile = parseFloat(elem.val()) || 0 - localStorage.setItem('ProductionRatingProdPerTiles', JSON.stringify(Productions.RatingProdPerTiles)) + Productions.Rating.save() Productions.CalcRatingBody() }); @@ -1786,9 +1786,9 @@ let Productions = { let ratedBuilding = { building: building } - for (const type of Object.keys(Productions.Rating)) { - if (Productions.Rating[type] != false) { - let desiredValuePerTile = parseFloat(Productions.RatingProdPerTiles[type]) || 0 + for (const type of Object.keys(Productions.Rating.Data)) { + if (Productions.Rating.Data[type].active) { + let desiredValuePerTile = parseFloat(Productions.Rating.Data[type].perTile) || 0 if (desiredValuePerTile !== null && !isNaN(desiredValuePerTile)) { let typeValue = Productions.getRatingValueForType(building, type) || 0 // production amount let valuePerTile = typeValue / size From 646f3ea1c8f9e859ca2e774dd2c057bb196c33bb Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Fri, 13 Dec 2024 06:49:57 +0100 Subject: [PATCH 108/130] rating - fix bug --- js/web/productions/js/productions.js | 1 + 1 file changed, 1 insertion(+) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 80ef866e2..6e353a33a 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1774,6 +1774,7 @@ let Productions = { rateBuildings: (buildingType,additional=false, era=null) => { + if (!Productions.Rating.Data) Productions.Rating.load() let ratedBuildings = [] if (additional) { buildingType = buildingType.map(x=>CityMap.createNewCityMapEntity(x,era||CurrentEra)) From 0206c6ff23ec000b86170101656dba315c56f91a Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 14 Dec 2024 06:07:14 +0100 Subject: [PATCH 109/130] production - added total goods --- js/web/productions/js/productions.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 6e353a33a..185f4e8e9 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -883,6 +883,7 @@ let Productions = { } // single view table content + let totalGoods = {current:0,all:0} buildingIds.forEach(b => { let building = CityMap.getBuildingById(b.id) if (building.player_id == ExtPlayerID) { @@ -900,7 +901,7 @@ let Productions = { building: building, amount: 1, } - for (era of eras) { + for (let era of eras) { gBuilding[era] = 0 } updateGroup = gBuilding @@ -912,14 +913,16 @@ let Productions = { let currentGoods = Productions.getBuildingProductionByCategory(true, building, type) let allGoods = Productions.getBuildingProductionByCategory(false, building, type) - + eras.forEach(era => { let currentGoodAmount = 0 let goodAmount = 0 if (allGoods != undefined) { erasCurrent[era] += currentGoodAmount = currentGoods?.eras?.[era] || 0 erasTotal[era] += goodAmount = allGoods?.eras?.[era] || 0 - updateGroup[era] += goodAmount = allGoods?.eras?.[era] || 0 + updateGroup[era] += goodAmount + totalGoods.all += goodAmount + totalGoods.current += currentGoodAmount } rowA.push('') if (currentGoodAmount != goodAmount) { @@ -961,7 +964,7 @@ let Productions = { table.push('
    ' + i18n('Boxes.Productions.ModeGroups') + ' ${HTML.Format(totalGoods.current)}/${HTML.Format(totalGoods.all)}
    ') table.push('') table.push('') - table.push('') + table.push('') + table.push(``) table.push('') table.push('') table.push('') From 5028387e9da5bd24b82c20a08b5c35ee79c975f5 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 14 Dec 2024 06:23:28 +0100 Subject: [PATCH 110/130] production - total goods - reduce calculations --- js/web/productions/js/productions.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 185f4e8e9..fb734f04b 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -883,7 +883,6 @@ let Productions = { } // single view table content - let totalGoods = {current:0,all:0} buildingIds.forEach(b => { let building = CityMap.getBuildingById(b.id) if (building.player_id == ExtPlayerID) { @@ -921,8 +920,6 @@ let Productions = { erasCurrent[era] += currentGoodAmount = currentGoods?.eras?.[era] || 0 erasTotal[era] += goodAmount = allGoods?.eras?.[era] || 0 updateGroup[era] += goodAmount - totalGoods.all += goodAmount - totalGoods.current += currentGoodAmount } rowA.push('') table.push('') table.push('') - table.push(``) + table.push(``) table.push('') table.push('') table.push('') @@ -988,7 +985,7 @@ let Productions = { table.push('') table.push('') table.push('') - table.push(``) + table.push(``) table.push('') table.push('') table.push('') From 2746eef7aa9655ef94777744f1967a99ddf00c3b Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 14 Dec 2024 09:00:34 +0100 Subject: [PATCH 111/130] efficiency - add building: also search building id (e.g. win24) - item sources: add era data, so efficiency is calculated in tooltip --- js/web/productions/js/productions.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index fb734f04b..0e3cb2825 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1716,11 +1716,11 @@ let Productions = { }); let filterMeta = (regEx) => { $('#ProductionsRatingBody .overlay .results').html("") - let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && x.selected).sort((a,b)=>(a.name>b.name?1:-1)) + let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => x.selected && regEx.test(JSON.stringify(x))).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) } - foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.name) && !x.selected).sort((a,b)=>(a.name>b.name?1:-1)) + foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x =>!x.selected && regEx.test(JSON.stringify(x))).sort((a,b)=>(a.name>b.name?1:-1)) for (building of foundBuildings) { $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) } @@ -1994,7 +1994,7 @@ let Productions = { } h=`
      ` for (b of item.buildings) { - h+=`
    • ${MainParser.CityEntities[b].name}
    • ` + h+=`
    • ${MainParser.CityEntities[b].name}
    • ` } h+=`
    ` $(itemId).html(h) From 6f990c41b27a80841022482edaf610cb523ee47b Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Sat, 14 Dec 2024 12:03:44 +0100 Subject: [PATCH 112/130] efficiency - add building: improve code efficiency --- js/web/productions/js/productions.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 0e3cb2825..8f3538199 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1502,7 +1502,7 @@ let Productions = { let spB = Object.values(MainParser.CityEntities).filter(x=> (x.is_special && !["O_","U_","V_","H_","Y_"].includes(x.id.substring(0,2))) || x.id.substring(0,11)=="W_MultiAge_") Productions.AdditionalSpecialBuildings = {} for (x of spB) { - Productions.AdditionalSpecialBuildings[x.id] = {id:x.id,name:x.name,selected:false} + Productions.AdditionalSpecialBuildings[x.id] = {id:x.id,name:x.name,selected:false,filter:x.id+";"+x.name} } } let h = []; @@ -1716,13 +1716,10 @@ let Productions = { }); let filterMeta = (regEx) => { $('#ProductionsRatingBody .overlay .results').html("") - let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => x.selected && regEx.test(JSON.stringify(x))).sort((a,b)=>(a.name>b.name?1:-1)) + let foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x => regEx.test(x.filter)) + .sort((a,b)=>(((a.selected != b.selected) ? (a.selected ? -2 : 2) : 0)+(a.name>b.name?1:-1))) for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) - } - foundBuildings = Object.values(Productions.AdditionalSpecialBuildings).filter(x =>!x.selected && regEx.test(JSON.stringify(x))).sort((a,b)=>(a.name>b.name?1:-1)) - for (building of foundBuildings) { - $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) + $('#ProductionsRatingBody .overlay .results').append(`
  • ${building.name}
  • `) } } filterMeta(/./) From 1955c886a5a94097c02d3e2a2266e4e32d5240ae Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Mon, 16 Dec 2024 17:04:39 +0100 Subject: [PATCH 113/130] popgame - move box up a bit --- js/web/popgame/css/popgame.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/web/popgame/css/popgame.css b/js/web/popgame/css/popgame.css index 56eae4534..50c928f8e 100644 --- a/js/web/popgame/css/popgame.css +++ b/js/web/popgame/css/popgame.css @@ -34,7 +34,7 @@ } #PGwrapper.wildlife { position: relative; - top: calc(50% - 226px); + top: calc(50% - 229px); left: calc(50% - 260px); } #PGwarning { From 8684356574b36a4861224fcf065f2babadf48638 Mon Sep 17 00:00:00 2001 From: Daniel Siekiera <133780157+x-sitter@users.noreply.github.com> Date: Wed, 18 Dec 2024 10:22:04 +0100 Subject: [PATCH 114/130] Friends-Compare > Changed HTML chars to svg's () --- css/web/boxes.css | 7 +++++++ .../css/compare_friends_threads.css | 5 ++++- .../compare_friends_threads/js/compare_friends_threads.js | 8 +++++--- planner/planner.js | 4 ++++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/css/web/boxes.css b/css/web/boxes.css index dc86d0627..e5682fd87 100644 --- a/css/web/boxes.css +++ b/css/web/boxes.css @@ -2124,6 +2124,13 @@ tr.sorter-header th:not(.no-sort).descending:after { z-index: 101; } + +.d-none { + display: none; +} +.d-none { + display: none; +} /*fallback for all tools that do not specify their own scale*/ :root { --unit_scale: 3/5; diff --git a/js/web/compare_friends_threads/css/compare_friends_threads.css b/js/web/compare_friends_threads/css/compare_friends_threads.css index 2a1b86e04..fe1c45226 100644 --- a/js/web/compare_friends_threads/css/compare_friends_threads.css +++ b/js/web/compare_friends_threads/css/compare_friends_threads.css @@ -33,5 +33,8 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - +} + +#friendsCompareTable td svg { + max-width: 25px; } \ No newline at end of file diff --git a/js/web/compare_friends_threads/js/compare_friends_threads.js b/js/web/compare_friends_threads/js/compare_friends_threads.js index d355922d1..54ca2b6da 100644 --- a/js/web/compare_friends_threads/js/compare_friends_threads.js +++ b/js/web/compare_friends_threads/js/compare_friends_threads.js @@ -207,9 +207,10 @@ let CompareFriendsThreads = { } if(CompareFriendsThreads.Threads[x]['participants'].findIndex(p => p.playerId === Player.PlayerID) === -1){ - t.push(``); - } else { - t.push(``); + t.push(``); + } + else { + t.push(``); } } @@ -219,6 +220,7 @@ let CompareFriendsThreads = { t.push(''); t.push('
    ' + i18n('Boxes.Productions.ModeSingle') + '' + i18n('Boxes.Productions.ModeSingle') + '${HTML.Format(totalGoods.current)}/${HTML.Format(totalGoods.all)}
    ' + i18n('Boxes.Productions.Headings.number') + '') if (currentGoodAmount != goodAmount) { @@ -964,7 +961,7 @@ let Productions = { table.push('
    ' + i18n('Boxes.Productions.ModeGroups') + ' ${HTML.Format(totalGoods.current)}/${HTML.Format(totalGoods.all)}${HTML.Format(Object.values(erasCurrent).reduce((a,b)=>a+b))}/${HTML.Format(Object.values(erasTotal).reduce((a,b)=>a+b))}
    ' + i18n('Boxes.Productions.ModeSingle') + '${HTML.Format(totalGoods.current)}/${HTML.Format(totalGoods.all)}${HTML.Format(Object.values(erasCurrent).reduce((a,b)=>a+b))}/${HTML.Format(Object.values(erasTotal).reduce((a,b)=>a+b))}
    ' + i18n('Boxes.Productions.Headings.number') + '
    '); + t.push(''); $('#friendsCompareBoxBody').html(t.join('')); } diff --git a/planner/planner.js b/planner/planner.js index 91e4fcac5..28c9d1300 100644 --- a/planner/planner.js +++ b/planner/planner.js @@ -86,6 +86,7 @@ function drawEmptyMap () { function drawExpansion (expansion) { ctx.fillStyle = '#fffead' ctx.strokeStyle = '#cbca4a' + ctx.lineWidth = 0.5 // ctx.fillRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) // ctx.strokeRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) @@ -101,6 +102,9 @@ function drawExpansion (expansion) { }); } } + + ctx.strokeStyle = '#8c8a19' + ctx.strokeRect((expansion.x || 0) * size, (expansion.y || 0) * size, expansion.width * size, expansion.length * size) } function createMapGridPart(data) { From f1d5fa6c598be15a76398045b8e9f3cfbb94bd00 Mon Sep 17 00:00:00 2001 From: Beelzebob6666 <6Beelzebob6@gmail.com> Date: Wed, 18 Dec 2024 17:37:09 +0100 Subject: [PATCH 115/130] item sources - fix same icon for different items and remove certain amounts from id and name --- js/web/productions/js/productions.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/js/web/productions/js/productions.js b/js/web/productions/js/productions.js index 8f3538199..31485222a 100644 --- a/js/web/productions/js/productions.js +++ b/js/web/productions/js/productions.js @@ -1954,7 +1954,7 @@ let Productions = {
    ${srcLinks.icons(item.id)} ${item.name}
    ${srcLinks.icons(item.icon)} ${item.name}
    @@ -1965,17 +1965,21 @@ let Productions = { }, buildingItemList: () => { - let temp = Object.assign({},...Object.values(MainParser.CityEntities).filter(b=>b.id[0]=="W").map(x=>({[x.id]:[...JSON.stringify(x).matchAll(/"name":"([^"]*?)"[^()[\]{}]*?"iconAssetName":"([^"]*?)"[^{}]*?"__class__":"GenericReward"/gm)].map(a=>({id:a[2],name:a[1]}))}))) + let temp = Object.assign({},...Object.values(MainParser.CityEntities).filter(b=>b.id[0]=="W").map(x=>({[x.id]:[...JSON.stringify(x).matchAll(/"id":"([^"]*?)"[^()[\]{}]*?"name":"([^"]*?)"[^()[\]{}]*?"iconAssetName":"([^"]*?)"[^{}]*?"__class__":"GenericReward"/gm)].map(a=>({id:a[1],name:a[2],icon:a[3]}))}))) let gl = Object.values(GoodsList).map(g=>g.id) let items = {} for (let [building,list] of Object.entries(temp)) { for (let item of list) { - if (gl.includes(item.id)) continue - if (["","icon_fragment"].includes(item.id)) continue + if (gl.includes(item.icon)) continue + if (["","icon_fragment"].includes(item.icon)) continue + if (/#\d+/.test(item.id)) { + item.id=item.id.replaceAll(/#\d+/g,'') + item.name=item.name.replaceAll(/\s?\d+\s?/g,'') + } if (items[item.id]) { if (!items[item.id].buildings.includes(building)) items[item.id].buildings.push(building) } else { - items[item.id] = {name:item.name,buildings:[building],id:item.id} + items[item.id] = {name:item.name,buildings:[building],id:item.id,icon:item.icon} } } } From d421f328f2e36c69f5a670f096bc700c383768d2 Mon Sep 17 00:00:00 2001 From: Weblate Date: Wed, 18 Dec 2024 23:14:53 +0000 Subject: [PATCH 116/130] Currently translated at 78.8% (1199 of 1520 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/ru/ --- js/web/_i18n/ru.json | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/web/_i18n/ru.json b/js/web/_i18n/ru.json index 577aedb97..003121ba2 100644 --- a/js/web/_i18n/ru.json +++ b/js/web/_i18n/ru.json @@ -851,6 +851,13 @@ "Boxes.Technologies.NoTechs": "Вы достигли конца эпохи", "Boxes.Technologies.Resource": "Ресурс", "Boxes.Technologies.Title": "Стоимость исследования", + "Boxes.Tooltip.Building.canMotivate": "может быть мотивирован", + "Boxes.Tooltip.Building.canPolish": "может быть мотивирован", + "Boxes.Tooltip.Building.produces": "Производит", + "Boxes.Tooltip.Building.provides": "Обеспечивает", + "Boxes.Tooltip.Building.road": "требует дороги", + "Boxes.Tooltip.Building.size+time": "Размер и время строительства", + "Boxes.Tooltip.Building.traits": "Особенность", "Boxes.Treasury.Action": "Сообщение", "Boxes.Treasury.Amount": "Количество", "Boxes.Treasury.DateTime": "Дата/Время", From c4fcb7b39723395cc657c1e99753f1eddd5dcf5a Mon Sep 17 00:00:00 2001 From: Weblate Date: Thu, 19 Dec 2024 17:56:39 +0000 Subject: [PATCH 117/130] Currently translated at 100.0% (1526 of 1526 strings) Translation: FoE Helper/Extension Translate-URL: http://i18n.foe-helper.com/projects/foe-helper/extension/fr/ --- js/web/_i18n/fr.json | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/js/web/_i18n/fr.json b/js/web/_i18n/fr.json index c6803e315..3e0321c52 100644 --- a/js/web/_i18n/fr.json +++ b/js/web/_i18n/fr.json @@ -229,6 +229,8 @@ "Boxes.CityMap.QIActionRechargeCycle": "Toutes les heures", "Boxes.CityMap.QICycle": "toutes les 10 heures", "Boxes.CityMap.QIHint": "Toutes les valeurs affichées, à 'exception des actions par heure, supposent que la construction de vos bâtiments est terminée.", + "Boxes.CityMap.ShowAscendableBuildings": "Mettre en surbrillance les bâtiments améliorables", + "Boxes.CityMap.ShowDecayedBuildings": "Mettre en surbrillance les bâtiments limités échus", "Boxes.CityMap.ShowNoStreetBuildings": "Mettre en surbrillance les bâtiments qui n'ont pas besoin de route", "Boxes.CityMap.ShowSubmitBox": "Envoyer", "Boxes.CityMap.StreetsAmount": "Nombres de routes : ", @@ -469,6 +471,7 @@ "Boxes.GuildFights.ShowRoundSelector": "Afficher le sélecteur de tour de CBG", "Boxes.GuildFights.SnapShotLogDisclaimer": "Avis de non-responsabilité : ces données sont basées sur vos données collectées. Les chiffres présentés ici ne sont probablement pas exacts à 100 %. Il faudrait ouvrir la liste à minuit pour qu'ils soient corrects.", "Boxes.GuildFights.SnapshotLog": "Log des aperçus instantanés", + "Boxes.GuildFights.Switch": "Changer la vue", "Boxes.GuildFights.Time": "à", "Boxes.GuildFights.Title": "Activité de membre", "Boxes.GuildFights.Total": "Total", @@ -902,6 +905,7 @@ "Boxes.Productions.DateNA": "Inconnu", "Boxes.Productions.Done": "Terminé", "Boxes.Productions.EmptyList": "Il n'y a pas de bâtiment dans cette catégorie.", + "Boxes.Productions.FSP": "Finition Fragment de production spéciale", "Boxes.Productions.FilterTable": "Filtre Bâtiments", "Boxes.Productions.GoodEraTotal": "Total", "Boxes.Productions.GuildGoods": "Trésorerie de guilde", @@ -960,6 +964,7 @@ "Boxes.ProductionsRating.AddBuilding": "Ajouter un bâtiment spécial", "Boxes.ProductionsRating.AddBuildings": "Ajouter tous les bâtiments sélectionnés", "Boxes.ProductionsRating.BuildingName": "Bâtiment", + "Boxes.ProductionsRating.ConfirmReset": "Confirmer la réinitialisation ?", "Boxes.ProductionsRating.CountTooltip": "Remarque : tous les bâtiments ne correspondent peut-être pas encore à l'époque indiquée à côté du nom. Vérifiez sur la carte pour être sûr !", "Boxes.ProductionsRating.Disclaimer": "Pour les bâtiments de chaîne, l’ensemble de la chaîne est traité comme un seul bâtiment. Pour les ensembles, nous supposons que toutes les pièces sont entièrement connectées.", "Boxes.ProductionsRating.Enabled": "Activé", @@ -969,6 +974,7 @@ "Boxes.ProductionsRating.FindSpecialBuilding": "Trouver un bâtiment spécial", "Boxes.ProductionsRating.HighlightsExplained": "Comment mettre en évidence les bâtiments : cliquez sur n'importe quelle ligne pour sélectionner les bâtiments que vous souhaitez comparer plus facilement. Les résultats de la recherche sont marqués automatiquement.", "Boxes.ProductionsRating.ProdPerTile": "Production quotidienne prévue/case", + "Boxes.ProductionsRating.Reset": "Rétablissement des valeurs par défaut", "Boxes.ProductionsRating.Results": "Résultat", "Boxes.ProductionsRating.Score": "Note", "Boxes.ProductionsRating.Settings": "Réglages", From e110330a737bd7aa390e6b0fb9484b8d4a930f96 Mon Sep 17 00:00:00 2001 From: outoftheline Date: Fri, 20 Dec 2024 19:42:12 +0100 Subject: [PATCH 118/130] gbg countdown list styling --- js/web/guildfights/css/guildfights.css | 150 ++----------------------- js/web/guildfights/js/guildfights.js | 4 +- 2 files changed, 13 insertions(+), 141 deletions(-) diff --git a/js/web/guildfights/css/guildfights.css b/js/web/guildfights/css/guildfights.css index df48363c4..ea25b657b 100644 --- a/js/web/guildfights/css/guildfights.css +++ b/js/web/guildfights/css/guildfights.css @@ -195,147 +195,13 @@ } #LiveGildFightingBody .province-color, #LiveGildFightingBody .province-color-round { - width: 10px; - height: 10px; + width: 13px; + height: 13px; display: inline-block; box-shadow: 0 1px 1px var(--black-65); - border-radius: 50%; -} - -/* A */ -#province-0 .province-color, -#province-4 .province-color, -#province-5 .province-color, -#province-12 .province-color, -#province-13 .province-color, -#province-14 .province-color, -#province-15 .province-color, -#province-28 .province-color, -#province-29 .province-color, -#province-30 .province-color, -#province-31 .province-color, -#province-32 .province-color, -#province-33 .province-color, -#province-34 .province-color, -#province-35 .province-color, -#timer-0 .province-color, -#timer-4 .province-color, -#timer-5 .province-color, -#timer-12 .province-color, -#timer-13 .province-color, -#timer-14 .province-color, -#timer-15 .province-color, -#timer-28 .province-color, -#timer-29 .province-color, -#timer-30 .province-color, -#timer-31 .province-color, -#timer-32 .province-color, -#timer-33 .province-color, -#timer-34 .province-color, -#timer-35 .province-color { - border-radius: 2px 100% 2px 2px; -} - -/* B */ -#province-1 .province-color, -#province-6 .province-color, -#province-7 .province-color, -#province-16 .province-color, -#province-17 .province-color, -#province-18 .province-color, -#province-19 .province-color, -#province-36 .province-color, -#province-37 .province-color, -#province-38 .province-color, -#province-39 .province-color, -#province-40 .province-color, -#province-41 .province-color, -#province-42 .province-color, -#province-43 .province-color, -#timer-1 .province-color, -#timer-6 .province-color, -#timer-7 .province-color, -#timer-16 .province-color, -#timer-17 .province-color, -#timer-18 .province-color, -#timer-19 .province-color, -#timer-36 .province-color, -#timer-37 .province-color, -#timer-38 .province-color, -#timer-39 .province-color, -#timer-40 .province-color, -#timer-41 .province-color, -#timer-42 .province-color, -#timer-43 .province-color { - border-radius: 2px 2px 100% 2px; -} - -/* C */ -#province-2 .province-color, -#province-8 .province-color, -#province-9 .province-color, -#province-20 .province-color, -#province-21 .province-color, -#province-22 .province-color, -#province-23 .province-color, -#province-44 .province-color, -#province-45 .province-color, -#province-46 .province-color, -#province-47 .province-color, -#province-48 .province-color, -#province-49 .province-color, -#province-50 .province-color, -#province-51 .province-color, -#timer-2 .province-color, -#timer-8 .province-color, -#timer-9 .province-color, -#timer-20 .province-color, -#timer-21 .province-color, -#timer-22 .province-color, -#timer-23 .province-color, -#timer-44 .province-color, -#timer-45 .province-color, -#timer-46 .province-color, -#timer-47 .province-color, -#timer-48 .province-color, -#timer-49 .province-color, -#timer-50 .province-color, -#timer-51 .province-color { - border-radius: 2px 2px 2px 100%; -} - -/* D */ -#province-3 .province-color, -#province-10 .province-color, -#province-11 .province-color, -#province-24 .province-color, -#province-25 .province-color, -#province-26 .province-color, -#province-27 .province-color, -#province-52 .province-color, -#province-53 .province-color, -#province-54 .province-color, -#province-55 .province-color, -#province-56 .province-color, -#province-57 .province-color, -#province-58 .province-color, -#province-59 .province-color, -#timer-3 .province-color, -#timer-10 .province-color, -#timer-11 .province-color, -#timer-24 .province-color, -#timer-25 .province-color, -#timer-26 .province-color, -#timer-27 .province-color, -#timer-52 .province-color, -#timer-53 .province-color, -#timer-54 .province-color, -#timer-55 .province-color, -#timer-56 .province-color, -#timer-57 .province-color, -#timer-58 .province-color, -#timer-59 .province-color { - border-radius: 100% 2px 2px 2px; + border-radius: 2px; + top: 2px; + position: relative; } #LiveGildFightingBody .tabs ul li a span { @@ -415,6 +281,12 @@ vertical-align: middle; } +#LiveGildFightingBody .smaller { + font-size: 8px; + bottom: 2px; + position: relative; +} + #LiveGildFightingBody .gbg-red:before { background-image: url(../../x_img/gbg-red.png); } diff --git a/js/web/guildfights/js/guildfights.js b/js/web/guildfights/js/guildfights.js index 6f6f02ea0..402b89474 100644 --- a/js/web/guildfights/js/guildfights.js +++ b/js/web/guildfights/js/guildfights.js @@ -1263,9 +1263,9 @@ let GuildFights = { }, 1000); nextup.push(`
    `) + nextup.push(``) nextup.push(` `) - nextup.push(battleType) + nextup.push(`${battleType}`) nextup.push(` ${prov[x]['title']} `) nextup.push(`