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

Added a 3d-printer skin upgrade for robots #3694

Open
wants to merge 1 commit into
base: master-MC1.7.10
Choose a base branch
from

Conversation

Compaszer
Copy link

This PR adds a new upgrade for robots: The skin upgrade.
This upgrade allows for adding 3d-printed blocks as a skin to robots. They will be rendered at the location of the robot.
In addition 3d-printed blocks can be set as the "arms" of a robot. This is purely decorational, but allows for some cool applications, like building a working GLaDOS from portal (an example can be found below).
2024-03-25_17 26 36

@asiekierka
Copy link
Contributor

That's a really cool PR for an abandoned mod!

However, I need to ask: Is there anything in place to ensure that people don't make almost-invisible robots for, say, a PvP context? What I'm trying to say is, I'm not sure if I like the idea of "hiding the full robot body".

}

def checkIfTierIsHighEnoughForPart(part: Int): Boolean = {
((part == 2 || part == 5) && tier >= 1) || ((part == 3 || part == 6) && tier >= 2) || (part == 0 || part == 1 || part == 4)
Copy link
Contributor

Choose a reason for hiding this comment

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

This would probably be much more readable if we had an Enum for the part number; a converter could try to match the integer value to an Enum, or emit an error if it is not a valid part index.

Copy link
Author

Choose a reason for hiding this comment

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

Yeah, I thought about that. The design consideration here was, that you use these numbers in the ingame Lua programs, so it should be referenced as numbers in the code aswell.
But if you disagree, I'll change it asap.

Copy link
Contributor

Choose a reason for hiding this comment

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

An user can always create their own constants for such numeric values in Lua code - for example, OpenOS comes with /lib/sides.lua and /lib/colors.lua. I think we should do the same in Scala code; the Enum will document what the part numbers are by virtue of the ordinal.

@Compaszer
Copy link
Author

That's a really cool PR for an abandoned mod!

However, I need to ask: Is there anything in place to ensure that people don't make almost-invisible robots for, say, a PvP context? What I'm trying to say is, I'm not sure if I like the idea of "hiding the full robot body".

Yeah, I didn't thought about this. Maybe the nametag shouldn't be hidable if the body skin occupies less than 10% of the visual space. Because the nametag allways gives away the robots position and therefore should be sufficient for an PvP context.

@asiekierka
Copy link
Contributor

That sounds like a good solution; plus a configuration option which allows the server administrator to disable certain forms of "hiding", I think.

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.

2 participants