When the thing's been deleted.
When the thing's been deleted.
When the thing's been made.
This is called when a /datum is read from a /savefile. The /savefile being read from is passed as the first argument. The return value is ignored.
Example:
//create a demonstrator datum type
/datum/test
= 1
//define our demonstrator Read() proc
savefile/F)
( src.test_var = 2
//create an instance of /savefile and our /datum/test
= new()
= new()
//store the test datum in the savefile
my_savefile["test"] = T
//read the test datum from the savefile. This calls /datum/test/Read()
= my_savefile["test"]
//test_var is now 2, because Read() was called
ASSERT(T2.test_var == 2)
This one is a lot more involved and I can't write a one liner as an example! Whoops.
When the thing's been writen.