• R/O
  • SSH
  • HTTPS

jinrousiki: コミット


コミットメタ情報

リビジョン2043 (tree)
日時2017-06-11 03:35:11
作者umethyl

ログメッセージ

TalkBuilder:関数コメント調整

変更サマリ

差分

--- trunk/include/talk/talk_class.php (revision 2042)
+++ trunk/include/talk/talk_class.php (revision 2043)
@@ -604,7 +604,7 @@
604604 return $this->Register($stack);
605605 }
606606
607- //システムメッセージ
607+ //発言 (システムメッセージ)
608608 private function TalkSystem(TalkParser $talk, User $user, $name) {
609609 $str = $talk->sentence . $this->AddTime($talk);
610610 if (! isset($talk->action)) { //標準処理
@@ -629,7 +629,7 @@
629629 }
630630 }
631631
632- //身代わり君専用システムメッセージ
632+ //発言 (身代わり君専用)
633633 private function TalkDummyBoy(TalkParser $talk, User $user) {
634634 $str = Message::SYMBOL . $user->handle_name . Message::SPACER . $talk->sentence;
635635 $str = $this->QuoteTalk($str) . $this->AddTime($talk);
@@ -636,7 +636,7 @@
636636 return $this->RegisterSystem($str, $this->GetTalkID($talk), 'dummy-boy');
637637 }
638638
639- //昼発言
639+ //発言 (昼)
640640 private function TalkDay(TalkParser $talk, User $actor, User $real_actor, User $real) {
641641 if ($talk->location == TalkLocation::SECRET && ! $this->flag->open_talk) {
642642 if (DB::$ROOM->IsOption('secret_talk')) {
@@ -660,56 +660,7 @@
660660 return $this->Add($talk, $actor, $real);
661661 }
662662
663- //夜発言 (公開)
664- private function TalkOpenNight(TalkParser $talk, User $user, $symbol, $name) {
665- $class = '';
666- $voice = $talk->font_type;
667- switch ($talk->location) {
668- case TalkLocation::COMMON:
669- $class = 'night-common';
670- $name .= TalkHTML::GenerateInfo(TalkMessage::COMMON);
671- $voice .= ' ' . $class;
672- break;
673-
674- case TalkLocation::WOLF:
675- $class = 'night-wolf';
676- $name .= TalkHTML::GenerateInfo(TalkMessage::WOLF);
677- $voice .= ' ' . $class;
678- break;
679-
680- case TalkLocation::MAD:
681- $class = 'night-wolf';
682- $name .= TalkHTML::GenerateInfo(TalkMessage::MAD);
683- $voice .= ' ' . $class;
684- break;
685-
686- case TalkLocation::FOX:
687- $class = 'night-fox';
688- $name .= TalkHTML::GenerateInfo(TalkMessage::FOX);
689- $voice .= ' ' . $class;
690- break;
691-
692- case TalkLocation::MONOLOGUE:
693- $class = 'night-self-talk';
694- $name .= TalkHTML::GenerateSelfTalk();
695- break;
696- }
697- $str = $talk->sentence; //改行を入れるため再セット
698- $symbol = $this->AddIcon($user, $symbol, $name);
699- $name .= $this->AddTimeName($talk);
700-
701- $stack = array(
702- 'str' => $str,
703- 'symbol' => $symbol,
704- 'user_info' => $name,
705- 'voice' => $voice,
706- 'user_class' => $class,
707- 'talk_id' => $this->GetTalkID($talk)
708- );
709- return $this->Register($stack);
710- }
711-
712- //夜発言
663+ //発言 (夜)
713664 private function TalkNight(TalkParser $talk, User $actor, User $real_actor, User $real) {
714665 if ($this->IsMindRead($talk, $actor, $real_actor)) { //発言透過判定
715666 return $this->Add($talk, $actor, $real);
@@ -718,9 +669,12 @@
718669 switch ($talk->location) {
719670 case TalkLocation::COMMON: //共有者
720671 $filter = RoleLoader::LoadMain($actor);
721- if (! method_exists($filter, 'Whisper')) return false; //player スイッチによる不整合対策
672+ if (! method_exists($filter, 'Whisper')) { //player スイッチによる不整合対策
673+ return false;
674+ } elseif ($filter->Whisper($this, $talk)) {
675+ return true;
676+ }
722677
723- if ($filter->Whisper($this, $talk)) return;
724678 foreach (RoleLoader::LoadType('talk_whisper') as $filter) {
725679 if ($filter->Whisper($this, $talk)) return true;
726680 }
@@ -728,9 +682,12 @@
728682
729683 case TalkLocation::WOLF: //人狼
730684 $filter = RoleLoader::LoadMain($actor);
731- if (! method_exists($filter, 'Howl')) return false; //player スイッチによる不整合対策
685+ if (! method_exists($filter, 'Howl')) { //player スイッチによる不整合対策
686+ return false;
687+ } elseif ($filter->Howl($this, $talk)) {
688+ return true;
689+ }
732690
733- if ($filter->Howl($this, $talk)) return;
734691 foreach (RoleLoader::LoadType('talk_whisper') as $filter) {
735692 if ($filter->Whisper($this, $talk)) return true;
736693 }
@@ -764,7 +721,56 @@
764721 }
765722 }
766723
767- //霊界発言
724+ //発言 (夜 + 公開)
725+ private function TalkOpenNight(TalkParser $talk, User $user, $symbol, $name) {
726+ $class = '';
727+ $voice = $talk->font_type;
728+ switch ($talk->location) {
729+ case TalkLocation::COMMON:
730+ $class = 'night-common';
731+ $name .= TalkHTML::GenerateInfo(TalkMessage::COMMON);
732+ $voice .= ' ' . $class;
733+ break;
734+
735+ case TalkLocation::WOLF:
736+ $class = 'night-wolf';
737+ $name .= TalkHTML::GenerateInfo(TalkMessage::WOLF);
738+ $voice .= ' ' . $class;
739+ break;
740+
741+ case TalkLocation::MAD:
742+ $class = 'night-wolf';
743+ $name .= TalkHTML::GenerateInfo(TalkMessage::MAD);
744+ $voice .= ' ' . $class;
745+ break;
746+
747+ case TalkLocation::FOX:
748+ $class = 'night-fox';
749+ $name .= TalkHTML::GenerateInfo(TalkMessage::FOX);
750+ $voice .= ' ' . $class;
751+ break;
752+
753+ case TalkLocation::MONOLOGUE:
754+ $class = 'night-self-talk';
755+ $name .= TalkHTML::GenerateSelfTalk();
756+ break;
757+ }
758+ $str = $talk->sentence; //改行を入れるため再セット
759+ $symbol = $this->AddIcon($user, $symbol, $name);
760+ $name .= $this->AddTimeName($talk);
761+
762+ $stack = array(
763+ 'str' => $str,
764+ 'symbol' => $symbol,
765+ 'user_info' => $name,
766+ 'voice' => $voice,
767+ 'user_class' => $class,
768+ 'talk_id' => $this->GetTalkID($talk)
769+ );
770+ return $this->Register($stack);
771+ }
772+
773+ //発言 (霊界)
768774 private function TalkHeaven(TalkParser $talk, $symbol, $name) {
769775 if (! $this->flag->open_talk) return false;
770776
旧リポジトリブラウザで表示