diff --git a/game.html b/game.html index d33ae25..5e8a125 100644 --- a/game.html +++ b/game.html @@ -16,6 +16,7 @@ Game Rules Questions + Spawn diff --git a/index.html b/index.html index 131e3a7..a8b5229 100644 --- a/index.html +++ b/index.html @@ -12,6 +12,7 @@ Game Rules Questions + Spawn

The Civilization Screen

Welcome to the civilization screen.

diff --git a/questions.html b/questions.html index 6b159a7..c5282be 100644 --- a/questions.html +++ b/questions.html @@ -15,6 +15,7 @@ Game Rules Questions + Spawn

Our Little Interview

@@ -27,7 +28,7 @@
  • The How Questions
  • - +

    The Who Questions

    Welcome to the server! It seems like you're interested diff --git a/resources/spawn/buildings.json b/resources/spawn/buildings.json new file mode 100644 index 0000000..1ea68ab --- /dev/null +++ b/resources/spawn/buildings.json @@ -0,0 +1,22 @@ +{ + "buildings": { + "rule-house":{ + "id": "rule-house", + "name": "Rule House", + "use": "This building is where the rule signs are located. The signs should be accessible to read and should be the most important part of the room.", + "designed": true, + "started": true, + "completed": true, + "populated": true + }, + "marketplace":{ + "id": "marketplace", + "name": "Marketplace", + "use": "Here players can gather around, buying, selling, and trading materials. There should be plenty of space for players to set up their own shops, stands and stores", + "designed": false, + "started": false, + "completed": false, + "populated": false + } + } +} diff --git a/resources/spawn/progress-table.js b/resources/spawn/progress-table.js new file mode 100644 index 0000000..29600d8 --- /dev/null +++ b/resources/spawn/progress-table.js @@ -0,0 +1,64 @@ +window.onload = function(){ + function addRow(building){ + $nameElement = $("") + $nameElement.attr("id", building.id + "-progress.name") + $nameElement.append(building.name); + + $useElement = $(""); + $useElement.attr("id", building.id + "-progress.use"); + $useElement.append(building.use) + + $designedElement = $(""); + $designedElement.attr("id", building.id + "-progress.designed"); + $designedElement.addClass("checkboxCell"); + $designedElement.append( + $("") + .attr("type", "checkbox") + .attr("id", building.id + ".designed?") + .attr("checked", building.designed))f; + + $startedElement = $(""); + $startedElement.attr("id", building.id + "-progress.stated"); + $startedElement.addClass("checkboxCell"); + $startedElement.append( + $("") + .attr("type", "checkbox") + .attr("id", building.id + ".started?") + .attr("checked", building.started)); + + $completedElement = $(""); + $completedElement.attr("id", building.id + "-progress.completed"); + $completedElement.addClass("checkboxCell"); + $completedElement.append( + $("") + .attr("type", "checkbox") + .attr("id", building.id + ".completed?") + .attr("checked", building.completed)); + + $populatedElement = $(""); + $populatedElement.attr("id", building.id + "-progress.populated"); + $populatedElement.addClass("checkboxCell"); + $populatedElement.append( + $("") + .attr("type", "checkbox") + .attr("id", building.id + ".populated?") + .attr("checked", building.populated)); + + + $outputRow = $(""); + $outputRow.attr("id", building.id + "-progress"); + $outputRow.append($nameElement); + $outputRow.append($useElement); + $outputRow.append($designedElement); + $outputRow.append($startedElement); + $outputRow.append($completedElement); + $outputRow.append($populatedElement); + return $outputRow; + } + console.info("loading"); + $.getJSON("./resources/spawn/buildings.json", "", function(file){ + for(const buildingName in file.buildings){ + $("#progress-table").append(addRow(file.buildings[buildingName])); + } + }); +} diff --git a/resources/spawn/spawn.css b/resources/spawn/spawn.css new file mode 100644 index 0000000..cf5b870 --- /dev/null +++ b/resources/spawn/spawn.css @@ -0,0 +1,18 @@ +#progress-table{ + font-family: "Calibri"; + margin: 10px; + align: center; +} +#progress-table th{ + border-bottom: solid gray; + border-width: thin; +} +#progress-table td{ + border-bottom: solid lightgray; + border-width: thin; + max-width: 500px; + padding: 5px; +} +#progress-table .checkboxCell { + text-align: center; +} diff --git a/rules.html b/rules.html index 9184d8b..9722ef0 100644 --- a/rules.html +++ b/rules.html @@ -12,6 +12,7 @@ Game Rules Questions + Spawn

    The Rules

    diff --git a/sandbox.html b/sandbox.html index 3072ef1..487cfd7 100644 --- a/sandbox.html +++ b/sandbox.html @@ -14,6 +14,7 @@ Game Rules Questions + Spawn

    Developer's Sandbox

    diff --git a/spawn.html b/spawn.html new file mode 100644 index 0000000..e3df36f --- /dev/null +++ b/spawn.html @@ -0,0 +1,35 @@ + + + + + Spawn Progress + + + + + +

    Spawn Progress Tracker

    + +

    NOTE: THIS TRACKER IS UNFINISHED AN WILL NOT SAVE DATA, USE AT OWN RISK

    + + + + + + +
    Name + Use + Designed + Started + Completed + Populated +
    + +