Changeset 196:a4c4e2f34162


Ignore:
Timestamp:
04/06/11 20:06:45 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Rebase:
30383063306536643065623232326135643566363031383435306263643365353136343731333264
Message:

Remove DummyWorld since npc-test now uses the real world.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • scripts/npc-test

    r195 r196  
    99sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
    1010
    11 from skaapsteker.dialogue import DSM, DsmEvent, DummyWorld
     11from skaapsteker.dialogue import DSM, DsmEvent
    1212from skaapsteker.gamestate import GameState
    1313
  • skaapsteker/dialogue.py

    r193 r196  
    119119            return eval(self._next_state, {}, my_locals.copy())
    120120        return None
    121 
    122 
    123 class DummyWorld(object):
    124 
    125     def __init__(self):
    126         self._fox_has_tea = False
    127         self._fox_is_shapeshifted = False
    128         self._fox_is_disguised = False
    129 
    130         self._fire_started = False
    131         self._cannon_destroyed = False
    132 
    133         self._vase_broken = False
    134         self._fish_in_house = False
    135         self._torn_kimono = False
    136 
    137         self._masks_destroyed = False
    138 
    139         self.npcs = {}
    140 
    141     def npc_is(self, npc_name, state):
    142         return self.npcs[npc_name].state == state
    143 
    144     def fox_has_tea(self):
    145         return self._fox_has_tea
    146 
    147     def fox_is_shapeshifted(self):
    148         return self._fox_is_shapeshifted
    149 
    150     def fox_is_disguised(self):
    151         return self._fox_is_disguised
    152 
    153     def fire_started(self):
    154         return self._fire_started
    155 
    156     def cannon_destroyed(self):
    157         return self._cannon_destroyed
    158 
    159     def vase_broken(self):
    160         return self._vase_broken
    161 
    162     def fish_in_house(self):
    163         return self._fish_in_house
    164 
    165     def torn_kimono(self):
    166         return self._torn_kimono
    167 
    168     def masks_destroyed(self):
    169         return self._masks_destroyed
Note: See TracChangeset for help on using the changeset viewer.