Skip to content

Commit

Permalink
Minor tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
jennie committed Nov 4, 2023
1 parent be0ca64 commit 03d6d16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 19 deletions.
File renamed without changes
18 changes: 0 additions & 18 deletions twine_src/scripts/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,16 +176,7 @@ setup.renderPlanetPassage = function (planetIndex) {
var scenarioData = setup.showRandomIncompleteScenario();
var scenarioContent = scenarioData.content;
var passageContent = "";

// Only render the passage if relatedPassage is not null
if (scenarioData.relatedPassage) {
passageContent = window.story.render(scenarioData.relatedPassage);
} else {
console.error("relatedPassage is null for scenario", scenarioData);
}

var content = planetContent + scenarioContent + passageContent;

var mapScreen = document.getElementById("mapScreen");
var passageContainer = document.getElementById("passageContainer");
var hud = document.getElementById("hud");
Expand Down Expand Up @@ -214,15 +205,6 @@ setup.returnToMap = function () {
// story.state.currentPlanetIndex = null;
};

setup.renderRelatedPassage = function (passageName) {
// Assuming you have a function that returns the content of a passage given its name
var passageContent = setup.getPassageContent(passageName);
if (passageContent) {
story.render(passageName);
}
return "<p>Related passage not found.</p>";
};

setup.showRandomIncompleteScenario = function () {
var incompleteScenarios = setup.game.scenarios.filter(function (scenario) {
return !scenario.complete;
Expand Down
4 changes: 3 additions & 1 deletion twine_src/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,9 @@ html {
}

#sidebar {
height: 100%;
height: 100vh;
width: 30vw;
min-width: 300px;
background-color: #333;
color: white;
padding: 20px;
Expand Down

0 comments on commit 03d6d16

Please sign in to comment.