1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
Script API
==========
Global Vars
-----------
edit_mode = "line" or "sector" (etc)
SELECT : the main selection
NumThings, NumLines,
NumSectors, NumVerts, NumRadTrigs
Selection
---------
These are methods of a selection object:
sel_obj.is_empty()
sel_obj.not_empty()
sel_obj.count_obj()
sel_obj.get(N)
sel_obj.get_first()
sel_obj.get_second()
sel_obj.clear_all()
sel_obj.set(N)
sel_obj.clear(N)
sel_obj.toggle(N)
sel_obj.to_list()
sel_obj.from_list(LIST)
sel_obj.merge(SEL or LIST)
sel_obj.unmerge(SEL or LIST)
NewSelection(mode) : returns a new selection object
Map Access
----------
Thing(N) : returns an object representing that thing, or nil if out of range
Line(N) : returns an object representing that line, or nil
Sector(N) : returns an object representing that sector, or nil
Vertex(N) : returns an object representing that vertex, or nil
SideDef(N) : returns an object representing that sidedef, or nil
RadTrig(N) : returns an object representing that radius trigger, or nil
These objects use metatables to allow reading and setting the fields of
the actual map structures (setting will be via BA_ChangeXX).
They will have an "id" pseudo-field (read only).
They will also have some convenience functions, e.g. line_obj.Right()
which is equivalent to SideDef(line_obj.right)
Can assign references to certain fields, e.g.
sidedef_obj.sector = Sector(3)
Creating and Deleting
---------------------
NewThing(), NewLine(), NewSector(),
NewVertex(), NewRadTrig() : this will get default properties.
linedefs will have no sidedefs.
Copy(obj) : create new object with same properties as previous.
for linedefs, this copies any sidedefs too.
Delete(obj)
Delete(SEL or LIST)
Note that deleting objects can invalidate existing references.
MarkDelete(obj) : delete the object when script finishes
MarkDelete(SEL or LIST)
User Interaction
----------------
TODO
|