ILAB OLC Beta 1.1
Jason Dinkel
May. 15 1995
SAVE.C
This file contains modifications needed to stock Envy 1.0 save.c.
Only the lines commented with /* OLC */ need to be added. The surrounding
code is for getting ones bearings.
The only modifications is the saving and loading of builder security.
The higher the security the better. If a room has a security lower than
a player then the player can edit the room. Look at IS_BUILDER in olc.h.
---- FUNCTION: fwrite_char
fprintf( fp, "Trst %d\n", ch->trust );
fprintf( fp, "Security %d\n", ch->pcdata->security ); /* OLC */
fprintf( fp, "Wizbt %d\n", ch->wizbit );
---- FUNCTION: load_char_obj
ch->pcdata->condition[COND_FULL] = 48;
ch->pcdata->pagelen = 20;
ch->pcdata->security = 0; /* OLC */
---- FUNCTION: fread_char
KEY( "Sx", ch->sex, fread_number( fp ) );
KEY( "ShtDsc", ch->short_descr, fread_string( fp ) );
KEY( "Security", ch->pcdata->security, fread_number( fp ) ); /* OLC */
---- FUNCTION: fread_obj REPLACEment for vnum check
This takes care of unknown objects being loaded.
if ( !str_cmp( word, "Vnum" ) ) /* OLC */
{
int vnum;
vnum = fread_number( fp );
if ( !( obj->pIndexData = get_obj_index( vnum ) ) )
obj->pIndexData = get_obj_index( OBJ_VNUM_DUMMY );
fVnum = TRUE;
fMatch = TRUE;
break;
}
break;
END OF FILE SAVE.C