Skip to content
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

Routes again #26

Closed

Conversation

Froggy618157725
Copy link
Collaborator

Attempted to restore routes. The Activity action doesn't seem to be working, and globals do not work well. Swapping maps will sometimes get rid of the route, and nodes may disappear while traversing.

Includes the tween, map change, and activity change actions, which will
be used by routesRestore the Action System

Includes the tween, map change, and activity change actions, which will
be used by routes
Routes will need it, and borrow checker doesn't want it coming from
MapListPass current map hash down again
These are used for tweens for routes
Currently has some issues with the new Global system
I foolishly used Global when I meant to use Global, since I
selected Global when quickfixing to lazily add an import
instead of Global, like I should have.

Oh, and bonus clippy fix
This lets you queue adding things to a scene after changing
the activity. Theoretically. Doesn't quite work now...

Route command will swap to correct activity first, and then
fail to add the route if activity was changed. Might need to fix
when ActivitySwapAction's is_done returns true.
CommandBuffers are out. Route specific actions are in.
Sadly can't get the entity to select them properly, since
the map may not be set up yet, so we can't reserve the entity
to select. We can, however, make a route specific action.

Also, wait for maps to exist before attempting to add a route.
We can do this by ending the ActivitySwapAction after a map is
loaded.
@@ -296,20 +309,316 @@ impl ComponentPanel for Beacon {
});

// TODO(cohae): Reimplement tween rotation
Copy link
Owner

Choose a reason for hiding this comment

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

Remove comment ;)


if let Some(map) = maps.current_map_mut() {
let e = map.scene.spawn((
Route {
Copy link
Owner

Choose a reason for hiding this comment

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

Add a Label and Icon component so it looks nice in the inspector/outliner

@@ -112,7 +119,7 @@ impl Renderer {
self.draw_shading_pass(scene);
self.draw_transparents_pass(scene);

draw_utilities(self, scene, resources)
draw_utilities(self, scene, resources, current_hash)
Copy link
Owner

Choose a reason for hiding this comment

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

Map hash should not be passed into the renderer.
Is there a way we can identify local nodes without needing information about maps (besides the scene)?
If not, then we might need to pass a Map into the renderer instead of a Scene

@cohaereo
Copy link
Owner

Will be picked up by me post-0.5

@cohaereo cohaereo closed this May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants