Code edit (2 edits merged)
Please save this source code
User prompt
when an Action icon is clicked, if action is move, add a new asset targetMoveCursor that moves with the mouse to select the destination
Code edit (1 edits merged)
Please save this source code
User prompt
instead of using : if (self.parent && self.parent instanceof IconBorder) { self.parent.asset.tint = 0xFF0000; } find the IconBorder with the same x as the clicked action
User prompt
when an Action icon is clicked, change the tint of the corresponding borderIcon to red
Code edit (4 edits merged)
Please save this source code
User prompt
when an Action icon is clicked, switch to SET_ORDER_TARGET mode
Code edit (5 edits merged)
Please save this source code
User prompt
now add also IconBorders in displayBuildableItems
User prompt
remove IconBorders when actionItemIcons are removed
User prompt
Fix Bug: 'ReferenceError: IconBorder is not defined' in or related to this line: 'var border = new IconBorder(iconX, iconY);' Line Number: 955
User prompt
in displayActionItems add an iconBorder before each actionIcon at the same position
Code edit (1 edits merged)
Please save this source code
User prompt
in displayActionItems use getActionInfo insde currentSelection.actions.forEach
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'y')' in or related to this line: 'self.label.y = self.asset.y + 50;' Line Number: 524
Code edit (1 edits merged)
Please save this source code
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'self.label.x = x - action.name.length / 2 * 13;' Line Number: 523
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'x')' in or related to this line: 'self.label.x = self.asset.x - action.name.length / 2 * 13;' Line Number: 523
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'on')' in or related to this line: 'self.asset.on('down', function () {' Line Number: 513
User prompt
add a new ActionRepository for units actions
User prompt
Fix Bug: 'TypeError: Cannot read properties of undefined (reading 'length')' in or related to this line: 'self.asset = self.attachAsset(action.icon, {' Line Number: 478
Code edit (1 edits merged)
Please save this source code
User prompt
add an actions array in Unit calss
User prompt
implement displayActionItems with a logic similar to displayBuildableItems but for unit actions
===================================================================
--- original.js
+++ change.js
@@ -903,9 +903,9 @@
var iconY = commandPanel.y + 200; // Y position for all icons
currentSelection.actions.forEach(function (action) {
console.log('Add action button for ' + action);
var actionInfo = unitRepository.getUnitInfo(currentSelection.type).actions.find(function (a) {
- return a.name === action;
+ return a === action;
});
if (actionInfo) {
var icon = new ActionItemIcon(actionInfo, iconX, iconY);
game.addChild(icon);
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