-
Notifications
You must be signed in to change notification settings - Fork 2
/
clear_embeds.lua
48 lines (45 loc) · 1.43 KB
/
clear_embeds.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
local removed_embedded_items = {
ENT_TYPE.EMBED_GOLD,
ENT_TYPE.EMBED_GOLD_BIG,
ENT_TYPE.ITEM_RUBY,
ENT_TYPE.ITEM_SAPPHIRE,
ENT_TYPE.ITEM_EMERALD,
ENT_TYPE.ITEM_ALIVE_EMBEDDED_ON_ICE,
ENT_TYPE.ITEM_PICKUP_ROPEPILE,
ENT_TYPE.ITEM_PICKUP_BOMBBAG,
ENT_TYPE.ITEM_PICKUP_BOMBBOX,
ENT_TYPE.ITEM_PICKUP_SPECTACLES,
ENT_TYPE.ITEM_PICKUP_CLIMBINGGLOVES,
ENT_TYPE.ITEM_PICKUP_PITCHERSMITT,
ENT_TYPE.ITEM_PICKUP_SPRINGSHOES,
ENT_TYPE.ITEM_PICKUP_SPIKESHOES,
ENT_TYPE.ITEM_PICKUP_PASTE,
ENT_TYPE.ITEM_PICKUP_COMPASS,
ENT_TYPE.ITEM_PICKUP_PARACHUTE,
ENT_TYPE.ITEM_CAPE,
ENT_TYPE.ITEM_JETPACK,
ENT_TYPE.ITEM_TELEPORTER_BACKPACK,
ENT_TYPE.ITEM_HOVERPACK,
ENT_TYPE.ITEM_POWERPACK,
ENT_TYPE.ITEM_WEBGUN,
ENT_TYPE.ITEM_SHOTGUN,
ENT_TYPE.ITEM_FREEZERAY,
ENT_TYPE.ITEM_CROSSBOW,
ENT_TYPE.ITEM_CAMERA,
ENT_TYPE.ITEM_TELEPORTER,
ENT_TYPE.ITEM_MATTOCK,
ENT_TYPE.ITEM_BOOMERANG,
ENT_TYPE.ITEM_MACHETE,
}
function perform_block_without_embeds(block)
local embedded_item_callback = set_post_entity_spawn(function(entity, spawn_flags)
entity.flags = set_flag(entity.flags, ENT_FLAG.INVISIBLE)
move_entity(entity.uid, 1000, 0, 0, 0)
entity:destroy()
end, SPAWN_TYPE.LEVEL_GEN, 0, removed_embedded_items)
block()
clear_callback(embedded_item_callback)
end
return {
perform_block_without_embeds = perform_block_without_embeds,
}