Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000743Core InformSpacing and printingpublic2011-09-10 15:322014-05-07 07:33
ReporterRon Newcomb 
Assigned Tograham 
PlatformPPCOSMac OS XOS Version10.4
Product Version6G60 
Target VersionFixed in Version6L02 
Summary0000743: A silent action prints a spurious line break when used as a to-phrase within text (with solution?)
DescriptionThe code below prints a line break between "sit" and the period. The line break comes from this bit deep within ProcessRulebook():

   } else {
      if ((say__p) && (bits & RS_NOSKIPS == 0)) DivideParagraphPoint();
      rv = indirect(substituted_rule);
      if (rv == 2) rv = reason_the_action_failed;
      else if (rv) rv = substituted_rule;

Say__p is true because "you sit" was printed, and the other condition allows anything except Activities to pass through.

My suggested fix is, at the very start of ProcessRulebook(), adding this:

   if (keep_silent) bits = bits | RS_NOSKIPS;

as the third line in the function, right after a similar line having the identical effect in a different situation. See below.
Minimal Source Text To Reproduce
"Test" by Rob Myall

Garden is a room. The chair is a fixed in place enterable supporter in  Garden.

When play begins:
   say "You sit[Begin-sitting]."

To say Begin-sitting:
   try silently entering a random visible supporter.
Additional InformationSuggested fix looks like:

[ ProcessRulebook rulebook parameter bits rv
x frame_base substituted_rule usage original_deadflag rbaddress ra acf gc ga;
if (bits) bits = RS_ACTIVITY + RS_NOSKIPS;
if (say__pc & PARA_NORULEBOOKBREAKS) bits = bits | RS_NOSKIPS;
if (keep_silent) bits = bits | RS_NOSKIPS;
if (rule_frames<0) rfalse;
if (parameter) parameter_object = parameter;

(and so on)
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
Ron Newcomb (reporter)
2011-09-10 15:37

Or I guess modifying the condition directly like this:

      if ((say__p) && (bits & RS_NOSKIPS == 0) && (keep_silent == 0)) DivideParagraphPoint();

instead of using NOSKIPS as a go-between would work just as well.
graham (administrator)
2014-01-28 16:52

Something a bit higher-level is needed, and in any case there's a somewhat leaner and faster run-time mechanism for rulebooks now, but I've addressed this. I think it's fairly rare to want to try a silent action in mid-sentence, but you now can.

- Issue History
Date Modified Username Field Change
2011-09-10 15:32 Ron Newcomb New Issue
2011-09-10 15:37 Ron Newcomb Note Added: 0001270
2011-09-16 09:15 EmacsUser Status new => confirmed
2014-01-28 16:52 graham Note Added: 0002410
2014-01-28 16:52 graham Status confirmed => resolved
2014-01-28 16:52 graham Resolution open => fixed
2014-01-28 16:52 graham Assigned To => graham
2014-05-07 07:32 jmcgrew Fixed in Version => 6L02
2014-05-07 07:33 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker