Skip to content

Conversation

@bodhidharma420
Copy link

Includes ppfeed command (working), as well as ppfeed called automatically in onEnable (executes at startup).

I'm not sure why (excuse me, I'm new at github), but the "files changed" dialog shows a lot of stuff being added that, to my knowledge, was already there. If this is disruptive and can't be dealt with on your end, I can try to do a fresh fork and insert our bits of code again.

Also included are is as-yet-unfinished pprestore functionalities, which will eventually allow rollback of ppfeed actions. Currently, the ppfeed method creates a string that logs players freed and pearls fed, including location information about the chest in which the action occurs.

The rollback itself would involve repearling pearled players, and placing coal in chests from which it was taken. Possible edge cases are when a chest doesn't have space to store a restored pearl or coal, or when the chest itself is no longer present at that location. In all of these edge cases, I recommend a "tough shit" policy. It's a lot easier to communicate to players "You must have a chest in the same location, with empty space, in order to get your pearls/coal back" than try and code decisions about inventing chests, managing inventory to make space, etc.

What's left to code is a way of storing this string in a textfile, a manager which is able to retrieve the most recent log textfile, and an interpreter which can read the file and perform the rollback.

Freenor and others added 6 commits February 4, 2013 17:56
Added pearl costs (function "feedPearls")
Added "ppfeed" test function (from Console) for PrisonPearl Upkeep mod.
Added functionality for PrisonPearl Upkeep mod (adds a call at OnEnable()).
Adds "ppfeed" as a Console-only test-command for PrisonPearl Upkeep extension.
@pruby
Copy link

pruby commented Feb 11, 2013

Looks like this version isn't based on where it was developed. Taking a look.

@pruby
Copy link

pruby commented Feb 11, 2013

Rebased changes on to Exultant's version where they appear to have been developed, opened #16 since can't correct history here.

Ty4Code pushed a commit to Ty4Code/PrisonPearl that referenced this pull request Nov 18, 2014
Re-implement PlayerPickup fix for chunk unloaded pearls until
ChunkLoading bug is fixed.
Ty4Code pushed a commit to Ty4Code/PrisonPearl that referenced this pull request Nov 18, 2014
Re-implement PlayerPickupEvent fix for chunk unloading untill
ChunkLoading bug is fixed.
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.

3 participants