瀏覽代碼

Remove School Bus

Removed the school bus option from bus and improved orginization of recursive-macro with comments
tags/v1.0.1
jsb5468 6 年之前
父節點
當前提交
ab7443f230
共有 1 個文件被更改,包括 54 次插入23 次删除
  1. +54
    -23
      recursive-macro.js

+ 54
- 23
recursive-macro.js 查看文件

@@ -3,21 +3,28 @@
var things = var things =
{ {
"Container": Container, "Container": Container,

//Creatures
"Person": Person, "Person": Person,
"Human": Human, "Human": Human,
"Cow": Cow, "Cow": Cow,
"Micro": Micro,
"Macro": Macro,
//Vehicles
"Empty Car": EmptyCar, "Empty Car": EmptyCar,
"Car": Car, "Car": Car,
"Bus": Bus, "Bus": Bus,
"Tram": Tram, "Tram": Tram,
"Train": Train,
"Train Car": TrainCar,
//Buildings
"House": House, "House": House,
"Business": Business, "Business": Business,
"Barn": Barn, "Barn": Barn,
"Small Skyscraper": SmallSkyscraper, "Small Skyscraper": SmallSkyscraper,
"Large Skyscraper": LargeSkyscraper, "Large Skyscraper": LargeSkyscraper,
"Train": Train,
"Train Car": TrainCar,
"Parking Garage": ParkingGarage, "Parking Garage": ParkingGarage,
//Places
"Town": Town, "Town": Town,
"City": City, "City": City,
"Continent": Continent, "Continent": Continent,
@@ -28,12 +35,11 @@ var things =
"Cluster": Cluster, "Cluster": Cluster,
"Universe": Universe, "Universe": Universe,
"Multiverse": Multiverse, "Multiverse": Multiverse,
//Military
"Soldier": Soldier, "Soldier": Soldier,
"Tank": Tank, "Tank": Tank,
"Artillery": Artillery, "Artillery": Artillery,
"Helicopter": Helicopter, "Helicopter": Helicopter,
"Micro": Micro,
"Macro": Macro,
"Squad": Squad, "Squad": Squad,
"Platoon": Platoon, "Platoon": Platoon,
"Company": Company, "Company": Company,
@@ -47,20 +53,26 @@ var things =
var areas = var areas =
{ {
"Container": 0, "Container": 0,
//Creatures
"Person": 0.33, "Person": 0.33,
"Human": 0.33, "Human": 0.33,
"Cow": 2, "Cow": 2,
"Micro": 0.05,
"Macro": 100,
//Vehicles
"Car": 4, "Car": 4,
"Bus": 12, "Bus": 12,
"Tram": 20, "Tram": 20,
"Train": 40,
"Train Car": 20,
//Buildings
"House": 150, "House": 150,
"Business": 400, "Business": 400,
"Barn": 300, "Barn": 300,
"Small Skyscraper": 1000, "Small Skyscraper": 1000,
"Large Skyscraper": 2000, "Large Skyscraper": 2000,
"Train": 40,
"Train Car": 20,
"Parking Garage": 750, "Parking Garage": 750,
//Places
"Town": 1e7, "Town": 1e7,
"City": 1e9, "City": 1e9,
"Continent": 1.5e13, "Continent": 1.5e13,
@@ -71,12 +83,11 @@ var areas =
"Cluster": 2e49, "Cluster": 2e49,
"Universe": 7e53, "Universe": 7e53,
"Multiverse": 5e56, "Multiverse": 5e56,
//Military
"Soldier": 1, "Soldier": 1,
"Tank": 10, "Tank": 10,
"Artillery": 12, "Artillery": 12,
"Helicopter": 8, "Helicopter": 8,
"Micro": 0.05,
"Macro": 100,
"Squad": 20, "Squad": 20,
"Platoon": 100, "Platoon": 100,
"Company": 500, "Company": 500,
@@ -90,20 +101,26 @@ var areas =
var masses = var masses =
{ {
"Container": 0, "Container": 0,
//Creatures
"Person": 80, "Person": 80,
"Human": 80, "Human": 80,
"Cow": 300, "Cow": 300,
"Micro": 0.01,
"Macro": 80000,
//Vehicles
"Car": 1000, "Car": 1000,
"Bus": 5000, "Bus": 5000,
"Tram": 10000, "Tram": 10000,
"Train": 50000,
"Train Car": 7500,
//Buildings
"House": 10000, "House": 10000,
"Business": 50000, "Business": 50000,
"Barn": 5000, "Barn": 5000,
"Small Skyscraper": 10000000, "Small Skyscraper": 10000000,
"Large Skyscraper": 80000000, "Large Skyscraper": 80000000,
"Train": 50000,
"Train Car": 7500,
"Parking Garage": 10000000, "Parking Garage": 10000000,
//Places
"Town": 1, "Town": 1,
"City": 1, "City": 1,
"Continent": 1e21, "Continent": 1e21,
@@ -114,12 +131,11 @@ var masses =
"Cluster": 1, "Cluster": 1,
"Universe": 1, "Universe": 1,
"Multiverse": 1, "Multiverse": 1,
//Military
"Soldier": 80, "Soldier": 80,
"Tank": 5000, "Tank": 5000,
"Artillery": 7000, "Artillery": 7000,
"Helicopter": 1500, "Helicopter": 1500,
"Micro": 0.01,
"Macro": 80000,
"Squad": 1, "Squad": 1,
"Platoon": 100, "Platoon": 100,
"Company": 500, "Company": 500,
@@ -133,20 +149,26 @@ var masses =
var clusters = var clusters =
{ {
"Container": 0, "Container": 0,
//Creatures
"Person": 5, "Person": 5,
"Human": 5, "Human": 5,
"Cow": 15, "Cow": 15,
"Micro": 10,
"Macro": 0,
//Vehicles
"Car": 3, "Car": 3,
"Bus": 1, "Bus": 1,
"Tram": 1, "Tram": 1,
"Train": 2,
"Train Car": 1,
//Buildings
"House": 5, "House": 5,
"Business": 5, "Business": 5,
"Barn": 1, "Barn": 1,
"Small Skyscraper": 2, "Small Skyscraper": 2,
"Large Skyscraper": 1, "Large Skyscraper": 1,
"Train": 2,
"Train Car": 1,
"Parking Garage": 1, "Parking Garage": 1,
//Places
"Town": 5, "Town": 5,
"City": 1, "City": 1,
"Continent": 5, "Continent": 5,
@@ -157,12 +179,11 @@ var clusters =
"Cluster": 1, "Cluster": 1,
"Universe": 1, "Universe": 1,
"Multiverse": 1, "Multiverse": 1,
//Military
"Soldier": 0, "Soldier": 0,
"Tank": 0, "Tank": 0,
"Artillery": 0, "Artillery": 0,
"Helicopter": 0, "Helicopter": 0,
"Micro": 10,
"Macro": 0,
"Squad": 20, "Squad": 20,
"Platoon": 2, "Platoon": 2,
"Company": 2, "Company": 2,
@@ -176,20 +197,26 @@ var clusters =
var cluster_chances = var cluster_chances =
{ {
"Container": 0, "Container": 0,
//Creatures
"Person": 0.8, "Person": 0.8,
"Human": 0.8, "Human": 0.8,
"Cow": 0.5, "Cow": 0.5,
"Micro": 10,
"Macro": 0,
//Vehicles
"Car": 0.5, "Car": 0.5,
"Bus": 0.25, "Bus": 0.25,
"Tram": 0.2, "Tram": 0.2,
"Train": 0.1,
"Train Car": 0.05,
//Buildings
"House": 0.5, "House": 0.5,
"Business": .05, "Business": .05,
"Barn": 0.1, "Barn": 0.1,
"Small Skyscraper": 0.25, "Small Skyscraper": 0.25,
"Large Skyscraper": 0.25, "Large Skyscraper": 0.25,
"Train": 0.1,
"Train Car": 0.05,
"Parking Garage": 0.1, "Parking Garage": 0.1,
//Places
"Town": 0.1, "Town": 0.1,
"City": 0.2, "City": 0.2,
"Continent": 0.5, "Continent": 0.5,
@@ -200,12 +227,11 @@ var cluster_chances =
"Cluster": 1, "Cluster": 1,
"Universe": 1, "Universe": 1,
"Multiverse": 1, "Multiverse": 1,
//Military
"Soldier": 0, "Soldier": 0,
"Tank": 0, "Tank": 0,
"Artillery": 0, "Artillery": 0,
"Helicopter": 0, "Helicopter": 0,
"Micro": 10,
"Macro": 0,
"Squad": .05, "Squad": .05,
"Platoon": .05, "Platoon": .05,
"Company": .1, "Company": .1,
@@ -219,20 +245,26 @@ var cluster_chances =
var contents = var contents =
{ {
"Container": [], "Container": [],
//Creatures
"Person": [], "Person": [],
"Human": [], "Human": [],
"Cow": [], "Cow": [],
"Micro": [[]],
"Macro": [[]],
//Vehicles
"Car": [["Person",1,4]], "Car": [["Person",1,4]],
"Bus": [["Person",2,30]], "Bus": [["Person",2,30]],
"Tram": [["Person",10,50]], "Tram": [["Person",10,50]],
"Train": [["Person",1,4,"engine"],["Train Car",2,10]], "Train": [["Person",1,4,"engine"],["Train Car",2,10]],
"Train Car": [["Person",10,40]], "Train Car": [["Person",10,40]],
//Buildings
"House": [["Person",0,8],["Empty Car",0,2]], "House": [["Person",0,8],["Empty Car",0,2]],
"Business": [["Person",0,30],["Car",0,20]], "Business": [["Person",0,30],["Car",0,20]],
"Barn": [["Person",0,2],["Cow",30,70]], "Barn": [["Person",0,2],["Cow",30,70]],
"Small Skyscraper": [["Person",150,750],["Empty Car",10,50]], "Small Skyscraper": [["Person",150,750],["Empty Car",10,50]],
"Large Skyscraper": [["Person",500,1500],["Empty Car",20,100]], "Large Skyscraper": [["Person",500,1500],["Empty Car",20,100]],
"Parking Garage": [["Person",10,200],["Empty Car",100,300],["Car",5,30]], "Parking Garage": [["Person",10,200],["Empty Car",100,300],["Car",5,30]],
//Places
"Town": [["Person",10000,100000],["House",5000,50000],["Empty Car",200,800],["Car",500,80000],["Bus",5,25],["Train",5,25],["Business",500,5000]], "Town": [["Person",10000,100000],["House",5000,50000],["Empty Car",200,800],["Car",500,80000],["Bus",5,25],["Train",5,25],["Business",500,5000]],
"City": [["Person",100000,1500000],["House",20000,200000],["Empty Car",10000,100000],["Car",7500,125000],["Bus",200,400],["Train",10,50],["Tram",25,100],["Small Skyscraper",50,300],["Large Skyscraper",10,75],["Parking Garage",5,10],["Business",2000,10000]], "City": [["Person",100000,1500000],["House",20000,200000],["Empty Car",10000,100000],["Car",7500,125000],["Bus",200,400],["Train",10,50],["Tram",25,100],["Small Skyscraper",50,300],["Large Skyscraper",10,75],["Parking Garage",5,10],["Business",2000,10000]],
"Continent": [["Person",1000000,15000000],["House",2500,10000],["Car",25000,375000],["Train",50,500],["Town",500,1000],["City",50,250],["Business",250,1000]], "Continent": [["Person",1000000,15000000],["House",2500,10000],["Car",25000,375000],["Train",50,500],["Town",500,1000],["City",50,250],["Business",250,1000]],
@@ -243,12 +275,11 @@ var contents =
"Cluster": [["Galaxy",200,5000]], "Cluster": [["Galaxy",200,5000]],
"Universe": [["Cluster",1.5e9,2.5e9]], "Universe": [["Cluster",1.5e9,2.5e9]],
"Multiverse": [["Universe",100,1000]], "Multiverse": [["Universe",100,1000]],
//Military
"Soldier": [], "Soldier": [],
"Tank": [["Soldier",3,5]], "Tank": [["Soldier",3,5]],
"Artillery": [["Soldier",4,6]], "Artillery": [["Soldier",4,6]],
"Helicopter": [["Soldier",4,16]], "Helicopter": [["Soldier",4,16]],
"Micro": [[]],
"Macro": [[]],
//Alterante Army Structuring, may be used later //Alterante Army Structuring, may be used later
//"Squad": [["Soldier",6,9]], //"Squad": [["Soldier",6,9]],
// "Platoon": [["Squad",3,4]], // "Platoon": [["Squad",3,4]],
@@ -861,7 +892,7 @@ function Bus(count = 1) {
this.describeOne = function(verbose=true) { this.describeOne = function(verbose=true) {
var adjective = random_desc(["rusty","brand-new","aging","modern"], (verbose ? 0.3 : 0)); var adjective = random_desc(["rusty","brand-new","aging","modern"], (verbose ? 0.3 : 0));
var color = random_desc(["black","tan","gray"], (verbose ? 1 : 0)); var color = random_desc(["black","tan","gray"], (verbose ? 1 : 0));
var type = random_desc(["bus","school bus","double-decker bus","articulating bus","open-top bus","sleeper bus","intercity bus"]);
var type = random_desc(["bus","double-decker bus","articulating bus","open-top bus","sleeper bus","intercity bus"]);
return "a " + merge_desc([adjective,color,type]); return "a " + merge_desc([adjective,color,type]);
}; };




Loading…
取消
儲存