A few thoughts

This mod is probably dead at this point, but:

  • I'm also seeing the exception posted by others, but can't figure out what causes it
  • I did find a likely bug in `CanCraft()`: The first `if()` should probably have parentheses around the OR'd `itemid` checks
  • It might be nice if this allowed timed unlock of Tier 1 as well, to encourage folks to visit Outpost/Bandit early on
  • `twinfo` shows unlock status but not times - would be nice to see time(s) until unlock(s)
  • It would be nice if this were to provide some kind of explicit UI feedback to the user when trying to craft a locked-out workbench - a lock symbol or greyed-out icon in the crafting menus, or a message, or something
  • It might be nice if this were to broadcast a server-wide announcement on unlock, since it's kind of a big deal

Update: I've started hacking on this myself...not sure if there's a process for taking over an abandoned mod or not.

Stuff I've been able to address so far:

  • Fixed `CanCraft()` to return either `null` or `false` per https://umod.org/guides/development/contributing-hooks
    • Edit: Nevermind, this isn't working - need to look into it more.
  • Tier 1 timed lockout support
  • (WIP) Message player when attempting to craft a locked-out workbench
    • This was partially implemented, but likely abandoned due to the fact that `CanCraft()` apparently gets called twice. May try to implement a per-player timed lockout or something.
  • (WIP) Announce status to player on join
  • (WIP) Announce status periodically (or possibly check periodically and announce if state changes are detected

Okay, I've pretty much completely overhauled this mod to address everything I could think of. I should probably release it, but I'm not sure what the process is.

Highlights:

  • Supports all 3 workbenches.
  • Each workbench can be set to always locked, always unlocked, or to unlock on a given number of seconds after start of wipe.
  • Defaults to unlocking tier 1 at 24 hours, tier 2 at 48 hours, and tier 3 at 72 hours.
  • Pending unlocks are announced to players on connect, and broadcast globally at 5 minute intervals.
  • Elapsed unlocks are broadcast globally.
  • User-facing unlock times remaining are reported in D:hh:mm:ss format.
  • `twinfo` reports current seconds since wipe, and per-workbench unlock status and seconds remaining (or -1 for always locked).
  • Time remaining or always-locked status is reported to user when attempting to craft a locked-out item (with a hack to prevent double messages - could still be improved).
  • `twreset` command added to reset lockout times to defaults.
  • Last wipe time recorded as UTC instead of local time, which avoids any timezone weirdness.