123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- local vMod = vm_lighting_wand
- local _ignored_name = {}
- local _ignored_group = {}
- local _ignored_drawtype = {}
- local _ignored_onlighting = {} -- a check just before placing the light
- -- Add ignored
- vMod.add_ignored_group = function(name)
- _ignored_group[name] = true
- end
- vMod.add_ignored_name = function(name)
- _ignored_name[name] = true
- end
- vMod.add_ignored_drawtype = function(name)
- _ignored_drawtype[name] = true
- end
- vMod.add_ignored_onlighting = function(name)
- _ignored_onlighting[name] = true
- end
- -- Remove ignored
- vMod.remove_ignored_name = function(name)
- _ignored_name[name] = nil
- end
- vMod.remove_ignored_drawtype = function(name)
- _ignored_drawtype[name] = nil
- end
- vMod.remove_ignored_group = function(name)
- _ignored_group[name] = nil
- end
- vMod.remove_ignored_onlighting = function(name)
- _ignored_onlighting[name] = nil
- end
- -- test ignored
- vMod.is_ignored_name = function(name)
- return _ignored_name[name]
- end
- vMod.is_ignored_group = function(name)
- return _ignored_group[name]
- end
- vMod.is_ignored_drawtype = function(name)
- return _ignored_drawtype[name]
- end
- vMod.is_ignored_onlighting = function(name)
- return _ignored_onlighting[name]
- end
- -- defaults
- vMod.add_ignored_name("ignore")
- vMod.add_ignored_name("unknown")
- vMod.add_ignored_drawtype("airlike")
- vMod.add_ignored_group(vMod.modname .. "_ignored")
|