Is there a way to acquire plant information in a room when onGCMP() is called?
If so then is there a way to persist the list of plants in a room so that it can be accesed by other scripts excuted when the event roomChanged is triggered?
Generally speaking, you can determine the plants in a room based on the environment type of the room (which is in GMCP under Room.Info.environment). There are some rooms that are that environment type but don't have plants in them, but they're pretty uncommon. Here's the lookup table I use in my harvesting script:
Comments
Generally speaking, you can determine the plants in a room based on the environment type of the room (which is in GMCP under Room.Info.environment). There are some rooms that are that environment type but don't have plants in them, but they're pretty uncommon. Here's the lookup table I use in my harvesting script:
It's in Lua so you'd need to change it to be valid JavaScript.
Results of disembowel testing | Knight limb counter | GMCP AB files
onGMCP {
the current_environment variable can then be used in a switch statement.