mirror of
https://bitbucket.org/grumdrig/pq-web.git
synced 2026-09-29 08:44:00 -06:00
Use DNA (not tested)
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
// Copyright (c)2002-2010 Eric Fredricksen <e@fredricksen.net> all rights reserved
|
// Copyright (c)2002-2010 Eric Fredricksen <e@fredricksen.net> all rights reserved
|
||||||
|
|
||||||
// TODO: All these Hints
|
// TODO: All these Hints
|
||||||
|
// TODO: Test use of seed as DNA
|
||||||
|
|
||||||
// revs:
|
// revs:
|
||||||
// 6: pq 6.3/web
|
// 6: pq 6.3/web
|
||||||
@@ -791,31 +792,14 @@ function CompleteAct() {
|
|||||||
|
|
||||||
|
|
||||||
function Log(line) {
|
function Log(line) {
|
||||||
/* TODO
|
if (game.log)
|
||||||
if (FLogEvents) {
|
game.log[+new Date()] = line;
|
||||||
var logname = ChangeFileExt(GameSaveName(), '.log');
|
// TODO: and now what?
|
||||||
DateTimeToString(stamp, '[yyyy-mm-dd hh:nn:ss]', Now);
|
|
||||||
AssignFile(log, logname);
|
|
||||||
if (FileExists(logname)) Append(log); else Rewrite(log);
|
|
||||||
WriteLn(log, stamp + ' ' + line);
|
|
||||||
Flush(log);
|
|
||||||
CloseFile(log);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
function ExportCharSheet() {
|
|
||||||
/* TODO
|
|
||||||
AssignFile(f, ChangeFileExt(GameSaveName(), '.sheet'));
|
|
||||||
Rewrite(f);
|
|
||||||
Write(f, CharSheet());
|
|
||||||
Flush(f);
|
|
||||||
CloseFile(f);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function CharSheet() {
|
function CharSheet() {
|
||||||
return template("sheet", game);
|
return template("sheet", game);
|
||||||
|
// TODO: make this a separate page
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1137,11 +1121,13 @@ function SaveGame() {
|
|||||||
HotOrNot();
|
HotOrNot();
|
||||||
game.date = ''+new Date();
|
game.date = ''+new Date();
|
||||||
game.stamp = +new Date();
|
game.stamp = +new Date();
|
||||||
|
game.seed = randseed();
|
||||||
return addToRoster(game);
|
return addToRoster(game);
|
||||||
}
|
}
|
||||||
|
|
||||||
function LoadGame(sheet) {
|
function LoadGame(sheet) {
|
||||||
game = sheet;
|
game = sheet;
|
||||||
|
randseed(game.seed);
|
||||||
$.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();
|
ClearAllSelections();
|
||||||
|
|||||||
@@ -142,6 +142,7 @@ function sold() {
|
|||||||
name: $("#Name").val(),
|
name: $("#Name").val(),
|
||||||
race: $("input:radio[name=Race]:checked").val(),
|
race: $("input:radio[name=Race]:checked").val(),
|
||||||
'class': $("input:radio[name=Class]:checked").val(),
|
'class': $("input:radio[name=Class]:checked").val(),
|
||||||
|
dna: stats.seed,
|
||||||
seed: stats.seed,
|
seed: stats.seed,
|
||||||
birthday: ''+new Date(),
|
birthday: ''+new Date(),
|
||||||
birthstamp: +new Date();
|
birthstamp: +new Date();
|
||||||
|
|||||||
Reference in New Issue
Block a user