The custom jump script has been added, but there are things to fix:
[x] The hero cannot jump if he is already using the sword. Also, if we use the feather in the middle of a jump, the hero movement is stopped (frozen) and the jumping animation is reseted because feather:on_using() is called again (the problem comes from the behavior of the engine when that function is called, and not from the function itself). There may be things to do to make the feather compatible with other weapons/items too. This has to be fixed from the script that manages the item commands (I don't know where that is done). To avoid using the feather in the middle of the jump we could define an event "on_custom_using" and call it when it is defined for an item, instead of the event "on_using" (that will avoid freezing the hero in the middle of the jump if the feather command is pressed, etc).
[x] I have not added the ground effects yet (sounds and animations, depending on the type of ground where the hero falls after jumping). There is already in the repo an older script that I made for that. But we could put that code inside the feather script to reduce the number of files and make it easier to port the custom jump feature to other projects. What should we do?
Part of the necessary code is inside the hero metatable script. Should we put that code inside the feather script too? If so, we should require the multievents script inside the feather script.
-> We won't do this.
[x] Add custom teleporters script and require it from the feather script. This does not allow the hero to leave the map with a teleporter while he is jumping (allowing to jump over stairs teleporters, and forcing the hero to wait for the end of the jump before sidemap teleporters can be used; all of this prevent bad things from happening). My custom teleporters do not produce incompatibilities as far as I know, and they allow more customization, like adding a condition necessary to use them.
[x] Allow to jump over conveyor belts (streams of this type). I have not worked on this yet, but an easy way to do it is just disabling the near streams during a jump, and later enable them again. Maybe we need some trick if these have a sprite attached (we do not want the sprite to disappear during the jump), but this can be solved with this workaround: create temporary entities with the same sprite during the jump, which will be placed in the place of the disabled streams.
[x] Do not allow to jump if hero is on a "blocking stream", and allow to jump over non-blocking streams.
The custom jump script has been added, but there are things to fix:
[x] The hero cannot jump if he is already using the sword. Also, if we use the feather in the middle of a jump, the hero movement is stopped (frozen) and the jumping animation is reseted because feather:on_using() is called again (the problem comes from the behavior of the engine when that function is called, and not from the function itself). There may be things to do to make the feather compatible with other weapons/items too. This has to be fixed from the script that manages the item commands (I don't know where that is done). To avoid using the feather in the middle of the jump we could define an event "on_custom_using" and call it when it is defined for an item, instead of the event "on_using" (that will avoid freezing the hero in the middle of the jump if the feather command is pressed, etc).
[x] I have not added the ground effects yet (sounds and animations, depending on the type of ground where the hero falls after jumping). There is already in the repo an older script that I made for that. But we could put that code inside the feather script to reduce the number of files and make it easier to port the custom jump feature to other projects. What should we do?
Part of the necessary code is inside the hero metatable script. Should we put that code inside the feather script too? If so, we should require the multievents script inside the feather script. -> We won't do this.
[x] Add custom teleporters script and require it from the feather script. This does not allow the hero to leave the map with a teleporter while he is jumping (allowing to jump over stairs teleporters, and forcing the hero to wait for the end of the jump before sidemap teleporters can be used; all of this prevent bad things from happening). My custom teleporters do not produce incompatibilities as far as I know, and they allow more customization, like adding a condition necessary to use them.
[x] Allow to jump over conveyor belts (streams of this type). I have not worked on this yet, but an easy way to do it is just disabling the near streams during a jump, and later enable them again. Maybe we need some trick if these have a sprite attached (we do not want the sprite to disappear during the jump), but this can be solved with this workaround: create temporary entities with the same sprite during the jump, which will be placed in the place of the disabled streams.
[x] Do not allow to jump if hero is on a "blocking stream", and allow to jump over non-blocking streams.