by Roody_Yogurt » Wed Oct 10, 2012 2:02 pm
The other day, I noticed that in a game compiled with USE_VERBSTUB, when it comes to doors, >PUSH always means >OPEN DOOR and >PULL always means >CLOSE DOOR. Of course, hinged doors in real life have 'interior' and 'exterior' sides, depending on which way they swing. Now, I don't consider myself a "simulationist", but this seems like an easy enough thing to fix. Here is the new code:
Code: Select all
#ifset VERBSTUBS
before
{
object DoPush
{
if location = self.between
return Perform(&DoOpen, self)
else
return Perform(&DoClose, self)
}
object DoPull
{
if location = self.between
return Perform(&DoClose, self)
else
return Perform(&DoOpen, self)
}
}
#endif
In the above code, between #1 is always the exterior side and between #2 is always the interior side.
Anyhow, I thought I'd share that. I haven't thought of ways to simplify/represent it further, but people are welcome to try.
The other day, I noticed that in a game compiled with USE_VERBSTUB, when it comes to doors, >PUSH always means >OPEN DOOR and >PULL always means >CLOSE DOOR. Of course, hinged doors in real life have 'interior' and 'exterior' sides, depending on which way they swing. Now, I don't consider myself a "simulationist", but this seems like an easy enough thing to fix. Here is the new code:
[code]#ifset VERBSTUBS
before
{
object DoPush
{
if location = self.between
return Perform(&DoOpen, self)
else
return Perform(&DoClose, self)
}
object DoPull
{
if location = self.between
return Perform(&DoClose, self)
else
return Perform(&DoOpen, self)
}
}
#endif[/code]
In the above code, between #1 is always the exterior side and between #2 is always the interior side.
Anyhow, I thought I'd share that. I haven't thought of ways to simplify/represent it further, but people are welcome to try.