Skip to content

Conversation

@adriengivry
Copy link
Member

@adriengivry adriengivry commented Feb 10, 2025

Description

This rework will allow us to plug-in any type of scripting backend, such as Python!

  • Added generic TScript and TScriptEngine classes, that can be implemented through template specialization.
  • Updated the asset browser and relevant code to make sure hardcoded extensions aren't used anywhere. Valid extensions are now returned by each implementation of TScriptEngine.

Review Guidance

Tested with Lua and a new "Dummy" scripting backend (.ovscript), which does nothing, but you can still create scripts and add them as behaviour.

To-Do

Related Issues

Fixes #296

@adriengivry adriengivry added QoL Quality of Life : Something that can improve users productivity Feature Refactoring Something that needs a refactoring labels Feb 10, 2025
@adriengivry adriengivry self-assigned this Feb 10, 2025
@adriengivry adriengivry marked this pull request as draft February 10, 2025 22:43
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch 2 times, most recently from f04ad88 to aacf055 Compare February 11, 2025 19:26
@adriengivry adriengivry changed the title [WIP] Reworked the scripting system to be fully agnostic Reworked the scripting system to be fully agnostic Feb 11, 2025
@adriengivry adriengivry marked this pull request as ready for review February 11, 2025 21:46
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch from 6b74459 to 2abd81f Compare February 12, 2025 17:57
@adriengivry adriengivry changed the base branch from develop to main February 14, 2025 15:30
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch 2 times, most recently from 8157d97 to 6580b00 Compare February 15, 2025 19:05
@adriengivry adriengivry force-pushed the feature/agnostic_scripting_backend branch from 6580b00 to 2eb0276 Compare February 15, 2025 20:44
@adriengivry adriengivry marked this pull request as draft February 15, 2025 23:32
@adriengivry adriengivry marked this pull request as ready for review February 16, 2025 00:08
@litelawliet litelawliet self-requested a review February 16, 2025 13:28
Copy link
Contributor

@litelawliet litelawliet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A regression appaeared, the cursor still appears in Play Mode and doesn't allow us to move around or turn around anymore due to monitor constraints.

@adriengivry
Copy link
Member Author

Fixed issue where OnAwake was called twice and OnStart wasn't at all

@adriengivry adriengivry merged commit 1cf3f8a into main Feb 16, 2025
1 check passed
@adriengivry adriengivry deleted the feature/agnostic_scripting_backend branch February 16, 2025 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

QoL Quality of Life : Something that can improve users productivity Refactoring Something that needs a refactoring

Development

Successfully merging this pull request may close these issues.

Abstract the ScriptInterpreter to allow for multiple implementations (Lua, Python, C#)

4 participants