Implement progression reporting for items, improve inventory interface, add condom hooks

This commit is contained in:
LoafyLemon 2024-09-12 14:03:20 +01:00
parent 92e1f79cd7
commit 45695350c9
10 changed files with 35 additions and 5 deletions

BIN
game/gui/creamy_pumpkin_pie/window_frame_spacer.png (Stored with Git LFS) Normal file

Binary file not shown.

BIN
game/images/interface/wheelmenu/wheelmenu_hooch.png (Stored with Git LFS) Executable file

Binary file not shown.

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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)
align (0.5, 0.5)
image frame_spacer = Image("gui/creamy_pumpkin_pie/window_frame_spacer.png", oversample=4)

View File

@ -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)

View File

@ -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

View File

@ -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")

View File

@ -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")