Use DNA (not tested)

This commit is contained in:
Eric Fredricksen
2010-07-06 00:34:27 -07:00
parent 8b04760309
commit f597f85ff9
2 changed files with 8 additions and 21 deletions
+7 -21
View File
@@ -1,6 +1,7 @@
// Copyright (c)2002-2010 Eric Fredricksen <e@fredricksen.net> all rights reserved
// TODO: All these Hints
// TODO: Test use of seed as DNA
// revs:
// 6: pq 6.3/web
@@ -791,31 +792,14 @@ function CompleteAct() {
function Log(line) {
/* TODO
if (FLogEvents) {
var logname = ChangeFileExt(GameSaveName(), '.log');
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);
*/
if (game.log)
game.log[+new Date()] = line;
// TODO: and now what?
}
function CharSheet() {
return template("sheet", game);
// TODO: make this a separate page
}
@@ -1137,11 +1121,13 @@ function SaveGame() {
HotOrNot();
game.date = ''+new Date();
game.stamp = +new Date();
game.seed = randseed();
return addToRoster(game);
}
function LoadGame(sheet) {
game = sheet;
randseed(game.seed);
$.each(AllBars.concat(AllLists), function (i, e) { e.load(game); });
Kill.text(game.kill);
ClearAllSelections();
+1
View File
@@ -142,6 +142,7 @@ function sold() {
name: $("#Name").val(),
race: $("input:radio[name=Race]:checked").val(),
'class': $("input:radio[name=Class]:checked").val(),
dna: stats.seed,
seed: stats.seed,
birthday: ''+new Date(),
birthstamp: +new Date();