feat:(slots UI): functional slots

This commit is contained in:
Rachel Powers
2024-04-24 23:15:54 -07:00
parent 19c85c1078
commit dbb2f71fdc
7 changed files with 111 additions and 43 deletions

View File

@@ -495,6 +495,11 @@ impl VMRef {
Ok(self.vm.borrow_mut().set_slot_occupant(id, index, template)?)
}
#[wasm_bindgen(js_name = "removeSlotOccupant")]
pub fn remove_slot_occupant(&self, id: u32, index: usize) -> Result<(), JsError> {
Ok(self.vm.borrow_mut().remove_slot_occupant(id, index)?)
}
#[wasm_bindgen(js_name = "saveVMState", skip_typescript)]
pub fn save_vm_state(&self) -> JsValue {
let state = self.vm.borrow().save_vm_state();