Files
Bubberstation/code/modules/photography/camera
_0Steven fdb55639d7 Making the camera circuit actually work again, and letting it work while held. (#80533)
## About The Pull Request

Alternative title: Hidden Pocket Camera Circuits! _(That Actually
Work)_.

So camera circuits have been broken for a while, and looking deeper into
it this seems to be because at some point someone moved the user check
for customization to before actually creating the picture item. Because
camera circuits rely on calling the `captureimage()` proc with a null
user, this made it so no image was ever printed nor were the photos left
decremented.

Similarly, multiple times I've encountered people being confused about
why their camera circuit isn't even trying to proc while held or hung
around their neck. So I decided to add a check to the `can_target()`
proc for whether it's on a carbon and what it could see from the given
carbon. This allows it to work while held, while hung around one's neck,
and while hidden sneakily in one's pockets. Well, insofar a bright flash
and camera snap are sneaky.
Notably it doesn't work when put in a bag in your inventory. While
having it work from a briefcase would be _incredibly_ funny, that's
outside of the scope of this pr.
Additionally, it felt weird for it to just drop the picture while
procced in your inventory, so I made it first try to put the printed
picture in the carbon's hands if at all possible.

While looking through the code, I also found that there was a typo in
where the circuit calls `captureimage()`, where `camera.picture_size_y`
was used in place of where `camera.picture_size_x` should be.
## Why It's Good For The Game

It makes camera circuits actually work again.

As for having them work while on a carbon, I've encountered multiple
people who were confused about their camera circuits not even _trying_
to proc while held or hung around their neck, when logically they
should- it's visible, after all. Hell, when held it works manually, but
not with a circuit!
Then, camera circuits working in one's pockets were a side-effect of my
first naive fix, and I thought it'd be neat to keep in; the ability to
make hidden pocket cameras just sounds cool to have. They're also only
hidden insofar you can still see the flash and hear the snap.
## Changelog
🆑
fix: Camera circuits actually print pictures again!
qol: Camera circuits can now take pictures while on a carbon, whether
held, hung around the neck, or sneakily hidden in either pocket. When
held they try to deposit their pictures into the holder's hands if
possible.
fix: Camera circuits should now actually use the camera's x axis picture
size, rather than using the camera's y axis picture size setting for
both axis.
/🆑
2023-12-25 00:41:10 +01:00
..