Don't bother me to open that pouch, I am resting!

Started by Sandstorm Phoenix, December 10, 2003, 08:31:34 AM

This isn't anything new, but I've always wondered why you can't open a container while resting.  Now before you tell me that being "at rest" is a peaceful, zen-like trance of peaceful relaxation . . and having to unbuckle buckles, untie ties, or unlace laces would require you to sit up and pay a little more attention to the task at hand. . . remember that crafting seems to work fine while you are resting.

Minor annoyance, sure.  But is this a bug?

The reason is because the open command does not distinguish between "open door" and "open pouch" - and traditionally people have not been able to open doors while resting - nor do I think they should be able to.

Because of the way positions are coded, it would be tricky to try to work around that in the code - I know it's not something I'd want to tackle, and I don't think it's worth the effort necessary, really, to make it possible.

Well that makes sense, not being able to open a door while you're resting.  Thanks, now I know.    And like G.I. Joe says, Knowing is half the battle.

Quote from: "Sanvean"The reason is because the open command does not distinguish between "open door" and "open pouch" - and traditionally people have not been able to open doors while resting - nor do I think they should be able to.

Because of the way positions are coded, it would be tricky to try to work around that in the code - I know it's not something I'd want to tackle, and I don't think it's worth the effort necessary, really, to make it possible.

I'm no code guy, and I'd agree this is not a major issue.  But the comment about positions got me thinking.  If there was an additional if/then/else statement which basically checked the variable supplied to the 'open' function to see if it was door||gate||portcullis||doors||gates and if so then it would fail, otherwise it would open like normal.

Since I've barely ever looked at diku code and you have, I'm probably talking out of my ass here, but I can't help but to wonder if there might be a quick and dirty way around it regardless of the PC's position.

I'd assume it's to separate sit and rest. Why sit on the ground if you can rest and gain back more HP/MV/stun/mana?

Because of the way positions are coded - i.e. each command has a single line in which the required position is defined, it would be tricky to try to work around that in the code.  I have looked at this problem before.

It's actually a trivial fix, and one I would recommend be applied (since you can be sitting and still manipulate doors).

The command interpreter's position requirement drops to resting, and the open/close functions are modified with a preliminary:
if (seated or resting)
if (argument is not carried and argument is not worn) {
 send ("You are too comfortable to do that.\r\n");
 return;
}
quote="CRW"]i very nearly crapped my pants today very far from my house in someone else's vehicle, what a day[/quote]

I'll take a look, that's a much more elegant way than I had been thinking.

You'd want to do lock/unlock also.
quote="CRW"]i very nearly crapped my pants today very far from my house in someone else's vehicle, what a day[/quote]