Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Water Mod
- TUNING.BUCKET = {}
- TUNING.BUCKET.WATER_BUCKET_USES = 10
- local function CanFill(inst)
- if not inst.frozen then
- return true
- end
- return false
- end
- local function pondedit(inst)
- inst:AddComponent("filler")
- inst.components.filler:SetLiquid("water")
- inst.components.filler:SetFillTestFn(CanFill)
- inst.components.filler:SetMaxFills(90000000)
- end
- local ACTIONS = GLOBAL.ACTIONS
- local Action = GLOBAL.Action
- local FILL = Action()
- FILL.str = "Fill"
- FILL.id = "FILL"
- FILL.fn = function(act)
- if act.target and act.target.components.filler and act.invobject and act.invobject.components.fillable then
- return act.target.components.filler:Fill(act.invobject, act.doer)
- end
- end
- AddAction(FILL)
- AddStategraphActionHandler("wilson", GLOBAL.ActionHandler(FILL, "dolongaction"))
- AddPrefabPostInit("pond", pondedit, CanFill)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement