Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check consumables topic #9028

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
68 changes: 68 additions & 0 deletions Monika After Story/game/zz_consumables.rpy
Original file line number Diff line number Diff line change
Expand Up @@ -1817,3 +1817,71 @@ label mas_consumables_candycane_finish_having:
else:
m 1eua "Okay, what else should we do today?"
return

init 5 python:
addEvent(
Event(
persistent.event_database,
eventlabel="monika_consumables_check",
category=['supplies'],
prompt="Are you running out of anything?",
conditional="MASConsumable._getEnabledConsumables()",
pool=True,
unlocked=False,
action=EV_ACT_UNLOCK,
rules={"no_unlock": None},
)
)

label monika_consumables_check:
#Firstly, let's get what we're low on.
$ low_cons = MASConsumable._getLowCons()

# Quick path if Monika needs 1 or none of consumables
if len(low_cons) < 2 and random.random() > 0.5:
if not low_cons:
m 3eua "Oh{w=0.1}, I'm not running out of anything at the moment, [player]...{w=0.3}{nw}"
extend 3hua "but I'll be sure to let you know if I do~"

else:
$ items_running_out_of = low_cons[0].disp_name
m 3rusdlb "Oh{w=0.1}, good you asked!"
m 1rksdla "I've been running out of [items_running_out_of]."
m 1eka "I'd appreciate if you could get some for me~"

return

m 1rtd "Umm...{w=0.3}{nw}"
extend 3eua "let me check.{w=0.2}.{w=0.2}.{w=0.2}{nw}"

#Monika goes off screen
call mas_transition_to_emptydesk

pause 5.0

call mas_transition_from_emptydesk("monika 1eua")

m 1hub "Back!"

if len(low_cons) > 2:
$ mas_generateShoppingList(low_cons)
m 3rksdla "I'm actually running out of a few things..."
m 3eua "I hope you don't mind, but I left you a list of things in the characters folder."
m 1eka "You wouldn't mind getting them for me, would you?"

elif len(low_cons) > 0:
python:
items_running_out_of = ""
if len(low_cons) == 2:
items_running_out_of = "{0} and {1}".format(low_cons[0].disp_name, low_cons[1].disp_name)
else:
items_running_out_of = low_cons[0].disp_name

m 3rksdla "I'm running out of [items_running_out_of]."
m 1eka "You wouldn't mind getting some more for me, would you?"

else:
m 3eua "I'm not running out of anything at the moment, [player]...{w=0.3}{nw}"
extend 3hua "but I'll be sure to let you know if I do~"

return