diff --git a/res/ui/icons/unpin_shape.png b/res/ui/icons/unpin_shape.png new file mode 100644 index 00000000..b1918778 Binary files /dev/null and b/res/ui/icons/unpin_shape.png differ diff --git a/shapez.code-workspace b/shapez.code-workspace index e8e7e5b3..8cd13e00 100644 --- a/shapez.code-workspace +++ b/shapez.code-workspace @@ -15,6 +15,11 @@ "vetur.format.defaultFormatter.ts": "vscode-typescript", "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, - "files.trimTrailingWhitespace": true + "files.trimTrailingWhitespace": true, + "workbench.colorCustomizations": { + "activityBar.background": "#163328", + "titleBar.activeBackground": "#1F4738", + "titleBar.activeForeground": "#F7FBFA" + } } } \ No newline at end of file diff --git a/src/css/ingame_hud/pinned_shapes.scss b/src/css/ingame_hud/pinned_shapes.scss index 6f44522b..c9a39536 100644 --- a/src/css/ingame_hud/pinned_shapes.scss +++ b/src/css/ingame_hud/pinned_shapes.scss @@ -103,7 +103,7 @@ & { /* @load-async */ - background: uiResource("icons/pin.png") center center / 95% no-repeat; + background: uiResource("icons/unpin_shape.png") center center / 80% no-repeat; } } diff --git a/src/js/changelog.js b/src/js/changelog.js index 0354ec27..c7b142ba 100644 --- a/src/js/changelog.js +++ b/src/js/changelog.js @@ -6,7 +6,10 @@ export const CHANGELOG = [ "Added the ability to edit constant signals by left clicking them", "You can now add markers in the wire layer (partially by daanbreur)", "Allow to cycle backwards in the toolbar with SHIFT + Tab (idea by emeraldblock)", + "Allow to cycle variants backwards with SHIFT + T", "Upgrade numbers now use roman numerals until tier 50 (by LeopoldTal)", + "Add button to unpin shapes from the left side (by artemisSystem)", + "Updated translations (Thanks to all contributors!)", ], }, { diff --git a/src/js/game/hud/parts/building_placer_logic.js b/src/js/game/hud/parts/building_placer_logic.js index 4f3a0570..9007511b 100644 --- a/src/js/game/hud/parts/building_placer_logic.js +++ b/src/js/game/hud/parts/building_placer_logic.js @@ -14,6 +14,7 @@ import { MetaMinerBuilding, enumMinerVariants } from "../../buildings/miner"; import { enumHubGoalRewards } from "../../tutorial_goals"; import { getBuildingDataFromCode, getCodeFromBuildingData } from "../../building_codes"; import { MetaHubBuilding } from "../../buildings/hub"; +import { safeModulo } from "../../../core/utils"; /** * Contains all logic for the building placer - this doesn't include the rendering @@ -467,7 +468,12 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart { index = 0; console.warn("Invalid variant selected:", this.currentVariant.get()); } - const newIndex = (index + 1) % availableVariants.length; + const direction = this.root.keyMapper.getBinding(KEYMAPPINGS.placement.rotateInverseModifier) + .pressed + ? -1 + : 1; + + const newIndex = safeModulo(index + direction, availableVariants.length); const newVariant = availableVariants[newIndex]; this.setVariant(newVariant); }