-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from CWolfs/develop
v0.4.5
- Loading branch information
Showing
11 changed files
with
265 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"key": "Add Flashpoint", | ||
"label": "Add a flashpoint", | ||
"view": ["label", "inputs"], | ||
"scope": "action", | ||
"category": "primary", | ||
"inputs": [ | ||
{ | ||
"label": "Flashpoint Id", | ||
"types": ["operation", "string"], | ||
"viewLabel": "with id '{value}'", | ||
"tooltip": "Flashpoint Id (e.g. fp_allianceDavion). Can be empty to select a random Flashpoint." | ||
}, | ||
{ | ||
"label": "System Name", | ||
"types": ["operation", "string"], | ||
"viewLabel": "in system '{value}'", | ||
"tooltip": "Should be in the format of 'starsystemdef_Smithon' but can work with just 'Smithon'. Can be empty for a random system selection. Can be 'local' for local system." | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
src/Patches/ForceNonFPConferenceRoom/SimGameConversationManagerEndConversationPatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using Harmony; | ||
|
||
using BattleTech; | ||
using isogame; | ||
|
||
using ExtendedConversations.Core; | ||
|
||
namespace ExtendedConversations { | ||
[HarmonyPatch(typeof(SimGameConversationManager), "EndConversation")] | ||
public class SimGameConversationManagerEndConversationPatch { | ||
static void Prefix(SimGameConversationManager __instance) { | ||
Conversation conversation = (Conversation)AccessTools.Field(typeof(SimGameConversationManager), "thisConvoDef").GetValue(__instance); | ||
|
||
if (Actions.ActiveConversation == conversation) { | ||
Actions.ForceNextIsInFlashpointCheckFalse = false; | ||
Actions.ActiveConversation = null; | ||
} | ||
} | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/Patches/ForceNonFPConferenceRoom/SimGameStateIsInFlashpointPatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Harmony; | ||
|
||
using BattleTech; | ||
|
||
using ExtendedConversations.Core; | ||
|
||
namespace ExtendedConversations { | ||
[HarmonyPatch(typeof(SimGameState), "IsInFlashpoint", MethodType.Getter)] | ||
public class SimGameStateIsInFlashpointPatch { | ||
static void Postfix(SimGameState __instance, ref bool __result) { | ||
if (Actions.ForceNextIsInFlashpointCheckFalse) { | ||
Main.Logger.Log("[SimGameStateIsInFlashpointPatch] Forcing to use non-FP conference room"); | ||
__result = false; | ||
} | ||
} | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/Patches/KameaTalkingOnCommand/SGRoomControllerCmdCenterCharacterClickedOnPatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Harmony; | ||
|
||
using BattleTech; | ||
using BattleTech.UI; | ||
|
||
namespace ExtendedConversations { | ||
[HarmonyPatch(typeof(SGRoomController_CmdCenter), "CharacterClickedOn")] | ||
public class SGRoomControllerCmdCenterCharacterClickedOnPatch { | ||
static void Postfix(SGRoomController_CmdCenter __instance, SimGameState.SimGameCharacterType characterClicked) { | ||
if (characterClicked == SimGameState.SimGameCharacterType.KAMEA) { | ||
UnityGameInstance.Instance.Game.Simulation.ConversationManager.BeginCharacterConversation(SimGameState.SimGameCharacterType.KAMEA); | ||
} | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/Patches/KameaTalkingOnCommand/SGRoomControllerCmdCenterIsDiegeticInThisRoomPatch.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using Harmony; | ||
|
||
using BattleTech; | ||
using BattleTech.UI; | ||
|
||
namespace ExtendedConversations { | ||
[HarmonyPatch(typeof(SGRoomController_CmdCenter), "IsDiegeticInThisRoom")] | ||
public class SGRoomControllerCmdCenterIsDiegeticInThisRoomPatch { | ||
static void Postfix(SGRoomController_CmdCenter __instance, SimGameState.SimGameCharacterType diegetic, ref bool __result) { | ||
if (diegetic == SimGameState.SimGameCharacterType.KAMEA) __result = true; | ||
} | ||
} | ||
} |
Oops, something went wrong.