Jump to content

Recommended Posts

I was enjoying the weeping willow mod, and it still works mostly fine, but i was having an issue with a swamp biome containing the contents of the mod spawning in EVERY dimension. the main world where it should be, caves, ruins, and even shipwrecked.

i tried to fix it by altering some code, and now i have as follows. while i succeed in making it not spawn in caves and shipwrecked without crashing, it won't spawn in the main world either. i would appreciate some help.

 

AddTask("TheWeepingWillow", {
    locks={LOCKS.SPIDERDENS,LOCKS.TIER1},
    keys_given={KEYS.MEAT,KEYS.SILK,KEYS.SPIDERS,KEYS.TIER2},
    --locks=LOCKS.NONE,
    --keys_given=KEYS.NONE,
    room_choices={
        ["WeepingWillowRoom"] = 1,
        ["Sinkhole"] = 1,
        ["Marsh"] = 2+math.random(3), 
        ["Forest"] = math.random(3), 
        ["DeepForest"] = 1+math.random(3),
    },
    room_bg=GROUND.MARSH,
    background_room="BGMarsh",
    colour={r=.05,g=.05,b=.05,a=1}
}) 

GLOBAL.require("map/level")
local LEVELTYPE = GLOBAL.LEVELTYPE

local function AddTaskWeeping(level)
    table.insert(level.tasks, "TheWeepingWillow")
end

AddLevelPreInit("SURVIVAL_DEFAULT", AddTaskWeeping)

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...