-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
only meet interactive robots #2262
Conversation
@@ -276,6 +277,9 @@ inventoryHash = to (\r -> 17 `hashWithSalt` (r ^. (robotEntity . entityHash)) `h | |||
robotKnows :: Robot -> Entity -> Bool | |||
robotKnows r e = contains0plus e (r ^. robotInventory) || contains0plus e (r ^. equippedDevices) | |||
|
|||
isInteractive :: Robot -> Bool | |||
isInteractive r = not $ r ^. robotDisplay . invisible && r ^. systemRobot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may want to improve this heuristic, or make it an explicit "interactive" property.
For example, I don't think we ever want to meet
a "growing" flower
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree, growing tree
s, flower
s, etc. are going to be a problem here. We use robots internally to simulate growth --- but from the perspective of a player that is just an implementation detail, they should not be returned by meet
. This heuristic is better than nothing, but we will definitely want to improve it. I am fine with either merging this as is and making an issue to improve it later, or coming up with a better heuristic in this PR.
An explicit boolean interactive
property probably makes sense, and I think it makes sense for interactive = true
to be the default, but invisible system robots can still be non-interactive by default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call, I think I also ran into this while developing the scenario, but I thought it was because I had creative mode turned on. I didn't realize meet
made no distinctions!
@@ -276,6 +277,9 @@ inventoryHash = to (\r -> 17 `hashWithSalt` (r ^. (robotEntity . entityHash)) `h | |||
robotKnows :: Robot -> Entity -> Bool | |||
robotKnows r e = contains0plus e (r ^. robotInventory) || contains0plus e (r ^. equippedDevices) | |||
|
|||
isInteractive :: Robot -> Bool | |||
isInteractive r = not $ r ^. robotDisplay . invisible && r ^. systemRobot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I agree, growing tree
s, flower
s, etc. are going to be a problem here. We use robots internally to simulate growth --- but from the perspective of a player that is just an implementation detail, they should not be returned by meet
. This heuristic is better than nothing, but we will definitely want to improve it. I am fine with either merging this as is and making an issue to improve it later, or coming up with a better heuristic in this PR.
An explicit boolean interactive
property probably makes sense, and I think it makes sense for interactive = true
to be the default, but invisible system robots can still be non-interactive by default.
As I was trying to solve #2249, I was rather confused after trying to
meet
a built robot andgive
them an item, but the item was not delivered. It turns out that I had beenmeet
-ing thejudge
robot instead.We should distinguish between robots that are intended to be interactive or not, and only allow
meet
-ing an interactive robot.