This commit is contained in:
2026-11-16 23:49:42 -03:00
parent 94b0e3789c
commit eedaa955f6
13 changed files with 148 additions and 2 deletions
+3
View File
@@ -1685,6 +1685,9 @@ export function entity_ref(entity: Entity): EntityRef {
remove() {
entity.remove();
},
kill(cause = "script") {
entity.kill(String(cause));
},
get_item: () => entity instanceof ItemEntity ? item_copy(entity.item) : undefined,
set_item(item) {
if (!(entity instanceof ItemEntity)) throw new Error(`${entity.type} isn't an item lying around`);