Remove nonsense calls of getattr

This commit is contained in:
Gouvernathor 2024-04-01 23:10:15 +02:00
parent 56d6abea1a
commit 7ca17b7ba7
3 changed files with 36 additions and 36 deletions

View File

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

View File

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

View File

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