{"id":19786552,"url":"https://github.com/mdrokz/screeps-haxe","last_synced_at":"2026-05-11T13:05:56.542Z","repository":{"id":103774906,"uuid":"334029416","full_name":"mdrokz/screeps-haxe","owner":"mdrokz","description":"haxe extern types for game screeps.","archived":false,"fork":false,"pushed_at":"2021-07-11T09:20:45.000Z","size":128,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-28T13:59:56.187Z","etag":null,"topics":["externals","game","haxe","javascript","library","macros","meta-programming","screeps","screeps-game","typedefs","typescript"],"latest_commit_sha":null,"homepage":"","language":"Haxe","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mdrokz.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-01-29T03:42:38.000Z","updated_at":"2024-02-11T08:53:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"772d4f22-aed9-4d87-bf24-4d656e7a68a1","html_url":"https://github.com/mdrokz/screeps-haxe","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdrokz/screeps-haxe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdrokz%2Fscreeps-haxe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdrokz%2Fscreeps-haxe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdrokz%2Fscreeps-haxe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdrokz%2Fscreeps-haxe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdrokz","download_url":"https://codeload.github.com/mdrokz/screeps-haxe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdrokz%2Fscreeps-haxe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32895984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-10T13:40:02.631Z","status":"online","status_checked_at":"2026-05-11T02:00:05.975Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["externals","game","haxe","javascript","library","macros","meta-programming","screeps","screeps-game","typedefs","typescript"],"created_at":"2024-11-12T06:18:38.565Z","updated_at":"2026-05-11T13:05:56.534Z","avatar_url":"https://github.com/mdrokz.png","language":"Haxe","funding_links":[],"categories":[],"sub_categories":[],"readme":"# screeps-haxe\nhaxe extern types for game screeps.\n\n# Credits\n\ncredits to https://github.com/screepers/typed-screeps for typed definitions, the extern types are based on this.\n\n# Installation\n\n```haxelib install screeps-extern 0.0.4```\n\n# Info \n\n1. everything is in the screeps namespace\n\n2. for Globals do import screeps.Globals.*;\n\n3. most of the functions have returns types as EitherTypes so you have to specify the correct return type, for example - filter function in room.find should be like this ```filter: (x:Source) -\u003e {return false} -- explicitly specifying Source type because of EitherType```\n\n4. refer to the examples directory for proper usage\n\n\n# Usage\n\nin your main class you should have @:expose metadata and a function named loop that will run in screeps.\n\n\n* Main.hx\n```\nimport screeps.Globals.Work;\nimport screeps.Source;\nimport screeps.Game;\nimport screeps.Globals.Find.*;\nimport screeps.Globals.BodyPart.*;\n\n\n@:expose\nclass Main {\n\tstatic public function init() {\n\t}\n\n\tstatic public function loop() {\n\t\tvar spawn = Game.spawns['Spawn1'];\n\n\t\tvar sources = spawn.room.find(FIND_SOURCES, {\n\t\t\tfilter: (x:Source) -\u003e {\n\t\t\t\treturn x.pos.findInRange(FIND_HOSTILE_STRUCTURES, 3).length == 0;\n\t\t\t}\n\t\t});\n  }\n  \n}\n\n```\n\n* main.js\n\n```\nconst init = require(\"./out\").Main.init;\nconst loop = require(\"./out\").Main.loop;\n\ninit();\n\nexports.loop = loop\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdrokz%2Fscreeps-haxe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdrokz%2Fscreeps-haxe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdrokz%2Fscreeps-haxe/lists"}