Eliminate more uses of eval

This commit is contained in:
Gouvernathor 2024-04-04 22:55:15 +02:00
parent dfd7972752
commit e9ec437d1c

View File

@ -18,7 +18,7 @@ init 5 python:
self.zoom = zoom
self.pos = (0,0)
self.xzoom = 1
self.char = eval(name)
self.char = states.dolls[name]
self.poses = {}
# Animation
@ -216,11 +216,9 @@ init 5 python:
self.set_pose(pose or self.walk)
# Note: Warper names and their count can change over time,
# so it's easier to just evaluate the input.
# List of available warpers:
# https://www.renpy.org/doc/html/atl.html?#warpers
warper = eval(f"_warper.{warper}")
warper = getattr(_warper, warper)
distances = []
times = []