Skip to content
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

Issue#71 Naturally reinforced blocks #72

Merged
merged 6 commits into from
Oct 19, 2012
Merged

Issue#71 Naturally reinforced blocks #72

merged 6 commits into from
Oct 19, 2012

Conversation

erocs
Copy link
Contributor

@erocs erocs commented Oct 18, 2012

Added the ability to configure reinforcement per material types for blocks
generated across the map. This reinforcement is different than player
reinforced blocks as it is done automatically in the DAO cache when a
block of a configured material type is first broken. This type of
reinforcement does NOT get saved to the database.

The configuration is simple:

  hardenedMaterials:
    IRON_ORE: 3
    DIAMOND_ORE: 10

This configuration would cause Iron Ore blocks to require breaking 3 times
before they actually broke. As you can guess, the second material defined
here would cause diamond ore to require 10 breaks.

I will add that the Reinforcement class should be refactored into
IReinforcement, PlayerReinforcement, and EnvironmentalReinforcement so
that this type of reinforcement, with how it is added here, isn't as
kludgey in the code.

http://www.erocs.org/~erocs/Citadel_i71.jar

anovak and others added 4 commits September 6, 2012 02:04
(not X123, just 123).
Damage values are not supported.

This is mostly for enabling items from mods to be used as reinforcement
materials, as those don't show up in the Materials enum.
Encoding issue with my build environment?
Added the ability to configure reinforcement per material types for blocks
 generated across the map. This reinforcement is different than player
 reinforced blocks as it is done automatically in the DAO cache when a
 block of a configured material type is first broken. This type of
 reinforcement does NOT get saved to the database.

The configuration is simple:
  hardenedMaterials:
    IRON_ORE: 3
    DIAMOND_ORE: 10
This configuration would cause Iron Ore blocks to require breaking 3 times
 before they actually broke. As you can guess, the second material defined
 here would cause diamond ore to require 10 breaks.

I will add that the Reinforcement class should be refactored into
 IReinforcement, PlayerReinforcement, and EnvironmentalReinforcement so
 that this type of reinforcement, with how it is added here, isn't as
 kludgey in the code.
@ttk2
Copy link
Collaborator

ttk2 commented Oct 18, 2012

I guess persistence can wait for Reddis which will probably handle it better.

Anyways I am trying to get this tested but it seems out testing server is down due to power failure, I should be able to get it back up by the end of the day but in the meantime we will just have to wait.

If issue #62 was resolved I could test it live on Civtest, which was somthing of my intention from the beginning.

Regardless I hope to have this tested in at least a cursory manner by the end of the day and live tested as soon as issue #62 is ready. Reward will come after putting it live and not exploding, I don't do that because I doubt your coding but there is something about Minecraft where large live servers will find errors that never came up in weeks of very through testing.

@erocs
Copy link
Contributor Author

erocs commented Oct 18, 2012

I didn't believe that persistence for these natural reinforcement types made sense to start. Only when the break count for the block type causes tens of minutes to fully break would it become sensible to persist. For lower values, if the reinforcement resets the player isn't out that much time. It might even be good to reset the reinforcement after a bit of time (just by disassociating it from the block). This cuts down on persisted data volume and complexity.

Let me know if you see any issues. As per the change description, some of it isn't as clean as I would ultimately want. Last night was my first trip into Bukkit/Citadel though so I wanted to get a bit of feedback before doing more. It was working in my server. I didn't try but I believe reinforce placing a naturally reinforced block type shouldn't cause a problem, which is my only concern at the moment.

"... there is something about Minecraft where large live servers will find errors that never came up in weeks of very through testing." As with any sufficiently complex server. ;) No worries about the reward as I plan on just 'donating' it back to the server.

@erocs
Copy link
Contributor Author

erocs commented Oct 19, 2012

Merged Interfect's changes and modified my configuration parsing to match. Haven't tested yet.

http://www.erocs.org/~erocs/Citadel_i71_interfect.jar

@ttk2
Copy link
Collaborator

ttk2 commented Oct 19, 2012

Sweet, lets get this show on the road. Your changes are live on both the Civtest and the testing server, submit another pull request for interfects changes and we can launch Civtest very soon. Also what is your email? We do a lot of dev communication with that and I want to be able to reach you.

ttk2 added a commit that referenced this pull request Oct 19, 2012
Issue#71 Naturally reinforced blocks
@ttk2 ttk2 merged commit 4ad8ee6 into Exultant:master Oct 19, 2012
@ttk2
Copy link
Collaborator

ttk2 commented Oct 19, 2012

See issue #74 for the bugs in that last build Erocs

@erocs
Copy link
Contributor Author

erocs commented Oct 19, 2012

This did in fact merge both Interfects and my changes.

@ttk2
Copy link
Collaborator

ttk2 commented Oct 19, 2012

So your saying that this merge request include both Interfects changes and natural reinforcement? If so awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants