Page 1 of 1
Pentagram activation
Posted: Wed Aug 10, 2016 3:05 am
by Malachai
I often find pentagrams with a grolm on top of it, sometimes up to 6 in a row. It'd be nice if this was changed so that pentagrams deactivate automatically even with someone on top.
Also being able to activate pents even if there's a grolm on top of it.
Just some QoL changes.

Posted: Wed Aug 10, 2016 1:37 pm
by Lordlava
This always used to ([s]deleted word[/s]) me off as well.
I have never tried to look for the area of the code that manages this.
Posted: Wed Aug 10, 2016 3:35 pm
by Malachai
I found this in the use_driver.c, line 2631 on the use_driver function:
Code: Select all
if (!carried) {
m=it[in].x+it[in].y*MAPX;
if (map[m].ch || map[m].to_ch) return;
}
Haven't tested it but from what I can see, if the object isn't take-able it checks if there's a character in the same spot this object is in. If there is, the function stops there.
Also found this in the same file, line 3176 on the item_tick_expire function (which I assume is when pents deactivate):
Code: Select all
if (may_deactivate(in) && !map[m].ch && !map[m].to_ch)
It also checks if there's a character on top when attempting to deactivate the object once its active duration expires.
Posted: Wed Aug 10, 2016 9:05 pm
by Rizpah
To all that is righteous and good in life, please make this happen. So annoying when you are about to touch a pent and one walks on it right as you are touching or just so happens to spawn one. Happens way too often imo.
Posted: Thu Aug 11, 2016 4:49 am
by LazyWarrior
I think it acts like this because of other usable objects like doors, if they were toggleable with people on them... it would be quite unpleasant for the person in the door. Although if u can make it work specifically for pents that would be cool and I'm for this.
Posted: Thu Aug 11, 2016 5:22 am
by Malachai
I believe you can just check if the object in question doesn't use driver 33 (which is the one used by pents). This way only pents won't check for characters above them.