ID:139175
 
Code:
client
New()
spawn()
if(fexists("Savefiles/[key].sav"))
var/savefile/F = new("Savefiles/[key].sav")
F["mob"] >> mob
for(var/obj/digimon/O in mob.partner)
O.loc = mob.loc
step(O,mob.dir)
var/B1=new/obj/bars/healthbar(O:loc)
O.overlays+=B1
B1:barowner=O
B1:refresh()
return ..()

Del()
var/savefile/F = new("Savefiles/[key].sav")
for(var/obj/digimon/O in mob.partner)
if(O.evo>0)
O.dedigivolve()
O.loc=mob.digimon
F["mob"] << mob
..()

mob
Write(var/savefile/F)
..()
F["x"] << x
F["y"] << y
F["z"] << z
Read(var/savefile/F)
..()
loc = locate(F["x"], F["y"], F["z"])


mob/proc
window()
var/i=1
winset(src,"grid",{"cells="1x[digicount+1]""})
for(var/obj/digimon/D in src.digimon)
src<<output(D,"grid:1,[++i]")

Problem description:
Practically everything saves but the grid and the things in it. I'm just not really sure what the problem is. Most of the procs in the code shouldnt or have no relation to the grid, so those shouldnt be the problem.
UI elements are not part of a mob and therefore will not be saved in a savefile. As most UI elements are derived information (representing the game state rather than actually storing it), this makes sense. You should just call window() again after lading the mob to regenerate it.