Changeset 122


Ignore:
Timestamp:
06/11/09 09:36:48 (10 years ago)
Author:
maximinus_parpg
Message:

A few minor edits.
Added windmill gfx and to the map, but FIFE can't load the PNG's.
Left PARPG in a playable state.

Location:
trunk/PARPG
Files:
12 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/maps/map.xml

    r105 r122  
    2929        <import file="../objects/buildings/shanty/shantyh.xml"></import> 
    3030        <import file="../objects/buildings/shanty/shantyi.xml"></import> 
     31         
     32        <!-- 
     33        <import file="../objects/buildings/windmill/windmilla.xml"></import> 
     34        <import file="../objects/buildings/windmill/windmillb.xml"></import> 
     35        <import file="../objects/buildings/windmill/windmillc.xml"></import> 
     36        <import file="../objects/buildings/windmill/windmilld.xml"></import> 
     37        <import file="../objects/buildings/windmill/windmille.xml"></import> --> 
    3138         
    3239        <!-- Import the tile transition tiles --> 
     
    10701077        <layer x_offset="0.0" pathing="cell_edges_and_diagonals" y_offset="0.0" grid_type="square" id="ObjectLayer" x_scale="1" y_scale="1" rotation="0.0"> 
    10711078                <instances>      
    1072                         <i x="-4" o="shantya" z="0.0" y="3" r="0"></i> 
    1073                         <i x="-4" o="shantyb" z="0.0" y="4" r="0"></i> 
    1074                         <i x="-4" o="shantyc" z="0.0" y="5" r="0"></i> 
    1075                         <i x="-4" o="shantyd" z="0.0" y="6" r="0"></i> 
    1076                         <i x="-3" o="shantye" z="0.0" y="6" r="0"></i> 
    1077                         <i x="-2" o="shantyf" z="0.0" y="6" r="0"></i> 
    1078                         <i x="-1" o="shantyg" z="0.0" y="6" r="0"></i> 
    1079                         <i x="-0" o="shantyh" z="0.0" y="6" r="0"></i> 
    1080                         <i x="1" o="shantyi" z="0.0" y="6" r="0"></i> 
     1079            <i x="-4" o="shantya" z="0.0" y="3" r="0"></i> 
     1080            <i x="-4" o="shantyb" z="0.0" y="4" r="0"></i> 
     1081            <i x="-4" o="shantyc" z="0.0" y="5" r="0"></i> 
     1082                <i x="-4" o="shantyd" z="0.0" y="6" r="0"></i> 
     1083                <i x="-3" o="shantye" z="0.0" y="6" r="0"></i> 
     1084            <i x="-2" o="shantyf" z="0.0" y="6" r="0"></i> 
     1085            <i x="-1" o="shantyg" z="0.0" y="6" r="0"></i> 
     1086            <i x="-0" o="shantyh" z="0.0" y="6" r="0"></i> 
     1087            <i x="1" o="shantyi" z="0.0" y="6" r="0"></i> 
     1088             
     1089            <!-- Adding windmaill images here doesn't work --> 
     1090            <i x="6" o="shantya" z="0.0" y="-2" r="0"></i> 
     1091            <i x="6" o="shantyb" z="0.0" y="-1" r="0"></i> 
     1092            <i x="6" o="shantyc" z="0.0" y="0" r="0"></i> 
     1093            <i x="7" o="shantyd" z="0.0" y="0" r="0"></i> 
     1094            <i x="8" o="shantye" z="0.0" y="0" r="0"></i> 
     1095             
    10811096                </instances> 
    10821097        </layer> 
  • trunk/PARPG/scripts/agents/npc.py

    r121 r122  
    2929           @param text: a string of text that will be output to screen when 
    3030               character is right clicked 
    31            @param agentName: the 'id' of the NPC in the map_object.xml file 
     31           @param id: the 'id' of the NPC in the map_object.xml file 
    3232           @param layer: a fife.Instance object, (engine.view.agent_layer)""" 
    3333        fife.InstanceActionListener.__init__(self) 
     
    6464        l.setLayerCoordinates(fife.ModelCoordinate(*tuple([x, y]))) 
    6565        return l 
    66      
     66 
    6767    def onInstanceActionFinished(self, instance, action): 
    6868        """What the NPC does when it has finished an action. 
  • trunk/PARPG/scripts/engine.py

    r121 r122  
    116116        """Given the objects ID, return the text strings and callbacks""" 
    117117        actions=[] 
     118        # note: ALWAYS check NPC's first! 
     119        # is it an NPC? 
     120        for i in self.npcs: 
     121            if(obj_id == i.id): 
     122                # keep it simple for now 
     123                actions.append(("Talk",None)) 
     124                actions.append(("Attack",None)) 
    118125        # is it in our objects? 
    119126        for i in self.objects: 
     
    127134                    actions.append(("Pick Up",None)) 
    128135                return actions 
    129         # is it an NPC? 
    130         for i in self.npcs: 
    131             if(obj_id == i.id): 
    132                 # keep it simple for now 
    133                 actions.append(("Talk",None)) 
    134                 actions.append(("Attack",None)) 
    135136        return actions 
    136137 
Note: See TracChangeset for help on using the changeset viewer.