[1.1.33] LuaPlayer.disable_alert do not disable alerts

This subforum contains all the issues which we already resolved.
Post Reply
WildBraas
Inserter
Inserter
Posts: 44
Joined: Sat Feb 16, 2019 6:25 am
Contact:

[1.1.33] LuaPlayer.disable_alert do not disable alerts

Post by WildBraas »

In my simple mod I want disable all custom alerts from alert gui, but LuaPlayer.disable_alert does nothing
Here simplified code with problem

Code: Select all

function OnTick(e)
	for _, player in pairs(game.connected_players) do
		player.disable_alert(defines.alert_type.custom);
		if player.is_alert_enabled(defines.alert_type.custom) then
			player.print("Custom is enabled")
		else
			player.print("Custom is disabled")
		end
	end
end

script.on_event(defines.events.on_tick, OnTick);
Console prints "Custom is disabled" but custom alerts is still here:
2021-05-09_14-23-15.png
2021-05-09_14-23-15.png (10.95 KiB) Viewed 2004 times

Rseding91
Factorio Staff
Factorio Staff
Posts: 13204
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [1.1.33] LuaPlayer.disable_alert do not disable alerts

Post by Rseding91 »

Thanks for the report. It's now fixed for the next release.
If you want to get ahold of me I'm almost always on Discord.

Post Reply

Return to “Resolved Problems and Bugs”