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

Fixes playing cards #5337

Merged
merged 4 commits into from
Jan 23, 2024
Merged

Fixes playing cards #5337

merged 4 commits into from
Jan 23, 2024

Conversation

fira
Copy link
Member

@fira fira commented Dec 29, 2023

About the pull request

3 layers of fixes for a pretty bad bug with playing cards you might have seen recently.

Changelog

🆑
fix: Fixed an exploit involving playing cards.
/:cl:

@github-actions github-actions bot added the Fix Fix one bug, make ten more label Dec 29, 2023
@fira fira changed the title Fix playing cards Fixes playing cards Dec 29, 2023
Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code changes look fine and so far I don't see any problems just fiddling with cards though I don't know exactly the repro steps for the issue in the first place.

@@ -423,6 +438,12 @@
name = "a playing card"
desc = "A playing card."

if(length(cards) >= 200)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(length(cards) >= 200)
if(cards_length >= 200)

Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nevermind I may have been able to reproduce it on master:

image

But its still sort of janky on this PR if you mousedrop from an inventory to you where you can either leave an empty icon in the bag:

image

Or if your hands are full its extra wonky:
image

@Drulikar Drulikar marked this pull request as ready for review January 23, 2024 04:50
@Drulikar
Copy link
Contributor

Remaining issues with mousedrop I will try to tackle myself.

Copy link
Contributor

@Drulikar Drulikar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code is otherwise fine.

@Drulikar Drulikar added this pull request to the merge queue Jan 23, 2024
Merged via the queue into cmss13-devs:master with commit 0e0a86a Jan 23, 2024
53 checks passed
cm13-github added a commit that referenced this pull request Jan 23, 2024
@Drulikar Drulikar mentioned this pull request Jan 23, 2024
github-merge-queue bot pushed a commit that referenced this pull request 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
Fix Fix one bug, make ten more Stale Exempt PR can't go stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants