diff --git a/EN/Strings/code_tooltips.txt b/EN/Strings/code_tooltips.txt index b9f5cc9d..e6948d7b 100644 --- a/EN/Strings/code_tooltips.txt +++ b/EN/Strings/code_tooltips.txt @@ -188,7 +188,7 @@ Makes the drone do a flip! This action is not affected by speed upgrades. returns `None` -takes 1s to execute. +takes `400` ticks to execute. example: `while True: @@ -198,7 +198,7 @@ Pets the piggy! This action is not affected by speed upgrades. returns `None` -takes 1s to execute. +takes `400` ticks to execute. example: `while True: @@ -209,7 +209,7 @@ Multiple values can be printed at once. returns `None` -takes 1s to execute. +takes `400` ticks to execute. example: `print("ground:", get_ground_type())` @@ -514,7 +514,7 @@ Can be used on numbers and strings. `max(a,b,c)`: Returns the maximum of `a`, `b` and `c`. `max(sequence)`: Returns the maximum of all values in a sequence. -takes #comparisons ticks to execute. +takes `#comparisons` ticks to execute. example: `max([3,6,34,16])` @@ -525,7 +525,7 @@ Can be used on numbers and strings. `min(a,b,c)`: Returns the minimum of `a`, `b` and `c`. `min(sequence)`: Returns the minimum of all values in a sequence. -takes #comparisons ticks to execute. +takes `#comparisons` ticks to execute. example: `min([3,6,34,16])` @@ -534,7 +534,7 @@ Computes the absolute value of a number. returns `number` if `number` is positive, `-number` otherwise. -takes 1 tick to execute. +takes `1` tick to execute. example: `abs(-69)` diff --git a/EN/Strings/hat_tooltips.txt b/EN/Strings/hat_tooltips.txt index ea501a09..bb544b10 100644 --- a/EN/Strings/hat_tooltips.txt +++ b/EN/Strings/hat_tooltips.txt @@ -6,13 +6,21 @@ @hat_descr_brown_hat = A brown hat. @hat_descr_wizard_hat = The hat of a wizard. Unlocking this must have taken some programming magic! @hat_descr_top_hat = It looks expensive and distinguished. +@hat_descr_the_farmers_remains = ????? @hat_descr_traffic_cone = Safety first! +@hat_descr_traffic_cone_stack = Safety first! Safety first! Safety first! Safety first! Safety first! Safety first! @hat_descr_pumpkin_hat = A pumpkin for your head. Perfect for Halloween. +@hat_descr_golden_pumpkin_hat = Can be obtained by participating in Spirit's Eve festival on Fall 27th. @hat_descr_carrot_hat = Who wouldn't want carrots on their head? +@hat_descr_golden_carrot_hat = item.minecraft.golden_carrot @hat_descr_cactus_hat = A bit spiky. +@hat_descr_golden_cactus_hat = Very spiky. @hat_descr_sunflower_hat = Bright and cheerful. +@hat_descr_golden_sunflower_hat = Can be obtained by completing all Mini-Games, Puzzle Mode, and Survival Mode. @hat_descr_gold_hat = Show off your wealth with this golden hat. +@hat_descr_golden_gold_hat = Okay at this point you are just making the leprechauns jealous. @hat_descr_tree_hat = How nice! +@hat_descr_golden_tree_hat = Can be admired by visiting the east coast of San Andreas near Braddock Pass on Mount Gordo at night. @hat_descr_gold_trophy_hat = Only for the best farmer. @hat_descr_silver_trophy_hat = For the second best farmer. @hat_descr_wood_trophy_hat = For the third best farmer. \ No newline at end of file diff --git a/EN/Strings/unlock_tooltips.txt b/EN/Strings/unlock_tooltips.txt index 25518a9f..de5209ce 100644 --- a/EN/Strings/unlock_tooltips.txt +++ b/EN/Strings/unlock_tooltips.txt @@ -66,7 +66,7 @@ for item in cost: harvest()` @unlock_descr_debug = Tools to help with debugging programs. -`print("hi")` +`print("Hello, World!")` @unlock_descr_debug2 = Functions to temporarily slow down the execution and make the farm smaller. `set_world_size(3) diff --git a/EN/docs/scripting/comments.md b/EN/docs/scripting/comments.md index 6fa760d9..ca68ea20 100644 --- a/EN/docs/scripting/comments.md +++ b/EN/docs/scripting/comments.md @@ -7,6 +7,7 @@ Comments can be added using `#`. Anything on the same line after the `#` is a co This can be useful to add notes to the code, and also to temporarily disable parts of the code without deleting them. Any comment on the line before a function definition will be part of the popup information that appears when you mouse over the function name. + `#This function does nothing. def f(): pass` \ No newline at end of file diff --git a/EN/docs/unlocks/dinosaurs.md b/EN/docs/unlocks/dinosaurs.md index 3e01fca4..04f005fe 100644 --- a/EN/docs/unlocks/dinosaurs.md +++ b/EN/docs/unlocks/dinosaurs.md @@ -9,7 +9,7 @@ The hat can be equipped with Unfortunately it doesn't quite look like on the advertisement... -If you equip the dinosaur hat and have enough pumpkins, an [apple](objects/apple) will automatically be purchased and placed under the drone. +If you equip the dinosaur hat and have enough cactus, an [apple](objects/apple) will automatically be purchased and placed under the drone. When the drone is over an apple and moves again, it will eat the apple and grow its tail by one. If you can afford it, a new apple will be purchased and placed in a random location. The apple cannot spawn if something else is planted where it wants to be. diff --git a/EN/docs/unlocks/leaderboard.md b/EN/docs/unlocks/leaderboard.md index 16f26f29..ba08371a 100644 --- a/EN/docs/unlocks/leaderboard.md +++ b/EN/docs/unlocks/leaderboard.md @@ -79,7 +79,7 @@ Success Condition: `num_items(Items.Cactus) >= 33554432` ### `Leaderboards.Sunflowers` `leaderboard_run(Leaderboards.Sunflowers, filename, speedup)` -Success Condition: `num_items(Items.Sunflower) >= 100000` +Success Condition: `num_items(Items.Power) >= 100000` ### `Leaderboards.Pumpkins` `leaderboard_run(Leaderboards.Pumpkins, filename, speedup)` @@ -110,7 +110,7 @@ Success Condition: `num_items(Items.Cactus) >= 131072` ### `Leaderboards.Sunflowers_Single` `leaderboard_run(Leaderboards.Sunflowers_Single, filename, speedup)` -Success Condition: `num_items(Items.Sunflower) >= 10000` +Success Condition: `num_items(Items.Power) >= 10000` ### `Leaderboards.Pumpkins_Single` `leaderboard_run(Leaderboards.Pumpkins_Single, filename, speedup)` diff --git a/EN/docs/unlocks/mazes.md b/EN/docs/unlocks/mazes.md index 3066e1f1..537c50db 100644 --- a/EN/docs/unlocks/mazes.md +++ b/EN/docs/unlocks/mazes.md @@ -41,7 +41,8 @@ It's only worth it if the extra information and the shortcuts help you solve the The treasure can be relocated up to 300 times. After that, using weird substance on the treasure won't increase the gold in it anymore and it won't move anymore. -Here's a general approach to solving the problem: + +Here's a general approach to solving the problem: Create a maze and imagine that you are the drone. @@ -51,9 +52,12 @@ Write down your strategy step by step so that someone else could follow it witho Now try translating your steps into code. -As long as there are no loops: All the walls are really just one large connected wall. If you follow the wall, it will lead you through the whole maze. -This approach requires very little code and you do not need to keep track of where you have already been. Around 10 lines of code is all you need. -Instead of moving the drone in absolute directions like east or west it can be very useful to move the drone in relative directions like "turn right" or "turn left". To do this you need to keep track of which way the drone is currently moving. The drone never actually rotates, but you can still keep a "virtual" rotation in code. + +As long as there are no loops: All the walls are really just one large connected wall. If you follow the wall, it will lead you through the whole maze. +This approach requires very little code and you do not need to keep track of where you have already been. Around 10 lines of code is all you need. + + +Instead of moving the drone in absolute directions like east or west it can be very useful to move the drone in relative directions like "turn right" or "turn left". To do this you need to keep track of which way the drone is currently moving. The drone never actually rotates, but you can still keep a "virtual" rotation in code. The following index trick is helpful for this: `directions = [North, East, South, West] @@ -66,6 +70,9 @@ index = (index + 1) % 4` `# turn left index = (index - 1) % 4 -move(directions[index])` -If you can't solve it, you can always make your life easy and do it less efficiently. -Solvig a `1`x`1` maze is trivial. \ No newline at end of file +move(directions[index])` + + +If you can't solve it, you can always make your life easy and do it less efficiently. +Solving a `1`x`1` maze is trivial. + \ No newline at end of file diff --git a/EN/docs/unlocks/megafarm.md b/EN/docs/unlocks/megafarm.md index fc5d6598..9eb9733e 100644 --- a/EN/docs/unlocks/megafarm.md +++ b/EN/docs/unlocks/megafarm.md @@ -39,7 +39,8 @@ Here's another example that passes a different direction to each drone. do_a_flip() spawn_drone(task)` - Check out this super useful parallel `for_all` function, which takes any function and runs it on every farm tile. It makes use of all available drones to do so. + +Check out this super useful parallel `for_all` function, which takes any function and runs it on every farm tile. It makes use of all available drones to do so. `def for_all(f): def row(): diff --git a/EN/docs/unlocks/pumpkins.md b/EN/docs/unlocks/pumpkins.md index 45deb100..0ecb8582 100644 --- a/EN/docs/unlocks/pumpkins.md +++ b/EN/docs/unlocks/pumpkins.md @@ -3,7 +3,7 @@ When all the pumpkins in a square are fully grown, they will grow together to form a giant pumpkin. Unfortunately, pumpkins have a 20% chance of dying once they are fully grown, so you will need to replant the dead ones if you want them to merge. -When a pumpkin dies, it leaves behind a dead pumpkin that won't drop anything when harvested. Planting a new plant in its place automatically removes the dead pumpkin, so there is no need to harvest it. `can_harvest()` always returns `False` on dead pumpkins. +When a pumpkin dies, it leaves behind a dead pumpkin that won't drop anything when harvested. Planting a new plant in its place automatically removes the dead pumpkin, so there is no need to harvest it. Even though you can `harvest()` dead pumpkins, `can_harvest()` always returns `False` on dead pumpkins. The yield of a giant pumpkin depends on the size of the pumpkin. diff --git a/EN/docs/unlocks/timing.md b/EN/docs/unlocks/timing.md index 04594fdf..6975bd59 100644 --- a/EN/docs/unlocks/timing.md +++ b/EN/docs/unlocks/timing.md @@ -16,19 +16,21 @@ These two functions as well as `quick_print()`, are completely free. Even the ca This is not how performance works in the real world. These are just rules made up for this game to have a consistent and understandable timing model. You will probably only care about this if you want to hyper-optimize your code. - The basic unit of time for code execution is called a "tick". Without speed upgrades and power, the execution proceeds at a rate of `400` ticks per second. In general, operations that combine two values such as `+, -, *, /, //, %, and, or, ...` take one tick to run. Single value `-` and `not` are free. -An `if` branch also takes one tick to run (in addition to the time it takes to evaluate the condition expression). + +`for` and `while` loops take one tick to start, but the iterations are free (not counting the time to evaluate the condition/sequence expressions). +`return`, `break` and `continue` are all free. +An `if` branch also takes one tick to run (not counting the time to evaluate the condition/sequence expressions). +Indexing into a datastructure takes one tick for the index operator and, in the case of a dictionary or set, additional ticks depending on the size of the key. + Function calls and variable reads and writes are free but function definitions take 1 tick. +If a function or module has been passed via arguments or variable assignments, using it will cost 1 tick instead of 0. `import` statements are free. Accessing an imported module with the `.` operator is free. -If a function or module has been passed via arguments or variable assignments, using it will cost 1 tick instead of 0. -`for` and `while` loops take one tick to start, but the iterations are free (not counting the time to evaluate the condition/sequence expressions). -`return`, `break` and `continue` are all free. + `pass` takes one tick so it can be used to create precise delays. -Indexing into a datastructure takes one tick for the index operator and, in the case of a dictionary or set, additional ticks depending on the size of the key. The number of ticks that builtin functions take to execute is documented in the documentation of each function on an individual basis. \ No newline at end of file diff --git a/EN/docs/unlocks/trees.md b/EN/docs/unlocks/trees.md index 4f2f3c62..b1929fbe 100644 --- a/EN/docs/unlocks/trees.md +++ b/EN/docs/unlocks/trees.md @@ -3,7 +3,8 @@ Trees like to have some space and planting them right next to each other will slow down their growth. The growing time is doubled for each tree that is on a tile directly to the north, east, west or south of it. So if you plant trees on every tile, they will take `2*2*2*2 = 16` times longer to grow. - The `%` operator can be useful here. Remember that the `%` operator returns the remainder of the division. Even numbers divided by `2` have a remainder of `0` and odd numbers divided by `2` have a remainder of `1`. + +The `%` operator can be useful here. Remember that the `%` operator returns the remainder of the division. Even numbers divided by `2` have a remainder of `0` and odd numbers divided by `2` have a remainder of `1`. So you can check if a number is even like this: `def is_even(n):