Skip to content

Rework of r9343 - simplyfied some things and removed unnecessary parts#302

Merged
kitty624 merged 6 commits into
1dot13:masterfrom
kitty624:source-dev
Apr 15, 2024
Merged

Rework of r9343 - simplyfied some things and removed unnecessary parts#302
kitty624 merged 6 commits into
1dot13:masterfrom
kitty624:source-dev

Conversation

@kitty624
Copy link
Copy Markdown
Contributor

@kitty624 kitty624 commented Apr 15, 2024

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

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
@kitty624 kitty624 merged commit c32d09b into 1dot13:master Apr 15, 2024
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.

1 participant