local camsrv = lgs.CameraSrv
local objsrv = lgs.ObjectSrv
local linksrv = lgs.LinkSrv
local linktsrv = lgs.LinkToolsSrv
local darkinvsrv = lgs.DarkInvSrv

function TurnOn(msg)
	camsrv.StaticAttach(script.objid)
	-- local a = objsrv.Create(objsrv.Named('Marker'))
	-- objsrv.SetName(a,'TemporaryContainer')
	-- for b in linksrv.GetAll('Contains',objsrv.Named('Player'),0) do
		-- local des,src,flv = linktsrv.LinkGet(b)
		-- linksrv.Destroy(b)
		-- linksrv.Create('Contains',objsrv.Named('TemporaryContainer'),des)
	-- end
	return true
end

function TurnOff(msg)
	camsrv.ForceCameraReturn(script.objid)
	-- if objsrv.Exists(objsrv.Named('TemporaryContainer')) then
		-- for b in linksrv.GetAll('Contains',objsrv.Named('TemporaryContainer'),0) do
			-- local des,src,flv = linktsrv.LinkGet(b)
			-- linksrv.Destroy(b)
			-- linksrv.Create('Contains',objsrv.Named('Player'),des)
		-- end
		-- objsrv.Destroy(objsrv.Named('TemporaryContainer'))
	-- end
	return true
end

function PhysExit(msg)
	linksrv.BroadcastOnAllLinks(script.objid,'TurnOff','ControlDevice')
	return true
end