mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Allow to cycle variants backwards with SHIFT + T, other fixes and misc stuff
This commit is contained in:
parent
503e643fd4
commit
3ada0d5774
BIN
res/ui/icons/unpin_shape.png
Normal file
BIN
res/ui/icons/unpin_shape.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 731 B |
@ -15,6 +15,11 @@
|
|||||||
"vetur.format.defaultFormatter.ts": "vscode-typescript",
|
"vetur.format.defaultFormatter.ts": "vscode-typescript",
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"files.trimTrailingWhitespace": true
|
"files.trimTrailingWhitespace": true,
|
||||||
|
"workbench.colorCustomizations": {
|
||||||
|
"activityBar.background": "#163328",
|
||||||
|
"titleBar.activeBackground": "#1F4738",
|
||||||
|
"titleBar.activeForeground": "#F7FBFA"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -103,7 +103,7 @@
|
|||||||
|
|
||||||
& {
|
& {
|
||||||
/* @load-async */
|
/* @load-async */
|
||||||
background: uiResource("icons/pin.png") center center / 95% no-repeat;
|
background: uiResource("icons/unpin_shape.png") center center / 80% no-repeat;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,10 @@ export const CHANGELOG = [
|
|||||||
"Added the ability to edit constant signals by left clicking them",
|
"Added the ability to edit constant signals by left clicking them",
|
||||||
"You can now add markers in the wire layer (partially by daanbreur)",
|
"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 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)",
|
"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!)",
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -14,6 +14,7 @@ import { MetaMinerBuilding, enumMinerVariants } from "../../buildings/miner";
|
|||||||
import { enumHubGoalRewards } from "../../tutorial_goals";
|
import { enumHubGoalRewards } from "../../tutorial_goals";
|
||||||
import { getBuildingDataFromCode, getCodeFromBuildingData } from "../../building_codes";
|
import { getBuildingDataFromCode, getCodeFromBuildingData } from "../../building_codes";
|
||||||
import { MetaHubBuilding } from "../../buildings/hub";
|
import { MetaHubBuilding } from "../../buildings/hub";
|
||||||
|
import { safeModulo } from "../../../core/utils";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains all logic for the building placer - this doesn't include the rendering
|
* Contains all logic for the building placer - this doesn't include the rendering
|
||||||
@ -467,7 +468,12 @@ export class HUDBuildingPlacerLogic extends BaseHUDPart {
|
|||||||
index = 0;
|
index = 0;
|
||||||
console.warn("Invalid variant selected:", this.currentVariant.get());
|
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];
|
const newVariant = availableVariants[newIndex];
|
||||||
this.setVariant(newVariant);
|
this.setVariant(newVariant);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user