User prompt
Migrate to the latest version of LK
Code edit (4 edits merged)
Please save this source code
User prompt
Create a new Debris class extending ConfigContainer. It should have an attached asset, with the following details: id derived from config.image, an x position derived from config.offset, a random rotation, and a random scale between 0.8 and 1.2
Code edit (1 edits merged)
Please save this source code
Code edit (6 edits merged)
Please save this source code
User prompt
In the ship class, tint the asset FFE4B2
Code edit (9 edits merged)
Please save this source code
User prompt
Apply a slight orange tint to the FarmNode's farmGraphics
Code edit (1 edits merged)
Please save this source code
User prompt
the autoweeder should slowly move around the planet at a speed of AUTOWEEDER_SPEED, maintaining a distance of the planets radius
Code edit (1 edits merged)
Please save this source code
User prompt
In the Planet class update, call the autoweeder update if it exists
User prompt
Add a new global AUTOWEEDER_ROTATION = 0.01 (under the existing Autoweeder settings). In the Autowheel class's update function, increase the rotation of the autoweederWheel asset by the AUTOWEEDER_ROTATION
User prompt
When creating an autoweeder, add it to the planet background instead of the planet itself
User prompt
The Autoweeder class needs an asset with id autoweederWheel
User prompt
The Autoweeder class needs an asset with id autoweederWheel, which slowly rotates at a speed of AUTOWEEDER_ROTATION = 0.01 (new global variable under "Autoweeder settings")
Code edit (2 edits merged)
Please save this source code
User prompt
In the NavigationButton's update function, in addition to updating the buttonGraphics. Rotate the planetGraphics by the amount specified in the relevant PLANET_DETAILS
Code edit (1 edits merged)
Please save this source code
User prompt
In the NavigationButton's update function, check if the buttonGraphics rotation is not equal to the targetRotation and rotate (the buttonGraphics) towards the targetRotation at a speed of NAVIGATION_ROTATE_SPEED
Code edit (1 edits merged)
Please save this source code
User prompt
Add a local targetRotation var = 0 to the NavigationButton class
Code edit (1 edits merged)
Please save this source code
User prompt
Add NAVIGATION_ROTATE_SPEED = 0.01 and NAVIGATION_ROTATE_TARGET = MATH_HALF_PI as global variables under the existing "Interface settings" heading
User prompt
Add NAVIGATION_ROTATE_SPEED = 0.01 and NAVIGATION_ROTATE_TARGET = MATH_HALF_PI as global variables under the existing Interface settings heading
===================================================================
--- original.js
+++ change.js
@@ -1694,18 +1694,20 @@
;
self.update = update;
;
var autoweederWheelGraphics = self.attachAsset('autoweederWheel', {
+ x: 100,
anchorX: 0.5,
anchorY: 0.5
});
function update() {
// Calculate the autoweeder's new position around the planet
var angleIncrement = AUTOWEEDER_SPEED / planet.radius;
+ var planetParent = self.parent.parent;
self.rotation += angleIncrement;
// Update the autoweeder's position to maintain a fixed distance from the planet's center
- self.x = planet.x + Math.cos(self.rotation) * planet.radius;
- self.y = planet.y + Math.sin(self.rotation) * planet.radius;
+ self.x = Math.cos(self.rotation) * planetParent.radius;
+ self.y = Math.sin(self.rotation) * planetParent.radius;
// Continue rotating the autoweederWheel
autoweederWheelGraphics.rotation += AUTOWEEDER_ROTATION;
}
;
pixel art of a tiny planet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a planet. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of an alien currency symbol. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a planet made of gold ore. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
plain black background with stars. 2d repeating Texture.
pixel art of a asteroid. Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a cute alien farmer, side view. Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a rocky explosion.. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art flame particle. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a large white, empty, rectangular, speech bubble. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
pixel art of a red chevron. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.
Pixel art of yellow grapes. Single Game Texture. In-Game asset. 2d. Blank background. High contrast. No shadows.