Adding a sign

j_mie6

Deity
Joined
Dec 20, 2009
Messages
2,963
Location
Bristol (uni)/Swindon (home)
How do I add a sign to the map? what I need to do is make a sign which contains the name of the city that is founded there...

I have this:

cityNameDict = {

(2, 1) : "City name",
(3, 18): "Another city name"

}

how do I make it so that a sign is made on the dict key saying the name?

so far I have:
Code:
def mapNames(data):
        for x in data.keys():
                addMessage(data[x], (), eWhite, tCoords=x)

but this just makes an arrow where the coords are because the function is this:

Code:
def addMessage(tag, tValues, eColor, tCoords=(-1, -1), sound=""):
        """
        Adds the tag (string) message to the game in eColor. (The preset pointers to valid
        ColorTypes are eRed, eGreen and eWhite. A None value will disable the message.) If
        the tag argument requires other values to be included in the message, then these
        can be supplied with the tValues (tuple) argument. The optional tCoords (tuple)
        argument is set to a pair of default -1 values that indicate that no arrow should
        accompany the text message. (Valid map tile coordinates will enable the arrow.)
        The sound argument (string) can point to the location of an optional sound file.
        """
        if eColor == None: return
        message = Translator.getText(tag, tValues)
        bArrow = tCoords != (-1, -1)
        Interface.addMessage(pHumanCiv.get(playerID), True, 20, message, sound, eMinorEvent, "", eColor, tCoords[0], tCoords[1], bArrow, bArrow)

any ideas?
 
don't worry I got it:

VOID addSign (CyPlot *plot, PlayerType playerType, STRING caption)
 
just incase anybody wants it:

Code:
Engine = CyEngine()
def createSign(text, tCoords, ePlayer = None):
        pPlot = getPlot(tCoords)
        if ePlayer == None: Engine.addLandmark(pPlot, text)
        else:
                Engine.addSign(pPlot, ePlayer, text)
 
Back
Top Bottom