plant

Defines the Plant and PlantPot classes.

class plant.Plant(plant_id, command_list_id, x, y)

A plant that grows when watered.

Parameters:
  • plant_id – The ID of the plant.
  • command_list_id – The ID of the command list the plant will use.
  • x – The x-coordinate of the plant.
  • y – The y-coordinate of the plant.
appear()
Make the plant appear half-grown. Anyone standing on the plant pot will be lifted.
die()
Make the plant die. Anyone standing on the head of the plant will be dropped to the ground.
finish_growing()
Make the plant appear fully grown. Anyone standing on the head of the plant will be lifted.
get_command_list_id(lesson_id)

Return the ID of the command list used by the plant.

Parameter:lesson_id – The ID of the current lesson (ignored - plants do not follow a timetable).
grow()
Make this plant start growing.
head_coords()
Return the coordinates of the head of the plant.
is_fully_grown()
Return whether the plant is fully grown.
supports(character)

Return whether a character is standing on the head of the plant.

Parameter:character (Character) – The character to check.
class plant.PlantPot(plant_pot_id, plant, x, y)

A plant pot.

Parameters:
  • plant_pot_id – The ID of the plant pot.
  • plant (Plant) – The plant in the plant pot.
  • x – The x-coordinate of the plant pot.
  • y – The y-coordinate of the plant pot.

Previous topic

pellet

Next topic

room