Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Duplication #4604

Closed
3 tasks done
DoomLaser9 opened this issue Oct 8, 2023 · 3 comments · Fixed by #5525
Closed
3 tasks done

Object Duplication #4604

DoomLaser9 opened this issue Oct 8, 2023 · 3 comments · Fixed by #5525
Labels
Bug Admin events aren't bugs Confirmed Bug We have the same at home! In Game Exploit If you abuse this, you will be obliterated

Comments

@DoomLaser9
Copy link
Contributor

Testmerges

N/A

Description of the bug

Any object that can be picked up, can be duplicated. This seems to be a shallow object copy, i.e. you can throw the object, and then throw the duplicate, and the original thrown object "disappears". Due to it not being a full copy, it seems this would have limited use other than being able to throw something far away repeatedly without going to pick it up.

Also, this can be used to get infinite money from ATMs.

What's the difference with what should have happened?

You shouldn't be able to pseudo-duplicate items. For example duplicating an M41A will then make your character sprite appear to be holding 2 guns, although in the hands only one gun shows (but the other has the invisible copy).

It might also be unrealistic for an ATM to hold over $45 trillion in cash.

How do we reproduce this bug?

  1. Have a hotkey for throw and a hotkey for "Pick Up Dropped Items", e.g. R for throw and F for pickup.
  2. Hold an item.
  3. Press R to ready a throw, it has to be to somewhere you can pick it back up with F. This seems to work best when throwing something onto yourself, so the instructions will assume that.
  4. Do the following very quickly, alternating in between, until you see an object sprite appear layered on top of your character:
    • Click to throw
    • Press F and R simultaneously to pick it back up and ready the next throw (then repeat in loop).
  5. Notice multiple copies of the item being held (it's invisible in your hand but examine your character; it also shows on their sprite). You may even have an extra duplicate for 3 total instances of the item.

ATM Heist:

  1. Have ATM screen open. Withdraw cash (or charge card thing) into your hand.
  2. Do previous steps to duplicate.
  3. Deposit one stack of cash.
  4. Switch hands.
  5. Deposit other stack of cash. And keep depositing it because it doesn't get eaten by the ATM.
  6. Repeat for exponential growth.

Issue Bingo

@DoomLaser9 DoomLaser9 added the Bug Admin events aren't bugs label Oct 8, 2023
@fira
Copy link
Member

fira commented Oct 8, 2023

That sounds less like the object being duplicated and more it being in two places at once

I knew we couldn' trust throw code

@Tsurupeta
Copy link
Contributor

Tsurupeta commented Oct 9, 2023

More like BYOND bug, it can happen via other ways too if you're doing things faster than code can process your actions. The second (duplicated) stack should be moved to nullspace on second deletion attempt, though, so there's an issue with objects that failed to get qdel'd.

@Huffie56 Huffie56 added the Needs Reproducing We're not even sure if you know how to do it label Nov 5, 2023
@fordmichigan
Copy link
Contributor

@Huffie56 I was not able to reproduce the bug in a round by throwing and picking up money in the way described.

@realforest2001 realforest2001 added Confirmed Bug We have the same at home! and removed Needs Reproducing We're not even sure if you know how to do it labels Jan 7, 2024
@ItsVyzo ItsVyzo added the In Game Exploit If you abuse this, you will be obliterated label Jan 23, 2024
github-merge-queue bot pushed a commit that referenced this issue Jan 24, 2024
# About the pull request

This PR resolves the unresolved issues in #5337 and should fix #4604 See
testing for more details.

One note is that we aren't actually doing anything different for
mob/proc/u_equip for nomoveupdate. I attempted a few things including a
snippet from tg's code
(https://github.com/tgstation/tgstation/blob/master/code/modules/mob/inventory.dm#L377-L381)
but at least for thrown items it would just make them poof; so for now I
just corrected a misused call of it.

# Explain why it's good for the game

No more funny business nor weird inventory overlays (atleast for cards
and stacks - let me know if there is anything else that has this
behavior)

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>

Busted:


https://github.com/cmss13-devs/cmss13/assets/76988376/a596d661-49f0-4f3e-b77e-51046676408c

Fixed:


https://github.com/cmss13-devs/cmss13/assets/76988376/98bc6680-d0b5-4ce8-b7a0-22629274d8ad

</details>


# Changelog
:cl: Drathek
fix: Fixed more item exploits
fix: Fixed lingering overlays in inventories for metal stacks and cards
/:cl:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Admin events aren't bugs Confirmed Bug We have the same at home! In Game Exploit If you abuse this, you will be obliterated
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants