User prompt
also hide the cancelAction after the building was properly placed
User prompt
hide the CancelActionButton after it was pressed
User prompt
in CancelActionButton 'down', if PLACING_BUILDINGS restaure to NAVIGATING;
User prompt
Fix Bug: 'TypeError: Cannot read properties of null (reading 'asset')' in or related to this line: 'currentBuildingForPlacement.asset.tint = isValidPlacement ? 0xFFFFFF : 0xFF0000;' Line Number: 607
User prompt
Fix Bug: 'TypeError: Cannot read properties of null (reading 'cellW')' in or related to this line: 'for (var w = 0; w < newBuilding.cellW; w++) {' Line Number: 395
User prompt
Fix Bug: 'TypeError: Cannot read properties of null (reading 'cellW')' in or related to this line: 'return {' Line Number: 715
User prompt
if the CancelAction button is pressed before the new building is placed, then the building is cancelled, spice is refunded currentBuildingForPlacement is set to null
Code edit (1 edits merged)
Please save this source code
User prompt
Add a label 'Cancel' in the CancelActionButton class
Code edit (1 edits merged)
Please save this source code
User prompt
show the CancelActionButton in the board when the building of a new building starts
User prompt
add a new class and asset for a cancelAction button on the board
Code edit (5 edits merged)
Please save this source code
User prompt
in enqueueBuildable pass the BuildableItemIcon instead of just the type
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: Cannot read properties of undefined (reading 'name')' in or related to this line: 'console.log("Count energy of " + buildingInfo.name);' Line Number: 321
Code edit (1 edits merged)
Please save this source code
Code edit (2 edits merged)
Please save this source code
User prompt
Fix Bug: 'Timeout.tick error: x is not defined' in or related to this line: 'self.x = x - centerDeltaX + elementDeltaX;' Line Number: 217
Code edit (6 edits merged)
Please save this source code
User prompt
Fix Bug: 'ReferenceError: x is not defined' in or related to this line: 'var cX = (Math.floor(x / 100) + centerDeltaX + building.cellW / 2 + Math.floor(building.cellW / 2) - 5) * 100;' Line Number: 688
Code edit (9 edits merged)
Please save this source code
User prompt
update the loop game.children.forEach(function (child) { if (child instanceof BuildableItemIcon) { console.log('removing...', child.type); child.destroy(); } }); by using an other array for iteration
Code edit (1 edits merged)
Please save this source code
Code edit (1 edits merged)
Please save this source code
===================================================================
--- original.js
+++ change.js
@@ -304,8 +304,9 @@
var counter = 0;
// Iterate through all buildings owned by the player
self.buildings.forEach(function (building) {
// Sum the energy provided by the building
+ var buildingInfo = buildableRepository.getBuildableInfo(building.type);
console.log("Count energy of " + buildingInfo.name);
var buildingInfo = buildableRepository.getBuildableInfo(building.type);
counter = Math.min(Math.max(counter + buildingInfo.energy, 0), 100);
});
a tileable sand terrain tile.
A square tileable rock terrain tile WITHOUT BBORDER. Single Game Texture. In-Game asset. 2d. No shadows. No Border
Zenith view of Dune's Wind Trap power facility square fence. Ressembles a bit to Sydney's Opera. Zenith view Directly from above.
grey cancel icon. UI
thin white circle empty.
0x5e86ff
Zenith view of a white rectangular Harvester shape of a garbage truck with a triangular head. Harvesting on sand, with flowing spice in the back. inside a square fence. Zenith view. Directly overhead. Plumb view.
Minimal Ui icon of an right sign aside with an icon of a target. sand background
Minimal icon of a home with direction icon pointing to the home. sand background
3 white flat isometric concentric circles like a target.
Remove background
Gray background
Minimal Ui icon of target sign on a fire icon.. sand background
top view of an explosion effect.
Simple heavy army tank factory buiding a tank with a crane. Square fence... Zenith view Directly overhead. Plumb view.
an empty black popup UI. UI