QuakeServer.Spawn (quake_server v0.1.0)

Copy Markdown View Source

A map's entities brought to life: the first is the world itself, every later one a fresh entity; each has its keys written into its fields and then its spawn function run with it as self.

server = QuakeServer.Spawn.entities(server, entity_text)

A program that defines CheckSpawn decides for itself: it is called for every entity, the world included, with the entity's spawn function (spawnfunc_<classname>, else <classname>, else none) as its argument and the entity's text in the global __fullspawndata. Otherwise the function named by classname is run, and entities whose spawn flags the server's inhibit rule rejects, or with no classname or no function, are not made.

Keys become fields by the program's field definitions: angle is the yaw of angles, light is light_lev, and keys beginning _ are ignored. A function key is a function's name, optionally after a program number and : (0:name); a number and : alone is no function, and a name the program lacks is printed and the field left as it is, as FTE's ED_ParseEpair reads them. Numbers are read as C's strtod (a float, or each of a vector's three words, as a 32-bit float) and strtol in base 0 (an integer or entity field), QuakeServer.TextNumbers.

Summary

Functions

Spawn every entity of text into server.

Write keys into entity's fields.

Functions

entities(server, text)

Spawn every entity of text into server.

fill(server, entity, keys)

Write keys into entity's fields.