Skip to content

Conversation

SECBATON-GRIFFON
Copy link
Contributor

@SECBATON-GRIFFON SECBATON-GRIFFON commented Feb 1, 2025

[bugfix][qol]

What this does

moves vend_ready being set to 0 down after a return, adds a feedback message for clicking these links in-game while set to 0

Why it's good

more feedback

How it was tested

vending items, edit mode

Changelog

🆑

  • tweak: Vendors now indicate to users when they aren't ready to vend, if they try to be interacted with in some cases.

@D3athrow-Issues D3athrow-Issues added Bug / Fix This is either a bug or a fix for a bug. ❤️ Quality of Life ❤️ This is a change that removes hassle and improves quality of life. labels Feb 1, 2025
@SECBATON-GRIFFON SECBATON-GRIFFON marked this pull request as ready for review February 1, 2025 03:44
@Inorien
Copy link
Contributor

Inorien commented Feb 1, 2025

a bit of context on this PR:

several hours ago I was minning a round and threw a vendor at the station. the crew found it, brought it before the bridge and several people gathered around it all spamming the buttons as normal.
inevitably the interface broke - this is far from a new issue - but Kanef ahelped it and I went code diving and found that vend_ready was stuck at 0, which caused it to fail checks in Topic() on the vendomat base.
it seems that any vendor is vulnerable to this and that this bug is triggered by too many people hitting the interface at once, resulting in vend_ready getting stuck at 0 and the machine becoming unusable to anyone.
i went back to the round but dear Schlomo had already spaced the malfunctioning vendor. I teleported it to centcomm and set vend_readyback to 1, at which point it seemed to be working fine again.
i relayed to Kanef the info about vend_ready getting stuck and this PR is the result

@west3436 west3436 closed this Feb 18, 2025
@Kurfursten
Copy link
Collaborator

@west3436 The code here looks harmless as the only thing it does is add a busy check. However, the code isn't implemented in the best way possible. Instead of nesting the entire function inside the ready check (which has inflated the diff size), he could have had it simply return early if busy. This would avoid rightward creep and simplify the diff to something like 4 lines total.

@west3436 west3436 reopened this Mar 3, 2025
@west3436
Copy link
Collaborator

west3436 commented Mar 3, 2025

@SECBATON-GRIFFON implement @Kurfursten's suggestion and I'll merge

@SECBATON-GRIFFON
Copy link
Contributor Author

@SECBATON-GRIFFON implement @Kurfursten's suggestion and I'll merge

done

@west3436 west3436 merged commit 79c86b6 into vgstation-coders:Bleeding-Edge Mar 4, 2025
5 checks passed
@SECBATON-GRIFFON SECBATON-GRIFFON deleted the vend-ready-fixes branch March 5, 2025 23:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug / Fix This is either a bug or a fix for a bug. ❤️ Quality of Life ❤️ This is a change that removes hassle and improves quality of life.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants