Page 1 of 1

[1.1.33] LuaPlayer.disable_alert do not disable alerts

Posted: Sun May 09, 2021 11:36 am
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 2019 times

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

Posted: Wed May 12, 2021 5:50 pm
by Rseding91
Thanks for the report. It's now fixed for the next release.