theRAPTLab / gsgo

GEM-STEP Foundation repo migrated from GitLab June 2023
1 stars 1 forks source link

MAJOR UPDATE: Feature Refactor - [merged] #708

Closed benloh closed 1 year ago

benloh commented 2 years ago

Merges dev-bl/feat-simplify -> dev-next

THIS WILL BREAK SCRIPTS!

In order to simplify student use of features, we are converting most common feature calls to featProp references. Because these include some fundamental changes to the way Features are structured, we are not supporting backward-compatibility -- there's too much room for inadvertent interactions and we want to actively remove the old methods.

Costume

Physics

Movement

Population

The Population feature has a small set of commonly used props and methods, and a larger set of expert props and methods. We're leaving these alone for the most part. A rewrite would be rather involved and deeply affect Moth scripts. The simple solution is to move most props and methods to the faded "expert" selection and leave a few of the more common props and methods more visible.

Improved student support will mostly be in Script Cookbook and Script Reference rewrites.

Vision

The whole Vision feature is an advanced feature. We'll move it to the faded expert section and leave the props and methods.

Cursor

The Cursor feature is also an advanced feature. We could make a case that it should not appear and be editable at all, but Cursor itself needs to be visible so students can enable it as a feature. The Cursor feature wizard-editable has no properties or methods.

Under the Hood

featProp error management

Because of the changes to feature methods and properties, it's easy to end up with bad scripts. Currently the system is blindly catching errors to enable users to still load and update bad projects, but the error catching is not providing very useful feedback. So featProp has some temporary error management to better report problem lines, e.g. if there is a reference to a non-existent feature property.

benloh commented 2 years ago

added 5 commits

Compare with previous version

benloh commented 2 years ago

added 1 commit

Compare with previous version

benloh commented 2 years ago

marked this merge request as ready

benloh commented 2 years ago

@jdanish I think this is ready for testing/conversion.

benloh commented 2 years ago

added 2 commits

Compare with previous version

benloh commented 2 years ago

added 3 commits

Compare with previous version

benloh commented 2 years ago

@jdanish I've pushed the Movement prop fixes up too. Please see Movement in the main merge text for details.

benloh commented 2 years ago

added 3 commits

Compare with previous version

benloh commented 2 years ago

added 2 commits

Compare with previous version

benloh commented 2 years ago

added 1 commit

Compare with previous version

benloh commented 2 years ago

added 1 commit

Compare with previous version

benloh commented 2 years ago

Touches Fix

Touches were failing to register when costumes were flipped via scale because the calculated body width / height ended up as a negative value. This should now be fixed.

benloh commented 2 years ago

mentioned in commit db8bc42b7111d42462a77ece495b8538e107d1ce