(action)
| 359 | |
| 360 | |
| 361 | def clean_obj_name(action): |
| 362 | if "unknown substance" not in action: |
| 363 | return action |
| 364 | for n in "ABCDEFGHIJKLMNOPQRSTUVWXYZ": |
| 365 | action = action.replace(f" {n}", "") |
| 366 | return action |
| 367 | |
| 368 | def try_to_replace(action, validActions, look=None, inventory=None): |
| 369 | if action.startswith("wait"): |