Stardew Valley: Fix Daggerfish, Cropsanity; Move Some Rules to Content Packs; Add Missing Shipsanity Location (#3626)
* Fix logic bug on daggerfish * Make new region for pond. * Fix SVE logic for crops * Fix Distant Lands Cropsanity * Fix failing tests. * Reverting removing these for now. * Fix bugs, add combat requirement * convert str into tuple directly * add ginger island to mod tests * Move a lot of mod item logic to content pack * Gut the rules from DL while we're at it. * Import nuke * Fix alecto * Move back some rules for now. * Move archaeology rules * Add some comments why its done. * Clean up archaeology and fix sve * Moved dulse to water item class * Remove digging like worms for now * fix * Add missing shipsanity location * Move background names around or something idk * Revert ArchaeologyTrash for now --------- Co-authored-by: Jouramie <jouramie@hotmail.com>
This commit is contained in:
@@ -1,20 +1,34 @@
|
||||
from ..game_content import ContentPack
|
||||
from ..game_content import ContentPack, StardewContent
|
||||
from ..mod_registry import register_mod_content_pack
|
||||
from ...data.game_item import ItemTag, Tag
|
||||
from ...data.shop import ShopSource
|
||||
from ...data.artisan import MachineSource
|
||||
from ...data.skill import Skill
|
||||
from ...mods.mod_data import ModNames
|
||||
from ...strings.book_names import ModBook
|
||||
from ...strings.region_names import LogicRegion
|
||||
from ...strings.craftable_names import ModMachine
|
||||
from ...strings.fish_names import ModTrash
|
||||
from ...strings.metal_names import all_artifacts, all_fossils
|
||||
from ...strings.skill_names import ModSkill
|
||||
|
||||
register_mod_content_pack(ContentPack(
|
||||
|
||||
class ArchaeologyContentPack(ContentPack):
|
||||
def artisan_good_hook(self, content: StardewContent):
|
||||
# Done as honestly there are too many display items to put into the initial registration traditionally.
|
||||
display_items = all_artifacts + all_fossils
|
||||
for item in display_items:
|
||||
self.source_display_items(item, content)
|
||||
content.source_item(ModTrash.rusty_scrap, *(MachineSource(item=artifact, machine=ModMachine.grinder) for artifact in all_artifacts))
|
||||
|
||||
def source_display_items(self, item: str, content: StardewContent):
|
||||
wood_display = f"Wooden Display: {item}"
|
||||
hardwood_display = f"Hardwood Display: {item}"
|
||||
if item == "Trilobite":
|
||||
wood_display = f"Wooden Display: Trilobite Fossil"
|
||||
hardwood_display = f"Hardwood Display: Trilobite Fossil"
|
||||
content.source_item(wood_display, MachineSource(item=str(item), machine=ModMachine.preservation_chamber))
|
||||
content.source_item(hardwood_display, MachineSource(item=str(item), machine=ModMachine.hardwood_preservation_chamber))
|
||||
|
||||
|
||||
register_mod_content_pack(ArchaeologyContentPack(
|
||||
ModNames.archaeology,
|
||||
shop_sources={
|
||||
ModBook.digging_like_worms: (
|
||||
Tag(ItemTag.BOOK, ItemTag.BOOK_SKILL),
|
||||
ShopSource(money_price=500, shop_region=LogicRegion.bookseller_1),),
|
||||
},
|
||||
skills=(Skill(name=ModSkill.archaeology, has_mastery=False),),
|
||||
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user