Sprak connection functions: Difference between revisions

From wikinotes
No edit summary
Line 5: Line 5:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
var conn = Connect("Finance Computer")  # make a connection
var conn = Connect("Finance Computer")  # make a connection
var cs = GetConnections()              # List of all connections made to computer
</syntaxhighlight>
</syntaxhighlight>
</blockquote><!-- Basices -->
</blockquote><!-- Basices -->

Revision as of 03:07, 9 January 2023

This section is for interacting with specific computers.

Basices

var conn = Connect("Finance Computer")  # make a connection
var cs = GetConnections()               # List of all connections made to computer

Domain Specific Functions

FinanceComputer

The town's bank

fin = Connect("Finance Computer")
fin.ChangeBalance("Sebastian", +100)  # Change User's Balance

Wellspring

Wellspring's inventory, and balance.

wells = Connect("Wellspringer")
wells.RegisterSeller( name, amount ) # Register Sale for a User

Factory

Goods

string db = Connect("GoodsDatabase")
db.Register(goodsType, quality)

var id = Connect("SendPipe2")
Send(id)

var machine = Connect("MachineB2")
string result = machine.Convert()
Print("Result: "+ result )

Security

ZapPerson(name)        # possibly what happened to suit when hacking fusebox?
light.StartBlinking()