Skip to content

Consider special treatment for some types of variables in replace_variables() #270

@Jeremi360

Description

@Jeremi360

I think thatreplace_variables() in some cases should do more that just str(value_of_var).
For example now it makes using Color values need in text needs a workaround.
As str(some_color) returns (0-1, 0-1, 0-1, 0-1) and should #hex_color to be useful.

Like mentioned in Note at Advanced Text Docs:

Current way RDS uses very raw way of converting RakuVars values to strings.
Because of this to use color in text like in example below there is need to use workaround:
GDScript Rakugo.set_variable("test_color", "#" + Color(1, 0.5, 1))

We just need to add special case for Color type and maybe other.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions