public void Deserialize(EntityPropsRobot entity_props, JObject root) { entity_props.ai_override = root["ai_override"].GetInt(); entity_props.station = root["station"].GetBool(); entity_props.headlight = root["headlight"].GetBool(); entity_props.ng_plus = root["ng_plus"].GetBool(); entity_props.super = root["super"].GetBool(); entity_props.variant = root["variant"].GetBool(); entity_props.hidden = root["hidden"].GetBool(); entity_props.stasis = root["stasis"].GetBool(); entity_props.bonus_drop1 = root["bonus_drop1"].GetEnum <ItemPrefab>(ItemPrefab.none); entity_props.bonus_drop2 = root["bonus_drop2"].GetEnum <ItemPrefab>(ItemPrefab.none); entity_props.replace_default_drop = root["replace_default_drop"].GetBool(); }
// ROBOT public void Serialize(EntityPropsRobot entity_props, JObject root) { root["ai_override"] = entity_props.ai_override.ToString(); root["station"] = entity_props.station.ToString(); root["headlight"] = entity_props.headlight.ToString(); root["ng_plus"] = entity_props.ng_plus.ToString(); root["super"] = entity_props.super.ToString(); root["variant"] = entity_props.variant.ToString(); root["hidden"] = entity_props.hidden.ToString(); root["stasis"] = entity_props.stasis.ToString(); root["bonus_drop1"] = entity_props.bonus_drop1.ToString(); root["bonus_drop2"] = entity_props.bonus_drop2.ToString(); root["replace_default_drop"] = entity_props.replace_default_drop.ToString(); }