{"id":18481476,"url":"https://github.com/basselin/impactjs-cheat-codes","last_synced_at":"2025-05-13T19:36:33.982Z","repository":{"id":13963382,"uuid":"16663840","full_name":"basselin/impactjs-cheat-codes","owner":"basselin","description":":black_joker: CheatCodes is a simple plugin that can make cheat codes easily in ImpactJS during the game.","archived":false,"fork":false,"pushed_at":"2014-02-25T18:49:16.000Z","size":155,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-16T21:19:29.639Z","etag":null,"topics":["cheat-codes","game","impactjs","javascript"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/basselin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-02-09T09:40:09.000Z","updated_at":"2024-12-31T03:24:02.000Z","dependencies_parsed_at":"2022-09-01T15:31:41.404Z","dependency_job_id":null,"html_url":"https://github.com/basselin/impactjs-cheat-codes","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basselin%2Fimpactjs-cheat-codes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basselin%2Fimpactjs-cheat-codes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basselin%2Fimpactjs-cheat-codes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/basselin%2Fimpactjs-cheat-codes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/basselin","download_url":"https://codeload.github.com/basselin/impactjs-cheat-codes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254013775,"owners_count":21999464,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cheat-codes","game","impactjs","javascript"],"created_at":"2024-11-06T12:23:55.644Z","updated_at":"2025-05-13T19:36:33.962Z","avatar_url":"https://github.com/basselin.png","language":"JavaScript","readme":"# Make Cheat Codes in your ImpactJS game\n\nCheatCodes is a simple plugin that can make cheat codes easily in ImpactJS during the game.\n\n\n## Usage\n\n### First example\nCopy **cheat-codes.js** to your **lib/plugins/** directory.\n\nEdit **lib/game/main.js** :\n```javascript\nig.module( \n\t'game.main'\n)\n.requires(\n\t// ... ,\n\t'plugins.cheat-codes',\n\t// ...\n)\n.defines(function(){\n\t\n\tMyGame = ig.Game.extend({\n\t\t// ...\n\t\tcheats: new ig.CheatCodes(),\n\t\t// ...\n\t\tinit: function() {\n\t\t\t\n\t\t\t// All weapons !\n\t\t\tthis.cheats.addCode('IDKFQ',\n\t\t\t\t[ ig.KEY.I, ig.KEY.D, ig.KEY.K, ig.KEY.F, ig.KEY.Q ],\n\t\t\t\tfunction() {\n\t\t\t\t\tig.game.myEntityPlayer.weaponBullets = 99999;\n\t\t\t\t});\n\t\t\t\n\t\t\t// ...\n\t\t},\n\t\t// ...\n\t});\n\t\n});\n```\n\n### Cheat code for single use\n```javascript\n\tthis.cheats.addCode('IDDAD',\n\t\t[ig.KEY.I, ig.KEY.D, ig.KEY.D, ig.KEY.A, ig.KEY.D],\n\t\tfunction() {\n\t\t\tthis.cheats.removeCode( 'IDDAD' );\n\t\t\t// Your code for this cheat\n\t\t});\n```\n\n## Documentation\n\n### Methods\n* **addCode**: Add a cheat code.\n\t* *name*: `String` Name of cheat.\n\t* *keys*: `Array` Array of keys. See: `ig.KEY.`.\n\t* *success*: `Function` Attach a function when the code is correct. The value of `ig.game` provided for the call to `success`.\n* **removeCode**: Remove a cheat code.\n\t* *name*: `String` Name of cheat.\n* **removeAllCodes**: Remove all the cheat codes.\n\n\n## Changelog\n\n**Version 1.0.1**\n* Optimization\n\n**Version 1.0**\n* First commit\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasselin%2Fimpactjs-cheat-codes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbasselin%2Fimpactjs-cheat-codes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbasselin%2Fimpactjs-cheat-codes/lists"}