mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-30 16:48:12 +01:00
powder that makes you say yes
This commit is contained in:
@@ -1,42 +1,3 @@
|
||||
<<<<<<< HEAD:code/modules/economy/casinocash_ch.dm
|
||||
=======
|
||||
|
||||
//Original Casino Code created by Shadowfire117#1269 - Ported from CHOMPstation
|
||||
//Modified by GhostActual#2055 for use with VOREstation
|
||||
|
||||
/obj/machinery/chipmachine
|
||||
name = "Casino Chip Exchange"
|
||||
desc = "Takes all your cash and gives you chips back! No change and half refund!"
|
||||
icon = 'icons/obj/casino.dmi'
|
||||
icon_state ="chipmachine"
|
||||
anchored = 1
|
||||
|
||||
/obj/machinery/chipmachine/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/spacecash) && (I:worth >= 5))
|
||||
//consume the money
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
|
||||
user << "<span class='info'>You insert [I] into [src].</span>"
|
||||
spawn_casinochips(round(I:worth/5), src.loc)
|
||||
src.attack_hand(user)
|
||||
qdel(I)
|
||||
|
||||
if(istype(I,/obj/item/weapon/spacecasinocash))
|
||||
//consume the chips
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
|
||||
user << "<span class='info'>You insert [I] into [src].</span>"
|
||||
spawn_money(round(I:worth*5), src.loc)
|
||||
src.attack_hand(user)
|
||||
qdel(I)
|
||||
|
||||
>>>>>>> e5ae85f667... Merge pull request #13536 from Heroman3003/casino-changes:code/modules/economy/casinocash.dm
|
||||
/obj/item/weapon/spacecasinocash
|
||||
name = "broken casino chip"
|
||||
desc = "It's worth nothing in a casino."
|
||||
@@ -67,7 +28,7 @@
|
||||
h_user.drop_from_inventory(src)
|
||||
h_user.drop_from_inventory(SC)
|
||||
h_user.put_in_hands(SC)
|
||||
user << "<span class='notice'>You combine the casino chips to a stack of [SC.worth] casino credits.</span>"
|
||||
user << "<span class='notice'>You combine the casino chips to a stack of [SC.worth] credits.</span>"
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/spacecasinocash/update_icon()
|
||||
@@ -75,7 +36,7 @@
|
||||
name = "[worth] casino credit\s"
|
||||
if(worth in list(1000,500,200,100,50,20,10,1))
|
||||
icon_state = "spacecasinocash[worth]"
|
||||
desc = "It's a stack of casino chips with a combined value of [worth] casino credits."
|
||||
desc = "It's a stack of casino chips with a combined value of [worth] credits."
|
||||
return
|
||||
var/sum = src.worth
|
||||
var/num = 0
|
||||
@@ -96,7 +57,7 @@
|
||||
M.Turn(pick(-45, -27.5, 0, 0, 0, 0, 0, 0, 0, 27.5, 45))
|
||||
banknote.transform = M
|
||||
src.overlays += banknote
|
||||
src.desc = "They are worth [worth] casino credits."
|
||||
src.desc = "They are worth [worth] credits."
|
||||
|
||||
/obj/item/weapon/spacecasinocash/proc/adjust_worth(var/adjust_worth = 0, var/update = 1)
|
||||
worth += adjust_worth
|
||||
@@ -179,7 +140,7 @@
|
||||
/proc/spawn_casinochips(var/sum, spawnloc, mob/living/carbon/human/human_user as mob)
|
||||
var/obj/item/weapon/spacecasinocash/SC = new (spawnloc)
|
||||
|
||||
SC.set_worth(sum, TRUE)
|
||||
SC.set_worth(sum)
|
||||
if (ishuman(human_user) && !human_user.get_active_hand())
|
||||
human_user.put_in_hands(SC)
|
||||
return
|
||||
@@ -207,4 +168,4 @@
|
||||
else if(result == 2)
|
||||
comment = "Joker"
|
||||
user.visible_message("<span class='notice'>[user] has thrown \the [src]. It lands on [comment]! </span>", \
|
||||
"<span class='notice'>You throw \the [src]. It lands on [comment]! </span>")
|
||||
"<span class='notice'>You throw \the [src]. It lands on [comment]! </span>")
|
||||
|
||||
Reference in New Issue
Block a user