mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fixes for the pipette
This commit is contained in:
parent
76b619e4e7
commit
ba52edf7a4
Binary file not shown.
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 17 KiB |
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bbac64f40b2bac1187c87efc97ac718c6e57349d304939c70d99a090e822b6dc
|
||||
size 235135
|
||||
oid sha256:ebde52e75e54d2f4add0cf498c85f059082a0745212a23c4de7328a7d78b00a5
|
||||
size 238170
|
||||
|
@ -60,6 +60,11 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
|
||||
* Starts the pipette function
|
||||
*/
|
||||
startPipette() {
|
||||
// Disable in overview
|
||||
if (this.root.camera.getIsMapOverlayActive()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const mousePosition = this.root.app.mousePosition;
|
||||
if (!mousePosition) {
|
||||
// Not on screen
|
||||
@ -69,7 +74,9 @@ export class HUDBlueprintPlacer extends BaseHUDPart {
|
||||
const worldPos = this.root.camera.screenToWorld(mousePosition);
|
||||
const tile = worldPos.toTileSpace();
|
||||
const contents = this.root.map.getTileContent(tile);
|
||||
if (contents) {
|
||||
|
||||
// Make sure we selected something, and also make sure it's not a special entity
|
||||
if (contents && !contents.components.Unremovable) {
|
||||
const blueprint = PipetteBlueprint.fromEntity(contents);
|
||||
|
||||
// Notice: Order here matters, since pipetteExecuted clears the blueprint
|
||||
|
Loading…
Reference in New Issue
Block a user