Skip to content

[feature]: infinite duration? #3

@Beanzilla

Description

@Beanzilla

I'd like to make it so if duration is negative or zero then the priv granted is never revoked.

This would be nice as then you could purchase a priv within-game (kind of like a Rank on some Minecraft server), and have it forever.

Looking at the code, it appears that 2 things would need to be considered:

  1. Only minetest.after if the duration is greater than 5 (since you do include a 5 second notice)
  2. On buying the boost/priv no tracking should be added, as though the player had the priv in the first place (this way it doesn't get removed on logout/logoff/quit)

It looks like most of this can be obtained via within the buy_boost function, and activate_boost.

I'll make a PR of this separately to my HUD code... though actually it might collide as I'd also not want an infinite duration boost to change the HUD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions