Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for cross-language mixins using MixinScript (aka MultiScript) #92

Merged
merged 30 commits into from
Jun 22, 2021

Commits on Jun 14, 2021

  1. Resurrect MultiScript

    WIP: based on commit 15bce7f75f0dfab9863db5d4c7a51f5fc96fdb89 in Godot.
    Xrayez committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    00039cb View commit details
    Browse the repository at this point in the history
  2. Make MultiScript compile in Godot 3.x

    Seems to work at runtime as well!
    Xrayez committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    200b93b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    7713869 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e936bea View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4e4b257 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    55d1733 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    17eee35 View commit details
    Browse the repository at this point in the history
  8. Rename MultiScript files to use snake_case

    Consistent with `visual_script` module.
    Xrayez committed Jun 14, 2021
    Configuration menu
    Copy the full SHA
    2d466f7 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e2af127 View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2021

  1. Configuration menu
    Copy the full SHA
    26b4a33 View commit details
    Browse the repository at this point in the history
  2. Rename MultiScript to MixinScript

    Renamed `MultiScriptOwner` to `Mixin` respectively.
    
    See https://stackoverflow.com/questions/925609/mixins-vs-traits
    Xrayez committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    5fc0490 View commit details
    Browse the repository at this point in the history
  3. Add MixinScript editor icon

    [ci skip]
    Xrayez committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    e0ba0db View commit details
    Browse the repository at this point in the history
  4. Slightly improve MixinScript editor icon

    [ci skip]
    Xrayez committed Jun 15, 2021
    Configuration menu
    Copy the full SHA
    57874bf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    ac51150 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2021

  1. Add main_script property to MixinScript

    Nodes extended with `MixinScript` are not very useful unless they have ability to be edited just like any other script from other languages.
    Xrayez committed Jun 16, 2021
    Configuration menu
    Copy the full SHA
    4a2c986 View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2021

  1. Automatically switch to main script while editing MixinScript

    This introduces `MixinScriptEditor` with the purpose of handling script editing. The editor will delegate script editing to other editors that handle `main_script`, if it's valid.
    Xrayez committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    902bf80 View commit details
    Browse the repository at this point in the history
  2. Document MixinScript

    [ci skip]
    Xrayez committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    7ce0357 View commit details
    Browse the repository at this point in the history
  3. Add "Attach Main Script" button in MixinScriptEditor

    Allows to conveniently attach main script to `MixinScript`. The complexity here is that we cannot use regular mechanism of attaching scripts, because usually scripts are attached to nodes, not scripts!
    Xrayez committed Jun 17, 2021
    Configuration menu
    Copy the full SHA
    cd2e832 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2021

  1. Add editor inspector plugin for MixinScript

    Allows to manually switch to mixin script editor when main script is edited automatically.
    Xrayez committed Jun 18, 2021
    Configuration menu
    Copy the full SHA
    9696b05 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5a3c4ab View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2021

  1. Configuration menu
    Copy the full SHA
    742a362 View commit details
    Browse the repository at this point in the history
  2. Unexpose script_ properties in MixinScript

    Those are not useful anymore, and they are limited to the number of letters. There's `MixinScriptEditor` which allows to edit `MixinScript` now.
    Xrayez committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    87fe605 View commit details
    Browse the repository at this point in the history
  3. Rename scripts to mixins throughout MixinScript API

    Makes everything more consistent.
    Xrayez committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    c43fd88 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7408698 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    31bb157 View commit details
    Browse the repository at this point in the history
  6. Instantiate Mixin object per main instance

    Unfortunately, we cannot provide overrides for arbitrary instances.
    However, the real object is still available to all mixins via `owner`
    property.
    Xrayez committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    a264e74 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    57425d0 View commit details
    Browse the repository at this point in the history
  8. Replace ERR_PRINTS to ERR_PRINT

    They are identical, and the former is removed in Godot 3.x.
    Xrayez committed Jun 19, 2021
    Configuration menu
    Copy the full SHA
    31708ff View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    ee0526a View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2021

  1. Remove main_script property from MixinScript

    Since there's no way to make arbitrary instances to use base types other than `Mixin`, there's not much benefit in disntinguishing between the "main" script and "mixins".
    
    However, the first script added to `MixinScript` will be treated as the "main" one, in the sense that script editing is going to be automatically delegated to the first script.
    
    This greatly simplifies both the core and the editor.
    Xrayez committed Jun 22, 2021
    Configuration menu
    Copy the full SHA
    613889b View commit details
    Browse the repository at this point in the history