I have these tables,
A blank train metatable would look like:
Table1 = {
["Stabling"] = true,
["Train"] = Model, --A model containing all carriages
["Units"] = {} --This holds all the metatables for each unit.
}
}
A blank Unit metatable would look like:
[Instance] = ▼ {
["Cabs"] = ▼ {
["North"] = ▼ {
["EndLights"] = "H&D",
["Headlights"] = "Low",
["MasterKey"] = false,
},
["South"] = {} --Same as Cabs.North
},
["Doors"] = {}, --This will soon contain a class of doors with references back to the unit and the train the door is apart of.
["Train"] = "*** cycle table reference detected ***", --This is Table1
["Unit"] = Unit1, --This is a model for the dual carriage
["UnitNumber"] = 1320
}
A complete one would be
Table1 = {
["Stabling"] = true,
["Train"] = Model, --A model containing all carriages
["Units"] = ▼ { --This holds all the metatables for each unit.
[Instance(1,91D58C044F95C9EA)] = ▼ {
["Cabs"] = ▼ {
["North"] = ▼ {
["EndLights"] = "H&D",
["Headlights"] = "Low",
["MasterKey"] = false,
},
["South"] = ▶ {...} --Same as Cabs.North
},
["Doors"] = {},
["Train"] = "*** cycle table reference detected ***", --This is Table1
["Unit"] = Unit1, --This is a model for the dual carriage
["UnitNumber"] = 1320
}
}
}
In the MultipleUnit module, there needs to be a way for me to get the train class that that unit is apart of and in the train module there needs to be a way for me to get each unit class for each unit thats apart of the train and in the doors module there needs to be a way for me to get the Unit and Train class that doors apart of so there is alot of cycle table referencing. Does this have any performance impact or doesn’t make a difference?