• R/O
  • SSH
  • HTTPS

jinrousiki: Commit


Commit MetaInfo

Revision2317 (tree)
Time2019-01-06 19:04:27
Authorumethyl

Log Message

RequestDataLogGame

Change Summary

Incremental Difference

--- trunk/include/controller/game_log_class.php (revision 2316)
+++ trunk/include/controller/game_log_class.php (revision 2317)
@@ -32,12 +32,14 @@
3232 GameHTML::OutputLastWords(true); //遺言 (昼終了時限定)
3333 }
3434
35- if (DB::$ROOM->IsNight()) GameHTML::OutputVote();
35+ if (DB::$ROOM->IsNight()) {
36+ GameHTML::OutputVote();
37+ }
3638 }
3739 HTML::OutputFooter(true);
3840 }
3941
40- //認証 (死者 / ゲーム終了後)
42+ //認証 (死者 or ゲーム終了後のみ)
4143 private static function Certify() {
4244 if (DB::$SELF->IsDead() || DB::$ROOM->IsFinished()) return;
4345 HTML::OutputResult(GameLogMessage::CERTIFY, GameLogMessage::CERTIFY . Message::TOP);
@@ -48,8 +50,8 @@
4850 switch (RQ::Get()->scene) {
4951 case RoomScene::AFTER:
5052 case RoomScene::HEAVEN:
51- if (! DB::$ROOM->IsFinished()) { //霊界・ゲーム終了後はゲーム終了後のみ
52- self::OutputResult(GameLogMessage::PLAYING);
53+ if (false === DB::$ROOM->IsFinished()) { //霊界・ゲーム終了後はゲーム終了後のみ
54+ self::OutputError(GameLogMessage::PLAYING);
5355 }
5456 break;
5557
@@ -57,7 +59,7 @@
5759 if (DB::$ROOM->date < RQ::Get()->date ||
5860 (DB::$ROOM->IsDate(RQ::Get()->date) &&
5961 (DB::$ROOM->IsDay() || DB::$ROOM->scene == RQ::Get()->scene))) { //未来判定
60- self::OutputResult(GameLogMessage::FUTURE);
62+ self::OutputError(GameLogMessage::FUTURE);
6163 }
6264 DB::$ROOM->last_date = DB::$ROOM->date;
6365 DB::$ROOM->date = RQ::Get()->date;
@@ -95,7 +97,8 @@
9597
9698 //能力発動ログ出力 (管理者限定)
9799 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')) {
99102 Loader::LoadFile('image_class');
100103 DB::LoadSelf(RQ::Get()->user_no);
101104 DB::$SELF->live = UserLive::LIVE;
@@ -104,7 +107,7 @@
104107 }
105108
106109 //エラー処理
107- private static function OutputResult($str) {
110+ private static function OutputError($str) {
108111 HTML::OutputResult(GameLogMessage::INPUT, GameLogMessage::INPUT . $str);
109112 }
110113 }
--- trunk/include/data/request_data_class.php (revision 2316)
+++ trunk/include/data/request_data_class.php (revision 2317)
@@ -39,6 +39,12 @@
3939 const BACK_URL = 'back_url';
4040 }
4141
42+//-- 定数リスト (Request/Log/Game) --//
43+final class RequestDataLogGame {
44+ const DATE = 'date';
45+ const SCENE = 'scene';
46+}
47+
4248 //-- 定数リスト (Request/Log/Room) --//
4349 final class RequestDataLogRoom {
4450 const REVERSE = 'reverse_log';
--- trunk/include/request/game_log.php (revision 2316)
+++ trunk/include/request/game_log.php (revision 2317)
@@ -8,8 +8,8 @@
88 class Request_game_log extends Request {
99 public function __construct() {
1010 $this->ParseGetRoomNo();
11- $this->ParseGetInt('date', RequestDataUser::ID);
12- $this->ParseGetData('scene');
11+ $this->ParseGetInt(RequestDataLogGame::DATE, RequestDataUser::ID);
12+ $this->ParseGetData(RequestDataLogGame::SCENE);
1313 if ($this->IsInvalidScene()) {
1414 HTML::OutputResult(Message::REQUEST_ERROR, Message::REQUEST_ERROR);
1515 }
Show on old repository browser