Skip to content

Commit

Permalink
Merge pull request #9028 from Legendkiller21/consumablesCheck
Browse files Browse the repository at this point in the history
Check consumables topic
  • Loading branch information
multimokia committed May 15, 2022
2 parents b25b667 + e3dd810 commit cf223a3
Showing 1 changed file with 68 additions and 0 deletions.
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}, glad 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

0 comments on commit cf223a3

Please sign in to comment.