-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
Improvements to object type support, object versioning #2542
Improvements to object type support, object versioning #2542
Conversation
Some issues I found regarding certain types:
|
I agree. Laptop should only be an object type for Mr. Iceblock and not Smartblock. Just like BSoD is only an object type for Mr. Snowball and not Smartball. |
This must have been an oversight on my part, I forgot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just remembered tthat Bouncing Snowball actually has an object type as well that is missing! Fatbat is the object type for Bouncing Snowball.
Another thing: Rusty Trampoline seems to inherit code from Rocks hence they have the same object types, which is a mistake!
Also, didn't you make Ice the new default for new instances of weak block?
Another bug I discovered too: you can squish forzen Bumpkin, Pumpkin and BSoDs |
@Rusty-Box Additionally, I also removed the "linked" property from weak blocks. Only "Hay" is linked, "Ice" is not. This would ensure consistency. |
Does this fix #2502 ? |
It doesn't, but probably should. |
The flat/kicked laptop bug is fixed, though it will now come to a halt in an instant, instead of slowly losing speed until 0. This looks a bit harsh. |
276e699
to
42d28e2
Compare
Object, utilizing object types to have their sprites changed, now change their default sprite, according to their type. This stops the game from having to save the object type's sprite to the level file, when it's supposed to be the default.
Also features code improvements, like the initial
on_type_change
call forGameObject
s being moved to theparse_type
function, and changing an object's sprite on type change being moved toMovingSprite::on_type_change
.Another major feature, included in this PR, is
GameObject
versioning. It aims to provide a simple way to deprecate features in an object, which would allow for retaining proper functionality in old levels, whilst providing new functionality for new levels. Object versioning is supposed to be used, when introducing changes to objects, which are incompatible with the previous way of functioning of the object.TODO:
Fixes #2502.