X-Git-Url: https://plomlompom.com/repos/berlin_corona.txt?a=blobdiff_plain;f=plomrogue%2Fthings.py;h=98dff00dbb40868e2af8d2beb35e85fdfda2d23c;hb=170cd49bfc99569f4bf004ec48ff60a04786d918;hp=1618ee65e49c07493fc2cc67f87a22045f4b998c;hpb=e6a3ab3471ae5a2be10bd64d694eef462d7f7cf6;p=plomrogue2 diff --git a/plomrogue/things.py b/plomrogue/things.py index 1618ee6..98dff00 100644 --- a/plomrogue/things.py +++ b/plomrogue/things.py @@ -18,6 +18,7 @@ class ThingBase: class Thing(ThingBase): blocking = False + portable = False protection = '.' def __init__(self, *args, **kwargs): @@ -38,6 +39,20 @@ class Thing(ThingBase): class Thing_Item(Thing): symbol_hint = 'i' + portable = True + + + +class Thing_ItemSpawner(Thing): + symbol_hint = 'S' + + def proceed(self): + for t in [t for t in self.game.things + if t != self and t.position == self.position]: + return + t = self.game.thing_types['Item'](self.game, position=self.position) + self.game.things += [t] + self.game.changed = True