forked from xiangwang25/whale-town-front-v2
feat: expand multiplayer, chat, and release support
- add network NPC synchronization and dialogue interactions - add world bulletin publishing and display - improve authentication, session refresh, and appearance sync - synchronize player direction and movement animations - improve input focus and progressive Web loading - add macOS/Windows builds and deployment configuration - include required fonts, shaders, and runtime assets
This commit is contained in:
@@ -131,7 +131,9 @@ func _render_service_points() -> void:
|
||||
var index := servicePointOption.get_item_count()
|
||||
servicePointOption.add_item(_format_service_point_option(point))
|
||||
servicePointOption.set_item_metadata(index, pointId)
|
||||
if selectedIndex < 0 and not _point_has_companion(point):
|
||||
var isOccupied := _point_has_companion(point)
|
||||
servicePointOption.set_item_disabled(index, isOccupied)
|
||||
if selectedIndex < 0 and not isOccupied:
|
||||
selectedIndex = index
|
||||
|
||||
if servicePointOption.get_item_count() <= 0:
|
||||
@@ -139,7 +141,14 @@ func _render_service_points() -> void:
|
||||
submitButton.disabled = true
|
||||
return
|
||||
|
||||
servicePointOption.select(selectedIndex if selectedIndex >= 0 else 0)
|
||||
if selectedIndex < 0:
|
||||
servicePointOption.select(-1)
|
||||
submitButton.disabled = true
|
||||
fetchModelsButton.disabled = _isSubmitting
|
||||
_set_status("当前陪伴位均已被占用", true)
|
||||
return
|
||||
|
||||
servicePointOption.select(selectedIndex)
|
||||
submitButton.disabled = _isSubmitting
|
||||
fetchModelsButton.disabled = _isSubmitting
|
||||
_set_status("填写人设和代理配置后可登记", false)
|
||||
@@ -227,6 +236,10 @@ func _build_payload() -> Dictionary:
|
||||
if servicePointId.is_empty():
|
||||
_set_status("请选择陪伴位", true)
|
||||
return {}
|
||||
if not _is_service_point_available(servicePointId):
|
||||
_set_status("该陪伴位已被占用,请选择其他空位", true)
|
||||
_request_service_points()
|
||||
return {}
|
||||
if personaName.is_empty():
|
||||
_set_status("请填写人设名称", true)
|
||||
personaNameInput.grab_focus()
|
||||
@@ -293,6 +306,15 @@ func _selected_service_point_id() -> String:
|
||||
return ""
|
||||
return str(servicePointOption.get_item_metadata(selectedIndex)).strip_edges()
|
||||
|
||||
func _is_service_point_available(servicePointId: String) -> bool:
|
||||
for pointVariant in _servicePoints:
|
||||
if not (pointVariant is Dictionary):
|
||||
continue
|
||||
var point: Dictionary = pointVariant
|
||||
if str(point.get("id", "")).strip_edges() == servicePointId:
|
||||
return not _point_has_companion(point)
|
||||
return false
|
||||
|
||||
func _setup_protocol_options() -> void:
|
||||
protocolOption.clear()
|
||||
protocolOption.add_item("OpenAI", 0)
|
||||
|
||||
Reference in New Issue
Block a user