超级玩家
 
- 贡献度
- 11
- 金元
- 8287
- 积分
- 873
- 精华
- 0
- 注册时间
- 2011-8-11
|
CQC_SS 发表于 2013-5-28 19:53 
非常感谢.........这真是怪事..............
游戏居然不受文件内容控制......OTZ
不受控制很正常,
因為目前有些code都是寫死的,
例如你新建一樣物品設定"use_action": "LIGHT_ON"
你會發現當打開再關上後那個物品會變成flashlight,
因為它的code寫死的了
void iuse::light_off(game *g, player *p, item *it, bool t)
{
if (it->charges == 0)
g->add_msg_if_player(p,"The flashlight's batteries are dead.");
else {
g->add_msg_if_player(p,"You turn the flashlight on.");
it->make(g->itypes["flashlight_on"]);
it->active = true;
it->charges --;
}
}
void iuse::light_on(game *g, player *p, item *it, bool t)
{
if (t) { // Normal use
// Do nothing... player::active_light and the lightmap::generate deal with this
} else { // Turning it off
g->add_msg_if_player(p,"The flashlight flicks off.");
it->make(g->itypes["flashlight"]);//就是這行搞的鬼,會變回flashlight
it->active = false;
}
}
|
|