1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Multiple fixes (see changelog)

This commit is contained in:
tobspr
2020-06-11 11:51:24 +02:00
parent 1c717b0f37
commit c434f7a59f
10 changed files with 79 additions and 26 deletions

View File

@@ -58,11 +58,20 @@
}
}
&:not(.placementActive) .binding.placementOnly {
&:not(.placementActive) .binding.placementOnly,
&.mapOverviewActive .binding.placementOnly {
display: none;
}
&.placementActive .noPlacementOnly {
&.placementActive:not(.mapOverviewActive) .noPlacementOnly {
display: none;
}
&:not(.mapOverviewActive) .binding.overviewOnly {
display: none;
}
&.mapOverviewActive .noOverviewOnly {
display: none;
}

View File

@@ -74,24 +74,39 @@
&.goal,
&.blueprint {
.amountLabel {
&::after {
content: " ";
position: absolute;
display: inline-block;
@include S(width, 8px);
@include S(height, 8px);
@include S(top, 4px);
@include S(left, -7px);
background: uiResource("icons/current_goal_marker.png") center center / contain no-repeat;
.amountLabel::after {
content: " ";
position: absolute;
display: inline-block;
@include S(width, 8px);
@include S(height, 8px);
@include S(top, 4px);
@include S(left, -7px);
background: center center / contain no-repeat;
}
@include DarkThemeInvert;
&.goal .amountLabel {
&::after {
background-image: uiResource("icons/current_goal_marker.png");
background-size: 90%;
}
@include DarkThemeOverride {
&::after {
background-image: uiResource("icons/current_goal_marker_inverted.png") !important;
}
}
}
&.blueprint .amountLabel::after {
background-image: uiResource("icons/blueprint_marker.png");
background-size: 90%;
&.blueprint .amountLabel {
&::after {
background-image: uiResource("icons/blueprint_marker.png");
background-size: 90%;
}
@include DarkThemeOverride {
&::after {
background-image: uiResource("icons/blueprint_marker_inverted.png") !important;
}
}
}
}
}

View File

@@ -29,7 +29,7 @@
display: flex;
align-items: center;
flex-direction: column;
max-height: 90vh;
max-height: 100vh;
color: #fff;
text-align: center;
@@ -55,7 +55,7 @@
.subTitle {
@include PlainText;
display: inline-block;
@include S(margin, 0px, 0, 20px);
@include S(margin, 5px, 0, 20px);
color: $colorGreenBright;
@include S(border-radius, $globalBorderRadius);

View File

@@ -5,6 +5,10 @@ export const CHANGELOG = [
entries: [
"Support for translations! Interested in helping out? Check out the <a target='_blank' href='https://github.com/tobspr/shapez.io/tree/master/translations'>translation guide</a>!",
"Update stacker artwork to clarify how it works",
"Update keybinding hints on the top left to be more accurate",
"Make it more clear when blueprints are unlocked when trying to use them",
"Fix pinned shape icons not being visible in dark mode",
"Fix being able to select buildings via hotkeys in map overview mode",
"Make shapes unpinnable in the upgrades tab (By hexy)",
],
},

View File

@@ -92,9 +92,9 @@ export const globalConfig = {
// disableZoomLimits: true,
// showChunkBorders: true,
// rewardsInstant: true,
allBuildingsUnlocked: true,
blueprintsNoCost: true,
upgradesNoCost: true,
// allBuildingsUnlocked: true,
// blueprintsNoCost: true,
// upgradesNoCost: true,
// disableUnlockDialog: true,
// disableLogicTicks: true,
// testClipping: true,

View File

@@ -151,6 +151,11 @@ export class HUDBuildingsToolbar extends BaseHUDPart {
return;
}
if (this.root.camera.getIsMapOverlayActive()) {
this.root.soundProxy.playUiError();
return;
}
// Allow clicking an item again to deselect it
for (const buildingId in this.buildingHandles) {
const handle = this.buildingHandles[buildingId];

View File

@@ -2,6 +2,7 @@ import { makeDiv } from "../../../core/utils";
import { T } from "../../../translations";
import { getStringForKeyCode, KEYMAPPINGS } from "../../key_action_mapper";
import { BaseHUDPart } from "../base_hud_part";
import { TrackedState } from "../../../core/tracked_state";
export class HUDKeybindingOverlay extends BaseHUDPart {
initialize() {
@@ -9,6 +10,8 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
this.onSelectedBuildingForPlacementChanged,
this
);
this.trackedMapOverviewActive = new TrackedState(this.applyCssClasses, this);
}
createElements(parent) {
@@ -35,10 +38,16 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
<div class="binding noPlacementOnly">
<div class="binding noPlacementOnly noOverviewOnly">
<code class="keybinding rightMouse"></code>
<label>${T.ingame.keybindingsOverlay.delete}</label>
</div>
<div class="binding noPlacementOnly overviewOnly">
<code class="keybinding rightMouse"></code>
<label>${T.ingame.keybindingsOverlay.createMarker}</label>
</div>
<div class="binding noPlacementOnly">
<code class="keybinding builtinKey">${getKeycode(
@@ -65,12 +74,17 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
<label>${T.ingame.keybindingsOverlay.rotateBuilding}</label>
</div>
` +
(this.root.app.settings.getAllSettings().alwaysMultiplace
? ""
: `
<div class="binding placementOnly">
<code class="keybinding builtinKey shift">${getKeycode(
KEYMAPPINGS.placementModifiers.placeMultiple
)}</code>
<label>${T.ingame.keybindingsOverlay.placeMultiple}</label>
</div>
</div>`) +
`
`
);
}
@@ -79,5 +93,11 @@ export class HUDKeybindingOverlay extends BaseHUDPart {
this.element.classList.toggle("placementActive", !!selectedMetaBuilding);
}
update() {}
applyCssClasses() {
this.element.classList.toggle("mapOverviewActive", this.root.camera.getIsMapOverlayActive());
}
update() {
this.trackedMapOverviewActive.set(this.root.camera.getIsMapOverlayActive());
}
}