RequestDataLogGame
@@ -32,12 +32,14 @@ | ||
32 | 32 | GameHTML::OutputLastWords(true); //遺言 (昼終了時限定) |
33 | 33 | } |
34 | 34 | |
35 | - if (DB::$ROOM->IsNight()) GameHTML::OutputVote(); | |
35 | + if (DB::$ROOM->IsNight()) { | |
36 | + GameHTML::OutputVote(); | |
37 | + } | |
36 | 38 | } |
37 | 39 | HTML::OutputFooter(true); |
38 | 40 | } |
39 | 41 | |
40 | - //認証 (死者 / ゲーム終了後) | |
42 | + //認証 (死者 or ゲーム終了後のみ) | |
41 | 43 | private static function Certify() { |
42 | 44 | if (DB::$SELF->IsDead() || DB::$ROOM->IsFinished()) return; |
43 | 45 | HTML::OutputResult(GameLogMessage::CERTIFY, GameLogMessage::CERTIFY . Message::TOP); |
@@ -48,8 +50,8 @@ | ||
48 | 50 | switch (RQ::Get()->scene) { |
49 | 51 | case RoomScene::AFTER: |
50 | 52 | case RoomScene::HEAVEN: |
51 | - if (! DB::$ROOM->IsFinished()) { //霊界・ゲーム終了後はゲーム終了後のみ | |
52 | - self::OutputResult(GameLogMessage::PLAYING); | |
53 | + if (false === DB::$ROOM->IsFinished()) { //霊界・ゲーム終了後はゲーム終了後のみ | |
54 | + self::OutputError(GameLogMessage::PLAYING); | |
53 | 55 | } |
54 | 56 | break; |
55 | 57 |
@@ -57,7 +59,7 @@ | ||
57 | 59 | if (DB::$ROOM->date < RQ::Get()->date || |
58 | 60 | (DB::$ROOM->IsDate(RQ::Get()->date) && |
59 | 61 | (DB::$ROOM->IsDay() || DB::$ROOM->scene == RQ::Get()->scene))) { //未来判定 |
60 | - self::OutputResult(GameLogMessage::FUTURE); | |
62 | + self::OutputError(GameLogMessage::FUTURE); | |
61 | 63 | } |
62 | 64 | DB::$ROOM->last_date = DB::$ROOM->date; |
63 | 65 | DB::$ROOM->date = RQ::Get()->date; |
@@ -95,7 +97,8 @@ | ||
95 | 97 | |
96 | 98 | //能力発動ログ出力 (管理者限定) |
97 | 99 | private static function OutputAbility() { |
98 | - if (RQ::Get()->user_no > 0 && DB::$SELF->IsDummyBoy() && ! DB::$ROOM->IsOption('gm_login')) { | |
100 | + if (RQ::Get()->user_no > 0 && DB::$SELF->IsDummyBoy() && | |
101 | + false === DB::$ROOM->IsOption('gm_login')) { | |
99 | 102 | Loader::LoadFile('image_class'); |
100 | 103 | DB::LoadSelf(RQ::Get()->user_no); |
101 | 104 | DB::$SELF->live = UserLive::LIVE; |
@@ -104,7 +107,7 @@ | ||
104 | 107 | } |
105 | 108 | |
106 | 109 | //エラー処理 |
107 | - private static function OutputResult($str) { | |
110 | + private static function OutputError($str) { | |
108 | 111 | HTML::OutputResult(GameLogMessage::INPUT, GameLogMessage::INPUT . $str); |
109 | 112 | } |
110 | 113 | } |
@@ -39,6 +39,12 @@ | ||
39 | 39 | const BACK_URL = 'back_url'; |
40 | 40 | } |
41 | 41 | |
42 | +//-- 定数リスト (Request/Log/Game) --// | |
43 | +final class RequestDataLogGame { | |
44 | + const DATE = 'date'; | |
45 | + const SCENE = 'scene'; | |
46 | +} | |
47 | + | |
42 | 48 | //-- 定数リスト (Request/Log/Room) --// |
43 | 49 | final class RequestDataLogRoom { |
44 | 50 | const REVERSE = 'reverse_log'; |
@@ -8,8 +8,8 @@ | ||
8 | 8 | class Request_game_log extends Request { |
9 | 9 | public function __construct() { |
10 | 10 | $this->ParseGetRoomNo(); |
11 | - $this->ParseGetInt('date', RequestDataUser::ID); | |
12 | - $this->ParseGetData('scene'); | |
11 | + $this->ParseGetInt(RequestDataLogGame::DATE, RequestDataUser::ID); | |
12 | + $this->ParseGetData(RequestDataLogGame::SCENE); | |
13 | 13 | if ($this->IsInvalidScene()) { |
14 | 14 | HTML::OutputResult(Message::REQUEST_ERROR, Message::REQUEST_ERROR); |
15 | 15 | } |