Skip to content
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

Built robots should inherit display properties from parent #1663

Closed
kostmo opened this issue Nov 26, 2023 · 0 comments · Fixed by #1670
Closed

Built robots should inherit display properties from parent #1663

kostmo opened this issue Nov 26, 2023 · 0 comments · Fixed by #1670
Assignees
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Robots An issue having to do with robots. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. T-UI Involves the user interface. Z-Feature A new feature to be added to the game.

Comments

@kostmo
Copy link
Member

kostmo commented Nov 26, 2023

Most notably, the status quo is that children built by invisible system robots are automatically visible, and their "invisible" property cannot be set. It doesn't quite work to use the appear " " command to hide them, because their background will still be "blank", and hence visible (see #1662).

I think that the only existing scenario that even entails a system robot that builds children is #1599. Hence the relative recency of #1430 being discovered and fixed.

Also related:

Implementation

This should be a simple change here.

@kostmo kostmo added Z-Feature A new feature to be added to the game. T-UI Involves the user interface. labels Nov 26, 2023
@byorgey byorgey added C-Low Hanging Fruit Ideal issue for new contributors. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. G-Robots An issue having to do with robots. labels Nov 28, 2023
@kostmo kostmo self-assigned this Dec 2, 2023
@mergify mergify bot closed this as completed in #1670 Dec 3, 2023
mergify bot pushed a commit that referenced this issue Dec 3, 2023
Closes #1663.

The status quo is that built-children of system robots are visible, even if the system robot is invisible.  So we preserve that behavior for now, with the potential to override it at some future point.  We don't yet have a definite need to make children of system robots invisible, but this PR does at least provide a mechanism to set the foreground and background of child robots (as a stopgap until #1230).

Tested with:

    scripts/play.sh -i scenarios/Challenges/Ranching/beekeeping.yaml --autoplay

| Before | After |
| --- | --- |
| ![Screenshot from 2023-12-01 17-31-00](https://github.com/swarm-game/swarm/assets/261693/9a9a49cb-fee5-424d-a748-9cb3c65ffe8f) | ![Screenshot from 2023-12-01 17-35-19](https://github.com/swarm-game/swarm/assets/261693/4da17e20-8f1a-46fc-ac9c-6154ccb7d4c7) |
byorgey added a commit that referenced this issue Jan 9, 2024
Fixes #1693.  It's not necessarily appropriate to copy the entire
`Display` record.  So instead, we explicitly list the fields that
should be inherited.  For now, it is only `displayAttr`, but we could
add `invisible` in the future (see #1670, #1663).
mergify bot pushed a commit that referenced this issue Jan 14, 2024
Fixes #1693.  It's not necessarily appropriate to copy the entire `Display` record.  So instead, we explicitly list the fields that should be inherited.  For now, it is only `displayAttr`, but we could add `invisible` in the future (see #1670, #1663).

Tested to make sure behavior is preserved with:
```
scripts/play.sh -i scenarios/Challenges/Ranching/beekeeping.yaml --autoplay
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Low Hanging Fruit Ideal issue for new contributors. G-Robots An issue having to do with robots. S-Nice to have The bug fix or feature would be nice but doesn't currently have much negative impact. T-UI Involves the user interface. Z-Feature A new feature to be added to the game.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants