mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 00:34:00 -06:00
Use checkboxes for plot and quests
This commit is contained in:
@@ -149,15 +149,6 @@
|
|||||||
<div class="scroll listbox">
|
<div class="scroll listbox">
|
||||||
<table>
|
<table>
|
||||||
<tbody id="Quests">
|
<tbody id="Quests">
|
||||||
<tr>
|
|
||||||
<td><input type=checkbox checked= disabled=> Kill all the Bads
|
|
||||||
</tr>
|
|
||||||
<tr><td> ☑ Kill all the Bads</tr>
|
|
||||||
<tr><td> ☒ Kill all the Bads</tr>
|
|
||||||
<tr><td> ☐ Kill all the Bads</tr>
|
|
||||||
<tr><td> ✓ Kill all the Bads</tr>
|
|
||||||
<tr><td> ✔ Kill all the Bads</tr>
|
|
||||||
<tr><td> <s>Kill all the Bads</s></tr>
|
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -439,11 +439,6 @@ function ProgressBar(id) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function alert(k) {
|
|
||||||
Plots.Add(k);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function ListBox(id, columns, fixedkeys) {
|
function ListBox(id, columns, fixedkeys) {
|
||||||
this.id = id;
|
this.id = id;
|
||||||
this.box = $("#"+ id);
|
this.box = $("#"+ id);
|
||||||
@@ -451,7 +446,8 @@ function ListBox(id, columns, fixedkeys) {
|
|||||||
this.fixedkeys = fixedkeys;
|
this.fixedkeys = fixedkeys;
|
||||||
|
|
||||||
this.Add = function (caption) {
|
this.Add = function (caption) {
|
||||||
var tr = $("<tr><td>" + caption + "</td></tr>");
|
var tr = $("<tr><td><input type=checkbox disabled> " +
|
||||||
|
caption + "</td></tr>");
|
||||||
tr.appendTo(this.box);
|
tr.appendTo(this.box);
|
||||||
tr.each(function () {this.scrollIntoView();});
|
tr.each(function () {this.scrollIntoView();});
|
||||||
game[this.id].last = caption;
|
game[this.id].last = caption;
|
||||||
@@ -555,9 +551,6 @@ function GoButtonClick() {
|
|||||||
StartTimer();
|
StartTimer();
|
||||||
SaveGame();
|
SaveGame();
|
||||||
Brag('s');
|
Brag('s');
|
||||||
|
|
||||||
//AddR(Spells, "Lasers", 3);
|
|
||||||
//alert("DEBUG " + GetI(Stats, 3));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -672,8 +665,10 @@ function CompleteQuest() {
|
|||||||
/*$IFDEF LOGGING*/
|
/*$IFDEF LOGGING*/
|
||||||
Log('Quest completed: ' + Quests.last().text());
|
Log('Quest completed: ' + Quests.last().text());
|
||||||
/*$ENDIF*/
|
/*$ENDIF*/
|
||||||
Quests.last().wrap("<s/>");
|
|
||||||
|
Quests.rows().find("input:checkbox").attr("checked", "true");
|
||||||
[WinSpell,WinEquip,WinStat,WinItem][Random(4)]();
|
[WinSpell,WinEquip,WinStat,WinItem][Random(4)]();
|
||||||
|
}
|
||||||
while (Quests.length() > 99)
|
while (Quests.length() > 99)
|
||||||
Quests.remove(0);
|
Quests.remove(0);
|
||||||
|
|
||||||
@@ -722,10 +717,8 @@ function CompleteQuest() {
|
|||||||
}
|
}
|
||||||
Quests.Add(caption);
|
Quests.Add(caption);
|
||||||
|
|
||||||
/*$IFDEF LOGGING*/
|
|
||||||
Log('Commencing quest: ' + caption);
|
Log('Commencing quest: ' + caption);
|
||||||
/*$ENDIF*/
|
|
||||||
}
|
|
||||||
SaveGame();
|
SaveGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,7 +778,7 @@ function toArabic(s) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function CompleteAct() {
|
function CompleteAct() {
|
||||||
Plots.last().wrap("<s/>");
|
Plots.rows().find("input:checkbox").attr("checked", "true");
|
||||||
PlotBar.reset(60 * 60 * (1 + 5 * Plots.length())); // 1 hr + 5/act
|
PlotBar.reset(60 * 60 * (1 + 5 * Plots.length())); // 1 hr + 5/act
|
||||||
PlotBar.Hint = 'Cutscene omitted';
|
PlotBar.Hint = 'Cutscene omitted';
|
||||||
Plots.Add('Act ' + toRoman(Plots.length()));
|
Plots.Add('Act ' + toRoman(Plots.length()));
|
||||||
@@ -797,7 +790,6 @@ function CompleteAct() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*$IFDEF LOGGING*/
|
|
||||||
function Log(line) {
|
function Log(line) {
|
||||||
/* TODO
|
/* TODO
|
||||||
if (FLogEvents) {
|
if (FLogEvents) {
|
||||||
@@ -811,7 +803,6 @@ function Log(line) {
|
|||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
/*$ENDIF*/
|
|
||||||
|
|
||||||
function ExportCharSheet() {
|
function ExportCharSheet() {
|
||||||
/* TODO
|
/* TODO
|
||||||
@@ -1195,9 +1186,12 @@ function LoadGame(sheet) {
|
|||||||
game = sheet;
|
game = sheet;
|
||||||
$.each(AllBars.concat(AllLists), function (i, e) { e.load(game); });
|
$.each(AllBars.concat(AllLists), function (i, e) { e.load(game); });
|
||||||
Kill.text(game.kill);
|
Kill.text(game.kill);
|
||||||
|
ClearAllSelections();
|
||||||
|
$.each([Plots,Quests], function () {
|
||||||
|
this.rows().find("input:checkbox").not(':last').attr("checked", "true");
|
||||||
|
});
|
||||||
Log('Loaded game: ' + name);
|
Log('Loaded game: ' + name);
|
||||||
StartTimer();
|
StartTimer();
|
||||||
ClearAllSelections();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).unload(function () {
|
$(document).unload(function () {
|
||||||
|
|||||||
Reference in New Issue
Block a user