New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds slot machines. #4022
Adds slot machines. #4022
Conversation
oh wait |
Can you replace the window with one of the Black popups? (Not Nano) it's easy to add and looks a LOT nicer. |
From someone who happened to code actual slot machines, some ideas:
|
@Miauw62 you should definitely consider all of the above. If you don't want to then I will do it after this gets merged. |
I am, rock. |
Machine doesn't have an icon. |
Yeah, I noticed. |
I'm probably not going to do random "lol it's broken no money 4 u m8" stuff, though, doesn't seem very fun to me. |
I won the "big winner" tier 3 times in a row but I'm not sure if that's just BYOND RNG or something wrong with my formulas |
Should I add the last three things on that list or not? |
Skip the last three. 👍 I'll look at this now. |
whoops infinite loop they also deny coins sometimes now. |
var/initial_chance = chance | ||
while(steps > 0) | ||
if(prob(chance)) | ||
step(AM, pick(1, 2, 4, 5, 6, 8, 9, 10)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace the pick() with ALLDIRS (or was it ALL_DIRS)
Ok enough code reviewing. I cannot believe this is not a slot machine with the three rolling wheels that you have to land in a row to win; this is so lame you just click and hope you win with what seems like hardly any feedback other than "u lost" or "u win". There needs to be more to the actual UI. |
return amount | ||
|
||
/obj/machinery/slot_machine/attack_hand(mob/user) | ||
user.set_machine(src) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call and check the return result of ..(). If it is true return out of the proc, otherwise continue.
Then remove set_machine and add_fingerprint, ..() will handle that.
I'll try my best to make this a "proper" slot machine, but that's going to take a little time. |
@Miauw62 Let us get it right. I've gotten way too many jackpots last time I tested. |
playsound(src.loc, "sparks", 50, 1) | ||
|
||
/obj/machinery/slot_machine/process() | ||
money++ //SPESSH MAJICKS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a new line after this line so there's a space between the procs
making it use actual reels is a MOTHERFUCKING PAIN IN THE ASS:
|
Use text with just letters then. You can use X, O, #, 7, ! |
Slot machines have 5 reels. The symbols on the top of the reels are pushed down and new symbols are pick()ed to fill the slots on top. Normal prizes are valid on any horizontal line, jackpot is only the centre. I also included a reference to one of my all-time favorite movies. I doubt the reference will be seen EVER but oh well. |
var/list/coinvalues = list() | ||
var/list/reels = list(list("", "", ""), list("", "", ""), list("", "", ""), list("", "", ""), list("", "", "")) | ||
var/list/spinning_reels = list(0, 0, 0, 0, 0) //Faster than an associative list. | ||
//THE FONT ISNT WORKING ;-; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Useless comment.
I like the UI better than mine, I may do that for the original at some point if you don't mind. Also 👍 for giving coins a purpose besides flipping them, nice implementation considering /tg/ doesn't have an economy system like Urist. |
It's not just an UI, btw. The reels actually determine the result. |
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread() | ||
spark_system.set_up(4, 0, src.loc) | ||
spark_system.start() | ||
playsound(src.loc, "sparks", 50, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Put an
else
...()
at the end
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
ALRITE READY 2 MERGE |
What it says on the tin.
It works with coins and shit.
emagging it is top lyl and shoots the coins at you.
Probabilities and values are currently completely arbitrary, feel free to suggest changes.
This does not place them on the map.