From 085a4d8e9c2958ccf8d32ee8297b3b729083af01 Mon Sep 17 00:00:00 2001 From: LoafyLemon Date: Thu, 25 Apr 2024 20:15:36 +0100 Subject: [PATCH] Refactoring weather checks --- .../astoria/events/spells/imperio_tonks.rpy | 2 +- .../cho/events/quidditch/gryffindor_match.rpy | 12 +++++----- .../events/quidditch/gryffindor_practice.rpy | 2 +- .../cho/events/quidditch/hufflepuff_match.rpy | 6 ++--- .../events/quidditch/hufflepuff_practice.rpy | 2 +- .../cho/events/quidditch/intros.rpy | 6 ++--- .../cho/events/quidditch/slytherin_match.rpy | 6 ++--- .../cho/events/requests/manipulate_girls.rpy | 2 +- .../scripts/characters/hermione/chitchats.rpy | 4 ++-- .../characters/hermione/events/clothing.rpy | 8 +++---- game/scripts/characters/hermione/talk.rpy | 2 +- .../characters/luna/events/favors/suck_it.rpy | 2 +- game/scripts/characters/snape/chitchats.rpy | 2 +- .../characters/snape/events/hangouts.rpy | 2 +- .../scripts/characters/snape/events/intro.rpy | 2 +- game/scripts/doll/main.rpy | 8 +++---- game/scripts/events/DayNight.rpy | 4 ++-- game/scripts/events/Start.rpy | 6 ++--- game/scripts/events/ending.rpy | 2 +- game/scripts/events/quests.rpy | 6 ++--- game/scripts/interface/map.rpy | 2 +- .../mirror/events/a_bad_time_to_disrobe.rpy | 2 +- .../mirror/events/a_christmas_tale.rpy | 2 +- .../mirror/events/a_christmas_tale2.rpy | 2 +- .../mirror/events/a_dark_room_NOT_IN_USE.txt | 24 +++++++++---------- .../events/a_spaced_out_conversation.rpy | 2 +- .../mirror/events/a_white_christmas.rpy | 2 +- .../mirror/events/an_odd_circumstance.rpy | 2 +- .../mirror/events/anal_pirate_event.rpy | 2 +- .../minigames/mirror/events/biggus_dickus.rpy | 2 +- .../mirror/events/blueballing_bad.rpy | 2 +- .../mirror/events/eating_for_pleasure.rpy | 2 +- .../mirror/events/genie_house_elf.rpy | 2 +- .../mirror/events/genies_christmas_wish.rpy | 2 +- .../mirror/events/not_so_great_escape.rpy | 2 +- .../minigames/mirror/events/panty_raid.rpy | 2 +- .../mirror/events/previously_at_hogwarts.rpy | 4 ++-- .../minigames/mirror/events/suck_and_run.rpy | 2 +- .../minigames/mirror/events/whose_points.rpy | 2 +- game/scripts/rooms/main_room/init.rpy | 2 +- game/scripts/rooms/main_room/objects/desk.rpy | 6 ++--- .../rooms/main_room/objects/weather.rpy | 6 ++--- game/scripts/rooms/quidditch_pitch/init.rpy | 2 +- 43 files changed, 82 insertions(+), 82 deletions(-) diff --git a/game/scripts/characters/astoria/events/spells/imperio_tonks.rpy b/game/scripts/characters/astoria/events/spells/imperio_tonks.rpy index 0039837f..7855d3d0 100644 --- a/game/scripts/characters/astoria/events/spells/imperio_tonks.rpy +++ b/game/scripts/characters/astoria/events/spells/imperio_tonks.rpy @@ -641,7 +641,7 @@ label ag_st_imperio_E2: play sound "sounds/thunder_2.ogg" pause .5 - if game.weather in {"clear", "cloudy"}: + if states.env.weather in {"clear", "cloudy"}: gen "Where the hell did that thunder come from?" ("base", xpos="far_left", ypos="head") else: gen "What the--" ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy b/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy index 0b293901..281d0489 100644 --- a/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy +++ b/game/scripts/characters/cho/events/quidditch/gryffindor_match.rpy @@ -78,11 +78,11 @@ label start_gryffindor_match: gen "Go-go Ravenclaw!" ("base", xpos="far_left", ypos="head") cho "Right..." ("disgust", "base", "base", "mid") - if game.weather in {"rain", "storm"}: + if states.env.weather in {"rain", "storm"}: cho "Let's just hope it stops raining before then." ("soft", "base", "base", "R") - elif game.weather in {"snow", "blizzard"}: + elif states.env.weather in {"snow", "blizzard"}: cho "Let's just hope it stops snowing before then." ("soft", "base", "base", "R") - elif game.weather == "overcast": + elif states.env.weather == "overcast": cho "Let's just hope the weather doesn't get worse." ("soft", "base", "base", "R") else: cho "Let's hope the weather stays like it is." ("soft", "base", "base", "R") @@ -127,7 +127,7 @@ label gryffindor_match: $ states.env.gold = 1984 $ states.env.day = 665 $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" call room("main_room") hide screen blkfade @@ -589,7 +589,7 @@ label gryffindor_match: $ states.env.gold = 1984 $ states.env.day = 667 $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" $ snape_chibi.zorder = 3 $ tonks_chibi.zorder = 4 call room("quidditch_stands",) @@ -731,7 +731,7 @@ label gryffindor_match: $ states.env.gold = 1984 $ states.env.day = 667 $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" $ snape_chibi.zorder = 3 $ tonks_chibi.zorder = 4 call room("quidditch_stands",) diff --git a/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy b/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy index a5eadf00..fc86d878 100644 --- a/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy +++ b/game/scripts/characters/cho/events/quidditch/gryffindor_practice.rpy @@ -105,7 +105,7 @@ label cc_gt_return: $ states.env.gold = 1984 $ states.env.day = 665 $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" call room("main_room") call cho_chibi(xpos="mid", ypos="base") diff --git a/game/scripts/characters/cho/events/quidditch/hufflepuff_match.rpy b/game/scripts/characters/cho/events/quidditch/hufflepuff_match.rpy index a76ac904..707ea27d 100644 --- a/game/scripts/characters/cho/events/quidditch/hufflepuff_match.rpy +++ b/game/scripts/characters/cho/events/quidditch/hufflepuff_match.rpy @@ -14,11 +14,11 @@ label start_hufflepuff_match: cho "Yes, [name_genie_cho]." ("base", "base", "base", "mid") gen "Well then, tomorrow it is!" ("grin", xpos="far_left", ypos="head") - if game.weather in {"rain", "storm"}: + if states.env.weather in {"rain", "storm"}: cho "Sounds great, [name_genie_cho]. I just hope it stops raining before then." ("soft", "base", "base", "R") - elif game.weather in {"snow", "blizzard"}: + elif states.env.weather in {"snow", "blizzard"}: cho "Sounds great, [name_genie_cho]. I just hope it stops snowing before then." ("soft", "base", "base", "R") - elif game.weather == "overcast": + elif states.env.weather == "overcast": cho "Sounds great, [name_genie_cho]. I just hope the weather doesn't get worse." ("soft", "base", "base", "R") else: cho "Sounds great, [name_genie_cho]. I just hope the weather stays like it is." ("soft", "base", "base", "R") diff --git a/game/scripts/characters/cho/events/quidditch/hufflepuff_practice.rpy b/game/scripts/characters/cho/events/quidditch/hufflepuff_practice.rpy index 84a7edbf..209cee14 100644 --- a/game/scripts/characters/cho/events/quidditch/hufflepuff_practice.rpy +++ b/game/scripts/characters/cho/events/quidditch/hufflepuff_practice.rpy @@ -9,7 +9,7 @@ label cc_ht_start: # First Hufflepuff match. gen "Ready to show off your panties to those badgering badgers?" ("base", xpos="far_left", ypos="head") - if game.weather in ("blizzard", "storm", "snow", "rain"): + if states.env.weather in ("blizzard", "storm", "snow", "rain"): cho "In this weather? But I'll freeze my legs off if I'm to wear a skirt..." ("clench", "base", "base", "R") cho "I'd rather not catch a cold during practice..." ("open", "base", "worried", "mid") gen "Alright." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/cho/events/quidditch/intros.rpy b/game/scripts/characters/cho/events/quidditch/intros.rpy index 420b748e..eb4ee140 100644 --- a/game/scripts/characters/cho/events/quidditch/intros.rpy +++ b/game/scripts/characters/cho/events/quidditch/intros.rpy @@ -1113,7 +1113,7 @@ label cho_quid_E12: # Genie visits cho during her training as requested - $ game.weather = "clear" + $ states.env.weather = "clear" gen "*Yawn*..." ("base", xpos="far_left", ypos="head") gen "I can't believe she made me wake up this early..." ("base", xpos="far_left", ypos="head") @@ -1509,7 +1509,7 @@ label cho_quid_E12: $ states.env.gold = 1984 $ states.env.day = 666 $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" $ hooch_chibi.zoom = 0.38 $ hooch_chibi.zorder = 4 call room("quidditch_pitch") @@ -1767,7 +1767,7 @@ label cho_quid_E14: with d5 stop weather fadeout 4 - $ game.weather = "clear" + $ states.env.weather = "clear" play sound "sounds/cloth_sound3.ogg" diff --git a/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy b/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy index bc96956d..c76f6db1 100644 --- a/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy +++ b/game/scripts/characters/cho/events/quidditch/slytherin_match.rpy @@ -76,7 +76,7 @@ label start_slytherin_match: label slytherin_match: # Quidditch match: Ravenclaw vs. Slytherin - $ game.weather = "clear" + $ states.env.weather = "clear" $ cho_outfit_last.save() $ her_outfit_last.save() @@ -363,7 +363,7 @@ label slytherin_match: call quidditch_stands(weather="overcast", tree_fire=True, rain=True, puddles=True) with flashbulb play weather "sounds/storm.ogg" fadeout 1.0 fadein 3.0 - $ game.weather = "rain" + $ states.env.weather = "rain" pause 1.0 sna "Indeed!" ("snape_02", ypos="head") @@ -685,7 +685,7 @@ label slytherin_match: call gen_chibi("stand_alt", 155, 420) #,210,40+250) with d3 - $ game.weather = "overcast" + $ states.env.weather = "overcast" play background "sounds/wind_long_loop.ogg" fadein 5 fadeout 2 call weather_sound play music "music/machinations-by-kevin-macleod.ogg" fadein 1 fadeout 1 if_changed diff --git a/game/scripts/characters/cho/events/requests/manipulate_girls.rpy b/game/scripts/characters/cho/events/requests/manipulate_girls.rpy index 0fad381e..4fe159c4 100644 --- a/game/scripts/characters/cho/events/requests/manipulate_girls.rpy +++ b/game/scripts/characters/cho/events/requests/manipulate_girls.rpy @@ -394,7 +394,7 @@ label cc_pr_manipulate_girls_T3_angelina: cho @ cheeks blush "" ("normal", "narrow", "base", "down", xpos="mid", ypos="base", trans=fade) - if game.weather == "rain": + if states.env.weather == "rain": gen "Whoa, you're soaking!" ("angry", xpos="far_left", ypos="head") cho @ cheeks blush "Oh, yes... I guess my clothes ended up a little wet..." ("base", "narrow", "base", "down") #Blushing else: diff --git a/game/scripts/characters/hermione/chitchats.rpy b/game/scripts/characters/hermione/chitchats.rpy index f79fd4ed..1f75989c 100644 --- a/game/scripts/characters/hermione/chitchats.rpy +++ b/game/scripts/characters/hermione/chitchats.rpy @@ -275,7 +275,7 @@ label hermione_chitchat: her "I am thankful that you keep on buying favours from me, [name_genie_hermione]..." ("open", "base", "worried", "R") her "" ("soft", "base", "base", "R") - block if game.weather in {"snow", "blizzard"}: + block if states.env.weather in {"snow", "blizzard"}: her "It's quite cold outside today, isn't it?" ("open", "base", "base", "mid") her "" ("soft", "base", "base", "mid") @@ -470,7 +470,7 @@ label hermione_chitchat: her "Sadly, the ones I've bought are already gone..." ("annoyed", "happyCl", "worried", "mid",emote="sweat") her "" ("base", "base", "base", "R") - block if game.weather in {"rain", "storm", "overcast"}: + block if states.env.weather in {"rain", "storm", "overcast"}: her "It certainly is chilly outside..." ("open", "base", "base", "mid") her "I hope it's going to start snowing soon..." ("base", "base", "base", "mid") her "You will let me wear a coat at least, right?" ("angry", "happyCl", "worried", "mid",emote="sweat") diff --git a/game/scripts/characters/hermione/events/clothing.rpy b/game/scripts/characters/hermione/events/clothing.rpy index 160b5825..e2d11516 100644 --- a/game/scripts/characters/hermione/events/clothing.rpy +++ b/game/scripts/characters/hermione/events/clothing.rpy @@ -8,7 +8,7 @@ label hermione_summon_setup: # # TODO: Remove obsolete variables and fix the code after clothes have been added. # - # if game.weather == "clear": + # if states.env.weather == "clear": # if states.her.tier >= 3 and states.env.daytime and not hg_muggle_hot_ITEM.unlocked: # $ hg_muggle_hot_ITEM.unlocked = True @@ -57,7 +57,7 @@ label hermione_summon_setup: # call unlock_clothing(text = "New clothing items for Hermione have been unlocked!", item = hg_muggle_hot_ITEM) - # if game.weather == "overcast": + # if states.env.weather == "overcast": # #One time event. # if not hg_accs_wool_g_ITEM.unlocked: @@ -120,7 +120,7 @@ label hermione_summon_setup: # # Raining - # if game.weather == "rain": + # if states.env.weather == "rain": # if states.her.tier >= 2 and not hg_muggle_rainy_ITEM.unlocked: # $ hg_muggle_rainy_ITEM.unlocked = True @@ -185,7 +185,7 @@ label hermione_summon_setup: # pause.5 #Shows Hermione with robe for a bit. # # Snow - # if game.weather in ("snow", "blizzard"): + # if states.env.weather in ("snow", "blizzard"): # if states.her.tier >= 2 and not hg_muggle_cold_ITEM.unlocked: # $ hg_muggle_cold_ITEM.unlocked = True diff --git a/game/scripts/characters/hermione/talk.rpy b/game/scripts/characters/hermione/talk.rpy index 198b5b8b..32326f21 100644 --- a/game/scripts/characters/hermione/talk.rpy +++ b/game/scripts/characters/hermione/talk.rpy @@ -490,7 +490,7 @@ label hermione_change: gen "I said mass flood!" ("angry", xpos="far_left", ypos="head") her "Mass flood?" ("soft", "base", "base", "mid") gen "Are you deaf or something?" ("base", xpos="far_left", ypos="head") - if game.weather == "rain": + if states.env.weather == "rain": her "I was pretty sure you said--" ("open", "base", "base", "mid") her "" ("normal", "base", "base", "R") gen "Look outside the window, it's raining is it not?" ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/luna/events/favors/suck_it.rpy b/game/scripts/characters/luna/events/favors/suck_it.rpy index 75190292..7aa0c0a0 100644 --- a/game/scripts/characters/luna/events/favors/suck_it.rpy +++ b/game/scripts/characters/luna/events/favors/suck_it.rpy @@ -841,7 +841,7 @@ label ll_pf_blowjob_T4_E3_intro: lun "Of course!" ("angry", "base", "base", "mid") "-Humour her-": if states.env.daytime: - if game.weather == "clear": #Sunny + if states.env.weather == "clear": #Sunny gen "Right..." ("base", xpos="far_left", ypos="head") lun "Can't you see the radiant joy on Mister Sun's face?" ("grin", "base", "base", "L") gen "Looks like the same burning ball of fire to me." ("base", xpos="far_left", ypos="head") diff --git a/game/scripts/characters/snape/chitchats.rpy b/game/scripts/characters/snape/chitchats.rpy index 412ff523..89c73857 100644 --- a/game/scripts/characters/snape/chitchats.rpy +++ b/game/scripts/characters/snape/chitchats.rpy @@ -29,7 +29,7 @@ label snape_chitchat: sna "Do you think you can break the girl?" ("snape_25") block: - if game.weather in ("rain", "blizzard"): + if states.env.weather in ("rain", "blizzard"): sna "Isn't the weather lovely today?" ("snape_02") sna "I wish it would stay like this forever." ("snape_06") else: diff --git a/game/scripts/characters/snape/events/hangouts.rpy b/game/scripts/characters/snape/events/hangouts.rpy index fe13d2a8..a0ff1d1a 100644 --- a/game/scripts/characters/snape/events/hangouts.rpy +++ b/game/scripts/characters/snape/events/hangouts.rpy @@ -70,7 +70,7 @@ label snape_hangout: label end_snape_hangout_points: if states.sna.level < 100: - if game.weather in {"rain", "storm"}: + if states.env.weather in {"rain", "storm"}: # Rain puts him in a good mood. $ states.sna.level += 1 diff --git a/game/scripts/characters/snape/events/intro.rpy b/game/scripts/characters/snape/events/intro.rpy index d2d183e6..f6eb0be8 100644 --- a/game/scripts/characters/snape/events/intro.rpy +++ b/game/scripts/characters/snape/events/intro.rpy @@ -5,7 +5,7 @@ # First time genie meets snape label snape_intro_E1: - $ game.weather = "clear" + $ states.env.weather = "clear" call weather_sound pause 1 diff --git a/game/scripts/doll/main.rpy b/game/scripts/doll/main.rpy index 29faf0b0..e009b85c 100644 --- a/game/scripts/doll/main.rpy +++ b/game/scripts/doll/main.rpy @@ -586,13 +586,13 @@ init python: for o in self.outfits: if o.unlocked and o.schedule["day" if states.env.daytime else "night"]: - if game.weather == "overcast" and o.schedule["cloudy"]: + if states.env.weather == "overcast" and o.schedule["cloudy"]: schedule.append(o) - elif game.weather in {"storm", "rain"} and o.schedule["rainy"]: + elif states.env.weather in {"storm", "rain"} and o.schedule["rainy"]: schedule.append(o) - elif game.weather in {"snow", "blizzard"} and o.schedule["snowy"]: + elif states.env.weather in {"snow", "blizzard"} and o.schedule["snowy"]: schedule.append(o) - elif game.weather in {"clear", "cloudy"} and not (o.schedule["cloudy"] or o.schedule["rainy"] or o.schedule["snowy"]): + elif states.env.weather in {"clear", "cloudy"} and not (o.schedule["cloudy"] or o.schedule["rainy"] or o.schedule["snowy"]): schedule.append(o) return schedule diff --git a/game/scripts/events/DayNight.rpy b/game/scripts/events/DayNight.rpy index 99e08c5c..84532207 100644 --- a/game/scripts/events/DayNight.rpy +++ b/game/scripts/events/DayNight.rpy @@ -81,7 +81,7 @@ label day_start: # Game flags states.env.day += 1 - game.weather = "random" + states.env.weather = "random" states.env.daytime = True cupboard_OBJ.foreground = Transform(Text(str((states.env.day % 30) + 1), color="#fff", outlines=[(1, "#000", 0, 0)]), pos=(40, 100)) @@ -193,7 +193,7 @@ label night_start: states.sus.busy = bool(sb_summon_pause) # Game flags - game.weather = "random" + states.env.weather = "random" states.env.daytime = False # Randomisers diff --git a/game/scripts/events/Start.rpy b/game/scripts/events/Start.rpy index 025f2df3..f0cf2a8b 100644 --- a/game/scripts/events/Start.rpy +++ b/game/scripts/events/Start.rpy @@ -47,7 +47,7 @@ label start_wt: jump genie_intro_E1 label genie_intro_E1: - $ game.weather = "clear" + $ states.env.weather = "clear" $ states.env.daytime = False $ states.env.day = 0 call send_letters @@ -74,7 +74,7 @@ label genie_intro_E1: dum1 "*Sounds of an old man sleeping like a baby*" pause 1 play sound "sounds/thunder_2.ogg" - $ game.weather = "storm" + $ states.env.weather = "storm" call weather_sound with flashbulb dum3 "Oh my!" @@ -98,7 +98,7 @@ label genie_intro_E1: play sound "sounds/magic4.ogg" $ desk_OBJ.idle = "ch_gen sit_behind_desk" - $ game.weather = "rain" + $ states.env.weather = "rain" call weather_sound with flash diff --git a/game/scripts/events/ending.rpy b/game/scripts/events/ending.rpy index faf75464..10965c02 100644 --- a/game/scripts/events/ending.rpy +++ b/game/scripts/events/ending.rpy @@ -2724,7 +2724,7 @@ label ball_ending_E2: hide screen notes hide screen bld1 - $ game.weather = "random" + $ states.env.weather = "random" call weather_sound show screen main_room diff --git a/game/scripts/events/quests.rpy b/game/scripts/events/quests.rpy index 76517230..4736a2f5 100644 --- a/game/scripts/events/quests.rpy +++ b/game/scripts/events/quests.rpy @@ -136,17 +136,17 @@ label quests: jump cho_intro_E1 if states.cho.ev.quidditch.hufflepuff_stage == "start": - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather $ states.cho.ev.quidditch.hufflepuff_stage = "return" jump hufflepuff_match elif states.cho.ev.quidditch.slytherin_stage == "start": - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather $ states.cho.ev.quidditch.slytherin_stage = "return" jump slytherin_match elif states.cho.ev.quidditch.gryffindor_stage == "start": - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather $ states.cho.ev.quidditch.gryffindor_stage = "return" jump gryffindor_match diff --git a/game/scripts/interface/map.rpy b/game/scripts/interface/map.rpy index 4f8fff8e..7c0e0f03 100644 --- a/game/scripts/interface/map.rpy +++ b/game/scripts/interface/map.rpy @@ -238,7 +238,7 @@ label set_her_map_location(location=""): if states.her.level < 11: $ states.her.map_location = __choice(("library", "library", "great_hall", "room_g", "room_g")) else: - if states.her.status.blowjob == True and game.weather in ("clear", "cloudy") and not states.env.daytime and not states.her.busy: + if states.her.status.blowjob == True and states.env.weather in ("clear", "cloudy") and not states.env.daytime and not states.her.busy: $ states.her.map_location = "forest" elif states.her.public_level < 12: diff --git a/game/scripts/minigames/mirror/events/a_bad_time_to_disrobe.rpy b/game/scripts/minigames/mirror/events/a_bad_time_to_disrobe.rpy index fa89f2f8..158a0f07 100644 --- a/game/scripts/minigames/mirror/events/a_bad_time_to_disrobe.rpy +++ b/game/scripts/minigames/mirror/events/a_bad_time_to_disrobe.rpy @@ -13,7 +13,7 @@ label a_bad_time_to_disrobe: # Setup $ hermione.equip(her_outfit_default) $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/a_christmas_tale.rpy b/game/scripts/minigames/mirror/events/a_christmas_tale.rpy index b508135a..4f61b21b 100644 --- a/game/scripts/minigames/mirror/events/a_christmas_tale.rpy +++ b/game/scripts/minigames/mirror/events/a_christmas_tale.rpy @@ -24,7 +24,7 @@ label a_christmas_tale: $ fireplace_OBJ.decoration = xmas_fireplace_ITEM stop weather $ states.env.daytime = False - $ game.weather = "snow" + $ states.env.weather = "snow" call room("main_room") stop music fadeout 1 call gen_chibi("hide") diff --git a/game/scripts/minigames/mirror/events/a_christmas_tale2.rpy b/game/scripts/minigames/mirror/events/a_christmas_tale2.rpy index 81d51617..2adbab71 100644 --- a/game/scripts/minigames/mirror/events/a_christmas_tale2.rpy +++ b/game/scripts/minigames/mirror/events/a_christmas_tale2.rpy @@ -34,7 +34,7 @@ label a_christmas_tale2(): $ hermione_chibi.zorder = 4 stop weather $ states.env.daytime = False - $ game.weather = "snow" + $ states.env.weather = "snow" call room("main_room") stop music fadeout 1 call gen_chibi("hide") diff --git a/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt b/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt index 4c0efdab..fa0aef4b 100644 --- a/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt +++ b/game/scripts/minigames/mirror/events/a_dark_room_NOT_IN_USE.txt @@ -80,11 +80,11 @@ label dark_room_main: stop bg_sounds #Stops playing the fire SFX. stop weather #Stops playing the rain SFX. if DRstates.env.day in [1,2,3,6,7]: - $ game.weather = "storm" + $ states.env.weather = "storm" elif DRstates.env.day in [4,5]: - $ game.weather = "clear" + $ states.env.weather = "clear" else: - $ game.weather = "random" + $ states.env.weather = "random" call weather_sound pause 2 @@ -274,7 +274,7 @@ label DRgame_leave_for_task: python: for i in DRgame.characters: if i.task in ["wood_cutting","hunting"]: - if game.weather in ("clear", "cloudy", "overcast"): + if states.env.weather in ("clear", "cloudy", "overcast"): i.location = "outside" elif i.force_task == True: i.location = "outside" @@ -299,9 +299,9 @@ label DRgame_return_from_task: #renpy.say(None,"[i.name] has gotten ill.") for i in DRgame.characters: #Hunting - if i.task == "hunting" and game.weather in ("clear", "cloudy", "overcast") or i.force_task == True: #They were hunting. + if i.task == "hunting" and states.env.weather in ("clear", "cloudy", "overcast") or i.force_task == True: #They were hunting. temp_item = 2 - if game.weather in ("blizzard", "snow", "storm", "rain"): + if states.env.weather in ("blizzard", "snow", "storm", "rain"): temp_item -= 1 if i.hp > 1: i.hp -= 1 @@ -321,7 +321,7 @@ label DRgame_return_from_task: #renpy.say(None,"[i.name] has gotten ill.") DRgame.meat += temp_item renpy.say(None,"[i.name] came back from the hunt, hungry and freezing.") - if game.weather in ("blizzard", "snow", "storm", "rain"): + if states.env.weather in ("blizzard", "snow", "storm", "rain"): renpy.say(None,"The cold rains have shown its mark on them...") if temp_item >= 5: renpy.say(None,"A large deer on their back. This will last a couple of days.") @@ -341,9 +341,9 @@ label DRgame_return_from_task: #renpy.say(None,"[i.name] has gotten ill.") renpy.say(None,"They were unsuccessful and couldn't find any wild animals in the thick snow.") #Wood Chopping/Gathering - if i.task == "chopping_wood" and game.weather in ("clear", "cloudy", "overcast") or i.force_task == True: #They were gathering wood/chopping wood. + if i.task == "chopping_wood" and states.env.weather in ("clear", "cloudy", "overcast") or i.force_task == True: #They were gathering wood/chopping wood. temp_item = 3 - if game.weather in ("blizzard", "snow", "storm", "rain"): + if states.env.weather in ("blizzard", "snow", "storm", "rain"): temp_item -= 1 if i.hp > 1: i.hp -= 1 @@ -756,7 +756,7 @@ label DRgame_chop_wood: "Exhausted you return to the cabin..." "You were able to gather and chop [temp_number] pieces of wood." - if game.weather in ("blizzard", "snow", "storm", "rain"): + if states.env.weather in ("blizzard", "snow", "storm", "rain"): $ DRplayer.hp -= 1 "The ruthless weather has shown its mark on you. You shouldn't have gone out there." "But there was no other choice..." @@ -781,7 +781,7 @@ label DRgame_hunt_animals: $ temp_number += 1 if DRplayer.random_number in [4]: $ temp_number -= 1 - if game.weather in ("blizzard", "snow", "storm", "rain"): + if states.env.weather in ("blizzard", "snow", "storm", "rain"): $ temp_number -= 1 $ DRgame.meat += temp_number @@ -799,7 +799,7 @@ label DRgame_hunt_animals: else: "You found a small fox. Should be good enough to eat..." - if game.weather in ("blizzard", "snow", "storm", "rain"): + if states.env.weather in ("blizzard", "snow", "storm", "rain"): $ DRplayer.hp -= 1 "The ruthless weather has shown its mark on you. You shouldn't have gone out there." "But there was no other choice..." diff --git a/game/scripts/minigames/mirror/events/a_spaced_out_conversation.rpy b/game/scripts/minigames/mirror/events/a_spaced_out_conversation.rpy index e1a27ab8..05aa7657 100644 --- a/game/scripts/minigames/mirror/events/a_spaced_out_conversation.rpy +++ b/game/scripts/minigames/mirror/events/a_spaced_out_conversation.rpy @@ -3,7 +3,7 @@ label a_spaced_out_conversation: # Setup $ fireplace_OBJ.foreground = "fireplace_fire" $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" $ chair_OBJ.hidden = True stop weather call room("main_room") diff --git a/game/scripts/minigames/mirror/events/a_white_christmas.rpy b/game/scripts/minigames/mirror/events/a_white_christmas.rpy index 2dd46b73..f0a01b68 100644 --- a/game/scripts/minigames/mirror/events/a_white_christmas.rpy +++ b/game/scripts/minigames/mirror/events/a_white_christmas.rpy @@ -38,7 +38,7 @@ label a_white_christmas: $ hermione.equip(her_outfit_wrestling) stop weather $ states.env.daytime = False - $ game.weather = "snow" + $ states.env.weather = "snow" call room("main_room") call gen_chibi("sit_behind_desk") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy b/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy index 517277df..70c6f587 100644 --- a/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy +++ b/game/scripts/minigames/mirror/events/an_odd_circumstance.rpy @@ -12,7 +12,7 @@ label an_odd_circumstance: stop weather $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" $ states.env.day = 69 $ states.env.gold = 420 $ hermione.equip(her_outfit_default) diff --git a/game/scripts/minigames/mirror/events/anal_pirate_event.rpy b/game/scripts/minigames/mirror/events/anal_pirate_event.rpy index 2392c5fc..32ed9c96 100644 --- a/game/scripts/minigames/mirror/events/anal_pirate_event.rpy +++ b/game/scripts/minigames/mirror/events/anal_pirate_event.rpy @@ -19,7 +19,7 @@ label anal_pirate_event: # Setup $ hermione.equip(her_outfit_default) $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/biggus_dickus.rpy b/game/scripts/minigames/mirror/events/biggus_dickus.rpy index 7bf36086..22db0cde 100644 --- a/game/scripts/minigames/mirror/events/biggus_dickus.rpy +++ b/game/scripts/minigames/mirror/events/biggus_dickus.rpy @@ -4,7 +4,7 @@ label biggus_dickus: # Setup $ hermione.equip(her_outfit_default) $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") play music "music/Music for Manatees.ogg" fadein 1 if_changed diff --git a/game/scripts/minigames/mirror/events/blueballing_bad.rpy b/game/scripts/minigames/mirror/events/blueballing_bad.rpy index 40904272..5f7e3cca 100644 --- a/game/scripts/minigames/mirror/events/blueballing_bad.rpy +++ b/game/scripts/minigames/mirror/events/blueballing_bad.rpy @@ -6,7 +6,7 @@ label blueballing_bad: $ hermione.equip(her_outfit_default) $ tonks.equip(ton_outfit_default) $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather stop music fadeout 1 show screen blkfade diff --git a/game/scripts/minigames/mirror/events/eating_for_pleasure.rpy b/game/scripts/minigames/mirror/events/eating_for_pleasure.rpy index 9abeb373..476ef99b 100644 --- a/game/scripts/minigames/mirror/events/eating_for_pleasure.rpy +++ b/game/scripts/minigames/mirror/events/eating_for_pleasure.rpy @@ -7,7 +7,7 @@ label eating_for_pleasure: # Setup $ hermione.equip(her_outfit_default) $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/genie_house_elf.rpy b/game/scripts/minigames/mirror/events/genie_house_elf.rpy index 59383747..365305b5 100644 --- a/game/scripts/minigames/mirror/events/genie_house_elf.rpy +++ b/game/scripts/minigames/mirror/events/genie_house_elf.rpy @@ -4,7 +4,7 @@ label genie_house_elf: # Setup $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/genies_christmas_wish.rpy b/game/scripts/minigames/mirror/events/genies_christmas_wish.rpy index 3abf9a8f..ad5ebcf0 100644 --- a/game/scripts/minigames/mirror/events/genies_christmas_wish.rpy +++ b/game/scripts/minigames/mirror/events/genies_christmas_wish.rpy @@ -32,7 +32,7 @@ label genies_christmas_wish: stop weather $ states.env.daytime = False - $ game.weather = "snow" + $ states.env.weather = "snow" call room("main_room") stop music fadeout 1 show screen blkfade diff --git a/game/scripts/minigames/mirror/events/not_so_great_escape.rpy b/game/scripts/minigames/mirror/events/not_so_great_escape.rpy index 2fd85df0..c94e391d 100644 --- a/game/scripts/minigames/mirror/events/not_so_great_escape.rpy +++ b/game/scripts/minigames/mirror/events/not_so_great_escape.rpy @@ -28,7 +28,7 @@ label not_so_great_escape: $ cho.equip(cho_outfit_police) $ luna.equip(lun_outfit_police) $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/panty_raid.rpy b/game/scripts/minigames/mirror/events/panty_raid.rpy index eaa6b315..073cc057 100644 --- a/game/scripts/minigames/mirror/events/panty_raid.rpy +++ b/game/scripts/minigames/mirror/events/panty_raid.rpy @@ -10,7 +10,7 @@ label panty_raid: # Setup $ hermione.equip(her_outfit_default) $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy b/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy index 802d809d..9bb478c2 100644 --- a/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy +++ b/game/scripts/minigames/mirror/events/previously_at_hogwarts.rpy @@ -4,7 +4,7 @@ label prev_at_hogwarts: # Setup $ hermione.equip(her_outfit_default) $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" $ states.env.day = 1 $ states.env.gold = 0 $ desk_OBJ.idle = "desk_dumbledore" @@ -88,7 +88,7 @@ label prev_at_hogwarts: play sound "sounds/magic4.ogg" $ desk_OBJ.idle = "ch_gen sit_behind_desk" - $ game.weather = "rain" + $ states.env.weather = "rain" call weather_sound with flash diff --git a/game/scripts/minigames/mirror/events/suck_and_run.rpy b/game/scripts/minigames/mirror/events/suck_and_run.rpy index 16f60ef8..abd237a3 100644 --- a/game/scripts/minigames/mirror/events/suck_and_run.rpy +++ b/game/scripts/minigames/mirror/events/suck_and_run.rpy @@ -15,7 +15,7 @@ label suck_and_run: # Setup $ tonks.equip(ton_outfit_default) $ states.env.daytime = False - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/minigames/mirror/events/whose_points.rpy b/game/scripts/minigames/mirror/events/whose_points.rpy index 279fe4c5..4a562114 100644 --- a/game/scripts/minigames/mirror/events/whose_points.rpy +++ b/game/scripts/minigames/mirror/events/whose_points.rpy @@ -7,7 +7,7 @@ label whose_points: $ astoria.equip(ast_outfit_default) $ luna.equip(lun_outfit_default) $ states.env.daytime = True - $ game.weather = "clear" + $ states.env.weather = "clear" stop weather call room("main_room") stop music fadeout 1 diff --git a/game/scripts/rooms/main_room/init.rpy b/game/scripts/rooms/main_room/init.rpy index 075c4ed7..14c6c275 100644 --- a/game/scripts/rooms/main_room/init.rpy +++ b/game/scripts/rooms/main_room/init.rpy @@ -92,7 +92,7 @@ screen main_room(): if room_menu_active and states.env.day > 1 and not renpy.android: use hotkeys_main - add "weather [game.weather]" xycenter (430, 218) + add "weather [states.env.weather]" xycenter (430, 218) # Walls if states.env.daytime: diff --git a/game/scripts/rooms/main_room/objects/desk.rpy b/game/scripts/rooms/main_room/objects/desk.rpy index b159a1a8..d52a9186 100644 --- a/game/scripts/rooms/main_room/objects/desk.rpy +++ b/game/scripts/rooms/main_room/objects/desk.rpy @@ -248,11 +248,11 @@ screen watch(): $ watch_x = 603 +67 $ watch_y = 35 - if game.weather == "rain": + if states.env.weather == "rain": add "interface/desk/watch/rain.webp" xpos watch_x ypos watch_y - elif game.weather in ("snow", "blizzard"): + elif states.env.weather in ("snow", "blizzard"): add "interface/desk/watch/snow.webp" xpos watch_x ypos watch_y - elif game.weather == "storm": + elif states.env.weather == "storm": add "interface/desk/watch/storm.webp" xpos watch_x ypos watch_y else: if states.env.daytime: diff --git a/game/scripts/rooms/main_room/objects/weather.rpy b/game/scripts/rooms/main_room/objects/weather.rpy index d9e7e5b4..d989d5e3 100644 --- a/game/scripts/rooms/main_room/objects/weather.rpy +++ b/game/scripts/rooms/main_room/objects/weather.rpy @@ -1,9 +1,9 @@ label weather_sound: - if game.weather == "blizzard": + if states.env.weather == "blizzard": play weather "sounds/blizzard.ogg" fadeout 0.5 fadein 0.5 if_changed - elif game.weather == "storm": + elif states.env.weather == "storm": play weather "sounds/storm.ogg" fadeout 0.5 fadein 0.5 if_changed - elif game.weather == "rain": + elif states.env.weather == "rain": play weather "sounds/storm.ogg" fadeout 0.5 fadein 0.5 if_changed # TODO: Rain sound (without thunder) else: stop weather fadeout 0.5 diff --git a/game/scripts/rooms/quidditch_pitch/init.rpy b/game/scripts/rooms/quidditch_pitch/init.rpy index 7b040427..e19d72e2 100644 --- a/game/scripts/rooms/quidditch_pitch/init.rpy +++ b/game/scripts/rooms/quidditch_pitch/init.rpy @@ -3,7 +3,7 @@ screen quid_pitch_back(): sensitive False zorder 0 add "images/rooms/quidditch_pitch/back.webp" zoom 0.5 - if game.weather == "cloudy": + if states.env.weather == "cloudy": for i in range(random.randint(2, 5)): add OBJcloud add "images/rooms/quidditch_pitch/back_overlay.webp" zoom 0.5