mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-28 23:58:07 +01:00
[MIRROR] Fixed uplink discount stocks affecting normal uplink item stocks [MDB IGNORE] (#22894)
* Fixed uplink discount stocks affecting normal uplink item stocks (#77289) ## About The Pull Request If an uplink item was discounted and purchased, it would prevent purchase of the normal-priced uplink item, which is supposed to be infinitely buyable. This fixes that Closes #73560 ## Why It's Good For The Game Fixes an oversight in the uplink stock system. ## Changelog 🆑 fix: Fixed being unable to purchase regular-priced uplink items if you bought the discounted variant of it. /🆑 --------- Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com> * Fixed uplink discount stocks affecting normal uplink item stocks --------- Co-authored-by: Watermelon914 <37270891+Watermelon914@users.noreply.github.com> Co-authored-by: Watermelon914 <3052169-Watermelon914@ users.noreply.gitlab.com>
This commit is contained in:
co-authored by
Watermelon914
Watermelon914
parent
dbd4653fd3
commit
4d88007808
@@ -12,6 +12,7 @@
|
||||
uplink_item.limited_stock = limited_stock
|
||||
if(uplink_item.cost >= 20) //Tough love for nuke ops
|
||||
discount *= 0.5
|
||||
uplink_item.stock_key = WEAKREF(uplink_item)
|
||||
uplink_item.category = category
|
||||
uplink_item.cost = max(round(uplink_item.cost * (1 - discount)),1)
|
||||
uplink_item.name += " ([round(((initial(uplink_item.cost)-uplink_item.cost)/initial(uplink_item.cost))*100)]% off!)"
|
||||
|
||||
Reference in New Issue
Block a user