mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-06-26 00:29:30 +00:00
Some fixes to quest log.
This commit is contained in:
parent
6375b8aad1
commit
30405be0c2
Binary file not shown.
|
@ -2358,6 +2358,7 @@ class A2PackPartitions
|
|||
compileModule("intimate", "src/plasma/")
|
||||
compileModule("automap", "src/plasma/")
|
||||
compileModule("sndseq", "src/plasma/")
|
||||
compileModule("questlog", "src/plasma/")
|
||||
lastSysModule = modules.size() // used only for reporting
|
||||
compileModule("gen_enemies", "src/plasma/")
|
||||
compileModule("gen_items", "src/plasma/")
|
||||
|
@ -3230,7 +3231,7 @@ end
|
|||
def orderNum = row.@Order.toFloat()
|
||||
withContext("step $orderNum")
|
||||
{
|
||||
out.println "def step_${orderNum.toString().replace(".","_")}(callback)#0"
|
||||
out.println "def step_${orderNum.toString().replace(".","_")}(callback)"
|
||||
|
||||
def descrip = row.@Description?.trim()
|
||||
assert descrip && descrip != "" : "missing description"
|
||||
|
@ -3260,10 +3261,11 @@ end
|
|||
out.println(" callback(${escapeString(descrip)}, $portraitCode, " +
|
||||
"$map1Num, $map1X, $map1Y, $map2Num, $map2X, $map2Y)")
|
||||
}
|
||||
out.println " return 0"
|
||||
out.println "end\n"
|
||||
}
|
||||
|
||||
out.println "def quest_$mainNum(callback)#0"
|
||||
out.println "def quest_$mainNum(callback)"
|
||||
out.println " word name"
|
||||
out.println " name = ${escapeString(questName)}"
|
||||
|
||||
|
@ -3285,11 +3287,12 @@ end
|
|||
|
||||
def flagName = triggerFlag ? "GF_"+humanNameToSymbol(triggerFlag, true) : 0
|
||||
def itemName = triggerItem ? escapeString(triggerItem) : "NULL"
|
||||
out.println(" callback($mainNum, ${idx+1}, name, " +
|
||||
out.println(" callback(${idx}, name, " +
|
||||
"$flagName, $itemName, @step_${orderNum.toString().replace(".","_")})")
|
||||
}
|
||||
}
|
||||
|
||||
out.println " return 0"
|
||||
out.println "end\n"
|
||||
}
|
||||
|
||||
|
@ -3333,8 +3336,9 @@ end
|
|||
quests.keySet().sort().each { mainNum -> genQuest(mainNum, quests[mainNum], out) }
|
||||
|
||||
// And generate one function that calls them all
|
||||
out.println "def allQuests(callback)#0"
|
||||
quests.keySet().sort().each { mainNum -> out.println(" callback(@quest_$mainNum)") }
|
||||
out.println "def allQuests(callback)"
|
||||
quests.keySet().sort().each { mainNum -> out.println(" callback($mainNum, @quest_$mainNum)") }
|
||||
out.println " return 0"
|
||||
out.println "end\n"
|
||||
|
||||
out.println "// The main routine - just returns the generator"
|
||||
|
|
|
@ -55,6 +55,7 @@ include "diskops.plh"
|
|||
include "intimate.plh"
|
||||
include "godmode.plh"
|
||||
include "automap.plh"
|
||||
include "questlog.plh"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Data structures
|
||||
|
@ -2812,6 +2813,8 @@ export def setPortrait(portraitNum)#0
|
|||
word srcData
|
||||
byte part, cx, cy, cursX, cursY
|
||||
|
||||
if portraitNum == curPortraitNum; return; fin
|
||||
|
||||
clearPortrait()
|
||||
|
||||
// We're going to switch windows. Save the cursor pos in the text window.
|
||||
|
@ -3200,6 +3203,13 @@ export def printMem()#1
|
|||
return 0
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
def showQuests()#1
|
||||
loadEngine(MOD_QUESTLOG)=>questlog_showQuests()
|
||||
returnFromEngine(TRUE) // do render
|
||||
return 0
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Set up the command table for 3D mode
|
||||
def initCmds()#0
|
||||
|
@ -3221,6 +3231,7 @@ def initCmds()#0
|
|||
cmdTbl[$07] = @toggleGodMode // ctrl-G
|
||||
cmdTbl[' '] = @snooze // "space out" (snooze)
|
||||
cmdTbl['-'] = @showAutomap
|
||||
cmdTbl['0'] = @showQuests
|
||||
if global->b_godmode
|
||||
// install cheat commands
|
||||
cmdTbl['T'] = @cheatCmd
|
||||
|
@ -3445,7 +3456,7 @@ export def addXP_all(val)#0
|
|||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Initialize XP (and skill pts) for newly created character
|
||||
// Initialize XP (and skill pts) for newly created character (called by packer code)
|
||||
export def initPlayerXP(player)#0
|
||||
player->b_skillPoints = callGlobalFunc(GS_LEVEL_S_P, player->b_level, 0, 0)
|
||||
player=>w_curXP = callGlobalFunc(GS_LEVEL_X_P, player->b_level, 0, 0)
|
||||
|
@ -3648,15 +3659,12 @@ end
|
|||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
export def buySell(storeCode, profitRatio)#0
|
||||
word portrait
|
||||
portrait = curPortraitNum
|
||||
if storeCode
|
||||
loadEngine(MOD_STORE)=>store_buyFromStore(storeCode, profitRatio)
|
||||
else
|
||||
loadEngine(MOD_STORE)=>store_sellToStore(profitRatio)
|
||||
fin
|
||||
returnFromEngine(FALSE) // no render, we're mid-script
|
||||
if portrait; setPortrait(portrait); fin
|
||||
end
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in New Issue
Block a user