The Farmer Was Replaced

Timon Herzog · Idle

The Farmer Was Replaced patch notes · Jan 21, 2025

Experiment

Imports And Global Variables

What's new in Imports And Global Variables: 18 changes to The Farmer Was Replaced, released Jan 21, 2025.

Content · 5

  • Entities.Carrots has been renamed to Entities.Carrot to make all entity names singular.

    entity name
  • Grounds.Turf has been renamed to Grounds.Grassland for better clarity.

    ground type name
  • Items.Water_Tank has been renamed to Items.Water due to the removal of the tank refill feature.

    item name
  • Items.Bones has been renamed to Items.Bone to make all item names singular.

    item name
  • Unlocks.Benchmark has been replaced with Unlocks.Timing.

    unlock name

System · 9

  • Destructuring support has been added to for loops.

    for loop feature
  • The get_op_count() function has been renamed to get_tick_count().; The set_farm_size() function has been renamed to set_world_size() for consistency with get_world_size().

    function name
  • The set function now allows lists as keys.

    set function behavior
  • The trade() function has been removed from the game.

    function removal
  • The str() function has been added.

    function addition
  • The get_companion() function now returns a tuple of (entity, (x, y)) instead of a list.

    function return value
  • The import system has been updated to be similar to Python's, supporting 'import file' and 'from file import *' syntax.

    import system
  • Global variables and scopes now function like in Python, allowing the use of the 'global' keyword to write to the global scope.

    global variable scope
  • Functions defined in other files are no longer imported implicitly and now require explicit import statements.

    function import

Fix · 4

  • Shadowing error messages have been removed.

    error message
  • An error is now raised for using a local variable before it is assigned, even if a global variable with the same name exists.

    variable assignment error
  • Using the 'in' and 'not in' operators with functions has been fixed.

    operator usage
  • Passing functions into simulations has been fixed.

    function passing