graywolf336 / CasinoSlots

Animated, customizable, block-based slot machines, including audio, inside of Minecraft!
http://dev.bukkit.org/server-mods/casino-slots/
GNU General Public License v2.0
23 stars 24 forks source link

Slots.yml not saving between restarts/reloads. #27

Closed LlmDl closed 11 years ago

LlmDl commented 11 years ago

Using 2.5.0 my slots.yml isn't being saved properly. After using /casino reload the slots lose their money and default back to a state right after they were created and had a bit of money put into their banks.

This also happened after a server restart. No errors anywhere. If it matters, they are managed slot machines.

graywolf336 commented 11 years ago

I believe I fixed it, can you test with this version? http://dev.bukkit.org/server-mods/casino-slots/files/15-casino-slots-2-5-1/

LlmDl commented 11 years ago

Using 2.5.1 the following happened.

2 Managed slots costing 20 each spin, with 500 in each slotbank.

Pull both levers, get charged 2x20. Both machines payout 70 each for 3 lapis each.

This puts both slotbanks at 450.

Use /casino reload. Both slot banks are now at 520.

graywolf336 commented 11 years ago

Okay thanks, means I forgot to have it save the file when it pays out.

LlmDl commented 11 years ago

Yeah that's what it looked like. Might want to run through the saves/edits to the files in their entirety get this all cleaned up. I feel bad for the others who are downloading 2.5.0/2.5.1.

Great work btw. If you ever want to chat join the Towny IRC.

graywolf336 commented 11 years ago

Might actually just not reload the slots.yml since there's no need to and since people shouldn't be messing with it. But yeah I agree with you and will take your suggestion, I sadly haven't even tested the managed slots as much as I should. Though that was my next plan was to go over the whole managed slots and make that experience better so players can create managed slots, have a limit of the amount they can create, and things like that. Any suggestions in this area, since it kind of seems like you use managed slots?

Thanks, will do sometime.

LlmDl commented 11 years ago

I'm actually using them in a place that could be with non-managed, but I'd rather control how much money can go into the economy via them. The hope is to eventually let players create them.

The issue with that for me is that I can't have the player creating them anywhere. I use towny and one suggestion I was going to bring up later was to do a check on the location of the slot machine during creation, and if the creator doesn't own the towny plots which contain the casino, block its creation. Similar to ChestShop's creation of shops in towny. This would only happen if the config had the towny_integration: 'true' flag enabled of course. (We can help you figure this out in the #Towny-Dev channel on irc.esper.net)

As they are now they would work just fine. I'd still include the slots.yml in the /casino reload function too. Only because it'll confuse admins who expect all the config files to be reloaded. I'm really looking forward to other towns besides my Spawn Town having casinos. It'll show off their wealth and ability to advance their town in a way that isn't a big wall or a majestic building.

One way to limit the number of slots that can be created by players would be the use of info/option/meta nodes in the permission plugins. Towny uses them to limit how many plots a rank can buy. ex:

info: casinos: '1'

graywolf336 commented 11 years ago

Okay I fixed finally (I believe) the saving of the slots.yml and the stats.yml with the most recent version. http://dev.bukkit.org/server-mods/casino-slots/files/16-casino-slots-2-5-2/ if you want to download it. My next plan is to work on the managed slots, so I'm keeping this open to remind me.

graywolf336 commented 11 years ago

@LlmDl Hate to bring you in again, but do you mind testing this for me? As I can only do limited testing and since I know how it works I want to answer questions about it so that I can put them on the update log or some page on bukkit dev. http://graywolfsolutions.com:8080/job/CasinoSlots/ is the developer downloads if you want to try it out, thanks no matter what it is a big addition and I thank you for suggesting it :)

LlmDl commented 11 years ago

I can test it for sure. I might not get to it this morning before I go to
work, but I'll give it a go tonight for sure.

On Thu, 18 Oct 2012 00:57:46 -0500, Bradley Hilton
notifications@github.com wrote:

@LlmDl Hate to bring you in again, but do you mind testing this for me?
As I can only do limited testing and since I know how it works I want to
answer >questions about it so that I can put them on the update log or
some page on bukkit dev.
http://graywolfsolutions.com:8080/job/CasinoSlots/ is the developer

downloads if you want to try it out, thanks no matter what it is a big
addition and I thank you for suggesting it :)

— Reply to this email directly or view it on GitHub.

graywolf336 commented 11 years ago

Added support for this in 2.5.5. Closing as I have uploaded the update. http://dev.bukkit.org/server-mods/casino-slots/files/17-casino-slots-2-5-5/