Refactor character code #33

Merged
lunacb merged 0 commits from refactor_characters into vanta 2023-01-22 07:46:27 +02:00
lunacb commented 2023-01-18 01:07:47 +02:00 (Migrated from git.disroot.org)

This PR refactors character code to make it more correct and easier to maintain. It replaces #30.

First, to avoid ambiguity and surprising behavior, it makes the DefaultCharacter class inherit from the ContribRPCharacter class and the ContribRPCharacter class from the ClothedCharacter class. That way character method calls to DefaultCharacter will move to the first parenting contrib class, and that class may further defer the call up to the next parenting class when they're done with it.

Second, all custom-built character code is no longer inherited by the DefaultCharacter class. Instead the code is called directly by methods within it. That way, the control flow and logic of further additions will be easier to follow.

This PR refactors character code to make it more correct and easier to maintain. It replaces #30. First, to avoid ambiguity and surprising behavior, it makes the `DefaultCharacter` class inherit from the `ContribRPCharacter` class and the `ContribRPCharacter` class from the `ClothedCharacter` class. That way character method calls to `DefaultCharacter` will move to the first parenting contrib class, and that class may further defer the call up to the next parenting class when they're done with it. Second, all custom-built character code is no longer inherited by the `DefaultCharacter` class. Instead the code is called directly by methods within it. That way, the control flow and logic of further additions will be easier to follow.
lunacb commented 2023-01-18 01:09:59 +02:00 (Migrated from git.disroot.org)

Solves #29.

Solves #29.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: oreolek/vantaMOO#33
No description provided.