Junkfood Tweaks + Lottery Ticket Tweaks (#4445)

Lottery tickets now contain 3 scratches per card, but with reduced winnings.

Lottery tickets now take longer to scratch.

Improved effects of lottery tickets, including sound and voice.

Skrell Snacks no longer have shortening.

Beef Jerky and Raisins no longer have palm oil.

Cheese Honkers have reduced MSG.

Bread Tubes only have 1 unit of shortening.

Meat Pies have reduced MSG.

Cured Hams have increased MSG.
This commit is contained in:
BurgerLUA
2018-03-21 07:13:49 +02:00
committed by Erki
parent fd8dbb4be1
commit 296a3fc190
4 changed files with 78 additions and 48 deletions
+64 -36
View File
@@ -168,43 +168,71 @@ proc/spawn_money(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
user << "<span class='notice'>Charge card's owner: [src.owner_name]. Credit chips remaining: [src.worth].</span>"
/obj/item/weapon/spacecash/ewallet/lotto
name = "lottery card"
desc = "A scratch-action charge card that contains a variable amount of money."
name = "space lottery card"
desc = "A virtual scratch-action charge card that contains a variable amount of money."
worth = 0
var/scratched = 0
var/scratches_remaining = 3
var/next_scratch = 0
/obj/item/weapon/spacecash/ewallet/lotto/attack_self(mob/user)
if(!scratched)
user << "<span class='notice'>You initiate the simulated scratch action process on the charge card...</span>"
if(do_after(user,5))
var/result = rand(1,10000)
if(result <= 5000) // 50% chance to not earn anything at all.
worth = 0
user << "<span class='notice'>The card reads [worth]. Not your lucky day!</span>"
else if (result <= 8000) // 30% chance to break even.
worth = 200
user << "<span class='notice'>The card reads [worth]. At least you broke even...</span>"
else if (result <= 9000) // 10% chance to earn 500 credits
worth = 500
user << "<span class='notice'>The card reads [worth]. You doubled your money!</span>"
else if (result <= 9500) // 5% chance to earn 1000 credits.
worth = 1000
user << "<span class='notice'>The card reads [worth]. Wow, you're lucky!</span>"
else if (result <= 9750) // 2.5% chance to earn 2500 credits.
worth = 2500
user << "<span class='notice'>The card reads [worth]. Wow, your luck is running high!</span>"
else if (result <= 9900) // 1.5% chance to earn 5000 credits.
worth = 5000
user << "<span class='notice'>The card reads [worth]. Wow, you're rich!</span>"
else if (result <= 9950) // 0.5% chance to earn 10000 credits
worth = 10000
user << "<span class='notice'>The card reads [worth]. Wow, your're super rich!</span>"
else if (result <= 9975) // 0.25% chance to earn 50000 credits.
worth = 25000
user << "<span class='notice'>The card reads [worth]. Wow, your're super rich!</span>"
else // 0.25% chance to earn 100000 credits.
user << "<span class='notice'>The card reads [worth]. YOU HIT THE JACKPOT!</span>"
worth = 50000
scratched = 1
owner_name = user.name
if(scratches_remaining <= 0)
user << "<span class='warning'>The card flashes: \"No scratches remaining!\"</span>"
return
if(next_scratch > world.time)
user << "<span class='warning'>The card flashes: \"Please wait!\"</span>"
return
next_scratch = world.time + 6 SECONDS
user << "<span class='notice'>You initiate the simulated scratch action process on the [src]...</span>"
playsound(src.loc, 'sound/items/drumroll.ogg', 50, 0, 0)
if(do_after(user,4.5 SECONDS))
var/won = 0
var/result = rand(1,10000)
if(result <= 4000) // 40% chance to not earn anything at all.
won = 0
speak("You've won: [won] CREDITS. Better luck next time!")
else if (result <= 8000) // 40% chance
won = 50
speak("You've won: [won] CREDITS. Partial winner!")
else if (result <= 9000) // 10% chance
won = 100
speak("You've won: [won] CREDITS. Winner!")
else if (result <= 9500) // 5% chance
won = 200
speak("You've won: [won] CREDITS. SUPER WINNER! You're lucky!")
else if (result <= 9750) // 2.5% chance
won = 500
speak("You've won: [won] CREDITS. MEGA WINNER! You're super lucky!")
else if (result <= 9900) // 1.5% chance
won = 1000
speak("You've won: [won] CREDITS. ULTRA WINNER! You're mega lucky!")
else if (result <= 9950) // 0.5% chance
won = 2500
speak("You've won: [won] CREDITS. ULTIMATE WINNER! You're ultra lucky!")
else if (result <= 9975) // 0.25% chance
won = 5000
speak("You've won: [won] CREDITS. ULTIMATE WINNER! You're ultra lucky!")
else if (result <= 9999) // 0.24% chance
won = 10000
speak("You've won: [won] CREDITS. ULTIMATE WINNER! You're ultra lucky!")
else ///0.01% chance
won = 25000
speak("You've won: [won] CREDITS. JACKPOT WINNER! You're JACKPOT lucky!")
scratches_remaining -= 1
worth += won
sleep(1 SECONDS)
if(scratches_remaining > 0)
user << "<span class='notice'>The card flashes: You have: [scratches_remaining] SCRATCHES remaining! Scratch again!</span>"
else
user << "<span class='notice'>The card flashes: You have: [scratches_remaining] SCRATCHES remaining! You won a total of: [worth] CREDITS. Thanks for playing the space lottery!</span>"
owner_name = user.name
/obj/item/weapon/spacecash/ewallet/lotto/proc/speak(var/message = "Hello!")
for(var/mob/O in hearers(src.loc, null))
O.show_message("<span class='game say'><span class='name'>\The [src]</span> pings, \"[message]\"</span>",2)
playsound(src.loc, 'sound/machines/ping.ogg', 50, 1, -4)
@@ -1561,7 +1561,7 @@
. = ..()
reagents.add_reagent("protein", 4)
reagents.add_reagent("msg", 2)
reagents.add_reagent("palmoil", 1)
reagents.add_reagent("sodiumchloride", 4)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/no_raisin
@@ -1578,7 +1578,6 @@
. = ..()
reagents.add_reagent("msg", 1)
reagents.add_reagent("hfcs", 1)
reagents.add_reagent("palmoil", 1)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/spacetwinkie
@@ -1611,7 +1610,7 @@
. = ..()
reagents.add_reagent("cheese", 3)
reagents.add_reagent("palmoil", 1)
reagents.add_reagent("msg", 2)
reagents.add_reagent("msg", 1)
bitesize = 2
/obj/item/weapon/reagent_containers/food/snacks/syndicake
@@ -4398,21 +4397,18 @@
/obj/item/weapon/reagent_containers/food/snacks/tastybread
name = "bread tube"
desc = "Bread in a tube. Chewy...and questionably tasty."
desc = "Bread in a tube. Chewy."
icon_state = "tastybread"
trash = /obj/item/trash/tastybread
filling_color = "#A66829"
center_of_mass = list("x"=17, "y"=16)
nutriment_desc = list("tasty bread" = 4)
nutriment_desc = list("stale bread" = 4) //NO LONGER TASTY BECAUSE OF REMOVED FLAVORINGS. ENJOY EATING STALE BREAD FUCKERS. HAHAHAHAHA.
nutriment_amt = 4
/obj/item/weapon/reagent_containers/food/snacks/tastybread/Initialize()
. = ..()
reagents.add_reagent("shortening", 1)
reagents.add_reagent("palmoil", 1)
reagents.add_reagent("sugar", 1)
reagents.add_reagent("msg", 4)
reagents.add_reagent("sodiumchloride", 2)
reagents.add_reagent("sodiumchloride", 4)
bitesize = 4
/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks
@@ -4426,7 +4422,6 @@
/obj/item/weapon/reagent_containers/food/snacks/skrellsnacks/Initialize()
. = ..()
reagents.add_reagent("shortening", 2)
bitesize = 3
/obj/item/weapon/reagent_containers/food/snacks/friedkois
@@ -4559,7 +4554,7 @@
. = ..()
reagents.add_reagent("protein", 10)
reagents.add_reagent("shortening", 1)
reagents.add_reagent("msg", 4)
reagents.add_reagent("msg", 3)
reagents.add_reagent("sodiumchloride", 3)
bitesize = 5
@@ -4589,7 +4584,7 @@
. = ..()
reagents.add_reagent("protein", 10)
reagents.add_reagent("iron", 3)
reagents.add_reagent("msg", 4)
reagents.add_reagent("msg", 5)
reagents.add_reagent("sodiumchloride", 5)
bitesize = 4