cc3768 / UniversalCoinsMod

Universal Coins mod for Minecraft, using Minecraft Forge.
MIT License
9 stars 5 forks source link

Players can steal money #6

Closed Radviger closed 9 years ago

Radviger commented 9 years ago

Players can steal money from Vending Block, Trade Station, and Universal ATM. On my server I'm using plugin protection system (worldguard), but anyway players can trade, but some of they takes money from trading inventory by awaiting when the buyer clicks the delivery button to take it's money. Please, fix it!

notabadminer commented 9 years ago

With the latest relase, 1.5.9, I introduced an "inUse" variable in the ATM. Only one player at a time should be able to use the ATM if it is working as intended. When I tested the functionality a couple weeks ago, it seemed to work correctly. Are you using the 1.5.9 release? I can change the Vending blocks, frames, and Trade Station to use the same behavior.

The block will then display a chat message to the player trying to open the gui while it is in use instead of allowing them to use the block at the same time.

Radviger commented 9 years ago

I'm using modified version of the mod (textures and expanded localization in source code). No, I'm using 1.5.6 version. Well, I will try to update my changes to 1.5.9 version...

Radviger commented 9 years ago

Yes, please! Change it for all machines.

notabadminer commented 9 years ago

If you can hold off for a day or two, 1.6.0 will include a few bugfixes (they are listed in the commits since Jan 29th) and I can roll in the restricted GUIs. I'll try to get it completed after work tonight.

Is there a reason you localization changes have not been committed to the main branch? Or, are they server specific modifications? This mod can use more lang support. There has also been a few comments that the textures suck. I haven't had time to work on them with all the work that has gone into adding features and fixing bugs.

Radviger commented 9 years ago

Ok, tomorrow I will try to commit my changes. They are includes modified textures and more translations In GUIs etc.. And yes, I did it for my server, but I do not mind to share with it :)

notabadminer commented 9 years ago

I just did a bunch of work on localization since the 1.5.6 release you are using. The changes include all GUI and command line stuff. Your changes are probably redundant (or mine :)).

Any help with getting this mod stable and features that support a server economy are welcome. It is open source.

notabadminer commented 9 years ago

ok. The Trade Station, Vending Blocks and frame now allow only one player at a time to use them. I have another bug I want to fix before doing an official update, but you can grab a copy to modify.

Radviger commented 9 years ago

Also i have an idea with money types: There are coin, coin stack, dollar, dollar stack and money bag. I also have textures for this types.

Radviger commented 9 years ago

Also I have new texture for vendor wrench.

Radviger commented 9 years ago

Can you make a better client-server localization compatiblity? I mean that when player connect to server, mod from client send message with player lang id (ru_RU for example) to server and all messages in chat from UC will be on russian for this player.

Radviger commented 9 years ago

Another bug: sometimes when i open vending block with wrench my client crashes with client bug that slot sizes in inventory more than exists. I fixed that by modifying Forge code at clientside with adding try/catch to getSlot method in Container.java. I'm using latest cauldron server with plugins.

Radviger commented 9 years ago

I do not understand much in java, so I can't fix this bug normally.

Radviger commented 9 years ago

Another idea: Can you make so that OP player can open other player's vending block like owner? For examle to see what items inside. And will be not bad to create inverted version of vending block that will be exchange items to money.

notabadminer commented 9 years ago

Having a client translate from say en_US to ru_RU, or zh_CH to ru_RU automatically would require a lot of work. I think it can be done using Google translate. They have a service that can do this but it's not free (https://cloud.google.com/translate/v2/pricing). The mod would take a lot of time and require money to make it work.

adding a try/catch method is the right way to handle exceptions. I will try to find the cause and see if it is avoidable. It might be something cauldron specific. I've only tested with Forge.

The 1.5.9 release includes updated Vending blocks and Vending Frames that can buy or sell.

Radviger commented 9 years ago

No, I mean that chat messages like "you do not have permission to open that at the moment", will be sent to client on its localization. Sorry for my bad English, I'am Russian :)

Radviger commented 9 years ago

This text will be given from ru-RU.lang (for example).

Radviger commented 9 years ago

If you want I can make Russian localization for next release ;)

notabadminer commented 9 years ago

Sorry for misunderstanding. A mod that translated all chat messages would be awesome though. I would finally understand the Spanish speakers on some of the servers I play on.

Anyway, an update to the Russian lang file would be great.