Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000594Core InformModel worldpublic2011-03-01 19:242011-03-06 17:08
Reporterzarf 
Assigned Tojmcgrew 
PrioritynormalSeveritymildReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version6G60 
Target VersionFixed in Version 
Summary0000594: MoveFloatingObjects does not set self when calling found_in
DescriptionThis is not actually a bug; it probably counts as a feature request. Or an extension bug for contributed extensions. The problem is that MoveFloatingObjects is not sufficiently flexible for extensions that want to make new and better kinds of backdrop.

Way back in the I6 days, the MoveFloatingObjects routine would call "i.found_in()" to decide whether i should be in or out of the location. But in the rewrite to the template system, this was changed to:

address = i.&found_in;
m = address-->0;
if (m.call(real_location) ~= 0) ...

The difference is that the old way set "self" to i (for the duration of the call). The new way sets "self" to m -- the address of the I6 function being called. (Due to the semantics of the I6 ".()" operator.)

This is fine for I7's backdrops and doors. However, if you want to write a clever extension in which the found_in function invokes some object-related code, you're hosed, because "self" doesn't refer to the object. (I.e., you can't invoke an object-based rulebook or look up some property of the object, to decide whether the location is in or out.)

This has broken the "Conditional Backdrops by John Clemens" extension, for example.
TagsNo tags attached.
Effect(serious/mild) Game compiles but misbehaves
Attached Files

- Relationships

-  Notes
(0001072)
jmcgrew (administrator)
2011-03-06 17:08

As noted, this is a feature request, not a bug report.

- Issue History
Date Modified Username Field Change
2011-03-01 19:24 zarf New Issue
2011-03-06 17:08 jmcgrew Note Added: 0001072
2011-03-06 17:08 jmcgrew Status new => closed
2011-03-06 17:08 jmcgrew Assigned To => jmcgrew
2011-03-06 17:08 jmcgrew Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker