class Conveyor(Rotatable): override_name="Conveyor1" override_ss = 100 cspeed=2 imgs=Img.conv_imgs("Transport/Conveyor1") ani=0 layers = ["Conv"] hardness = 10 slayer = "Tiles" cm=None def __init__(self,c,r): super().__init__(c,r) self.tpos=c.pos+Vector.vdirs[self.r] self.d=Vector.vdirs[self.r] def update(self, pos, area, events): if self.cm: self.cm.conv_update(pos,area,self) self.ani=area.anitick item=area.get("Items",pos) if item and not item.mprog: area.move(item,pos,self.d,override_speed=self.cspeed,tpos_cache=self.tpos) def mined(self): return Placeable(self.__class__) @property def img(self): return self.imgs[(self.ani*self.cspeed%64)//4][self.r]
class Conveyor2(Conveyor): override_name = "Conveyor2" cspeed = 8 imgs=Img.conv_imgs("Transport/Conveyor2")