Exemple #1
0
 def on_fog_color_recieved(self, contained):
     # FIXME: this theoretically might anyone to set the fog...
     # do we even need this?
     if not self.name:
         return
     color = get_color(contained.color)
     self.on_command('fog', [str(item) for item in color])
Exemple #2
0
 def on_color_change_recieved(self, contained: loaders.SetColor) -> None:
     if not self.hp:
         return
     color = get_color(contained.value)
     if self.on_color_set_attempt(color) == False:
         return
     self.color = color
     self.on_color_set(color)
     if self.filter_animation_data:
         return
     contained.player_id = self.player_id
     self.protocol.send_contained(contained, sender=self, save=True)
Exemple #3
0
 def test_get_color(self):
     self.assertEqual(get_color(0xFFFFFF), (0xFF, 0xFF, 0xFF))