mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Greatly reduces Slot machine money abuse (#14953)
* Greatly reduces Slot machine money abuse * fixes conflict * Hopefully fixes tgui issue
This commit is contained in:
@@ -47,9 +47,9 @@
|
||||
if(action == "spin")
|
||||
if(working)
|
||||
return
|
||||
if(!account || account.money < 10)
|
||||
if(!account || account.money < 50)
|
||||
return
|
||||
if(!account.charge(10, null, "Bet", "Slot Machine", "Slot Machine"))
|
||||
if(!account.charge(50, null, "Bet", "Slot Machine", "Slot Machine"))
|
||||
return
|
||||
plays++
|
||||
working = TRUE
|
||||
@@ -58,45 +58,33 @@
|
||||
addtimer(CALLBACK(src, .proc/spin_slots, usr.name), 25)
|
||||
|
||||
/obj/machinery/slot_machine/proc/spin_slots(userName)
|
||||
switch(rand(1,4050))
|
||||
if(1) // .02%
|
||||
atom_say("JACKPOT! [userName] has won a MILLION CREDITS!")
|
||||
GLOB.event_announcement.Announce("Congratulations to [userName] on winning the Jackpot of ONE MILLION CREDITS!", "Jackpot Winner")
|
||||
result = "JACKPOT! You win one million credits!"
|
||||
switch(rand(1,5000))
|
||||
if(1)
|
||||
atom_say("JACKPOT! [userName] has won ten thousand credits!")
|
||||
GLOB.event_announcement.Announce("Congratulations to [userName] on winning the Jackpot of TEN THOUSAND CREDITS!", "Jackpot Winner")
|
||||
result = "JACKPOT! You win ten thousand credits!"
|
||||
resultlvl = "teal"
|
||||
win_money(1000000, 'sound/goonstation/misc/airraid_loop.ogg')
|
||||
if(2 to 5) // .07%
|
||||
atom_say("Big Winner! [userName] has won a hundred thousand credits!")
|
||||
GLOB.event_announcement.Announce("Congratulations to [userName] on winning a hundred thousand credits!", "Big Winner")
|
||||
result = "Big Winner! You win a hundred thousand credits!"
|
||||
resultlvl = "green"
|
||||
win_money(100000, 'sound/goonstation/misc/klaxon.ogg')
|
||||
if(6 to 50) // 1.08%
|
||||
atom_say("Big Winner! [userName] has won ten thousand credits!")
|
||||
result = "You win ten thousand credits!"
|
||||
resultlvl = "green"
|
||||
win_money(10000, 'sound/goonstation/misc/klaxon.ogg')
|
||||
if(51 to 100) // 1.21%
|
||||
atom_say("Winner! [userName] has won a thousand credits!")
|
||||
win_money(10000, 'sound/goonstation/misc/airraid_loop.ogg')
|
||||
if(2 to 20)
|
||||
atom_say("Big Winner! [userName] has won a thousand credits!")
|
||||
result = "You win a thousand credits!"
|
||||
resultlvl = "green"
|
||||
win_money(1000, 'sound/goonstation/misc/bell.ogg')
|
||||
if(101 to 200) // 2.44%
|
||||
atom_say("Winner! [userName] has won a hundred credits!")
|
||||
result = "You win a hundred credits!"
|
||||
win_money(500, 'sound/goonstation/misc/klaxon.ogg')
|
||||
if(21 to 100)
|
||||
atom_say("Winner! [userName] has won five hundred credits!")
|
||||
result = "You win five hundred credits!"
|
||||
resultlvl = "green"
|
||||
win_money(100, 'sound/goonstation/misc/bell.ogg')
|
||||
if(201 to 300) // 2.44%
|
||||
win_money(500, 'sound/goonstation/misc/bell.ogg')
|
||||
if(101 to 500)
|
||||
atom_say("Winner! [userName] has won two hundred credits!")
|
||||
result = "You win two hundred credits!"
|
||||
resultlvl = "green"
|
||||
if(501 to 1000)
|
||||
atom_say("Winner! [userName] has won fifty credits!")
|
||||
result = "You win fifty credits!"
|
||||
resultlvl = "green"
|
||||
win_money(50)
|
||||
if(301 to 1000) // 17.26%
|
||||
atom_say("Winner! [userName] has won ten credits!")
|
||||
result = "You win ten credits!"
|
||||
resultlvl = "green"
|
||||
win_money(10)
|
||||
else // 75.31%
|
||||
else
|
||||
result = "No luck!"
|
||||
resultlvl = "orange"
|
||||
working = FALSE
|
||||
|
||||
@@ -39,7 +39,7 @@ export const SlotMachine = (props, context) => {
|
||||
value={data.money}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="10 credits to spin">
|
||||
<LabeledList.Item label="50 credits to spin">
|
||||
<Button
|
||||
icon="coins"
|
||||
disabled={data.working}
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user