Skip to content

Commit

Permalink
Merge branch 'replace_option' into Midori
Browse files Browse the repository at this point in the history
  • Loading branch information
Gakuto1112 committed Aug 24, 2024
2 parents 16998e2 + 612d2fb commit 0c854cd
Show file tree
Hide file tree
Showing 8 changed files with 258 additions and 178 deletions.
Binary file modified .github/README_images/action_wheel.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .github/README_images/vehicle_model.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions .github/README_templates/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@ Changes the amount of triangular particles that appear from the red or blue bord

As an additional option, I have added an option to disable the frame during the Ex skill animations. This is the closest to the original one.

### Action6. Toggle vehicle models
Toggles the vehicle models replacement feature for some characters. This option is disabled for characters with no vehicle models.

![Vehicle models](../README_images/vehicle_model.jpg)

<!-- $inject(how_to_use) -->

<!-- $inject(notes) -->
Expand Down
5 changes: 5 additions & 0 deletions .github/README_templates/jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,11 @@ Exスキルアニメーション中に表示される赤や青の枠から出現

追加のオプションとして、Exスキルアニメーション中のフレーム表示をなくすオプションを追加しました。この状態が本家に一番近い状態です。

### アクション6. 乗り物モデルの置き換えの切り替え
一部生徒の「ゲーム内の乗り物に乗った時にそのモデルを置き換える」機能を有効にするか無効にするかを切り替えます。乗り物モデルの置き換えがない生徒ではこのオプションが無効化されています。

![乗り物モデル](../README_images/vehicle_model.jpg)

<!-- $inject(how_to_use) -->

<!-- $inject(notes) -->
Expand Down
397 changes: 227 additions & 170 deletions scripts/action_wheel/action_wheel.lua

Large diffs are not rendered by default.

19 changes: 13 additions & 6 deletions scripts/blue_archive_character.lua
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ BlueArchiveCharacter = {
---スカート
SKIRT = {
---スカートとして制御するモデルの配列
---@type ModelPart
---@type ModelPart[]
SkirtModels = {models.models.main.Avatar.UpperBody.Body.Skirt, models.models.main.Avatar.UpperBody.Body.CMaidB.Skirt1}
},

Expand Down Expand Up @@ -1573,11 +1573,11 @@ BlueArchiveCharacter = {
---頭ブロック
HEAD_BLOCK = {
---頭以外のモデルパーツで頭ブロックにアタッチしたいモデルパーツを配列形式で列挙する。
---@type ModelPart>[]
---@type ModelPart[]
includeModels = {},

---頭のモデルパーツで頭ブロックから除外したいモデルパーツを配列形式で列挙する。
---@type ModelPart>[]
---@type ModelPart[]
excludeModels = {}

--[[
Expand All @@ -1596,11 +1596,11 @@ BlueArchiveCharacter = {
---ポートレート
PORTRAIT = {
---頭以外のモデルパーツでポートレートにアタッチしたいモデルパーツを配列形式で列挙する。
---@type ModelPart>[]
---@type ModelPart[]
includeModels = {},

---頭のモデルパーツでポートレートから除外したいモデルパーツを配列形式で列挙する。
---@type ModelPart>[]
---@type ModelPart[]
excludeModels = {models.models.main.Avatar.Head.Phone}

--[[
Expand All @@ -1619,7 +1619,7 @@ BlueArchiveCharacter = {
---死亡アニメーションのダミーアバター
DEATH_ANIMATION = {
---ダミーアバターから除外したいモデルパーツを配列形式で列挙する。
---@type ModelPart>[]
---@type ModelPart[]
excludeModels = {},

---死亡アニメーションが再生された直後に実行される関数(省略可)
Expand Down Expand Up @@ -1665,6 +1665,13 @@ BlueArchiveCharacter = {
]]
},

---アクションホイールに関わる設定
ACTION_WHEEL = {
---乗り物のモデル置き換えオプションを有効にするかどうか。
---@type boolean
vehicleOptionEnabled = false
},

---物理演算
PHYSICS = {
data = {
Expand Down
6 changes: 4 additions & 2 deletions scripts/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ local nextSyncCount = 0
---@param showClubName boolean 部活名を表示するかどうか
---@param costumeId integer 現在の衣装ID
---@param isArmorShown boolean 防具が見えているかどうか
---@param shouldReplaceVehicleModels boolean 乗り物モデルを置き換えるかどうか
---@param isChatOpened boolean チャット欄を開いているかどうか
function pings.syncAvatarConfig(nameTypeId, showClubName, costumeId, isArmorShown, isChatOpened)
function pings.syncAvatarConfig(nameTypeId, showClubName, costumeId, isArmorShown, shouldReplaceVehicleModels, isChatOpened)
if not isSynced then
Nameplate:setName(nameTypeId, showClubName)
Armor.ShowArmor = isArmorShown
ActionWheel.ShouldReplaceVehicleModels = shouldReplaceVehicleModels
Bubble.IsChatOpened = isChatOpened
if costumeId >= 2 then
Costume:setCostume(costumeId)
Expand All @@ -68,7 +70,7 @@ if host:isHost() then
config:setName("BlueArchive_"..BlueArchiveCharacter.BASIC.firstName.en_us..BlueArchiveCharacter.BASIC.lastName.en_us)
events.TICK:register(function ()
if nextSyncCount == 0 then
pings.syncAvatarConfig(Nameplate.CurrentName, Nameplate.ClubShown, Costume.CurrentCostume, Armor.ShowArmor, Bubble.IsChatOpened)
pings.syncAvatarConfig(Nameplate.CurrentName, Nameplate.ClubShown, Costume.CurrentCostume, Armor.ShowArmor, ActionWheel.ShouldReplaceVehicleModels, Bubble.IsChatOpened)
nextSyncCount = 300
else
nextSyncCount = nextSyncCount - 1
Expand Down
4 changes: 4 additions & 0 deletions scripts/language.lua
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ Language = {
action_wheel__main__action_5__option_4 = "Hide Ex skill frame",
action_wheel__main__action_5__done_first = "Changed amount of particles in Ex skill frame to§b",
action_wheel__main__action_5__done_last = "§r.",
action_wheel__main__action_6__title = "Replace vehicle models: ",
action_wheel__main__action_6__unavailable = "This option is unavailable for this character.",
action_wheel_gui__bubble_guide__title = "§0Bubble emote guide",
action_wheel_gui__ex_skill_guide__title = "§0Ex skill guide",
action_wheel_gui__ex_skill_guide__key_pre = "Press \"",
Expand Down Expand Up @@ -57,6 +59,8 @@ Language = {
action_wheel__main__action_5__option_4 = "スキルフレーム非表示",
action_wheel__main__action_5__done_first = "Exスキルフレームのパーティクルの量を§b",
action_wheel__main__action_5__done_last = "§rに変更しました。",
action_wheel__main__action_6__title = "乗り物のモデルを置き換え:",
action_wheel__main__action_6__unavailable = "この生徒さんでは利用できません。",
action_wheel_gui__bubble_guide__title = "§0吹き出しエモートガイド",
action_wheel_gui__ex_skill_guide__title = "§0Exスキルガイド",
action_wheel_gui__ex_skill_guide__key_pre = "\"",
Expand Down

0 comments on commit 0c854cd

Please sign in to comment.