Skip to content

Commit 8a86c50

Browse files
committed
add set_strid
1 parent 647eaa8 commit 8a86c50

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/byondapi-rs/src/value/functions.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,12 @@ impl ByondValue {
115115
Ok(())
116116
}
117117

118+
/// Replaces whatever is currently in this value with a string that's pointed to by the stringid
119+
/// # DO NOT PASS STRINGIDS THAT ARE NOT RETURNED BY [`crate::byond_string::str_id_of`]
120+
pub fn set_strid(&mut self, strid: u4c) {
121+
unsafe { byond().ByondValue_SetStrId(&mut self.0, strid) }
122+
}
123+
118124
/// Replaces whatever is currently in this value with a ref
119125
pub fn set_ref(&mut self, type_: ByondValueType, ref_: u4c) {
120126
unsafe { byond().ByondValue_SetRef(&mut self.0, type_, ref_) }

0 commit comments

Comments
 (0)