Minecolonies & Tons of Fixes

in #utopian-io6 years ago

Hi everyone, after the last run of features we come into the fixing curve again to make sure the mod has significantly more working than broken features.

Small Fixes:

One of the issues players were complaining about was that the workers who get raw food would stock the food and not dump it. It was relatively easy to fix this by only keeping food the worker can eat.

Another small thing was the crusher which had several issues.

First, he only had one skill factor, so I added an additional favor for endurance.

And, second, I messed up the order of the blocks which resulted in GRAVEL being logged in.

Another small bug was that recently it was allowed to turn off more citizens spawning, but the coder forgot to add a check which made the default false. So I had to add a check to it.

Besides that, I added that the output of a recipe is also on the "don't gather" of the dman so he only gathers it when he actually is going to deliver it somewhere.

Also fixed the recipes the stonemason accepts.

Forced the deliveryman to actuall walk to the pickup location and not perform ninja moves.

Sophia is sad to have lost her Ninja abilities.

Mob Issues:

Some people have been complaining that under certain conditions their build sites were overrun by mobs, either overnight or during the build process because it is too dark inside.

For that reason, I added two functionalities.
First of all, I added that the builder doesn't remove torches in the initial cleanup process of the land.

Then, I added that over a certain level the building purges the mobs (throws in some bottles of garlic taste rat poison).

For that, I needed a variable in the building to make sure he only does this once a day.

And write it to and from disk.

On wakeup this will then be reset.

After that, to each stage I added an extra check.

Which, for the builder, if above a certain level, kills all the mobs and then updates the variable.

Then, if so, we would check if what he is working on is a building work order and then clean the entities within it.

Long Term Desync Bug:

We had also a long term bug where certain players in multiplayer wouldn't get informed about several changes in the request system.

This happened because we would get the dirty information from the request system and reset it with this.

So, I added a way to set it dirty.

And then, I added the set dirty check only after serializing it. Besides that I improved the performance slightly by only serializing it a single time and sending the same bytes to each of the players.

Orphaned Chunks Fix:

Another thing I noticed was that orpganed chunks of colonies were not cleaned up and also caused too often.

So I added a method which allows me to debug the chunks around which have an owner to compare this with the ones which shouldn't have one.

After a bunch of debugging I noticed that this was because we were adding the central chunk multiple times.

To clean it up I added a check if a chunk is owned and would then check if the chunk is too far away of its owning colony (5 times the colony distance) and would then remove the data, mark the chunk dirty and send the data to the client side.

Also added a config option to turn this on or off depending on the necessity of the server.

Multi Dimensions Fix:

Another fix which was due for a long time was that the colonies can be placed in other dimensions besides the normal overworld. This is especially interesting for severs with different gamemodes or several worlds.

I had to fix things at several locations for that.
For once I mad sure to return false if the dimension is different than the colony dimension.

Then I changed the colonyView storage from a list to a map per dimension.

And made sure to query things accordingly.

Which was a real pain since I had to make sure that all over our code where we search for this information we include the right dimension.

And finally, I had to make sure that chunks also get populated with the colony claim.

Pull Requests:

https://github.com/ldtteam/minecolonies/pull/3332/files
https://github.com/ldtteam/minecolonies/pull/3358/files
https://github.com/ldtteam/minecolonies/pull/3378/files
https://github.com/ldtteam/minecolonies/pull/3350/files
https://github.com/ldtteam/minecolonies/pull/3356/files
https://github.com/ldtteam/minecolonies/pull/3392/files
https://github.com/ldtteam/minecolonies/pull/3391/files

Repository

https://github.com/ldtteam/minecolonies

Sort:  
  • Great article with pictures, code samples and nice explanation of choices.
  • Bug fixes are really important to usability. Good job.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you for your review, @helo! Keep up the good work!

Hi, @raycoms!

You just got a 11.71% upvote from SteemPlus!
To get higher upvotes, earn more SteemPlus Points (SPP). On your Steemit wallet, check your SPP balance and click on "How to earn SPP?" to find out all the ways to earn.
If you're not using SteemPlus yet, please check our last posts in here to see the many ways in which SteemPlus can improve your Steem experience on Steemit and Busy.

This post has been included in the latest edition of SoS Daily News - a digest of all you need to know about the State of Steem.

Hi @raycoms!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @raycoms!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!