Code edit (10 edits merged)
Please save this source code
User prompt
in findAvailableCellAtRange, return the absolute cell instead of the relative move
User prompt
update findAvailableCellAtRange to take into account the range.
Code edit (1 edits merged)
Please save this source code
User prompt
in harvester stopOtherActions function, restore the unit tint
User prompt
when click on an action without target, highlightBorder for 1 second
Code edit (1 edits merged)
Please save this source code
User prompt
when ActionItemIcon is pressed, check if the action has 'noTarget' and if so Call the action handler without switching to SET_ORDER_TARGET
Code edit (1 edits merged)
Please save this source code
User prompt
in displayBuildableItems, before adding a BuildableItemIcon, check the 'requires' property of the buildable. if available, then check if the player has the required building
Code edit (1 edits merged)
Please save this source code
User prompt
No that's just a local implementation. We need a rule, a full system. And the Factory should not be made visible/available unless a Refinery was build before.
User prompt
Propose a solution to implement a Build Order. ex: Light Factory can be built only after a Spice Refinery
Code edit (2 edits merged)
Please save this source code
User prompt
Please fix the bug: 'Uncaught ReferenceError: s is not defined' in or related to this line: 's;' Line Number: 1927
Code edit (1 edits merged)
Please save this source code
User prompt
Current log is : findPath {x: 6, y: 5} {x: 6, y: 10} Return adjusted path [] Fix the adjusted path
Code edit (7 edits merged)
Please save this source code
User prompt
Update findPath function so that it returns the path to the closest reachable point if the destination isn't reachable.
Code edit (1 edits merged)
Please save this source code
User prompt
in enqueueBuildable call blinkRed when Not enough resources to build.
User prompt
move the code : ``` progressDisplay.progressAsset.tint = 0xFF0000; // Set progress display color to red progressDisplay.setProgress(1); progressDisplay.progressAsset.alpha = 0.5; // Make it fully visible progressDisplay.visible = true; // Ensure it's visible LK.setInterval(function () { progressDisplay.progressAsset.alpha = progressDisplay.progressAsset.alpha === 1 ? 0 : 1; }, 250); // Blink effect ``` inside a function in progressDisplay
Code edit (4 edits merged)
Please save this source code
User prompt
Please fix the bug: 'ReferenceError: parentIcon is not defined' in or related to this line: 'progressDisplay.progressAsset.width = parentIcon.asset.width; // Set progress to 100%' Line Number: 1134
User prompt
when "Not enough resources to build", set the progressDisplay to 100% and visible
===================================================================
--- original.js
+++ change.js
@@ -1112,20 +1112,21 @@
});
targetUnit.moveAlongPath(path);
}
}
-function attackActionLogic(targetUnit, destinationX, destinationY) {
+function attackActionLogic(theUnit, destinationX, destinationY) {
console.log("AttackActionLogic...", destinationX, ',', destinationY);
- if (targetUnit && targetUnit.isUnit) {
- targetUnit.stopOtherActions();
+ if (theUnit && theUnit.isUnit) {
+ theUnit.stopOtherActions();
+ var target = findAvailableCellAtRange(destinationX, destinationY, theUnit.range);
var path = gameMap.findPath({
- x: targetUnit.cellX,
- y: targetUnit.cellY
+ x: theUnit.cellX,
+ y: theUnit.cellY
}, {
x: destinationX,
y: destinationY
});
- targetUnit.moveAlongPath(path);
+ theUnit.moveAlongPath(path);
}
}
function harvestActionLogic(targetUnit, destinationX, destinationY) {
console.log("HarvestActionLogic...", targetUnit, ' pos=', destinationX, ',', destinationY);
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