Skip to content

Commit

Permalink
Fix #532 and #523
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinGuancheDarias committed Feb 15, 2024
1 parent 216ce4c commit ba7c0cb
Show file tree
Hide file tree
Showing 8 changed files with 42 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public UnitRunningMissionDto(Mission mission, List<ObtainedUnit> involvedUnits)
if (involvedUnits != null) {
this.involvedUnits = findDtoService().convertEntireArray(ObtainedUnitDto.class, involvedUnits);
}
invisible = mission.getInvisible();
sourcePlanet = findDtoService().dtoFromEntity(PlanetDto.class, mission.getSourcePlanet());
targetPlanet = findDtoService().dtoFromEntity(PlanetDto.class, mission.getTargetPlanet());
var userEntity = mission.getUser();
Expand Down
4 changes: 3 additions & 1 deletion game-frontend/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
# OWGE changelog
v0.11.5 (latest)
====================
* [class=Developer] __Improvement:__ Migrate to Spring Boot 3.0
* [class=Developer] __Improvement:__ Migrate to Spring Boot 3.2
* __Fix:__ [HAVE_UNIT requirement is removing the unlocked unit when you send all the units that are "required" to some mission, it should unlock it back when units come from that mission #516](https://github.com/KevinGuancheDarias/owge/issues/516) (previous fix not working on deploy missions)
* __Improvememnt:__ [Allow to know that a mission is invisible to the mission sender user #532](https://github.com/KevinGuancheDarias/owge/issues/532)
* __Fix:__ [In Neon the gather reports don't show properly the resources, they have free width and height #523](https://github.com/KevinGuancheDarias/owge/issues/523)

v0.11.4 (2024-02-08 05:39)
==================
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { RunningMission } from './running-mission.type';
*/
export interface UnitRunningMission<U extends User = User> extends RunningMission {
involvedUnits: ObtainedUnit[];
invisible: boolean;
sourcePlanet?: Planet;
targetPlanet?: Planet;
user?: U;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,17 @@
<ng-container *ngFor="let runningUnitMission of runningUnitMissions">
<div #missionRoot class="card owge auto-expand owge-list-running-missions"
*ngIf="runningUnitMission.involvedUnits && runningUnitMission.involvedUnits.length">
<h3 *ngIf="displayUser" class="card-header">{{ 'APP.MISSION_LIST.HEADER_MISSION_TYPE_FROM_USER' |
translate:{missionType: runningUnitMission.type | displayMissionType | async, userName: runningUnitMission.user
| displayUsername} }} </h3>
<h3 *ngIf="!displayUser" class="card-header">{{ runningUnitMission.type | displayMissionType | async }}</h3>
<h3 *ngIf="displayUser" class="card-header">
<owge-widgets-display-image *ngIf="runningUnitMission.invisible || true" [assetsImage]="true" image="invisible.png"
[customClass]="'resourceImage'"></owge-widgets-display-image>
<span>
{{ 'APP.MISSION_LIST.HEADER_MISSION_TYPE_FROM_USER' | translate:{missionType: runningUnitMission.type | displayMissionType | async, userName: runningUnitMission.user| displayUsername} }}
</span>
</h3>
<h3 *ngIf="!displayUser" class="card-header">
<owge-widgets-display-image *ngIf="runningUnitMission.invisible || true" [assetsImage]="true" [customClass]="'resourceImage'" image="invisible.png"></owge-widgets-display-image>
<span>{{ runningUnitMission.type | displayMissionType | async }}</span>
</h3>
<i *ngIf="isCancellable && runningUnitMission.type !== 'RETURN_MISSION'"
(click)="cancelMission(runningUnitMission)" class="fas fa-times"></i>
<span class="display-time">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angu
import { ModalComponent } from '@owge/core';
import { BaseComponent } from '../../base/base.component';
import { UnitService } from '../../service/unit.service';
import { MissionService } from '@owge/universe';
import {MissionService, UnitRunningMission} from '@owge/universe';
import { PlanetPojo } from '../../shared-pojo/planet.pojo';
import { UnitRunningMission } from '../../shared/types/unit-running-mission.type';
import { MissionInformationStore } from '../../store/mission-information.store';

@Component({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
width: 100%;
}
.owge-list-running-missions {
.resourceImage {
position: absolute;
top: -6px;
left: -5px;
}
> h5 {
font-size: 10pt;
}
Expand All @@ -15,6 +20,10 @@
margin-top: -10px;
margin-left: -10px;
margin-right: -10px;
padding-right: 20px;
> span {
padding-left: 28px;
}
}

> div.card-block {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

.owge-list-running-missions
color: silver
margin: 0px 5px
margin: 0 5px
min-width: 155px
&:hover
&::before
Expand All @@ -24,12 +24,20 @@
margin-top: -10px
margin-left: -10px
margin-right: -10px
> span
padding-left: 28px
.resourceImage
width: 32px
height: 32px
position: absolute
top: 0
left: 0
opacity: 0.4

> div.card-block
.btn-move-units
margin-top: 0px
margin-bottom: 0px

margin-top: 0
margin-bottom: 0
> .card-title
text-align: center
margin-top: 11px
Expand Down
5 changes: 4 additions & 1 deletion game-frontend/shared/themes/neon/styles/theme_overrides.sass
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ body.owge-theme-neon
.disabled-for-offline,a.disabled-btn
cursor: not-allowed

.resourceImage
width: 25px
height: 25px
.owge-theme-color
color: $bgColor
.owge-theme-color-alt
Expand Down Expand Up @@ -175,7 +178,7 @@ body.owge-theme-neon
z-index: -1
opacity: 1
filter: grayscale(90%) blur(2px)
img
img:not(.resourceImage)
width: 130px
height: 110px
filter: drop-shadow(2px 0px 4px $neonShadow01)
Expand Down

0 comments on commit ba7c0cb

Please sign in to comment.