Surgery clinic works even if you can't afford to pay for it #331

Closed
opened 2023-11-27 00:32:52 +01:00 by abc · 5 comments
abc commented 2023-11-27 00:32:52 +01:00 (Migrated from github.com)

Describe the bug
Several effects (such as nanos, surgery clinics, etc.) cost credits, however, if a player attempts to use them, the effect should check how much credits they have. If the player doesn't have enough credits to cover the cost, then the effect should fail.

To Reproduce
Steps to reproduce the behavior:

  1. Set your cash to zero: /set cash 0
  2. Visit a surgery clinic.
  3. Right click the clinic to use it.
  4. Spawn yourself a pearl: /item 232822 232823 50
  5. Sell the pearl to a shop.
  6. Check your cash with /get cash - notice it's a negative number.

Expected behavior
You shouldn't be able to use the surgery clinic unless you have the credits.
Any effect which hits credits should check that the player has the credits before taking effect.
There should be an absolute minimum of zero credits. It should be impossible for credits to be negative.

**Describe the bug** Several effects (such as nanos, surgery clinics, etc.) cost credits, however, if a player attempts to use them, the effect should check how much credits they have. If the player doesn't have enough credits to cover the cost, then the effect should fail. **To Reproduce** Steps to reproduce the behavior: 1. Set your cash to zero: `/set cash 0` 2. Visit a surgery clinic. 3. Right click the clinic to use it. 5. Spawn yourself a pearl: `/item 232822 232823 50` 6. Sell the pearl to a shop. 7. Check your cash with `/get cash` - notice it's a negative number. **Expected behavior** You shouldn't be able to use the surgery clinic unless you have the credits. Any effect which hits credits should check that the player has the credits before taking effect. There should be an absolute minimum of zero credits. It should be impossible for credits to be negative.
TheTinkeringIdiot commented 2024-01-27 03:11:35 +01:00 (Migrated from github.com)

Confirmed, but appears to be isolated or related to the Surgery Clinic. I tested with Engineer pet creation nanos and they do correctly check the credit balance before casting and subtract the listed amount.

I confirmed the possibility of a negative credit balance also, which is possibly a separate issue.

Confirmed, but appears to be isolated or related to the Surgery Clinic. I tested with Engineer pet creation nanos and they do correctly check the credit balance before casting and subtract the listed amount. I confirmed the possibility of a negative credit balance also, which is possibly a separate issue.
TheTinkeringIdiot commented 2024-02-23 03:58:39 +01:00 (Migrated from github.com)

Improvements have been made with recent patches. The Surgery Clinic is still usable with 0 credit balance, but the negative credit balance is no longer a problem. Selling a pearl to the shop as described returns the appropriate number of credits to the player, and no longer causes a negative balance.

Improvements have been made with recent patches. The Surgery Clinic is still usable with 0 credit balance, but the negative credit balance is no longer a problem. Selling a pearl to the shop as described returns the appropriate number of credits to the player, and no longer causes a negative balance.
RaggyLP commented 2024-08-16 01:30:55 +02:00 (Migrated from github.com)

Confirmed as still present as of 16/08/2024. Surgery clinic is usable even with 0 creds.

Confirmed as still present as of 16/08/2024. Surgery clinic is usable even with 0 creds.
drake added this to the Season 2 Launch project 2024-12-04 13:46:29 +01:00
drake added the
state
fixed
label 2024-12-20 17:07:10 +01:00
drake self-assigned this 2024-12-20 17:07:13 +01:00

This should now be fixed

This should now be fixed
Member

Can confirm that this is fixed and working as expected now :)

You can now only use the Stationary Automated Surgery Clinic if you have sufficient credits.

Can confirm that this is fixed and working as expected now :) You can now only use the Stationary Automated Surgery Clinic if you have sufficient credits. <video src="/attachments/7e3f3bd8-816b-41c7-8c4f-a5afb7169ded" title="2024-12-20 19-50-29.mp4" controls></video>
kajori moved this to Done in Season 2 Launch on 2025-01-10 06:24:23 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-10 06:24:36 +01:00
drake moved this to Done in Season 2 Launch on 2025-01-13 03:05:06 +01:00
drake moved this to Done in Season 2 Launch on 2025-01-13 03:05:06 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-13 07:07:43 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-16 11:55:30 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-16 11:56:22 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-16 12:15:35 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-16 12:48:06 +01:00
drake moved this to Done in Season 2 Launch on 2025-01-17 08:04:39 +01:00
drake moved this to Done in Season 2 Launch on 2025-01-17 08:04:41 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-17 08:23:53 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-25 12:43:59 +01:00
kajori moved this to Done in Season 2 Launch on 2025-01-25 12:46:49 +01:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: prk/issues#331
No description provided.