Remove nonsense calls of getattr

(cherry picked from commit 7ca17b7ba7)
This commit is contained in:
Gouvernathor 2024-04-01 23:10:15 +02:00 committed by LoafyLemon
parent 224194754f
commit d8751d73b9
3 changed files with 36 additions and 36 deletions

View File

@ -156,8 +156,8 @@ init -1 python:
if config.developer:
def __setattr__(self, attr, value):
if hasattr(self, attr) and getattr(self, attr) != value:
id = getattr(self, "id")
if getattr(self, attr, not value) != value:
id = self.id
rollback = f"{stdcol.UNDERLINE}(Rollback){stdcol.END} " if renpy.in_rollback() else ""
caller_id = renpy.get_filename_line()

View File

@ -3,7 +3,7 @@ init -999:
import json
import os
if not getattr(persistent, "mods_enabled"):
if not persistent.mods_enabled:
persistent.mods_enabled = _set()
mods_list = _dict()

View File

@ -144,7 +144,7 @@ init python:
# In case the player already started the event chain, send the letter early.
letter_cards_store.send()
getattr(store, "letter_cards_store").wait = 7
store.letter_cards_store.wait = 7
# Fix revertable types for modding
mods_enabled = getattr(persistent, "mods_enabled", _set()) or _set()
@ -154,7 +154,7 @@ init python:
setattr(persistent, "mods_list", _dict(mods_list))
# Fix event issue with Cho
ev = getattr(store, "cho_ev_inspect_her_body_t2_e3")
ev = store.cho_ev_inspect_her_body_t2_e3
if ev.completed and not states.cho.ev.inspect_her_body.T2_E3_complete:
states.cho.ev.inspect_her_body.T2_E3_complete = True
@ -169,39 +169,39 @@ init python:
k.modpath = "mods/" + k.modpath.split("/")[-1]
if current < 1.46:
getattr(store, "her_ev_cumslut_public_t5_e1").label = "hg_pr_cumslut_T5_return"
getattr(store, "her_ev_cumslut_public_t5_e1").reset()
getattr(store, "her_ev_cumslut_public_t5_e1").dequeue()
getattr(store, "her_ev_cumslut_public_t5_e2").label = "hg_pr_cumslut_T5_return"
getattr(store, "her_ev_cumslut_public_t5_e2").reset()
getattr(store, "her_ev_cumslut_public_t5_e2").dequeue()
getattr(store, "her_ev_cumslut_public_t5_e3").label = "hg_pr_cumslut_T5_return"
getattr(store, "her_ev_cumslut_public_t5_e3").reset()
getattr(store, "her_ev_cumslut_public_t5_e3").dequeue()
getattr(store, "her_ev_cumslut_public_t5_e1_hub").label = "hg_pr_cumslut"
getattr(store, "her_ev_cumslut_public_t5_e1_hub").req = "states.her.tier == 5"
getattr(store, "her_ev_cumslut_public_t5_e1_hub").reset()
getattr(store, "her_ev_cumslut_public_t5_e2_hub").label = "hg_pr_cumslut"
getattr(store, "her_ev_cumslut_public_t5_e2_hub").req = "states.her.tier == 5"
getattr(store, "her_ev_cumslut_public_t5_e2_hub").reset()
getattr(store, "her_ev_cumslut_public_t5_e3_hub").label = "hg_pr_cumslut"
getattr(store, "her_ev_cumslut_public_t5_e3_hub").req = "states.her.tier == 5"
getattr(store, "her_ev_cumslut_public_t5_e3_hub").reset()
store.her_ev_cumslut_public_t5_e1.label = "hg_pr_cumslut_T5_return"
store.her_ev_cumslut_public_t5_e1.reset()
store.her_ev_cumslut_public_t5_e1.dequeue()
store.her_ev_cumslut_public_t5_e2.label = "hg_pr_cumslut_T5_return"
store.her_ev_cumslut_public_t5_e2.reset()
store.her_ev_cumslut_public_t5_e2.dequeue()
store.her_ev_cumslut_public_t5_e3.label = "hg_pr_cumslut_T5_return"
store.her_ev_cumslut_public_t5_e3.reset()
store.her_ev_cumslut_public_t5_e3.dequeue()
store.her_ev_cumslut_public_t5_e1_hub.label = "hg_pr_cumslut"
store.her_ev_cumslut_public_t5_e1_hub.req = "states.her.tier == 5"
store.her_ev_cumslut_public_t5_e1_hub.reset()
store.her_ev_cumslut_public_t5_e2_hub.label = "hg_pr_cumslut"
store.her_ev_cumslut_public_t5_e2_hub.req = "states.her.tier == 5"
store.her_ev_cumslut_public_t5_e2_hub.reset()
store.her_ev_cumslut_public_t5_e3_hub.label = "hg_pr_cumslut"
store.her_ev_cumslut_public_t5_e3_hub.req = "states.her.tier == 5"
store.her_ev_cumslut_public_t5_e3_hub.reset()
getattr(store, "lun_ev_talk_to_me_t3_e1").req = "states.lun.tier == 3"
getattr(store, "lun_ev_talk_to_me_t3_e1").reset()
store.lun_ev_talk_to_me_t3_e1.req = "states.lun.tier == 3"
store.lun_ev_talk_to_me_t3_e1.reset()
getattr(store, "lun_ev_inspect_her_body_t3_e1").req = "states.lun.tier == 3"
getattr(store, "lun_ev_inspect_her_body_t3_e1").reset()
store.lun_ev_inspect_her_body_t3_e1.req = "states.lun.tier == 3"
store.lun_ev_inspect_her_body_t3_e1.reset()
getattr(store, "lun_ev_play_with_yourself_t3_e1").req = "states.lun.tier == 3"
getattr(store, "lun_ev_play_with_yourself_t3_e1").reset()
getattr(store, "lun_ev_play_with_yourself_t3_e2").req = "states.lun.tier == 3"
getattr(store, "lun_ev_play_with_yourself_t3_e2").reset()
getattr(store, "lun_ev_play_with_yourself_t3_e3").req = "states.lun.tier == 3"
getattr(store, "lun_ev_play_with_yourself_t3_e3").reset()
getattr(store, "lun_ev_play_with_yourself_t3_e4").req = "states.lun.tier == 3"
getattr(store, "lun_ev_play_with_yourself_t3_e4").reset()
store.lun_ev_play_with_yourself_t3_e1.req = "states.lun.tier == 3"
store.lun_ev_play_with_yourself_t3_e1.reset()
store.lun_ev_play_with_yourself_t3_e2.req = "states.lun.tier == 3"
store.lun_ev_play_with_yourself_t3_e2.reset()
store.lun_ev_play_with_yourself_t3_e3.req = "states.lun.tier == 3"
store.lun_ev_play_with_yourself_t3_e3.reset()
store.lun_ev_play_with_yourself_t3_e4.req = "states.lun.tier == 3"
store.lun_ev_play_with_yourself_t3_e4.reset()
if states.lun.tier == 3:
states.lun.level = 9
@ -212,7 +212,7 @@ init python:
doll.body.matrix = IdentityMatrix()
if current < 1.461:
getattr(store, "ton_accessory_office").zorder = 235
store.ton_accessory_office.zorder = 235
if current < 1.462:
lun_ev_blowjob_t4_e1.enqueue()