From 45695350c9cca36b976213ffd1141a307396fb4d Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Thu, 12 Sep 2024 14:03:20 +0100 Subject: [PATCH] Implement progression reporting for items, improve inventory interface, add condom hooks --- .../creamy_pumpkin_pie/window_frame_spacer.png | 3 +++ .../interface/wheelmenu/wheelmenu_hooch.png | 3 +++ game/scripts/characters/cho/vars.rpy | 1 + game/scripts/characters/hermione/vars.rpy | 1 + game/scripts/characters/luna/vars.rpy | 1 + game/scripts/gui/frame.rpy | 4 +++- game/scripts/interface/inventory.rpy | 18 ++++++++++++++++-- game/scripts/inventory/classes.rpy | 4 +++- game/scripts/inventory/gifts.rpy | 2 +- game/scripts/inventory/use_gifts.rpy | 3 +++ 10 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 game/gui/creamy_pumpkin_pie/window_frame_spacer.png create mode 100755 game/images/interface/wheelmenu/wheelmenu_hooch.png diff --git a/game/gui/creamy_pumpkin_pie/window_frame_spacer.png b/game/gui/creamy_pumpkin_pie/window_frame_spacer.png new file mode 100644 index 00000000..7a496d26 --- /dev/null +++ b/game/gui/creamy_pumpkin_pie/window_frame_spacer.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:43e7e234472dcc2052a7325e0e03d66600f67ddef3fe74cf192ab6251373e1eb +size 765 diff --git a/game/images/interface/wheelmenu/wheelmenu_hooch.png b/game/images/interface/wheelmenu/wheelmenu_hooch.png new file mode 100755 index 00000000..5e7c9954 --- /dev/null +++ b/game/images/interface/wheelmenu/wheelmenu_hooch.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f0389873cd36cc635e095d93cf81fceefb7863ee29609e662873912c3ee3a7f3 +size 160518 diff --git a/game/scripts/characters/cho/vars.rpy b/game/scripts/characters/cho/vars.rpy index c3c1f372..23a59d15 100644 --- a/game/scripts/characters/cho/vars.rpy +++ b/game/scripts/characters/cho/vars.rpy @@ -106,6 +106,7 @@ default states.cho.ev.manipulate_girls.t3_e1_complete = False default states.cho.ev.manipulate_girls.t3_e2_complete = False default states.cho.ev.manipulate_girls.t3_e3_complete = False default states.cho.ev.manipulate_girls.t3_e4_complete = False +default states.cho.ev.condom_event = False # Names diff --git a/game/scripts/characters/hermione/vars.rpy b/game/scripts/characters/hermione/vars.rpy index 869d059d..d065a8b8 100644 --- a/game/scripts/characters/hermione/vars.rpy +++ b/game/scripts/characters/hermione/vars.rpy @@ -126,6 +126,7 @@ default states.her.ev.maid.intro_complete = False default states.her.ev.talk_to_me.caught_masturbating = False default states.her.ev.flirt_with_students.done_before = False default states.her.ev.hg_pf_cumslut.choice = None +default states.her.ev.condom_event = False default her_level_up = None # TODO: This var is used in an overly complicated manner, it should be removed once the issues are resolved. default current_job = None # TODO: Jobs should be using event class with enqueue feature instead. diff --git a/game/scripts/characters/luna/vars.rpy b/game/scripts/characters/luna/vars.rpy index 2f4ec5b1..f2051a6b 100644 --- a/game/scripts/characters/luna/vars.rpy +++ b/game/scripts/characters/luna/vars.rpy @@ -49,6 +49,7 @@ default states.lun.ev.lun_cumslut_nickname_unlocked = False default states.lun.ev.ll_pf_blowjob_T4_E1_intro_complete = False default states.lun.ev.ll_pf_blowjob_T4_E2_intro_complete = False default states.lun.ev.ll_pf_talk_T4_E1_repeat_complete = False +default states.lun.ev.condom_event = False # Flags default lun_level_up = None diff --git a/game/scripts/gui/frame.rpy b/game/scripts/gui/frame.rpy index d5f0ed3e..9b586e85 100644 --- a/game/scripts/gui/frame.rpy +++ b/game/scripts/gui/frame.rpy @@ -92,4 +92,6 @@ style frame_button is button: align (0.5, 1.0) style frame_button_text is choice_text: - align (0.5, 0.5) \ No newline at end of file + align (0.5, 0.5) + +image frame_spacer = Image("gui/creamy_pumpkin_pie/window_frame_spacer.png", oversample=4) diff --git a/game/scripts/interface/inventory.rpy b/game/scripts/interface/inventory.rpy index 3eb0217c..f423c353 100644 --- a/game/scripts/interface/inventory.rpy +++ b/game/scripts/interface/inventory.rpy @@ -90,21 +90,35 @@ screen inventory(): vbox: align (0.0, 1.0) + add "frame_spacer" xalign 0.5 xsize 500 + null height 10 + hbox: spacing 5 add selected_item.get_image() xysize(96, 96) align (0.05, 0.95) vbox: + spacing 5 yalign 1.0 xsize 400 + yminimum 80 hbox: label selected_item.name if selected_item.used or (selected_item.type=="decoration" and selected_item.in_use): add "interface/topbar/icon_check.webp" xysize (24, 24) yoffset -12 text selected_item.desc xalign 0 + if inventory_mode==0 and selected_item.use_progression: + vbox: + align (0, 0) + for k, v in selected_item.use_progression.items(): + $ progress = "{unicode}✔{/unicode}" if eval(v) else "{unicode}✘{/unicode}" + text "{size=-3}[k] [progress]{/size}" xalign 0 text_align 0 color ("#ffffff" if eval(v) else "#8d8d8d") if selected_item.givable: - text _("Usable on: [item.usable_on]") xalign 0 - + hbox: + yoffset -5 + text _("Giftable:") yalign 0.5 + for i in item.usable_on: + add "wheelmenu_[i]" xysize (24, 24) yalign 0.5 if selected_item.owned > 1: text "x[selected_item.owned]" align (0.0, 1.0) diff --git a/game/scripts/inventory/classes.rpy b/game/scripts/inventory/classes.rpy index a2785dcb..5403da71 100644 --- a/game/scripts/inventory/classes.rpy +++ b/game/scripts/inventory/classes.rpy @@ -27,7 +27,7 @@ init python: return self._get_givables(type) and self._get_usables(type, char) class Item(object): - def __init__(self, id, type, name, price=0, desc="", unlocked=True, use_func=None, use_label=None, give_func=None, give_label=None, limit=100, image="default", givable=False, currency="gold", use_caption=_("Use"), give_caption=_("Give"), owned=0, infinite=False, usable_on=[]): + def __init__(self, id, type, name, price=0, desc="", unlocked=True, use_func=None, use_label=None, give_func=None, give_label=None, limit=100, image="default", givable=False, currency="gold", use_caption=_("Use"), give_caption=_("Give"), owned=0, infinite=False, usable_on=[], use_progression={}, give_progression={}): self.id = id self.type = type self.name = name @@ -37,9 +37,11 @@ init python: self.use_func = use_func self.use_label = use_label self.use_caption = use_caption + self.use_progression = use_progression self.give_func = give_func self.give_label = give_label self.give_caption = give_caption + self.give_progression = give_progression self.limit = limit self.image = f"interface/icons/{self.id}.webp" if image == "default" else image self.currency = currency diff --git a/game/scripts/inventory/gifts.rpy b/game/scripts/inventory/gifts.rpy index f820d60b..569f3ef4 100644 --- a/game/scripts/inventory/gifts.rpy +++ b/game/scripts/inventory/gifts.rpy @@ -10,7 +10,7 @@ default porn_mag_ITEM = Item("porn_mag", "gift", _("Porn magazines"), 80, _("Giv default krum_poster_ITEM = Item("krum_poster", "gift", _("Viktor Krum Poster"), 25, _("A skilled Quidditch Seeker, Viktor has been selected to play for the Bulgarian National Quidditch team despite still going to school, and is widely regarded as one of the best players in the world."), givable=True, usable_on=list(states.dolls), use_label="gen_use_krum_poster") default sexy_lingerie_ITEM = Item("sexy_lingerie", "gift", _("Sexy Lingerie"), 75, _("Sexy lingerie \"Fairy Godmother\". Charm your wizard in bed or empress your sisters at a Sabbath."), givable=True, usable_on=list(states.dolls), use_label="gen_use_sexy_lingerie") default sexy_stockings_ITEM = Item("sexy_stockings", "gift", _("Sexy Stockings"), 50, _("Somewhere between now and the dark-ages came the invention of stockings, when you want to show some skin but not too much."), givable=True, usable_on=list(states.dolls), use_label="gen_use_sexy_stockings") -default pink_condoms_ITEM = Item("condoms", "gift", _("A Pack Of Condoms"), 50, _("Unleash the one-horned beast!\n{size=-4}May contain traces of actual unicorn saliva.{/size}"), givable=True, usable_on=list(states.dolls), use_label="gen_use_pink_condoms") +default pink_condoms_ITEM = Item("condoms", "gift", _("A Pack Of Condoms"), 50, _("Unleash the one-horned beast!\n{size=-4}May contain traces of actual unicorn saliva.{/size}"), givable=True, usable_on=list(states.dolls), use_label="gen_use_pink_condoms", use_progression={_("Secret Event - Hermione"): "states.her.ev.condom_event", _("Secret Event - Cho"): "states.cho.ev.condom_event", _("Secret Event - Luna"): "states.lun.ev.condom_event"}) default vibrator_ITEM = Item("vibrator", "gift", _("Vibrator"), 55, _("A magnificent, magically enhanced vibrator made of vine wood, with a dragon heartstring core."), givable=True, usable_on=list(states.dolls), use_label="gen_use_vibrator") default anal_lube_ITEM = Item("lube", "gift", _("Jar of lubricant"), 60, _("A Jar full of lube, Buy this for your loved one - show that you care."), givable=True, usable_on=list(states.dolls), use_label="gen_use_anal_lube") default ballgag_and_cuffs_ITEM = Item("ballgag_and_cuffs", "gift", _("Ball gag and cuffs"), 70, _("Ball gag and cuffs, Turn your soulmate into your cellmate."), givable=True, usable_on=list(states.dolls), use_label="gen_use_ballgag_and_cuffs") diff --git a/game/scripts/inventory/use_gifts.rpy b/game/scripts/inventory/use_gifts.rpy index 9820a4fa..4daea04d 100644 --- a/game/scripts/inventory/use_gifts.rpy +++ b/game/scripts/inventory/use_gifts.rpy @@ -432,6 +432,7 @@ label gen_use_firewhisky: # CONDOM EVENTS label hg_condom_balloon: + $ states.her.ev.condom_event = True gen "(... I suppose it would prevent a mess if I were to jerk off into this thing.)" ("base", xpos="far_left", ypos="head") @@ -560,6 +561,7 @@ label hg_condom_balloon: jump main_room_menu label ll_condom_balloon: + $ states.lun.ev.condom_event = True gen "(... I suppose it would prevent a mess if I were to jerk off into this thing.)" ("base", xpos="far_left", ypos="head") @@ -631,6 +633,7 @@ label ll_condom_balloon: jump main_room_menu label cc_condom_balloon: + $ states.cho.ev.condom_event = True gen "(... I suppose it would prevent a mess if I were to jerk off into this thing.)" ("base", xpos="far_left", ypos="head")