Source code for simvx.core.branding

"""SimVX branding gate.

The free SimVX engine displays a "Made with SimVX" splash or watermark. That branding is the
condition of the Game-Distribution Exception (``LICENSE-EXCEPTION.md``): it is required only when a
developer relies on that exception to ship a non-AGPL (closed-source) game. Developers who instead
license their game under the AGPL, or who hold a commercial licence, are not required to display it.

Attribution itself is satisfied by shipping the ``NOTICE`` file (AGPL §7(b)); it does not require any
on-screen notice or "about" screen.

Producing an unbranded build is deliberately a **two-step** process; neither step alone has effect:

  1. Hand-edit the source constant ``ENABLE_UNBRANDED`` below to ``True``. It is a source change
     (not a config/env setting), so it is explicit and shows up in version control.
  2. Pass the ``--unbranded`` flag (``unbranded=True``) at run/build time.

    !!! READ BEFORE SETTING ENABLE_UNBRANDED = True !!!
    Removing SimVX branding without the right to do so (a commercial licence, or shipping your game
    under the AGPL) may breach the SimVX licence and trademark policy. Read first:
      - LICENSE-ADDENDUM.md    attribution / no-trademark terms
      - LICENSE-EXCEPTION.md   game-distribution exception (the branding condition)
      - TRADEMARK.md           Official SimVX branding policy
      - COMMERCIAL-LICENSE.md  when a commercial licence is required
"""

# Set True ONLY after reading the legal documents named in this module's docstring.
# Intentionally a source constant, not a runtime/config/env setting, so that producing an unbranded
# build is a deliberate, version-controlled change.
ENABLE_UNBRANDED = False

# The removable branding shown on the free tier under the Game-Distribution Exception.
SPLASH_TEXT = "Made with SimVX"

# The attribution credit. Attribution is satisfied by the NOTICE file; this string is the credit
# rendered on the splash/watermark and anywhere a credit is displayed.
ATTRIBUTION_CREDIT = "Powered by SimVX. © 2026 Gabriel Bouffard. https://simvx.com"


[docs] def unbranded_allowed(unbranded_flag: bool) -> bool: """Whether an unbranded build is permitted this run. Returns ``True`` only when BOTH gate steps are satisfied: the source constant ``ENABLE_UNBRANDED`` is ``True`` *and* the caller passed the ``--unbranded`` flag. """ return ENABLE_UNBRANDED and unbranded_flag
[docs] def show_splash(unbranded_flag: bool = False) -> bool: """Whether the "Made with SimVX" splash/watermark should be displayed this run.""" return not unbranded_allowed(unbranded_flag)