67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
// :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
|
|
//:::::::::::::::::::::::: Shayan's Subrace Engine :::::::::::::::::::::::::::::
|
|
// ::::::::::Extension: Moon's Subrace Selection Converstion for SSE :::::::::::
|
|
// ::::::::::::Contact: http://p2.forumforfree.com/shayan.html::::::::::::::::::
|
|
// ::::
|
|
// :::: Written by: DM_Moon
|
|
// ::
|
|
// :: Description: Subrace Conversation used in SSE's Wand system.
|
|
// ::
|
|
#include "mn_conv_inc"
|
|
#include "sha_wand_inc"
|
|
void moon_DoDialogChoice(int nChoice)
|
|
{
|
|
int iCall = GetLocalInt(oMySpeaker, "mn_call" + IntToString(nChoice));
|
|
int iFunction = GetLocalInt(oMySpeaker, "mn_function"+IntToString(nChoice));
|
|
int iCallParams = GetLocalInt(oMySpeaker, "mn_params"+IntToString(nChoice));
|
|
|
|
int iMenu = GetLocalInt(oMySpeaker, "mn_menu"+IntToString(nChoice) );
|
|
ActionPauseConversation();
|
|
int i;
|
|
object oTarget;
|
|
if(iCall & CONV_DO_FUNCTION)
|
|
{
|
|
iCall &= ~CONV_DO_FUNCTION;
|
|
switch(iFunction)
|
|
{
|
|
case FUNCTION_DO_RESET:
|
|
StartNewModule(GetModuleName());
|
|
break;
|
|
case FUNCTION_BUILD_CACHE:
|
|
moon_BuildCache();
|
|
break;
|
|
case FUNCTION_CACHE_2_TARGET:
|
|
SetMyTarget(GetLocalObject(oMySpeaker,
|
|
"moon_object_cache" +
|
|
IntToString( iCallParams )
|
|
) );
|
|
DelayCommand(1.0, moon_CleanCache());
|
|
break;
|
|
case FUNCTION_CHANGE_SUBRACE:
|
|
SHA_SendSubraceMessageToPC(oMySpeaker, "Switching the player's subrace... please wait.");
|
|
ChangeSubrace(GetMyTarget(), iCallParams);
|
|
iCall = CONV_START;
|
|
break;
|
|
case FUNCTION_DO_DISABLE_ENGINE:
|
|
i = !GetLocalInt(GetArea(oMySpeaker), "DISABLE_SUBRACE_ENGINE");
|
|
SetLocalInt(GetArea(oMySpeaker), "DISABLE_SUBRACE_ENGINE", i);
|
|
break;
|
|
case FUNCTION_DO_SHUTDOWN_ENGINE:
|
|
i = !GetLocalInt(GetModule(), "SHUTDOWN_SSE");
|
|
SetLocalInt(GetModule(), "SHUTDOWN_SSE", i);
|
|
i?ShutdownSSE():StartSSE();
|
|
SHA_SendSubraceMessageToPC(oMySpeaker, "Switching the SSE " + (i?"Off":"On") + ".");
|
|
break;
|
|
case FUNCTION_RELOAD_SUBRACE:
|
|
ReapplySubraceAbilities(GetMyTarget() );
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
moon_BuildConversation( iCall & CONV_REMOVE_PARAM , iCallParams, iFunction, iMenu);
|
|
ActionResumeConversation();
|
|
|
|
}
|
|
|