Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

hidnight

3
Posts
A member registered 25 days ago

Recent community posts

Great. It's your project and you should decide what to do. It's more of a design decision that should be made at the start of the project but, hey, now you've gained new knowledge to apply in future projects.

A cursory grep

grep -iGR --include=*.rpy 'del inventory' ./ | wc -l

gave 62 occurrences so yeah searching and rewriting will be a pain.

Also why is the outline of Pigfish in Gendalf/Sauron room so tiny?

Pigfish event doesn't trigger in 0.19 because

$ have_gala_panties = "stolen panties" in inventory.keys()

is always False since it checks for string equality in collection. Instead it should be

# player has panties in inventory
$ have_gala_panties = False
# for inventory manipulation
$ found_panties = ""
python:
    # item is a string
    for item in inventory.keys():
        # "in" for strings checks for substrings instead of string "in" collection which checks for equality only
        if "stolen panties" in item:
            have_gala_panties = True
            found_panties = item
            # panties found, if you want to delete last instead of first found then comment this break
            break

Since in this case "in" works on strings and produces expected result.

Also deleting should be updated to

if (inventory[found_panties]["count"]!=1):
    $ inventory[found_panties]["count"]-=1
else:
    $ del inventory[found_panties]

Though I would strongly advise to create a function for deleting item(s) since that's their point - to write repetetive code once and then use it later. Or better yet create class for inventory to contain everything related to it including deletion.