Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000978I6 LibraryGeneralpublic2012-08-08 16:182015-05-10 17:47
Assigned ToDavidG 
PlatformOSOS Version
Product Version6/11 
Target Version6/12Fixed in Version6/12 
Summary0000978: Problem with <action> statements in Infix
DescriptionOriginally reported by Nathan Summers as Issue L61117

<action> statements may give different results under Infix than when called normally by the game.


  The room
  A bare space.

  You can see a dangerous device here.

  ; <Attack (the dangerous device)>
  Violence isn't the answer to this one.

  The bomb explodes.

    *** You have died ***

Minimal Source Text To Reproduce
Include "Parser";
Include "Verblib";
Include "Grammar";

[ Initialise; location = theroom; ];

Object  theRoom "The room"
    with  description "A bare space.",
    has   light;Include "Parser";

Object  -> bomb "dangerous device"
    with  name 'dangerous' 'device',
    before [; Attack: deadflag = 1; "The bomb explodes."; ];
Additional InformationThe Infix command ;< ATTACK BOMB is supposedly identical to the <Attack bomb> statement; both should lead to the same outcome as the HIT DEVICE command. Here, the Attack action triggered by HIT DEVICE is trapped by the bomb's before property, causing it to explode; this is the correct behaviour. However, the same action when executed from Infix is not intercepted by the bomb's before property, and so the default "Violence isn't the answer" message is displayed.

Comment by Cedric Knight:
It's because the 'meta' flag has been set for the Infix command. That stops InformLibrary.begin_action() from running BeforeRoutines(). I can't immediately see any way of fixing it. A workaround would be to set meta=0 before calling the <action>. In the long term we might want the meta flag to attach to actions rather than verbs.
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
DavidG (developer)
2014-05-19 04:33

First stab: [^]
DavidG (developer)
2014-05-19 05:18

Refinement: [^]

I think this bug is squashed.
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:18 DavidG New Issue
2012-10-07 18:16 DavidG Assigned To => DavidG
2012-10-07 18:16 DavidG Status new => assigned
2014-05-19 04:33 DavidG Note Added: 0002795
2014-05-19 04:34 DavidG Status assigned => acknowledged
2014-05-19 05:18 DavidG Note Added: 0002796
2014-05-19 05:18 DavidG Status acknowledged => resolved
2014-05-19 05:18 DavidG Fixed in Version => 6/12
2014-05-19 05:18 DavidG Resolution open => fixed
2015-05-10 17:47 jmcgrew Note Added: 0003614
2015-05-10 17:47 jmcgrew Status resolved => closed

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker