Rework of r9343 - simplyfied some things and removed unnecessary parts#302
Merged
Conversation
reworking r9343 - this resulted in player being forced to choose features to allways see all possible merc gear sets - loosing whole gearsets to avoid a few items is too much - in some item-mods that even could result in some mercs not having any - therefore deleted
reworking r9343 - already decided in IsItemlegal - if it ain't legal, it won't be shown in ShopKeeperInventory, no need to bother with it again
reworking r9343 - no need for Foodsystem flag, restricting food items to food system was already part of the code prior to r9343 (in IsItemLegal by silversurfer) - for disease system changed flag to boolean
reworking r9343 - part about food system was obsolete, that was already a thing prior to r9343 (see IsItemLegal) - disease changed because instead of flag now boolean is used
reworking r9343 - the part about Food System is obsolete, already was happening in code prior to r9343 - the flags got removed and a boolean is used instead, allowing a simpler function for the remaining disease - wether an item is considered exclusive to disease feature or not is decided by usage of tag in items.xml
reworking r9343 - some leftover cleanup and formating
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.
r9343 introduced two new tags meant for items.xml which should prevent feature (food and disease) specific items to appear
(r9343 in gitHub: 033ae4a)
For the rework:
removed anything in it about the food feature
restricting food items to food feature was already implemented in code prior to r9343, therefore unnecessary
(see IsItemLegal, code by silversurfer)
removed the part about ShopKeeperInventory
since it's already been decided wether item is legal or not, it's unnecessary to do it again
(items already won't show in that inventory if not legal)
changed flags introduced by r9343 to boolean, allowing to simplyfy function in IsItemLegal
(now only dealing with disease feature)
removed the part that forced player to choose a feature to be able to see all possible merc gear sets
merc gear sets can now again contain such items without being not shown without the features
as a result we may see items for features we don't use, but we can choose between all five gear sets again
considering that we can easily dump or sell them, loosing whole gear sets seemed to harsh
tags introduced in r9343 never actually got implemeted into gamedir
therefore the now sole tag for disease will be added in an accompanying change to gamedir
tag strictly used for items that only have an effect with disease feature (mask/gloves, splint, disease medicine)
accompanying gamedir PR: 1dot13/gamedir#90