Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop 5.1.2 #1301

Merged
merged 169 commits into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
bb7498d
霊界から役職が見える設定のとき,憑依時の役職表示をカスタムロールで上書き
Hyz-sui Sep 6, 2023
a6dd5a0
After camouflage end, remove pets at dead players
Tommy-XL Sep 5, 2023
3b0f312
Fix conditional operator
Tommy-XL Sep 5, 2023
498a836
Remove "Camouflage."
Tommy-XL Sep 6, 2023
6309796
Add command & Remove unused using
Tommy-XL Sep 6, 2023
424bccd
Merge pull request #398 from tukasa0001/temp/1296
Hyz-sui Sep 10, 2023
5b8f092
Merge pull request #397 from tukasa0001/feature/HauntFilterTextCustom…
Hyz-sui Sep 10, 2023
8a0f6a4
不要となったResetCamPlayerListの削除
kou-hetare Sep 10, 2023
45358a4
RequireResetCamの判定式を統一
kou-hetare Sep 11, 2023
9b336e2
不要なRequireResetCamへの参照を削除
kou-hetare Sep 11, 2023
2ba9954
Bug Fix / Sometimes tabs moved to the left
Tommy-XL Sep 8, 2023
656a7b6
会議開始時にベントを空にする処理を追加
Hyz-sui Sep 12, 2023
45d64da
Merge pull request #400 from tukasa0001/temp/1298
Hyz-sui Sep 13, 2023
66cd5dd
Merge pull request #401 from tukasa0001/feature/FixEmptyVentBoot
Hyz-sui Sep 13, 2023
402b7d4
Merge pull request #399 from tukasa0001/fix/DeleteResetCamPlayerList
kou-hetare Sep 14, 2023
f310f3c
追加勝利のHashSetをCustomRoles判定に変更
Masami4711 Sep 14, 2023
2f88a15
CheckWinの引数をAdditionalWinnersからCustomRolesに変更
Masami4711 Sep 14, 2023
cc1dfe7
AdditionalWinnersを削除
Masami4711 Sep 14, 2023
e4bc369
AdditionalWinnerTextをStringBuilderに変更
Masami4711 Sep 14, 2023
a353645
Vent.CanUseの処理を書き直し
Hyz-sui Sep 16, 2023
0a22f18
ベントを空にするタイミングを会議後に変更
Hyz-sui Sep 15, 2023
9854c93
Merge pull request #405 from tukasa0001/fix/EmptyVentBootFixMayNotWork
Hyz-sui Sep 18, 2023
23d23ab
Merge pull request #404 from tukasa0001/fix/OutdatedVentUse
Hyz-sui Sep 18, 2023
50d1c4b
IKillerにCanUseImpostorVentButton()の追加
kou-hetare Sep 18, 2023
c481447
desyncロールアサイン時のIsDeadの変更を削除
Hyz-sui Sep 18, 2023
aba204f
desyncインポスターを引いたプレイヤーをバニラロールの抽選から除外するパッチを追加
Hyz-sui Sep 18, 2023
65d178a
バニラローーるの能力ボタンラベルの変更を削除
Hyz-sui Sep 18, 2023
5cd4a3b
Merge pull request #406 from tukasa0001/feature/IKillerCanUseImpostor…
kou-hetare Sep 19, 2023
6ab52b6
Merge pull request #403 from tukasa0001/delete/AdditionalWinners
Masami4711 Sep 20, 2023
45e6430
Merge pull request #408 from tukasa0001/fix/VanillaRoleWrapperButtonText
Hyz-sui Sep 20, 2023
a640ba8
Merge pull request #407 from tukasa0001/fix/DesyncAutoMute
Hyz-sui Sep 20, 2023
db2ffeb
ボタンのクラスを作成
Hyz-sui Sep 20, 2023
3299637
メインメニューのボタンをSimpleButtonに変更
Hyz-sui Sep 20, 2023
5fe9cb7
最終結果の表示を切り替えるボタンを作成
Hyz-sui Sep 20, 2023
79e3991
勝敗テキストの中央寄せを削除
Hyz-sui Sep 20, 2023
de14af7
Revert "Desyncインポスターのアサイン時にIsDeadを変更しないよう変更"
Hyz-sui Sep 20, 2023
540f120
Merge pull request #410 from tukasa0001/revert-407-fix/DesyncAutoMute
Hyz-sui Sep 20, 2023
59be37c
Merge branch 'develop' into feature/HideResults
Hyz-sui Sep 22, 2023
3897c6f
CanUseSabotageButtonの追加
kou-hetare Sep 20, 2023
c06dbbb
マップボタンの判定にCanUseSabotageButtonを使用
kou-hetare Sep 20, 2023
1c816f0
サボ不可はCanUseSabotageButtonで判断するように変更
kou-hetare Sep 20, 2023
7ee7a6e
RequireResetCamをIsDesyncImpostorに改名
Hyz-sui Sep 23, 2023
940eb23
Merge pull request #411 from tukasa0001/refactor/IsDesyncImpostor
Hyz-sui Sep 23, 2023
04efb56
シェリフの編集ミス修正
kou-hetare Sep 23, 2023
2d534f0
不要なusingの削除
kou-hetare Sep 23, 2023
1d6ba7e
CanUseSabotageButtonのデフォルト実装削除。IImpostorでデフォルトtrueとする
kou-hetare Sep 23, 2023
8b92227
Merge pull request #412 from tukasa0001/feature/CanUseSabotageButton
kou-hetare Sep 23, 2023
d099d94
Merge pull request #409 from tukasa0001/feature/HideResults
Hyz-sui Sep 23, 2023
0bd260d
AssignCountRuleとAssignUnitRolesをRoleAssignInfoに統合
Masami4711 Sep 25, 2023
a313d70
IsInitiallyAssignableの追加、適用
Masami4711 Sep 25, 2023
c314053
エゴイストを単独アサインに変更
Masami4711 Sep 26, 2023
5540b0f
新しいMod用プロトコルバージョンに変更
Hyz-sui Oct 1, 2023
5a7b83a
Merge pull request #416 from tukasa0001/change/ProtocolVersion
Hyz-sui Oct 1, 2023
dcb94c2
Merge pull request #415 from tukasa0001/feature/RoleAssignInfo
Masami4711 Oct 2, 2023
fd68575
死亡したらシェイプシフト解除
kou-hetare Oct 8, 2023
356de7e
スキン変更不要の時はRPPCを送らない
kou-hetare Oct 8, 2023
d3d536a
死亡時のカモフラ解除をForceRevertに差し戻し
kou-hetare Oct 8, 2023
2aab8d2
MurderPlayer prefixのTryGetValueをif文の中に移動
kou-hetare Oct 9, 2023
0f3bcf2
Merge pull request #417 from tukasa0001/fix/ShapeShiftDeath
kou-hetare Oct 9, 2023
cdb3ec8
Crowdinから翻訳をインポート
tanakanira0118 Oct 12, 2023
51770db
Merge pull request #420 from tukasa0001/crowdin-import-and-add-portug…
yurinakira Oct 13, 2023
0c13623
PlainDoor -> OpenableDoor
Hyz-sui Oct 25, 2023
c1b3b31
NormalTasks -> ShortTasks
Hyz-sui Oct 25, 2023
979ecb1
Telemetry -> UnityTelemetry
Hyz-sui Oct 25, 2023
1b61e80
謎RepairSystemを削除
Hyz-sui Oct 25, 2023
2d515b4
RpcRepairSystem -> RpcUpdateSystem
Hyz-sui Oct 25, 2023
2ead484
protectedByGuardianを移行
Hyz-sui Oct 25, 2023
a48f9c1
MurderPlayer拡張メソッドを作成
Hyz-sui Oct 25, 2023
ec2b01f
MurderPlayerRPCにMurderResultFlagsの書き込みを追加
Hyz-sui Oct 25, 2023
a1a973a
RpcMurderPlayer拡張メソッドを作成
Hyz-sui Oct 25, 2023
5baf32e
ISystemType.Detoriorate -> Deteriorate
Hyz-sui Oct 25, 2023
2e971cb
ランダムスポーン発動までのSnapTo回数を更新
Hyz-sui Oct 25, 2023
faa9450
RpcCalls.RepairSystem -> UpdateSystem
Hyz-sui Oct 25, 2023
dc4a3ab
エアシップのリアクターーのSystemTypesをHeliSabotageに変更
Hyz-sui Oct 25, 2023
a5f25ab
RepairSystem, UpdateSystem関連のパッチを各SystemTypeに分割し関係を整理
Hyz-sui Oct 25, 2023
e979a9d
ISystemTypeUpdateHookインタフェイスを作成
Hyz-sui Oct 26, 2023
85979ae
各ISystemTypeにISystemTypeUpdateHookのメソッドの呼び出しを追加
Hyz-sui Oct 26, 2023
48dec78
サボマスの処理を新しいものに変更
Hyz-sui Oct 26, 2023
f9899ae
IsActiveで出る例外を解消
Hyz-sui Oct 26, 2023
a913f5e
CheckCamouflageをコミュサボのUpdateSystemのPostfixに移動
Hyz-sui Oct 26, 2023
7f1cd37
OnSabotageの呼び出し場所と引数を変更
Hyz-sui Oct 26, 2023
2186e1d
メアーのOnSabotageを最新に対応
Hyz-sui Oct 26, 2023
2fcf90c
コミュサボ時のNotifyRolesと名前を正しく修正
Hyz-sui Oct 26, 2023
e3f15f8
newReaderのRecycleを追加
Hyz-sui Oct 26, 2023
564e564
停電がないマップではメアーが出現しないよう変更
Hyz-sui Oct 27, 2023
be80bb6
サポートアモアスバージョンを2023.10.24に変更
Hyz-sui Oct 27, 2023
df7be89
RpcDesyncRepairSystemをRpcDesyncUpdateSystemに改名
Hyz-sui Oct 27, 2023
b33e1ac
ランダムマップにファングルを追加
Hyz-sui Oct 27, 2023
ba77778
ドアリセットをファングルに対応
Hyz-sui Oct 27, 2023
e4f7082
IsActiveにキノコカオスの判定を追加
Hyz-sui Oct 27, 2023
b7bef26
NotifyRoles時にキノコカオスがアクティブでseerがdesyncインポスターの場合,空の名前を設定する処理を追加
Hyz-sui Oct 27, 2023
b070b3f
キノコカオス発生&解除時にNotifyRolesを追加
Hyz-sui Oct 27, 2023
7ca906b
Mod視点でdesyncインポスター時キノコカオス中の名前の表示を正しくする処理を追加
Hyz-sui Oct 27, 2023
0c15473
RpcGuardAndKillの実装をMurderPlayerRPCを使用するものに変更
Hyz-sui Oct 27, 2023
0a676b3
RpcGuardAndKillからcolorId引数を削除し,RpcProtectedMurderPlayerにリネーム
Hyz-sui Oct 27, 2023
0015ba7
CheckMurderによるキルキャンセル時にキル失敗としてRpcMurderPlayerを追加
Hyz-sui Oct 27, 2023
6e4a132
死ななかったときにMurderPlayerのパッチを実行しないように変更
Hyz-sui Oct 27, 2023
918e851
ファングルノバイタル無効化を追加
Hyz-sui Oct 27, 2023
07eef8c
GetBroadcastVersionPatchをリネーム
Hyz-sui Oct 28, 2023
610baf5
IsVersionModdedを常にtrueとするパッチを適用
Hyz-sui Oct 28, 2023
696044f
string.csv add mapname and randomspawnpoint
yurinakira Oct 28, 2023
3d7cdbc
enum add MapName and SpawnPoint
yurinakira Oct 28, 2023
d22ccc1
RandomSpawnクラスと同名なのでrename
yurinakira Oct 28, 2023
afbc171
option add randomspawnpoint
yurinakira Oct 28, 2023
dd365d9
ランダムスポーンの詳細オプションを修正
yurinakira Oct 28, 2023
696cfaf
ランダムスポーンが有効化のメソッドIsRandomSpawnを追加
yurinakira Oct 28, 2023
f0e7564
Fungleのランダムスポーンを追加
yurinakira Oct 28, 2023
b4f37cb
Fungle以外の追加式ランダムスポーンに対応
yurinakira Oct 28, 2023
015d6ae
不要な文言の削除
yurinakira Oct 28, 2023
79fff77
fix Polusの初手湧きをランダムスポーン対応
yurinakira Oct 28, 2023
10fefa1
MapNamesを使うように修正
yurinakira Oct 28, 2023
6bb2aa4
Revert "MapNamesを使うように修正"
yurinakira Oct 28, 2023
9c53622
MapNamesを使用するように修正。変数名も統一。
yurinakira Oct 28, 2023
629b0c0
Fungleマップの採番誤っていたので修正
yurinakira Oct 28, 2023
528d135
一部文言をStringNamesの文言を利用するように修正
yurinakira Oct 29, 2023
ca64aed
HqHudSystemTypeのタグ確認部のマジックナンバーを解消
Hyz-sui Oct 30, 2023
d61c60b
サボタージュマスターのドア開けのファングル用処理を作成
Hyz-sui Oct 30, 2023
484b595
ホストのランダムスポーンを別処理に変更
Hyz-sui Oct 30, 2023
5ba89b9
RpcSnapToをバニラ処理に変更
Hyz-sui Oct 30, 2023
c103232
ThreeWay -> Junction
yurinakira Oct 31, 2023
3b28738
マッドメイトのHudOverrideSystemTypeの修理を正しい処理に修正
Hyz-sui Oct 31, 2023
7d88e72
マッドメイトによるHqHudSystemTypeの修復のキャンセル処理を追加
Hyz-sui Oct 31, 2023
8946c60
SabotageSystemPatchのnamespaceを変更
Hyz-sui Oct 31, 2023
233ecb5
SabotageSystemTypePatch.csに改名
Hyz-sui Oct 31, 2023
01e7554
AirShipの初期スポーン判定を変更
kou-hetare Oct 31, 2023
15998c5
ランダムスポーンのSIdを一個遅らせる
kou-hetare Oct 31, 2023
0b02014
ログの抑制
kou-hetare Oct 31, 2023
622fd2a
DisableRandomSpawn -> EnableRandomSpawn
yurinakira Nov 1, 2023
17121d0
空行削除
yurinakira Nov 1, 2023
8801aac
Fixed MapId failed case Log
yurinakira Nov 1, 2023
99c0fd6
GetLocationの処理を集約
yurinakira Nov 1, 2023
e98ad3e
office1,2の名称変更.推奨スポーンポイントデフォ設定 並び替え.部屋名の単語間にスペース追加
yurinakira Nov 1, 2023
dacc72e
Cliff -> Precipice
yurinakira Nov 1, 2023
aff6440
Merge branch 'fix/Support2023.10.24' into feature/fungle_random_spawn
yurinakira Nov 1, 2023
9866375
コンフリクト対応
yurinakira Nov 1, 2023
8868f9c
Merge pull request #426 from tukasa0001/fix/RefactAirshipRandomSpawn
kou-hetare Nov 1, 2023
e18674a
RandomSpawnのOptionIDを変更
yurinakira Nov 1, 2023
f0a4e86
オフィス1,2のstring変更
yurinakira Nov 1, 2023
059dfb5
シェイプシフトアニメ中のキル時に遅延の追加
kou-hetare Nov 1, 2023
4ca4c93
ウォーロックのRpcResetAbilityCooldown漏れ修正
kou-hetare Nov 1, 2023
1cdaea5
ランダムスポーンマップ画像一新
yurinakira Nov 1, 2023
f3b94df
ランダムスポーンの説明一新 ファングル追加
yurinakira Nov 1, 2023
d031968
メアーがファングルで割り当てられない説明を追加
yurinakira Nov 1, 2023
a034f5b
デバイスの無効化説明にファングルを追加
yurinakira Nov 1, 2023
549e948
ドアリセットの説明にファングルを追加
yurinakira Nov 1, 2023
add268e
Merge pull request #427 from tukasa0001/fix/DeathInShapeshifting
kou-hetare Nov 2, 2023
1bcf2d8
Merge pull request #428 from tukasa0001/fix/WarlockResetAbilityCooldown
kou-hetare Nov 2, 2023
7ba0cdb
見出し階層を修正
Hyz-sui Nov 2, 2023
fcb061f
AirShip -> Airship
Hyz-sui Nov 2, 2023
2b56910
ファングルのランダムマップの設定を追加
Hyz-sui Nov 2, 2023
bafb29c
カスタムRPCのIDを20増
Hyz-sui Nov 2, 2023
681feb7
SyncCustomSettingsRPCのマジックナンバーを解消
Hyz-sui Nov 2, 2023
15e4717
Merge pull request #430 from tukasa0001/fix/CustomRPCCallId
Hyz-sui Nov 2, 2023
eff601e
対応アモアスバージョン更新
Hyz-sui Nov 2, 2023
01e6187
英語のランダムスポーン説明をアップデート
Hyz-sui Nov 2, 2023
0fe6b5c
英語版にファングルでのメアーの説明を追加
Hyz-sui Nov 2, 2023
09217ae
英語版にファングルバイタル無効化を追加
Hyz-sui Nov 2, 2023
4158896
英語版ドアリセットにファングルを追加
Hyz-sui Nov 2, 2023
256b6b5
英語版にファングルのランダムマップを追加
Hyz-sui Nov 2, 2023
7486bdd
自動フォーマット
Hyz-sui Nov 2, 2023
97c7c7e
罫線を修正
Hyz-sui Nov 2, 2023
5cc5cdb
Merge pull request #425 from tukasa0001/feature/fungle_random_spawn
yurinakira Nov 2, 2023
a85d16e
Merge pull request #429 from tukasa0001/feature/10.24_readme
Hyz-sui Nov 3, 2023
0101374
Merge pull request #424 from tukasa0001/fix/Support2023.10.24
Hyz-sui Nov 3, 2023
1ef264f
バージョンを5.1.2に変更
Hyz-sui Nov 3, 2023
a878ad9
Merge pull request #431 from tukasa0001/verUp/5.1.2
Hyz-sui Nov 4, 2023
42b09c1
公開ルーム無効化用の定数とメッセージ用の翻訳を作成
Hyz-sui Nov 4, 2023
43b0b85
各所でIsPublicAvailableOnThisVersionによる公開ルーム無効化を追加
Hyz-sui Nov 4, 2023
7c58b4d
Merge pull request #432 from tukasa0001/feature/DisablePublic
Hyz-sui Nov 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added Images/Airship_Random_Map_en.png
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 Images/Airship_Random_Map_ja.png
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 Images/Fungle_Random_Map_en.png
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 Images/Fungle_Random_Map_ja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Images/MIRA_HQ_Random_Map.png
Binary file not shown.
Binary file removed Images/Mira_HQ_Random_Map.png
Binary file not shown.
Binary file added Images/Mirahq_Random_Map_en.png
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 Images/Mirahq_Random_Map_ja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Images/Polus_Random_Map.png
Binary file not shown.
Binary file added Images/Polus_Random_Map_en.png
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 Images/Polus_Random_Map_ja.png
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 Images/Skeld_Random_Map_en.png
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 Images/Skeld_Random_Map_ja.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Images/The_Airship_Random_Map.png
Binary file not shown.
Binary file removed Images/The_Skeld_Random_Map.png
Binary file not shown.
18 changes: 15 additions & 3 deletions Modules/Camouflague.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.Collections.Generic;
using HarmonyLib;
using TownOfHost.Attributes;

namespace TownOfHost
Expand Down Expand Up @@ -53,7 +52,16 @@ public static void CheckCamouflage()

if (oldIsCamouflage != IsCamouflage)
{
Main.AllPlayerControls.Do(pc => Camouflage.RpcSetSkin(pc));
foreach (var pc in Main.AllPlayerControls)
{
RpcSetSkin(pc);

// The code is intended to remove pets at dead players to combat a vanilla bug
if (!IsCamouflage && !pc.IsAlive())
{
pc.RpcSetPet("");
}
}
Utils.NotifyRoles(NoCache: true);
}
}
Expand Down Expand Up @@ -86,6 +94,10 @@ public static void RpcSetSkin(PlayerControl target, bool ForceRevert = false, bo

newOutfit = PlayerSkins[id];
}


if (newOutfit.Compare(target.Data.DefaultOutfit)) return;

Logger.Info($"newOutfit={newOutfit.GetString()}", "RpcSetSkin");

var sender = CustomRpcSender.Create(name: $"Camouflage.RpcSetSkin({target.Data.PlayerName})");
Expand Down Expand Up @@ -118,4 +130,4 @@ public static void RpcSetSkin(PlayerControl target, bool ForceRevert = false, bo
sender.SendMessage();
}
}
}
}
1 change: 1 addition & 0 deletions Modules/CustomRpcSender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,7 @@ public static void RpcMurderPlayer(this CustomRpcSender sender, PlayerControl pl
{
sender.AutoStartRpc(player.NetId, (byte)RpcCalls.MurderPlayer, targetClientId)
.WriteNetObject(target)
.Write((int)ExtendedPlayerControl.SucceededFlags)
.EndRpc();
}
}
Expand Down
28 changes: 14 additions & 14 deletions Modules/CustomWinnerHolder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ public static class CustomWinnerHolder
// リザルトの背景色の決定などに使用されます。
// 注: この変数を変更する時、WinnerRoles・WinnerIdsを同時に変更しないと予期せぬ勝者が現れる可能性があります。
public static CustomWinner WinnerTeam;
// 追加勝利するプレイヤーのチームが格納されます
// 追加勝利するプレイヤーの役職が格納されます
// リザルトの表示に使用されます。
public static HashSet<AdditionalWinners> AdditionalWinnerTeams;
public static HashSet<CustomRoles> AdditionalWinnerRoles;
// 勝者の役職が格納され、この変数に格納されている役職のプレイヤーは全員勝利となります。
// チームとなるニュートラルの処理に最適です。
public static HashSet<CustomRoles> WinnerRoles;
Expand All @@ -26,7 +26,7 @@ public static class CustomWinnerHolder
public static void Reset()
{
WinnerTeam = CustomWinner.Default;
AdditionalWinnerTeams = new();
AdditionalWinnerRoles = new();
WinnerRoles = new();
WinnerIds = new();
}
Expand All @@ -35,17 +35,17 @@ public static void ClearWinners()
WinnerRoles.Clear();
WinnerIds.Clear();
}
/// <summary><para>WinnerTeamに値を代入します。</para><para>すでに代入されている場合、AdditionalWinnerTeamsに追加します。</para></summary>
/// <summary><para>WinnerTeamに値を代入します。</para><para>すでに代入されている場合、AdditionalWinnerRolesに追加します。</para></summary>
public static void SetWinnerOrAdditonalWinner(CustomWinner winner)
{
if (WinnerTeam == CustomWinner.Default) WinnerTeam = winner;
else AdditionalWinnerTeams.Add((AdditionalWinners)winner);
else AdditionalWinnerRoles.Add((CustomRoles)winner);
}
/// <summary><para>WinnerTeamに値を代入します。</para><para>すでに代入されている場合、既存の値をAdditionalWinnerTeamsに追加してから代入します。</para></summary>
/// <summary><para>WinnerTeamに値を代入します。</para><para>すでに代入されている場合、既存の値をAdditionalWinnerRolesに追加してから代入します。</para></summary>
public static void ShiftWinnerAndSetWinner(CustomWinner winner)
{
if (WinnerTeam != CustomWinner.Default)
AdditionalWinnerTeams.Add((AdditionalWinners)WinnerTeam);
AdditionalWinnerRoles.Add((CustomRoles)WinnerTeam);
WinnerTeam = winner;
}
/// <summary><para>既存の値をすべて削除してから、WinnerTeamに値を代入します。</para></summary>
Expand All @@ -59,9 +59,9 @@ public static MessageWriter WriteTo(MessageWriter writer)
{
writer.Write((int)WinnerTeam);

writer.Write(AdditionalWinnerTeams.Count);
foreach (var wt in AdditionalWinnerTeams)
writer.Write((int)wt);
writer.Write(AdditionalWinnerRoles.Count);
foreach (var wr in AdditionalWinnerRoles)
writer.Write((int)wr);

writer.Write(WinnerRoles.Count);
foreach (var wr in WinnerRoles)
Expand All @@ -77,10 +77,10 @@ public static void ReadFrom(MessageReader reader)
{
WinnerTeam = (CustomWinner)reader.ReadInt32();

AdditionalWinnerTeams = new();
int AdditionalWinnerTeamsCount = reader.ReadInt32();
for (int i = 0; i < AdditionalWinnerTeamsCount; i++)
AdditionalWinnerTeams.Add((AdditionalWinners)reader.ReadInt32());
AdditionalWinnerRoles = new();
int AdditionalWinnerRolesCount = reader.ReadInt32();
for (int i = 0; i < AdditionalWinnerRolesCount; i++)
AdditionalWinnerRoles.Add((CustomRoles)reader.ReadInt32());

WinnerRoles = new();
int WinnerRolesCount = reader.ReadInt32();
Expand Down
24 changes: 19 additions & 5 deletions Modules/DisableDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ class DisableDevice
["AirshipCockpitAdmin"] = new(-22.32f, 0.91f),
["AirshipRecordsAdmin"] = new(19.89f, 12.60f),
["AirshipCamera"] = new(8.10f, -9.63f),
["AirshipVital"] = new(25.24f, -7.94f)
["AirshipVital"] = new(25.24f, -7.94f),
["FungleVital"] = new(-2.765f, -9.819f)
};
public static float UsableDistance()
{
Expand All @@ -38,6 +39,7 @@ public static float UsableDistance()
MapNames.Polus => 1.8f,
//MapNames.Dleks => 1.5f,
MapNames.Airship => 1.8f,
MapNames.Fungle => 1.8f,
_ => 0.0f
};
}
Expand Down Expand Up @@ -98,6 +100,12 @@ public static void FixedUpdate()
if (Options.DisableAirshipVital.GetBool())
doComms |= Vector2.Distance(PlayerPos, DevicePos["AirshipVital"]) <= UsableDistance();
break;
case 5:
if (Options.DisableFungleVital.GetBool())
{
doComms |= Vector2.Distance(PlayerPos, DevicePos["FungleVital"]) <= UsableDistance();
}
break;
}
}
doComms &= !ignore;
Expand All @@ -106,15 +114,15 @@ public static void FixedUpdate()
if (!DesyncComms.Contains(pc.PlayerId))
DesyncComms.Add(pc.PlayerId);

pc.RpcDesyncRepairSystem(SystemTypes.Comms, 128);
pc.RpcDesyncUpdateSystem(SystemTypes.Comms, 128);
}
else if (!Utils.IsActive(SystemTypes.Comms) && DesyncComms.Contains(pc.PlayerId))
{
DesyncComms.Remove(pc.PlayerId);
pc.RpcDesyncRepairSystem(SystemTypes.Comms, 16);
pc.RpcDesyncUpdateSystem(SystemTypes.Comms, 16);

if (Main.NormalOptions.MapId == 1)
pc.RpcDesyncRepairSystem(SystemTypes.Comms, 17);
if (Main.NormalOptions.MapId is 1 or 5)
pc.RpcDesyncUpdateSystem(SystemTypes.Comms, 17);
}
}
catch (Exception ex)
Expand Down Expand Up @@ -180,6 +188,12 @@ public static void UpdateDisableDevices()
if (Options.DisableAirshipVital.GetBool())
consoles.DoIf(x => x.name == "panel_vitals", x => x.gameObject.GetComponent<CircleCollider2D>().enabled = ignore);
break;
case 5:
if (Options.DisableFungleVital.GetBool())
{
consoles.DoIf(x => x.name == "VitalsConsole", x => x.GetComponent<Collider2D>().enabled = ignore);
}
break;
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions Modules/DoorsReset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ public static class DoorsReset
[GameModuleInitializer]
public static void Initialize()
{
// AirshipとPolus以外は非対応
if ((MapNames)Main.NormalOptions.MapId is not (MapNames.Airship or MapNames.Polus))
// AirshipとPolusとFungle以外は非対応
if ((MapNames)Main.NormalOptions.MapId is not (MapNames.Airship or MapNames.Polus or MapNames.Fungle))
{
isEnabled = false;
return;
Expand Down Expand Up @@ -72,7 +72,7 @@ private static void OpenOrCloseAllDoorsRandomly()
/// <summary>ドアの開閉状況を設定する.サボタージュで閉められないドアに対しては何もしない</summary>
/// <param name="door">対象のドア</param>
/// <param name="isOpen">開けるならtrue,閉めるならfalse</param>
private static void SetDoorOpenState(PlainDoor door, bool isOpen)
private static void SetDoorOpenState(OpenableDoor door, bool isOpen)
{
if (IsValidDoor(door))
{
Expand All @@ -81,7 +81,7 @@ private static void SetDoorOpenState(PlainDoor door, bool isOpen)
}
/// <summary>リセット対象のドアかどうか判定する</summary>
/// <returns>リセット対象ならtrue</returns>
private static bool IsValidDoor(PlainDoor door)
private static bool IsValidDoor(OpenableDoor door)
{
// エアシラウンジトイレとPolus除染室のドアは対象外
if (door.Room is SystemTypes.Lounge or SystemTypes.Decontamination)
Expand Down
Loading