Skip to content

Commit

Permalink
Merge pull request #502 from lanedirt/499-bug-when-shipyard-queue-is-…
Browse files Browse the repository at this point in the history
…not-empty-the-building-queue-duration-is-overwritten

Fix countdown time collision bug when more than one build queue is shown
  • Loading branch information
lanedirt authored Dec 17, 2024
2 parents 9bc0299 + 73a3a23 commit 1c52c1e
Show file tree
Hide file tree
Showing 12 changed files with 11 additions and 26 deletions.
6 changes: 0 additions & 6 deletions public/css/ingame.css
Original file line number Diff line number Diff line change
Expand Up @@ -1910,12 +1910,6 @@ button.ui-button::-moz-focus-inner {
content: "";
}

.technology[data-status="active"] .icon::after {
top: auto;
bottom: 0;
background: rgba(0, 0, 0, .75);
}

.technology[data-status="disabled"] .icon::after {
background: repeating-linear-gradient(-45deg, rgba(255, 150, 0, .33), rgba(255, 150, 0, .33) 2px, transparent 3px, transparent 7px);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"/css/ingame.css": "/css/ingame.css?id=e7ef1b854da89d884b1472c61761ade4",
"/css/ingame.css": "/css/ingame.css?id=1ca088b7e1f8cf2b7d7213b8b07f12a0",
"/css/outgame.css": "/css/outgame.css?id=0edfd34484fc3ec74eca0604a470461f",
"/js/ingame.js": "/js/ingame.js?id=f7ca8c70d70904454426ad83cb49783f",
"/js/ingame.min.js": "/js/ingame.min.js?id=f7ca8c70d70904454426ad83cb49783f",
Expand Down
6 changes: 0 additions & 6 deletions resources/css/ingame/990d5d349ed6e981658ff4e2e3444c.css
Original file line number Diff line number Diff line change
Expand Up @@ -34277,12 +34277,6 @@ a#message_alert_box_default,
content: "";
}

.technology[data-status="active"] .icon::after {
top: auto;
bottom: 0;
background: rgba(0, 0, 0, .75);
}

.technology[data-status="disabled"] .icon::after {
background: repeating-linear-gradient(-45deg, rgba(255, 150, 0, .33), rgba(255, 150, 0, .33) 2px, transparent 3px, transparent 7px);
}
Expand Down
6 changes: 0 additions & 6 deletions resources/css/ingame/modules/fleets.css
Original file line number Diff line number Diff line change
Expand Up @@ -356,12 +356,6 @@
content: "";
}

.technology[data-status="active"] .icon::after {
top: auto;
bottom: 0;
background: rgba(0, 0, 0, .75);
}

.technology[data-status="disabled"] .icon::after {
background: repeating-linear-gradient(-45deg, rgba(255, 150, 0, .33), rgba(255, 150, 0, .33) 2px, transparent 3px, transparent 7px);
}
Expand Down
1 change: 1 addition & 0 deletions resources/views/ingame/facilities/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class="upgrade tooltip hideOthers js_hideTipOnMobile"
</button>
@endif
@if ($building->currently_building)
<span class="targetlevel" data-value="{{ $building->current_level + 1 }}" data-bonus="0">{{ $building->current_level + 1 }}</span>
<div class="cooldownBackground"></div>
<time-counter><time class="countdown buildingCountdown" id="countdownbuildingDetails" data-segments="2">...</time></time-counter>
@endif
Expand Down
3 changes: 2 additions & 1 deletion resources/views/ingame/research/research-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@
-25% ⌛
</span>-->
@if ($building->currently_building)
<span class="targetlevel" data-value="{{ $building->current_level + 1 }}" data-bonus="0">{{ $building->current_level + 1 }}</span>
<div class="cooldownBackground"></div>
<time-counter><time class="countdown buildingCountdown" id="countdownbuildingDetails" data-segments="2">...</time></time-counter>
<time-counter><time class="countdown researchCountdown" id="countdownbuildingDetails" data-segments="2">...</time></time-counter>
@endif
<span class="level" data-value="{{ $building->current_level }}" data-bonus="0">
<span class="stockAmount">{{ $building->current_level }}</span>
Expand Down
1 change: 1 addition & 0 deletions resources/views/ingame/resources/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class="upgrade tooltip hideOthers js_hideTipOnMobile"
</button>
@endif
@if ($building->currently_building)
<span class="targetlevel" data-value="{{ $building->current_level + 1 }}" data-bonus="0">{{ $building->current_level + 1 }}</span>
<div class="cooldownBackground"></div>
<time-counter><time class="countdown buildingCountdown" id="countdownbuildingDetails" data-segments="2">...</time></time-counter>
@endif
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</tr>
<tr class="data">
<td class="desc timer">
<time class="countdown buildingCountdown" data-segments="2">{{ \OGame\Facades\AppUtil::formatTimeDuration($build_active->time_countdown) }}</time>
<time class="countdown researchCountdown" data-segments="2">{{ \OGame\Facades\AppUtil::formatTimeDuration($build_active->time_countdown) }}</time>
</td>
</tr>
<tr class="data">
Expand All @@ -78,7 +78,7 @@
var pricebuilding = 750;
var referrerPage = $.deparam.querystring().page;
new CountdownTimer('buildingCountdown', {{ $build_active->time_countdown }},'{{ url()->current() }}',null,true,3)
new CountdownTimer('researchCountdown', {{ $build_active->time_countdown }},'{{ url()->current() }}',null,true,3)
function cancelbuilding(id, listId, question) {
errorBoxDecision('Caution', "" + question + "", 'yes', 'No', function() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</tr>
<tr class="data">
<td class="desc timer">
<time class="countdown buildingCountdown"
<time class="countdown unitCountdown"
data-segments="2">{{ \OGame\Facades\AppUtil::formatTimeDuration($build_queue_countdown) }}</time>
</td>
</tr>
Expand Down Expand Up @@ -60,7 +60,7 @@
var questionbuilding = 'Do\u0020you\u0020want\u0020to\u0020reduce\u0020the\u0020construction\u0020time\u0020of\u0020the\u0020current\u0020construction\u0020project\u0020by\u002050\u0025\u0020of\u0020the\u0020total\u0020construction\u0020time\u0020\u00287m\u002010s\u0029\u0020for\u0020\u003Cspan\u0020style\u003D\u0022font\u002Dweight\u003A\u0020bold\u003B\u0022\u003E750\u0020Dark\u0020Matter\u003C\/span\u003E\u003F';
var pricebuilding = 750;
var referrerPage = $.deparam.querystring().page;
new CountdownTimer('buildingCountdown', {{ $build_active->time_countdown }}, '{{ url()->current() }}', null, true, 3)
new CountdownTimer('unitCountdown', {{ $build_active->time_countdown }}, '{{ url()->current() }}', null, true, 3)
new CountdownTimerUnit('shipyardCountdownUnit', {{ $build_active->time_countdown_object_next }}, {{ $build_active->object_amount_remaining }}, {{ $build_active->object->id }}, {{ $build_active->time_countdown_per_object }}, false, 3)
</script>
@else
Expand Down
4 changes: 2 additions & 2 deletions resources/views/ingame/shipyard/unit-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
sprite_small small
@endif{{ $building->object->class_name }}">
@if ($building->currently_building)
<span class="targetamount" data-value="54" data-bonus="0">
<span class="targetamount" data-value="{{ $building->amount + $building->currently_building_amount }}" data-bonus="0">
{{ $building->amount + $building->currently_building_amount }}
</span>
<div class="cooldownBackground"></div>
<time-counter><time class="countdown buildingCountdown" id="countdownbuildingDetails" data-segments="2">...</time></time-counter>
<time-counter><time class="countdown unitCountdown" id="countdownbuildingDetails" data-segments="2">...</time></time-counter>
@endif
<span class="amount" data-value="{{ $building->amount }}" data-bonus="0">
<span class="stockAmount">{{ $building->amount }}</span>
Expand Down

0 comments on commit 1c52c1e

Please sign in to comment.