Skip to main content

building.reset_site_to_last_saved

Overview

  • [Build Mode Only] DESTRUCTIVE. Discards every edit made in this build-mode session and restores the site (objects, walls and household inventory) to the snapshot captured on entry, settling the price difference. This is the closest thing to a 'discard changes' operation - build.exit_mode always commits. Requires confirm_phrase="reset to last saved" and phase == 'ready' (see build.get_mode_state).

Metadata

FieldValue
DisplayReset Site To Last Saved
Categorybuilding
AccessScriptCheat
ScopeB1Standalone
TagsExperimental
Aliases—

Parameters

NameTypeRequiredDefaultDescription
confirm_phrasestringyes—Must be exactly "reset to last saved". Guards against accidental invocation.

Returns

Returns a JSON object with the following fields:

FieldTypeRequiredDescription
committedboolyesWhether the command entered the undo history (i.e. it succeeded)
undoableboolyesWhether building.undo can revert it
has_undoboolyesUndo available after execution
has_redoboolyesRedo available after execution

Usage

await inzoi.cli.execute('building.reset_site_to_last_saved', {
confirm_phrase: '',
});