File: main.lua

package info (click to toggle)
cataclysm-dda 0.C%2Bgit20190228.faafa3a-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 181,636 kB
  • sloc: cpp: 256,609; python: 2,621; makefile: 862; sh: 495; perl: 37; xml: 33
file content (15 lines) | stat: -rw-r--r-- 523 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function blacklist_item_from_spawns(id)
    local all_groups = game.get_item_groups()
    for _, group_id in ipairs(all_groups) do
        -- a chance of 0 removes the item
        game.add_item_to_group(group_id, id, 0)
    end
end

blacklist_item_from_spawns("jam_strawberries")
blacklist_item_from_spawns("jam_blueberries")

-- also remove rocks from spawn, since it's rather hard to test whether 
-- jams spawn or not ;) rock recipes should still exist though, leading
-- to hilarity
blacklist_item_from_spawns("rock")