Add tutorial images for all building variants
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 21 KiB |
BIN
res/ui/building_tutorials/cutter-quad.png
Normal file
After Width: | Height: | Size: 37 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 46 KiB |
BIN
res/ui/building_tutorials/miner-chainable.png
Normal file
After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 43 KiB |
BIN
res/ui/building_tutorials/painter-double.png
Normal file
After Width: | Height: | Size: 53 KiB |
BIN
res/ui/building_tutorials/painter-quad.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
res/ui/building_tutorials/rotater-ccw.png
Normal file
After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 35 KiB |
BIN
res/ui/building_tutorials/splitter-compact-inverse.png
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
res/ui/building_tutorials/splitter-compact.png
Normal file
After Width: | Height: | Size: 57 KiB |
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 51 KiB |
BIN
res/ui/building_tutorials/trash-storage.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
res/ui/building_tutorials/underground_belt-tier2.png
Normal file
After Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 36 KiB |
@ -1,14 +1,20 @@
|
|||||||
$buildings: belt, cutter, miner, mixer, painter, rotater, splitter, stacker, trash, underground_belt;
|
$buildings: belt, cutter, miner, mixer, painter, rotater, splitter, stacker, trash, underground_belt;
|
||||||
|
|
||||||
@each $building in $buildings {
|
@each $building in $buildings {
|
||||||
[data-icon="building_tutorials/#{$building}.png"] {
|
|
||||||
background-image: uiResource("res/ui/building_tutorials/#{$building}.png") !important;
|
|
||||||
}
|
|
||||||
[data-icon="building_icons/#{$building}.png"] {
|
[data-icon="building_icons/#{$building}.png"] {
|
||||||
background-image: uiResource("res/ui/building_icons/#{$building}.png") !important;
|
background-image: uiResource("res/ui/building_icons/#{$building}.png") !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$buildingsAndVariants: belt, splitter, splitter-compact, splitter-compact-inverse, underground_belt,
|
||||||
|
underground_belt-tier2, miner, miner-chainable, cutter, cutter-quad, rotater, rotater-ccw, stacker, mixer,
|
||||||
|
painter, painter-double, painter-quad, trash, trash-storage;
|
||||||
|
@each $building in $buildingsAndVariants {
|
||||||
|
[data-icon="building_tutorials/#{$building}.png"] {
|
||||||
|
background-image: uiResource("res/ui/building_tutorials/#{$building}.png") !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$icons: notification_saved, notification_success, notification_upgrade;
|
$icons: notification_saved, notification_success, notification_upgrade;
|
||||||
@each $icon in $icons {
|
@each $icon in $icons {
|
||||||
[data-icon="icons/#{$icon}.png"] {
|
[data-icon="icons/#{$icon}.png"] {
|
||||||
|
@ -79,16 +79,18 @@
|
|||||||
|
|
||||||
#ingame_HUD_PlacerVariants {
|
#ingame_HUD_PlacerVariants {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@include S(left, 10px);
|
@include S(right, 10px);
|
||||||
@include S(bottom, 80px);
|
@include S(top, 200px);
|
||||||
display: grid;
|
display: flex;
|
||||||
grid-auto-flow: row;
|
|
||||||
justify-items: start;
|
|
||||||
@include S(grid-gap, 5px);
|
@include S(grid-gap, 5px);
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
|
||||||
.explanation {
|
.explanation {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
|
grid-row: 1 / 2;
|
||||||
@include SuperSmallText;
|
@include SuperSmallText;
|
||||||
|
text-align: right;
|
||||||
.keybinding {
|
.keybinding {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
@ -98,13 +100,19 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.variants {
|
||||||
|
display: grid;
|
||||||
|
@include S(grid-gap, 5px);
|
||||||
|
|
||||||
.variant {
|
.variant {
|
||||||
|
grid-row: 2 / 3;
|
||||||
@include S(border-radius, $globalBorderRadius);
|
@include S(border-radius, $globalBorderRadius);
|
||||||
background: rgba(0, 10, 20, 0.1);
|
background: rgba(0, 10, 20, 0.2);
|
||||||
display: flex;
|
display: inline-flex;
|
||||||
|
vertical-align: top;
|
||||||
position: relative;
|
position: relative;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
@include S(padding, 5px);
|
@include S(padding, 3px);
|
||||||
@include S(grid-gap, 10px);
|
@include S(grid-gap, 10px);
|
||||||
|
|
||||||
&.active {
|
&.active {
|
||||||
@ -124,18 +132,18 @@
|
|||||||
&[data-tile-w="2"] {
|
&[data-tile-w="2"] {
|
||||||
@include S(width, 2 * $iconSize);
|
@include S(width, 2 * $iconSize);
|
||||||
}
|
}
|
||||||
&[data-tile-w="3"] {
|
|
||||||
@include S(width, 3 * $iconSize);
|
|
||||||
}
|
|
||||||
&[data-tile-w="4"] {
|
|
||||||
@include S(width, 4 * $iconSize);
|
|
||||||
}
|
|
||||||
&[data-tile-h="2"] {
|
&[data-tile-h="2"] {
|
||||||
@include S(height, 2 * $iconSize);
|
@include S(height, 2 * $iconSize);
|
||||||
}
|
}
|
||||||
&[data-tile-h="3"] {
|
&[data-tile-h="3"] {
|
||||||
@include S(height, 3 * $iconSize);
|
@include S(height, 3 * $iconSize);
|
||||||
}
|
}
|
||||||
|
&[data-tile-w="3"] {
|
||||||
|
@include S(width, 3 * $iconSize);
|
||||||
|
}
|
||||||
|
&[data-tile-w="4"] {
|
||||||
|
@include S(width, 4 * $iconSize);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.label {
|
.label {
|
||||||
@ -148,3 +156,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
@ -57,8 +57,8 @@ export const globalConfig = {
|
|||||||
rotater: 1 / 1,
|
rotater: 1 / 1,
|
||||||
rotaterCCW: 1 / 1,
|
rotaterCCW: 1 / 1,
|
||||||
painter: 1 / 6,
|
painter: 1 / 6,
|
||||||
painterDouble: 1 / 7,
|
painterDouble: 1 / 8,
|
||||||
painterQuad: 1 / 7,
|
painterQuad: 1 / 8,
|
||||||
mixer: 1 / 5,
|
mixer: 1 / 5,
|
||||||
stacker: 1 / 6,
|
stacker: 1 / 6,
|
||||||
},
|
},
|
||||||
@ -83,7 +83,7 @@ export const globalConfig = {
|
|||||||
|
|
||||||
debug: {
|
debug: {
|
||||||
/* dev:start */
|
/* dev:start */
|
||||||
// fastGameEnter: true,
|
fastGameEnter: true,
|
||||||
noArtificialDelays: true,
|
noArtificialDelays: true,
|
||||||
// disableSavegameWrite: true,
|
// disableSavegameWrite: true,
|
||||||
// showEntityBounds: true,
|
// showEntityBounds: true,
|
||||||
@ -93,8 +93,8 @@ export const globalConfig = {
|
|||||||
// disableZoomLimits: true,
|
// disableZoomLimits: true,
|
||||||
// showChunkBorders: true,
|
// showChunkBorders: true,
|
||||||
// rewardsInstant: true,
|
// rewardsInstant: true,
|
||||||
// allBuildingsUnlocked: true,
|
allBuildingsUnlocked: true,
|
||||||
// upgradesNoCost: true,
|
upgradesNoCost: true,
|
||||||
// disableUnlockDialog: true,
|
// disableUnlockDialog: true,
|
||||||
// disableLogicTicks: true,
|
// disableLogicTicks: true,
|
||||||
// testClipping: true,
|
// testClipping: true,
|
||||||
|
@ -99,6 +99,13 @@ export class Camera extends BasicSerializableObject {
|
|||||||
this.internalInitEvents();
|
this.internalInitEvents();
|
||||||
this.clampZoomLevel();
|
this.clampZoomLevel();
|
||||||
this.bindKeys();
|
this.bindKeys();
|
||||||
|
if (G_IS_DEV) {
|
||||||
|
window.addEventListener("keydown", ev => {
|
||||||
|
if (ev.key === "l") {
|
||||||
|
this.zoomLevel = 3;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Serialization
|
// Serialization
|
||||||
|
@ -258,11 +258,6 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
metaBuilding.updateVariants(this.fakeEntity, 0, this.currentVariant.get());
|
metaBuilding.updateVariants(this.fakeEntity, 0, this.currentVariant.get());
|
||||||
|
|
||||||
this.buildingInfoElements.tutorialImage.setAttribute(
|
|
||||||
"data-icon",
|
|
||||||
"building_tutorials/" + metaBuilding.getId() + ".png"
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
this.fakeEntity = null;
|
this.fakeEntity = null;
|
||||||
}
|
}
|
||||||
@ -281,8 +276,10 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.buildingInfoElements.label.innerHTML = T.buildings[metaBuilding.id].name;
|
const variant = this.currentVariant.get();
|
||||||
this.buildingInfoElements.descText.innerHTML = T.buildings[metaBuilding.id].description;
|
|
||||||
|
this.buildingInfoElements.label.innerHTML = T.buildings[metaBuilding.id][variant].name;
|
||||||
|
this.buildingInfoElements.descText.innerHTML = T.buildings[metaBuilding.id][variant].description;
|
||||||
|
|
||||||
const binding = this.root.keyMapper.getBinding(KEYMAPPINGS.buildings[metaBuilding.getId()]);
|
const binding = this.root.keyMapper.getBinding(KEYMAPPINGS.buildings[metaBuilding.getId()]);
|
||||||
this.buildingInfoElements.hotkey.innerHTML = T.ingame.buildingPlacement.hotkeyLabel.replace(
|
this.buildingInfoElements.hotkey.innerHTML = T.ingame.buildingPlacement.hotkeyLabel.replace(
|
||||||
@ -290,6 +287,14 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
"<code class='keybinding'>" + binding.getKeyCodeString() + "</code>"
|
"<code class='keybinding'>" + binding.getKeyCodeString() + "</code>"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
this.buildingInfoElements.tutorialImage.setAttribute(
|
||||||
|
"data-icon",
|
||||||
|
"building_tutorials/" +
|
||||||
|
metaBuilding.getId() +
|
||||||
|
(variant === defaultBuildingVariant ? "" : "-" + variant) +
|
||||||
|
".png"
|
||||||
|
);
|
||||||
|
|
||||||
removeAllChildren(this.buildingInfoElements.additionalInfo);
|
removeAllChildren(this.buildingInfoElements.additionalInfo);
|
||||||
const additionalInfo = metaBuilding.getAdditionalStatistics(this.root, this.currentVariant.get());
|
const additionalInfo = metaBuilding.getAdditionalStatistics(this.root, this.currentVariant.get());
|
||||||
for (let i = 0; i < additionalInfo.length; ++i) {
|
for (let i = 0; i < additionalInfo.length; ++i) {
|
||||||
@ -332,10 +337,12 @@ export class HUDBuildingPlacer extends BaseHUDPart {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const container = makeDiv(this.variantsElement, null, ["variants"]);
|
||||||
|
|
||||||
for (let i = 0; i < availableVariants.length; ++i) {
|
for (let i = 0; i < availableVariants.length; ++i) {
|
||||||
const variant = availableVariants[i];
|
const variant = availableVariants[i];
|
||||||
|
|
||||||
const element = makeDiv(this.variantsElement, null, ["variant"]);
|
const element = makeDiv(container, null, ["variant"]);
|
||||||
element.classList.toggle("active", variant === this.currentVariant.get());
|
element.classList.toggle("active", variant === this.currentVariant.get());
|
||||||
makeDiv(element, null, ["label"], variant);
|
makeDiv(element, null, ["label"], variant);
|
||||||
|
|
||||||
|
@ -253,45 +253,87 @@ shopUpgrades:
|
|||||||
# Buildings and their name / description
|
# Buildings and their name / description
|
||||||
buildings:
|
buildings:
|
||||||
belt:
|
belt:
|
||||||
|
default:
|
||||||
name: &belt Conveyor Belt
|
name: &belt Conveyor Belt
|
||||||
description: Transports items, hold and drag to place multiple.
|
description: Transports items, hold and drag to place multiple.
|
||||||
|
|
||||||
miner: # Internal name for the Extractor
|
miner: # Internal name for the Extractor
|
||||||
|
default:
|
||||||
name: &miner Extractor
|
name: &miner Extractor
|
||||||
description: Place over a shape or color to extract it.
|
description: Place over a shape or color to extract it.
|
||||||
|
|
||||||
|
chainable:
|
||||||
|
name: Extractor (Chain)
|
||||||
|
description: Place over a shape or color to extract it. Can be chained.
|
||||||
|
|
||||||
underground_belt: # Internal name for the Tunnel
|
underground_belt: # Internal name for the Tunnel
|
||||||
|
default:
|
||||||
name: &underground_belt Tunnel
|
name: &underground_belt Tunnel
|
||||||
description: Allows to tunnel resources under buildings and belts.
|
description: Allows to tunnel resources under buildings and belts.
|
||||||
|
|
||||||
|
tier2:
|
||||||
|
name: Tunnel Tier II
|
||||||
|
description: Allows to tunnel resources under buildings and belts.
|
||||||
|
|
||||||
splitter: # Internal name for the Balancer
|
splitter: # Internal name for the Balancer
|
||||||
|
default:
|
||||||
name: &splitter Balancer
|
name: &splitter Balancer
|
||||||
description: Multifunctional - Evenly distributes all inputs onto all outputs.
|
description: Multifunctional - Evenly distributes all inputs onto all outputs.
|
||||||
|
|
||||||
|
compact:
|
||||||
|
name: Merger (compact)
|
||||||
|
description: Merges two conveyor belts into one.
|
||||||
|
|
||||||
|
compact-inverse:
|
||||||
|
name: Merger (compact)
|
||||||
|
description: Merges two conveyor belts into one.
|
||||||
|
|
||||||
cutter:
|
cutter:
|
||||||
|
default:
|
||||||
name: &cutter Cutter
|
name: &cutter Cutter
|
||||||
description: Cuts shapes from top to bottom and outputs both halfs. <strong>If you use only one part, be sure to destroy the other part or it will stall!</strong>
|
description: Cuts shapes from top to bottom and outputs both halfs. <strong>If you use only one part, be sure to destroy the other part or it will stall!</strong>
|
||||||
|
quad:
|
||||||
|
name: Cutter (Quad)
|
||||||
|
description: Cuts shapes into four parts. <strong>If you use only one part, be sure to destroy the other part or it will stall!</strong>
|
||||||
|
|
||||||
rotater:
|
rotater:
|
||||||
|
default:
|
||||||
name: &rotater Rotate
|
name: &rotater Rotate
|
||||||
description: Rotates shapes clockwise by 90 degrees.
|
description: Rotates shapes clockwise by 90 degrees.
|
||||||
|
ccw:
|
||||||
|
name: Rotate (CCW)
|
||||||
|
description: Rotates shapes counter clockwise by 90 degrees.
|
||||||
|
|
||||||
stacker: # Internal name for the Combiner
|
stacker:
|
||||||
|
default:
|
||||||
name: &stacker Stacker
|
name: &stacker Stacker
|
||||||
description: Stacks both items. If they can not be merged, the right item is placed above the left item.
|
description: Stacks both items. If they can not be merged, the right item is placed above the left item.
|
||||||
|
|
||||||
mixer:
|
mixer:
|
||||||
|
default:
|
||||||
name: &mixer Color Mixer
|
name: &mixer Color Mixer
|
||||||
description: Mixes two colors using additive blending.
|
description: Mixes two colors using additive blending.
|
||||||
|
|
||||||
painter:
|
painter:
|
||||||
|
default:
|
||||||
name: &painter Painter
|
name: &painter Painter
|
||||||
description: Colors the whole shape on the left input with the color from the right input.
|
description: Colors the whole shape on the left input with the color from the right input.
|
||||||
|
double:
|
||||||
|
name: Painter (Double)
|
||||||
|
description: Colors the both shapes on the left input with the color from the right input.
|
||||||
|
quad:
|
||||||
|
name: Painter (Quad)
|
||||||
|
description: Allows to color each quadrant of the shape with a different color.
|
||||||
|
|
||||||
trash: # Internal name for the destroyer
|
trash:
|
||||||
|
default:
|
||||||
name: &trash Trash
|
name: &trash Trash
|
||||||
description: Accepts inputs from all sides and destroys them. Forever.
|
description: Accepts inputs from all sides and destroys them. Forever.
|
||||||
|
|
||||||
|
storage:
|
||||||
|
name: Storage
|
||||||
|
description: Stores excess items, up to a given capacity. Can be used as an overflow gate.
|
||||||
|
|
||||||
storyRewards:
|
storyRewards:
|
||||||
# Those are the rewards gained from completing the store
|
# Those are the rewards gained from completing the store
|
||||||
reward_cutter_and_trash: Cutting Shapes
|
reward_cutter_and_trash: Cutting Shapes
|
||||||
|