Rigs of Rods 2023.09
Soft-body Physics Simulation
Loading...
Searching...
No Matches
LocalStorageClass.h
Go to the documentation of this file.
1
2namespace Script2Game {
3
20{
21public:
30 LocalStorage(string filename, const string&in sectionname = "common", const string&in resource_group_name = "Cache");
31
40 string get(string key);
41
45 string getString(string key);
46
50 void set(string key, const string value);
51
57 void setString(string key, const string value);
58
59 float getFloat(string key);
60 void set(string key, float value);
61 void setFloat(string key, float value);
62
63 vector3 getVector3(string key);
64 void set(string key, const vector3 value);
65 void setVector3(string key, const vector3 value);
66
67 radian getRadian(string key);
68 void set(string key, const radian value);
69 void setRadian(string key, const radian value);
70
71 degree getDegree(string key);
72 void set(string key, const degree value);
73 void setDegree(string key, const degree value);
74
76 void set(string key, const quaternion value);
77 void setQuaternion(string key, const quaternion value);
78
79 bool getBool(string key);
80 void set(string key, const bool value);
81 void setBool(string key, const bool value);
82
83 int getInt(string key);
84 int getInteger(string key);
85 void set(string key, int);
86 void setInt(string key, int);
87 void setInteger(string key, int);
88
93 void save();
94
98 bool reload();
99
105 bool exists(string key) const;
106
111 void delete(string key);
112
117 void changeSection(const string section);
118};
119
122
123} //namespace Script2Game
quaternion()
Binding of RoR::LocalStorage; A class that allows your script to store data persistently.
void setInteger(string key, int)
void setVector3(string key, const vector3 value)
void set(string key, const radian value)
LocalStorage(string filename, const string &in sectionname="common", const string &in resource_group_name="Cache")
The constructor for the class.
void setBool(string key, const bool value)
void setFloat(string key, float value)
void setString(string key, const string value)
This sets a key.
void set(string key, const degree value)
radian getRadian(string key)
void changeSection(const string section)
Changes the default section.
void set(string key, const quaternion value)
bool exists(string key) const
Check if certain key exists.
void set(string key, const vector3 value)
void setQuaternion(string key, const quaternion value)
void setRadian(string key, const radian value)
quaternion getQuaternion(string key)
void set(string key, int)
void setDegree(string key, const degree value)
degree getDegree(string key)
void set(string key, float value)
string get(string key)
A getter for string data.
string getString(string key)
bool reload()
This reloads the data from the saved file, overwriting your changes.
void set(string key, const bool value)
void setInt(string key, int)
vector3 getVector3(string key)
void save()
This saves the data to a file.
void set(string key, const string value)
Pseudo-namespace; it doesn't exist in code or script runtime, only in this documentation.