Open
Conversation
This adds IComputerItem.withFamily(ItemStack, ComputerFamily) as well as a ComputerFamilyRecipe class. Each type of computer (normal, turtle, pocket) defines a recipe using this class, as they require a different number of gold ingots to upgrade.
The two recipes are pretty similar, so this allows us to substantially simplify the code. This now introduces the additional requirement that computers must be used to create turtles, rather than pocket computers or another turtle.
See dan200#517 for motivation
27ceceb to
bb2eab0
Compare
ccserver
pushed a commit
to ccserver/ComputerCraft
that referenced
this pull request
Sep 16, 2019
…computer-upgrade Add recipes to upgrade computers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds recipes to upgrade computers, turtles and pocket computers using gold ingots. Computers and pocket computers require 7 gold ingots, whilst turtles require 14 (in the form of 1 gold block and 5 ingots). A couple of things worth noting:
This also converts the current
TurtleRecipeover to use the same system: changing the item rather than the family. However, this now requires the computer item to be an actual computer - previously one could use a turtle or pocket computer. This behaviour feels a little strange to me, but I'm happy to revert to that if desired.