feat: Disciple 增加入宗时间快照,D4 名录 UI 设计文档
This commit is contained in:
@@ -23,6 +23,9 @@ var age: int = 0
|
||||
var aptitude: Aptitude = Aptitude.ORDINARY
|
||||
var roots: Array[SpiritRoot] = [] # 普通弟子 1~3 根;天灵根固定 1 根
|
||||
var is_heavenly: bool = false # 天灵根标记(3% 概率)
|
||||
var join_year: int = 0 # 入宗年份(0 = 未入宗/候选),accept 时快照
|
||||
var join_month: int = 0 # 入宗月份
|
||||
var join_day: int = 0 # 入宗日
|
||||
var realm_index: int = 0 # 大境界索引(0=练气)
|
||||
var sub_realm_index: int = 0 # 小境界索引(练气层数-1)
|
||||
|
||||
@@ -40,3 +43,9 @@ func get_realm_text() -> String:
|
||||
if realm_index == 0:
|
||||
return "%s%d层" % [REALM_NAMES[realm_index], sub_realm_index + 1]
|
||||
return "%s%s" % [REALM_NAMES[realm_index], ["初期", "中期", "后期", "圆满"][sub_realm_index]]
|
||||
|
||||
## 入宗时间文本,如 "1年2月3日";未入宗返回空串。
|
||||
func get_join_date_text() -> String:
|
||||
if join_year <= 0:
|
||||
return ""
|
||||
return "%d年%d月%d日" % [join_year, join_month, join_day]
|
||||
|
||||
@@ -22,6 +22,7 @@ const SURNAMES: Array[String] = [
|
||||
"林", "苏", "叶", "萧", "顾", "沈", "楚", "白",
|
||||
"陆", "云", "柳", "秦", "江", "韩", "洛", "慕",
|
||||
"夜", "凤", "凌", "姜", "谢", "赵", "魏", "许",
|
||||
"司", "夏", "方", "唐", "霍", "段", "卓", "陈",
|
||||
]
|
||||
|
||||
## 名用字池(修仙风)。
|
||||
@@ -65,7 +66,7 @@ func generate_applicants(count: int, is_opening := false) -> void:
|
||||
applicants.append(_create_applicant())
|
||||
applicants_generated.emit(is_opening)
|
||||
|
||||
## 接受一名候选弟子:分配 ID 并移入名录(候选池 → 名录)。
|
||||
## 接受一名候选弟子:分配 ID、快照入宗时间并移入名录(候选池 → 名录)。
|
||||
## @param d: 要接受的候选
|
||||
func accept_applicant(d: Disciple) -> void:
|
||||
if not applicants.has(d):
|
||||
@@ -73,6 +74,9 @@ func accept_applicant(d: Disciple) -> void:
|
||||
applicants.erase(d)
|
||||
d.id = _next_id
|
||||
_next_id += 1
|
||||
d.join_year = GameState.year
|
||||
d.join_month = GameState.month
|
||||
d.join_day = GameState.day
|
||||
disciples.append(d)
|
||||
disciples_changed.emit()
|
||||
print("弟子入宗:%s %d岁 | %s资质%s | %s灵根 | %s" % [
|
||||
|
||||
Reference in New Issue
Block a user