12 lines
293 B
Fennel
12 lines
293 B
Fennel
(local link
|
|
{:switch
|
|
(fn [self name]
|
|
(set self.machine (require (.. "link." name)))
|
|
(set self.name name))
|
|
:types [:serial :gsplus :tape :mame]})
|
|
|
|
(local serial (require :link.serial))
|
|
(link:switch (if (and (pcall #(serial:connect)) (serial:connected?)) :serial :mame))
|
|
|
|
link
|