Fix saves most saves, fix phone being fukd

This commit is contained in:
Legalo 2024-04-22 15:16:13 -03:00 committed by Map
parent b0b0438f55
commit feaa5908b5
2 changed files with 38 additions and 3 deletions

View File

@ -867,3 +867,39 @@ label end_of_demo:
# This is so fucking stupid
image nothing = Transform("#000000", alpha=0)
python early:
# RoundedFrame by pseurae
# https://gist.github.com/Pseurae/661e6084f756fc917b2889a386b16664
# modified by yours truly (i don't know shit about OpenGL)
class RoundedFrame(renpy.display.image.Frame):
def __init__(self, image, *args, **kwargs):
radius = kwargs.pop("radius", 0.0)
outline_width = kwargs.pop("outline_width", 0.0)
outline_color = kwargs.pop("outline_color", "#fff")
super(RoundedFrame, self).__init__(image, *args, **kwargs)
if not isinstance(radius, tuple): radius = (radius,) * 4
self.radius = radius
self.outline_width = outline_width
self.outline_color = normalize_color(Color(outline_color))
def render(self, w, h, st, at):
rv = super(RoundedFrame, self).render(w, h, st, at)
if self.radius:
rv.mesh = True
rv.add_property("gl_pixel_perfect", True)
rv.add_property("gl_mipmap", False)
rv.add_property("texture_scaling", "nearest")
rv.add_shader("shader.rounded_corners")
rv.add_uniform("u_radius", self.radius)
rv.add_uniform("u_outline_width", self.outline_width)
rv.add_uniform("u_outline_color", self.outline_color)
return rv
init python:
config.developer = True

View File

@ -200,9 +200,8 @@ screen _chat_messages():
if i != phone.discussion._group_chat.number_of_messages-1 or renpy.get_screen("say"):
text p.data alt ""
else:
$ sender = __(phone.character.character(p.source).short_name)
text p.data alt sender + ": " + p.data
# $print(dir(phone.discussion._group_chat))
$ sender = phone.character.character(str(p.source))
text p.data alt str(sender.name) + ": " + __(p.data)
elif p.type == phone.discussion._PayloadTypes.IMAGE:
use _chat_message(p):