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

Outfit/Weapon logic is borked #9852

Open
RisingLeaf opened this issue Feb 23, 2024 · 9 comments · May be fixed by #9859
Open

Outfit/Weapon logic is borked #9852

RisingLeaf opened this issue Feb 23, 2024 · 9 comments · May be fixed by #9859
Labels
refactor A request to refactor the engine code

Comments

@RisingLeaf
Copy link
Contributor

Problem Description

So I was trying to implement something and an interesting detail caught my eye that makes no sense to me.
Why is the weapon class parent to the outfit class? That is in no way a representation of how that works in data or even in the game in general, I suggest to change this.

Related Issue Links

None found

Desired Solution

Remove the inheritance of outfit and make weapon a member in the outfit class.

Alternative Approaches

No, its that or leave it like it is.

Additional Context

No response

@Amazinite Amazinite added the refactor A request to refactor the engine code label Feb 23, 2024
@Amazinite
Copy link
Collaborator

I too have encountered this headscratcher.

@RisingLeaf
Copy link
Contributor Author

I would be happy to change it if it is something that we can agree on.
Hens I opened an issue first because I thought there might be some thought behind it.

I looked on a git blame and it came from MZ direct commit.

@Amazinite
Copy link
Collaborator

Amazinite commented Feb 23, 2024

I remember discussing this with @warp-core at one point. I recall at the time that my idea was to flip the inheritance, although we figured there would be issues with that. Instead changing to composition as you described would likely be the better option.

@Hurleveur
Copy link
Member

Yeah same I'm confused
I can understand why ships are outfits but this is weird

@RisingLeaf RisingLeaf linked a pull request Feb 24, 2024 that will close this issue
@Amazinite Amazinite linked a pull request Feb 25, 2024 that will close this issue
@OcelotWalrus
Copy link
Contributor

For sure something to do!

@Amazinite
Copy link
Collaborator

So I was trying to implement something

@warp-core would like to know what it was that you were attempting to implement. And from the PR:

Usage examples
makes some changes a lot easier

What changes?

@RisingLeaf
Copy link
Contributor Author

@warp-core would like to know what it was that you were attempting to implement

I was trying to add more than one weapon node to outfit to create a double effect gun or a gun that shoots two different projectiles that are not timed the same way, which is difficult to do with sub-munitions especially the timing thing

What changes?

refer to the top
changes that require you to use weapon as a separate object from outfit, fr example multiple weapon nodes or maybe even a gun that can use different types of ammo but that would be even more complex

@Hurleveur
Copy link
Member

Hurleveur commented Mar 3, 2024

Cant we just have 2 weapons taking the same turret mount? (And you'd be surprised what you can do with submuns)

@RisingLeaf
Copy link
Contributor Author

Ye but no? I want an outfit that shoots two things not a dual turret mount, thats something different no?

(And you'd be surprised what you can do with submuns)

Yes but we can also just make things easier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor A request to refactor the engine code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants