Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
root = true

[*.{md,json,yml,yaml,py}]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
trim_trailing_whitespace = true

[*.{json,yml,yaml}]
indent_size = 2

[*.py]
indent_size = 4

[*.md]
trim_trailing_whitespace = false
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
*.cs text eol=lf diff=csharp
*.md text eol=lf
*.json text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.py text eol=lf
*.shader text eol=lf
*.cginc text eol=lf
*.hlsl text eol=lf
Expand Down
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @Moffefe
36 changes: 36 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Bug report
description: Report a problem in the game, source code or documentation.
body:
- type: markdown
attributes:
value: |
Check existing issues first. For sensitive reports, follow the [security policy](https://github.com/Moffefe/Path-Machines/blob/main/SECURITY.md).
- type: dropdown
id: area
attributes:
label: Area
options:
- Game behavior
- Source code
- Documentation
validations:
required: true
- type: textarea
id: problem
attributes:
label: What happened?
description: Describe the actual and expected behavior.
validations:
required: true
- type: textarea
id: reproduction
attributes:
label: Steps or affected files
description: Include reproduction steps or the relevant file and line. Screenshots can help.
validations:
required: true
- type: input
id: version
attributes:
label: Version or commit
description: Include the game version or source commit, if known.
5 changes: 5 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: Security reporting
url: https://github.com/Moffefe/Path-Machines/blob/main/SECURITY.md
about: Read the policy before reporting a sensitive issue.
17 changes: 17 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Feature request
description: Suggest an improvement to the game or repository.
body:
- type: textarea
id: problem
attributes:
label: What would this improve?
description: Describe the problem or use case.
validations:
required: true
- type: textarea
id: suggestion
attributes:
label: Suggested change
description: Explain the desired behavior. Add examples or alternatives if useful.
validations:
required: true
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Change

Describe the problem and the resulting behavior. Link a related issue if applicable.

## Verification

Describe the checks you ran and any remaining limitations.

- [ ] Repository checks pass: `python .github/scripts/check_repository.py`.
- [ ] The change contains no unauthorized third-party material or private data.
- [ ] Source changes include an updated manifest, or this PR only changes documentation/tooling.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
open-pull-requests-limit: 2
87 changes: 87 additions & 0 deletions .github/scripts/check_repository.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
"""Check the published source snapshot and inline local Markdown links."""

import hashlib
import json
from pathlib import Path, PurePosixPath
import re
import sys
from urllib.parse import unquote, urlsplit


ROOT = Path(__file__).resolve().parents[2]


def check_sources(root):
errors = []
try:
manifest = json.loads((root / "Docs/source-manifest.json").read_text(encoding="utf-8"))
entries = manifest["files"]
if not isinstance(entries, list):
raise ValueError("files must be a list")
if manifest["source_file_count"] != len(entries):
errors.append("Source manifest file count does not match its entries.")
listed = set()
for entry in entries:
name = entry["path"]
relative = PurePosixPath(name)
if (not name.startswith("Source/Assets/") or ".." in relative.parts
or "\\" in name or relative.as_posix() != name):
errors.append(f"Invalid source path: {name}")
continue
if name in listed:
errors.append(f"Duplicate source entry: {name}")
listed.add(name)
source = root / name
if not source.resolve().is_relative_to(root):
errors.append(f"Source path escapes the repository: {name}")
elif not source.is_file():
errors.append(f"Missing source file: {name}")
elif hashlib.sha256(source.read_bytes()).hexdigest() != entry["sha256"]:
errors.append(f"Source hash mismatch: {name}")
actual = {
file.relative_to(root).as_posix()
for file in (root / "Source/Assets").rglob("*") if file.is_file()
}
for name in sorted(actual - listed):
errors.append(f"Source file missing from manifest: {name}")
except (OSError, ValueError, KeyError, TypeError) as error:
errors.append(f"Invalid source manifest: {error}")
return errors


def check_links(root):
errors = []
# The repository uses inline Markdown links; remote URLs and anchors are excluded.
link_pattern = re.compile(r"!?\[[^\]\n]*\]\((<[^>]+>|[^\s)]+)(?:\s+\"[^\"]*\")?\)")
for document in sorted(root.rglob("*.md")):
if any(part in {".git", ".venv", "node_modules"} for part in document.relative_to(root).parts):
continue
contents = document.read_text(encoding="utf-8")
contents = re.sub(r"```.*?```", "", contents, flags=re.DOTALL)
for match in link_pattern.finditer(contents):
target = match.group(1).strip("<>")
url = urlsplit(target)
if url.scheme or url.netloc or not url.path:
continue
destination = (document.parent / unquote(url.path)).resolve()
name = document.relative_to(root).as_posix()
if not destination.is_relative_to(root):
errors.append(f"Link escapes the repository in {name}: {target}")
elif not destination.exists():
errors.append(f"Broken local link in {name}: {target}")
return errors


def main():
errors = check_sources(ROOT) + check_links(ROOT)
if errors:
print("Repository checks failed:", file=sys.stderr)
for error in errors:
print(f"- {error}", file=sys.stderr)
return 1
print("Source manifest and local Markdown links are valid.")
return 0


if __name__ == "__main__":
sys.exit(main())
28 changes: 28 additions & 0 deletions .github/workflows/repository-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Repository checks

on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:

permissions:
contents: read

concurrency:
group: repository-checks-${{ github.ref }}
cancel-in-progress: true

jobs:
repository-checks:
name: Source integrity and documentation
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Verify source manifest and local links
run: python3 .github/scripts/check_repository.py
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ Desktop.ini
.idea/
*.user
*.tmp
__pycache__/
*.py[cod]
.venv/
9 changes: 9 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Code of conduct

Be respectful and keep discussions focused on Path Machines.

- Give constructive feedback about the work, not personal attacks.
- Do not post harassment, discrimination, threats, spam or another person's private information.
- Respect different experience levels and communicate in good faith.

The maintainer may edit or remove inappropriate content, close discussions or restrict participation. Use GitHub's **Report content** option to report abuse without repeating sensitive material publicly.
19 changes: 19 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Contributing

Bug reports, ideas and small, focused pull requests are welcome. Search existing issues before opening a new one; discuss larger changes first.

- For bugs, include the affected file or screen, expected behavior and steps to reproduce. Add a commit or game version when available.
- Keep pull requests focused and describe how you checked the change.
- Include only material you have permission to submit. Do not add third-party assets, libraries, save files or credentials.

This repository contains original source code and screenshots, not a runnable Unity project. Gameplay changes need validation in the complete development project before acceptance.

From the repository root, run with Python 3.9 or newer:

```sh
python .github/scripts/check_repository.py
```

The check verifies source hashes and local documentation links; it does not build or test the game. When updating a source snapshot, refresh the paths, SHA-256 hashes, file count and revision in [source-manifest.json](Docs/source-manifest.json).

See the [code of conduct](CODE_OF_CONDUCT.md), [security policy](SECURITY.md) and [license](LICENSE). Public availability does not grant an open-source license.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

**A procedural 3D runner built with Unity and C#.**

[![Repository checks](https://github.com/Moffefe/Path-Machines/actions/workflows/repository-checks.yml/badge.svg?branch=main)](https://github.com/Moffefe/Path-Machines/actions/workflows/repository-checks.yml)

Guide a customizable machine through gardens, basements and living rooms. Avoid obstacles, collect resources and unlock new machines and accessories.

**Unity 2023.2.15f1 · C# · Windows x86_64 · Mouse, keyboard and gamepad**
Expand Down Expand Up @@ -52,4 +54,4 @@ Built-in Render Pipeline, Addressables, Input System, Localization, uGUI/TextMes

Developed by [Moffefe](https://github.com/Moffefe). The game is in active development.

[Credits](CREDITS.md) · [License](LICENSE)
[Contributing](CONTRIBUTING.md) · [Credits](CREDITS.md) · [License](LICENSE)
9 changes: 9 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Security

Security fixes are considered for the current source snapshot on `main`. This repository does not distribute game binaries or maintain separate supported release branches.

Do not post exploit details, credentials, personal data or private save files in public issues.

If **Report a vulnerability** is available under the repository's **Security > Advisories** tab, use it to submit a private report. Otherwise, open an issue titled **Private security contact requested**, without technical details, and wait for the maintainer to arrange a private channel before sharing them.

Ordinary gameplay bugs and documentation errors can use the bug report template.