mirror of
https://github.com/doublespeakgames/adarkroom.git
synced 2026-05-28 00:01:54 +08:00
set down framework, storage/map gen/etc.
This commit is contained in:
+3
-2
@@ -15,8 +15,8 @@
|
||||
<meta itemprop="name" property="og:title" content="A Dark Room" />
|
||||
<link rel="shortcut icon" href="favicon.ico" />
|
||||
<link rel="image_src" href="img/adr.png" />
|
||||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
|
||||
<!-- <script src="lib/jquery.min.js"></script> -->
|
||||
<!-- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script> -->
|
||||
<script src="lib/jquery.min.js"></script>
|
||||
<script src="lib/jquery.color-2.1.2.min.js"></script>
|
||||
<script src="lib/jquery.event.move.js"></script>
|
||||
<script src="lib/jquery.event.swipe.js"></script>
|
||||
@@ -32,6 +32,7 @@
|
||||
<script src="script/path.js"></script>
|
||||
<script src="script/ship.js"></script>
|
||||
<script src="script/space.js"></script>
|
||||
<script src="script/prestige.js"></script>
|
||||
<!-- Event modules -->
|
||||
<script src="script/events/global.js"></script>
|
||||
<script src="script/events/room.js"></script>
|
||||
|
||||
Vendored
+6
File diff suppressed because one or more lines are too long
@@ -3392,5 +3392,54 @@ Events.Setpieces = {
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"cache": { /* Cache - contains some of supplies from previous game */
|
||||
title: 'An Underground Cache',
|
||||
scenes: {
|
||||
'start': {
|
||||
text: [
|
||||
'a destroyed village stands before you',
|
||||
'with bodies littering the ground.'
|
||||
],
|
||||
notification: 'you smell the metallic tang of a wanderer afterburner.',
|
||||
buttons: {
|
||||
'enter': {
|
||||
text: 'enter',
|
||||
nextScene: {1: 'underground'}
|
||||
},
|
||||
'leave': {
|
||||
text: 'leave',
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
},
|
||||
'underground': {
|
||||
text: [
|
||||
'a small shack stands at the center of the village.',
|
||||
'there are still supplies inside.'
|
||||
],
|
||||
buttons: {
|
||||
'take': {
|
||||
text: 'take',
|
||||
nextScene: {1: 'exit'}
|
||||
}
|
||||
}
|
||||
},
|
||||
'exit': {
|
||||
text: [
|
||||
'all the work of a previous generation is here.',
|
||||
'ripe for the picking.'
|
||||
],
|
||||
onLoad: function() {
|
||||
World.markVisited(World.curPos[0], World.curPos[1]);
|
||||
},
|
||||
buttons: {
|
||||
'leave': {
|
||||
text: 'leave',
|
||||
nextScene: 'end'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
var Prestige = {
|
||||
name: 'Prestige',
|
||||
|
||||
options: {},
|
||||
|
||||
init: function(options) {
|
||||
this.options = $.extend(
|
||||
this.options,
|
||||
options
|
||||
);
|
||||
},
|
||||
|
||||
save: function() {
|
||||
prevStores = [ //g = goods, w = weapons, a = ammo
|
||||
$SM.get('stores["wood"]'), // randGen('g'),
|
||||
$SM.get('stores["fur"]'), // randGen('g'),
|
||||
$SM.get('stores["meat"]'), // randGen('g'),
|
||||
$SM.get('stores["iron"]'), // randGen('g'),
|
||||
$SM.get('stores["coal"]'), // randGen('g'),
|
||||
$SM.get('stores["sulphur"]'), // randGen('g'),
|
||||
$SM.get('stores["steel"]'), // randGen('g'),
|
||||
$SM.get('stores["cured meat"]'), // randGen('g'),
|
||||
$SM.get('stores["scales"]'), // randGen('g'),
|
||||
$SM.get('stores["teeth"]'), // randGen('g'),
|
||||
$SM.get('stores["leather"]'), // randGen('g'),
|
||||
$SM.get('stores["bait"]'), // randGen('g'),
|
||||
$SM.get('stores["torch"]'), // randGen('g'),
|
||||
$SM.get('stores["cloth"]'), // randGen('g'),
|
||||
$SM.get('stores["bone spear"]'), // randGen('w'),
|
||||
$SM.get('stores["iron sword"]'), // randGen('w'),
|
||||
$SM.get('stores["steel sword"]'), // randGen('w'),
|
||||
$SM.get('stores["bayonet"]'), // randGen('w'),
|
||||
$SM.get('stores["rifle"]'), // randGen('w'),
|
||||
$SM.get('stores["laser rifle"]'), // randGen('w'),
|
||||
$SM.get('stores["bullets"]'), // randGen('a'),
|
||||
$SM.get('stores["energy cell"]'), // randGen('a'),
|
||||
$SM.get('stores["grenade"]'), // randGen('a'),
|
||||
$SM.get('stores["bolas"]') // randGen('a')
|
||||
];
|
||||
return prevStores;
|
||||
},
|
||||
|
||||
/*randGen: function(storeType) {
|
||||
if (storeType == 'g') {
|
||||
divisor = Math.floor(Math.random()*10)
|
||||
}
|
||||
else if (storeType == 'w') {
|
||||
divisor = Math.floor(Math.floor(Math.random()*10)/2)
|
||||
}
|
||||
else if (storeType == 'a') {
|
||||
divisor = Math.floor(Math.random()*10*Math.floor(Math.random()*10/5))
|
||||
}
|
||||
else { divisor = 1 };
|
||||
if (divisor === 0) {
|
||||
divisor = 1
|
||||
};
|
||||
return divisor;
|
||||
}*/
|
||||
|
||||
}
|
||||
@@ -386,6 +386,7 @@ var Space = {
|
||||
$('#notifyGradient').attr('style', 'background-color:'+cur+';background:-webkit-' + s + ';background:' + s);
|
||||
},
|
||||
complete: function() {
|
||||
Prestige.save();
|
||||
$('#starsContainer').remove();
|
||||
if(typeof Storage != 'undefined' && localStorage) {
|
||||
localStorage.clear();
|
||||
|
||||
+7
-5
@@ -19,7 +19,8 @@ var World = {
|
||||
SHIP: 'W',
|
||||
BOREHOLE: 'B',
|
||||
BATTLEFIELD: 'F',
|
||||
SWAMP: 'M'
|
||||
SWAMP: 'M',
|
||||
CACHE: 'U'
|
||||
},
|
||||
TILE_PROBS: {},
|
||||
LANDMARKS: {},
|
||||
@@ -123,10 +124,11 @@ var World = {
|
||||
World.LANDMARKS[World.TILE.CAVE] = { num: 5, minRadius: 3, maxRadius: 10, scene: 'cave', label: 'A Damp Cave' };
|
||||
World.LANDMARKS[World.TILE.TOWN] = { num: 10, minRadius: 10, maxRadius: 20, scene: 'town', label: 'An Abandoned Town' };
|
||||
World.LANDMARKS[World.TILE.CITY] = { num: 20, minRadius: 20, maxRadius: World.RADIUS * 1.5, scene: 'city', label: 'A Ruined City' };
|
||||
World.LANDMARKS[World.TILE.SHIP] = {num: 1, minRadius: 28, maxRadius: 28, scene: 'ship', label: 'A Crashed Starship'};
|
||||
World.LANDMARKS[World.TILE.BOREHOLE] = {num: 10, minRadius: 15, maxRadius: World.RADIUS * 1.5, scene: 'borehole', label: 'A Borehole'};
|
||||
World.LANDMARKS[World.TILE.BATTLEFIELD] = {num: 5, minRadius: 18, maxRadius: World.RADIUS * 1.5, scene: 'battlefield', label: 'A Battlefield'};
|
||||
World.LANDMARKS[World.TILE.SWAMP] = {num: 1, minRadius: 15, maxRadius: World.RADIUS * 1.5, scene: 'swamp', label: 'A Murky Swamp'};
|
||||
World.LANDMARKS[World.TILE.SHIP] = { num: 1, minRadius: 28, maxRadius: 28, scene: 'ship', label: 'A Crashed Starship'};
|
||||
World.LANDMARKS[World.TILE.BOREHOLE] = { num: 10, minRadius: 15, maxRadius: World.RADIUS * 1.5, scene: 'borehole', label: 'A Borehole'};
|
||||
World.LANDMARKS[World.TILE.BATTLEFIELD] = { num: 5, minRadius: 18, maxRadius: World.RADIUS * 1.5, scene: 'battlefield', label: 'A Battlefield'};
|
||||
World.LANDMARKS[World.TILE.SWAMP] = { num: 1, minRadius: 15, maxRadius: World.RADIUS * 1.5, scene: 'swamp', label: 'A Murky Swamp'};
|
||||
World.LANDMARKS[World.TILE.CACHE] = { num: 1, minRadius: 10, maxRadius: World.RADIUS * 1.5, scene: 'cache', label: 'An Underground Cache'};
|
||||
|
||||
if(typeof $SM.get('features.location.world') == 'undefined') {
|
||||
$SM.set('features.location.world', true);
|
||||
|
||||
Reference in New Issue
Block a user