fire is an effect that is triggered when a zone receives > x% damage and the effect is declared for that zone.
Listing is nothing more than the damage/flooding model and you can't ask the game how much is the ship listing
You can ask the game how much damage the ship has and it will tell you the % damage. It tells you nothing more.
So if the deckgun is located on a zone with a fire effect declared and that zone's damage (not the ship's damage) is > damage for effect then the fire effect is played. You could have crew members firing the deck gun amidst flames