Commit Graph

16 Commits

Author SHA1 Message Date
BONNe1704 9681494c1c Fix issue with wrongly applied world name lowercasing.
It looks like, exist plugins that keep capital letters in world names. That mean, it is not correct to lowercasing any id's.
To fix it, now, instead of lowercasing, challenges should be case insensitive.
2019-07-24 13:43:29 +03:00
BONNe ca5ff504f0 Add protection code in TryToComplete task, to avoid negative numbers in max completion times. 2019-06-16 20:46:12 +03:00
BONNe a7f9e01d61 Fix issue when unstackable items flood challenge description (#135) 2019-06-16 15:57:05 +03:00
BONNe1704 413429a091 Merge remote-tracking branch 'origin/develop' into develop 2019-05-16 10:30:46 +03:00
BONNe1704 9704ed32aa Fix issue when IslandTypeChallenges required blocks were cleared if completion was uncessesfull.
The issue was that it cleared wrong map. It must clear priority queue, but cleared required elements.
2019-05-16 10:30:01 +03:00
BONNe 3521495739 Fix issue when entities has not been removed on challenge completion (#118).
I forgot to populate entity queue :(
2019-05-14 09:55:34 +03:00
BONNe1704 6c10fcdca9 Fix NPE when opening ChallengesGUI (#116).
Add code that removes challenges level from all its challenges, if level is deleted.
Add protection code that shows admins that something is not correct if challenge level is not in database.
2019-05-09 11:22:01 +03:00
BONNe c8088f275d
Rework TryToComplete. (#109)
* Rework TryToComplete.

Implement ability to complete challenge multiple times at once.
To do it, I split everything in checking/removing/rewarding steps.

In checking step, it calculates if it is possible to complete with minimal requirements and then calculates maximal repeating factor.
In removing step, it removes everything that is necessary.
In rewarding step, it give rewards by necessary factor (multilayer).

I rework item/block/entity removing as factors may be influenced at the last element, so I improve everything by memory usage. Create necessary sets/lists/queues for faster access to already collected items.

* Add method that returns removed items, if somehow algorithm did not manage to remove all items.
Fix issue when removeItems method did not merge ItemStacks as they had different item amount.

Return and fix TryToCompleteTest.

* Implement Multiple Challenge Completion command and GUI. (#73)

/[gamemode] challenges complete [number] allows to complete challenges [number] amount (or less if not enough items)
Via GUI users can right click on challenge and if it is repeatable, then it will open AnvilGUI that accepts only numbers as input.
2019-05-06 12:10:02 +03:00
BONNe d60f20e394 Fix issue when Color codes did not work in opened Panels and Titles (#110)
These text element colors were not translated correctly.
Now it should work.
2019-05-04 11:16:41 +03:00
BONNe b24f7ebcb0 Implement title messages on first challenge/level completion (#108).
Add settings option that can enable/disable title message and its length.
Add ability to edit these settings via admin GUI.
Add ability to use some variables in title and subtitle in translation files.
2019-05-01 22:57:24 +03:00
BONNe 13faf478ee Use player BoundingBox to simplify code, instead of creating new boundingBox from player location. 2019-04-24 07:03:09 +03:00
BONNe 3b8b7129ad Fix issue when players could complete ISLAND type challenges near island border and complete, if outside border are required blocks. 2019-04-23 19:54:39 +03:00
BONNe e33db6ef29 Fix issue when users were able to complete Challenges with less items than required (#101).
This issue happens because there were an issue with detecting if enough items are in player inventory. Each new required item stack forgets abouts previous founding.
Also it marked challenge as completed after items were failed to remove.
2019-04-01 10:14:31 +03:00
BONNe ba5c972e5f Fix issue when Island and Other type challenges were not marked as completed. 2019-03-05 10:30:58 +02:00
BONNe 62189f0052 Merge flags into development build. 2019-02-22 19:47:36 +02:00
BONNe1704 7bb2ad09d3 Move TryToComplete from panel Package to tasks package. 2019-02-19 19:58:06 +02:00