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">
|
||||
<table>
|
||||
<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>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -439,11 +439,6 @@ function ProgressBar(id) {
|
||||
}
|
||||
|
||||
|
||||
function alert(k) {
|
||||
Plots.Add(k);
|
||||
}
|
||||
|
||||
|
||||
function ListBox(id, columns, fixedkeys) {
|
||||
this.id = id;
|
||||
this.box = $("#"+ id);
|
||||
@@ -451,7 +446,8 @@ function ListBox(id, columns, fixedkeys) {
|
||||
this.fixedkeys = fixedkeys;
|
||||
|
||||
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.each(function () {this.scrollIntoView();});
|
||||
game[this.id].last = caption;
|
||||
@@ -555,9 +551,6 @@ function GoButtonClick() {
|
||||
StartTimer();
|
||||
SaveGame();
|
||||
Brag('s');
|
||||
|
||||
//AddR(Spells, "Lasers", 3);
|
||||
//alert("DEBUG " + GetI(Stats, 3));
|
||||
}
|
||||
|
||||
|
||||
@@ -672,8 +665,10 @@ function CompleteQuest() {
|
||||
/*$IFDEF LOGGING*/
|
||||
Log('Quest completed: ' + Quests.last().text());
|
||||
/*$ENDIF*/
|
||||
Quests.last().wrap("<s/>");
|
||||
|
||||
Quests.rows().find("input:checkbox").attr("checked", "true");
|
||||
[WinSpell,WinEquip,WinStat,WinItem][Random(4)]();
|
||||
}
|
||||
while (Quests.length() > 99)
|
||||
Quests.remove(0);
|
||||
|
||||
@@ -722,10 +717,8 @@ function CompleteQuest() {
|
||||
}
|
||||
Quests.Add(caption);
|
||||
|
||||
/*$IFDEF LOGGING*/
|
||||
Log('Commencing quest: ' + caption);
|
||||
/*$ENDIF*/
|
||||
}
|
||||
|
||||
SaveGame();
|
||||
}
|
||||
|
||||
@@ -785,7 +778,7 @@ function toArabic(s) {
|
||||
}
|
||||
|
||||
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.Hint = 'Cutscene omitted';
|
||||
Plots.Add('Act ' + toRoman(Plots.length()));
|
||||
@@ -797,7 +790,6 @@ function CompleteAct() {
|
||||
}
|
||||
|
||||
|
||||
/*$IFDEF LOGGING*/
|
||||
function Log(line) {
|
||||
/* TODO
|
||||
if (FLogEvents) {
|
||||
@@ -811,7 +803,6 @@ function Log(line) {
|
||||
}
|
||||
*/
|
||||
}
|
||||
/*$ENDIF*/
|
||||
|
||||
function ExportCharSheet() {
|
||||
/* TODO
|
||||
@@ -1195,9 +1186,12 @@ function LoadGame(sheet) {
|
||||
game = sheet;
|
||||
$.each(AllBars.concat(AllLists), function (i, e) { e.load(game); });
|
||||
Kill.text(game.kill);
|
||||
ClearAllSelections();
|
||||
$.each([Plots,Quests], function () {
|
||||
this.rows().find("input:checkbox").not(':last').attr("checked", "true");
|
||||
});
|
||||
Log('Loaded game: ' + name);
|
||||
StartTimer();
|
||||
ClearAllSelections();
|
||||
}
|
||||
|
||||
$(document).unload(function () {
|
||||
|
||||
Reference in New Issue
Block a user