Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000980I6 LibraryGeneralpublic2012-08-08 16:222015-05-10 17:47
ReporterDavidG 
Assigned ToDavidG 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version6/11 
Target Version6/12Fixed in Version6/12 
Summary0000980: Conflict between 'describe' and 'initial' properties
DescriptionOriginally reported by Mark Tilford as Issue L61122

This object displays its 'initial' message even though it has a 'moved' attribute; this is because of the presence of the 'describe' property, even though it returns false.
Minimal Source Text To Reproduce
Object  -> thing "The Thing"
  with  describe [; rfalse; ],
        initial "This shouldn't be displayed.",
  has   moved;
Additional InformationProposed solution by Roger Firth:

[ Locale descin text_without_ALSO text_with_ALSO
    o p num_objs must_print_ALSO;
    objectloop (o in descin) give o ~workflag;
    num_objs = 0;
    objectloop (o in descin)
        if (o hasnt concealed && NotSupportingThePlayer(o)) {
            #Ifndef MANUAL_PRONOUNS;
            PronounNotice(o);
            #Endif;
            if (o has scenery) {
                if (o has supporter && child(o)) SayWhatsOn(o);
            }
            else {
                give o workflag; num_objs++;
                p = initial;
                if ((o has door or container) && o has open && o provides when_open) {
                    p = when_open; jump Prop_Chosen;
                }
                if ((o has door or container) && o hasnt open && o provides when_closed) {
                    p = when_closed; jump Prop_Chosen;
                }
                if (o has switchable && o has on && o provides when_on) {
                    p = when_on; jump Prop_Chosen;
                }
                if (o has switchable && o hasnt on && o provides when_off) {
                    p = when_off;
                }

              .Prop_Chosen;

                if (o.&describe && RunRoutines(o, describe)) {
                    must_print_ALSO = true;
                    give o ~workflag; num_objs--;
                    continue;
                }
                if (o.p && (o hasnt moved || p ~= initial)) {
                    new_line;
                    PrintOrRun(o, p);
                    must_print_ALSO = true;
                    give o ~workflag; num_objs--;
                    if (o has supporter && child(o)) SayWhatsOn(o);
                }
            }
        }

    if (num_objs == 0) return 0;

    if (actor ~= player) give actor concealed;
    if (text_without_ALSO) {
        new_line;
        if (must_print_ALSO) print (string) text_with_ALSO, " ";
        else print (string) text_without_ALSO, " ";
        WriteListFrom(child(descin),
          ENGLISH_BIT+RECURSE_BIT+PARTINV_BIT+TERSE_BIT+CONCEAL_BIT+WORKFLAG_BIT);
    }
    else {
        if (must_print_ALSO) L__M(##Look, 5, descin);
        else L__M(##Look, 6, descin);
    }
    if (actor ~= player) give actor ~concealed;
    return num_objs;
];

TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0001786)
DavidG (developer)
2012-08-09 21:02

Roger's fix does the job.
(0003718)
jmcgrew (administrator)
2015-05-10 17:47

Closing all resolved issues from 2014 and earlier.

- Issue History
Date Modified Username Field Change
2012-08-08 16:22 DavidG New Issue
2012-08-09 20:51 DavidG Description Updated View Revisions
2012-08-09 20:54 DavidG Assigned To => DavidG
2012-08-09 20:54 DavidG Status new => confirmed
2012-08-09 21:03 DavidG Note Added: 0001786
2012-08-09 21:03 DavidG Status confirmed => resolved
2012-08-09 21:03 DavidG Fixed in Version => 6/12
2012-08-09 21:03 DavidG Resolution open => fixed
2015-05-10 17:47 jmcgrew Note Added: 0003718
2015-05-10 17:47 jmcgrew Status resolved => closed


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker