diff --git a/code/game/machinery/roulette_machine.dm b/code/game/machinery/roulette_machine.dm index 098cd5ea3868..fd6129c21bb4 100644 --- a/code/game/machinery/roulette_machine.dm +++ b/code/game/machinery/roulette_machine.dm @@ -20,7 +20,7 @@ ///Machine that lets you play roulette. Odds are pre-defined to be the same as European Roulette without the "En Prison" rule /obj/machinery/roulette name = "Roulette Table" - desc = "A computerized roulette table. Swipe your ID to play or register yourself as owner!" + desc = "A computerized roulette table. Swipe your cash card to play or register yourself as the owner!" icon = 'icons/obj/machines/roulette.dmi' icon_state = "idle" density = TRUE @@ -213,11 +213,11 @@ audible_message("The result is: [result]") playing = FALSE - update_icon(potential_payout, color, rolled_number, is_winner) + update_icon(ALL, potential_payout, color, rolled_number, is_winner) handle_color_light(color) if(!is_winner) - audible_message("You lost! Better luck next time") + audible_message("You lost! Better luck next time!") playsound(src, 'sound/machines/synth_no.ogg', 50) return FALSE @@ -403,7 +403,7 @@ /obj/item/roulette_wheel_beacon name = "roulette wheel beacon" - desc = "N.T. approved roulette wheel beacon, toss it down and you will have a complementary roulette wheel delivered to you." + desc = "An N.T.-approved roulette wheel beacon. Toss it down, and a complementary roulette wheel will be delivered to you." icon = 'icons/obj/objects.dmi' icon_state = "floor_beacon" var/used @@ -412,6 +412,7 @@ if(used) return loc.visible_message("\The [src] begins to beep loudly!") + playsound(get_turf(src), 'sound/machines/click.ogg', 50, TRUE) used = TRUE addtimer(CALLBACK(src, PROC_REF(launch_payload)), 40) diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm index 2038612c2791..e48d1e289d0b 100644 --- a/code/game/machinery/slotmachine.dm +++ b/code/game/machinery/slotmachine.dm @@ -2,6 +2,8 @@ | Slot Machines | | Original code by Glloyd | | Tgstation port by Miauw | +| Shiptest adjustments by | +| Flopppi | \*******************************/ #define SPIN_PRICE 5 @@ -11,8 +13,6 @@ #define SPIN_TIME 65 //As always, deciseconds. #define REEL_DEACTIVATE_DELAY 7 #define SEVEN "7" -#define CASH 1 -#define COIN 2 /obj/machinery/computer/slot_machine name = "slot machine" @@ -31,9 +31,6 @@ var/working = 0 var/balance = 0 //How much money is in the machine, ready to be CONSUMED. var/jackpots = 0 - var/paymode = CASH //toggles between CASH/COIN, defined above - var/cointype = /obj/item/coin/iron //default cointype - var/list/coinvalues = list() var/list/reels = list(list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0, list("", "", "") = 0) var/list/symbols = list(SEVEN = 1, "&" = 2, "@" = 2, "$" = 2, "?" = 2, "#" = 2, "!" = 2, "%" = 2) //if people are winning too much, multiply every number in this list by 2 and see if they are still winning too much. @@ -51,10 +48,6 @@ INVOKE_ASYNC(src, PROC_REF(toggle_reel_spin), FALSE) - for(cointype in typesof(/obj/item/coin)) - var/obj/item/coin/C = cointype - coinvalues["[cointype]"] = initial(C.value) - /obj/machinery/computer/slot_machine/Destroy() if(balance) give_payout(balance) @@ -82,45 +75,13 @@ /obj/machinery/computer/slot_machine/attackby(obj/item/I, mob/living/user, params) - if(istype(I, /obj/item/coin)) - var/obj/item/coin/C = I - if(paymode == COIN) - if(prob(2)) - if(!user.transferItemToLoc(C, drop_location(), silent = FALSE)) - return - C.throw_at(user, 3, 10) - if(prob(10)) - balance = max(balance - SPIN_PRICE, 0) - to_chat(user, "[src] spits your coin back out!") - - else - if(!user.temporarilyRemoveItemFromInventory(C)) - return - to_chat(user, "You insert [C] into [src]'s slot!") - balance += C.value - qdel(C) - else - to_chat(user, "This machine is only accepting cash!") - else if(istype(I, /obj/item/spacecash/bundle)) - if(paymode == CASH) - var/obj/item/spacecash/bundle/H = I - if(!user.temporarilyRemoveItemFromInventory(H)) - return - to_chat(user, "You insert [H.value] credits into [src]'s! slot") - balance += H.value - qdel(H) - else - to_chat(user, "This machine is only accepting coins!") - else if(I.tool_behaviour == TOOL_MULTITOOL) - if(balance > 0) - visible_message("[src] says, 'ERROR! Please empty the machine balance before altering paymode'") //Prevents converting coins into holocredits and vice versa - else - if(paymode == CASH) - paymode = COIN - visible_message("[src] says, 'This machine now works with COINS!'") - else - paymode = CASH - visible_message("[src] says, 'This machine now works with CASH!'") + if(istype(I, /obj/item/spacecash/bundle)) + var/obj/item/spacecash/bundle/H = I + if(!user.temporarilyRemoveItemFromInventory(H)) + return + to_chat(user, "You insert [H.value] credits into [src]'s slot!") + balance += H.value + qdel(H) else return ..() @@ -149,7 +110,7 @@ else dat = {"Five credits to play!
- Prize Money Available: [money] (jackpot payout is ALWAYS 100%!)
+ Prize Money Available: [money] (Jackpot payout is ALWAYS 100%!)
Credit Remaining: [balance]
[plays] players have tried their luck today, and [jackpots] have won a jackpot!


@@ -158,7 +119,7 @@ [reeltext]
"} if(balance > 0) - dat+="Refund balance
" + dat+="Refund Balance
" var/datum/browser/popup = new(user, "slotmachine", "Slot Machine") popup.set_content(dat) @@ -259,17 +220,11 @@ if(reels[1][2] + reels[2][2] + reels[3][2] + reels[4][2] + reels[5][2] == "[SEVEN][SEVEN][SEVEN][SEVEN][SEVEN]") visible_message("[src] says, 'JACKPOT! You win [money] credits!'") - priority_announce("Congratulations to [user ? user.real_name : usrname] for winning the jackpot at the slot machine in [get_area(src)]!") jackpots += 1 balance += money - give_payout(JACKPOT) money = 0 - if(paymode == CASH) - new /obj/item/spacecash/bundle(loc,JACKPOT) - else - for(var/i = 0, i < 5, i++) - cointype = pick(subtypesof(/obj/item/coin)) - var/obj/item/coin/C = new cointype(loc) - random_step(C, 2, 50) + + new /obj/item/spacecash/bundle(loc,JACKPOT) else if(linelength == 5) visible_message("[src] says, 'Big Winner! You win a thousand credits!'") @@ -313,37 +268,21 @@ balance += surplus /obj/machinery/computer/slot_machine/proc/give_payout(amount) - if(paymode == CASH) - cointype = /obj/item/spacecash/bundle - else - cointype = obj_flags & EMAGGED ? /obj/item/coin/iron : /obj/item/coin/silver - if(!(obj_flags & EMAGGED)) - amount = dispense(amount, cointype, null, 0) + amount = dispense(amount, null, 0) else var/mob/living/target = locate() in range(2, src) - amount = dispense(amount, cointype, target, 1) + amount = dispense(amount, target, 1) return amount -/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, cointype = /obj/item/coin/silver, mob/living/target, throwit = 0) - if(paymode == CASH) - var/obj/item/spacecash/bundle/H = new /obj/item/spacecash/bundle(loc, amount) - - if(throwit && target) - H.throw_at(target, 3, 10) - else - var/value = coinvalues["[cointype]"] +/obj/machinery/computer/slot_machine/proc/dispense(amount = 0, mob/living/target, throwit = 0) + var/obj/item/spacecash/bundle/H = new /obj/item/spacecash/bundle(loc, amount) - while(amount >= value) - var/obj/item/coin/C = new cointype(loc) //DOUBLE THE PAIN - amount -= value - if(throwit && target) - C.throw_at(target, 3, 10) - else - random_step(C, 2, 40) + if(throwit && target) + H.throw_at(target, 3, 10) return amount @@ -353,5 +292,3 @@ #undef BIG_PRIZE #undef SMALL_PRIZE #undef SPIN_PRICE -#undef CASH -#undef COIN diff --git a/tgui/packages/tgui/interfaces/MiningVendor.js b/tgui/packages/tgui/interfaces/MiningVendor.js index 3d35dc4433a1..700ee05d2df9 100644 --- a/tgui/packages/tgui/interfaces/MiningVendor.js +++ b/tgui/packages/tgui/interfaces/MiningVendor.js @@ -19,9 +19,9 @@ export const MiningVendor = (props, context) => { )) || ( - No registered ID card! + No registered cash card!
- Please contact your local HoP! + Please contact your local bank!
)} diff --git a/tgui/packages/tgui/interfaces/Roulette.js b/tgui/packages/tgui/interfaces/Roulette.js index 53a59a92d197..257da13098ad 100644 --- a/tgui/packages/tgui/interfaces/Roulette.js +++ b/tgui/packages/tgui/interfaces/Roulette.js @@ -352,7 +352,7 @@ export const RouletteBetTable = (props, context) => { - Swipe an ID card with a connected account to spin! + Swipe a cash card with a connected account to spin! diff --git a/tgui/packages/tgui/interfaces/Vending.js b/tgui/packages/tgui/interfaces/Vending.js index b46d1b46c5d7..e9a316eb7868 100644 --- a/tgui/packages/tgui/interfaces/Vending.js +++ b/tgui/packages/tgui/interfaces/Vending.js @@ -123,9 +123,9 @@ export const Vending = (props, context) => { )) || ( - No registered ID card! + No registered cash card!
- Please contact your local HoP! + Please contact your local bank!
)}