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

Concealment #89

Merged
merged 6 commits into from
Jun 2, 2023
Merged

Concealment #89

merged 6 commits into from
Jun 2, 2023

Conversation

zedlopez
Copy link
Contributor

@zedlopez zedlopez commented Apr 23, 2023

So far as I know, this fixes the concealment issues discussed in IE-0015: World model enforcement #15 as well as another place concealment information leaked that I discovered along the way: if you entered a supporter with a concealed item (and no unconcealed items) already on it, you would get "On the is nothing." instead of silence.

Thus this should fix I7-2046 [Mantis 2083] Containers holding concealed items do not show the " (empty)" detail text and I7-2036 [Mantis 2073] Both examine containers and examine supporters rules inconsistent when contents are concealed .

A small optimization to ListEqual in ListWriter.i6t incidentally fixes I7-2296: things being privately-named causing their printed names not to be used in room description.

This adds two test cases, ConcealControl and ConcealExperiment. It reblesses the results for Undescribed, whose output changed as a result of it. (And one can see in its behavior something screwier than a jar explicitly labeled empty having something in scope in it: after the player takes the jar, inventory reveals the previously-undescribed paper within due to the note object acquisitions rule.)

It does not rebless some other tests whose exact output changed as a result of, for instance, line numbers of things in the Standard Rules having changed. It was my assumption you wouldn't want a PR-submitter to be cavalier about redefining success.

Specifically, it fails Gas2, and Tilt3 in the same way master does without this patch. It fails Index-Chart, PM_KindUnalterable, PM_VariableContradiction, PM_KindsCircular, PM_VarKOVClash due to changes in exact output in the project index and these error messages.

Unavoidably, this change means a lot more checking of concealment rules. Naturally, I took every opportunity I could to rule out in advance the need to check them. And it doesn't happen during the parsing loop; room description is very likely the most affected. So I hope there won't be any perceptible speed problems.

@zedlopez
Copy link
Contributor Author

In several places, the code takes the unusual step of issuing an existing rule response rather than creating its own independently modifiable one. Since the point of this mod is to make one case behave indistinguishably from another, I deemed it to be a feature that if an author changed those rule responses, this code would maintain the lack of distinction by automatically using the updated ones. And, of course, an author could replace the rule altogether if they really wanted to change them.

@ganelson ganelson merged commit 89fbb6c into ganelson:master Jun 2, 2023
@zedlopez zedlopez mentioned this pull request Jun 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants