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
Code edit (10 edits merged)
Please save this source code
User prompt
in UnitHarvester add a property harvestSpeed to reduce the increase speed of the harvestedSpiceCounter
Code edit (2 edits merged)
Please save this source code
User prompt
set the currentSelection.selectedAction in ActionItemIcon down event
User prompt
in handleDragEnd, replace the following code that calls all the actions ``` currentSelection.actions.forEach(function (actionType) { var actionInfo = actionRepository.getActionInfo(actionType); if (actionInfo && actionInfo.handler) { console.log('Call action handler : ', actionInfo); actionInfo.handler(cellCoord.cellX, cellCoord.cellY); } }); ``` by a code that call only the action selected bu the user
Code edit (1 edits merged)
Please save this source code
Code edit (3 edits merged)
Please save this source code
User prompt
add a console log when the harvestedSpiceCounter updates
User prompt
implament the harvester 'harvest' action : move to the closest spice spot, switch to harvesting Mode, and increment a harvestedSpiceCounter from 0 to 200 per spot
Code edit (10 edits merged)
Please save this source code
User prompt
in Map.render, , use cell.spiceAsset instead of creating a new terrainSpice
User prompt
in initSpiceSpots(), fill the cell.spiceAsset properties
User prompt
add a new property to cells 'spiceAsset' and set it to null in Map.init()
Code edit (1 edits merged)
Please save this source code
User prompt
At the beginning of render function, clear the screen
Code edit (1 edits merged)
Please save this source code
User prompt
In map render if spice = true for cell then add a terrainSpice on it
User prompt
In initSpiceSpots after the spice creation loop add a new property spice = true to gameMap cells based on globalTerrain values
===================================================================
--- original.js
+++ change.js
@@ -813,8 +813,9 @@
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
}, _typeof(o);
}
function moveActionLogic(destinationX, destinationY) {
+ console.log("MoveActionLogic...", destinationX, ',', destinationY);
if (currentSelection && currentSelection.isUnit) {
var path = gameMap.findPath({
x: currentSelection.cellX,
y: currentSelection.cellY
@@ -825,10 +826,10 @@
currentSelection.moveAlongPath(path);
}
}
function harvestActionLogic(destinationX, destinationY) {
+ console.log("HarvestActionLogic...", destinationX, ',', destinationY);
if (currentSelection && currentSelection.isUnit && currentSelection.type === 'harvester') {
- console.log("HarvestActionLogic...", destinationX, ',', destinationY);
var path = gameMap.findPath({
x: currentSelection.cellX,
y: currentSelection.cellY
}, {
@@ -1158,14 +1159,15 @@
};
console.log(currentSelection.name + ' received new destination target: ' + cellCoord.cellX + ',' + cellCoord.cellY);
// Call the action handler with the target position
if (currentSelection.actions) {
- currentSelection.actions.forEach(function (actionType) {
- var actionInfo = actionRepository.getActionInfo(actionType);
+ if (currentSelection.selectedAction) {
+ var actionInfo = actionRepository.getActionInfo(currentSelection.selectedAction);
if (actionInfo && actionInfo.handler) {
+ console.log('Call action handler : ', actionInfo);
actionInfo.handler(cellCoord.cellX, cellCoord.cellY);
}
- });
+ }
}
if (targetMoveCursor) {
console.log('hiding move cursor ...');
targetMoveCursor.visible = 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