From 65965e227c9843cd195218171e6f6110b8591a4e Mon Sep 17 00:00:00 2001 From: NktAts Date: Wed, 12 Aug 2020 21:26:37 +0900 Subject: [PATCH 1/4] =?UTF-8?q?feat:=E3=83=80=E3=82=A4=E3=82=B9=E3=83=9C?= =?UTF-8?q?=E3=83=83=E3=83=88=E8=A8=AD=E5=AE=9A=E6=AC=84=E3=82=92=E8=BF=BD?= =?UTF-8?q?=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../game-object-inventory.component.html | 5 +++++ .../game-object-inventory.component.ts | 12 ++++++++++++ src/app/service/game-object-inventory.service.ts | 3 +++ 3 files changed, 20 insertions(+) diff --git a/src/app/component/game-object-inventory/game-object-inventory.component.html b/src/app/component/game-object-inventory/game-object-inventory.component.html index ad8de7689..97742d16f 100644 --- a/src/app/component/game-object-inventory/game-object-inventory.component.html +++ b/src/app/component/game-object-inventory/game-object-inventory.component.html @@ -32,6 +32,11 @@
表示項目
+
標準ダイスボット
+
diff --git a/src/app/component/game-object-inventory/game-object-inventory.component.ts b/src/app/component/game-object-inventory/game-object-inventory.component.ts index 746c63627..300908546 100644 --- a/src/app/component/game-object-inventory/game-object-inventory.component.ts +++ b/src/app/component/game-object-inventory/game-object-inventory.component.ts @@ -15,6 +15,7 @@ import { ContextMenuAction, ContextMenuService, ContextMenuSeparator } from 'ser import { GameObjectInventoryService } from 'service/game-object-inventory.service'; import { PanelOption, PanelService } from 'service/panel.service'; import { PointerDeviceService } from 'service/pointer-device.service'; +import { DiceBot } from '@udonarium/dice-bot'; @Component({ selector: 'game-object-inventory', @@ -42,6 +43,10 @@ export class GameObjectInventoryComponent implements OnInit, AfterViewInit, OnDe get newLineString(): string { return this.inventoryService.newLineString; } + get diceBotInfos() { return DiceBot.diceBotInfos } + get gameType(): string { return this.inventoryService.gameType; } + set gameType(gameType: string) { this.inventoryService.gameType = gameType; } + constructor( private changeDetector: ChangeDetectorRef, private panelService: PanelService, @@ -216,4 +221,11 @@ export class GameObjectInventoryComponent implements OnInit, AfterViewInit, OnDe trackByGameObject(index: number, gameObject: GameObject) { return gameObject ? gameObject.identifier : index; } + + onChangeGameType(gameType: string) { + console.log('onChangeGameType ready'); + DiceBot.getHelpMessage(this.gameType).then(help => { + console.log('onChangeGameType done\n' + help + gameType); + }); + } } diff --git a/src/app/service/game-object-inventory.service.ts b/src/app/service/game-object-inventory.service.ts index 72cacbc02..58e6ecac2 100644 --- a/src/app/service/game-object-inventory.service.ts +++ b/src/app/service/game-object-inventory.service.ts @@ -25,6 +25,9 @@ export class GameObjectInventoryService { set dataTag(dataTag: string) { this.summarySetting.dataTag = dataTag; } get dataTags(): string[] { return this.summarySetting.dataTags; } + get gameType(): string { return this.summarySetting.gameType; } + set gameType(gameType: string) {this.summarySetting.gameType = gameType; } + tableInventory: ObjectInventory = new ObjectInventory(object => { return object.location.name === 'table'; }); commonInventory: ObjectInventory = new ObjectInventory(object => { return !this.isAnyLocation(object.location.name); }); privateInventory: ObjectInventory = new ObjectInventory(object => { return object.location.name === Network.peerId; }); From 2ee2b88947f1173f55b30e4a7138389233520c19 Mon Sep 17 00:00:00 2001 From: NktAts Date: Wed, 12 Aug 2020 21:31:57 +0900 Subject: [PATCH 2/4] =?UTF-8?q?fix:=20data-summary-settings=E3=81=AE?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E3=82=82=E3=82=8C=E3=82=92fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/class/data-summary-setting.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/class/data-summary-setting.ts b/src/app/class/data-summary-setting.ts index 32c40d33c..104d172db 100644 --- a/src/app/class/data-summary-setting.ts +++ b/src/app/class/data-summary-setting.ts @@ -22,6 +22,7 @@ export class DataSummarySetting extends GameObject implements InnerXml { @SyncVar() sortTag: string = 'name'; @SyncVar() sortOrder: SortOrder = SortOrder.ASC; @SyncVar() dataTag: string = 'HP MP 敏捷度 生命力 精神力'; + @SyncVar() gameType: string = ""; private _dataTag: string; private _dataTags: string[]; From 4e762d40a193c550789c7b5ebe9075f1a3c5d8a1 Mon Sep 17 00:00:00 2001 From: NktAts Date: Wed, 12 Aug 2020 21:47:11 +0900 Subject: [PATCH 3/4] =?UTF-8?q?feat:=20=E3=83=81=E3=83=A3=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=82=A6=E3=82=A3=E3=83=B3=E3=83=89=E3=82=A6=E3=81=8C?= =?UTF-8?q?=E9=80=A3=E5=8B=95=E3=81=97=E3=81=A6=E5=A4=89=E6=9B=B4=E3=81=95?= =?UTF-8?q?=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app/component/chat-window/chat-window.component.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/component/chat-window/chat-window.component.ts b/src/app/component/chat-window/chat-window.component.ts index 67653607a..1b17756b1 100644 --- a/src/app/component/chat-window/chat-window.component.ts +++ b/src/app/component/chat-window/chat-window.component.ts @@ -8,6 +8,7 @@ import { ChatTabSettingComponent } from 'component/chat-tab-setting/chat-tab-set import { ChatMessageService } from 'service/chat-message.service'; import { PanelOption, PanelService } from 'service/panel.service'; import { PointerDeviceService } from 'service/pointer-device.service'; +import { GameObjectInventoryService} from 'service/game-object-inventory.service'; @Component({ selector: 'chat-window', @@ -38,12 +39,14 @@ export class ChatWindowComponent implements OnInit, OnDestroy, AfterViewInit { constructor( public chatMessageService: ChatMessageService, private panelService: PanelService, - private pointerDeviceService: PointerDeviceService + private pointerDeviceService: PointerDeviceService, + private inventoryService: GameObjectInventoryService ) { } ngOnInit() { this.sendFrom = PeerCursor.myCursor.identifier; this._chatTabidentifier = 0 < this.chatMessageService.chatTabs.length ? this.chatMessageService.chatTabs[0].identifier : ''; + this.gameType = this.inventoryService.gameType; EventSystem.register(this) .on('MESSAGE_ADDED', event => { From 93909d2de537db08eec4d67e7fb991314b6c44e1 Mon Sep 17 00:00:00 2001 From: NktAts Date: Thu, 27 Aug 2020 20:49:58 +0900 Subject: [PATCH 4/4] =?UTF-8?q?feat:=E3=83=81=E3=83=A3=E3=83=83=E3=83=88?= =?UTF-8?q?=E3=83=91=E3=83=AC=E3=83=83=E3=83=88=E3=81=AB=E5=8F=8D=E6=98=A0?= =?UTF-8?q?=E3=81=95=E3=82=8C=E3=82=8B=E3=82=88=E3=81=86=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/chat-palette/chat-palette.component.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/app/component/chat-palette/chat-palette.component.ts b/src/app/component/chat-palette/chat-palette.component.ts index 9fd4f4de5..0eed459b8 100644 --- a/src/app/component/chat-palette/chat-palette.component.ts +++ b/src/app/component/chat-palette/chat-palette.component.ts @@ -9,6 +9,7 @@ import { PeerCursor } from '@udonarium/peer-cursor'; import { ChatInputComponent } from 'component/chat-input/chat-input.component'; import { ChatMessageService } from 'service/chat-message.service'; import { PanelService } from 'service/panel.service'; +import { GameObjectInventoryService} from 'service/game-object-inventory.service'; @Component({ selector: 'chat-palette', @@ -51,13 +52,20 @@ export class ChatPaletteComponent implements OnInit, OnDestroy { constructor( public chatMessageService: ChatMessageService, - private panelService: PanelService + private panelService: PanelService, + private inventoryService: GameObjectInventoryService ) { } ngOnInit() { Promise.resolve().then(() => this.updatePanelTitle()); this.chatTabidentifier = this.chatMessageService.chatTabs ? this.chatMessageService.chatTabs[0].identifier : ''; - this.gameType = this.character.chatPalette ? this.character.chatPalette.dicebot : ''; + + if(this.character.chatPalette != null && this.character.chatPalette.dicebot != '') { + this.gameType = this.character.chatPalette.dicebot; + } else { + this.gameType = this.inventoryService.gameType; + } + EventSystem.register(this) .on('DELETE_GAME_OBJECT', -1000, event => { if (this.character && this.character.identifier === event.data.identifier) {