Skip to content
This repository has been archived by the owner on Nov 9, 2023. It is now read-only.

Add MultiValueArithmeticDriver<T> Component #146

Merged
merged 5 commits into from
Sep 5, 2023

Conversation

Nytra
Copy link
Contributor

@Nytra Nytra commented Jul 25, 2023

It's basically a small calculator in components. You can add, subtract, multiply or divide with it. You can also type values straight into the component or drive them from elsewhere.

20230725153324_1

@Nytra
Copy link
Contributor Author

Nytra commented Jul 25, 2023

Not sure why the check is failing :/

@Xlinka
Copy link
Owner

Xlinka commented Jul 25, 2023

OH yeah the github action script has been broken for a long time

@Xlinka
Copy link
Owner

Xlinka commented Jul 25, 2023

#138

@Xlinka
Copy link
Owner

Xlinka commented Jul 30, 2023

has this been fully tested in a multi user enviroment

@Nytra
Copy link
Contributor Author

Nytra commented Jul 30, 2023

has this been fully tested in a multi user enviroment

No not yet.

@Xlinka
Copy link
Owner

Xlinka commented Aug 6, 2023

when do you want to test ?

@Nytra
Copy link
Contributor Author

Nytra commented Aug 8, 2023

sorry I have been busy with stuff so haven't been able to test, but hopefully soon

Copy link
Collaborator

@Frozenreflex Frozenreflex left a comment

Choose a reason for hiding this comment

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

This PR looks alright, better than most other people's code I've had to read. There's a couple small changes here and there that I'd like to see

using System.Linq;
using BaseX;
using FrooxEngine;

Copy link
Collaborator

Choose a reason for hiding this comment

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

There needs to be a namespace defined here,

namespace FrooxEngine;

should do.

(Linka please fix the namespaces in your code it's missing in a couple of places and dropping stuff to the global namespace is bad)


protected override void OnChanges()
{
if (!Target.IsLinkValid)
Copy link
Collaborator

Choose a reason for hiding this comment

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

This could probably be reformatted to something like this

if (!Target.IsLinkValid || Values.Count == 0) return;

}
if (Values.Contains(Target.Target))
{
// don't let the component drive itself, don't want a feedback loop
Copy link
Collaborator

Choose a reason for hiding this comment

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

Good catch.

@Xlinka
Copy link
Owner

Xlinka commented Sep 5, 2023

approved

@Xlinka Xlinka merged commit 02e571f into Xlinka:main Sep 5, 2023
1 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants