Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Greenway location, bench sublocation, Seated Student character … #14

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions CharacterData.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ public class CharacterData {
"She won't let you call her anything else. Loves girl scout cookies.", LocationData.downStairs);
public static Character vault = new Character("The Wall Safe",
"This contains all of the security tapes generated from the various CCTV cameras", LocationData.hallway);
public static Character seatedStudent = new Character("Seated Student",
"The student is looking rather intently at their textbook. I think it's best to leave them be.", LocationData.greenway);

public static boolean loadCharacterData () {
// Scripts wiring
Expand Down Expand Up @@ -190,6 +192,14 @@ public static boolean loadCharacterData () {
List.of(ItemData.securityTape)
)
),
new AbstractMap.SimpleEntry<>(
"There's a student with red on their hands at the Greenway!",
new DialogNode(
"Jill? Studying for her interview? She tried to help me clean the panther statue earlier."
+ " And unsuccessfully I might add.",
List.of(ItemData.redHandedNote)
)
),
new AbstractMap.SimpleEntry<>(
"Based on the evidence I've gathered, I believe Glenda is the true culprit",
new DialogNode(
Expand Down Expand Up @@ -264,6 +274,49 @@ public static boolean loadCharacterData () {
)
)
);

seatedStudent.setScript(
new DialogNode(
"I really think we should leave them alone. It's rude to interrupt someone's studies!",
null,
List.of(
new AbstractMap.SimpleEntry<>(
"Take a step closer",
new DialogNode(
"You hesitantly take a step closer...",
null,
List.of(
new AbstractMap.SimpleEntry<>(
"Examine the textbook.",
new DialogNode(
"You look at their textbook. It's Cracking the Coding Interview! A classic." +
" However you notice the student's hands look to have a bit of red on them!" +
" You quickly make note of the student...",
ItemData.redHandedNote
)
),
new AbstractMap.SimpleEntry<>(
"Call out to them.",
new DialogNode(
"Huh? Buzz off I'm studying, don't you know it's rude to interrupt someone's studies?"
)
),
new AbstractMap.SimpleEntry<>(
"Chicken out.",
new DialogNode(
"You turn to leave."
)
)
)
)
),
new AbstractMap.SimpleEntry<>(
"Leave",
new DialogNode("You leave the student alone, on with the mystery!")
)
)
)
);
return true;
}
}
4 changes: 4 additions & 0 deletions ItemData.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public class ItemData {
"Shows proof that Glenda has been doing considerably well since the incident.");
public static Item cookies = new Item("Cookies",
"Delicious cookies from the cookie stall near the panther statue");
public static Item redHandedNote = new Item("A Note of the Red Handed Student",
"A note you made of a student \"reading\" their textbook.");

public static boolean loadItemData() {
// Item wiring
Expand All @@ -35,6 +37,8 @@ public static boolean loadItemData() {
CharacterData.glenda.addToInventory(List.of(redMarker, receiptOfTotalSale, cookies));

CharacterData.vault.addToInventory(securityTape);

CharacterData.seatedStudent.addToInventory(redHandedNote);
return true;
}
}
26 changes: 25 additions & 1 deletion LocationData.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ public class LocationData {
"You are at Langdale Hall, also known as the Language Building.");
public static Location admissionsOffice = new Location("Admissions Office",
"You are at the Admissions Office. Steve Sminkle regularly lounges around the Admissions Office seemingly always... looking for something");

public static Location greenway = new Location("Greenway",
"This pretty park is much better than the old building that used to be here." +
" You notice a Seated Student near a tree, studying.");
// sublocations
// General Sublocation - these can exist in any location
public static Location vendingMachine = new Location("Vending Machine",
Expand Down Expand Up @@ -36,6 +38,10 @@ public class LocationData {
"There appears to be a small lounge area with an appropriately small fridge. " +
"There is also a wall safe containing the CCTV servers");

// Greenway
public static Location bench = new Location("Bench",
"You could take a quick rest. The mystery doesn't seem like it's going anywhere.");

public static boolean loadLocationData() {
office.addPerson(CharacterData.steveSminkle);

Expand All @@ -47,9 +53,13 @@ public static boolean loadLocationData() {

hallway.addPerson(CharacterData.vault);

greenway.addPerson(CharacterData.seatedStudent);

// student center
studentCenter.addNeighbor("further west", admissionsOffice);

studentCenter.addNeighbor("northwest", greenway);

studentCenter.addNeighbor("west", cookieStall);
cookieStall.addNeighbor("back", studentCenter);

Expand All @@ -61,9 +71,12 @@ public static boolean loadLocationData() {

// langdale hall
langdaleHall.addNeighbor("further east", admissionsOffice);

langdaleHall.addNeighbor("northeast", greenway);

langdaleHall.addNeighbor("inside", insideLangdale);
insideLangdale.addNeighbor("outside", langdaleHall);
insideLangdale.addNeighbor("backdoor", greenway);

insideLangdale.addNeighbor("right", vendingMachine);
vendingMachine.addNeighbor("back", langdaleHall);
Expand All @@ -74,13 +87,24 @@ public static boolean loadLocationData() {
// admissions office
admissionsOffice.addNeighbor("further east", studentCenter);
admissionsOffice.addNeighbor("further west", langdaleHall);
admissionsOffice.addNeighbor("south", greenway);

admissionsOffice.addNeighbor("inside", office);
office.addNeighbor("outside", admissionsOffice);

office.addNeighbor("left", hallway);
hallway.addNeighbor("right", office);

// greenway
greenway.addNeighbor("southwest", langdaleHall);
greenway.addNeighbor("southeast", studentCenter);
greenway.addNeighbor("north", admissionsOffice);
greenway.addNeighbor("upstairs", insideLangdale);

greenway.addNeighbor("sit down", bench);
bench.addNeighbor("get up", greenway);
bench.addNeighbor("wait", bench);

return true;
}
}
11 changes: 11 additions & 0 deletions story/Locations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,14 @@ Access:
- The user can find the Lemon by examining the Vending Machine. This prompts the text “You attempt to get the chips out but all that came out was this Lemon.”
- The user can only access the Janitor from Down The Stairs. Xavier is accessible from Inside Langdale Hall.

------

Name: Greenway
Description: This pretty park is much better than the old building that used to be here.
NPCs: Seated Student
Objects:
Required Objects:
Sublocations:
- Bench: You could take a quick rest. The mystery doesn't seem like it's going anywhere.
Access:
-