Picker Dollies

by Nexela

Move most placed entities quickly and easily.

Utilities
1 year, 4 months ago
0.17 - 1.1
41.7K

g Interface add_blacklist_name should log to console

4 years ago
(updated 4 years ago)

So you have your interfaces:

interface['add_blacklist_name'] = function(entity_name, silent)
global.blacklist_names = global.blacklist_names or {}
if game.entity_prototypes[entity_name] and not global.blacklist_names[entity_name] then
global.blacklist_names[entity_name] = true
if not silent then
game.print('Picker Dollies added ' .. entity_name .. ' to the blacklist.')
end
return true
else
if not silent then
game.print('Picker Dollies could not add ' .. entity_name .. ' to the blacklist.')
game.print('Entity name does not exist or is already blacklisted.')
end
return false
end
end

You are asking to do this in on_load and on_init, however if we want to add it not silent (for debugging), this won't print anything ingame. You should at least add an option to log it silent to the log file, so we can see it.
I manualy hacked it in for testing purposes if it was actualy registering

Kind regards
lovely_santa

3 years ago

Ok...... Done sort of. it now additionally logs to the log file when not silent

If you want true silent, you can watch the return value of the interface call

3 years ago

Thank you.

New response