Closed Shadowmech88 closed 3 years ago
It was #19252, but no, that was not on purpose But being able to pick up timestopped projectiles was a bad idea in the first place Not because it's a bad feature to have, but because it's buggy as fuck and hard to fix
I don't think it was, because in local testing, projectiles did show up in my Alt+Click menu when timestopped. In fact, that's how I had to pick them up, because I couldn't interact with them at all otherwise.
This was only after I altered https://github.com/vgstation-coders/vgstation13/blob/Bleeding-Edge/code/game/objects/items.dm#L818 to allow them to be picked up at all, this was what is currently preventing it. It's strange, because as far as I can tell, this exclusion of anchored items has been in can_pickup
for six years, since https://github.com/vgstation-coders/vgstation13/commit/d585e252275cc7a7f0848b583d03f15cc4629296, so I'm guessing some other misbehaving area of the code got fixed and inadvertently caused this bit to come into effect.
it's buggy as fuck and hard to fix
Is it buggy as a whole, or are there just specific projectiles that misbehave? What all issues are there with it?
It's buggy as a whole and specific projectiles misbehave with it. Projectiles weren't coded to ever be in inventories. They just fly off out of your inventory, get deleted, fail to actually delete because your hand/bag/belt/whatever still had a reference to them, and generally don't work.
And look closely at the verb changed by the commit you posted. It just calls attack_hand()
, which had no such restriction until four months ago.
It just calls attack_hand()
It calls attack_hand()
after checking if(src.anchored)
, which would be true for projectiles, which would cause the verb to return before reaching attack_hand()
. The verb was changed to a can_pickup()
proc in 2015, but still kept the same code regarding anchored items as ones that could not be picked up.
Was projectile code itself not using the standard picking-up code of its parents and instead had its own interaction in its overridden attack_hand()
?
It didn't override attack_hand()
until I made it
The point I was getting at is that the actual act of picking something up is handled through attack_hand()
, not the verb
So if you just clicked on it with Alt+click, you could pick it up
Does/did attack_hand()
not check the can_pickup()
proc before picking up an item?
As you just said, the verb was changed into can_pickup()
can_pickup()
didn't exist before that
But no, until four months ago, attack_hand()
didn't check can_pickup()
If I remember correctly, projectiles used to be able to be picked up during timestop and thrown in different directions. Not only can they no longer be picked up, but even after altering the code to allow it, throwing them did not redirect them, it just bumped them a tile or so in that direction before they returned to their original course. I looked, and I couldn't find a PR that seemed to intentionally change/remove this.