Jump to content

Crabby Hermit Shop doesn't give trinkets


MP98
  • Fixed

The crabby hermit does not add the trinkets (hermitshop_winter_ornament_boss_hermithouse and hermitshop_winter_ornament_boss_pearl) to the trade (RECIPETABS.HERMITCRABSHOP) because of an error in checking for the event in recipes.lua 

Upon removing this line "if IsSpecialEventActive(SPECIAL_EVENTS.WINTERS_FEAST) then ... end" the recipe is visible again.

I suspect this is due to the fact that recipes load in before special event can be properly checked, and once the event is actually on, the recipe.lua has already executed and the if check will not hold.

Everything else works as intended because in hermitcrab.lua:OnLoadPostPass the tackle container (supertacklecontainer) is visible in creative mode, however, the only 2 recipes that aren't visible are the 2 trinkets.

Thank you.

 

Edit: further testing revealed that IsSpecialEventActive indeed returns false when testing events even if winter_feast is active.

Steps:

  1. Start a world with winter feast activated
  2. add the following to recipes.lua 
    TheNet:SystemMessage(tostring(IsSpecialEventActive("winters_feast")), false)
  3. Check server_chat_log.txt
  4. it prints 
    Quote

    [00:00:04]: [System Message] false

So this proves that the events don't change from "none" until after the recipes.lua is loaded, which is too late.


Steps to Reproduce

Steps to reproduce:

  1. Start a new world in winters feast event
  2. Give yourself all recipes (creative mode)
  3. Under Bottle Exchange, Spectackler Box is visible
  4. The 2 Sentimental Adornments are not visible

Steps to fix:

  1. Edit recipe.lua and remove line 580 containing 
    if IsSpecialEventActive(SPECIAL_EVENTS.WINTERS_FEAST) then
  2. Remove corresponding `end` tag
  3. repeat steps 1-3 of reproduce
  4. Adornments are now visible!
  • Like 1



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...