KristalTeam / Kristal

Deltarune fangame engine for Love2D
BSD 3-Clause "New" or "Revised" License
96 stars 38 forks source link

onMapBorder mod call #101

Closed DiamondBor closed 5 months ago

DiamondBor commented 6 months ago

Like Mod:onMapMusic, but for borders. An example of why someone would want this is if they have a map that has two different 'areas' with different borders, that change as they advance through the map.

Code example:

function Mod:onMapBorder(map, border)
    if map.name == "name" and (border == "cyber") then
        if Game:getFlag("flag", false) == true then
            return "city"
        end
        return border
    end
end
NyakoFox commented 6 months ago

This PR accidentally includes changes from another PR of yours.