
ES2 mudlib - FF extension v0.6c 函式說明書

程式: /adm/daemons/natured.c

	這個 daemon 負責計算目前的時間對天氣的敘述.
	關於各時段的敘述, 放在 /adm/etc/nature/day_phase 裡.
	current_day_phase 為整數, 為 day_phase 映射變數的索引. 

void init_day_phase()

	在本物件載入時, create() 函式讀入 day_phase 檔後會呼叫此函式.
	此函式設定第一次 call_out 呼叫 update_day_phase() 的時間, 
	之後, 所有 update_day_phase() 的 call_out 由 update_day_phase()
	函式循環呼叫.

void update_day_phase()

	將 current_day_phase 加 1, 目前的天氣敘述就換成下一個時段.
	如果 day_phase 檔案中, event_fun 欄位寫有函式名稱 (假設名稱為
	phase_func), 同時 natured.c 寫有 void event_phase_func() 函式,
	在該時段就會呼叫 event_phase_func().

string outdoor_room_description()

	由 /cmds/std/look.c 呼叫, 傳回室外的天氣描述.

string game_time()

	傳回 mud 時間, 目前定義為真實時間的 60 倍.

mapping *read_table( string file )

	從 file 讀入天氣時段的定義. 格式請參考 /adm/etc/nature/day_phase
	以 # 開頭的行會忽略.

mapping *query_day_phase()

	傳回目前天氣時段的資料.

Spock of The Final Frontier	98.Sep.22.
