1 Screenshot

  • Sad 1



User Feedback

Recommended Comments

It didn't work, it may be the version, but it helped to understand how it worked, so I changed the code inside the original file and it worked

\data\DLC0003\scripts\prefabs\shop_pedestals.lua

change function buyer

before

local function buyer()
    local inst = common()
    inst:AddComponent("shopdispenser")
    inst:AddComponent("shopped")

    inst:ListenForEvent("daytime", function() restock(inst) end, GetWorld())
    inst:ListenForEvent("beginfiesta", function() restock(inst,true) end, GetWorld())
    inst:ListenForEvent("endfiesta", function() restock(inst,true) end, GetWorld())

    return inst
end

after

local function buyer()
    local inst = common()
    inst:AddComponent("shopdispenser")
    inst:AddComponent("shopped")

    inst:ListenForEvent("daytime", function() restock(inst) end, GetWorld())
    inst:ListenForEvent("beginfiesta", function() restock(inst,true) end, GetWorld())
    inst:ListenForEvent("endfiesta", function() restock(inst,true) end, GetWorld())
	
    inst:ListenForEvent("daycomplete", 
		function() 
		
			print("DAY_COMPLETE") 
			SoldItem(inst)
		
		end
		
	, GetWorld())
	
    return inst
end

sorry my english, i'm using google translate

Share this comment


Link to comment
Share on other sites

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