obj->tknown comments

This commit is contained in:
PatR
2025-01-27 00:37:35 -08:00
parent f75e4a13b7
commit b6eda14368
2 changed files with 13 additions and 1 deletions

View File

@@ -432,6 +432,14 @@ pick_lock(
boolean it;
int count;
/*
* FIXME:
* (chest->otrapped && chest->tknown) is handled, to skip
* checking for a trap and continue with asking about disarm;
* (chest->tknown && !chest->otrapped) ignores tknown and will
* ask about checking for non-existant trap.
*/
if (u.dz < 0 && !autounlock) { /* beware stale u.dz value */
There("isn't any sort of lock up %s.",
Levitation ? "here" : "there");

View File

@@ -1338,7 +1338,11 @@ doname_base(
Strcat(prefix, "uncursed ");
}
/* "a large trapped box" would perhaps be more correct */
/* "a large trapped box" would perhaps be more correct; [no!]
what about ``(obj->tknown && !obj->otrapped)''? shouldn't that
yield "a non-trapped large box"? (not "an untrapped large box");
TODO: this should be ``(Is_box(obj) || obj->otyp == TIN) && ...''
but at present there's no way to set obj->tknown for tins */
if (Is_box(obj) && obj->otrapped && obj->tknown && obj->dknown)
Strcat(prefix,"trapped ");
if (lknown && Is_box(obj)) {