If rich text is included into event data, that data is sometimes not properly transferred to event listeners. Two mods are attached to reproduce the issue. This is what serpent.block output looks like for sender and receiver:
Code: Select all
639.717 Script @__sender__/control.lua:12: Data, before event raised:
{
string1 = "[img=item/express-transport-belt] String A",
string2 = "[img=item/express-transport-belt] String B" --< this is fed into raise_event
}
639.718 Script @__receiver__/control.lua:3: Event received:
{
data = {
string1 = "[img=item/express-transport-belt] String A",
string2 = "[img=item/express-transport-belt] String A" --< this is what is received
},
mod_name = "sender",
name = 145,
tick = 300
}
639.718 Script @__sender__/control.lua:19: Data, before event raised:
{
string1 = "[img=item/express-transport-belt] A",
string2 = "[img=item/express-transport-belt] B"
}
639.718 Script @__receiver__/control.lua:3: Event received:
{
data = {
string1 = "[img=item/express-transport-belt] A",
string2 = "[img=item/express-transport-belt] B"
},
mod_name = "sender",
name = 145,
tick = 300
}
The example mods should work in any game. Sender raises an event twice (with slightly different data) every 60 ticks to which receiver is subscribed.