# Licensing

Copyright © 2026 JagermeisterTW aka Jagermeister

This repository uses a mixed-license model. The license for one category does
not replace, restrict, or expand the license for another category. When a file
contains material from more than one category, each portion remains under its
applicable terms.

## A. General original Jagermeister engine and editor code

Original Jagermeister code outside the TileShapes scope defined below, and for
which JagermeisterTW controls the necessary rights, is licensed under the
**Mozilla Public License Version 2.0 (MPL 2.0)**.

The complete, unmodified license is in [`licenses/MPL-2.0.txt`](licenses/MPL-2.0.txt).

The following notice applies to that source code:

> This Source Code Form is subject to the terms of the Mozilla Public License,
> v. 2.0. If a copy of the MPL was not distributed with this file, You can
> obtain one at https://mozilla.org/MPL/2.0/.

Copyright © 2026 JagermeisterTW aka Jagermeister

Subject to the exclusions in this document, the MPL scope includes original
project-specific code and documentation in:

- `index.html`;
- `css/`;
- `ui/`;
- `src/`, except the TileShapes paths listed in section B;
- `tools/`, except TileShapes tests listed in section B and Teeworlds-derived
  portions identified in section D;
- the local launcher scripts; and
- original project documentation.

MPL 2.0 permits commercial and noncommercial use. Its file-level conditions,
including source availability for distributed modifications to covered files,
apply according to the official license text.

## B. Original TileShapes code

Original TileShapes code for which JagermeisterTW controls the necessary
rights is source-available under the **PolyForm Noncommercial License 1.0.0**.

Required Notice: Copyright © 2026 JagermeisterTW aka Jagermeister

The complete, unmodified license is in
[`licenses/POLYFORM-NONCOMMERCIAL-1.0.0.txt`](licenses/POLYFORM-NONCOMMERCIAL-1.0.0.txt).

The TileShapes scope is:

- `src/editor/shapes/ShapeDrawTool.js`;
- `src/editor/shapes/ShapePhysics.js`;
- `src/editor/shapes/MovableRapier2DBackend.js`;
- `src/game/ShapeCollision.js`;
- `tools/check_tile_shape_*.mjs`;
- `tools/check_tile_floor_stability_regression.mjs`;
- `tools/check_square_shape_corner_regression.mjs`;
- `tools/check_character_floor_push_regression.mjs`;
- `tools/check_autoslide_downhill_regression.mjs`; and
- `tools/check_autoslide_release_uphill_regression.mjs`.

This scope includes original TileShapes-specific modifications made within
those files. It excludes Rapier, Teeworlds-derived material, and all other
third-party portions, which retain their own licenses.

PolyForm permits use, study, testing, research, experimentation, modification,
noncommercial forks, and noncommercial distribution as provided by its terms.
Commercial use of original TileShapes code requires separate permission from
JagermeisterTW. That permission may be granted without charge or through a
commercial agreement. See [`TILESHAPES_LICENSE.md`](TILESHAPES_LICENSE.md) and
[`COMMERCIAL_LICENSE.md`](COMMERCIAL_LICENSE.md).

## C. Contributor code

Each contributor retains copyright ownership of their original Contribution.
Accepted Contributions are incorporated under the non-exclusive
[`CONTRIBUTOR_LICENSE_AGREEMENT.md`](CONTRIBUTOR_LICENSE_AGREEMENT.md).

Unless separately agreed in writing:

- contributions to MPL-covered files are made available to the community
  under MPL 2.0;
- contributions to TileShapes-covered files are made available to the
  community under PolyForm Noncommercial 1.0.0; and
- the CLA permits JagermeisterTW to include accepted original Contributions in
  separately licensed commercial versions.

Contributor copyright notices and meaningful credit must be preserved.

## D. Teeworlds-derived code

Code copied or adapted from Teeworlds remains under the applicable Teeworlds
zlib-style license. Neither MPL nor PolyForm adds restrictions to that upstream
code. See [`licenses/TEEWORLDS-ZLIB.txt`](licenses/TEEWORLDS-ZLIB.txt).

Files requiring source-level classification are listed in
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md). Listing a file for review
does not assert that its entire contents are copied. Original portions can use
the applicable Jagermeister license, while upstream portions retain zlib.

## E. Teeworlds assets

Teeworlds-derived artwork, audio, skins, maps, map resources, textures, fonts,
and other content retain their upstream licenses. Official Teeworlds `data`
and `datasrc` content, except separately licensed material, is published under
CC BY-SA 3.0. See [`licenses/CC-BY-SA-3.0.txt`](licenses/CC-BY-SA-3.0.txt) and
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md).

## F. Other third-party material

Other libraries, assets, fonts, and code remain under their respective
licenses and notices. They are not relicensed under MPL or PolyForm. See
[`THIRD_PARTY_NOTICES.md`](THIRD_PARTY_NOTICES.md) and licenses stored beside
vendored components.

## G. Commercial licensing

The MPL-covered general engine and editor code may be used commercially under
MPL 2.0 without separate permission, subject to that license's conditions.

Commercial use of original TileShapes code requires a separate written
license or permission from JagermeisterTW. JagermeisterTW may grant that
permission for free or under negotiated commercial terms, and can license only
rights JagermeisterTW owns or is authorized to license.

## Disclaimer

The governing licenses include their own warranty and liability provisions.
The following notice supplements, but does not alter, those terms:

THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS
OR IMPLIED. USE OF THE SOFTWARE IS AT THE USER'S OWN RISK.

TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW, THE AUTHORS, COPYRIGHT
HOLDERS AND CONTRIBUTORS SHALL NOT BE LIABLE FOR DAMAGES ARISING FROM THE USE,
MISUSE, MODIFICATION, DISTRIBUTION OR INABILITY TO USE THE SOFTWARE.

NO GUARANTEE IS MADE REGARDING AVAILABILITY, RELIABILITY, SECURITY,
COMPATIBILITY, PERFORMANCE, ABSENCE OF BUGS, PRESERVATION OF DATA, SUITABILITY
FOR PRODUCTION OR MULTIPLAYER SERVERS, OR CONTINUED DEVELOPMENT OR
MAINTENANCE.

Nothing in this notice excludes liability that applicable law does not permit
to be excluded.

