MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / add_vlb

Method add_vlb

scratchattach/editor/sprite.py:167–175  ·  view source on GitHub ↗
(self, _vlb: base.NamedIDComponent)

Source from the content-addressed store, hash-verified

165 _broadcast.sprite = self
166
167 def add_vlb(self, _vlb: base.NamedIDComponent):
168 if isinstance(_vlb, vlb.Variable):
169 self.add_variable(_vlb)
170 elif isinstance(_vlb, vlb.List):
171 self.add_list(_vlb)
172 elif isinstance(_vlb, vlb.Broadcast):
173 self.add_broadcast(_vlb)
174 else:
175 warnings.warn(f"Invalid 'VLB' {_vlb} of type: {type(_vlb)}")
176
177 def add_block(self, _block: block.Block | prim.Prim) -> block.Block | prim.Prim:
178 if _block.sprite is self:

Callers 1

link_using_spriteMethod · 0.80

Calls 4

add_variableMethod · 0.95
add_listMethod · 0.95
add_broadcastMethod · 0.95
typeFunction · 0.85

Tested by

no test coverage detected