Skip to content

Commit

Permalink
Fix unit queue increase amount javascript for ships on resources page
Browse files Browse the repository at this point in the history
  • Loading branch information
lanedirt committed Nov 22, 2024
1 parent 17fda90 commit 46717d5
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 28 deletions.
7 changes: 5 additions & 2 deletions resources/views/ingame/ajax/object.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@
</ul>

<div class="costs">

<p>@lang('Required to improve to level') {!! $next_level !!}:</p>
@if ($object_type === \OGame\GameObjects\Models\Enums\GameObjectType::Ship)
<p>@lang('Costs per piece'):</p>
@else
<p>@lang('Required to improve to level') {!! $next_level !!}:</p>
@endif

<ul class="ipiHintable" data-ipi-hint="">
@if (!empty($price->metal->get()))
Expand Down
12 changes: 8 additions & 4 deletions resources/views/ingame/resources/index.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</div>
<div id="technologies">
<h3>
Resource buildings
@lang('Resource buildings')
</h3>
<ul id="producers" class="icons">
@php /** @var OGame\ViewModels\BuildingViewModel $building */ @endphp
Expand Down Expand Up @@ -71,9 +71,13 @@ class="upgrade tooltip hideOthers js_hideTipOnMobile"
<div class="cooldownBackground"></div>
<time-counter><time class="countdown buildingCountdown" 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>
<span class="bonus"></span>
@if ($building->object->type === \OGame\GameObjects\Models\Enums\GameObjectType::Ship)
<span class="amount" data-value="{{ $building->current_level }}" data-bonus="0">
@else
<span class="level" data-value="{{ $building->current_level }}" data-bonus="0">
@endif
<span class="stockAmount">{{ $building->current_level }}</span>
<span class="bonus"></span>
</span>
</span></li>
@endforeach
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
<tbody>
<tr>
<td colspan="2" class="idle">
<a class="tooltip js_hideTipOnMobile " title="@lang('At the moment there are no ships or defense built on this planet. Click here to get to the shipyard.')" href="#ingame&amp;component=shipyard">
<a class="tooltip js_hideTipOnMobile " title="@lang('At the moment there are no ships or defense built on this planet. Click here to get to the shipyard.')" href="{{ route('shipyard.index') }}">
@lang('No ships/defense in construction.')
<br>
@lang('(To shipyard)')
Expand Down
40 changes: 19 additions & 21 deletions resources/views/ingame/shipyard/unit-item.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,23 @@
@else
data-status="on"
title="{{ $building->object->title }}"
@endif
@endif
>

<span class="icon sprite @if ($building->object->type == \OGame\GameObjects\Models\Enums\GameObjectType::Defense)
sprite_medium medium
@else
sprite_small small
@endif{{ $building->object->class_name }}">
@if ($building->currently_building)
<span class="targetamount" data-value="54" 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>
@endif
<span class="amount"
data-value="{{ $building->amount }}"
data-bonus="0">
<span class="stockAmount">{{ $building->amount }}</span>
<span class="bonus"></span>
</span>
</span>
<span class="icon sprite @if ($building->object->type == \OGame\GameObjects\Models\Enums\GameObjectType::Defense)
sprite_medium medium
@else
sprite_small small
@endif{{ $building->object->class_name }}">
@if ($building->currently_building)
<span class="targetamount" data-value="54" 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>
@endif
<span class="amount" data-value="{{ $building->amount }}" data-bonus="0">
<span class="stockAmount">{{ $building->amount }}</span>
<span class="bonus"></span>
</span>
</span>
</li>

0 comments on commit 46717d5

Please sign in to comment.