From 561785fde1abfad69b9818e3246d4828caf86454 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Thu, 12 Apr 2018 21:36:46 +0900 Subject: [PATCH 1/6] ParupunteConfigElement --- Inferno/Inferno.csproj | 1 + .../Parupunte/ParupunteConfigElement.cs | 32 +++++++++++++ .../InfernoScripts/Parupunte/ParupunteCore.cs | 1 + .../Parupunte/ParupunteScript.cs | 47 ++++++++++++++++--- .../Parupunte/Scripts/AddPlayerMoney.cs | 4 +- .../Parupunte/Scripts/Avatar.cs | 5 +- .../Parupunte/Scripts/BeastFriends.cs | 11 +++-- .../Parupunte/Scripts/BlackOut.cs | 7 ++- .../Parupunte/Scripts/ChangeWantedLevel.cs | 13 ++--- .../Parupunte/Scripts/ChangeWeather.cs | 12 ++--- .../Scripts/CitizenEmagencyEscape.cs | 5 +- .../Parupunte/Scripts/CitizenNinja.cs | 15 ++---- .../Parupunte/Scripts/DachoClub.cs | 6 +-- .../Parupunte/Scripts/ElectricalShock.cs | 7 ++- .../Parupunte/Scripts/ExplodeDeadBodies.cs | 6 +-- .../InfernoScripts/Parupunte/Scripts/Fart.cs | 22 +++++---- .../Parupunte/Scripts/FishHeaven.cs | 6 +-- .../Parupunte/Scripts/FixPedsAndVehicles.cs | 5 +- .../Parupunte/Scripts/FloatingCar.cs | 6 +-- .../Parupunte/Scripts/Garupan.cs | 14 +++--- .../Parupunte/Scripts/Gochiusa.cs | 6 +-- .../Parupunte/Scripts/HealthRegen.cs | 7 +-- .../Parupunte/Scripts/Hitohanabi.cs | 6 +-- .../Parupunte/Scripts/InvisiblePeds.cs | 5 +- .../Parupunte/Scripts/InvisibleVehicles.cs | 5 +- .../InfernoScripts/Parupunte/Scripts/Isono.cs | 5 +- .../Parupunte/Scripts/KetsuFunnel.cs | 6 +-- .../Parupunte/Scripts/KetsuWarp.cs | 6 +-- .../Parupunte/Scripts/KillCitizens.cs | 5 +- .../Parupunte/Scripts/KuruKuru.cs | 6 +-- .../Parupunte/Scripts/MagicFire.cs | 7 +-- .../Parupunte/Scripts/MassiveVehicleHack.cs | 5 +- .../Parupunte/Scripts/Mayday.cs | 5 +- .../Parupunte/Scripts/MoutainLion.cs | 5 +- .../Parupunte/Scripts/MultiLeggedRace.cs | 7 +-- .../Parupunte/Scripts/NinjaRun.cs | 7 +-- .../Parupunte/Scripts/Onakaitai.cs | 9 ++-- .../Parupunte/Scripts/Owatashiki.cs | 5 +- .../Parupunte/Scripts/PerfectFreeze.cs | 7 +-- .../Parupunte/Scripts/PlayerInvincible.cs | 6 +-- .../Parupunte/Scripts/PositionShufle.cs | 6 +-- .../Parupunte/Scripts/RepairVehicles.cs | 5 +- .../Parupunte/Scripts/RpgOnly.cs | 6 +-- .../Parupunte/Scripts/SetDateTime.cs | 9 ++-- .../Parupunte/Scripts/SpawnCharacters.cs | 10 +++- .../Parupunte/Scripts/SpawnFriend.cs | 6 +-- .../Parupunte/Scripts/SpawnTaxies.cs | 9 +++- .../Parupunte/Scripts/SpawnVheicle.cs | 10 +++- .../Parupunte/Scripts/SpeedMax.cs | 5 +- .../Parupunte/Scripts/StrongVehicles.cs | 5 +- .../Parupunte/Scripts/Tempest.cs | 4 +- .../Parupunte/Scripts/Transform.cs | 4 +- .../Scripts/VehiclePetrolTanksGetFire.cs | 5 +- .../Parupunte/Scripts/VehicleSpeedUp.cs | 5 +- .../InfernoScripts/Parupunte/Scripts/Volga.cs | 5 +- 55 files changed, 271 insertions(+), 168 deletions(-) create mode 100644 Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs diff --git a/Inferno/Inferno.csproj b/Inferno/Inferno.csproj index 5e60aaaa..76225ea8 100644 --- a/Inferno/Inferno.csproj +++ b/Inferno/Inferno.csproj @@ -114,6 +114,7 @@ + diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs b/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs new file mode 100644 index 00000000..d25f177c --- /dev/null +++ b/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs @@ -0,0 +1,32 @@ +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace Inferno.InfernoScripts +{ + internal class ParupunteConfigElement + { + public string StartMessage { get; set; } + public string SubMessage { get; set; } + public string FinishMessage { get; set; } + + public ParupunteConfigElement(string startMessage, string subMessage, string finishMessage) + { + StartMessage = startMessage; + SubMessage = subMessage; + FinishMessage = finishMessage; + } + + public ParupunteConfigElement(string startMessage, string finishMessage) + { + StartMessage = startMessage; + SubMessage = startMessage; + FinishMessage = finishMessage; + } + + public static ParupunteConfigElement NoUse = new ParupunteConfigElement("", ""); + } +} diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs index 37b068fb..372a9974 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs @@ -256,6 +256,7 @@ private IEnumerable ParupunteCoreCoroutine(ParupunteScript script) try { script.OnSetUp(); + script.OnSetNames(); } catch (Exception e) { diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs b/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs index 457e9861..21ca30fb 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs @@ -1,6 +1,7 @@ using System; using System.Collections; using System.Collections.Generic; +using System.Reflection; using GTA; using Inferno.InfernoScripts.Event; using UniRx; @@ -34,7 +35,21 @@ public ParupunteIsono(string command = null) Command = command; } } - + + public class ParupunteAttribute : Attribute + { + public string DefaultStartMessage; + public string DefaultSubMessage; + public string DefaultEndMessage; + + public ParupunteAttribute(string defaultStartMessage, string defaultSubMessage, string defaultEndMessage) + { + DefaultStartMessage = defaultStartMessage; + DefaultEndMessage = defaultEndMessage; + DefaultSubMessage = defaultSubMessage; + } + } + internal abstract class ParupunteScript { private bool IsFinished = false; @@ -42,18 +57,18 @@ internal abstract class ParupunteScript /// /// 開始時に表示されるメインメッセージ /// - public abstract string Name { get; } + public string Name { get; protected set; } /// /// 画面右下に常に表示されるミニメッセージ /// - public virtual string SubName { get; } + public string SubName { get; protected set; } /// /// 終了時に表示されるメッセージ /// nullまたは空文字列なら表示しない /// - public virtual string EndMessage { get; } + public Func EndMessage { get; protected set; } /// /// 終了メッセージの表示時間[s] @@ -85,13 +100,30 @@ internal abstract class ParupunteScript protected Random Random; - protected ParupunteScript(ParupunteCore core) + public virtual ParupunteConfigElement DefaultElement { get; } = null; + + protected readonly ParupunteConfigElement Config; + + protected ParupunteScript(ParupunteCore core, ParupunteConfigElement element) { this.core = core; coroutineIds = new List(); core.LogWrite(this.ToString()); IsFinished = false; Random = new Random(); + + Config = element ?? DefaultElement; + + } + + /// + /// OnSetUpのあとに呼ばれる + /// + public virtual void OnSetNames() + { + Name = Config.StartMessage; + SubName = Config.SubMessage; + EndMessage = () => Config.FinishMessage; } /// @@ -143,9 +175,10 @@ public void OnFinishedCore() } coroutineIds.Clear(); - if (!string.IsNullOrEmpty(EndMessage)) + var endMessage = EndMessage(); + if (!string.IsNullOrEmpty(endMessage)) { - core.DrawParupunteText(EndMessage, EndMessageDisplayTime); + core.DrawParupunteText(endMessage, EndMessageDisplayTime); } } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs b/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs index 78ce5e91..7384a012 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs @@ -4,11 +4,11 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class AddPlayerMoney : ParupunteScript { - public AddPlayerMoney(ParupunteCore core) : base(core) + public AddPlayerMoney(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "今じゃあケツをふく紙にもなりゃしねってのによぉ!"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("今じゃあケツをふく紙にもなりゃしねってのによぉ", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs index 662eba52..e829a63f 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs @@ -14,12 +14,11 @@ class Avatar : ParupunteScript { private List peds = new List(); - public Avatar(ParupunteCore core) : base(core) + public Avatar(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "ブンシンノジツ"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("ブンシンノジツ", "おわり"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs b/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs index 8c4516c6..eedecc9c 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs @@ -20,13 +20,18 @@ class BeastFriends : ParupunteScript private bool isBeast = false; - public BeastFriends(ParupunteCore core) : base(core) + public BeastFriends(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { isBeast = Random.Next(0, 100) <= 80; } - public override string Name => isBeast ? "けものフレンズ" : "のけものフレンズ"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } = null; + + public override void OnSetNames() + { + Name = isBeast ? "けものフレンズ" : "のけものフレンズ"; + EndMessage = () => "おわり"; + } public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs b/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs index b3a0ff83..31ef868e 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs @@ -19,14 +19,13 @@ class BlackOut : ParupunteScript private IDisposable drawingDisposable; - public BlackOut(ParupunteCore core) : base(core) + public BlackOut(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { SetUpSound(); } - public override string Name { get; } = "ctOS 停電"; - public override string EndMessage { get; } = "ctOS 復旧"; - + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("ctOS 停電", "ctOS 復旧"); + public override void OnStart() { ReduceCounter = new ReduceCounter(20 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs index 7b7d72a2..f94f135b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs @@ -5,24 +5,21 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("けいさつ")] internal class ChangeWantedLevel : ParupunteScript { - private string name; private int wantedLevelThreshold = 1; private int wantedLevel = Game.Player.WantedLevel; - public ChangeWantedLevel(ParupunteCore core) : base(core) + public ChangeWantedLevel(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override void OnSetUp() - { - name = wantedLevel >= wantedLevelThreshold ? "無罪放免" : "日頃の行いが悪い"; - } + public override ParupunteConfigElement DefaultElement { get; } = null; - public override string Name + public override void OnSetNames() { - get { return name; } + Name = wantedLevel >= wantedLevelThreshold ? "無罪放免" : "日頃の行いが悪い"; } + public override void OnStart() { if (wantedLevel >= wantedLevelThreshold) diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWeather.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWeather.cs index 76b5c07b..1ad3ef47 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWeather.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWeather.cs @@ -11,15 +11,10 @@ internal class ChangeWeather : ParupunteScript private string name; private Weather weather; - public ChangeWeather(ParupunteCore core) : base(core) + public ChangeWeather(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name - { - get { return name; } - } - public override void OnSetUp() { Random random = new Random(); @@ -34,6 +29,11 @@ public override void OnSetUp() name = "天候変化" + ":" + weatherName; } + public override void OnSetNames() + { + Name = name; + } + public override void OnStart() { GTA.World.Weather = weather; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs index 5a26fe4f..b8e5b82e 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs @@ -13,11 +13,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("きんきゅうだっしゅつ")] class CitizenEmagencyEscape : ParupunteScript { - public CitizenEmagencyEscape(ParupunteCore core) : base(core) + public CitizenEmagencyEscape(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "磯野~!緊急脱出しようぜ!"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("磯野~!緊急脱出しようぜ!", ""); + public override void OnStart() { var playerPos = core.PlayerPed.Position; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs index 98d05207..17f9f613 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs @@ -15,21 +15,12 @@ internal class CitizenNinja : ParupunteScript private HashSet ninjas = new HashSet(); private List pedList = new List(); - public CitizenNinja(ParupunteCore core) : base(core) - { - } - - public override string Name => "江 戸 時 代"; - public override string EndMessage => " 現 代 "; - - public override void OnSetUp() - { - } - - protected override void OnFinished() + public CitizenNinja(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("江 戸 時 代", " 現 代 "); + public override void OnStart() { ReduceCounter = new ReduceCounter(20000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs b/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs index b900a936..20cb4052 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs @@ -8,12 +8,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("だちょうくらぶ")] internal class DachoClub : ParupunteScript { - public DachoClub(ParupunteCore core) : base(core) + public DachoClub(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "ダチョウ倶楽部"; - public override string EndMessage { get; } = "ありがとうございました"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("ダチョウ倶楽部", "ありがとうございました"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs index efb678aa..aaceb39e 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs @@ -13,13 +13,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("でんき")] class ElectricalShock : ParupunteScript { - public ElectricalShock(ParupunteCore core) : base(core) + public ElectricalShock(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "エレクトリカルショック!"; - - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("エレクトリカルショック!", "おわり"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs index 35f20511..0ec9789d 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs @@ -11,12 +11,12 @@ internal class ExplodeDeadBodies : ParupunteScript { private HashSet explodedPedHandles; - public ExplodeDeadBodies(ParupunteCore core) : base(core) + public ExplodeDeadBodies(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "ば・く・は・つ・し・た・い"; - public override string EndMessage => "ば・く・は・つ・し・な・い"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("ば・く・は・つ・し・た・い!", "ば・く・は・つ・し・な・い"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs index 7bbbe7ce..3fbb95e3 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs @@ -12,11 +12,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("おなら")] class Fart : ParupunteScript { - public Fart(ParupunteCore core) : base(core) + public Fart(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "3"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("3", ""); + public override void OnStart() { var ptfxName = "core"; @@ -62,14 +64,14 @@ private void GasExplosion() Function.Call(Hash.ADD_EXPLOSION, new InputArgument[] { - playerPos.X, - playerPos.Y, - playerPos.Z, - -1, - 0.5f, - true, - false, - 0.5f + playerPos.X, + playerPos.Y, + playerPos.Z, + -1, + 0.5f, + true, + false, + 0.5f }); foreach (var e in targets) diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs b/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs index aa089d78..0fce1d13 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs @@ -14,12 +14,12 @@ internal class FishHeaven : ParupunteScript private Model fishModel = new Model(PedHash.TigerShark); private List createdFishList = new List(); - public FishHeaven(ParupunteCore core) : base(core) + public FishHeaven(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "おさかな天国"; - public override string EndMessage { get; } = "おさかな地獄"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("おさかな天国", "おさかな地獄"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs index 3ec041cc..b5398af9 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs @@ -7,11 +7,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class FixPedsAndVehicles : ParupunteScript { - public FixPedsAndVehicles(ParupunteCore core) : base(core) + public FixPedsAndVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "周辺の人&車両回復"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("周辺の人&車両回復", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs b/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs index 191d20dc..5ce1ea0a 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs @@ -8,12 +8,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("ふわふわ")] internal class FloatingCar : ParupunteScript { - public FloatingCar(ParupunteCore core) : base(core) + public FloatingCar(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "ふわふわ"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("ふわふわ", "おわり"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs index 4d68cacf..d226fe03 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs @@ -22,7 +22,7 @@ enum PlanType private List resources = new List(); - public Garupan(ParupunteCore core) : base(core) + public Garupan(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } @@ -42,12 +42,14 @@ public override void OnSetUp() } } - public override string Name => _name; - public override string SubName => "ガルパンは、いいぞ"; - public override string EndMessage + public override ParupunteConfigElement DefaultElement { get; } = null; + + public override void OnSetNames() { - get + Name = _name; + SubName = "ガルパンは、いいぞ"; + EndMessage = () => { if (core.PlayerPed.IsAlive) { @@ -58,7 +60,7 @@ public override string EndMessage EndMessageDisplayTime = 4.0f; return "フラッグ車走行不能!大洗女子学園の勝利!"; } - } + }; } public override void OnStart() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs index 3bbb5ecf..b6bbbd4a 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs @@ -11,12 +11,12 @@ internal class Gochiusa : ParupunteScript { private HashSet vehicleList = new HashSet(); - public Gochiusa(ParupunteCore core) : base(core) + public Gochiusa(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "あぁ^~築地が漁業するんじゃぁ^~"; - public override string EndMessage { get; } = "大漁"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("あぁ^~築地が漁業するんじゃぁ^~", "大漁"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs b/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs index e2078f94..98d66373 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs @@ -7,12 +7,13 @@ internal class HealthRegen : ParupunteScript { private ReduceCounter reduceCounter; - public HealthRegen(ParupunteCore core) : base(core) + public HealthRegen(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "リジェネ"; - public override string EndMessage => "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("リジェネ", "おわり"); + private uint coroutineId = 0; public override void OnSetUp() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs index a9a8e3f5..fd8822a3 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs @@ -11,12 +11,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("ひとはなび")] internal class Hitohanabi : ParupunteScript { - public Hitohanabi(ParupunteCore core) : base(core) + public Hitohanabi(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "ひとはなび"; - public override string EndMessage => "きたねぇ花火だ"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("ひとはなび", "きたねぇ花火だ"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs b/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs index d9b7588e..730901b9 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs @@ -6,11 +6,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class InvisiblePeds : ParupunteScript { - public InvisiblePeds(ParupunteCore core) : base(core) + public InvisiblePeds(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "光学迷彩(仲間除くNPC)"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("光学迷彩(仲間除くNPC)", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs index 4d932c4c..4d565a58 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs @@ -5,11 +5,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class InvisibleVehicles : ParupunteScript { - public InvisibleVehicles(ParupunteCore core) : base(core) + public InvisibleVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "光学迷彩(車両)"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("光学迷彩(車両)", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs index cd648812..cc02bd5b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs @@ -10,11 +10,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("いその")] class Isono : ParupunteScript { - public Isono(ParupunteCore core) : base(core) + public Isono(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "磯野ー!空飛ぼうぜ!"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("磯野ー!空飛ぼうぜ!", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs index c00f89bb..7bf46285 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs @@ -12,12 +12,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("けつふぁんねる")] class KetsuFunnel : ParupunteScript { - public KetsuFunnel(ParupunteCore core) : base(core) + public KetsuFunnel(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "ケツファンネル"; - public override string EndMessage { get; } = "弾切れ"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("ケツファンネル", "弾切れ"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs index 1cf1acdf..ceb7451d 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs @@ -12,12 +12,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("けつるーら")] class KetsuWarp : ParupunteScript { - public KetsuWarp(ParupunteCore core) : base(core) + public KetsuWarp(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "行き先を選べ!"; - public override string SubName { get; } = "ケツルーラ"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("行き先を選べ!", "ケツルーラ"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs index 9f546de2..82fe41ef 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs @@ -7,11 +7,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("みんなばくはつ")] internal class KillCitizens : ParupunteScript { - public KillCitizens(ParupunteCore core) : base(core) + public KillCitizens(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "周辺市民全員即死"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("周辺市民全員即死!", ""); private uint coroutineId = 0; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs index 81df38ab..590a0be3 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs @@ -10,13 +10,13 @@ internal class KuruKuru : ParupunteScript { private IDisposable mainStream; - public KuruKuru(ParupunteCore core) : base(core) + public KuruKuru(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { ReduceCounter = new ReduceCounter(20 * 1000); } - public override string Name { get; } = "くるくる"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("くるくる!", "おわり"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs index 9195ddee..1ac812ea 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs @@ -11,12 +11,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("おしり")] internal class MagicFire : ParupunteScript { - public MagicFire(ParupunteCore core) : base(core) + public MagicFire(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "ただし魔法は尻から出る"; - public override string EndMessage => " お し り "; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("ただし魔法は尻から出る", " お し り "); + private uint coroutineId = 0; public override void OnSetUp() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs index c8c2bfb0..77985d62 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs @@ -11,7 +11,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("はっきんぐ")] class MassiveVehicleHack : ParupunteScript { - public MassiveVehicleHack(ParupunteCore core) : base(core) + public MassiveVehicleHack(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } @@ -21,7 +21,8 @@ public MassiveVehicleHack(ParupunteCore core) : base(core) //演出用の線を引くリスト private List> drawLineList = new List>(); - public override string Name { get; } = "大量車両ハッキング"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("大量車両ハッキング", ""); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs index 6e29ed7b..f503123a 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs @@ -12,11 +12,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts internal class Mayday : ParupunteScript { - public Mayday(ParupunteCore core) : base(core) + public Mayday(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "メーデー!メーデー!"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("メーデー!メーデー!メーデー!", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs index 8a086a71..de282ffc 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs @@ -7,11 +7,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("くーがー")] internal class MoutainLion : ParupunteScript { - public MoutainLion(ParupunteCore core) : base(core) + public MoutainLion(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "近すぎちゃって♪ どうしようもない♪"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("近すぎちゃって♪ どうしようもない♪", ""); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs index efa734a4..370d4344 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs @@ -11,15 +11,16 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("さんきんこうたい")] class MultiLeggedRace : ParupunteScript { - public MultiLeggedRace(ParupunteCore core) : base(core) + public MultiLeggedRace(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } private List explosionList = new List(); private List allPedList = new List(); - public override string Name { get; } = "参 勤 交 代"; - public override string EndMessage { get; } = "大 政 奉 還"; + + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("参 勤 交 代", "大 政 奉 還"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs b/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs index b01e343e..2802aa32 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs @@ -2,6 +2,7 @@ using GTA; using GTA.Math; using GTA.Native; +using Inferno.InfernoScripts; using Inferno.InfernoScripts.Parupunte; using UniRx; @@ -11,12 +12,12 @@ namespace Inferno internal class NinjaRun : ParupunteScript { private float addSpeed = 1.0f; - public NinjaRun(ParupunteCore core) : base(core) + public NinjaRun(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "バリキ・ジツ"; - public override string EndMessage => "もうオシマイだ!"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("バリキ・ジツ", "もうオシマイだ!"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Onakaitai.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Onakaitai.cs index 78647a3d..f1c37d8b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Onakaitai.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Onakaitai.cs @@ -17,12 +17,15 @@ internal class Onakaitai : ParupunteScript private List targetPeds = new List(); - public Onakaitai(ParupunteCore core) : base(core) + public Onakaitai(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => AffectAllPed ? "みんなおなかいたい" : "おなかいたい"; - public override string EndMessage => "ついでに着火"; + public override void OnSetNames() + { + Name = AffectAllPed ? "みんなおなかいたい" : "おなかいたい"; + EndMessage = () => "ついでに着火"; + } public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs index 1a3628ec..671e4cf6 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs @@ -2,11 +2,12 @@ { internal class Owatashiki : ParupunteScript { - public Owatashiki(ParupunteCore core) : base(core) + public Owatashiki(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "オワタ式の可能性"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("オワタ式の可能性", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs b/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs index bfb763e3..75e2efb7 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs @@ -9,14 +9,15 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("ぱーふぇくとふりーず")] class PerfectFreeze : ParupunteScript { - public PerfectFreeze(ParupunteCore core) : base(core) + public PerfectFreeze(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } private HashSet freezedEntities = new HashSet(); - public override string Name { get; } = "パーフェクトフリーズ"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("パーフェクトフリーズ", "おわり"); + private readonly float FreezeRange = 60; public override void OnStart() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs b/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs index 2f2c2dab..ebaeb51d 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs @@ -6,12 +6,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("むてき")] internal class PlayerInvincible : ParupunteScript { - public PlayerInvincible(ParupunteCore core) : base(core) + public PlayerInvincible(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "無敵"; - public override string EndMessage => "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("無敵", "おわり"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs b/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs index cde0eca9..c9ce2cbf 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs @@ -12,12 +12,12 @@ internal class PositionShufle : ParupunteScript { private Random random = new Random(); - public PositionShufle(ParupunteCore core) : base(core) + public PositionShufle(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "あっちこっち"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("あっちこっち", "おわり"); //高速コルーチン(1フレーム単位で実行) private CoroutineSystem _quickCoroutineSystem; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs index f47bb20b..9f930f53 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs @@ -6,11 +6,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("くるましゅうり")] internal class RepairVehicles : ParupunteScript { - public RepairVehicles(ParupunteCore core) : base(core) + public RepairVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "車両修復"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("車両修復", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs b/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs index 02e00fc2..06ba65d1 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs @@ -6,12 +6,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("あーるぴーじー")] class RpgOnly : ParupunteScript { - public RpgOnly(ParupunteCore core) : base(core) + public RpgOnly(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "RPG ONLY"; - public override string EndMessage { get; } = "おわり"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("RPG ONLY", "おわり"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs index 7d92e95c..e4c2450b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs @@ -9,13 +9,16 @@ internal class SetDateTime : ParupunteScript private int hour; private string name; - public SetDateTime(ParupunteCore core) : base(core) + public SetDateTime(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name + public override ParupunteConfigElement DefaultElement { get; } + = null; + + public override void OnSetNames() { - get { return name; } + Name = name; } public override void OnSetUp() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs index 4b0b6862..a3e2d3b5 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs @@ -14,11 +14,17 @@ internal class SpawnCharacters : ParupunteScript private string name; private Random random; - public SpawnCharacters(ParupunteCore core) : base(core) + public SpawnCharacters(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => name; + public override ParupunteConfigElement DefaultElement { get; } + = null; + + public override void OnSetNames() + { + Name = name; + } public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs index 0c18d50b..64ececc7 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs @@ -14,12 +14,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts class SpawnFriend :ParupunteScript { private List pedList = new List(); - public SpawnFriend(ParupunteCore core) : base(core) + public SpawnFriend(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "味方召喚"; - public override string EndMessage { get; } = "定時なんで帰ります"; + public override ParupunteConfigElement DefaultElement { get; } + = new ParupunteConfigElement("味方召喚", "定時なんで帰ります"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs index 8a0d69af..bfcb031a 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs @@ -9,11 +9,11 @@ internal class SpawnTaxies : ParupunteScript { private string name; - public SpawnTaxies(ParupunteCore core) : base(core) + public SpawnTaxies(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => name; + public override ParupunteConfigElement DefaultElement { get; }= null; public override void OnSetUp() { @@ -21,6 +21,11 @@ public override void OnSetUp() name = "仲間が増えるよ!やったね" + GetPlayerCharacterName() + honorific; } + public override void OnSetNames() + { + Name = name; + } + public override void OnStart() { StartCoroutine(SpawnTaxi()); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs index 6d33dbec..df8b1ef7 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs @@ -14,7 +14,7 @@ class SpawnVheicle : ParupunteScript { private VehicleHash vehicleHash; private String _name; - public SpawnVheicle(ParupunteCore core) : base(core) + public SpawnVheicle(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } @@ -31,7 +31,13 @@ public override void OnSetUp() _name = Game.GetGXTEntry(vehicleGxtEntry); } - public override string Name => $"{_name}生成"; + public override ParupunteConfigElement DefaultElement { get; } = null; + + public override void OnSetNames() + { + Name = $"{_name}生成"; + } + public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs index 5e69c842..d1d8885e 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs @@ -6,12 +6,11 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("すぴーどまっくす")] internal class SpeedMax : ParupunteScript { - public SpeedMax(ParupunteCore core) : base(core) + public SpeedMax(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "光速進行"; - public override string EndMessage => "法定速度を守ってマナーよく運転しましょう"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("光速進行", "法定速度を守ってマナーよく運転しましょう"); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs index 9e9b17be..16bd6838 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs @@ -6,11 +6,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class StrongVehicles : ParupunteScript { - public StrongVehicles(ParupunteCore core) : base(core) + public StrongVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "車両パワーうp"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("車両パワーうp", ""); + public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs index be6a24d9..f2321dca 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs @@ -11,11 +11,11 @@ internal class Tempest : ParupunteScript { private HashSet entityList = new HashSet(); - public Tempest(ParupunteCore core) : base(core) + public Tempest(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "テンペスト"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("テンペスト", ""); public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs index 0f7781f7..e8439ecc 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs @@ -9,11 +9,11 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteDebug(false, true)] class Transform : ParupunteScript { - public Transform(ParupunteCore core) : base(core) + public Transform(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "変身GOGOベイビー"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("変身GOGOベイビー", ""); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs b/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs index 51ac86d7..f1a7874f 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs @@ -4,11 +4,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class VehiclePetrolTanksGetFire : ParupunteScript { - public VehiclePetrolTanksGetFire(ParupunteCore core) : base(core) + public VehiclePetrolTanksGetFire(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name => "周辺車両一斉発火"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("周辺車両一斉発火", ""); + public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs b/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs index bcf76cd2..d527bae7 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs @@ -7,11 +7,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { internal class VehicleSpeedUp : ParupunteScript { - public VehicleSpeedUp(ParupunteCore core) : base(core) + public VehicleSpeedUp(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "エンジンパワーアップ"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("エンジンパワーアップ", ""); + public override void OnSetUp() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs index 740b4e7d..55a20289 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs @@ -13,11 +13,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts [ParupunteIsono("ぼるが")] internal class Volga : ParupunteScript { - public Volga(ParupunteCore core) : base(core) + public Volga(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override string Name { get; } = "頭の中に爆弾が!"; + public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("頭の中に爆弾が", ""); + public override void OnStart() { From 6e3034ed175d1489479dc92dab0be9f32cb45394 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Sat, 14 Apr 2018 21:57:15 +0900 Subject: [PATCH 2/6] =?UTF-8?q?ParupunteConfigAttribute=E3=82=92=E8=A8=AD?= =?UTF-8?q?=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../InfernoScripts/Parupunte/ParupunteScript.cs | 14 ++++++-------- .../Parupunte/Scripts/AddPlayerMoney.cs | 3 +-- Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs | 3 +-- .../Parupunte/Scripts/BeastFriends.cs | 2 -- .../InfernoScripts/Parupunte/Scripts/BlackOut.cs | 3 +-- .../Parupunte/Scripts/ChangeWantedLevel.cs | 1 - .../Parupunte/Scripts/CitizenEmagencyEscape.cs | 3 +-- .../Parupunte/Scripts/CitizenNinja.cs | 3 +-- .../InfernoScripts/Parupunte/Scripts/DachoClub.cs | 4 +--- .../Parupunte/Scripts/ElectricalShock.cs | 4 +--- .../Parupunte/Scripts/EveryoneLikeYou.cs | 6 ++---- .../Parupunte/Scripts/ExplodeDeadBodies.cs | 4 +--- Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs | 2 -- .../InfernoScripts/Parupunte/Scripts/FishHeaven.cs | 4 +--- .../Parupunte/Scripts/FixPedsAndVehicles.cs | 4 +--- .../Parupunte/Scripts/FloatingCar.cs | 4 +--- .../InfernoScripts/Parupunte/Scripts/Garupan.cs | 3 --- .../InfernoScripts/Parupunte/Scripts/Gochiusa.cs | 4 +--- .../Parupunte/Scripts/HealthRegen.cs | 3 +-- .../InfernoScripts/Parupunte/Scripts/Hitohanabi.cs | 4 +--- .../Parupunte/Scripts/InvisiblePeds.cs | 4 +--- .../Parupunte/Scripts/InvisibleVehicles.cs | 4 +--- Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs | 5 +---- .../Parupunte/Scripts/KetsuFunnel.cs | 4 +--- .../InfernoScripts/Parupunte/Scripts/KetsuWarp.cs | 5 +---- .../Parupunte/Scripts/KillCitizens.cs | 3 +-- .../InfernoScripts/Parupunte/Scripts/KuruKuru.cs | 4 +--- .../InfernoScripts/Parupunte/Scripts/MagicFire.cs | 4 +--- .../Parupunte/Scripts/MassiveVehicleHack.cs | 4 +--- Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs | 5 +---- .../Parupunte/Scripts/MoutainLion.cs | 4 +--- .../Parupunte/Scripts/MultiLeggedRace.cs | 5 +---- .../InfernoScripts/Parupunte/Scripts/NinjaRun.cs | 4 +--- .../InfernoScripts/Parupunte/Scripts/Owatashiki.cs | 4 +--- .../Parupunte/Scripts/PerfectFreeze.cs | 4 +--- .../Parupunte/Scripts/PlayerInvincible.cs | 4 +--- .../Parupunte/Scripts/PositionShufle.cs | 6 ++---- .../Parupunte/Scripts/RepairVehicles.cs | 4 +--- .../InfernoScripts/Parupunte/Scripts/RpgOnly.cs | 4 +--- .../Parupunte/Scripts/SetDateTime.cs | 2 -- .../Parupunte/Scripts/SpawnCharacters.cs | 3 --- .../Parupunte/Scripts/SpawnFriend.cs | 4 +--- .../Parupunte/Scripts/SpawnTaxies.cs | 2 -- .../Parupunte/Scripts/SpawnVheicle.cs | 2 -- .../InfernoScripts/Parupunte/Scripts/SpeedMax.cs | 3 +-- .../Parupunte/Scripts/StrongVehicles.cs | 4 +--- .../InfernoScripts/Parupunte/Scripts/Tempest.cs | 3 +-- .../InfernoScripts/Parupunte/Scripts/Transform.cs | 3 +-- .../Parupunte/Scripts/VehiclePetrolTanksGetFire.cs | 4 +--- .../Parupunte/Scripts/VehicleSpeedUp.cs | 4 +--- Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs | 4 +--- 51 files changed, 50 insertions(+), 147 deletions(-) diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs b/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs index 21ca30fb..2cd084aa 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteScript.cs @@ -36,13 +36,13 @@ public ParupunteIsono(string command = null) } } - public class ParupunteAttribute : Attribute + public class ParupunteConfigAttribute : Attribute { - public string DefaultStartMessage; - public string DefaultSubMessage; - public string DefaultEndMessage; + public string DefaultStartMessage = ""; + public string DefaultSubMessage = ""; + public string DefaultEndMessage = ""; - public ParupunteAttribute(string defaultStartMessage, string defaultSubMessage, string defaultEndMessage) + public ParupunteConfigAttribute(string defaultStartMessage = "", string defaultEndMessage = "", string defaultSubMessage = "") { DefaultStartMessage = defaultStartMessage; DefaultEndMessage = defaultEndMessage; @@ -100,8 +100,6 @@ internal abstract class ParupunteScript protected Random Random; - public virtual ParupunteConfigElement DefaultElement { get; } = null; - protected readonly ParupunteConfigElement Config; protected ParupunteScript(ParupunteCore core, ParupunteConfigElement element) @@ -112,7 +110,7 @@ protected ParupunteScript(ParupunteCore core, ParupunteConfigElement element) IsFinished = false; Random = new Random(); - Config = element ?? DefaultElement; + Config = element; } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs b/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs index 7384a012..cb77b7a4 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/AddPlayerMoney.cs @@ -2,14 +2,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("今じゃあケツをふく紙にもなりゃしねってのによぉ")] internal class AddPlayerMoney : ParupunteScript { public AddPlayerMoney(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("今じゃあケツをふく紙にもなりゃしねってのによぉ", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs index e829a63f..65c00fb0 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs @@ -9,6 +9,7 @@ using UniRx; namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ブンシンノジツ", "おわり")] [ParupunteIsono("ぶんしん")] class Avatar : ParupunteScript { @@ -18,8 +19,6 @@ public Avatar(ParupunteCore core, ParupunteConfigElement element) : base(core, e { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("ブンシンノジツ", "おわり"); - public override void OnStart() { StartCoroutine(SpawnCoroutine()); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs b/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs index eedecc9c..d70a65e1 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/BeastFriends.cs @@ -25,8 +25,6 @@ public BeastFriends(ParupunteCore core, ParupunteConfigElement element) : base(c isBeast = Random.Next(0, 100) <= 80; } - public override ParupunteConfigElement DefaultElement { get; } = null; - public override void OnSetNames() { Name = isBeast ? "けものフレンズ" : "のけものフレンズ"; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs b/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs index 31ef868e..b6c8bb01 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/BlackOut.cs @@ -11,6 +11,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ctOS 停電", "ctOS 復旧")] [ParupunteIsono("ていでん")] class BlackOut : ParupunteScript { @@ -23,8 +24,6 @@ public BlackOut(ParupunteCore core, ParupunteConfigElement element) : base(core, { SetUpSound(); } - - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("ctOS 停電", "ctOS 復旧"); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs index f94f135b..55cc8d69 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ChangeWantedLevel.cs @@ -12,7 +12,6 @@ public ChangeWantedLevel(ParupunteCore core, ParupunteConfigElement element) : b { } - public override ParupunteConfigElement DefaultElement { get; } = null; public override void OnSetNames() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs index b8e5b82e..0f6ecb7e 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs @@ -10,6 +10,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("磯野~!緊急脱出しようぜ!")] [ParupunteIsono("きんきゅうだっしゅつ")] class CitizenEmagencyEscape : ParupunteScript { @@ -17,8 +18,6 @@ public CitizenEmagencyEscape(ParupunteCore core, ParupunteConfigElement element) { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("磯野~!緊急脱出しようぜ!", ""); - public override void OnStart() { var playerPos = core.PlayerPed.Position; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs index 17f9f613..5320b5f3 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs @@ -8,6 +8,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("江 戸 時 代", " 現 代 ")] [ParupunteIsono("えどじだい")] internal class CitizenNinja : ParupunteScript { @@ -18,8 +19,6 @@ internal class CitizenNinja : ParupunteScript public CitizenNinja(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("江 戸 時 代", " 現 代 "); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs b/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs index 20cb4052..2c19d417 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/DachoClub.cs @@ -5,6 +5,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ダチョウ倶楽部", "ありがとうございました")] [ParupunteIsono("だちょうくらぶ")] internal class DachoClub : ParupunteScript { @@ -12,9 +13,6 @@ public DachoClub(ParupunteCore core, ParupunteConfigElement element) : base(core { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("ダチョウ倶楽部", "ありがとうございました"); - public override void OnStart() { ReduceCounter = new ReduceCounter(20*1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs index aaceb39e..ef0d790e 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ElectricalShock.cs @@ -10,6 +10,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("エレクトリカルショック", "おわり")] [ParupunteIsono("でんき")] class ElectricalShock : ParupunteScript { @@ -17,9 +18,6 @@ public ElectricalShock(ParupunteCore core, ParupunteConfigElement element) : bas { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("エレクトリカルショック!", "おわり"); - public override void OnStart() { ReduceCounter = new ReduceCounter(20 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/EveryoneLikeYou.cs b/Inferno/InfernoScripts/Parupunte/Scripts/EveryoneLikeYou.cs index cb089e41..02d6a168 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/EveryoneLikeYou.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/EveryoneLikeYou.cs @@ -9,18 +9,16 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("いっぱいちゅき", "よく見たらクソむかつく")] [ParupunteIsono("いっぱいちゅき")] class EveryoneLikeYou : ParupunteScript { private HashSet entityList = new HashSet(); - public EveryoneLikeYou(ParupunteCore core) : base(core) + public EveryoneLikeYou(ParupunteCore core, ParupunteConfigElement config) : base(core, config) { } - public override string Name { get; } = "いっぱいちゅき"; - - public override void OnStart() { ReduceCounter = new ReduceCounter(15 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs b/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs index 0ec9789d..bf4e18ce 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/ExplodeDeadBodies.cs @@ -6,6 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ば・く・は・つ・し・た・い!", "ば・く・は・つ・し・な・い")] [ParupunteIsono("ばくはつしたい")] internal class ExplodeDeadBodies : ParupunteScript { @@ -15,9 +16,6 @@ public ExplodeDeadBodies(ParupunteCore core, ParupunteConfigElement element) : b { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("ば・く・は・つ・し・た・い!", "ば・く・は・つ・し・な・い"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs index 3fbb95e3..07b8434b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Fart.cs @@ -16,8 +16,6 @@ public Fart(ParupunteCore core, ParupunteConfigElement element) : base(core, ele { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("3", ""); public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs b/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs index 0fce1d13..11d60519 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/FishHeaven.cs @@ -7,6 +7,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("おさかな天国", "おさかな地獄")] [ParupunteIsono("おさかなてんごく")] internal class FishHeaven : ParupunteScript { @@ -18,9 +19,6 @@ public FishHeaven(ParupunteCore core, ParupunteConfigElement element) : base(cor { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("おさかな天国", "おさかな地獄"); - public override void OnStart() { var ptfxName = "core"; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs index b5398af9..2173f2ef 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/FixPedsAndVehicles.cs @@ -5,15 +5,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("周辺の人&車両回復", "")] internal class FixPedsAndVehicles : ParupunteScript { public FixPedsAndVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("周辺の人&車両回復", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs b/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs index 5ce1ea0a..9e761cce 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/FloatingCar.cs @@ -5,6 +5,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ふわふわ", "おわり")] [ParupunteIsono("ふわふわ")] internal class FloatingCar : ParupunteScript { @@ -12,9 +13,6 @@ public FloatingCar(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("ふわふわ", "おわり"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs index d226fe03..c7497c8d 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Garupan.cs @@ -42,9 +42,6 @@ public override void OnSetUp() } } - - public override ParupunteConfigElement DefaultElement { get; } = null; - public override void OnSetNames() { Name = _name; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs index b6bbbd4a..081fa320 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs @@ -6,6 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("あぁ^~築地が漁業するんじゃぁ^~", "大漁")] [ParupunteIsono("つきじ")] internal class Gochiusa : ParupunteScript { @@ -15,9 +16,6 @@ public Gochiusa(ParupunteCore core, ParupunteConfigElement element) : base(core, { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("あぁ^~築地が漁業するんじゃぁ^~", "大漁"); - public override void OnStart() { ReduceCounter = new ReduceCounter(15 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs b/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs index 98d66373..66819867 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/HealthRegen.cs @@ -3,6 +3,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("リジェネ", "おわり")] internal class HealthRegen : ParupunteScript { private ReduceCounter reduceCounter; @@ -11,8 +12,6 @@ public HealthRegen(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("リジェネ", "おわり"); private uint coroutineId = 0; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs index fd8822a3..4c232296 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Hitohanabi.cs @@ -8,6 +8,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ひとはなび", "きたねぇ花火だ")] [ParupunteIsono("ひとはなび")] internal class Hitohanabi : ParupunteScript { @@ -15,9 +16,6 @@ public Hitohanabi(ParupunteCore core, ParupunteConfigElement element) : base(cor { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("ひとはなび", "きたねぇ花火だ"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs b/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs index 730901b9..0a2f9746 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/InvisiblePeds.cs @@ -4,15 +4,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("光学迷彩(仲間除くNPC)")] internal class InvisiblePeds : ParupunteScript { public InvisiblePeds(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("光学迷彩(仲間除くNPC)", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs index 4d565a58..a6ca0333 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/InvisibleVehicles.cs @@ -3,15 +3,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("光学迷彩(車両)")] internal class InvisibleVehicles : ParupunteScript { public InvisibleVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("光学迷彩(車両)", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs index cc02bd5b..6379e576 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Isono.cs @@ -6,7 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { - + [ParupunteConfigAttribute("磯野ー!空飛ぼうぜ!")] [ParupunteIsono("いその")] class Isono : ParupunteScript { @@ -14,9 +14,6 @@ public Isono(ParupunteCore core, ParupunteConfigElement element) : base(core, el { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("磯野ー!空飛ぼうぜ!", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs index 7bf46285..e2fc8c30 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuFunnel.cs @@ -9,6 +9,7 @@ using UniRx; namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("ケツファンネル", "弾切れ")] [ParupunteIsono("けつふぁんねる")] class KetsuFunnel : ParupunteScript { @@ -16,9 +17,6 @@ public KetsuFunnel(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("ケツファンネル", "弾切れ"); - public override void OnStart() { ReduceCounter = new ReduceCounter(15 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs index ceb7451d..75fd2124 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KetsuWarp.cs @@ -8,7 +8,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { - + [ParupunteConfigAttribute("行き先を選べ!")] [ParupunteIsono("けつるーら")] class KetsuWarp : ParupunteScript { @@ -16,9 +16,6 @@ public KetsuWarp(ParupunteCore core, ParupunteConfigElement element) : base(core { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("行き先を選べ!", "ケツルーラ"); - public override void OnStart() { StartCoroutine(IdleCoroutine()); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs index 82fe41ef..ed623501 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KillCitizens.cs @@ -4,6 +4,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("周辺市民全員即死")] [ParupunteIsono("みんなばくはつ")] internal class KillCitizens : ParupunteScript { @@ -11,8 +12,6 @@ public KillCitizens(ParupunteCore core, ParupunteConfigElement element) : base(c { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("周辺市民全員即死!", ""); private uint coroutineId = 0; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs b/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs index 590a0be3..cb71a5bb 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/KuruKuru.cs @@ -5,6 +5,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("くるくる", "おわり")] [ParupunteIsono("くるくる")] internal class KuruKuru : ParupunteScript { @@ -15,9 +16,6 @@ public KuruKuru(ParupunteCore core, ParupunteConfigElement element) : base(core, ReduceCounter = new ReduceCounter(20 * 1000); } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("くるくる!", "おわり"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs index 1ac812ea..d1591222 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MagicFire.cs @@ -8,6 +8,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts /// /// 尻から炎 /// + [ParupunteConfigAttribute("ただし魔法は尻から出る", " お し り ")] [ParupunteIsono("おしり")] internal class MagicFire : ParupunteScript { @@ -15,9 +16,6 @@ public MagicFire(ParupunteCore core, ParupunteConfigElement element) : base(core { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("ただし魔法は尻から出る", " お し り "); - private uint coroutineId = 0; public override void OnSetUp() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs index 77985d62..539ab904 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MassiveVehicleHack.cs @@ -8,6 +8,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("大量車両ハッキング")] [ParupunteIsono("はっきんぐ")] class MassiveVehicleHack : ParupunteScript { @@ -21,9 +22,6 @@ public MassiveVehicleHack(ParupunteCore core, ParupunteConfigElement element) : //演出用の線を引くリスト private List> drawLineList = new List>(); - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("大量車両ハッキング", ""); - public override void OnStart() { ReduceCounter = new ReduceCounter(3000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs index f503123a..86725359 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Mayday.cs @@ -9,16 +9,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts /// /// プレイヤの近くに飛行機を墜落させる /// - + [ParupunteConfigAttribute("メーデー!メーデー!メーデー!")] internal class Mayday : ParupunteScript { public Mayday(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("メーデー!メーデー!メーデー!", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs index de282ffc..3636aaeb 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MoutainLion.cs @@ -4,6 +4,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("近すぎちゃって♪ どうしようもない♪")] [ParupunteIsono("くーがー")] internal class MoutainLion : ParupunteScript { @@ -11,9 +12,6 @@ public MoutainLion(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("近すぎちゃって♪ どうしようもない♪", ""); - public override void OnStart() { StartCoroutine(SpawnCharacter()); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs b/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs index 370d4344..5d14e625 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/MultiLeggedRace.cs @@ -8,6 +8,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("参 勤 交 代", "大 政 奉 還")] [ParupunteIsono("さんきんこうたい")] class MultiLeggedRace : ParupunteScript { @@ -18,10 +19,6 @@ public MultiLeggedRace(ParupunteCore core, ParupunteConfigElement element) : bas private List explosionList = new List(); private List allPedList = new List(); - - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("参 勤 交 代", "大 政 奉 還"); - public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs b/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs index 2802aa32..89577f11 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/NinjaRun.cs @@ -8,6 +8,7 @@ namespace Inferno { + [ParupunteConfigAttribute("バリキ・ジツ", "もうオシマイだ!")] [ParupunteIsono("ばりきじつ")] internal class NinjaRun : ParupunteScript { @@ -16,9 +17,6 @@ public NinjaRun(ParupunteCore core, ParupunteConfigElement element) : base(core, { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("バリキ・ジツ", "もうオシマイだ!"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs index 671e4cf6..17ec4a7c 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Owatashiki.cs @@ -1,14 +1,12 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("オワタ式の可能性")] internal class Owatashiki : ParupunteScript { public Owatashiki(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("オワタ式の可能性", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs b/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs index 75e2efb7..f1a7aa2b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/PerfectFreeze.cs @@ -6,6 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("パーフェクトフリーズ", "おわり")] [ParupunteIsono("ぱーふぇくとふりーず")] class PerfectFreeze : ParupunteScript { @@ -15,9 +16,6 @@ public PerfectFreeze(ParupunteCore core, ParupunteConfigElement element) : base( private HashSet freezedEntities = new HashSet(); - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("パーフェクトフリーズ", "おわり"); - private readonly float FreezeRange = 60; public override void OnStart() diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs b/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs index ebaeb51d..e8173321 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/PlayerInvincible.cs @@ -3,6 +3,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("無敵", "おわり")] [ParupunteIsono("むてき")] internal class PlayerInvincible : ParupunteScript { @@ -10,9 +11,6 @@ public PlayerInvincible(ParupunteCore core, ParupunteConfigElement element) : ba { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("無敵", "おわり"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs b/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs index c9ce2cbf..64c3aae3 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/PositionShufle.cs @@ -7,6 +7,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("あっちこっち", "おわり")] [ParupunteIsono("あっちこっち")] internal class PositionShufle : ParupunteScript { @@ -16,9 +17,6 @@ public PositionShufle(ParupunteCore core, ParupunteConfigElement element) : base { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("あっちこっち", "おわり"); - //高速コルーチン(1フレーム単位で実行) private CoroutineSystem _quickCoroutineSystem; @@ -57,7 +55,7 @@ private IEnumerable SwapCoroutine() //ポジションの入れ替えは高速コルーチンで実行 _quickCoroutineSystem.AddCoroutine(SwapPedPosition(peds.Item1, peds.Item2)); } - yield return WaitForSeconds(0.8f); + yield return WaitForSeconds(1.5f); } } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs index 9f930f53..449a5096 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/RepairVehicles.cs @@ -3,6 +3,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("車両修復")] [ParupunteIsono("くるましゅうり")] internal class RepairVehicles : ParupunteScript { @@ -10,9 +11,6 @@ public RepairVehicles(ParupunteCore core, ParupunteConfigElement element) : base { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("車両修復", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs b/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs index 06ba65d1..f289167f 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/RpgOnly.cs @@ -3,6 +3,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("RPG ONLY", "おわり")] [ParupunteIsono("あーるぴーじー")] class RpgOnly : ParupunteScript { @@ -10,9 +11,6 @@ public RpgOnly(ParupunteCore core, ParupunteConfigElement element) : base(core, { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("RPG ONLY", "おわり"); - public override void OnStart() { ReduceCounter = new ReduceCounter(20 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs index e4c2450b..3742a122 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SetDateTime.cs @@ -13,8 +13,6 @@ public SetDateTime(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; } - = null; public override void OnSetNames() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs index a3e2d3b5..b2dea995 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnCharacters.cs @@ -18,9 +18,6 @@ public SpawnCharacters(ParupunteCore core, ParupunteConfigElement element) : bas { } - public override ParupunteConfigElement DefaultElement { get; } - = null; - public override void OnSetNames() { Name = name; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs index 64ececc7..24ba6418 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnFriend.cs @@ -10,6 +10,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("味方召喚", "定時なんで帰ります")] [ParupunteIsono("みかたしょうかん")] class SpawnFriend :ParupunteScript { @@ -18,9 +19,6 @@ public SpawnFriend(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; } - = new ParupunteConfigElement("味方召喚", "定時なんで帰ります"); - public override void OnStart() { ReduceCounter = new ReduceCounter(20 * 1000); diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs index bfcb031a..5ef8e691 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnTaxies.cs @@ -13,8 +13,6 @@ public SpawnTaxies(ParupunteCore core, ParupunteConfigElement element) : base(co { } - public override ParupunteConfigElement DefaultElement { get; }= null; - public override void OnSetUp() { var honorific = core.PlayerPed.Gender == Gender.Male ? "くん!" : "ちゃん!"; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs index df8b1ef7..2e102c58 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpawnVheicle.cs @@ -31,8 +31,6 @@ public override void OnSetUp() _name = Game.GetGXTEntry(vehicleGxtEntry); } - public override ParupunteConfigElement DefaultElement { get; } = null; - public override void OnSetNames() { Name = $"{_name}生成"; diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs b/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs index d1d8885e..74f9d164 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/SpeedMax.cs @@ -3,6 +3,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("光速進行", "法定速度を守ってマナーよく運転しましょう")] [ParupunteIsono("すぴーどまっくす")] internal class SpeedMax : ParupunteScript { @@ -10,8 +11,6 @@ public SpeedMax(ParupunteCore core, ParupunteConfigElement element) : base(core, { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("光速進行", "法定速度を守ってマナーよく運転しましょう"); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs b/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs index 16bd6838..359bb63b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/StrongVehicles.cs @@ -4,15 +4,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("車両パワーうp")] internal class StrongVehicles : ParupunteScript { public StrongVehicles(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("車両パワーうp", ""); - - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs index f2321dca..3dc20bc1 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Tempest.cs @@ -6,6 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("テンペスト")] [ParupunteIsono("てんぺすと")] internal class Tempest : ParupunteScript { @@ -15,8 +16,6 @@ public Tempest(ParupunteCore core, ParupunteConfigElement element) : base(core, { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("テンペスト", ""); - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs index e8439ecc..9bc927d0 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs @@ -6,6 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("変身GOGOベイビー")] [ParupunteDebug(false, true)] class Transform : ParupunteScript { @@ -13,8 +14,6 @@ public Transform(ParupunteCore core, ParupunteConfigElement element) : base(core { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("変身GOGOベイビー", ""); - public override void OnStart() { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs b/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs index f1a7874f..a6e4ed1b 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/VehiclePetrolTanksGetFire.cs @@ -2,15 +2,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("周辺車両一斉発火")] internal class VehiclePetrolTanksGetFire : ParupunteScript { public VehiclePetrolTanksGetFire(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("周辺車両一斉発火", ""); - - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs b/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs index d527bae7..fc8809f2 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs @@ -5,15 +5,13 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { + [ParupunteConfigAttribute("エンジンパワーアップ")] internal class VehicleSpeedUp : ParupunteScript { public VehicleSpeedUp(ParupunteCore core, ParupunteConfigElement element) : base(core, element) { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("エンジンパワーアップ", ""); - - public override void OnSetUp() { } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs index 55a20289..dc271f7c 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Volga.cs @@ -10,6 +10,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts /// /// 上空からソロモンを落として大爆発させる /// + [ParupunteConfigAttribute("頭の中に爆弾が!")] [ParupunteIsono("ぼるが")] internal class Volga : ParupunteScript { @@ -17,9 +18,6 @@ public Volga(ParupunteCore core, ParupunteConfigElement element) : base(core, el { } - public override ParupunteConfigElement DefaultElement { get; } = new ParupunteConfigElement("頭の中に爆弾が", ""); - - public override void OnStart() { StartCoroutine(AirPlaneCoroutine()); From 26db71ed090c44be99719681f6b0b4ebb134f65b Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Sat, 14 Apr 2018 23:20:32 +0900 Subject: [PATCH 3/6] =?UTF-8?q?Conf=E3=81=8B=E3=82=89=E3=83=91=E3=83=AB?= =?UTF-8?q?=E3=83=97=E3=83=B3=E3=83=86=E3=81=AE=E5=AD=97=E5=B9=95=E3=82=92?= =?UTF-8?q?=E5=B7=AE=E3=81=97=E6=9B=BF=E3=81=88=E5=8F=AF=E8=83=BD=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inferno/Inferno.csproj | 1 + .../Parupunte/ParupunteConfigElement.cs | 23 ++++ .../Parupunte/ParupunteConfigRepository.cs | 106 ++++++++++++++++++ .../InfernoScripts/Parupunte/ParupunteCore.cs | 58 +++++++++- 4 files changed, 185 insertions(+), 3 deletions(-) create mode 100644 Inferno/InfernoScripts/Parupunte/ParupunteConfigRepository.cs diff --git a/Inferno/Inferno.csproj b/Inferno/Inferno.csproj index 76225ea8..05801a25 100644 --- a/Inferno/Inferno.csproj +++ b/Inferno/Inferno.csproj @@ -115,6 +115,7 @@ + diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs b/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs index d25f177c..80afd5b1 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.ComponentModel; using System.Diagnostics; using System.Linq; using System.Text; @@ -29,4 +30,26 @@ public ParupunteConfigElement(string startMessage, string finishMessage) public static ParupunteConfigElement NoUse = new ParupunteConfigElement("", ""); } + + internal class ParupunteConfigDto + { + public string ParupunteName { get; set; } + + [DefaultValue("")] + public string StartMessage { get; set; } + + [DefaultValue("")] + public string SubMessage { get; set; } + + [DefaultValue("")] + public string FinishMessage { get; set; } + + public ParupunteConfigDto(string parupunteName, string startMessage, string subMessage, string finishMessage) + { + ParupunteName = parupunteName; + StartMessage = startMessage; + SubMessage = subMessage; + FinishMessage = finishMessage; + } + } } diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteConfigRepository.cs b/Inferno/InfernoScripts/Parupunte/ParupunteConfigRepository.cs new file mode 100644 index 00000000..831d8160 --- /dev/null +++ b/Inferno/InfernoScripts/Parupunte/ParupunteConfigRepository.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Newtonsoft.Json; + +namespace Inferno.InfernoScripts +{ + /// + /// ParupunteConfigElementの管理 + /// + class ParupunteConfigRepository + { + protected readonly Encoding _encoding = Encoding.UTF8; + protected DebugLogger _debugLogger; + protected string _filePath = @"./scripts/confs/Parupunte.conf"; + + protected virtual DebugLogger DebugLogger + { + get + { + if (_debugLogger != null) return _debugLogger; + _debugLogger = new DebugLogger(@"Inferno.log"); + return _debugLogger; + } + } + + /// + /// ファイルから読み込んで設定ファイル返す + /// + public Dictionary LoadSettingFile() + { + + if (!File.Exists(_filePath)) + { + return new Dictionary(); + } + + var readString = ""; + try + { + using (var sr = new StreamReader(_filePath, _encoding)) + { + readString = sr.ReadToEnd(); + } + } + catch (Exception e) + { + DebugLogger.Log(e.Message); + DebugLogger.Log(e.StackTrace); + return new Dictionary(); + } + + try + { + var dto = JsonConvert.DeserializeObject(readString); + return dto.ToDictionary(x => x.ParupunteName, + x => new ParupunteConfigElement(x.StartMessage, x.SubMessage, x.FinishMessage)); + } + catch (Exception e) + { + DebugLogger.Log(e.Message); + DebugLogger.Log(e.StackTrace); + return new Dictionary(); + } + } + + public async Task SaveSettings(Dictionary configs) + { + var directoryPath = Path.GetDirectoryName(_filePath); + //存在しないならディレクトリを作る + if (!Directory.Exists(directoryPath)) + { + Directory.CreateDirectory(directoryPath); + } + + var dto = configs.Select(x => + { + var name = x.Key; + var elem = x.Value; + return new ParupunteConfigDto(name, elem.StartMessage, elem.SubMessage, elem.FinishMessage); + }).ToArray(); + + try + { + using (var w = new StreamWriter(_filePath, false, _encoding)) + { + var settings = new JsonSerializerSettings + { + NullValueHandling = NullValueHandling.Ignore + }; + var json = JsonConvert.SerializeObject(dto, Formatting.Indented, settings); + await w.WriteAsync(json); + } + } + catch (Exception e) + { + DebugLogger.Log(e.Message); + DebugLogger.Log(e.StackTrace); + } + } + + } +} diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs index 372a9974..eeec50b2 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs @@ -23,6 +23,8 @@ internal class ParupunteCore : InfernoScript /// private Type[] _parupunteScritpts; + private Dictionary _parupunteConfigs; + /// /// デバッグ用 /// @@ -92,6 +94,12 @@ protected override void Setup() #endregion ParunteScripts + #region Config + + SetConfigData(_parupunteScritpts); + + #endregion + #region EventHook CreateInputKeywordAsObservable("rnt") @@ -165,14 +173,54 @@ protected override void Setup() } + // Configファイルの設定を行う + private void SetConfigData(Type[] parupunteScripts) + { + var configRepository = new ParupunteConfigRepository(); + + // jsonから読み込んだConfig値 + var loadConfig = configRepository.LoadSettingFile(); + + // デフォルト値 + var defaultConfig = parupunteScripts + .Select(x => new { x.Name, Attribute = x.GetCustomAttribute() }) + .Where(x => x.Attribute != null) + .ToDictionary(x => x.Name, x => + { + var a = x.Attribute; + return new ParupunteConfigElement(a.DefaultStartMessage, a.DefaultSubMessage, a.DefaultEndMessage); + }); + + // 合成したConfig値 + var mergedConfig = new Dictionary(); + + // デフォルト値のConfを、読み込んだConf値で上書きする + foreach (var kv in defaultConfig) + { + var value = kv.Value; + if (loadConfig.ContainsKey(kv.Key)) + { + value = loadConfig[kv.Key]; + } + mergedConfig[kv.Key] = value; + } + + // 最終的なconfをファイルに書き出す + configRepository.SaveSettings(mergedConfig); + + // 設定完了 + _parupunteConfigs = mergedConfig; + } + + private bool IsonoMethod(string command) { var c = command; if (c.Contains("とまれ")) { - // ParupunteStop(); - // return true; + // ParupunteStop(); + // return true; } if (IsActive) return false; @@ -202,8 +250,12 @@ private void ParupunteStart(Type script) IsActive = true; + var conf = _parupunteConfigs.ContainsKey(script.Name) + ? _parupunteConfigs[script.Name] + : new ParupunteConfigElement("", ""); + //ThreadPool上で初期化(プチフリ回避) - Observable.Start(() => Activator.CreateInstance(script, this) as ParupunteScript, Scheduler.ThreadPool) + Observable.Start(() => Activator.CreateInstance(script, this, conf) as ParupunteScript, Scheduler.ThreadPool) .OnErrorRetry((Exception ex) => { LogWrite(ex.ToString()); From c50e96cfeb24a8912ae4bac54ac0b5a693c5e480 Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Sat, 14 Apr 2018 23:24:16 +0900 Subject: [PATCH 4/6] =?UTF-8?q?=E3=82=AF=E3=83=A9=E3=82=B9=E5=90=8D?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/{Avatar.cs => Bunshin.cs} | 149 +++++------ .../Scripts/CitizenEmagencyEscape.cs | 2 +- .../Scripts/{CitizenNinja.cs => EdoPeriod.cs} | 250 +++++++++--------- .../Parupunte/Scripts/Transform.cs | 2 +- .../Scripts/{Gochiusa.cs => Tsukiji.cs} | 144 +++++----- ...icleSpeedUp.cs => VehicleEnginePowerUp.cs} | 62 ++--- 6 files changed, 303 insertions(+), 306 deletions(-) rename Inferno/InfernoScripts/Parupunte/Scripts/{Avatar.cs => Bunshin.cs} (86%) rename Inferno/InfernoScripts/Parupunte/Scripts/{CitizenNinja.cs => EdoPeriod.cs} (94%) rename Inferno/InfernoScripts/Parupunte/Scripts/{Gochiusa.cs => Tsukiji.cs} (91%) rename Inferno/InfernoScripts/Parupunte/Scripts/{VehicleSpeedUp.cs => VehicleEnginePowerUp.cs} (76%) diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Bunshin.cs similarity index 86% rename from Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs rename to Inferno/InfernoScripts/Parupunte/Scripts/Bunshin.cs index 65c00fb0..462377cf 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Avatar.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Bunshin.cs @@ -1,76 +1,73 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using GTA; -using Inferno.ChaosMode; -using Inferno.ChaosMode.WeaponProvider; -using UniRx; -namespace Inferno.InfernoScripts.Parupunte.Scripts -{ - [ParupunteConfigAttribute("ブンシンノジツ", "おわり")] - [ParupunteIsono("ぶんしん")] - class Avatar : ParupunteScript - { - private List peds = new List(); - - public Avatar(ParupunteCore core, ParupunteConfigElement element) : base(core, element) - { - } - - public override void OnStart() - { - StartCoroutine(SpawnCoroutine()); - - ReduceCounter = new ReduceCounter(20000); - AddProgressBar(ReduceCounter); - ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd()); - - this.OnFinishedAsObservable - .Subscribe(_ => - { - foreach (var p in peds) - { - if (p.IsSafeExist()) p.MarkAsNoLongerNeeded(); - } - }); - } - - IEnumerable SpawnCoroutine() - { - foreach (var i in Enumerable.Range(0, 12)) - { - CreatePed(i < 6); - yield return null; - } - } - - private void CreatePed(bool isFriend) - { - var ped = GTA.World.CreatePed(core.PlayerPed.Model, core.PlayerPed.Position.Around(Random.Next(5, 10))); - if (!ped.IsSafeExist()) return; - - if (isFriend) - { - ped.SetNotChaosPed(true); - core.PlayerPed.CurrentPedGroup.Add(ped, false); - AutoReleaseOnGameEnd(ped); - peds.Add(ped); - } - else - { - ped.MarkAsNoLongerNeeded(); - } - - ped.MaxHealth = 500; - ped.Health = ped.MaxHealth; - - var weaponhash = (int)ChaosModeWeapons.GetRandomWeapon(); - ped.SetDropWeaponWhenDead(false); //武器を落とさない - ped.GiveWeapon(weaponhash, 1000); //指定武器所持 - ped.EquipWeapon(weaponhash); //武器装備 - - } - } -} +using System.Collections.Generic; +using System.Linq; +using GTA; +using Inferno.ChaosMode; +using Inferno.ChaosMode.WeaponProvider; +using UniRx; +namespace Inferno.InfernoScripts.Parupunte.Scripts +{ + [ParupunteConfigAttribute("ブンシンノジツ", "おわり")] + [ParupunteIsono("ぶんしん")] + class Bunshin : ParupunteScript + { + private List peds = new List(); + + public Bunshin(ParupunteCore core, ParupunteConfigElement element) : base(core, element) + { + } + + public override void OnStart() + { + StartCoroutine(SpawnCoroutine()); + + ReduceCounter = new ReduceCounter(20000); + AddProgressBar(ReduceCounter); + ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd()); + + this.OnFinishedAsObservable + .Subscribe(_ => + { + foreach (var p in peds) + { + if (p.IsSafeExist()) p.MarkAsNoLongerNeeded(); + } + }); + } + + IEnumerable SpawnCoroutine() + { + foreach (var i in Enumerable.Range(0, 12)) + { + CreatePed(i < 6); + yield return null; + } + } + + private void CreatePed(bool isFriend) + { + var ped = GTA.World.CreatePed(core.PlayerPed.Model, core.PlayerPed.Position.Around(Random.Next(5, 10))); + if (!ped.IsSafeExist()) return; + + if (isFriend) + { + ped.SetNotChaosPed(true); + core.PlayerPed.CurrentPedGroup.Add(ped, false); + AutoReleaseOnGameEnd(ped); + peds.Add(ped); + } + else + { + ped.MarkAsNoLongerNeeded(); + } + + ped.MaxHealth = 500; + ped.Health = ped.MaxHealth; + + var weaponhash = (int)ChaosModeWeapons.GetRandomWeapon(); + ped.SetDropWeaponWhenDead(false); //武器を落とさない + ped.GiveWeapon(weaponhash, 1000); //指定武器所持 + ped.EquipWeapon(weaponhash); //武器装備 + + } + } +} diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs index 0f6ecb7e..1df839bd 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/CitizenEmagencyEscape.cs @@ -30,7 +30,7 @@ public override void OnStart() )) { var car = ped.CurrentVehicle; - if (car.IsSafeExist() && car.PetrolTankHealth > 0) + if (car.IsSafeExist() && car.PetrolTankHealth > 0 && !car.IsRequiredForMission()) { car.PetrolTankHealth = -700; } diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs b/Inferno/InfernoScripts/Parupunte/Scripts/EdoPeriod.cs similarity index 94% rename from Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs rename to Inferno/InfernoScripts/Parupunte/Scripts/EdoPeriod.cs index 5320b5f3..8909c065 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/CitizenNinja.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/EdoPeriod.cs @@ -1,125 +1,125 @@ -using GTA; -using GTA.Math; -using GTA.Native; -using System; -using System.Collections.Generic; -using System.Linq; -using UniRx; - -namespace Inferno.InfernoScripts.Parupunte.Scripts -{ - [ParupunteConfigAttribute("江 戸 時 代", " 現 代 ")] - [ParupunteIsono("えどじだい")] - internal class CitizenNinja : ParupunteScript - { - private Random random = new Random(); - private HashSet ninjas = new HashSet(); - private List pedList = new List(); - - public CitizenNinja(ParupunteCore core, ParupunteConfigElement element) : base(core, element) - { - } - - public override void OnStart() - { - ReduceCounter = new ReduceCounter(20000); - AddProgressBar(ReduceCounter); - - var ptfxName = "core"; - - if (!Function.Call(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName)) - { - Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName); - } - Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, ptfxName); - - foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsInRangeOf(core.PlayerPed.Position, 100) && x.IsAlive)) - { - pedList.Add(ped); - ninjas.Add(ped.Handle); - ped.Task.ClearAllImmediately(); - StartCoroutine(DashCoroutine(ped)); - } - - ReduceCounter.OnFinishedAsync.Subscribe(_ => - { - foreach (var ped in pedList) - { - if (ped.IsSafeExist()) - { - SetAnimRate(ped, 1); - Function.Call(Hash.TASK_FORCE_MOTION_STATE, ped, 0xFFF7E7A4, 0); - } - } - - ParupunteEnd(); - }); - } - - protected override void OnUpdate() - { - foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsAlive - && x.IsInRangeOf(core.PlayerPed.Position, 100) && - !ninjas.Contains(x.Handle))) - { - pedList.Add(ped); - ninjas.Add(ped.Handle); - ped.Task.ClearAllImmediately(); - StartCoroutine(DashCoroutine(ped)); - } - } - - private void SetAnimRate(Ped ped, float rate) - { - Function.Call(Hash.SET_ANIM_RATE, ped, (double)rate, 0.0, 0.0); - } - - private IEnumerable DashCoroutine(Ped ped) - { - while (!ReduceCounter.IsCompleted) - { - if (!ped.IsSafeExist()) yield break; - if (ped.IsDead) - { - GTA.World.AddExplosion(ped.Position, GTA.ExplosionType.Rocket, 1.0f, 1.0f); - yield break; - } - - if (random.Next(100) < 10) - { - ped.Quaternion = Quaternion.RotationAxis(ped.UpVector, (float)(random.NextDouble() - 0.5)) * ped.Quaternion; - } - - SetAnimRate(ped, 5.0f); - Function.Call(Hash.SET_OBJECT_PHYSICS_PARAMS, ped, 200000000.0, 1, 1000, 1, 0, 0, 0, 0, 0, - 0, 0); - Function.Call(Hash.SET_ACTIVATE_OBJECT_PHYSICS_AS_SOON_AS_IT_IS_UNFROZEN, ped, true); - var hp = core.PlayerPed.ForwardVector; - Function.Call(Hash.APPLY_FORCE_TO_ENTITY, ped, hp.X * 1, hp.Y * 1, hp.Z * 1, 0, 0, 0, 1, false, - true, true, true, true); - Function.Call(Hash.TASK_PLAY_ANIM, ped, "move_m@generic", "sprint", 8.0, -8.0, -1, 9, 0, - 0, 0, 0); - StartFire(ped); - - yield return null; - } - } - - private void StartFire(Ped ped) - { - var offset = new Vector3(0.0f, 0.0f, 0.0f); - var rotation = new Vector3(0.0f, 0.0f, 0.0f); - var scale = 2.0f; - - Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "core"); - Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE, "ent_sht_electrical_box", - ped, offset.X, offset.Y, offset.Z, rotation.X, rotation.Y, rotation.Z, (int)Bone.SKEL_L_Toe0, scale, - 0, 0, 0); - - Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "core"); - Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE, "ent_dst_elec_fire", - ped, offset.X, offset.Y, offset.Z, rotation.X, rotation.Y, rotation.Z, (int)Bone.SKEL_R_Toe0, scale, - 0, 0, 0); - } - } -} +using GTA; +using GTA.Math; +using GTA.Native; +using System; +using System.Collections.Generic; +using System.Linq; +using UniRx; + +namespace Inferno.InfernoScripts.Parupunte.Scripts +{ + [ParupunteConfigAttribute("江 戸 時 代", " 現 代 ")] + [ParupunteIsono("えどじだい")] + internal class EdoPeriod : ParupunteScript + { + private Random random = new Random(); + private HashSet ninjas = new HashSet(); + private List pedList = new List(); + + public EdoPeriod(ParupunteCore core, ParupunteConfigElement element) : base(core, element) + { + } + + public override void OnStart() + { + ReduceCounter = new ReduceCounter(20000); + AddProgressBar(ReduceCounter); + + var ptfxName = "core"; + + if (!Function.Call(Hash.HAS_NAMED_PTFX_ASSET_LOADED, ptfxName)) + { + Function.Call(Hash.REQUEST_NAMED_PTFX_ASSET, ptfxName); + } + Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, ptfxName); + + foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsInRangeOf(core.PlayerPed.Position, 100) && x.IsAlive)) + { + pedList.Add(ped); + ninjas.Add(ped.Handle); + ped.Task.ClearAllImmediately(); + StartCoroutine(DashCoroutine(ped)); + } + + ReduceCounter.OnFinishedAsync.Subscribe(_ => + { + foreach (var ped in pedList) + { + if (ped.IsSafeExist()) + { + SetAnimRate(ped, 1); + Function.Call(Hash.TASK_FORCE_MOTION_STATE, ped, 0xFFF7E7A4, 0); + } + } + + ParupunteEnd(); + }); + } + + protected override void OnUpdate() + { + foreach (var ped in core.CachedPeds.Where(x => x.IsSafeExist() && x.IsAlive + && x.IsInRangeOf(core.PlayerPed.Position, 100) && + !ninjas.Contains(x.Handle))) + { + pedList.Add(ped); + ninjas.Add(ped.Handle); + ped.Task.ClearAllImmediately(); + StartCoroutine(DashCoroutine(ped)); + } + } + + private void SetAnimRate(Ped ped, float rate) + { + Function.Call(Hash.SET_ANIM_RATE, ped, (double)rate, 0.0, 0.0); + } + + private IEnumerable DashCoroutine(Ped ped) + { + while (!ReduceCounter.IsCompleted) + { + if (!ped.IsSafeExist()) yield break; + if (ped.IsDead) + { + GTA.World.AddExplosion(ped.Position, GTA.ExplosionType.Rocket, 1.0f, 1.0f); + yield break; + } + + if (random.Next(100) < 10) + { + ped.Quaternion = Quaternion.RotationAxis(ped.UpVector, (float)(random.NextDouble() - 0.5)) * ped.Quaternion; + } + + SetAnimRate(ped, 5.0f); + Function.Call(Hash.SET_OBJECT_PHYSICS_PARAMS, ped, 200000000.0, 1, 1000, 1, 0, 0, 0, 0, 0, + 0, 0); + Function.Call(Hash.SET_ACTIVATE_OBJECT_PHYSICS_AS_SOON_AS_IT_IS_UNFROZEN, ped, true); + var hp = core.PlayerPed.ForwardVector; + Function.Call(Hash.APPLY_FORCE_TO_ENTITY, ped, hp.X * 1, hp.Y * 1, hp.Z * 1, 0, 0, 0, 1, false, + true, true, true, true); + Function.Call(Hash.TASK_PLAY_ANIM, ped, "move_m@generic", "sprint", 8.0, -8.0, -1, 9, 0, + 0, 0, 0); + StartFire(ped); + + yield return null; + } + } + + private void StartFire(Ped ped) + { + var offset = new Vector3(0.0f, 0.0f, 0.0f); + var rotation = new Vector3(0.0f, 0.0f, 0.0f); + var scale = 2.0f; + + Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "core"); + Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE, "ent_sht_electrical_box", + ped, offset.X, offset.Y, offset.Z, rotation.X, rotation.Y, rotation.Z, (int)Bone.SKEL_L_Toe0, scale, + 0, 0, 0); + + Function.Call(Hash._SET_PTFX_ASSET_NEXT_CALL, "core"); + Function.Call(Hash.START_PARTICLE_FX_NON_LOOPED_ON_PED_BONE, "ent_dst_elec_fire", + ped, offset.X, offset.Y, offset.Z, rotation.X, rotation.Y, rotation.Z, (int)Bone.SKEL_R_Toe0, scale, + 0, 0, 0); + } + } +} diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs index 9bc927d0..42905414 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Transform.cs @@ -6,7 +6,7 @@ namespace Inferno.InfernoScripts.Parupunte.Scripts { - [ParupunteConfigAttribute("変身GOGOベイビー")] + //[ParupunteConfigAttribute("変身GOGOベイビー")] [ParupunteDebug(false, true)] class Transform : ParupunteScript { diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs b/Inferno/InfernoScripts/Parupunte/Scripts/Tsukiji.cs similarity index 91% rename from Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs rename to Inferno/InfernoScripts/Parupunte/Scripts/Tsukiji.cs index 081fa320..45978fe7 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/Gochiusa.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/Tsukiji.cs @@ -1,72 +1,72 @@ -using GTA; -using GTA.Math; -using System.Collections.Generic; -using System.Linq; -using UniRx; - -namespace Inferno.InfernoScripts.Parupunte.Scripts -{ - [ParupunteConfigAttribute("あぁ^~築地が漁業するんじゃぁ^~", "大漁")] - [ParupunteIsono("つきじ")] - internal class Gochiusa : ParupunteScript - { - private HashSet vehicleList = new HashSet(); - - public Gochiusa(ParupunteCore core, ParupunteConfigElement element) : base(core, element) - { - } - - public override void OnStart() - { - ReduceCounter = new ReduceCounter(15 * 1000); - AddProgressBar(ReduceCounter); - ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd()); - } - - protected override void OnUpdate() - { - var player = core.PlayerPed; - var playerViecle = player.CurrentVehicle; - var targets = core.CachedVehicles - .Where(x => x.IsSafeExist() - && x.IsInRangeOf(player.Position, 30.0f) - && x != playerViecle - ); - - foreach (var v in targets) - { - if (!vehicleList.Contains(v)) - { - vehicleList.Add(v); - StartCoroutine(VehiclePyonPyon(v)); - } - } - } - - private IEnumerable VehiclePyonPyon(Vehicle v) - { - yield return core.CreateRadomWait(); - while (!ReduceCounter.IsCompleted && v.IsSafeExist()) - { - if (!v.IsSafeExist() || !v.IsAlive) yield break; - if (!v.IsInRangeOf(core.PlayerPed.Position, 30.0f)) - { - yield return null; - continue; - } - - var toPlayer = core.PlayerPed.Position - v.Position; - toPlayer.Normalize(); - var power = v.IsInRangeOf(core.PlayerPed.Position, 7) ? 0 : 2; - v.ApplyForce(Vector3.WorldUp * 10 + toPlayer * power, Vector3.RandomXYZ() * 10); - - foreach (var w in WaitForSeconds(0.4f)) - { - v.ApplyForce(Vector3.WorldDown * 5); - - yield return null; - } - } - } - } -} +using GTA; +using GTA.Math; +using System.Collections.Generic; +using System.Linq; +using UniRx; + +namespace Inferno.InfernoScripts.Parupunte.Scripts +{ + [ParupunteConfigAttribute("あぁ^~築地が漁業するんじゃぁ^~", "大漁")] + [ParupunteIsono("つきじ")] + internal class Tsukiji : ParupunteScript + { + private HashSet vehicleList = new HashSet(); + + public Tsukiji(ParupunteCore core, ParupunteConfigElement element) : base(core, element) + { + } + + public override void OnStart() + { + ReduceCounter = new ReduceCounter(15 * 1000); + AddProgressBar(ReduceCounter); + ReduceCounter.OnFinishedAsync.Subscribe(_ => ParupunteEnd()); + } + + protected override void OnUpdate() + { + var player = core.PlayerPed; + var playerViecle = player.CurrentVehicle; + var targets = core.CachedVehicles + .Where(x => x.IsSafeExist() + && x.IsInRangeOf(player.Position, 30.0f) + && x != playerViecle + ); + + foreach (var v in targets) + { + if (!vehicleList.Contains(v)) + { + vehicleList.Add(v); + StartCoroutine(VehiclePyonPyon(v)); + } + } + } + + private IEnumerable VehiclePyonPyon(Vehicle v) + { + yield return core.CreateRadomWait(); + while (!ReduceCounter.IsCompleted && v.IsSafeExist()) + { + if (!v.IsSafeExist() || !v.IsAlive) yield break; + if (!v.IsInRangeOf(core.PlayerPed.Position, 30.0f)) + { + yield return null; + continue; + } + + var toPlayer = core.PlayerPed.Position - v.Position; + toPlayer.Normalize(); + var power = v.IsInRangeOf(core.PlayerPed.Position, 7) ? 0 : 2; + v.ApplyForce(Vector3.WorldUp * 10 + toPlayer * power, Vector3.RandomXYZ() * 10); + + foreach (var w in WaitForSeconds(0.4f)) + { + v.ApplyForce(Vector3.WorldDown * 5); + + yield return null; + } + } + } + } +} diff --git a/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs b/Inferno/InfernoScripts/Parupunte/Scripts/VehicleEnginePowerUp.cs similarity index 76% rename from Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs rename to Inferno/InfernoScripts/Parupunte/Scripts/VehicleEnginePowerUp.cs index fc8809f2..8880e982 100644 --- a/Inferno/InfernoScripts/Parupunte/Scripts/VehicleSpeedUp.cs +++ b/Inferno/InfernoScripts/Parupunte/Scripts/VehicleEnginePowerUp.cs @@ -1,31 +1,31 @@ -using GTA.Math; -using GTA.Native; -using System.Linq; -using UniRx; - -namespace Inferno.InfernoScripts.Parupunte.Scripts -{ - [ParupunteConfigAttribute("エンジンパワーアップ")] - internal class VehicleSpeedUp : ParupunteScript - { - public VehicleSpeedUp(ParupunteCore core, ParupunteConfigElement element) : base(core, element) - { - } - - public override void OnSetUp() - { - } - - public override void OnStart() - { - foreach (var v in core.CachedVehicles.Where( - x => x.IsSafeExist() && x.IsAlive)) - { - v.EnginePowerMultiplier = 200.0f; - v.EngineTorqueMultiplier = 200.0f; - } - - ParupunteEnd(); - } - } -} +using GTA.Math; +using GTA.Native; +using System.Linq; +using UniRx; + +namespace Inferno.InfernoScripts.Parupunte.Scripts +{ + [ParupunteConfigAttribute("エンジンパワーアップ")] + internal class VehicleEnginePowerUp : ParupunteScript + { + public VehicleEnginePowerUp(ParupunteCore core, ParupunteConfigElement element) : base(core, element) + { + } + + public override void OnSetUp() + { + } + + public override void OnStart() + { + foreach (var v in core.CachedVehicles.Where( + x => x.IsSafeExist() && x.IsAlive)) + { + v.EnginePowerMultiplier = 200.0f; + v.EngineTorqueMultiplier = 200.0f; + } + + ParupunteEnd(); + } + } +} From 2838e31dbe03b1498dfc4f59f444410883e1c73a Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Sat, 14 Apr 2018 23:25:58 +0900 Subject: [PATCH 5/6] add Project file --- Inferno/Inferno.csproj | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Inferno/Inferno.csproj b/Inferno/Inferno.csproj index 05801a25..4d390f51 100644 --- a/Inferno/Inferno.csproj +++ b/Inferno/Inferno.csproj @@ -119,13 +119,13 @@ - + - + @@ -142,8 +142,8 @@ - - + + From edd8090cb8a0d8ec76b74f9afd94dba6d70b958c Mon Sep 17 00:00:00 2001 From: TORISOUP Date: Sat, 14 Apr 2018 23:28:26 +0900 Subject: [PATCH 6/6] =?UTF-8?q?Conf=E3=81=8C=E3=81=AA=E3=81=84=E5=A0=B4?= =?UTF-8?q?=E5=90=88=E3=81=AE=E5=87=A6=E7=90=86=E3=82=92=E6=9C=80=E9=81=A9?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs | 2 +- Inferno/InfernoScripts/Parupunte/ParupunteCore.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs b/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs index 80afd5b1..99308a6f 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteConfigElement.cs @@ -28,7 +28,7 @@ public ParupunteConfigElement(string startMessage, string finishMessage) FinishMessage = finishMessage; } - public static ParupunteConfigElement NoUse = new ParupunteConfigElement("", ""); + public static ParupunteConfigElement Default = new ParupunteConfigElement("", ""); } internal class ParupunteConfigDto diff --git a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs index eeec50b2..8754c231 100644 --- a/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs +++ b/Inferno/InfernoScripts/Parupunte/ParupunteCore.cs @@ -252,7 +252,7 @@ private void ParupunteStart(Type script) var conf = _parupunteConfigs.ContainsKey(script.Name) ? _parupunteConfigs[script.Name] - : new ParupunteConfigElement("", ""); + : ParupunteConfigElement.Default; //ThreadPool上で初期化(プチフリ回避) Observable.Start(() => Activator.CreateInstance(script, this, conf) as ParupunteScript, Scheduler.ThreadPool)