P07-01-WX: 仕上がった天候の機能の受入:自然天候・雨・嵐・世界樹と成人客のマナ霧・上部の表示と予報・保存と移行(マナ炉の産出 120 を除く。P07-01 の補助の作業。原単位への加算 0)
This commit is contained in:
@@ -136,6 +136,7 @@ var rank_button: Button
|
||||
var rank_dialog: ConfirmationDialog
|
||||
var event_log_dialog: AcceptDialog
|
||||
var weather_label: Label
|
||||
var weather_forecast_label: Label
|
||||
var guest_count_label: Button
|
||||
var dimension_migration_dialog: ConfirmationDialog
|
||||
var _dimension_migration_digest := ""
|
||||
@@ -467,6 +468,11 @@ func _create_top_bar() -> Control:
|
||||
weather_label.tooltip_text = "嵐の間は新規入館が停止します。現在のお客様は館内に残ります。"
|
||||
weather_label.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
row.add_child(weather_label)
|
||||
# A13 forecast: the next change of today's weather (kind and time).
|
||||
weather_forecast_label = _hud_value_label("", 72)
|
||||
weather_forecast_label.name = "WeatherForecastLabel"
|
||||
weather_forecast_label.mouse_filter = Control.MOUSE_FILTER_STOP
|
||||
row.add_child(weather_forecast_label)
|
||||
|
||||
guest_count_label = Button.new()
|
||||
guest_count_label.text = "来客 0人"
|
||||
@@ -1550,6 +1556,16 @@ func _refresh_dashboard() -> void:
|
||||
var weather_report: Dictionary = _runtime.get_weather_report()
|
||||
var weather_names := {&"clear": "晴れ", &"rain": "雨", &"storm": "嵐", &"mana_fog": "マナ霧"}
|
||||
weather_label.text = weather_names.get(weather_report.get(&"kind", &""), "天候 —")
|
||||
var next_change: Dictionary = weather_report.get(&"next_change", {})
|
||||
var forecast := "次: 予定なし"
|
||||
if not next_change.is_empty():
|
||||
var change_minute := posmod(int(next_change.get(&"minute", 0)), 1_440)
|
||||
forecast = "次: %s %02d:%02d" % [weather_names.get(StringName(next_change.get(&"kind", &"")), "天候 —"), change_minute / 60, change_minute % 60]
|
||||
var effect := String(weather_report.get(&"effect_text", ""))
|
||||
weather_label.tooltip_text = "%s\n毎朝6時にその日の天候が決まります。" % effect if not effect.is_empty() else weather_label.tooltip_text
|
||||
if weather_forecast_label != null:
|
||||
weather_forecast_label.text = forecast
|
||||
weather_forecast_label.tooltip_text = "%s\n%s" % [forecast, effect]
|
||||
var guests := _call_array(_service(&"guest_service"), &"get_guests")
|
||||
var queued_guests := 0
|
||||
var served_guests := 0
|
||||
|
||||
Reference in New Issue
Block a user