{"action":"created","comment":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/40223656","id":40223656,"diff_hunk":"@@ -0,0 +1,437 @@\n+var utilitiesScript = Script.resolvePath(\"../libraries/utils.js\");\n+Script.include(utilitiesScript);\n+\n+var resetKey = \"resetMe\";\n+\n+HIFI_PUBLIC_BUCKET = \"http://s3.amazonaws.com/hifi-public/\";\n+\n+var shouldDeleteOnEndScript = false;\n+\n+\n+//Before creating anything, first search a radius and delete all the things that should be deleted\n+deleteAllToys();\n+\n+createAllToys();\n+\n+\n+\n+function createAllToys() {\n+    createBlocks({\n+        x: 548.3,\n+        y: 495.55,\n+        z: 504.4\n+    });\n+\n+    createSprayCan({\n+        x: 549.12,\n+        y: 495.55,\n+        z: 503.77\n+    });\n+\n+    createBasketBall({\n+        x: 548.1,\n+        y: 497,\n+        z: 504.6\n+    });\n+\n+    createDoll({\n+        x: 545.9,\n+        y: 496,\n+        z: 506.2\n+    });\n+\n+    createWand({\n+        x: 546.45,\n+        y: 495.63,\n+        z: 506.18\n+    });\n+\n+    createDice();\n+\n+    createFlashlight({\n+        x: 546,\n+        y: 495.65,\n+        z: 506.1\n+    });\n+\n+    //Handles toggling of all sconce lights \n+    createLightSwitch({\n+        x: 543.27764892578125,\n+        y: 495.67999267578125,\n+        z: 511.00564575195312\n+    });\n+}\n+\n+function deleteAllToys() {\n+    var entities = Entities.findEntities(MyAvatar.position, 100);\n+\n+    entities.forEach(function(entity) {\n+        //params: customKey, id, defaultValue\n+        var shouldReset = getEntityCustomData(resetKey, entity, {}).resetMe;\n+        if (shouldReset === true) {\n+            Entities.deleteEntity(entity);\n+        }\n+    })\n+}\n+\n+function createFlashlight(position) {\n+    var scriptURL = Script.resolvePath('../toys/flashlight/flashlight.js');\n+    var modelURL = \"https://hifi-public.s3.amazonaws.com/models/props/flashlight.fbx\";\n+\n+    var flashlight = Entities.addEntity({\n+        type: \"Model\",\n+        modelURL: modelURL,\n+        name: \"flashlight\",\n+        script: scriptURL,\n+        position: position,\n+        dimensions: {\n+            x: 0.08,\n+            y: 0.30,\n+            z: 0.08\n+        },\n+        collisionsWillMove: true,\n+        gravity: {\n+            x: 0,\n+            y: -3.5,\n+            z: 0\n+        },\n+        velocity: {\n+            x: 0,\n+            y: -.01,\n+            z: 0\n+        },\n+        shapeType: 'box',\n+    });\n+\n+    setEntityCustomData(resetKey, flashlight, {\n+        resetMe: true\n+    });","path":"examples/toybox/masterResetEntity.js","position":108,"original_position":108,"commit_id":"99dc5a51273ec78c49c7c35e5a61c4d1f0b6f58c","original_commit_id":"99dc5a51273ec78c49c7c35e5a61c4d1f0b6f58c","user":{"login":"ZappoMan","id":2093195,"avatar_url":"https://avatars.githubusercontent.com/u/2093195?v=3","gravatar_id":"","url":"https://api.github.com/users/ZappoMan","html_url":"https://github.com/ZappoMan","followers_url":"https://api.github.com/users/ZappoMan/followers","following_url":"https://api.github.com/users/ZappoMan/following{/other_user}","gists_url":"https://api.github.com/users/ZappoMan/gists{/gist_id}","starred_url":"https://api.github.com/users/ZappoMan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ZappoMan/subscriptions","organizations_url":"https://api.github.com/users/ZappoMan/orgs","repos_url":"https://api.github.com/users/ZappoMan/repos","events_url":"https://api.github.com/users/ZappoMan/events{/privacy}","received_events_url":"https://api.github.com/users/ZappoMan/received_events","type":"User","site_admin":false},"body":"coding standard - 4.2.8 Multi-line statements must have all n+1 lines indented at least one level (four spaces). Align all n+2 lines with the indentation of the n+1 line.","created_at":"2015-09-23T16:15:49Z","updated_at":"2015-09-23T16:15:49Z","html_url":"https://github.com/highfidelity/hifi/pull/5841#discussion_r40223656","pull_request_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5841","_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments/40223656"},"html":{"href":"https://github.com/highfidelity/hifi/pull/5841#discussion_r40223656"},"pull_request":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5841"}}},"pull_request":{"url":"https://api.github.com/repos/highfidelity/hifi/pulls/5841","id":45434225,"html_url":"https://github.com/highfidelity/hifi/pull/5841","diff_url":"https://github.com/highfidelity/hifi/pull/5841.diff","patch_url":"https://github.com/highfidelity/hifi/pull/5841.patch","issue_url":"https://api.github.com/repos/highfidelity/hifi/issues/5841","number":5841,"state":"open","locked":false,"title":"DO NOT MERGE- Toybox master reset script","user":{"login":"ericrius1","id":908702,"avatar_url":"https://avatars.githubusercontent.com/u/908702?v=3","gravatar_id":"","url":"https://api.github.com/users/ericrius1","html_url":"https://github.com/ericrius1","followers_url":"https://api.github.com/users/ericrius1/followers","following_url":"https://api.github.com/users/ericrius1/following{/other_user}","gists_url":"https://api.github.com/users/ericrius1/gists{/gist_id}","starred_url":"https://api.github.com/users/ericrius1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericrius1/subscriptions","organizations_url":"https://api.github.com/users/ericrius1/orgs","repos_url":"https://api.github.com/users/ericrius1/repos","events_url":"https://api.github.com/users/ericrius1/events{/privacy}","received_events_url":"https://api.github.com/users/ericrius1/received_events","type":"User","site_admin":false},"body":"This script is a work in progress master reset client script for toys in the toybox\r\n\r\nCurrently script resets the spray paint can, blocks, and basketball on the toybox table","created_at":"2015-09-18T17:56:32Z","updated_at":"2015-09-23T16:15:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f9fc98eca638a7a894b0878abd81834b125ec727","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5841/commits","review_comments_url":"https://api.github.com/repos/highfidelity/hifi/pulls/5841/comments","review_comment_url":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/highfidelity/hifi/issues/5841/comments","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/99dc5a51273ec78c49c7c35e5a61c4d1f0b6f58c","head":{"label":"ericrius1:toybox","ref":"toybox","sha":"99dc5a51273ec78c49c7c35e5a61c4d1f0b6f58c","user":{"login":"ericrius1","id":908702,"avatar_url":"https://avatars.githubusercontent.com/u/908702?v=3","gravatar_id":"","url":"https://api.github.com/users/ericrius1","html_url":"https://github.com/ericrius1","followers_url":"https://api.github.com/users/ericrius1/followers","following_url":"https://api.github.com/users/ericrius1/following{/other_user}","gists_url":"https://api.github.com/users/ericrius1/gists{/gist_id}","starred_url":"https://api.github.com/users/ericrius1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericrius1/subscriptions","organizations_url":"https://api.github.com/users/ericrius1/orgs","repos_url":"https://api.github.com/users/ericrius1/repos","events_url":"https://api.github.com/users/ericrius1/events{/privacy}","received_events_url":"https://api.github.com/users/ericrius1/received_events","type":"User","site_admin":false},"repo":{"id":33081860,"name":"hifi","full_name":"ericrius1/hifi","owner":{"login":"ericrius1","id":908702,"avatar_url":"https://avatars.githubusercontent.com/u/908702?v=3","gravatar_id":"","url":"https://api.github.com/users/ericrius1","html_url":"https://github.com/ericrius1","followers_url":"https://api.github.com/users/ericrius1/followers","following_url":"https://api.github.com/users/ericrius1/following{/other_user}","gists_url":"https://api.github.com/users/ericrius1/gists{/gist_id}","starred_url":"https://api.github.com/users/ericrius1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ericrius1/subscriptions","organizations_url":"https://api.github.com/users/ericrius1/orgs","repos_url":"https://api.github.com/users/ericrius1/repos","events_url":"https://api.github.com/users/ericrius1/events{/privacy}","received_events_url":"https://api.github.com/users/ericrius1/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ericrius1/hifi","description":"Open, decentralized virtual worlds using sensors to control avatars and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":true,"url":"https://api.github.com/repos/ericrius1/hifi","forks_url":"https://api.github.com/repos/ericrius1/hifi/forks","keys_url":"https://api.github.com/repos/ericrius1/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ericrius1/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ericrius1/hifi/teams","hooks_url":"https://api.github.com/repos/ericrius1/hifi/hooks","issue_events_url":"https://api.github.com/repos/ericrius1/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/ericrius1/hifi/events","assignees_url":"https://api.github.com/repos/ericrius1/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/ericrius1/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/ericrius1/hifi/tags","blobs_url":"https://api.github.com/repos/ericrius1/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ericrius1/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ericrius1/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/ericrius1/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ericrius1/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/ericrius1/hifi/languages","stargazers_url":"https://api.github.com/repos/ericrius1/hifi/stargazers","contributors_url":"https://api.github.com/repos/ericrius1/hifi/contributors","subscribers_url":"https://api.github.com/repos/ericrius1/hifi/subscribers","subscription_url":"https://api.github.com/repos/ericrius1/hifi/subscription","commits_url":"https://api.github.com/repos/ericrius1/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/ericrius1/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/ericrius1/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/ericrius1/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/ericrius1/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/ericrius1/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ericrius1/hifi/merges","archive_url":"https://api.github.com/repos/ericrius1/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ericrius1/hifi/downloads","issues_url":"https://api.github.com/repos/ericrius1/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/ericrius1/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/ericrius1/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/ericrius1/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ericrius1/hifi/labels{/name}","releases_url":"https://api.github.com/repos/ericrius1/hifi/releases{/id}","created_at":"2015-03-29T17:21:39Z","updated_at":"2015-05-04T23:40:14Z","pushed_at":"2015-09-22T22:55:52Z","git_url":"git://github.com/ericrius1/hifi.git","ssh_url":"git@github.com:ericrius1/hifi.git","clone_url":"https://github.com/ericrius1/hifi.git","svn_url":"https://github.com/ericrius1/hifi","homepage":"","size":177400,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"highfidelity:master","ref":"master","sha":"00e0523872fbfcf0d2e6caf26fdcd771809f341a","user":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"repo":{"id":5372872,"name":"hifi","full_name":"highfidelity/hifi","owner":{"login":"highfidelity","id":1565370,"avatar_url":"https://avatars.githubusercontent.com/u/1565370?v=3","gravatar_id":"","url":"https://api.github.com/users/highfidelity","html_url":"https://github.com/highfidelity","followers_url":"https://api.github.com/users/highfidelity/followers","following_url":"https://api.github.com/users/highfidelity/following{/other_user}","gists_url":"https://api.github.com/users/highfidelity/gists{/gist_id}","starred_url":"https://api.github.com/users/highfidelity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highfidelity/subscriptions","organizations_url":"https://api.github.com/users/highfidelity/orgs","repos_url":"https://api.github.com/users/highfidelity/repos","events_url":"https://api.github.com/users/highfidelity/events{/privacy}","received_events_url":"https://api.github.com/users/highfidelity/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/highfidelity/hifi","description":"Open source software for shared virtual worlds using HMDs and dynamically assigned devices as servers.  San Francisco based startup, we are hiring: http://highfidelity.com/jobs  Documentation at http://docs.highfidelity.com  Contribute by reporting bugs & doing jobs on http://worklist.net","fork":false,"url":"https://api.github.com/repos/highfidelity/hifi","forks_url":"https://api.github.com/repos/highfidelity/hifi/forks","keys_url":"https://api.github.com/repos/highfidelity/hifi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highfidelity/hifi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highfidelity/hifi/teams","hooks_url":"https://api.github.com/repos/highfidelity/hifi/hooks","issue_events_url":"https://api.github.com/repos/highfidelity/hifi/issues/events{/number}","events_url":"https://api.github.com/repos/highfidelity/hifi/events","assignees_url":"https://api.github.com/repos/highfidelity/hifi/assignees{/user}","branches_url":"https://api.github.com/repos/highfidelity/hifi/branches{/branch}","tags_url":"https://api.github.com/repos/highfidelity/hifi/tags","blobs_url":"https://api.github.com/repos/highfidelity/hifi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highfidelity/hifi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highfidelity/hifi/git/refs{/sha}","trees_url":"https://api.github.com/repos/highfidelity/hifi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highfidelity/hifi/statuses/{sha}","languages_url":"https://api.github.com/repos/highfidelity/hifi/languages","stargazers_url":"https://api.github.com/repos/highfidelity/hifi/stargazers","contributors_url":"https://api.github.com/repos/highfidelity/hifi/contributors","subscribers_url":"https://api.github.com/repos/highfidelity/hifi/subscribers","subscription_url":"https://api.github.com/repos/highfidelity/hifi/subscription","commits_url":"https://api.github.com/repos/highfidelity/hifi/commits{/sha}","git_commits_url":"https://api.github.com/repos/highfidelity/hifi/git/commits{/sha}","comments_url":"https://api.github.com/repos/highfidelity/hifi/comments{/number}","issue_comment_url":"https://api.github.com/repos/highfidelity/hifi/issues/comments{/number}","contents_url":"https://api.github.com/repos/highfidelity/hifi/contents/{+path}","compare_url":"https://api.github.com/repos/highfidelity/hifi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highfidelity/hifi/merges","archive_url":"https://api.github.com/repos/highfidelity/hifi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highfidelity/hifi/downloads","issues_url":"https://api.github.com/repos/highfidelity/hifi/issues{/number}","pulls_url":"https://api.github.com/repos/highfidelity/hifi/pulls{/number}","milestones_url":"https://api.github.com/repos/highfidelity/hifi/milestones{/number}","notifications_url":"https://api.github.com/repos/highfidelity/hifi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highfidelity/hifi/labels{/name}","releases_url":"https://api.github.com/repos/highfidelity/hifi/releases{/id}","created_at":"2012-08-10T18:26:22Z","updated_at":"2015-09-23T12:53:39Z","pushed_at":"2015-09-23T15:52:30Z","git_url":"git://github.com/highfidelity/hifi.git","ssh_url":"git@github.com:highfidelity/hifi.git","clone_url":"https://github.com/highfidelity/hifi.git","svn_url":"https://github.com/highfidelity/hifi","homepage":"","size":237839,"stargazers_count":307,"watchers_count":307,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":178,"mirror_url":null,"open_issues_count":57,"forks":178,"open_issues":57,"watchers":307,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5841"},"html":{"href":"https://github.com/highfidelity/hifi/pull/5841"},"issue":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/5841"},"comments":{"href":"https://api.github.com/repos/highfidelity/hifi/issues/5841/comments"},"review_comments":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5841/comments"},"review_comment":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/highfidelity/hifi/pulls/5841/commits"},"statuses":{"href":"https://api.github.com/repos/highfidelity/hifi/statuses/99dc5a51273ec78c49c7c35e5a61c4d1f0b6f58c"}}}}