├── .gitattributes ├── .gitignore ├── .gitmodules ├── Assembly-CSharp.Base.mm ├── Assembly-CSharp.Base.mm.csproj ├── Content │ ├── etgmod │ │ ├── gui │ │ │ ├── icon_api.png │ │ │ ├── icon_dir.png │ │ │ ├── icon_mod.png │ │ │ └── icon_zip.png │ │ └── logo.png │ ├── gungeon_id_map │ │ ├── enemies.txt │ │ ├── items.txt │ │ └── items │ │ │ └── txt │ ├── sprites │ │ ├── Ammonomicon Encounter Icon Collection │ │ │ └── gshbd_fire_002.png │ │ ├── Foyer_Collection │ │ │ └── top_floor_001.png │ │ ├── IntroSequenceCollection_01 │ │ │ ├── logo_logo_pound_006.png │ │ │ ├── logo_logo_pound_007.png │ │ │ ├── logo_logo_pound_008.png │ │ │ ├── logo_logo_pound_009.png │ │ │ ├── logo_logo_pound_010.png │ │ │ ├── logo_logo_pound_011.png │ │ │ ├── logo_logo_pound_012.png │ │ │ ├── logo_roguego_014.png │ │ │ ├── logo_roguego_015.png │ │ │ ├── logo_roguego_016.png │ │ │ ├── logo_roguego_017.png │ │ │ ├── logo_roguego_018.png │ │ │ ├── logo_roguego_019.png │ │ │ └── logo_roguego_020.png │ │ └── WeaponCollection │ │ │ ├── gshbd_fire_001.json │ │ │ ├── gshbd_fire_001.png │ │ │ ├── gshbd_fire_002.json │ │ │ ├── gshbd_fire_002.png │ │ │ ├── gshbd_fire_003.json │ │ │ ├── gshbd_fire_003.png │ │ │ ├── gshbd_fire_004.json │ │ │ ├── gshbd_fire_004.png │ │ │ ├── gshbd_idle_001.json │ │ │ ├── gshbd_idle_001.png │ │ │ ├── gshbd_idle_002.json │ │ │ ├── gshbd_idle_002.png │ │ │ ├── gshbd_idle_003.json │ │ │ ├── gshbd_idle_003.png │ │ │ ├── gshbd_idle_004.json │ │ │ ├── gshbd_idle_004.png │ │ │ ├── gshbd_intro_001.json │ │ │ ├── gshbd_intro_001.png │ │ │ ├── gshbd_intro_002.json │ │ │ ├── gshbd_intro_002.png │ │ │ ├── gshbd_intro_003.json │ │ │ └── gshbd_intro_003.png │ └── test │ │ └── texture.png ├── GlobalSuppressions.cs ├── Properties │ └── AssemblyInfo.cs └── src │ ├── API │ └── Gungeon │ │ ├── AnimLoader │ │ ├── AnimLoader.cs │ │ └── YAMLMappings.cs │ │ ├── CustomGun.cs │ │ ├── Gungeon.cs │ │ └── Player.cs │ ├── AssetMetadata.cs │ ├── Core │ ├── AIActor.cs │ ├── Assets │ │ ├── Assets.cs │ │ ├── Data.cs │ │ ├── Dump.cs │ │ └── Protocol.cs │ ├── Chest.cs │ ├── Databases.cs │ ├── Databases │ │ ├── ItemDB.cs │ │ └── StringDB.cs │ ├── ETGMod.cs │ ├── Extensions │ │ ├── Extensions.cs │ │ └── Gun.cs │ ├── Gun.cs │ ├── GunBehaviour.cs │ ├── IDPool.cs │ ├── Objects.cs │ ├── Platform.cs │ ├── Player.cs │ ├── PlayerBehaviour.cs │ ├── RuntimeAtlas.cs │ └── Time.cs │ ├── ETGGUI │ ├── AutocompletionSettings.cs │ ├── ConsoleCommand │ │ ├── ConsoleCommand.cs │ │ ├── ConsoleCommandGroup.cs │ │ └── ConsoleCommandUnit.cs │ ├── ETGDamageIndicatorGUI.cs │ ├── ETGModConsole.cs │ ├── ETGModDebugLogMenu.cs │ ├── ETGModGUI.cs │ ├── ETGModInspector.cs │ ├── ETGModLoaderMenu.cs │ ├── FontConverter.cs │ ├── Hierarchy │ │ ├── ETGHierarchy.cs │ │ └── HierarchyComponent.cs │ ├── IETGModMenu.cs │ ├── Inspector │ │ ├── Components │ │ │ └── GenericComponentInspector.cs │ │ └── Properties │ │ │ ├── BoolPropertyInspector.cs │ │ │ ├── FloatPropertyInspector.cs │ │ │ ├── IBasePropertyInspector.cs │ │ │ ├── StringPropertyInspector.cs │ │ │ └── VectorPropertyInspector.cs │ └── Repo │ │ ├── ModRepo.cs │ │ └── RemoteMod.cs │ ├── ETGModMainBehaviour.cs │ ├── ETGModRelinker.cs │ ├── ETGModule.cs │ ├── Guns │ ├── BalloonGunController.cs │ └── TestGunController.cs │ ├── JSON │ ├── JSONHelper.Common.cs │ ├── JSONHelper.META.cs │ ├── JSONHelper.Read.cs │ ├── JSONHelper.Write.cs │ ├── JSONMappedRule.cs │ ├── JSONRule.cs │ ├── JsonHelperReader.cs │ ├── JsonHelperWriter.cs │ └── Rules │ │ ├── JSONAttachPointDataRule.cs │ │ ├── JSONBagelColliderRule.cs │ │ ├── JSONComponentRule.cs │ │ ├── JSONDictionaryEntryRule.cs │ │ ├── JSONGameObjectRule.cs │ │ ├── JSONMaterialRule.cs │ │ ├── JSONOverridableBoolRule.cs │ │ ├── JSONScriptableObjectRule.cs │ │ ├── JSONTextAssetRule.cs │ │ ├── JSONTextureRule.cs │ │ ├── JSONTransformRule.cs │ │ ├── JSONValueTypeRule.cs │ │ └── JSONVectorQuaternionRule.cs │ ├── LimitedStream.cs │ ├── MonoMod │ ├── MonoModAdded.cs │ ├── MonoModBlacklisted.cs │ ├── MonoModConstructor.cs │ ├── MonoModEnumReplace.cs │ ├── MonoModHook.cs │ ├── MonoModIfFlag.cs │ ├── MonoModIgnore.cs │ ├── MonoModInline.cs │ ├── MonoModLinkTo.cs │ ├── MonoModNoNew.cs │ ├── MonoModOnPlatform.cs │ ├── MonoModOriginal.cs │ ├── MonoModOriginalName.cs │ ├── MonoModRemove.cs │ ├── MonoModReplace.cs │ ├── Platform.cs │ └── PlatformHelper.cs │ ├── MonoModRules.cs │ ├── Multiplayer │ ├── MultiplayerGUI.cs │ ├── MultiplayerManager.cs │ ├── RPC │ │ ├── CustomRPC.cs │ │ └── RPCSerializer.cs │ └── Steam │ │ ├── LobbyHelper.cs │ │ ├── MPDataHelper.cs │ │ └── SteamHelper.cs │ ├── ObjectDumper.cs │ ├── PInvokeHelper.cs │ ├── Patches │ ├── patch_AIActor.cs │ ├── patch_BossCardUIController.cs │ ├── patch_BraveTime.cs │ ├── patch_CharacterSelectController.cs │ ├── patch_Chest.cs │ ├── patch_Dungeon.cs │ ├── patch_GameManager.cs │ ├── patch_Gun.cs │ ├── patch_HealthHaver.cs │ ├── patch_MainMenuFoyerController.cs │ ├── patch_PlayerConsumables.cs │ ├── patch_PlayerController.cs │ ├── patch_SaveManager.cs │ ├── patch_SteamManager.cs │ └── patch_StringTableManager.cs │ ├── ReflectionHelper.cs │ └── SGUI │ ├── Animations │ ├── SAnimationSequence.cs │ ├── SEasings.cs │ ├── SFadeAnimation.cs │ ├── SFadeInAnimation.cs │ ├── SFadeOutAnimation.cs │ ├── SFadeOutShrinkSequence.cs │ └── SShrinkAnimation.cs │ ├── Backends │ └── SGUIIMBackend.cs │ ├── DFEXT │ └── SGUIDFInput.cs │ ├── EMouseStatus.cs │ ├── Elements │ ├── SButton.cs │ ├── SGroup.cs │ ├── SImage.cs │ ├── SLabel.cs │ ├── SPreloader.cs │ ├── SRect.cs │ ├── STextField.cs │ └── SWindowTitleBar.cs │ ├── ISGUIBackend.cs │ ├── Modifiers │ ├── SInGameModifier.cs │ └── SRandomLabelModifier.cs │ ├── SAnimation.cs │ ├── SElement.cs │ ├── SGUIRoot.cs │ └── SModifier.cs ├── CONTRIBUTING.md ├── ETGMod.sln ├── MonoDebugDummy ├── MonoDebugDummy.csproj ├── Program.cs └── Properties │ └── AssemblyInfo.cs ├── README.md ├── STYLE.md ├── UnityEngine.Base.mm ├── Properties │ └── AssemblyInfo.cs ├── UnityEngine.CoreModule.Base.mm.csproj └── src │ ├── ETGModInstallerRenames.cs │ ├── ETGModUnityEngineHooks.cs │ ├── MonoDebug.cs │ ├── MonoMod │ ├── MonoModConstructor.cs │ ├── MonoModIgnore.cs │ ├── MonoModLinkTo.cs │ ├── MonoModOriginal.cs │ └── MonoModOriginalName.cs │ ├── patch_ClassLibraryInitializer.cs │ ├── patch_GameObject.cs │ ├── patch_Object.cs │ ├── patch_Resources.cs │ └── patch_TextAsset.cs └── libs ├── Assembly-CSharp-firstpass.dll ├── Assembly-CSharp.dll ├── Eluant ├── .gitignore ├── Eluant.Tests │ ├── Eluant.Tests.csproj │ ├── Functions.cs │ ├── MemoryConstraint.cs │ ├── Performance.cs │ ├── Runtime.cs │ ├── Tables.cs │ ├── TransparentBinding.cs │ ├── Types.cs │ └── packages.config ├── Eluant.sln ├── Eluant │ ├── AssemblyInfo.cs │ ├── BindingSupport.lua │ ├── Eluant.csproj │ ├── IClrObject.cs │ ├── LuaApi.cs │ ├── LuaBoolean.cs │ ├── LuaClrObjectReference.cs │ ├── LuaClrObjectValue.cs │ ├── LuaClrTypeObject.cs │ ├── LuaCustomClrObject.cs │ ├── LuaException.cs │ ├── LuaFunction.cs │ ├── LuaGlobalsTable.cs │ ├── LuaLightUserdata.cs │ ├── LuaNil.cs │ ├── LuaNumber.cs │ ├── LuaNumberOperators.cs │ ├── LuaNumberOperators.tt │ ├── LuaOpaqueClrObject.cs │ ├── LuaReference.cs │ ├── LuaRuntime.cs │ ├── LuaString.cs │ ├── LuaTable.cs │ ├── LuaThread.cs │ ├── LuaTransparentClrObject.cs │ ├── LuaUserdata.cs │ ├── LuaValue.cs │ ├── LuaValueExtensions.cs │ ├── LuaValueType.cs │ ├── LuaVararg.cs │ ├── LuaWeakReference.cs │ ├── MemoryConstrainedLuaRuntime.cs │ ├── NET40Shim │ │ ├── ConcurrentQueue.cs │ │ └── Tuple.cs │ ├── ObjectBinding │ │ ├── BasicBindingSecurityPolicy.cs │ │ ├── BasicLuaBinder.cs │ │ ├── Bindings.cs │ │ ├── CombinedBindingSecurityPolicy.cs │ │ ├── IBindingContext.cs │ │ ├── IBindingSecurityPolicy.cs │ │ ├── ILuaBinder.cs │ │ ├── LuaMemberAttribute.cs │ │ ├── MemberSecurityPolicy.cs │ │ ├── MetamethodAttribute.cs │ │ └── ReflectionLuaBinder.cs │ └── Scripts.cs ├── LICENSE.md └── README.md ├── Ionic.Zip.dll ├── Logger ├── .gitignore ├── Logger.cs ├── Logger.csproj ├── Properties │ └── AssemblyInfo.cs └── README.md ├── Mono.Cecil.dll ├── MonoMod ├── .gitignore ├── LICENSE ├── MonoMod.csproj ├── MonoMod.sln ├── MonoMod │ ├── DebugIL │ │ ├── DebugILGenerator.cs │ │ └── DebugILGeneratorExt.cs │ ├── DebugSymbolFormat.cs │ ├── Detour │ │ ├── MMDetourer.cs │ │ ├── MMDetourerLevel.cs │ │ └── RuntimeDetour.cs │ ├── Helpers │ │ ├── FastDictionary.cs │ │ ├── FastDictionary`3.cs │ │ ├── IntDictionary.cs │ │ ├── LongDictionary.cs │ │ ├── NET40Shim.cs │ │ └── StringInjectExtension.cs │ ├── InlineRT │ │ ├── MMILAccessParser.cs │ │ ├── MMILExec.cs │ │ ├── MMILProxyManager.cs │ │ ├── MMILRT.cs │ │ └── ReflectionHelper.cs │ ├── Modifiers │ │ ├── MonoModAdded.cs │ │ ├── MonoModConstructor.cs │ │ ├── MonoModCustomAttribute.cs │ │ ├── MonoModEnumReplace.cs │ │ ├── MonoModHook.cs │ │ ├── MonoModIfFlag.cs │ │ ├── MonoModIgnore.cs │ │ ├── MonoModInline.Access.cs │ │ ├── MonoModInline.cs │ │ ├── MonoModLinkTo.cs │ │ ├── MonoModNoNew.cs │ │ ├── MonoModOnPlatform.cs │ │ ├── MonoModOriginal.cs │ │ ├── MonoModOriginalName.cs │ │ ├── MonoModPatch.cs │ │ ├── MonoModPublic.cs │ │ ├── MonoModRemove.cs │ │ ├── MonoModReplace.cs │ │ ├── MonoModTargetModule.cs │ │ ├── Platform.cs │ │ ├── PlatformHelper.cs │ │ └── TemporaryMMILAccessExample.cs │ ├── MonoModExt.cs │ ├── MonoModder.cs │ ├── Program.cs │ └── QuickDebugTest.cs ├── Properties │ ├── AssemblyInfo.cs │ └── AssemblyVersionIdAttribute.cs ├── README.md └── packages.config ├── Newtonsoft.Json.dll ├── README.md ├── UnityEngine.CoreModule.dll ├── UnityEngine.IMGUIModule.dll ├── UnityEngine.ImageConversionModule.dll ├── UnityEngine.TextRenderingModule.dll └── zipstorer ├── .gitignore ├── LICENSE.md ├── README.md ├── Zipstorer.nuspec ├── demo ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── TestForm.Designer.cs ├── TestForm.cs ├── TestForm.resx ├── ZipStorerDoc.xml ├── ZipStorerTest.sln ├── app.config └── demo.csproj ├── net20 ├── Properties │ └── AssemblyInfo.cs └── Zipstorer.csproj ├── net45 ├── Properties │ └── AssemblyInfo.cs └── Zipstorer.csproj ├── netstandard └── netstandard.csproj ├── src └── ZipStorer.cs ├── zipstorer.sln └── zipstorer.vb /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "libs/YamlDotNet"] 2 | path = libs/YamlDotNet 3 | url = https://github.com/aaubry/YamlDotNet 4 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_api.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_dir.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_dir.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_mod.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_mod.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_zip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/etgmod/gui/icon_zip.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/etgmod/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/etgmod/logo.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/gungeon_id_map/items/txt: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/Ammonomicon Encounter Icon Collection/gshbd_fire_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/Ammonomicon Encounter Icon Collection/gshbd_fire_002.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/Foyer_Collection/top_floor_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/Foyer_Collection/top_floor_001.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_006.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_006.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_007.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_007.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_008.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_008.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_009.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_009.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_010.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_010.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_011.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_011.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_012.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_logo_pound_012.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_014.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_014.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_015.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_015.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_016.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_016.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_017.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_017.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_018.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_018.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_019.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_019.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_020.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/IntroSequenceCollection_01/logo_roguego_020.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_001.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 10, 6 | "height": 24, 7 | "flip": 1, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.8125, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.625, 36 | "y": 0.125, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_001.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_002.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 10, 6 | "height": 24, 7 | "flip": 1, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.8125, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.625, 36 | "y": 0.125, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_002.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_003.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 10, 6 | "height": 24, 7 | "flip": 1, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.8125, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.625, 36 | "y": 0.125, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_003.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_004.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 10, 6 | "height": 24, 7 | "flip": 1, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.8125, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.625, 36 | "y": 0.125, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_fire_004.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_001.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_001.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_002.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_002.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_003.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_003.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_004.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_004.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_idle_004.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_001.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_001.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_001.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_002.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_002.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_002.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_003.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": null, 3 | "x": 0, 4 | "y": 0, 5 | "width": 26, 6 | "height": 10, 7 | "flip": 0, 8 | "attachPoints": [ 9 | { 10 | ".": "arraytype", 11 | "name": "array", 12 | "size": 4 13 | }, 14 | { 15 | "name": "PrimaryHand", 16 | "position": { 17 | "x": 0.125, 18 | "y": 0.25, 19 | "z": 0.0 20 | }, 21 | "angle": 0.0 22 | }, 23 | { 24 | "name": "SecondaryHand", 25 | "position": { 26 | "x": 0.875, 27 | "y": 0.25, 28 | "z": 0.0 29 | }, 30 | "angle": 0.0 31 | }, 32 | { 33 | "name": "Clip", 34 | "position": { 35 | "x": 0.6875, 36 | "y": 0.0625, 37 | "z": 0.0 38 | }, 39 | "angle": 0.0 40 | }, 41 | { 42 | "name": "Casing", 43 | "position": { 44 | "x": 0.5625, 45 | "y": 0.375, 46 | "z": 0.0 47 | }, 48 | "angle": 0.0 49 | } 50 | ] 51 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_003.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/sprites/WeaponCollection/gshbd_intro_003.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Content/test/texture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/Assembly-CSharp.Base.mm/Content/test/texture.png -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/GlobalSuppressions.cs: -------------------------------------------------------------------------------- 1 |  2 | // This file is used by Code Analysis to maintain SuppressMessage 3 | // attributes that are applied to this project. 4 | // Project-level suppressions either have no target or are given 5 | // a specific target and scoped to a namespace, type, member, etc. 6 | 7 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0026:Possible unassigned object created by 'new'", Justification = "SGUI abuses this behaviour to add new children to the main root.")] 8 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0021:Warns about calls to virtual member functions occuring in the constructor", Justification = "Desired behaviour. Also, not always calls, but sometimes delegate +/-/= operations.")] 9 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Language Usage Opportunities", "RECS0091:Use 'var' keyword when possible", Justification = "This is not JavaScript.")] 10 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Redundancies in Symbol Declarations", "RECS0154:Parameter is never used", Justification = "When working with delegates, this is bound to happen.")] 11 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Potential Code Quality Issues", "RECS0020:Delegate subtraction has unpredictable result", Justification = "The result is predictable, even acknowledged by JetBrain themselves. It doesn't do what the user may expect when working in a very weird manner != unpredictable.")] 12 | 13 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("Assembly-CSharp.Base.mm")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Assembly-CSharp.Base.mm")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("363a46e8-d9dd-4f31-9307-73b664e71d45")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/API/Gungeon/Gungeon.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | namespace Gungeon { 5 | public static partial class Game { 6 | public static IDPool Items = new IDPool(); 7 | public static IDPool Enemies = new IDPool(); 8 | 9 | private static Assembly _Assembly = Assembly.GetExecutingAssembly(); 10 | 11 | private static void _SetupPool(string map_file_name, IDPool pool, Action add_method) { 12 | using (Stream stream = _Assembly.GetManifestResourceStream($"Content/gungeon_id_map/{map_file_name}")) { 13 | using (StreamReader reader = new StreamReader(stream)) { 14 | string line; 15 | while (true) { 16 | line = reader.ReadLine(); 17 | if (line == null) break; 18 | Console.WriteLine($"STARTS WITH HASH? {line.StartsWithInvariant("#")}"); 19 | if (line.StartsWithInvariant("#")) continue; 20 | string[] split = line.Split(' '); 21 | add_method.Invoke(split[0], split[1]); 22 | } 23 | } 24 | } 25 | pool.LockNamespace("gungeon"); 26 | } 27 | 28 | public static void Initialize() { 29 | _SetupPool("items.txt", Items, (string real, string mapped) => { 30 | int id; 31 | if (!int.TryParse(real, out id)) throw new Exception("Failed parsing item id map"); 32 | Items.Add(mapped, PickupObjectDatabase.GetById(id)); // adding resolves the id (nonamespace becomes gungeon:nonamespace) 33 | }); 34 | _SetupPool("enemies.txt", Enemies, (string real, string mapped) => { 35 | Enemies.Add(mapped, EnemyDatabase.GetOrLoadByGuid(real)); 36 | }); 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/API/Gungeon/Player.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace Gungeon { 5 | public static partial class Game { 6 | public static PlayerController PrimaryPlayer { 7 | get { 8 | return GameManager.Instance.PrimaryPlayer; 9 | } 10 | } 11 | public static PlayerController CoopPlayer { 12 | get { 13 | return GameManager.Instance.SecondaryPlayer; 14 | } 15 | } 16 | 17 | public static bool? InfiniteKeys; 18 | public static string PrimaryPlayerReplacement; 19 | public static string CoopPlayerReplacement; 20 | } 21 | } 22 | 23 | public static class PlayerControllerExt { 24 | public static bool IsPlaying(this PlayerController player) { 25 | return GameManager.Instance.PrimaryPlayer == player || GameManager.Instance.SecondaryPlayer == player; 26 | } 27 | public static bool GiveItem(this PlayerController player, string id) { 28 | if (!player.IsPlaying()) throw new Exception("Tried to give item to inactive player controller"); 29 | 30 | LootEngine.TryGivePrefabToPlayer(Gungeon.Game.Items[id].gameObject, player, false); 31 | return true; 32 | } 33 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/AIActor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public static partial class ETGMod { 4 | 5 | /// 6 | /// ETGMod AIActor configuration. 7 | /// 8 | public static class AIActor { 9 | public static Action OnPreStart; 10 | public static Action OnPostStart; 11 | public static Action OnBlackPhantomnessCheck; 12 | } 13 | 14 | // Extension methods 15 | 16 | public static void BecomeBlackPhantom(this global::AIActor actor) { 17 | if (actor.IsBlackPhantom) return; 18 | ((patch_AIActor) actor).INTERNAL_BecomeBlackPhantom(); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Assets/Protocol.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | public static partial class ETGMod { 3 | public static partial class Assets { 4 | public abstract class Protocol { 5 | public Protocol(string prefix) { 6 | Prefix = prefix; 7 | } 8 | 9 | public string Prefix; 10 | 11 | public UnityEngine.Object Get(string path) { 12 | if (!path.StartsWithInvariant(Prefix)) return null; 13 | return GetObject(path.Substring(Prefix.Length)); 14 | } 15 | internal abstract UnityEngine.Object GetObject(string path); 16 | } 17 | 18 | public class ItemProtocol : Protocol { 19 | public ItemProtocol() : base("ITEMDB:") {} 20 | internal override UnityEngine.Object GetObject(string path) { 21 | var moditem = Databases.Items.GetModItemByName(path); 22 | if (moditem == null) { 23 | return null; 24 | } 25 | return UnityEngine.Object.Instantiate(moditem); 26 | } 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Chest.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public static partial class ETGMod { 4 | 5 | /// 6 | /// ETGMod Chest configuration. 7 | /// 8 | public static class Chest { 9 | public static Action OnPostSpawn; 10 | public delegate bool DOnPreOpen(bool shouldOpen, global::Chest chest, PlayerController player); 11 | public static DOnPreOpen OnPreOpen; 12 | public static Action OnPostOpen; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Databases.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | 5 | public static partial class ETGMod { 6 | 7 | /// 8 | /// ETGMod database configuration. 9 | /// 10 | public static class Databases { 11 | public readonly static ItemDB Items = new ItemDB(); 12 | public readonly static StringDB Strings = new StringDB(); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Gun.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public static partial class ETGMod { 4 | 5 | /// 6 | /// ETGMod Gun configuration. 7 | /// 8 | public static class Gun { 9 | public static Action OnPostFired; 10 | public static Action OnFinishAttack; 11 | public static Action OnInit; 12 | } 13 | 14 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/GunBehaviour.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public class GunBehaviour : MonoBehaviour { 4 | 5 | protected Gun gun; 6 | 7 | public void Start() { 8 | gun = GetComponent(); 9 | gun.OnInitializedWithOwner += OnInitializedWithOwner; 10 | gun.PostProcessProjectile += PostProcessProjectile; 11 | gun.OnDropped += OnDropped; 12 | gun.OnAutoReload += OnAutoReload; 13 | gun.OnReloadPressed += OnReloadPressed; 14 | gun.OnFinishAttack += OnFinishAttack; 15 | gun.OnPostFired += OnPostFired; 16 | gun.OnAmmoChanged += OnAmmoChanged; 17 | //gun.OnPreFireProjectileModifier += OnPreFireProjectileModifier; 18 | } 19 | 20 | public virtual void OnInitializedWithOwner(GameActor actor) { 21 | } 22 | 23 | public virtual void PostProcessProjectile(Projectile projectile) { 24 | } 25 | 26 | public virtual void OnDropped() { 27 | } 28 | 29 | public virtual void OnAutoReload(PlayerController player, Gun gun) { 30 | } 31 | 32 | public virtual void OnReloadPressed(PlayerController player, Gun gun, bool bSOMETHING) { 33 | } 34 | 35 | public virtual void OnFinishAttack(PlayerController player, Gun gun) { 36 | } 37 | 38 | public virtual void OnPostFired(PlayerController player, Gun gun) { 39 | } 40 | 41 | public virtual void OnAmmoChanged(PlayerController player, Gun gun) { 42 | } 43 | 44 | public virtual Projectile OnPreFireProjectileModifier(Gun gun, Projectile projectile) { 45 | return projectile.EnabledClonedPrefab(); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Platform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public static partial class ETGMod { 4 | // Platform-specifics 5 | public static class Platform { 6 | public static bool DisableSteam = false; 7 | } 8 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Player.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | public static partial class ETGMod { 4 | 5 | /// 6 | /// ETGMod player configuration. 7 | /// 8 | public static class Player { 9 | public static bool? InfiniteKeys; 10 | public static string QuickstartReplacement; 11 | public static string PlayerReplacement; 12 | public static string CoopReplacement; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/PlayerBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | public class PlayerBehaviour : MonoBehaviour { 4 | protected PlayerController controller; 5 | public void Awake() { 6 | controller = gameObject.GetComponent(); 7 | if (controller == null) { 8 | Debug.Log("Couldn't find the PlayerController component... this is gonna end badly."); 9 | return; 10 | } 11 | } 12 | public virtual void PreInitialize() {} 13 | public virtual void Initialize() {} 14 | } 15 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Core/Time.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | public static partial class ETGMod { 5 | 6 | /// 7 | /// ETGMod Time configuration. 8 | /// 9 | public static class Time { 10 | 11 | public static void SetTimeScaleModifierIsPost(bool isPost, GameObject source) { 12 | patch_BraveTime.SetTimeScaleModifierIsPost(isPost, source); 13 | } 14 | 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/AutocompletionSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class AutocompletionSettings { 4 | public Func Match; 5 | public AutocompletionSettings (Func match) { 6 | Match = (Func) delegate(int index, string key) { 7 | if (index == 0) { 8 | return match(key); 9 | } 10 | return null; 11 | }; 12 | } 13 | 14 | public AutocompletionSettings(Func match) { 15 | Match = match; 16 | } 17 | 18 | public static bool MatchContains = true; 19 | } 20 | 21 | public static class StringAutocompletionExtensions { 22 | public static bool AutocompletionMatch(this string text, string match) { 23 | if (AutocompletionSettings.MatchContains) { 24 | return text.Contains (match); 25 | } else { 26 | return text.StartsWith (match); 27 | } 28 | } 29 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/ConsoleCommand/ConsoleCommand.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class ConsoleCommand : ConsoleCommandUnit { 4 | 5 | private string[] _EmptyStringArray = {}; 6 | 7 | public ConsoleCommand(Action cmdref, AutocompletionSettings autocompletion) { 8 | CommandReference = cmdref; 9 | Autocompletion = autocompletion; 10 | } 11 | 12 | public ConsoleCommand(Action cmdref) { 13 | CommandReference = cmdref; 14 | Autocompletion = new AutocompletionSettings ((string input) => _EmptyStringArray); 15 | } 16 | 17 | } 18 | 19 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/ConsoleCommand/ConsoleCommandUnit.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class ConsoleCommandUnit { 4 | public string Name; 5 | 6 | public Action CommandReference; 7 | 8 | public void RunCommand(string[] args) { 9 | CommandReference(args); 10 | } 11 | 12 | public AutocompletionSettings Autocompletion; 13 | 14 | public ConsoleCommandUnit () { 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/FontConverter.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using UnityEngine; 6 | 7 | namespace ETGGUI { 8 | public static class FontConverter { 9 | 10 | public static Font GetFontFromdfFont(dfFont font, int scale = 1) { 11 | Font f = new Font(font.name); 12 | 13 | f.material = new Material(GUI.skin.font.material); 14 | f.material.mainTexture = font.Texture; 15 | f.material.mainTexture.wrapMode = TextureWrapMode.Repeat; 16 | 17 | CharacterInfo[] chars = new CharacterInfo[font.Glyphs.Count]; 18 | 19 | for (int i = 0; i < chars.Length; i++) { 20 | CharacterInfo inf = new CharacterInfo(); 21 | dfFont.GlyphDefinition glyphDefinition = font.Glyphs[i]; 22 | dfAtlas.ItemInfo itemInfo = font.Atlas[font.Sprite]; 23 | 24 | inf.glyphWidth = glyphDefinition.width * scale; 25 | inf.glyphHeight = glyphDefinition.height * scale; 26 | inf.size = 0; // Must be 0 27 | 28 | inf.index = glyphDefinition.id; 29 | 30 | float left = itemInfo.region.x + glyphDefinition.x * f.material.mainTexture.texelSize.x; 31 | float right = left + glyphDefinition.width * f.material.mainTexture.texelSize.x; 32 | float top = itemInfo.region.yMax - glyphDefinition.y * f.material.mainTexture.texelSize.y; 33 | float bottom = top - glyphDefinition.height * f.material.mainTexture.texelSize.y; 34 | 35 | inf.uvTopLeft = new Vector2(left, top); 36 | inf.uvTopRight = new Vector2(right, top); 37 | inf.uvBottomLeft = new Vector2(left, bottom); 38 | inf.uvBottomRight = new Vector2(right, bottom); 39 | 40 | inf.advance = glyphDefinition.xadvance * scale; 41 | 42 | inf.minY = scale * -glyphDefinition.height / 2; 43 | inf.maxY = scale * glyphDefinition.height / 2; 44 | 45 | chars[i] = inf; 46 | } 47 | 48 | f.characterInfo = chars; 49 | 50 | return f; 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Hierarchy/HierarchyComponent.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace ETGGUI.Hierarchy { 5 | public class HierarchyComponent { 6 | public GameObject Reference; 7 | public bool ShowChildren; 8 | 9 | public Dictionary Children = new Dictionary(); 10 | 11 | public HierarchyComponent(GameObject _ref, bool show) { 12 | Reference = _ref; 13 | ShowChildren = show; 14 | } 15 | 16 | public static int SpaceAmount = 0; 17 | 18 | public void OnGUI() { 19 | if (Reference==null) 20 | return; 21 | 22 | SpaceAmount++; 23 | 24 | GUILayout.BeginVertical(); 25 | if (ShowChildren) { 26 | foreach (HierarchyComponent c in Children.Values) { 27 | if (c.Reference==null) 28 | continue; 29 | GUILayout.BeginHorizontal(); 30 | GUILayout.Space(SpaceAmount * 20f); 31 | bool isButton = GUILayout.Button(c.Reference.name); 32 | c.ShowChildren=isButton ? !c.ShowChildren : c.ShowChildren; 33 | if (isButton) 34 | ETGModInspector.targetObject=c.Reference; 35 | GUILayout.EndHorizontal(); 36 | c.OnGUI(); 37 | } 38 | } 39 | GUILayout.EndVertical(); 40 | 41 | SpaceAmount--; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/IETGModMenu.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using UnityEngine; 5 | using System.Collections.Generic; 6 | using System; 7 | using SGUI; 8 | 9 | public interface IETGModMenu { 10 | 11 | void Start(); 12 | void Update(); 13 | void OnGUI(); 14 | void OnDestroy(); 15 | void OnOpen(); 16 | void OnClose(); 17 | 18 | } 19 | 20 | public abstract class ETGModMenu : IETGModMenu { 21 | public SGroup GUI { get; protected set; } 22 | public abstract void Start(); 23 | public virtual void Update() { } 24 | public virtual void OnGUI() { } 25 | public virtual void OnDestroy() { } 26 | public virtual void OnOpen() { 27 | if (GUI != null) { 28 | GUI.Visible = true; 29 | } 30 | } 31 | public virtual void OnClose() { 32 | if (GUI != null) { 33 | GUI.Visible = false; 34 | } 35 | } 36 | } 37 | 38 | public sealed class ETGModNullMenu : IETGModMenu { 39 | public void Start() { } 40 | public void Update() { } 41 | public void OnGUI() { } 42 | public void OnDestroy() { } 43 | public void OnOpen() { } 44 | public void OnClose() { } 45 | } 46 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Inspector/Properties/BoolPropertyInspector.cs: -------------------------------------------------------------------------------- 1 | using ETGGUI.Inspector; 2 | using System.Reflection; 3 | using UnityEngine; 4 | 5 | public class BoolPropertyInspector : IBasePropertyInspector { 6 | public object OnGUI(PropertyInfo info, object input) { 7 | bool casted = (bool) input; 8 | 9 | GUILayout.BeginHorizontal(); 10 | GUILayout.Label(info.Name, GUILayout.Width(100f)); 11 | casted = GUILayout.Toggle(casted, ""); 12 | GUILayout.EndHorizontal(); 13 | 14 | return casted; 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Inspector/Properties/FloatPropertyInspector.cs: -------------------------------------------------------------------------------- 1 | using ETGGUI.Inspector; 2 | using System.Reflection; 3 | using UnityEngine; 4 | 5 | public class FloatPropertyInspector : IBasePropertyInspector { 6 | public object OnGUI(PropertyInfo info, object input) { 7 | GUILayout.BeginHorizontal(); 8 | GUILayout.Label(info.Name, GUILayout.Width(100f)); 9 | if (input != null) { 10 | input = TextFieldFloat((float) input); 11 | } 12 | GUILayout.EndHorizontal(); 13 | return input; 14 | } 15 | 16 | #pragma warning disable RECS0018 17 | public static void TextFieldFloat(ref float f) { 18 | f = TextFieldFloat(f); 19 | } 20 | public static float TextFieldFloat(float f) { 21 | string s = f.ToString(); 22 | if (f == 0f) { 23 | s = ""; 24 | } 25 | if (f.IsNegativeZero()) { 26 | s = "-"; 27 | } 28 | s = GUILayout.TextField(s); 29 | float result; 30 | if (!float.TryParse(s, out result)) { 31 | return s.Length != 0 && s[0] == '-' ? -0f : 0f; 32 | } 33 | return result; 34 | } 35 | #pragma warning restore RECS0018 36 | } 37 | 38 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Inspector/Properties/IBasePropertyInspector.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | namespace ETGGUI.Inspector { 4 | public interface IBasePropertyInspector { 5 | 6 | object OnGUI(PropertyInfo info, object input); 7 | 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Inspector/Properties/StringPropertyInspector.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using UnityEngine; 3 | 4 | namespace ETGGUI.Inspector { 5 | public class StringPropertyInspector : IBasePropertyInspector { 6 | 7 | public object OnGUI(PropertyInfo info, object input) { 8 | string str = (string) input; 9 | 10 | if (str.Contains("\n")) { 11 | GUILayout.Label(info.Name); 12 | str = GUILayout.TextArea(str); 13 | } else { 14 | GUILayout.BeginHorizontal(); 15 | GUILayout.Label(info.Name); 16 | str = GUILayout.TextField(str); 17 | GUILayout.EndHorizontal(); 18 | } 19 | 20 | return str; 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Inspector/Properties/VectorPropertyInspector.cs: -------------------------------------------------------------------------------- 1 | using ETGGUI.Inspector; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using UnityEngine; 7 | using System.Reflection; 8 | 9 | public class VectorPropertyInspector : IBasePropertyInspector { 10 | 11 | private readonly static Type t_v2 = typeof(Vector2); 12 | private readonly static Type t_v3 = typeof(Vector3); 13 | private readonly static Type t_v4 = typeof(Vector4); 14 | 15 | public object OnGUI(PropertyInfo info, object input) { 16 | Type inputType = input.GetType(); 17 | 18 | if (inputType == t_v2) 19 | return DrawVector2((Vector2) input, info.Name); 20 | 21 | if (inputType == t_v3) 22 | return DrawVector3((Vector3) input, info.Name); 23 | 24 | if (inputType == t_v4) 25 | return DrawVector4((Vector4) input, info.Name); 26 | 27 | return input; 28 | } 29 | 30 | public static Vector2 DrawVector2(Vector2 input,string name) { 31 | GUILayout.BeginHorizontal(); 32 | GUILayout.Label(name, GUILayout.Width(100f)); 33 | for (int i = 0; i < 2; i++) { 34 | input[i] = FloatPropertyInspector.TextFieldFloat(input[i]); 35 | } 36 | GUILayout.EndHorizontal(); 37 | return input; 38 | } 39 | 40 | public static Vector3 DrawVector3(Vector3 input, string name) { 41 | GUILayout.BeginHorizontal(); 42 | GUILayout.Label(name, GUILayout.Width(100f)); 43 | for (int i = 0; i < 3; i++) { 44 | input[i] = FloatPropertyInspector.TextFieldFloat(input[i]); 45 | } 46 | GUILayout.EndHorizontal(); 47 | return input; 48 | } 49 | 50 | public static Vector4 DrawVector4(Vector4 input, string name) { 51 | GUILayout.BeginHorizontal(); 52 | GUILayout.Label(name, GUILayout.Width(100f)); 53 | for (int i = 0; i < 4; i++) { 54 | input[i] = FloatPropertyInspector.TextFieldFloat(input[i]); 55 | } 56 | GUILayout.EndHorizontal(); 57 | return input; 58 | } 59 | 60 | } 61 | 62 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGGUI/Repo/RemoteMod.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public class RemoteMod { 4 | 5 | public string Name; 6 | public string Author; 7 | public string Version; 8 | public string Description; 9 | 10 | public string URL; 11 | public string DownloadURL; 12 | 13 | } 14 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/ETGModMainBehaviour.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using UnityEngine; 5 | 6 | /// 7 | /// This class is responsible for handling basic Unity events for all mods (Awake, Start, Update, ...). 8 | /// 9 | public class ETGModMainBehaviour : MonoBehaviour { 10 | 11 | public static ETGModMainBehaviour Instance; 12 | 13 | public void Awake() { 14 | DontDestroyOnLoad(gameObject); 15 | #pragma warning disable CS0618 16 | ETGMod.StartCoroutine = StartCoroutine; 17 | #pragma warning restore CS0618 18 | ETGMod.StartGlobalCoroutine = StartCoroutine; 19 | ETGMod.StopGlobalCoroutine = StopCoroutine; 20 | ETGMod.Init(); 21 | } 22 | 23 | public void Start() { 24 | ETGMod.Start(); 25 | } 26 | 27 | public void Update() { 28 | ETGMod.Assets.Packer.Apply(); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Guns/BalloonGunController.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | using System.Collections; 3 | 4 | public class BalloonGunController : GunBehaviour { 5 | 6 | public static void Add() { 7 | Gun gun = ETGMod.Databases.Items.NewGun("Balloon Gun", "balloon_gun"); 8 | gun.gameObject.AddComponent(); //FIXME NewGun<> causing issues (MonoMod) 9 | gun.SetShortDescription("Not the real one."); 10 | gun.SetLongDescription("This bootleg of the true balloon gun was made from the cheapest plastics, causing it to pop 70% more often."); 11 | 12 | gun.SetupSprite(ETGMod.Databases.Items.WeaponCollection02, defaultSprite: "balloon_gun_idle_001", fps: 10); 13 | gun.SetAnimationFPS(gun.shootAnimation, 20); 14 | 15 | gun.AddProjectileModuleFrom("AK-47"); 16 | 17 | // Uh... bootleg. 18 | gun.DefaultModule.ammoCost = 1; 19 | gun.DefaultModule.shootStyle = ProjectileModule.ShootStyle.SemiAutomatic; 20 | gun.reloadTime = 1f; 21 | gun.SetBaseMaxAmmo(200); 22 | gun.DefaultModule.numberOfShotsInClip = 15; 23 | 24 | gun.DefaultModule.projectiles[0].GetAnySprite().SetSprite("air_projectile_001"); 25 | 26 | OnGunDamagedModifier damagedModifier = gun.gameObject.AddComponent(); 27 | damagedModifier.DepleteAmmoOnDamage = true; 28 | damagedModifier.NondepletedGunGrantsFlight = true; 29 | 30 | gun.quality = PickupObject.ItemQuality.S; 31 | gun.encounterTrackable.EncounterGuid = "Not The Real Balloon Gun"; // Update this GUID when you need to "refresh" the gun. 32 | ETGMod.Databases.Items.Add(gun); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/JSONMappedRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | 9 | public abstract class JSONMappedRule : JSONRule { 10 | 11 | public abstract Dictionary Map { 12 | get; 13 | } 14 | 15 | public virtual bool Default { 16 | get { 17 | return true; 18 | } 19 | } 20 | 21 | private Dictionary map; 22 | public override bool CanSerialize(MemberInfo info, bool isPrivate) { 23 | if (map == null) { 24 | map = Map; 25 | } 26 | 27 | bool serialize; 28 | if ((!map.TryGetValue(info, out serialize) && Default) || serialize) { 29 | return base.CanSerialize(info, isPrivate); 30 | } 31 | return false; 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONAttachPointDataRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONAttachPointDataRule : JSONRule { 11 | 12 | public override object New(JsonHelperReader json, Type type) { 13 | return new AttachPointData(null); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONBagelColliderRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONBagelColliderDataRule : JSONRule { 11 | 12 | public override object New(JsonHelperReader json, Type type) { 13 | return new BagelColliderData(null); 14 | } 15 | 16 | } 17 | 18 | public class JSONBagelColliderRule : JSONRule { 19 | 20 | public override object New(JsonHelperReader json, Type type) { 21 | return new BagelCollider(0, 0, null); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONDictionaryEntryRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONDictionaryEntryRule : JSONRule { 11 | 12 | public override void WriteMetaHeader(JsonHelperWriter json, object obj) { 13 | } 14 | 15 | public override void Serialize(JsonHelperWriter json, object obj) { 16 | DictionaryEntry entry = (DictionaryEntry) obj; 17 | json.WriteProperty("key", entry.Key); 18 | json.WriteProperty("value", entry.Value); 19 | } 20 | 21 | public override object New(JsonHelperReader json, Type type) { 22 | return null; 23 | } 24 | 25 | public override string ReadMetaHeader(JsonHelperReader json, ref Type type) { 26 | return null; 27 | } 28 | 29 | public override object Deserialize(JsonHelperReader json, object obj) { 30 | return new DictionaryEntry( 31 | json.ReadRawProperty("key"), 32 | json.ReadRawProperty("value") 33 | ); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONMaterialRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | 9 | public class JSONMaterialRule : JSONRule { 10 | 11 | public override void Serialize(JsonHelperWriter json, object obj) { 12 | json.WriteProperty(JSONHelper.META.UNSUPPORTED, JSONHelper.META.UNSUPPORTED_USE_EXTERNAL); 13 | } 14 | 15 | public override object New(JsonHelperReader json, Type type) { 16 | return null; 17 | } 18 | 19 | public override object Deserialize(JsonHelperReader json, object obj) { 20 | json.Read(); // Drop PropertyName 21 | json.Read(); // Drop String 22 | return obj; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONOverridableBoolRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONOverridableBoolRule : JSONRule { 11 | 12 | public override object New(JsonHelperReader json, Type type) { 13 | return new OverridableBool(false); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONScriptableObjectRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONScriptableObjectRule : JSONRule { 11 | 12 | public override object New(JsonHelperReader json, Type type) { 13 | return ScriptableObject.CreateInstance(type); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONTextAssetRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONTextAssetRule : JSONRule { 11 | 12 | public override void Serialize(JsonHelperWriter json, object obj) { 13 | try { 14 | json.WriteProperty("text", ((TextAsset) obj).text); 15 | } catch { 16 | json.WriteProperty("text", null); 17 | } 18 | } 19 | 20 | public override object Deserialize(JsonHelperReader json, object obj) { 21 | ((patch_TextAsset) obj).textOverride = (string) json.ReadRawProperty("text"); 22 | return obj; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONTransformRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONTransformRule : JSONComponentBaseRule { 11 | 12 | protected override void Serialize_(JsonHelperWriter json, object obj) { 13 | Transform t = (Transform) obj; 14 | 15 | // TODO all the (2) various types of Transforms 16 | json.WriteProperty("position", t.position); 17 | json.WriteProperty("rotation", t.rotation); 18 | json.WriteProperty("localScale", t.localScale); 19 | } 20 | 21 | protected override object Deserialize_(JsonHelperReader json, object obj) { 22 | if (obj == null) { 23 | // TODO all the (2) various types of Transforms 24 | /*Drop */ json.ReadProperty("position"); 25 | /*Drop */ json.ReadProperty("rotation"); 26 | /*Drop */ json.ReadProperty("localScale"); 27 | return null; 28 | } 29 | 30 | Transform t = (Transform) obj; 31 | 32 | // TODO all the (2) various types of Transforms 33 | t.position = json.ReadProperty("position"); 34 | t.rotation = json.ReadProperty("rotation"); 35 | t.localScale = json.ReadProperty("localScale"); 36 | 37 | return t; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/JSON/Rules/JSONValueTypeRule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | using System.Collections.Generic; 4 | using System.IO; 5 | using System.Reflection; 6 | using Newtonsoft.Json; 7 | using Newtonsoft.Json.Linq; 8 | using System.Collections; 9 | 10 | public class JSONValueTypeBaseRule : JSONRule { 11 | 12 | public override void WriteMetaHeader(JsonHelperWriter json, object obj) { 13 | // json.WriteProperty(JSONHelper.META.PROP, JSONHelper.META.VALUETYPE); 14 | } 15 | 16 | public override string ReadMetaHeader(JsonHelperReader json, ref Type type) { 17 | /* 18 | string metaProp = json.ReadPropertyName(); 19 | if (metaProp != JSONHelper.META.PROP) { 20 | return metaProp; 21 | } 22 | string valuetype = (string) json.Value; 23 | json.Read(); // Drop String 24 | if (JSONHelper.CheckOnRead && valuetype != JSONHelper.META.VALUETYPE) { 25 | throw new JsonReaderException("Type mismatch! Expected " + JSONHelper.META.VALUETYPE + ", got " + valuetype); 26 | } 27 | */ 28 | return null; 29 | } 30 | 31 | } 32 | 33 | public class JSONValueTypeRule : JSONValueTypeBaseRule { 34 | 35 | } 36 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModAdded.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "added" attribute. 6 | /// Will be applied by MonoMod automatically on patched types / members. 7 | /// 8 | public class MonoModAdded : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModBlacklisted.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod blacklist attribute. 6 | /// Apply it onto a method / type and it will be marked as blacklisted by MonoMod. 7 | /// 8 | public class MonoModBlacklisted : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModConstructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod constructor attribute. 6 | /// Apply it onto a constructor and it will be patched by MonoMod. 7 | /// Or apply it onto a method and it will be handled like a constructor. 8 | /// 9 | public class MonoModConstructor : Attribute { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModEnumReplace.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod enum replace attribute. 6 | /// Apply it onto a enum type / class and its values will be replaced by MonoMod. 7 | /// 8 | public class MonoModEnumReplace : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModHook.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod hook attribute. 6 | /// Apply it onto a type / method / field and calls to the item it hooks will be relinked to the item the attribute gets applied to. 7 | /// 8 | public class MonoModHook : Attribute { 9 | public MonoModHook(string f) { 10 | } 11 | public MonoModHook(Type f) { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModIfFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "if" attribute. 6 | /// Apply it onto a type / method / field and it gets ignored if MonoModder.Data[key] equals false. 7 | /// If fallback (true by default) is false, it also gets ignored if MonoModder.Data[key] is undefined. 8 | /// 9 | public class MonoModIfFlag : Attribute { 10 | public MonoModIfFlag(string key) { 11 | } 12 | public MonoModIfFlag(string key, bool fallback) { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModIgnore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod ignore attribute. 6 | /// Apply it onto a method / type and it will be ignored by MonoMod. 7 | /// 8 | public class MonoModIgnore : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModInline.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public static partial class MMIL { 4 | 5 | public static void DisablePublicAccess() { } 6 | public static void EnablePublicAccess() { } 7 | public static void OnPlatform(params Platform[] p) { } 8 | 9 | public static class Rule { 10 | 11 | public static void RelinkModule(string i, string o) { } 12 | public static void RelinkType(string i, string t) { } 13 | public static void RelinkMember(string i, string t, string n) { } 14 | 15 | public static void Patch(string i, bool b) { } 16 | 17 | } 18 | 19 | public static class Flag { 20 | 21 | public static bool Get(string k) { return default(bool); } 22 | public static void Set(string k, bool v) { } 23 | 24 | } 25 | 26 | public static class Data { 27 | 28 | public static object Get(string k) { return null; } 29 | public static void Set(string k, object v) { } 30 | 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModLinkTo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod linkto attribute. 6 | /// Apply it onto a type / method / field and calls to it by mods will be relinked to another target. 7 | /// 8 | public class MonoModLinkTo : Attribute { 9 | public MonoModLinkTo(string t) { 10 | } 11 | public MonoModLinkTo(Type t) { 12 | } 13 | public MonoModLinkTo(string t, string n) { 14 | } 15 | public MonoModLinkTo(Type t, string n) { 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModNoNew.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "only patch if it exists" attribute. 6 | /// Apply it onto a type or method and it gets ignored if there's no original method in the input module. 7 | /// 8 | public class MonoModNoNew : Attribute { 9 | public MonoModNoNew() { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModOnPlatform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod on platform ("#ifdef PLATFORM") attribute. 6 | /// Apply it onto a type / method / field and it gets ignored on non-matching platforms. 7 | /// 8 | public class MonoModOnPlatform : Attribute { 9 | public MonoModOnPlatform(params Platform[] p) { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModOriginal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod original name. 6 | /// Will be applied by MonoMod automatically on original methods. Use it (or MonoModIgnore) to mark non-"orig_" originals! 7 | /// 8 | public class MonoModOriginal : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModOriginalName.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod original name attribute. 6 | /// Apply it onto a method (not the orig_) and its orig_ method will instead be named like that. 7 | /// 8 | public class MonoModOriginalName : Attribute { 9 | public MonoModOriginalName(string n) { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModRemove.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod remove attribute. 6 | /// Apply it onto a field / method / type and it will be removed by MonoMod. 7 | /// 8 | public class MonoModRemove : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/MonoModReplace.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod replace attribute. 6 | /// Apply it onto a method and no orig_ method will be generated by MonoMod. 7 | /// Apply it onto a field and its attributes / field type will be replaced by MonoMod. 8 | /// 9 | public class MonoModReplace : Attribute { 10 | } 11 | } 12 | 13 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/Platform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | /// 3 | /// Generic platform enum. 4 | /// 5 | [Flags] 6 | #if UNITYENGINE 7 | internal 8 | #else 9 | public 10 | #endif 11 | enum Platform { 12 | None = 0, 13 | 14 | // Underlying platform categories 15 | OS = 1, 16 | 17 | X86 = 0, 18 | X64 = 2, 19 | 20 | NT = 4, 21 | Unix = 8, 22 | 23 | // Operating systems (OSes are always "and-equal" to OS) 24 | Unknown = OS | 16, 25 | Windows = OS | NT | 32, 26 | MacOS = OS | Unix | 64, 27 | Linux = OS | Unix | 128, 28 | Android = Linux | 256, 29 | iOS = MacOS | 512, // Darwin 30 | 31 | // AMD64 (64bit) variants (always "and-equal" to X64) 32 | Unknown64 = Unknown | X64, 33 | Windows64 = Windows | X64, 34 | MacOS64 = MacOS | X64, 35 | Linux64 = Linux | X64, 36 | Android64 = Android | X64, 37 | iOS64 = iOS | X64 38 | } 39 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/MonoMod/PlatformHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | 5 | #if UNITYENGINE 6 | internal 7 | #else 8 | public 9 | #endif 10 | static class PlatformHelper { 11 | 12 | public readonly static Platform Current; 13 | 14 | static PlatformHelper() { 15 | //for mono, get from 16 | //static extern PlatformID Platform 17 | PropertyInfo property_platform = typeof(Environment).GetProperty("Platform", BindingFlags.NonPublic | BindingFlags.Static); 18 | string platID; 19 | if (property_platform != null) { 20 | platID = property_platform.GetValue(null, new object[0]).ToString(); 21 | } else { 22 | //for .net, use default value 23 | platID = Environment.OSVersion.Platform.ToString(); 24 | } 25 | platID = platID.ToLowerInvariant(); 26 | 27 | Current = Platform.Unknown; 28 | if (platID.Contains("win")) { 29 | Current = Platform.Windows; 30 | } else if (platID.Contains("mac") || platID.Contains("osx")) { 31 | Current = Platform.MacOS; 32 | } else if (platID.Contains("lin") || platID.Contains("unix")) { 33 | Current = Platform.Linux; 34 | } 35 | 36 | if (Directory.Exists("/data") && File.Exists("/system/build.prop")) { 37 | Current = Platform.Android; 38 | } else if (Directory.Exists("/Applications") && Directory.Exists("/System")) { 39 | Current = Platform.iOS; 40 | } 41 | 42 | Current |= (IntPtr.Size == 4 ? Platform.X86 : Platform.X64); 43 | } 44 | 45 | public static bool Is(Platform plat) { 46 | return (Current & plat) == plat; 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Multiplayer/MultiplayerGUI.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using UnityEngine; 7 | using SGUI; 8 | 9 | namespace ETGMultiplayer { 10 | class MultiplayerGUI : MonoBehaviour { 11 | 12 | public static MultiplayerGUI Instance; 13 | 14 | /* 15 | SGroup MainGUI; 16 | 17 | SGroup LobbyGUI; 18 | SGroup InGameGUI; 19 | */ 20 | 21 | public void Awake() { 22 | Instance=this; 23 | } 24 | 25 | public void Start() { 26 | 27 | } 28 | 29 | public void Update() { 30 | 31 | } 32 | 33 | public void OnGUI() { 34 | 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Multiplayer/MultiplayerManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using UnityEngine; 6 | 7 | namespace ETGMultiplayer { 8 | class MultiplayerManager : MonoBehaviour { 9 | 10 | public static MultiplayerManager Instance; 11 | 12 | public static void Create() { 13 | GameObject mpManagerObject = new GameObject() { 14 | name="_MPManger" 15 | }; 16 | 17 | Instance=mpManagerObject.AddComponent(); 18 | mpManagerObject.AddComponent(); 19 | 20 | SteamHelper.Init(); 21 | } 22 | 23 | public void Awake() { 24 | 25 | } 26 | 27 | public void Start() { 28 | 29 | } 30 | 31 | public void Update() { 32 | if (Input.GetKey(KeyCode.LeftShift)&&Input.GetKeyDown(KeyCode.M)) 33 | LobbyHelper.CreateLobby(); 34 | } 35 | 36 | public void CreateAndJoinLobby() { 37 | 38 | } 39 | 40 | public void JoinLobby() { 41 | 42 | } 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Multiplayer/RPC/CustomRPC.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using ETGMultiplayer; 4 | 5 | public class CustomRPC : Attribute{ 6 | 7 | private readonly static Type t_CustomRPC = typeof(CustomRPC); 8 | 9 | string Name; 10 | 11 | public CustomRPC(string functionName) { 12 | Name = functionName; 13 | } 14 | 15 | public static void DocAllRPCAttributes() { 16 | Assembly curr = Assembly.GetExecutingAssembly(); 17 | 18 | Type[] allTypes = curr.GetTypes(); 19 | 20 | for (int ti = 0; ti < allTypes.Length; ti++) { 21 | Type type = allTypes[ti]; 22 | MethodInfo[] methods = type.GetMethods(BindingFlags.Public | BindingFlags.Static); 23 | 24 | for (int mi = 0; mi < methods.Length; mi++) { 25 | MethodInfo method = methods[mi]; 26 | object[] attributes = method.GetCustomAttributes(false); 27 | 28 | for (int ai = 0; ai < attributes.Length; ai++) { 29 | object attribute = attributes[ai]; 30 | 31 | if (t_CustomRPC.IsAssignableFrom(attribute.GetType())) { 32 | MPDataHelper.allRPCs.Add(((CustomRPC) attribute).Name, method); 33 | } 34 | } 35 | } 36 | } 37 | } 38 | 39 | } 40 | 41 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Multiplayer/Steam/LobbyHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using Steamworks; 6 | using UnityEngine; 7 | 8 | namespace ETGMultiplayer { 9 | class LobbyHelper { 10 | 11 | public static Dictionary otherPlayers = new Dictionary(); 12 | 13 | // public static CSteamID currentLobby; 14 | 15 | public static bool isInLobby = false; 16 | 17 | public static void Init() { 18 | SteamHelper.LobbyCreated=CallResult.Create(OnCreatedLobby); 19 | SteamHelper.LobbyEntered=CallResult.Create(OnJoinedLobby); 20 | } 21 | 22 | public static void JoinLobby(long ID) { 23 | 24 | } 25 | 26 | public static void LeaveLobby() { 27 | 28 | } 29 | 30 | public static void CreateLobby(bool isPublic=false) { 31 | Debug.Log("Creating lobby"); 32 | SteamAPICall_t handle = SteamMatchmaking.CreateLobby(isPublic ? ELobbyType.k_ELobbyTypePublic : ELobbyType.k_ELobbyTypeFriendsOnly, 2); 33 | SteamHelper.LobbyCreated.Set(handle); 34 | } 35 | 36 | private static void OnJoinedLobby(LobbyEnter_t t, bool failure) { 37 | Debug.Log("Joined Lobby"); 38 | 39 | 40 | } 41 | 42 | private static void OnLeftLobby() { 43 | 44 | } 45 | 46 | private static void OnCreatedLobby(LobbyCreated_t t, bool failed) { 47 | Debug.Log("Created lobby"); 48 | Debug.Log("Lobby ID:" + t.m_ulSteamIDLobby); 49 | } 50 | 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Multiplayer/Steam/SteamHelper.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using Steamworks; 3 | using UnityEngine; 4 | using ETGMultiplayer; 5 | 6 | public class SteamHelper { 7 | 8 | //--------------- Callbacks --------------- 9 | 10 | public static Callback LobbyJoinRequested; 11 | public static Callback SessionRequest; 12 | 13 | public static CallResult LobbyCreated; 14 | public static CallResult LobbyEntered; 15 | 16 | //----------------------------------------- 17 | 18 | public static void Init() { 19 | LobbyHelper.Init(); 20 | } 21 | 22 | } 23 | 24 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_AIActor.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using MonoMod; 5 | 6 | internal class patch_AIActor : AIActor { 7 | 8 | public extern void orig_Start(); 9 | public new void Start() { 10 | ETGMod.AIActor.OnPreStart?.Invoke(this); 11 | orig_Start(); 12 | ETGMod.AIActor.OnPostStart?.Invoke(this); 13 | } 14 | 15 | private extern void orig_CheckForBlackPhantomness(); 16 | private void CheckForBlackPhantomness() { 17 | ETGMod.AIActor.OnBlackPhantomnessCheck?.Invoke(this); 18 | orig_CheckForBlackPhantomness(); 19 | } 20 | 21 | [MonoModIgnore] 22 | private extern new void BecomeBlackPhantom(); 23 | internal void INTERNAL_BecomeBlackPhantom() { 24 | BecomeBlackPhantom(); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_BossCardUIController.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using MonoMod; 5 | using UnityEngine; 6 | using System; 7 | 8 | internal class patch_BossCardUIController : BossCardUIController { 9 | 10 | private extern void orig_ToggleCoreVisiblity(bool visible); 11 | private void ToggleCoreVisiblity(bool visible) { 12 | if (!visible) { 13 | for (int i = 0; i < parallaxSprites.Count; ) { 14 | if (parallaxSprites[i] != null) { 15 | ++i; 16 | continue; 17 | } 18 | // FIXES BROKEN BOSS CARD. 19 | parallaxSprites.RemoveAt(i); 20 | parallaxSpeeds.RemoveAt(i); 21 | parallaxStarts.RemoveAt(i); 22 | parallaxEnds.RemoveAt(i); 23 | } 24 | } 25 | orig_ToggleCoreVisiblity(visible); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_BraveTime.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using MonoMod; 5 | using UnityEngine; 6 | 7 | internal static class patch_BraveTime { 8 | 9 | private static System.Collections.Generic.Dictionary m_post = new System.Collections.Generic.Dictionary(); 10 | [MonoModIgnore] private static System.Collections.Generic.List m_sources; 11 | [MonoModIgnore] private static System.Collections.Generic.List m_multipliers; 12 | 13 | public static void SetTimeScaleModifierIsPost(bool isPost, GameObject source) { 14 | if (!m_sources.Contains(source)) { 15 | m_sources.Add(source); 16 | m_multipliers.Add(1f); 17 | } 18 | 19 | if (!m_post.ContainsKey(source)) { 20 | m_post.Add(source, false); 21 | } 22 | 23 | int index = m_sources.IndexOf(source); 24 | m_post[source] = isPost; 25 | UpdateTimeScale(); 26 | } 27 | 28 | private static void UpdateTimeScale() { 29 | float scale = 1f; 30 | 31 | bool isPost; 32 | for (int i = 0; i < m_multipliers.Count; i++) { 33 | if (!m_post.TryGetValue(m_sources[i], out isPost) || !isPost) { 34 | scale = m_multipliers[i] * scale; 35 | } 36 | } 37 | 38 | scale = Mathf.Clamp(scale, 0f, 1f); 39 | 40 | for (int i = 0; i < m_multipliers.Count; i++) { 41 | if (m_post.TryGetValue(m_sources[i], out isPost) && isPost) { 42 | scale = m_multipliers[i] * scale; 43 | } 44 | } 45 | 46 | if (float.IsNaN(scale)) { 47 | Debug.LogError("TIMESCALE WAS MY NAN ALL ALONG"); 48 | scale = 1f; 49 | } 50 | 51 | scale = Mathf.Clamp(scale, 0f, 100f); 52 | Time.timeScale = scale; 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_CharacterSelectController.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | internal class patch_CharacterSelectController : CharacterSelectController { 5 | 6 | public static new string GetCharacterPathFromIdentity(PlayableCharacters character) { 7 | if (character == PlayableCharacters.Pilot) { 8 | return "PlayerRogue"; 9 | } 10 | if (character == PlayableCharacters.Soldier) { 11 | return "PlayerMarine"; 12 | } 13 | return "Player" + character; 14 | } 15 | 16 | public static extern string orig_GetCharacterPathFromQuickStart(); 17 | public static new string GetCharacterPathFromQuickStart() { 18 | if (ETGMod.Player.QuickstartReplacement != null) { 19 | return ETGMod.Player.QuickstartReplacement; 20 | } 21 | 22 | if (GameManager.Options.PreferredQuickstartCharacter == GameOptions.QuickstartCharacter.LAST_USED) { 23 | return GetCharacterPathFromIdentity(GameManager.Options.LastPlayedCharacter); 24 | } 25 | 26 | // The GameOptions.QuickstartCharacter enum names are uppercase - let's just fall back to the original hardcoded values. 27 | return orig_GetCharacterPathFromQuickStart(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_Chest.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using Dungeonator; 5 | 6 | internal class patch_Chest : Chest { 7 | 8 | public extern static Chest orig_Spawn(Chest chestPrefab, IntVector2 basePosition, RoomHandler room, bool ForceNoMimic = false); 9 | public new static Chest Spawn(Chest chestPrefab, IntVector2 basePosition, RoomHandler room, bool ForceNoMimic = false) { 10 | Chest returnValue = orig_Spawn(chestPrefab, basePosition, room, ForceNoMimic); 11 | ETGMod.Chest.OnPostSpawn?.Invoke(returnValue); 12 | return returnValue; 13 | } 14 | protected extern void orig_Open(PlayerController player); 15 | protected new void Open(PlayerController player) { 16 | if (ETGMod.Chest.OnPreOpen.RunHook(true, this, player)) { 17 | orig_Open(player); 18 | ETGMod.Chest.OnPostOpen?.Invoke(this, player); 19 | } 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_Dungeon.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using System.Collections; 5 | using System.Collections.Generic; 6 | 7 | namespace Dungeonator { 8 | internal class patch_Dungeon : Dungeon { 9 | 10 | private extern IEnumerator orig_Start(); 11 | private IEnumerator Start() { 12 | IEnumerator start = orig_Start(); 13 | 14 | List list = new List(); 15 | while (start.MoveNext()) { 16 | list.Add(start.Current); 17 | } 18 | 19 | if (ETGMod.Initialized) { 20 | ETGMod.Objects.HandleAll(); 21 | ETGMod.Databases.Items.DungeonStart(); 22 | } 23 | 24 | return list.GetEnumerator(); 25 | } 26 | 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_GameManager.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using UnityEngine; 5 | 6 | internal class patch_GameManager : GameManager { 7 | protected extern void orig_Awake(); 8 | private void Awake() { 9 | if (ETGModMainBehaviour.Instance == null) { 10 | ETGModMainBehaviour.Instance = new GameObject("ETGMod Manager").AddComponent(); 11 | } 12 | 13 | orig_Awake(); 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_Gun.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | internal class patch_Gun : Gun { 5 | 6 | public extern void orig_Initialize(GameActor owner); 7 | public new void Initialize(GameActor owner) { 8 | orig_Initialize(owner); 9 | if (owner is PlayerController) { 10 | OnPostFired += ETGMod.Gun.OnPostFired; 11 | OnFinishAttack += ETGMod.Gun.OnFinishAttack; 12 | ETGMod.Gun.OnInit?.Invoke((PlayerController) owner, this); 13 | } 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_HealthHaver.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0108 2 | #pragma warning disable 0626 3 | 4 | using UnityEngine; 5 | 6 | internal class patch_HealthHaver : HealthHaver { 7 | 8 | protected extern void orig_ApplyDamage(float damage, Vector2 direction, string sourceName, CoreDamageTypes damageTypes = CoreDamageTypes.None, DamageCategory damageCategory = DamageCategory.Normal, bool ignoreInvulnerabilityFrames = false, PixelCollider hitPixelCollider = null, bool ignoreDamageCaps = false); 9 | protected void ApplyDamage(float damage, Vector2 direction, string sourceName, CoreDamageTypes damageTypes = CoreDamageTypes.None, DamageCategory damageCategory = DamageCategory.Normal, bool ignoreInvulnerabilityFrames = false, PixelCollider hitPixelCollider = null, bool ignoreDamageCaps = false) { 10 | orig_ApplyDamage(damage, direction, sourceName, damageTypes, damageCategory, ignoreInvulnerabilityFrames, hitPixelCollider, ignoreDamageCaps); 11 | 12 | if (0f < currentHealth && 0f < damage && ETGModGUI.UseDamageIndicators) 13 | ETGDamageIndicatorGUI.HealthHaverTookDamage(this, damage); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_MainMenuFoyerController.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using UnityEngine; 5 | 6 | internal class patch_MainMenuFoyerController : MainMenuFoyerController { 7 | 8 | public static MainMenuFoyerController Instance; 9 | 10 | protected extern void orig_Awake(); 11 | protected void Awake() { 12 | orig_Awake(); 13 | Instance = this; 14 | 15 | VersionLabel.Text = VersionLabel.Text + " | " + ETGMod.BaseUIVersion; 16 | } 17 | 18 | private Texture2D logo; 19 | private bool logoReplaced; 20 | 21 | protected extern void orig_Update(); 22 | protected void Update() { 23 | orig_Update(); 24 | if (!logoReplaced) { 25 | if (logo == null) { 26 | logo = Resources.Load("etgmod/logo"); 27 | } 28 | if (logo == null) { 29 | return; 30 | } 31 | logo.filterMode = FilterMode.Point; 32 | ((dfTextureSprite) TitleCard).Texture = logo; 33 | logoReplaced = true; 34 | } 35 | } 36 | 37 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_PlayerConsumables.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | internal class patch_PlayerConsumables : PlayerConsumables { 5 | 6 | public extern bool orig_get_InfiniteKeys(); 7 | public bool get_InfiniteKeys() { 8 | return ETGMod.Player.InfiniteKeys ?? orig_get_InfiniteKeys(); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_PlayerController.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using System; 5 | using UnityEngine; 6 | public class patch_PlayerController : PlayerController { 7 | /* public extern void orig_Awake (); 8 | public override void Awake () { 9 | PlayerBehaviour playerBehaviour = gameObject.GetComponent(); 10 | if (playerBehaviour) { 11 | Debug.Log("Found PlayerBehaviour (Awake/PreInitialize)!"); 12 | playerBehaviour.PreInitialize(); 13 | } 14 | orig_Awake(); 15 | }*/ 16 | public extern void orig_Start (); 17 | public override void Start () { 18 | PlayerBehaviour playerBehaviour = gameObject.GetComponent(); 19 | if (playerBehaviour) { 20 | Debug.Log("Found PlayerBehaviour (Awake/PreInitialize)!"); 21 | playerBehaviour.PreInitialize(); 22 | } 23 | orig_Start(); 24 | if (playerBehaviour) { 25 | Debug.Log("Found PlayerBehaviour (Start/Initialize)!"); 26 | playerBehaviour.Initialize(); 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_SaveManager.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | public class patch_SaveManager { 3 | private static string secret; 4 | public extern static bool orig_Load (SaveManager.SaveType saveType, out T obj, bool allowDecrypted, uint expectedVersion = 0u, Func versionUpdater = null, SaveManager.SaveSlot? overrideSaveSlot = null); 5 | public static bool Load (SaveManager.SaveType saveType, out T obj, bool allowDecrypted, uint expectedVersion = 0u, Func versionUpdater = null, SaveManager.SaveSlot? overrideSaveSlot = null) { 6 | Console.WriteLine("boop boop I'm a dump"); 7 | Console.WriteLine("here is your expected version " + expectedVersion); 8 | Console.WriteLine("DODGEROLL EXPOSED"); 9 | foreach (char c in secret) { 10 | Console.Write(c + ", "); 11 | } 12 | Console.WriteLine(); 13 | Console.WriteLine("thanks"); 14 | return orig_Load(saveType, out obj, allowDecrypted, expectedVersion, versionUpdater, overrideSaveSlot); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_SteamManager.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | internal class patch_SteamManager : SteamManager { 5 | protected extern void orig_Awake(); 6 | private void Awake() { 7 | if (ETGMod.Platform.DisableSteam) { 8 | return; 9 | } 10 | 11 | orig_Awake(); 12 | } 13 | } -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/Patches/patch_StringTableManager.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using MonoMod; 5 | using UnityEngine; 6 | 7 | internal static class patch_StringTableManager { 8 | 9 | public static extern void orig_SetNewLanguage(StringTableManager.GungeonSupportedLanguages language, bool force = false); 10 | public static void SetNewLanguage(StringTableManager.GungeonSupportedLanguages language, bool force = false) { 11 | orig_SetNewLanguage(language, force); 12 | ETGMod.Databases.Strings.LanguageChanged(); 13 | } 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Animations/SAnimationSequence.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SAnimationSequence : SAnimation { 6 | 7 | public List Sequence = new List(); 8 | 9 | protected float[] _Offsets; 10 | 11 | protected int _CurrentIndex; 12 | public int CurrentIndex { 13 | get { 14 | return _CurrentIndex; 15 | } 16 | } 17 | public SAnimation Current { 18 | get { 19 | return _CurrentIndex < 0 || Sequence.Count <= _CurrentIndex ? null : Sequence[_CurrentIndex]; 20 | } 21 | } 22 | public float CurrentOffset { 23 | get { 24 | return _CurrentIndex < 0 || Sequence.Count <= _CurrentIndex ? 0f : _Offsets[_CurrentIndex]; 25 | } 26 | } 27 | public EStatus CurrentStatus { 28 | get { 29 | return _CurrentIndex < 0 || Sequence.Count <= _CurrentIndex ? EStatus.Finished : Sequence[_CurrentIndex].Status; 30 | } 31 | } 32 | 33 | public SAnimationSequence() 34 | : base(0f) { 35 | } 36 | 37 | public override void OnStart() { 38 | Duration = 0f; 39 | _CurrentIndex = 0; 40 | 41 | _Offsets = new float[Sequence.Count]; 42 | for (int i = 0; i < Sequence.Count; i++) { 43 | SAnimation anim = Sequence[i]; 44 | if (anim == null) continue; 45 | _Offsets[i] = Duration; 46 | Duration += anim.Duration; 47 | anim.Loop = false; 48 | anim.AutoStart = false; 49 | anim.Elem = anim.Elem ?? Elem; 50 | anim.Init(); 51 | } 52 | 53 | Current.Start(); 54 | } 55 | 56 | public override void Animate(float t) { 57 | if (CurrentStatus == EStatus.Finished) { 58 | Current?.End(); 59 | _CurrentIndex++; 60 | Current?.Start(); 61 | } 62 | 63 | if (Current == null) return; 64 | 65 | t = ((t * Duration) - CurrentOffset) / Current.Duration; 66 | Current.Animate(Current.Easing(t)); 67 | if (t >= 1f) Current.End(); 68 | } 69 | 70 | public override void OnEnd() { 71 | base.OnEnd(); 72 | Current?.End(); 73 | _CurrentIndex = 0; 74 | } 75 | 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Animations/SFadeAnimation.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using UnityEngine; 3 | using System.Linq.Expressions; 4 | using System.Linq; 5 | 6 | namespace SGUI { 7 | public abstract class SFadeAnimation : SAnimation { 8 | 9 | public SFadeAnimation() 10 | : this(0.3f) { 11 | } 12 | 13 | public SFadeAnimation(float duration) 14 | : base(duration) { 15 | } 16 | 17 | public Color[] OrigColors; 18 | 19 | public override void OnInit() { 20 | OrigColors = new Color[Elem.Colors.Length]; 21 | Elem.Colors.CopyTo(OrigColors, 0); 22 | 23 | for (int i = 0; i < Elem.Children.Count; i++) { 24 | SElement child = Elem.Children[i]; 25 | if (child.Modifiers.Where(m => m is SFadeAnimation) != null) continue; 26 | SFadeAnimation clone = (SFadeAnimation) MemberwiseClone(); 27 | clone.Elem = child; 28 | child.Modifiers.Add(clone); 29 | } 30 | } 31 | 32 | public override void Animate(float t) { 33 | for (int i = 0; i < OrigColors.Length; i++) { 34 | Elem.Colors[i] = Animate(t, OrigColors[i]); 35 | } 36 | } 37 | 38 | public abstract Color Animate(float t, Color c); 39 | 40 | public override void OnStart() { 41 | } 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Animations/SFadeInAnimation.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SFadeInAnimation : SFadeAnimation { 6 | 7 | public SFadeInAnimation() 8 | : this(0.3f) { 9 | } 10 | 11 | public SFadeInAnimation(float duration) 12 | : base(duration) { 13 | } 14 | 15 | public override Color Animate(float t, Color c) { 16 | return c.WithAlpha(t * c.a); 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Animations/SFadeOutAnimation.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SFadeOutAnimation : SFadeAnimation { 6 | 7 | public SFadeOutAnimation() 8 | : this(0.3f) { 9 | } 10 | 11 | public SFadeOutAnimation(float duration) 12 | : base(duration) { 13 | } 14 | 15 | public override Color Animate(float t, Color c) { 16 | return c.WithAlpha((1f - t) * c.a); 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Animations/SFadeOutShrinkSequence.cs: -------------------------------------------------------------------------------- 1 | using System.Diagnostics; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SFadeOutShrinkSequence : SAnimationSequence { 6 | 7 | public SFadeOutAnimation FadeOut; 8 | public SShrinkAnimation Shrink; 9 | 10 | public float FadeOutDuration; 11 | public float ShrinkDuration; 12 | 13 | public SFadeOutShrinkSequence() 14 | : this(0.3f, 0.5f) { 15 | } 16 | public SFadeOutShrinkSequence(float durationFadeOut, float durationShrink) { 17 | FadeOutDuration = durationFadeOut; 18 | ShrinkDuration = durationShrink; 19 | } 20 | 21 | public override void OnStart() { 22 | if (FadeOut == null) { 23 | Sequence.Insert(0, FadeOut = new SFadeOutAnimation(FadeOutDuration)); 24 | } 25 | 26 | if (Shrink == null) { 27 | Sequence.Add(Shrink = new SShrinkAnimation(ShrinkDuration)); 28 | } 29 | 30 | base.OnStart(); 31 | } 32 | 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Animations/SShrinkAnimation.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Diagnostics; 3 | using UnityEngine; 4 | 5 | namespace SGUI { 6 | public class SShrinkAnimation : SAnimation { 7 | 8 | public SShrinkAnimation() 9 | : this(0.3f) { 10 | } 11 | public SShrinkAnimation(float duration) 12 | : base(duration) { 13 | } 14 | 15 | protected Vector2 _OriginalSize; 16 | 17 | public override void OnInit() { 18 | AutoStart = false; 19 | Elem.UpdateBounds = false; 20 | } 21 | 22 | public override void OnStart() { 23 | Loop = false; 24 | 25 | _OriginalSize = Elem.Size; 26 | } 27 | 28 | public override void Animate(float t) { 29 | Elem.Size = _OriginalSize * (1f - t); 30 | Elem.Parent?.UpdateStyle(); 31 | } 32 | 33 | public override void OnEnd() { 34 | Elem.Remove(); 35 | base.OnEnd(); 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/DFEXT/SGUIDFInput.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SGUIDFInput : IInputAdapter { 6 | 7 | protected readonly static Vector2 NULLV2 = new Vector2(-1, -1); 8 | 9 | public readonly IInputAdapter Base; 10 | private ISGUIBackend _Backend; 11 | public ISGUIBackend Backend { 12 | get { 13 | return _Backend ?? SGUIRoot.Main?.Backend; 14 | } 15 | set { 16 | _Backend = value; 17 | } 18 | } 19 | 20 | public SGUIDFInput(IInputAdapter @base) { 21 | Base = @base; 22 | if (@base == null) { 23 | throw new NullReferenceException("SDGUIFInput cannot be instantiated without base input!"); 24 | } 25 | } 26 | 27 | public bool GetKeyDown(KeyCode key) { 28 | return Base.GetKeyDown(key); 29 | } 30 | 31 | public bool GetKeyUp(KeyCode key) { 32 | return Base.GetKeyUp(key); 33 | } 34 | 35 | public float GetAxis(string axisName) { 36 | return Base.GetAxis(axisName); 37 | } 38 | 39 | public Vector2 GetMousePosition() { 40 | if (Backend.LastMouseEventConsumed) { 41 | return NULLV2; 42 | } 43 | return Base.GetMousePosition(); 44 | } 45 | 46 | public bool GetMouseButton(int button) { 47 | if (Backend.LastMouseEventConsumed) { 48 | return false; 49 | } 50 | return Base.GetMouseButton(button); 51 | } 52 | 53 | public bool GetMouseButtonDown(int button) { 54 | if (Backend.LastMouseEventConsumed) { 55 | return false; 56 | } 57 | return Base.GetMouseButtonDown(button); 58 | } 59 | 60 | public bool GetMouseButtonUp(int button) { 61 | if (Backend.LastMouseEventConsumed) { 62 | return true; 63 | } 64 | return Base.GetMouseButtonUp(button); 65 | } 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/EMouseStatus.cs: -------------------------------------------------------------------------------- 1 | namespace SGUI { 2 | public enum EMouseStatus { 3 | Outside, 4 | Inside, 5 | Up, 6 | Down, 7 | Drag 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Elements/SImage.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SGUI { 4 | public class SImage : SElement { 5 | 6 | public Texture Texture; 7 | 8 | public SImage() 9 | : this(null) { } 10 | public SImage(Texture texture) 11 | : this(texture, Color.white) { } 12 | public SImage(Texture texture, Color color) { 13 | Texture = texture; 14 | ColorCount = 1; 15 | Foreground = color; 16 | } 17 | 18 | public override void UpdateStyle() { 19 | // This will get called again once this element gets added to the root. 20 | if (Root == null) return; 21 | 22 | if (UpdateBounds && Texture != null) { 23 | Size = new Vector2(Texture.width, Texture.height); 24 | } 25 | 26 | base.UpdateStyle(); 27 | } 28 | 29 | public override void Render() { 30 | Draw.Texture(this, Vector2.zero, Size, Texture, Foreground); 31 | 32 | RenderChildren(); 33 | } 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Elements/SLabel.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SGUI { 4 | public class SLabel : SElement { 5 | 6 | public string Text; 7 | public Texture Icon; 8 | 9 | public Vector2 IconScale = Vector2.one; 10 | public Color IconColor { 11 | get { 12 | return Colors[1]; 13 | } 14 | set { 15 | Colors[1] = value; 16 | } 17 | } 18 | 19 | public TextAnchor Alignment = TextAnchor.MiddleLeft; 20 | 21 | public SLabel() 22 | : this("") { } 23 | public SLabel(string text) { 24 | Text = text; 25 | ColorCount = 3; 26 | IconColor = Color.white; 27 | Background = Background.WithAlpha(0f); 28 | } 29 | 30 | public override void UpdateStyle() { 31 | // This will get called again once this element gets added to the root. 32 | if (Root == null) return; 33 | 34 | if (UpdateBounds) { 35 | if (Parent == null) { 36 | Size = Backend.MeasureText(ref Text); 37 | } else { 38 | Size = Backend.MeasureText(ref Text, Parent.InnerSize - (Icon == null ? Vector2.zero : new Vector2(Icon.width * IconScale.x + 1f + Backend.IconPadding, 0f)), font: Font); 39 | } 40 | if (Icon != null) { 41 | Size.y = Mathf.Max(Size.y, Icon.height * IconScale.y + Backend.IconPadding); 42 | } 43 | } 44 | 45 | base.UpdateStyle(); 46 | } 47 | 48 | public override void Render() { 49 | RenderBackground(); 50 | Draw.Text(this, Vector2.zero, Size, Text, Alignment, Icon); 51 | } 52 | 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Elements/SRect.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SGUI { 4 | public class SRect : SElement { 5 | 6 | public bool Filled = true; 7 | public float Thickness = 1f; 8 | 9 | public SRect() 10 | : this(Color.white) { } 11 | public SRect(Color color) { 12 | ColorCount = 1; 13 | Foreground = color; 14 | } 15 | 16 | public override void UpdateStyle() { 17 | // This will get called again once this element gets added to the root. 18 | if (Root == null) return; 19 | 20 | base.UpdateStyle(); 21 | } 22 | 23 | public override void Render() { 24 | if (Filled) { 25 | Draw.Rect(this, Vector2.zero, Size, Foreground); 26 | } else { 27 | Draw.Rect(this, new Vector2(0f, 0f), new Vector2(Thickness, Size.y), Foreground); 28 | Draw.Rect(this, new Vector2(Thickness, 0f), new Vector2(Size.x - Thickness, Thickness), Foreground); 29 | Draw.Rect(this, new Vector2(Size.x - 1f - Thickness, Thickness), new Vector2(Thickness, Size.y - Thickness), Foreground); 30 | Draw.Rect(this, new Vector2(Thickness, Size.y - 1f - Thickness), new Vector2(Size.x - Thickness * 2f, Thickness), Foreground); 31 | } 32 | 33 | RenderChildren(); 34 | } 35 | 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Elements/SWindowTitleBar.cs: -------------------------------------------------------------------------------- 1 | using UnityEngine; 2 | 3 | namespace SGUI { 4 | public class SWindowTitleBar : SElement { 5 | 6 | public bool Dragging; 7 | 8 | public SWindowTitleBar() { 9 | ColorCount = 1; 10 | Background = Background.WithAlpha(Background.a * 2f); 11 | 12 | Children.Add(new SButton { 13 | 14 | }); 15 | } 16 | 17 | public override void UpdateStyle() { 18 | // This will get called again once this element gets added to the root. 19 | if (Root == null) return; 20 | 21 | Size = new Vector2( 22 | Parent.Size.x + ((SGroup) Parent).Border * 2f, 23 | Backend.LineHeight 24 | ); 25 | Position = Vector2.zero; 26 | 27 | base.UpdateStyle(); 28 | 29 | float x = Size.x; 30 | for (int i = 0; i < Children.Count; i++) { 31 | SElement child = Children[i]; 32 | x -= child.Size.x; 33 | child.Position.x = x; 34 | } 35 | } 36 | 37 | public override void RenderBackground() { 38 | // Backend renders background. 39 | } 40 | public override void Render() { 41 | // Handle title, buttons, dragging and other backend-specific window title bar magic. 42 | Draw.WindowTitleBar(this); 43 | } 44 | 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Modifiers/SInGameModifier.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SInGameModifier : SModifier { 6 | 7 | public bool ChangeVisible = false; 8 | public bool ChangeEnabled = false; 9 | 10 | public override void Init() { 11 | ChangeVisible |= Elem.Visible; 12 | ChangeEnabled |= Elem.Enabled; 13 | } 14 | 15 | public override void Update() { 16 | if (ChangeVisible) { 17 | Elem.Visible = GameManager.Instance.IsPaused; 18 | } 19 | if (ChangeEnabled) { 20 | Elem.Enabled = GameManager.Instance.IsPaused; 21 | } 22 | } 23 | 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/Modifiers/SRandomLabelModifier.cs: -------------------------------------------------------------------------------- 1 | using System.Text; 2 | using UnityEngine; 3 | 4 | namespace SGUI { 5 | public class SRandomLabelModifier : SModifier { 6 | 7 | public override void Update() { 8 | if (Random.value > 0.1f) { 9 | return; 10 | } 11 | SLabel label = (SLabel) Elem; 12 | string orig = label.Text; 13 | StringBuilder repl = new StringBuilder(); 14 | while (orig.Length > 0) { 15 | int i = Random.Range(0, orig.Length); 16 | char c = orig[i]; 17 | repl.Append(c); 18 | orig = orig.Remove(i, 1); 19 | } 20 | label.Text = repl.ToString(); 21 | } 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Assembly-CSharp.Base.mm/src/SGUI/SModifier.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable RECS0018 2 | using System; 3 | using System.ComponentModel; 4 | using UnityEngine; 5 | 6 | namespace SGUI { 7 | public class SModifier { 8 | 9 | public SElement Elem; 10 | 11 | public virtual void Init() { 12 | 13 | } 14 | 15 | public virtual void UpdateStyle() { 16 | 17 | } 18 | 19 | public virtual void Update() { 20 | 21 | } 22 | 23 | } 24 | 25 | public class SDModifier : SModifier { 26 | 27 | public Action OnInit; 28 | public override void Init() { 29 | OnInit?.Invoke(Elem); 30 | } 31 | 32 | public Action OnUpdateStyle; 33 | public override void UpdateStyle() { 34 | OnUpdateStyle?.Invoke(Elem); 35 | } 36 | 37 | public Action OnUpdate; 38 | public override void Update() { 39 | OnUpdate?.Invoke(Elem); 40 | } 41 | 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # For code contributions, make sure you follow the [code style guide](STYLE.md). 2 | 3 | # Please squash pull requests into single commits. 4 | 5 | This document is not final. 6 | -------------------------------------------------------------------------------- /MonoDebugDummy/MonoDebugDummy.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {F1235018-66D7-4365-AAB1-1CE170132B4A} 7 | Exe 8 | MonoDebugDummy 9 | MonoDebugDummy 10 | v3.5 11 | 12 | 13 | true 14 | full 15 | false 16 | bin\Debug 17 | DEBUG; 18 | prompt 19 | 4 20 | true 21 | 22 | 23 | true 24 | bin\Release 25 | prompt 26 | 4 27 | true 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /MonoDebugDummy/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoDebugDummy { 4 | class MainClass { 5 | public static void Main(string[] args) { 6 | Console.WriteLine("You shouldn't see this."); 7 | } 8 | } 9 | } 10 | 11 | /* 12 | 13 | MonoDebug instructions: 14 | 15 | * Set environment variable MONODEVELOP_SDB_TEST=1 16 | * Hit run button in MonoDevelop 17 | * Set path to Gungeon executable path 18 | * Set arguments to --debugger-client --no-steam 19 | * Set IP to 127.0.0.1 20 | * Set port to 10000 21 | * Hit Listen 22 | 23 | */ 24 | -------------------------------------------------------------------------------- /MonoDebugDummy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("MonoDebugDummy")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Enter the Gungeon Base API Mod 2 | 3 | ### License: MIT 4 | 5 | ---- 6 | 7 | This repository houses the "Mod the Gungeon" (ETGMod) modding API for the game "Enter the Gungeon." 8 | 9 | The "base backend" will be installed before anything else in [the ETGMod.Installer](https://github.com/ModTheGungeon/ETGMod.Installer). 10 | 11 | It is still in its early phases. Do not expect anything usable for end-users here for quite a while. 12 | 13 | For compatibility reasons, it contains its own copy of Mono.Cecil (it's not a submodule). 14 | 15 | # Before contributing 16 | 17 | Make sure to read the [Code Style Guide](STYLE.md) and the [Contributing](CONTRIBUTING.md) documents. 18 | 19 | # Helpful resources 20 | 21 | * [Example API mod ("backend")](https://github.com/ModTheGungeon/ETGMod.ExampleAPI) 22 | 23 | # Frequently Asked Questions (FAQ) 24 | 25 | ### How do I make mods? 26 | 27 | ETGMod is work in progress software. We do not yet offer a stable API. 28 | 29 | ### Is there a Mac version? 30 | 31 | Worry not, ETGMod is written in the same language as Gungeon and uses the same runtime as Gungeon, Mono. 32 | It already runs on Windows, Linux and Mac. 33 | 34 | ### Is there a Linux version? 35 | 36 | Read the answer to the question above. 37 | 38 | ### Console modding? 39 | 40 | PS4 modding will never happen. The platform differs a lot from PC and we've never worked with programming for consoles. 41 | 42 | ### Are the devs okay with this? 43 | 44 | The developers of the game actually helped us with some code for ETGMod. 45 | They often hang out in the Gungeon Discord and are really great people. 46 | 47 | ### Does this work on pirated copies of the game? 48 | 49 | We do not support pirated copies of the game. You're on your own. 50 | We suggest supporting the awesome devs! Things would probably look a lot different if they weren't as supportive as they are. 51 | 52 | ### This is too complicated for me. How do I install a mod? 53 | 54 | ETGMod is work in progress software. We're working on simple tutorials. 55 | We'll make sure to have them before we release a stable version. 56 | -------------------------------------------------------------------------------- /STYLE.md: -------------------------------------------------------------------------------- 1 | # ETGMod code style guide v1.1 2 | 3 | ### Preamble 4 | 5 | The purpose of this guide is to aid in the understandability of code by all contributors. 6 | By making sure that everyone follows the same rules, we can ensure that two APIs will not look completely different. 7 | Please read the entirety of this document before submitting code. 8 | 9 | ### Indentation 10 | 11 | ETGMod source code uses spaces for indentation. Please set the tab size to 4 spaces in your IDE/editor. 12 | 13 | ### Case 14 | 15 | All types should use Pascal case, e.g. `Object` or `Vector3`. 16 | Class fields use Pascal case: `ThisIsAFieldName`. **Note:** `thisIsAFieldName` is camelCase, *not* Pascal case. 17 | Methods should use Pascal case, e.g. `Update` or `Awake`. 18 | Method arguments should use Camel case, e.g. `cachedPath`. 19 | Namespaces use Pascal case. 20 | Properties use Pascal case. 21 | 22 | ### Private 23 | 24 | Private fields, methods, classes etc. should have an underscore (`_`) at the beginning of the name. 25 | Underlying fields of properties should be private. 26 | 27 | ### Operators 28 | 29 | When using operators like `+` or `=` put a space before and after the operator (`1 + 1` instead of `1+1`). 30 | The increment and decrement operators are an exception to this rule (use `variable++;`, not `variable ++ ;`). 31 | 32 | ### Patch classes 33 | 34 | Please put these two lines: 35 | 36 | ``` 37 | #pragma warning disable 0626 38 | #pragma warning disable 0649 39 | ``` 40 | 41 | at the beginning of every single file **that directly patches the game code** - it'll disable two redundant warnings that only clutter the build log. 42 | 43 | ### Cross-Platformability 44 | 45 | ETGMod is and will always be a cross platform modding framework. 46 | Cross platform means here the support of the 3 desktop operating systems that Enter the Gungeon is released on, not counting PS4. 47 | 48 | Due to the nature of the method we use to mod the game and weird platform-dependencies, some deobfuscated classes differ in name on different platforms. 49 | For this the Cross utility was created. You can see an example of it's usage in [`Player.cs`](Assembly-CSharp.Base.mm/src/Core/Player.cs). 50 | 51 | Do not implement your own cross platform helpers or hacks. 52 | 53 | --- 54 | 55 | Note: This document may be changed. Make sure to check every once in a while to see if something's been changed. 56 | The version number will be modified if so. 57 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("UnityEngine.Base.mm")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("UnityEngine.Base.mm")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("3c105af3-d405-4536-b45e-c764d6ed84c7")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/ETGModInstallerRenames.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0414 2 | 3 | namespace UnityEngine { 4 | /// 5 | /// Hooks in the Unity Engine that must have their original name's first character replaced with O. 6 | /// 7 | internal static class ETGModInstallerRenames { 8 | 9 | private static string[] items = { 10 | "UnityEngine.Resources:Load", "Ooad", 11 | "UnityEngine.Resources:LoadAsync", "OoadAsync", 12 | "UnityEngine.Resources:LoadAll", "OoadAll", 13 | "UnityEngine.Resources:GetBuiltinResource", "OetBuiltinResource", 14 | "UnityEngine.Resources:UnloadAsset", "OnloadAsset", 15 | "UnityEngine.Resources:UnloadUnusedAssets", "OnloadUnusedAssets", 16 | 17 | }; 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/ETGModUnityEngineHooks.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | 4 | namespace UnityEngine { 5 | /// 6 | /// Hooks in the Unity Engine that are public and used by (at least) ETGMod. 7 | /// 8 | public static class ETGModUnityEngineHooks { 9 | 10 | public static string SkipSuffix = "/SKIPHOOK"; 11 | 12 | public static Func Load; // = (string path, Type type) => null; 13 | public static Func LoadAsync; // = (string path, Type type) => null; 14 | public static Func LoadAll; // = (string path, Type type) => null; 15 | public static Func UnloadAsset; // = (Object asset) => false; 16 | 17 | public static Func Instantiate; // = (Object obj) => obj; 18 | public static Action Construct; 19 | 20 | public static Func AddComponent; // = (Component c) => c; 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/MonoMod/MonoModConstructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod constructor attribute. 6 | /// Apply it onto a constructor and it will be patched by MonoMod. 7 | /// Or apply it onto a method and it will be handled like a constructor. 8 | /// 9 | public class MonoModConstructor : Attribute { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/MonoMod/MonoModIgnore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod ignore attribute. 6 | /// Apply it onto a method / type and it will be ignored by MonoMod. 7 | /// 8 | class MonoModIgnore : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/MonoMod/MonoModLinkTo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod linkto attribute. 6 | /// Apply it onto a type / method / field and calls to it by mods will be relinked to another target. 7 | /// 8 | class MonoModLinkTo : Attribute { 9 | public MonoModLinkTo(string t) { 10 | } 11 | public MonoModLinkTo(Type t) { 12 | } 13 | public MonoModLinkTo(string t, string n) { 14 | } 15 | public MonoModLinkTo(Type t, string n) { 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/MonoMod/MonoModOriginal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod original name. 6 | /// Will be applied by MonoMod automatically on original methods. Use it (or MonoModIgnore) to mark non-"orig_" originals! 7 | /// 8 | public class MonoModOriginal : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/MonoMod/MonoModOriginalName.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod original name attribute. 6 | /// Apply it onto a method (not the orig_) and its orig_ method will instead be named like that. 7 | /// 8 | class MonoModOriginalName : Attribute { 9 | public MonoModOriginalName(string n) { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/patch_ClassLibraryInitializer.cs: -------------------------------------------------------------------------------- 1 | /* 2 | RIP MONODEBUG 2016-2016 3 | 4 | #pragma warning disable 0626 5 | #pragma warning disable 0649 6 | 7 | using System; 8 | 9 | namespace UnityEngine { 10 | internal static class patch_ClassLibraryInitializer { 11 | 12 | private delegate string[] d_mono_runtime_get_main_args(); //ret MonoArray* 13 | 14 | private static extern void orig_Init(); 15 | private static void Init() { 16 | orig_Init(); 17 | 18 | string[] args = PInvokeHelper.Mono.GetDelegate()(); 19 | bool debuggerClient = false; 20 | for (int i = 1; i < args.Length; i++) { 21 | string arg = args[i]; 22 | if (arg == "--debugger-client") { 23 | debuggerClient = true; 24 | } 25 | } 26 | 27 | try { 28 | if (debuggerClient) MonoDebug.SetupDebuggerAgent(); 29 | MonoDebug.Init(); 30 | if (debuggerClient) MonoDebug.InitDebuggerAgent(); 31 | } catch (Exception e) { 32 | Debug.Log("Called MonoDebug and it sudoku'd."); 33 | Debug.Log(e); 34 | } 35 | } 36 | 37 | } 38 | } 39 | */ -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/patch_GameObject.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | using MonoMod; 5 | using UnityEngineInternal; 6 | 7 | namespace UnityEngine { 8 | internal class patch_GameObject { 9 | 10 | public extern Component orig_AddComponent(System.Type componentType); 11 | public Component AddComponent(System.Type componentType) { 12 | Component component = orig_AddComponent(componentType); 13 | if (ETGModUnityEngineHooks.AddComponent != null) { 14 | component = ETGModUnityEngineHooks.AddComponent(component); 15 | } 16 | return component; 17 | } 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /UnityEngine.Base.mm/src/patch_TextAsset.cs: -------------------------------------------------------------------------------- 1 | #pragma warning disable 0626 2 | #pragma warning disable 0649 3 | 4 | namespace UnityEngine { 5 | // must be public as it's accessed from outside 6 | public class patch_TextAsset : TextAsset { 7 | 8 | // TODO hook get_text, get_bytes 9 | 10 | public string textOverride { 11 | get; set; 12 | } 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /libs/Assembly-CSharp-firstpass.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/Assembly-CSharp-firstpass.dll -------------------------------------------------------------------------------- /libs/Assembly-CSharp.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/Assembly-CSharp.dll -------------------------------------------------------------------------------- /libs/Eluant/.gitignore: -------------------------------------------------------------------------------- 1 | bin 2 | obj 3 | *.userprefs 4 | *.usertasks 5 | *.suo 6 | *.swp 7 | test-results 8 | /packages 9 | /TestResult.xml 10 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant.Tests/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("Eluant")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("chris")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/BindingSupport.lua: -------------------------------------------------------------------------------- 1 | -- Eluant bindings 2 | 3 | -- Make copies of global functions to prevent sandboxed scripts from altering 4 | -- the behavior of Eluant bindings. 5 | local real_pcall = pcall 6 | local real_select = select 7 | local real_error = error 8 | 9 | -- Lua -> managed call support. 10 | -- 11 | -- Since longjmp() can have bad effects on the CLR, we try to avoid generating 12 | -- Lua errors in managed code. Therefore we need a mechanism to raise errors 13 | -- that does not rely on managed code. 14 | -- 15 | -- The following code creates a function that is given a userdata representing 16 | -- a CLR delegate and returns a Lua function that will call it. The CLR code 17 | -- is required to follow the same protocol as pcall(): the first return value is 18 | -- true on success, followed by results, and false on failure, followed by the 19 | -- error message. The Lua proxy function will raise the error if necessary. 20 | -- 21 | -- The other half of this protocol is implemented in C#, where the wrapper 22 | -- responsible for unpacking Lua arguments into CLR types can capture exceptions 23 | -- and propagate them as a false return flag. 24 | local function process_managed_call_result(flag, flag2, ...) 25 | -- Because we pcall the wrapper, we have two levels of flags. Outer is from 26 | -- pcall, inner is from the CLR side. 27 | 28 | -- pcall 29 | if not flag then real_error(flag2, ...) end 30 | 31 | -- CLR 32 | if not flag2 then real_error(...) end 33 | 34 | -- No error 35 | return ... 36 | end 37 | 38 | function eluant_create_managed_call_wrapper(fn) 39 | return function(...) 40 | return process_managed_call_result(real_pcall(fn, ...)) 41 | end 42 | end 43 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaCustomClrObject.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaCustomClrObject.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public class LuaCustomClrObject : LuaClrObjectValue, IEquatable 32 | { 33 | public LuaCustomClrObject(object obj) : base(obj) { } 34 | 35 | internal override void Push(LuaRuntime runtime) 36 | { 37 | runtime.PushCustomClrObject(this); 38 | } 39 | 40 | public override bool Equals(LuaValue other) 41 | { 42 | return Equals(other as LuaCustomClrObject); 43 | } 44 | 45 | public bool Equals(LuaCustomClrObject other) 46 | { 47 | return other != null && other.ClrObject == ClrObject; 48 | } 49 | 50 | internal override object BackingCustomObject 51 | { 52 | get { return ClrObject; } 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaGlobalsTable.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaGlobalsTable.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public class LuaGlobalsTable : LuaTable 32 | { 33 | internal LuaGlobalsTable(LuaRuntime runtime) : base(runtime, 0) 34 | { 35 | // Finalization not required for this special reference. 36 | GC.SuppressFinalize(this); 37 | } 38 | 39 | internal override void Push(LuaRuntime runtime) 40 | { 41 | LuaApi.lua_pushvalue(runtime.LuaState, LuaApi.LUA_GLOBALSINDEX); 42 | } 43 | 44 | protected override void Dispose(bool disposing) 45 | { 46 | // Do nothing. 47 | } 48 | 49 | protected override LuaValue CopyReferenceImpl() 50 | { 51 | // This is a singleton per runtime, no need to copy anything. 52 | return this; 53 | } 54 | 55 | public override bool Equals(LuaReference r) 56 | { 57 | // This singleton table is only ever equal to itself. 58 | return object.ReferenceEquals(r, this); 59 | } 60 | } 61 | } 62 | 63 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaLightUserdata.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaLightUserdata.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public class LuaLightUserdata : LuaReference 32 | { 33 | public override Type CLRMappedType { get { return typeof(LuaLightUserdata); } } 34 | public override object CLRMappedObject { get { return this; } } 35 | 36 | internal LuaLightUserdata(LuaRuntime runtime, int reference) : base(runtime, reference) { } 37 | 38 | public override bool ToBoolean() 39 | { 40 | return true; 41 | } 42 | 43 | public override double? ToNumber() 44 | { 45 | return null; 46 | } 47 | 48 | public override string ToString() 49 | { 50 | return "[LuaLightUserdata]"; 51 | } 52 | 53 | new public LuaWeakReference CreateWeakReference() 54 | { 55 | CheckDisposed(); 56 | 57 | return Runtime.CreateWeakReference(this); 58 | } 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaNumberOperators.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace Eluant 4 | { 5 | public partial class LuaNumber 6 | { 7 | public static double? operator+(LuaNumber a, double? b) 8 | { 9 | return (double?)a + b; 10 | } 11 | 12 | public static double? operator-(LuaNumber a, double? b) 13 | { 14 | return (double?)a - b; 15 | } 16 | 17 | public static double? operator*(LuaNumber a, double? b) 18 | { 19 | return (double?)a * b; 20 | } 21 | 22 | public static double? operator/(LuaNumber a, double? b) 23 | { 24 | return (double?)a / b; 25 | } 26 | 27 | public static double? operator%(LuaNumber a, double? b) 28 | { 29 | return (double?)a % b; 30 | } 31 | 32 | public static bool operator==(LuaNumber a, double? b) 33 | { 34 | return (double?)a == b; 35 | } 36 | 37 | public static bool operator!=(LuaNumber a, double? b) 38 | { 39 | return (double?)a != b; 40 | } 41 | 42 | public static bool operator<=(LuaNumber a, double? b) 43 | { 44 | return (double?)a <= b; 45 | } 46 | 47 | public static bool operator>=(LuaNumber a, double? b) 48 | { 49 | return (double?)a >= b; 50 | } 51 | 52 | public static bool operator<(LuaNumber a, double? b) 53 | { 54 | return (double?)a < b; 55 | } 56 | 57 | public static bool operator>(LuaNumber a, double? b) 58 | { 59 | return (double?)a > b; 60 | } 61 | 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaNumberOperators.tt: -------------------------------------------------------------------------------- 1 | <#@ template language="C#v3.5" #> 2 | using System; 3 | 4 | namespace Eluant 5 | { 6 | public partial class LuaNumber 7 | { 8 | <# 9 | foreach (var op in new string[][] { 10 | new[] { "+", "double?" }, 11 | new[] { "-", "double?" }, 12 | new[] { "*", "double?" }, 13 | new[] { "/", "double?" }, 14 | new[] { "%", "double?" }, 15 | new[] { "==", "bool"}, 16 | new[] { "!=", "bool"}, 17 | new[] { "<=", "bool"}, 18 | new[] { ">=", "bool"}, 19 | new[] { "<", "bool" }, 20 | new[] { ">", "bool" }}) { 21 | #> 22 | public static <#=op[1]#> operator<#=op[0]#>(LuaNumber a, double? b) 23 | { 24 | return (double?)a <#=op[0]#> b; 25 | } 26 | 27 | <# 28 | } 29 | #> 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaOpaqueClrObject.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaOpaqueClrObject.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public sealed class LuaOpaqueClrObject : LuaClrObjectValue, IEquatable 32 | { 33 | public LuaOpaqueClrObject(object obj) : base(obj) { } 34 | 35 | internal override void Push(LuaRuntime runtime) 36 | { 37 | runtime.PushOpaqueClrObject(this); 38 | } 39 | 40 | public override bool Equals(LuaValue other) 41 | { 42 | return Equals(other as LuaOpaqueClrObject); 43 | } 44 | 45 | public bool Equals(LuaOpaqueClrObject obj) 46 | { 47 | return obj != null && obj.ClrObject == ClrObject; 48 | } 49 | 50 | internal override object BackingCustomObject 51 | { 52 | get { return null; } 53 | } 54 | } 55 | } 56 | 57 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaThread.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaThread.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public sealed class LuaThread : LuaReference 32 | { 33 | public override Type CLRMappedType { get { return typeof(LuaThread); } } 34 | public override object CLRMappedObject { get { return this; } } 35 | 36 | public LuaTable Environment { 37 | get { return Runtime.GetFenv(this); } 38 | set { Runtime.SetFenv(value, this); } 39 | } 40 | 41 | internal LuaThread(LuaRuntime runtime, int reference) : base(runtime, reference) { } 42 | 43 | public override bool ToBoolean() 44 | { 45 | return true; 46 | } 47 | 48 | public override double? ToNumber() 49 | { 50 | return null; 51 | } 52 | 53 | public override string ToString() 54 | { 55 | return "[LuaThread]"; 56 | } 57 | 58 | new public LuaWeakReference CreateWeakReference() 59 | { 60 | CheckDisposed(); 61 | 62 | return Runtime.CreateWeakReference(this); 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaUserdata.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaUserdata.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public class LuaUserdata : LuaReference 32 | { 33 | internal LuaUserdata(LuaRuntime runtime, int reference) : base(runtime, reference) { } 34 | 35 | public LuaTable Environment { 36 | get { return Runtime.GetFenv(this); } 37 | set { Runtime.SetFenv(value, this); } 38 | } 39 | 40 | public override Type CLRMappedType { get { return typeof(LuaUserdata); } } 41 | public override object CLRMappedObject { get { return this; } } 42 | 43 | public override bool ToBoolean() 44 | { 45 | return true; 46 | } 47 | 48 | public override double? ToNumber() 49 | { 50 | return null; 51 | } 52 | 53 | public override string ToString() 54 | { 55 | return "[LuaUserdata]"; 56 | } 57 | 58 | new public LuaWeakReference CreateWeakReference() 59 | { 60 | CheckDisposed(); 61 | 62 | return Runtime.CreateWeakReference(this); 63 | } 64 | } 65 | } 66 | 67 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/LuaValueType.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaValueType.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant 30 | { 31 | public abstract class LuaValueType : LuaValue 32 | { 33 | internal LuaValueType() { } 34 | 35 | public override void Dispose() 36 | { 37 | // No-op for value types. 38 | } 39 | 40 | protected override LuaValue CopyReferenceImpl() 41 | { 42 | // No need to copy anything since value types don't hold a runtime-specific reference. 43 | return this; 44 | } 45 | } 46 | } 47 | 48 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/NET40Shim/Tuple.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Tuple.cs 3 | // 4 | // Author: 5 | // zatherz 6 | // 7 | // Copyright (c) 2017 ${CopyrightHolder} 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | namespace System 28 | { 29 | public class Tuple 30 | { 31 | public T1 First { get; private set; } 32 | public T2 Second { get; private set; } 33 | internal Tuple(T1 first, T2 second) 34 | { 35 | First = first; 36 | Second = second; 37 | } 38 | } 39 | 40 | public static class Tuple 41 | { 42 | public static Tuple New(T1 first, T2 second) 43 | { 44 | var tuple = new Tuple(first, second); 45 | return tuple; 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/BasicBindingSecurityPolicy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // BasicBindingSecurityPolicy.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | using System.Reflection; 29 | 30 | namespace Eluant.ObjectBinding 31 | { 32 | public class BasicBindingSecurityPolicy : IBindingSecurityPolicy 33 | { 34 | public MemberSecurityPolicy DefaultPolicy { get; private set; } 35 | 36 | public BasicBindingSecurityPolicy(MemberSecurityPolicy policy) 37 | { 38 | DefaultPolicy = policy; 39 | } 40 | 41 | #region IBindingSecurityPolicy implementation 42 | 43 | public virtual MemberSecurityPolicy GetMemberSecurityPolicy(MemberInfo member) 44 | { 45 | if (member.GetCustomAttributes(typeof(LuaMemberAttribute), true).Length != 0) { 46 | return MemberSecurityPolicy.Permit; 47 | } 48 | 49 | return DefaultPolicy; 50 | } 51 | 52 | #endregion 53 | } 54 | } 55 | 56 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/IBindingContext.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IBindingContext.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant.ObjectBinding 30 | { 31 | public interface IBindingContext 32 | { 33 | IBindingSecurityPolicy BindingSecurityPolicy { get; } 34 | ILuaBinder Binder { get; } 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/IBindingSecurityPolicy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // IBindingSecurityPolicy.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | using System.Reflection; 29 | 30 | namespace Eluant.ObjectBinding 31 | { 32 | public interface IBindingSecurityPolicy 33 | { 34 | MemberSecurityPolicy GetMemberSecurityPolicy(MemberInfo member); 35 | } 36 | } 37 | 38 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/ILuaBinder.cs: -------------------------------------------------------------------------------- 1 | // 2 | // ILuaBinder.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | using System.Collections.Generic; 29 | using System.Reflection; 30 | 31 | namespace Eluant.ObjectBinding 32 | { 33 | public interface ILuaBinder 34 | { 35 | ICollection GetMembersByName(object targetObject, string memberName); 36 | 37 | MethodInfo ResolveOverload(ICollection possibleOverloads, LuaVararg arguments); 38 | 39 | LuaValue ObjectToLuaValue(object obj, IBindingContext bindingContext, LuaRuntime runtime); 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/LuaMemberAttribute.cs: -------------------------------------------------------------------------------- 1 | // 2 | // LuaMemberAttribute.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant.ObjectBinding 30 | { 31 | [AttributeUsage(AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property, AllowMultiple=true, Inherited=true)] 32 | public class LuaMemberAttribute : Attribute 33 | { 34 | public string LuaKey { get; private set; } 35 | 36 | public LuaMemberAttribute() : this(null) { } 37 | 38 | public LuaMemberAttribute(string luaKey) 39 | { 40 | LuaKey = luaKey; 41 | } 42 | } 43 | } 44 | 45 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/MemberSecurityPolicy.cs: -------------------------------------------------------------------------------- 1 | // 2 | // MemberSecurityPolicy.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant.ObjectBinding 30 | { 31 | [Flags] 32 | public enum MemberSecurityPolicy 33 | { 34 | Deny, 35 | Permit, 36 | 37 | Unspecified, 38 | } 39 | } 40 | 41 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/ObjectBinding/MetamethodAttribute.cs: -------------------------------------------------------------------------------- 1 | // 2 | // MetamethodAttribute.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | 29 | namespace Eluant.ObjectBinding 30 | { 31 | // This attribute is internal because it should not be added to any interfaces except those declared by Eluant. 32 | [AttributeUsage(AttributeTargets.Interface, Inherited=false, AllowMultiple=true)] 33 | internal class MetamethodAttribute : Attribute 34 | { 35 | public string MethodName { get; private set; } 36 | 37 | public MetamethodAttribute(string methodName) 38 | { 39 | MethodName = methodName; 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /libs/Eluant/Eluant/Scripts.cs: -------------------------------------------------------------------------------- 1 | // 2 | // Scripts.cs 3 | // 4 | // Author: 5 | // Chris Howie 6 | // 7 | // Copyright (c) 2013 Chris Howie 8 | // 9 | // Permission is hereby granted, free of charge, to any person obtaining a copy 10 | // of this software and associated documentation files (the "Software"), to deal 11 | // in the Software without restriction, including without limitation the rights 12 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | // copies of the Software, and to permit persons to whom the Software is 14 | // furnished to do so, subject to the following conditions: 15 | // 16 | // The above copyright notice and this permission notice shall be included in 17 | // all copies or substantial portions of the Software. 18 | // 19 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | // THE SOFTWARE. 26 | 27 | using System; 28 | using System.IO; 29 | using System.Reflection; 30 | using System.Text; 31 | 32 | namespace Eluant 33 | { 34 | internal static class Scripts 35 | { 36 | private static string GetResource(string file) 37 | { 38 | using (var s = new StreamReader(Assembly.GetExecutingAssembly().GetManifestResourceStream("Eluant." + file), Encoding.UTF8)) { 39 | return s.ReadToEnd(); 40 | } 41 | } 42 | 43 | private static string bindingSupport; 44 | 45 | public static string BindingSupport 46 | { 47 | get { 48 | if (bindingSupport == null) { 49 | bindingSupport = GetResource("BindingSupport.lua"); 50 | } 51 | 52 | return bindingSupport; 53 | } 54 | } 55 | } 56 | } 57 | 58 | -------------------------------------------------------------------------------- /libs/Eluant/LICENSE.md: -------------------------------------------------------------------------------- 1 | Copyright for portions of this project are held by Chris Howie. 2 | All other copyright for the fork of this project hosted under the 3 | ModTheGungeon GitHub organization are Copyright (c) 2017 Zatherz. 4 | Below is the original text of the licencse, which also applies 5 | to this forked project. 6 | 7 | Copyright (c) 2013 Chris Howie 8 | 9 | Permission is hereby granted, free of charge, to any person obtaining a copy 10 | of this software and associated documentation files (the "Software"), to deal 11 | in the Software without restriction, including without limitation the rights 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 13 | copies of the Software, and to permit persons to whom the Software is 14 | furnished to do so, subject to the following conditions: 15 | 16 | The above copyright notice and this permission notice shall be included in 17 | all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 25 | THE SOFTWARE. 26 | -------------------------------------------------------------------------------- /libs/Ionic.Zip.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/Ionic.Zip.dll -------------------------------------------------------------------------------- /libs/Logger/Logger.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Debug 5 | AnyCPU 6 | {1C734127-AC83-4ECB-ABCA-32B98DFE49C7} 7 | Library 8 | Logger 9 | Logger 10 | v2.0 11 | 12 | 13 | true 14 | full 15 | false 16 | bin\Debug 17 | DEBUG; 18 | prompt 19 | 4 20 | false 21 | 22 | 23 | true 24 | bin\Release 25 | prompt 26 | 4 27 | false 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /libs/Logger/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle("Logger")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("")] 12 | [assembly: AssemblyCopyright("${AuthorCopyright}")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion("1.0.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | -------------------------------------------------------------------------------- /libs/Logger/README.md: -------------------------------------------------------------------------------- 1 | # ETGMod.Logger 2 | 3 | A very simple Logger class. Originally made for ETGMod, but apart from the namespace and the organization it's under it has nothing to do with it. 4 | -------------------------------------------------------------------------------- /libs/Mono.Cecil.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/Mono.Cecil.dll -------------------------------------------------------------------------------- /libs/MonoMod/.gitignore: -------------------------------------------------------------------------------- 1 | bin/ 2 | obj/ 3 | *.userprefs 4 | *.user 5 | .vscode/.browse.VC.db* 6 | .vs/ 7 | -------------------------------------------------------------------------------- /libs/MonoMod/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2015 Maik Macho 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 14 4 | VisualStudioVersion = 14.0.25420.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MonoMod", "MonoMod.csproj", "{8A17C958-5C33-4035-AF76-F94A3AA2DC4F}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {8A17C958-5C33-4035-AF76-F94A3AA2DC4F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {8A17C958-5C33-4035-AF76-F94A3AA2DC4F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {8A17C958-5C33-4035-AF76-F94A3AA2DC4F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {8A17C958-5C33-4035-AF76-F94A3AA2DC4F}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | EndGlobal 23 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/DebugSymbolFormat.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Text; 6 | 7 | namespace MonoMod { 8 | public enum DebugSymbolFormat { 9 | Auto, 10 | MDB, 11 | PDB 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModAdded.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "added" attribute. 6 | /// Will be applied by MonoMod automatically on patched types / members. 7 | /// 8 | public class MonoModAdded : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModConstructor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod constructor attribute. 6 | /// Apply it onto a constructor and it will be patched by MonoMod. 7 | /// Or apply it onto a method and it will be handled like a constructor. 8 | /// 9 | public class MonoModConstructor : Attribute { 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModCustomAttribute.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "custom attribute" attribute. 6 | /// Apply it onto a custom attribute type and the supplied handler in your MonoModRules will handle it. 7 | /// Replaces MMIL.Rule.RegisterCustomAttribute in MonoModRules constructor. 8 | /// 9 | public class MonoModCustomAttributeAttribute : Attribute { 10 | public MonoModCustomAttributeAttribute(string h) { 11 | } 12 | } 13 | 14 | /// 15 | /// MonoMod "custom method attribute" attribute. 16 | /// Apply it onto a custom attribute type and the supplied handler in your MonoModRules will handle it. 17 | /// Replaces MMIL.Rule.RegisterCustomMethodAttribute in MonoModRules constructor. 18 | /// 19 | public class MonoModCustomMethodAttributeAttribute : Attribute { 20 | public MonoModCustomMethodAttributeAttribute(string h) { 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModEnumReplace.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod enum replace attribute. 6 | /// Apply it onto a enum type / class and its values will be replaced by MonoMod. 7 | /// 8 | public class MonoModEnumReplace : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModHook.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod hook attribute. 6 | /// Apply it onto a type / method / field and calls to the item it hooks will be relinked to the item the attribute gets applied to. 7 | /// 8 | public class MonoModHook : Attribute { 9 | public MonoModHook(string f) { 10 | } 11 | public MonoModHook(Type f) { 12 | } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModIfFlag.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "if" attribute. 6 | /// Apply it onto a type / method / field and it gets ignored if MonoModder.Data[key] equals false. 7 | /// If fallback (true by default) is false, it also gets ignored if MonoModder.Data[key] is undefined. 8 | /// 9 | public class MonoModIfFlag : Attribute { 10 | public MonoModIfFlag(string key) { 11 | } 12 | public MonoModIfFlag(string key, bool fallback) { 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModIgnore.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod ignore attribute. 6 | /// Apply it onto a method / type and it (except its MonoMod custom attributes) will be ignored by MonoMod. 7 | /// 8 | public class MonoModIgnore : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModInline.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | public static partial class MMIL { 4 | 5 | [Obsolete("Use MMIL.Access instead.")] 6 | public static void DisablePublicAccess() { } 7 | [Obsolete("Use MMIL.Access instead.")] 8 | public static void EnablePublicAccess() { } 9 | [Obsolete("Use [MonoModOnPlatform(...)] on separate methods and [MonoModHook(...)] instead.")] 10 | public static void OnPlatform(params Platform[] p) { } 11 | 12 | public static class Rule { 13 | 14 | public static void RelinkModule(string i, string o) { } 15 | public static void RelinkType(string i, string t) { } 16 | public static void RelinkMember(string i, string t, string n) { } 17 | 18 | public static void Patch(string i, bool b) { } 19 | 20 | public static void RegisterCustomAttribute(string i, string h) { } 21 | public static void RegisterCustomMethodAttribute(string i, string h) { } 22 | 23 | } 24 | 25 | public static class Flag { 26 | 27 | public static bool Get(string k) { return default(bool); } 28 | public static void Set(string k, bool v) { } 29 | 30 | } 31 | 32 | public static class Data { 33 | 34 | public static object Get(string k) { return null; } 35 | public static void Set(string k, object v) { } 36 | 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModLinkTo.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod linkto attribute. 6 | /// Apply it onto a type / method / field and calls to it by mods will be relinked to another target. 7 | /// 8 | public class MonoModLinkTo : Attribute { 9 | public MonoModLinkTo(string t) { 10 | } 11 | public MonoModLinkTo(Type t) { 12 | } 13 | public MonoModLinkTo(string t, string n) { 14 | } 15 | public MonoModLinkTo(Type t, string n) { 16 | } 17 | } 18 | } 19 | 20 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModNoNew.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod "only patch if it exists" attribute. 6 | /// Apply it onto a type or method and it gets ignored if there's no original method in the input module. 7 | /// 8 | public class MonoModNoNew : Attribute { 9 | public MonoModNoNew() { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModOnPlatform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod on platform ("#ifdef PLATFORM") attribute. 6 | /// Apply it onto a type / method / field and it gets ignored on non-matching platforms. 7 | /// 8 | public class MonoModOnPlatform : Attribute { 9 | public MonoModOnPlatform(params Platform[] p) { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModOriginal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod original name. 6 | /// Will be applied by MonoMod automatically on original methods. Use it (or MonoModIgnore) to mark non-"orig_" originals! 7 | /// 8 | public class MonoModOriginal : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModOriginalName.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod original name attribute. 6 | /// Apply it onto a method (not the orig_) and its orig_ method will instead be named like that. 7 | /// 8 | public class MonoModOriginalName : Attribute { 9 | public MonoModOriginalName(string n) { 10 | } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModPatch.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod patch attribute. 6 | /// Apply it onto a type and it will behave as if the type was prefixed with patch_. 7 | /// This allows for custom compile-time names while MonoMod uses the supplied name for any relinking. 8 | /// 9 | public class MonoModPatch : Attribute { 10 | public MonoModPatch(string name) { } 11 | } 12 | } 13 | 14 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModPublic.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod ignore attribute. 6 | /// Apply it onto a method / field / property / type and it will be made public by MonoMod. 7 | /// 8 | public class MonoModPublic : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModRemove.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod remove attribute. 6 | /// Apply it onto a field / method / type and it will be removed by MonoMod. 7 | /// 8 | public class MonoModRemove : Attribute { 9 | } 10 | } 11 | 12 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModReplace.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod replace attribute. 6 | /// Apply it onto a method and no orig_ method will be generated by MonoMod. 7 | /// Apply it onto a field and its attributes and field type will be replaced. 8 | /// Apply it onto a property and it will be removed first, as if you're just adding your own. 9 | /// Apply it onto a type and the original type will be removed first. 10 | /// 11 | public class MonoModReplace : Attribute { 12 | } 13 | } 14 | 15 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/MonoModTargetModule.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace MonoMod { 4 | /// 5 | /// MonoMod target module attribute. 6 | /// Apply it onto a type and it will only be patched in the target module. 7 | /// Important: This attribute acts as a filter. It doesn't affect any other module than the input module. 8 | /// For example, one can define the target assembly version using MonoModTargetModule, 9 | /// or use the same MonoMod mod on multiple differing input assemblies. 10 | /// 11 | public class MonoModTargetModule : Attribute { 12 | public MonoModTargetModule(string name) { } 13 | } 14 | } 15 | 16 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/Platform.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | /// 4 | /// Generic platform enum. 5 | /// 6 | [Flags] 7 | public enum Platform : int { 8 | // Underlying platform categories 9 | OS = 1, 10 | 11 | X86 = 0, 12 | X64 = 2, 13 | 14 | NT = 4, 15 | Unix = 8, 16 | 17 | // Operating systems (OSes are always "and-equal" to OS) 18 | Unknown = OS | 16, 19 | Windows = OS | NT | 32, 20 | MacOS = OS | Unix | 64, 21 | Linux = OS | Unix | 128, 22 | Android = Linux | 256, 23 | iOS = MacOS | 512, // Darwin 24 | 25 | // AMD64 (64bit) variants (always "and-equal" to X64) 26 | Unknown64 = Unknown | X64, 27 | Windows64 = Windows | X64, 28 | MacOS64 = MacOS | X64, 29 | Linux64 = Linux | X64, 30 | Android64 = Android | X64, 31 | iOS64 = iOS | X64 32 | } 33 | -------------------------------------------------------------------------------- /libs/MonoMod/MonoMod/Modifiers/PlatformHelper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | 5 | public static class PlatformHelper { 6 | 7 | static PlatformHelper() { 8 | //for mono, get from 9 | //static extern Platf("System.Void .ctor()").New(); 24 | 25 | // int someInt = e.SomeInt; 26 | int someInt = new Access(e, "SomeInt").Get(); 27 | 28 | // e = new Example(Example.StaticA(), Example.StaticB(Example.StaticB(2, 4), Example.StaticB(8, Example.StaticC("a", "b"))); 29 | e = new StaticAccess("System.Void .ctor(System.String,System.Int32)") 30 | .New( 31 | Something.StaticA(), 32 | new StaticAccess("System.Void StaticB(System.Int32,System.Int32)") 33 | .Call(Something.StaticB(2, 4), Something.StaticB(8, Something.StaticC("a", "b")) 34 | ) 35 | ); 36 | 37 | // someInt = e.SomeInt; 38 | someInt = new Access(e, "SomeInt").Get(); 39 | 40 | // e = new Example("something!", 42); 41 | e = (Something) new StaticAccess("Example", "System.Void .ctor(System.String,System.Int32)").New("something!", 42); 42 | 43 | // e.SomeInt = someInt; 44 | new Access(e, "SomeInt").Set(someInt); 45 | 46 | // Example thing = e.Thing; 47 | Something thing = new Access(e, "Example", "Thing").Get(); 48 | 49 | // e.DoSomething("hooray!"); 50 | new Access(e, "DoSomething").Call("hooray!"); 51 | 52 | // e.Add(ref someInt); 53 | object[] args = new object[] { someInt }; 54 | new Access(e, "Add").Call("Add", args); 55 | someInt = (int) args[0]; 56 | 57 | } 58 | 59 | } 60 | } -------------------------------------------------------------------------------- /libs/MonoMod/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // Information about this assembly is defined by the following attributes. 5 | // Change them to the values specific to your project. 6 | 7 | [assembly: AssemblyTitle ("MonoMod")] 8 | [assembly: AssemblyDescription ("")] 9 | [assembly: AssemblyConfiguration ("")] 10 | [assembly: AssemblyCompany ("")] 11 | [assembly: AssemblyProduct ("")] 12 | [assembly: AssemblyCopyright ("maik")] 13 | [assembly: AssemblyTrademark ("")] 14 | [assembly: AssemblyCulture ("")] 15 | 16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". 17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision, 18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision. 19 | 20 | [assembly: AssemblyVersion ("17.04.*")] 21 | 22 | // The following attributes are used to specify the signing key for the assembly, 23 | // if desired. See the Mono documentation for more information about signing. 24 | 25 | //[assembly: AssemblyDelaySign(false)] 26 | //[assembly: AssemblyKeyFile("")] 27 | 28 | -------------------------------------------------------------------------------- /libs/MonoMod/Properties/AssemblyVersionIdAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | class AssemblyVersionIdAttribute : System.Attribute 5 | { 6 | 7 | public int Id; 8 | 9 | public AssemblyVersionIdAttribute(int id) { 10 | this.Id = id; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /libs/MonoMod/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /libs/Newtonsoft.Json.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/Newtonsoft.Json.dll -------------------------------------------------------------------------------- /libs/README.md: -------------------------------------------------------------------------------- 1 | The versions here are versions stripped with the FmbLibStripper tool. 2 | 3 | # DON'T PUSH THE ORIGINAL VERSION OF THE STRIPPED LIBS! 4 | 5 | Feel free to replace the .dlls **locally** though. 6 | 7 | Files that are not stripped as their full functionality is required: 8 | 9 | * Ionic.Zip.dll 10 | * Mono.Cecil.dll 11 | * PEG.dll (npeg) 12 | * Newtonsoft.Json.dll 13 | -------------------------------------------------------------------------------- /libs/UnityEngine.CoreModule.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/UnityEngine.CoreModule.dll -------------------------------------------------------------------------------- /libs/UnityEngine.IMGUIModule.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/UnityEngine.IMGUIModule.dll -------------------------------------------------------------------------------- /libs/UnityEngine.ImageConversionModule.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/UnityEngine.ImageConversionModule.dll -------------------------------------------------------------------------------- /libs/UnityEngine.TextRenderingModule.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ModTheGungeon/ETGMod/ca6865113dc6e092f4d603c90ec9cc73f592ccd0/libs/UnityEngine.TextRenderingModule.dll -------------------------------------------------------------------------------- /libs/zipstorer/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .suo 3 | **/bin 4 | **/obj 5 | test/.vs/* 6 | netstandard/obj 7 | **/*.nupkg -------------------------------------------------------------------------------- /libs/zipstorer/LICENSE.md: -------------------------------------------------------------------------------- 1 | # The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Jaime Olivares 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /libs/zipstorer/Zipstorer.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ZipStorer 5 | 3.4.0 6 | jaime-olivares 7 | A Pure C# class to store files in Zip 8 | en-US 9 | http://github.com/jaime-olivares/zipstorer 10 | https://github.com/jaime-olivares/zipstorer/blob/master/LICENSE.md 11 | false 12 | zip unzip compress compression 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Windows.Forms; 4 | using System.IO; 5 | 6 | namespace ZipStorerTest 7 | { 8 | static class Program 9 | { 10 | /// 11 | /// The main entry point for the application. 12 | /// 13 | [STAThread] 14 | static void Main() 15 | { 16 | Application.EnableVisualStyles(); 17 | Application.SetCompatibleTextRenderingDefault(false); 18 | Application.Run(new TestForm()); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("ZipStorerTest")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("Hewlett-Packard")] 12 | [assembly: AssemblyProduct("ZipStorerTest")] 13 | [assembly: AssemblyCopyright("Copyright © Hewlett-Packard 2007")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("85dbeb09-d7a1-49a7-96e5-27c66cb45cbd")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace ZipStorerTest.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/ZipStorerDoc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | ZipStorerTest 5 | 6 | 7 | 8 | 9 | Test Form to demonstrate the use of ZipStorer 10 | 11 | 12 | 13 | 14 | Public constructor 15 | 16 | 17 | 18 | 19 | Required designer variable. 20 | 21 | 22 | 23 | 24 | Clean up any resources being used. 25 | 26 | true if managed resources should be disposed; otherwise, false. 27 | 28 | 29 | 30 | Required method for Designer support - do not modify 31 | the contents of this method with the code editor. 32 | 33 | 34 | 35 | 36 | The main entry point for the application. 37 | 38 | 39 | 40 | 41 | A strongly-typed resource class, for looking up localized strings, etc. 42 | 43 | 44 | 45 | 46 | Returns the cached ResourceManager instance used by this class. 47 | 48 | 49 | 50 | 51 | Overrides the current thread's CurrentUICulture property for all 52 | resource lookups using this strongly typed resource class. 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/ZipStorerTest.sln: -------------------------------------------------------------------------------- 1 | Microsoft Visual Studio Solution File, Format Version 12.00 2 | # Visual Studio 14 3 | VisualStudioVersion = 14.0.23107.0 4 | MinimumVisualStudioVersion = 10.0.40219.1 5 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "test", "test.csproj", "{C7BEF132-0048-4FDF-BC1E-C776DE0983AE}" 6 | EndProject 7 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "lib", "..\lib\lib.csproj", "{69B1B1EA-F10C-4F8E-BA08-48A16B993305}" 8 | EndProject 9 | Global 10 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 11 | Debug|Any CPU = Debug|Any CPU 12 | Release|Any CPU = Release|Any CPU 13 | EndGlobalSection 14 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 15 | {C7BEF132-0048-4FDF-BC1E-C776DE0983AE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 16 | {C7BEF132-0048-4FDF-BC1E-C776DE0983AE}.Debug|Any CPU.Build.0 = Debug|Any CPU 17 | {C7BEF132-0048-4FDF-BC1E-C776DE0983AE}.Release|Any CPU.ActiveCfg = Release|Any CPU 18 | {C7BEF132-0048-4FDF-BC1E-C776DE0983AE}.Release|Any CPU.Build.0 = Release|Any CPU 19 | {69B1B1EA-F10C-4F8E-BA08-48A16B993305}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 20 | {69B1B1EA-F10C-4F8E-BA08-48A16B993305}.Debug|Any CPU.Build.0 = Debug|Any CPU 21 | {69B1B1EA-F10C-4F8E-BA08-48A16B993305}.Release|Any CPU.ActiveCfg = Release|Any CPU 22 | {69B1B1EA-F10C-4F8E-BA08-48A16B993305}.Release|Any CPU.Build.0 = Release|Any CPU 23 | EndGlobalSection 24 | GlobalSection(SolutionProperties) = preSolution 25 | HideSolutionNode = FALSE 26 | EndGlobalSection 27 | EndGlobal 28 | -------------------------------------------------------------------------------- /libs/zipstorer/demo/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /libs/zipstorer/net20/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Zipstorer")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Zipstorer")] 12 | [assembly: AssemblyCopyright("Copyright © Jaime Olivares 2017")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("69b1b1ea-f10c-4f8e-ba08-48a16b993305")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("3.4.0.0")] 35 | [assembly: AssemblyFileVersion("3.4.0.0")] 36 | -------------------------------------------------------------------------------- /libs/zipstorer/net20/Zipstorer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {69B1B1EA-F10C-4F8E-BA08-48A16B993305} 8 | Library 9 | Properties 10 | ZipStorer 11 | ZipStorer 12 | v2.0 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | DEBUG;TRACE 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | 38 | 39 | 40 | ZipStorer.cs 41 | 42 | 43 | 44 | 45 | 52 | -------------------------------------------------------------------------------- /libs/zipstorer/net45/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | // General Information about an assembly is controlled through the following 5 | // set of attributes. Change these attribute values to modify the information 6 | // associated with an assembly. 7 | [assembly: AssemblyTitle("Zipstorer")] 8 | [assembly: AssemblyDescription("")] 9 | [assembly: AssemblyConfiguration("")] 10 | [assembly: AssemblyCompany("")] 11 | [assembly: AssemblyProduct("Zipstorer")] 12 | [assembly: AssemblyCopyright("Copyright © Jaime Olivares 2017")] 13 | [assembly: AssemblyTrademark("")] 14 | [assembly: AssemblyCulture("")] 15 | 16 | // Setting ComVisible to false makes the types in this assembly not visible 17 | // to COM components. If you need to access a type in this assembly from 18 | // COM, set the ComVisible attribute to true on that type. 19 | [assembly: ComVisible(false)] 20 | 21 | // The following GUID is for the ID of the typelib if this project is exposed to COM 22 | [assembly: Guid("69b1b1ea-f10c-4f8e-ba08-48a16b993305")] 23 | 24 | // Version information for an assembly consists of the following four values: 25 | // 26 | // Major Version 27 | // Minor Version 28 | // Build Number 29 | // Revision 30 | // 31 | // You can specify all the values or you can default the Build and Revision Numbers 32 | // by using the '*' as shown below: 33 | // [assembly: AssemblyVersion("1.0.*")] 34 | [assembly: AssemblyVersion("3.4.0.0")] 35 | [assembly: AssemblyFileVersion("3.4.0.0")] 36 | -------------------------------------------------------------------------------- /libs/zipstorer/net45/Zipstorer.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {1A30C0E0-46B7-4939-BD6B-1293B197F6B0} 8 | Library 9 | Properties 10 | ZipStorer 11 | ZipStorer 12 | v4.5.2 13 | 512 14 | 15 | 16 | 17 | true 18 | full 19 | false 20 | bin\Debug\ 21 | TRACE;DEBUG;NET45 22 | prompt 23 | 4 24 | false 25 | 26 | 27 | pdbonly 28 | true 29 | bin\Release\ 30 | TRACE;NET45 31 | prompt 32 | 4 33 | false 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | ZipStorer.cs 42 | 43 | 44 | 45 | 46 | 53 | -------------------------------------------------------------------------------- /libs/zipstorer/netstandard/netstandard.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Zipstorer 5 | ZipStorer 6 | 3.4.0.0 7 | Jaime Olivares 8 | netstandard1.6 9 | $(DefineConstants);NETSTANDARD 10 | ZipStorer 11 | netstandard 12 | 1.6.0 13 | Library 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | --------------------------------------------------------------------------------