2024-03-16 19:45:43 +02:00
|
|
|
# Store
|
2024-03-17 00:05:55 +02:00
|
|
|
**Inherits:** [RefCounted](https://docs.godotengine.org/de/4.x/classes/class_refcounted.html)
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
## Description
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Abstract class for saving and loading data to and from a file.
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
## Properties
|
|
|
|
|
2024-04-26 18:41:52 +03:00
|
|
|
| Name | Type | Default |
|
|
|
|
| ------------------------------ | ----------------------------------------------------------------------------- | ------- |
|
|
|
|
| [_loaded](#prop--loaded) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | `false` |
|
|
|
|
| [_save_path](#prop--save-path) | [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | `null` |
|
|
|
|
| [state](#prop-state) | [RdotStore](https://docs.godotengine.org/de/4.x/classes/class_rdotstore.html) | |
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
## Methods
|
|
|
|
|
2024-04-26 18:41:52 +03:00
|
|
|
| Returns | Name |
|
|
|
|
| ------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
| void | [clear](#clear) ( ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [is_loaded](#is-loaded) ( ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [load_local](#load-local) ( path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [sanitizeState](#sanitizeState) ( dict: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) |
|
|
|
|
| [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) | [save_local](#save-local) ( path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) |
|
|
|
|
| void | [use_dict](#use-dict) ( dict: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html), target: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) |
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 00:05:55 +02:00
|
|
|
## Signals
|
|
|
|
|
|
|
|
### on_loaded ( ) {#on-loaded}
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Signal emitted when the data is loaded.
|
2024-03-17 00:05:55 +02:00
|
|
|
|
|
|
|
### on_saved ( ) {#on-saved}
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Signal emitted when the data is saved.
|
2024-03-17 00:05:55 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
## Constants
|
|
|
|
|
2024-03-17 00:05:55 +02:00
|
|
|
### VariantSerializer = `<Object>` {#const-VariantSerializer}
|
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-16 19:45:43 +02:00
|
|
|
## Property Descriptions
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### _loaded: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop--loaded}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### _save_path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#prop--save-path}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-04-26 18:41:52 +03:00
|
|
|
### state: [RdotStore](https://docs.godotengine.org/de/4.x/classes/class_rdotstore.html) {#prop-state}
|
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-16 19:45:43 +02:00
|
|
|
## Method Descriptions
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### clear ( ) -> void {#clear}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Resets the data to its default state.
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### is_loaded ( ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#is-loaded}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
Returns true if the data has been loaded.
|
2024-03-16 19:45:43 +02:00
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### load_local (path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#load-local}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-04-26 18:41:52 +03:00
|
|
|
### sanitizeState (dict: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#sanitizeState}
|
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-03-17 01:14:31 +02:00
|
|
|
### save_local (path: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) {#save-local}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|
|
|
|
|
2024-04-26 18:41:52 +03:00
|
|
|
### use_dict (dict: [Dictionary](https://docs.godotengine.org/de/4.x/classes/class_dictionary.html) , target: [Variant](https://docs.godotengine.org/de/4.x/classes/class_variant.html) ) -> void {#use-dict}
|
2024-03-16 19:45:43 +02:00
|
|
|
|
|
|
|
No description provided yet.
|