Skip to main content
Verticopolis engineGitHub

stamp_save

Function stamp_save 

Source
pub fn stamp_save(
    save: &mut Value,
    app_version: &str,
    saved_at_ms: f64,
) -> Result<(), String>
Expand description

Stamps save JSON with the app that wrote it and when, as the web game does before writing a file. app_version names your host and its version (it must not read as a build older than 2.0, which the web game takes for a founder’s tower); saved_at_ms is the time in milliseconds since the Unix epoch. Refuses JSON that is not a tower.