Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of null (reading 'name')' in or related to this line: 'return node.x === neighbor.x && node.y === neighbor.y;' Line Number: 441
Code edit (6 edits merged)
Please save this source code
User prompt
Please fix the bug: 'TypeError: Cannot read properties of undefined (reading 'name')' in or related to this line: 'return node.x === neighbor.x && node.y === neighbor.y;' Line Number: 441
Code edit (1 edits merged)
Please save this source code
User prompt
When harvester is full, call findClosestRefinery and move to it
User prompt
Create a new global function « findClosestRefinery » that takes an unit and returns the cellX,cellY of the closest refinery of the same player it it exists
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: newunit is not defined' in or related to this line: 'harvestActionLogic(newunit, cellX, cellY);' Line Number: 1324
Code edit (2 edits merged)
Please save this source code
User prompt
in harvestActionLogic, remplace the use of currentSelection, by the of a parameter 'targetUnit' and update the existing function calls
User prompt
in moveActionLogic, remplace the use of currentSelection, by the of a parameter 'targetUnit' and update the existing function calls
Code edit (1 edits merged)
Please save this source code
User prompt
in clearCellSpice also update the spiceSpots array
Code edit (8 edits merged)
Please save this source code
User prompt
when the harvester took 200 from a cell, call clearCellSpice()
User prompt
add a new method clearCellSpice in the Map class
Code edit (1 edits merged)
Please save this source code
User prompt
no rotate only when harvestedSpiceCounter%100 ==0
User prompt
make the unit randomy rotate by 45° while harvesting
Code edit (1 edits merged)
Please save this source code
User prompt
make the blinking moresmooth
User prompt
in UnitHarvester, while harvesting, make the unit blink in orange
Code edit (1 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: harvestSpeed is not defined' in or related to this line: 'self.harvestedSpiceCounter += harvestSpeed;' Line Number: 596
===================================================================
--- original.js
+++ change.js
@@ -413,9 +413,9 @@
for (i = 0; i < neighbors.length; i++) {
var neighbor = neighbors[i];
if (closedSet.findIndex(function (node) {
return node.x === neighbor.x && node.y === neighbor.y;
- }) !== -1 || !ignoreSpecificBuilding && self.cells[neighbor.x][neighbor.y].building || ignoreSpecificBuilding && self.cells[neighbor.x][neighbor.y].building && self.cells[neighbor.x][neighbor.y].building.name != ignoreSpecificBuilding.name) {
+ }) !== -1 || self.cells[neighbor.x][neighbor.y].building && !ignoreSpecificBuilding) {
continue;
}
var gScore = currentNode.g + 1; // 1 is the distance from a node to a neighbor
var gScoreIsBest = false;
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