CivClassic / Citadel

A Minecraft plugin to protect your chests and builds using in-game materials. Requires an attacker to break each block a certain number of times. Built for Paper 1.16.5
BSD 3-Clause "New" or "Revised" License
1 stars 21 forks source link

Add localised reinforcement decay. #87

Closed okx-code closed 11 months ago

okx-code commented 3 years ago

Closes #56

wingzero54 commented 3 years ago

I didn't see a config option for decay time, does it utilize the global_decay_timer and global_decay_multiplier that are currently in the config?

okx-code commented 3 years ago

Yes, it uses those values. It just changes the last activity time.

okx-code commented 3 years ago

bump

wingzero54 commented 3 years ago

A couple config comments: Can you add a config option for using the local decay, or defaulting back to the global decay? So this version of Citadel can be maintained with the feature even if users don't want to have local decay.

Also, does this just work on top of the global decay? As in, does this local decay just have the opportunity to update the decay time earlier than the global decay? Just checking to see if you can seamlessly switch between the local and global

okx-code commented 3 years ago

Yeah you can switch betwen local and global seamlessly as long as you set the activity-default option to the current time (unix seconds). This default is used when the group has been active after the default time but not entered the area yet.

You can also disable local decay entirely by having it enabled on no worlds:

activity-map-worlds: []
wingzero54 commented 3 years ago

Will the activity-default override all current group decay? For example, there are groups which are currently decayed. Will enabling this with activity-default set to now cause currently decayed groups to be reset to not decayed?

okx-code commented 3 years ago

No, the activity-default is used if a player on a group has not entered an area yet but a player on said group has logged in past the activity-default timestamp. If nobody on the group has logged in since the time set by activity-default, their last activity time is used.

wingzero54 commented 2 years ago

I tested and if you add this code and set activity-map-worlds: [] so it's 'disabled' it will still make the decay localized