含义#
stationtypeexprlookup: X4 属性架构类型:基础类型、约束与可选值。
XSD 类型约束 XML,并不声明 Lua 返回值或 event.param 的数据类型。通过架构验证不能证明游戏效果已经发生。
架构结构#
libraries/common.xsd
| 属性 | 值 |
|---|---|
| 构造方式 | union |
| 联合类型成员 | expression |
其他内线工会分支:
| 属性 | 值 |
|---|---|
| 构造方式 | restriction |
| 基础类型 | xs:string |
| 约束 | 值 |
|---|---|
enumeration |
stationtype.defence |
enumeration |
stationtype.equipmentdock |
enumeration |
stationtype.factory |
enumeration |
stationtype.recyclingfacility |
enumeration |
stationtype.shipyard |
enumeration |
stationtype.wharf |
enumeration |
stationtype.tradingstation |
enumeration |
stationtype.headquarters |
enumeration |
stationtype.factionheadquarters |
enumeration |
stationtype.piratebase |
restriction 收紧基础类型的限制;union 接受其中一个类型分支;list 描述由空白分隔的项目。同一个限制中的 enumeration 值互为可选项。pattern 使用 XML Schema 正则表达式,不是 Lua 模式或 JavaScript RegExp。从基础类型继承的约束仍然有效。
示例与结果#
根据下面的属性页面进行文本示例. 单独从类型名称中推断一个通用可执行的例子.
使用位置#
| 元素 | 属性 | 架构 |
|---|---|---|
find_object |
stationtype |
libraries/common.xsd |
find_object_component |
stationtype |
libraries/common.xsd |
find_station |
stationtype |
libraries/common.xsd |
find_station_by_true_owner |
stationtype |
libraries/common.xsd |
match_content |
stationtype |
libraries/common.xsd |