src/genscript.c
SCRIPT_CONT obj_script_cont(struct obj_data* obj) {
	SCRIPT_CONT x;

	x.write_level = 0;

	if (!obj) {
		x.data = NULL;
		x.cont_id = 0;
		x.cont_type = SCRIPT_NULL;

		return x;
	}

	x.write_level = MUT_R|MUT_W;
	x.data = obj;
	x.cont_type = SCRIPT_OBJECT;
	x.cont_id = GET_ID(obj);
	return x;
}
/**
 * Convert a pointer to an object to a script reference to it
 */
Convert a pointer to an object to a script reference to it
Convert a pointer to an object to a script reference to it
SCRIPT_CONT obj_script_cont(struct obj_data* obj) {
	SCRIPT_CONT x;
	x.write_level = 0;
	if (!obj) {
		x.data = NULL;
		x.cont_id = 0;
		x.cont_type = SCRIPT_NULL;
		return x;
	}
	x.write_level = MUT_R|MUT_W;
	x.data = obj;
	x.cont_type = SCRIPT_OBJECT;
	x.cont_id = GET_ID(obj);
	return x;
}
SCRIPT_CONT obj_script_cont ( struct obj_data * obj ) { SCRIPT_CONT x ; x . write_level = 0 ; if ( ! obj ) { x . data = NULL ; x . cont_id = 0 ; x . cont_type = SCRIPT_NULL ; return x ; } x . write_level = MUT_R | MUT_W ; x . data = obj ; x . cont_type = SCRIPT_OBJECT ; x . cont_id = GET_ID ( obj ) ; return x ; }
Convert a pointer to an object to a script reference to it
Convert a pointer to an object to a script reference to it