We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9c7bb81 commit cd58b0eCopy full SHA for cd58b0e
crates/byondapi-rs-test/dm_project/dm_project.dme
@@ -153,6 +153,14 @@
153
var/list/L = list("cat" = 0, "dog" = 1, "parrot" = 5)
154
test_list_read(L)
155
156
+/datum/testobject
157
+ var/test_name = "dust"
158
+
159
+/test/proc/test_byondapi_new()
160
+ var/datum/testobject = test_new_obj()
161
+ if(testobject.test_name != "dust")
162
+ throw EXCEPTION("Did not create a new object!")
163
164
// BEGIN_INTERNALS
165
// END_INTERNALS
166
// BEGIN_FILE_DIR
crates/byondapi-rs-test/src/lib.rs
@@ -215,3 +215,11 @@ fn test_list_read(list: ByondValue) {
215
216
Ok(Default::default())
217
}
218
219
+#[byondapi::bind]
220
+fn test_new_obj() {
221
+ Ok(ByondValue::builtin_new(
222
+ ByondValue::try_from("/datum/testobject")?,
223
+ &[],
224
+ )?)
225
+}
0 commit comments