Dog // Custom datum
var
name
/list/items // list of /item's
item // Custom datum
var
name
desc
price
var/Dog/Big_daddy = new() // Global variable of are datum
proc/Get_item_name(index)
var/list/L = Big_daddy.items
var/item/I = items[index]
return I.name
proc/Save_item_name(index,value)
var/list/L = Big_daddy.items
var/item/I = items[index]
I.name = value
items[index] = I // Is this part needed?
So how does the referencing work in byond? L = Big_daddy.items. Whats that do? Does it copy all of the items to a new L? What if I would have made a new L and then Add each item from items to the new list. Is that copying?
What about items[index] = I? Does that have any effect at all?
Help all this strange stuff is drving me up the wall.