The code for picking which objects should be considered for matching the verb in the user command looks to me like it won't collect the player themselves if the room is dark:
# FIRST, search for objects that support the verb the user typed
# (only include room contents if room is not dark (but always include user)
room = user.location
possible_objects = [room]
for obj in user.contents + (None if room.is_dark() else room.contents):
possible_objects += [obj]
if isinstance(obj, Container) and obj.see_inside and obj is not user:
possible_objects += obj.contents
It seems like we should explicitly include the user, but instead they are gathered up as part of the room's contents - but not if the room is dark. I can't test this right now but filing an issue to make sure I don't forget to follow up on it.
The code for picking which objects should be considered for matching the verb in the user command looks to me like it won't collect the player themselves if the room is dark:
It seems like we should explicitly include the user, but instead they are gathered up as part of the room's contents - but not if the room is dark. I can't test this right now but filing an issue to make sure I don't forget to follow up on it.