diff --git a/src/audio/music/computer-wing.ogg b/src/audio/music/computer-wing.ogg
new file mode 100644
index 000000000..869aee438
Binary files /dev/null and b/src/audio/music/computer-wing.ogg differ
diff --git a/src/audio/music/greendales-the-way-it-goes.ogg b/src/audio/music/greendales-the-way-it-goes.ogg
new file mode 100644
index 000000000..a836b1ad6
Binary files /dev/null and b/src/audio/music/greendales-the-way-it-goes.ogg differ
diff --git a/src/images/enemies/billy.png b/src/images/enemies/billy.png
new file mode 100644
index 000000000..89d6a786e
Binary files /dev/null and b/src/images/enemies/billy.png differ
diff --git a/src/images/improvements/airplane.png b/src/images/improvements/airplane.png
new file mode 100644
index 000000000..982e6bf1d
Binary files /dev/null and b/src/images/improvements/airplane.png differ
diff --git a/src/images/improvements/hologram-drugs.png b/src/images/improvements/hologram-drugs.png
new file mode 100644
index 000000000..8d75983c7
Binary files /dev/null and b/src/images/improvements/hologram-drugs.png differ
diff --git a/src/images/improvements/hologram-laser.png b/src/images/improvements/hologram-laser.png
new file mode 100644
index 000000000..edc99b7df
Binary files /dev/null and b/src/images/improvements/hologram-laser.png differ
diff --git a/src/images/improvements/hologram.png b/src/images/improvements/hologram.png
new file mode 100644
index 000000000..8136778ff
Binary files /dev/null and b/src/images/improvements/hologram.png differ
diff --git a/src/images/improvements/shirleySandwich.png b/src/images/improvements/shirleySandwich.png
new file mode 100644
index 000000000..45793989d
Binary files /dev/null and b/src/images/improvements/shirleySandwich.png differ
diff --git a/src/images/npc/bursar.png b/src/images/npc/bursar.png
new file mode 100644
index 000000000..b7846eb0b
Binary files /dev/null and b/src/images/npc/bursar.png differ
diff --git a/src/images/npc/bursar_menu.png b/src/images/npc/bursar_menu.png
new file mode 100644
index 000000000..af67db65d
Binary files /dev/null and b/src/images/npc/bursar_menu.png differ
diff --git a/src/images/npc/hologram.png b/src/images/npc/hologram.png
new file mode 100644
index 000000000..62fbfdf02
Binary files /dev/null and b/src/images/npc/hologram.png differ
diff --git a/src/images/npc/hologram_menu.png b/src/images/npc/hologram_menu.png
new file mode 100644
index 000000000..adaae5043
Binary files /dev/null and b/src/images/npc/hologram_menu.png differ
diff --git a/src/images/npc/todd-sandwich.png b/src/images/npc/todd-sandwich.png
new file mode 100644
index 000000000..83b9e8aa3
Binary files /dev/null and b/src/images/npc/todd-sandwich.png differ
diff --git a/src/images/npc/todd-sandwich_menu.png b/src/images/npc/todd-sandwich_menu.png
new file mode 100644
index 000000000..adaae5043
Binary files /dev/null and b/src/images/npc/todd-sandwich_menu.png differ
diff --git a/src/images/shopping/improvements.png b/src/images/shopping/improvements.png
new file mode 100644
index 000000000..8b57c0a4b
Binary files /dev/null and b/src/images/shopping/improvements.png differ
diff --git a/src/images/sprites/greendale/airplane2.png b/src/images/sprites/greendale/airplane2.png
new file mode 100644
index 000000000..7108e3dcb
Binary files /dev/null and b/src/images/sprites/greendale/airplane2.png differ
diff --git a/src/images/sprites/greendale/bar.png b/src/images/sprites/greendale/bar.png
new file mode 100644
index 000000000..dc4d889ed
Binary files /dev/null and b/src/images/sprites/greendale/bar.png differ
diff --git a/src/images/sprites/greendale/bass.png b/src/images/sprites/greendale/bass.png
new file mode 100644
index 000000000..3dbd2781f
Binary files /dev/null and b/src/images/sprites/greendale/bass.png differ
diff --git a/src/images/sprites/greendale/piano.png b/src/images/sprites/greendale/piano.png
new file mode 100644
index 000000000..85cfe4666
Binary files /dev/null and b/src/images/sprites/greendale/piano.png differ
diff --git a/src/images/sprites/greendale/profCornwallis.png b/src/images/sprites/greendale/profCornwallis.png
new file mode 100644
index 000000000..02741e852
Binary files /dev/null and b/src/images/sprites/greendale/profCornwallis.png differ
diff --git a/src/images/sprites/greendale/singer.png b/src/images/sprites/greendale/singer.png
new file mode 100644
index 000000000..9f7bdd2ac
Binary files /dev/null and b/src/images/sprites/greendale/singer.png differ
diff --git a/src/images/sprites/greendale/speakeasy-microphone.png b/src/images/sprites/greendale/speakeasy-microphone.png
new file mode 100644
index 000000000..fcbdae5e9
Binary files /dev/null and b/src/images/sprites/greendale/speakeasy-microphone.png differ
diff --git a/src/images/sprites/greendale/speakeasy-sign.png b/src/images/sprites/greendale/speakeasy-sign.png
new file mode 100644
index 000000000..a801f93c5
Binary files /dev/null and b/src/images/sprites/greendale/speakeasy-sign.png differ
diff --git a/src/images/sprites/greendale/speakeasy-table-1.png b/src/images/sprites/greendale/speakeasy-table-1.png
new file mode 100644
index 000000000..532333d50
Binary files /dev/null and b/src/images/sprites/greendale/speakeasy-table-1.png differ
diff --git a/src/images/sprites/greendale/speakeasy-table-2.png b/src/images/sprites/greendale/speakeasy-table-2.png
new file mode 100644
index 000000000..86d13e87d
Binary files /dev/null and b/src/images/sprites/greendale/speakeasy-table-2.png differ
diff --git a/src/images/sprites/greendale/speakeasy-table-3.png b/src/images/sprites/greendale/speakeasy-table-3.png
new file mode 100644
index 000000000..93f96931d
Binary files /dev/null and b/src/images/sprites/greendale/speakeasy-table-3.png differ
diff --git a/src/images/tilesets/greendale-bursar.png b/src/images/tilesets/greendale-bursar.png
new file mode 100644
index 000000000..8533ef9e2
Binary files /dev/null and b/src/images/tilesets/greendale-bursar.png differ
diff --git a/src/images/tilesets/greendale-exterior.png b/src/images/tilesets/greendale-exterior.png
index f27c6c841..2dea42a46 100644
Binary files a/src/images/tilesets/greendale-exterior.png and b/src/images/tilesets/greendale-exterior.png differ
diff --git a/src/images/tilesets/greendale-hallways.png b/src/images/tilesets/greendale-hallways.png
index f98d8aa1f..584e6b896 100644
Binary files a/src/images/tilesets/greendale-hallways.png and b/src/images/tilesets/greendale-hallways.png differ
diff --git a/src/images/tilesets/greendale-speakeasy.png b/src/images/tilesets/greendale-speakeasy.png
new file mode 100644
index 000000000..02fdeaeee
Binary files /dev/null and b/src/images/tilesets/greendale-speakeasy.png differ
diff --git a/src/items/improvements/airplane.lua b/src/items/improvements/airplane.lua
new file mode 100644
index 000000000..61d5c6136
--- /dev/null
+++ b/src/items/improvements/airplane.lua
@@ -0,0 +1,10 @@
+return{
+ name = "airplane",
+ description = "New Airplane",
+ type = "improvement",
+ subtype = "improvement",
+ info = 'City College has started an aerial ad campaign. With a little money Greendale could start one as well!',
+ MAX_ITEMS = 1,
+ quantity = 1,
+ directory = 'improvements/'
+}
diff --git a/src/items/improvements/hologram.lua b/src/items/improvements/hologram.lua
new file mode 100644
index 000000000..f4f27ff92
--- /dev/null
+++ b/src/items/improvements/hologram.lua
@@ -0,0 +1,10 @@
+return{
+ name = "hologram",
+ description = "Pierce's Hologram",
+ type = "improvement",
+ subtype = "improvement",
+ info = "Before he passed Pierce donated money to install a hologram near the Library. Unfortunatly the Dean spent the money purchasing Honda products.",
+ MAX_ITEMS = 1,
+ quantity = 1,
+ directory = 'improvements/'
+}
diff --git a/src/items/improvements/init.lua b/src/items/improvements/init.lua
new file mode 100644
index 000000000..e69de29bb
diff --git a/src/items/improvements/shirleySandwich.lua b/src/items/improvements/shirleySandwich.lua
new file mode 100644
index 000000000..a80f80d72
--- /dev/null
+++ b/src/items/improvements/shirleySandwich.lua
@@ -0,0 +1,10 @@
+return{
+ name = "shirleySandwich",
+ description = "Shirley's Sandwich Shop",
+ type = "improvement",
+ subtype = "improvement",
+ info = "Shirley's Sandwiches still needs some funding before it can open.",
+ MAX_ITEMS = 1,
+ quantity = 1,
+ directory = 'improvements/'
+}
diff --git a/src/items/item.lua b/src/items/item.lua
index 52bda17b4..1af2998a2 100644
--- a/src/items/item.lua
+++ b/src/items/item.lua
@@ -44,6 +44,7 @@ function Item.new(node, count)
end
if not love.filesystem.exists(imagePath) then
+ assert(love.filesystem.exists(imagePath), "There is no image at the path ("..imagePath.."). Items require an image.")
return nil
end
diff --git a/src/maps/admin-hallway.tmx b/src/maps/admin-hallway.tmx
index 41e7f0606..83c7a3c5d 100644
--- a/src/maps/admin-hallway.tmx
+++ b/src/maps/admin-hallway.tmx
@@ -30,7 +30,7 @@
- eJxjYBjaIJJpaONRMApGwSgYBQMDipkgeKDNoBR0Ae3vJOAGkJoOKManlhizYCCPaWjjUTCwAAD8ZCw+
+ eJxjYBjaIJJpaONRMApGwSgYBfhBBxMEUxsUM0EwLc2g1HxiQBfQjk4C9nQxIcIRn1pizIKBPKahjUfBwAIAizwtxw==
@@ -82,11 +82,6 @@
-
+
+
diff --git a/src/maps/castle-hawkthorne-throne.tmx b/src/maps/castle-hawkthorne-throne.tmx
index 7d2a14fb6..b0a028053 100644
--- a/src/maps/castle-hawkthorne-throne.tmx
+++ b/src/maps/castle-hawkthorne-throne.tmx
@@ -9,10 +9,10 @@
-
+
-
+
diff --git a/src/maps/greendale-bursar.tmx b/src/maps/greendale-bursar.tmx
new file mode 100644
index 000000000..83a247cb5
--- /dev/null
+++ b/src/maps/greendale-bursar.tmx
@@ -0,0 +1,64 @@
+
+
diff --git a/src/maps/greendale-computer-wing-2.tmx b/src/maps/greendale-computer-wing-2.tmx
index a3c659080..f516d333e 100644
--- a/src/maps/greendale-computer-wing-2.tmx
+++ b/src/maps/greendale-computer-wing-2.tmx
@@ -4,7 +4,7 @@
-
+
@@ -37,7 +37,6 @@
diff --git a/src/maps/greendale-computer-wing-3.tmx b/src/maps/greendale-computer-wing-3.tmx
index ef15f36f3..c4094bf30 100644
--- a/src/maps/greendale-computer-wing-3.tmx
+++ b/src/maps/greendale-computer-wing-3.tmx
@@ -4,7 +4,7 @@
-
+
@@ -37,7 +37,6 @@
diff --git a/src/maps/greendale-computer-wing.tmx b/src/maps/greendale-computer-wing.tmx
index 1f6fbedfd..ab3c5531c 100644
--- a/src/maps/greendale-computer-wing.tmx
+++ b/src/maps/greendale-computer-wing.tmx
@@ -4,7 +4,7 @@
-
+
@@ -45,7 +45,7 @@
-
+
- eJztzLkKgDAQRdH5VK3dFdSYKFq4/bW3sUnndMJcOEUY8kQsy/p7m+JPKrImeN8VajRo0Sk2M+QoUEa3CR4BMxbFfo8BI1x023HgxIVbsf+1ByPRDRc=
+ eJxjYBgFo2AUDHXQSAMzi2lgJi1B6wDYCQCCNwF6
@@ -62,17 +62,17 @@
-
+
-
+
-
+
@@ -83,6 +83,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -92,7 +127,7 @@
-
+
@@ -108,6 +143,8 @@
+
+
@@ -130,36 +167,18 @@
-
-
-
-
-
-
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
@@ -168,7 +187,7 @@
-
+
@@ -210,7 +229,7 @@
-
+
@@ -224,5 +243,33 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/maps/greendale-quad.tmx b/src/maps/greendale-quad.tmx
index d1aeccb4f..8ecac136e 100644
--- a/src/maps/greendale-quad.tmx
+++ b/src/maps/greendale-quad.tmx
@@ -1,5 +1,5 @@
-
diff --git a/src/maps/greendale-speakeasy.tmx b/src/maps/greendale-speakeasy.tmx
new file mode 100644
index 000000000..605581298
--- /dev/null
+++ b/src/maps/greendale-speakeasy.tmx
@@ -0,0 +1,182 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ eJztlDsOACEIBbHbmy7d4/7VxgSSWWJrpcVE/jwah5mNjTyXy8G8sJV+JNN2xJW+I8fainFuzzn8WMxgvRZ9pUfYE43qLV/2v82x1xe7or1qUAs191u7dmqqup1/2+QDIxUsUw==
+
+
+
+
+ eJxjYBgFgx0wAzELELMCMRseNlBdAznmcwMxDxDzAjEfHjb3qPk0MV8YiEWAWBSIxfCwhck0fxTQDgAAVsEGQw==
+
+
+
+
+ eJzF0UVLRkEUgOEPd7rTnQpigAkmmGCCCSaYoP6Ua3d3d/xMn4ULuZtBvHweeJjNmZeBSaXSMxnJtqJ09XPJI59Msv5IIyr4bhdSRDElZCfw9hxKKaOcCiqpCtxbYpkVVlljnQ02Y/1qaqiljnoaAv0tttlhlz32OeAw1m+kiWZaaKUt0D/imBNOOeOcCy5j/XY66KSLbnoC/SuuueGWO+554PHHnj+Mep199DPAIEOB/hPPvPDKG+988BnbHWaEUcYYZyLQ/81MMsU0M8wyl2B/ngUWE2z+13wB0wQm/Q==
+
+
+
+
+ eJztzDELgkAYh/HbHGtzKVxqs60222yrrS+QplBZkFZQWp+9Z7jhxe24E4f6ww9fPHiU+u+XNsK4w/4EU33HWDloeuIOMcMWa2wsukP9HYh/cywMOzskSLFHhly8++KOsDTsH3DECQXOuIj3wLDX3hUlKtxwx8OyKffECzUavPFx2O9zX+S2DgQ=
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/maps/sophieb.tmx b/src/maps/sophieb.tmx
index 740cb82f5..886744ed8 100644
--- a/src/maps/sophieb.tmx
+++ b/src/maps/sophieb.tmx
@@ -1,12 +1,12 @@
-
+
-
+
-
+
@@ -118,24 +118,24 @@
-
+
-
+
-
+
-
-
+
+
@@ -143,17 +143,17 @@
-
+
-
+
-
+
@@ -161,7 +161,7 @@
-
+
@@ -176,30 +176,32 @@
-
+
-
+
+
+
-
+
-
+
@@ -214,5 +216,6 @@
+
diff --git a/src/nodes/door.lua b/src/nodes/door.lua
index dd73714d5..1e561b5c4 100644
--- a/src/nodes/door.lua
+++ b/src/nodes/door.lua
@@ -75,6 +75,9 @@ function Door.new(node, collider, level)
door.movetime = node.properties.movetime and tonumber(node.properties.movetime) or 1
door.obstruct = node.properties.obstruct or false
door.show_sfx = node.properties.show_sfx or 'reveal'
+ --used if a hidden door still needs a key after being shown (Like a rope in the lounge)
+ door.hiddenKey = node.properties.hiddenKey or false
+
--used if the closed door should obstruct the player's movement
if door.obstruct and not door.open then
-- used for collision detection
@@ -119,6 +122,22 @@ function Door:switch(player)
end
if not self.key or (player.inventory:hasKey(self.key) and not self.inventory) or self.open then
+ if self.hiddenKey and self.key and not player.inventory:hasKey(self.key) then
+ if self.closedinfo then
+ message = {self.closedinfo}
+ elseif self.info then
+ message = {self.info}
+ else
+ message = {'You need a "'..self.key..'" key to open this door.'}
+ end
+ local callback = function(result)
+ self.prompt = nil
+ player.freeze = false
+ end
+ local options = {'Exit'}
+ self.prompt = Prompt.new(message, callback, options)
+ return
+ end
if self.sound ~= false and not self.instant then
sound.playSfx( ( type(self.sound) ~= 'boolean' ) and self.sound or 'unlocked' )
end
@@ -162,6 +181,22 @@ end
function Door:keypressed( button, player)
if player.freeze or player.dead then return end
+ if self.hiddable and self.open and self.hiddenKey and self.key and not player.inventory:hasKey(self.key) then
+ if self.closedinfo then
+ message = {self.closedinfo}
+ elseif self.info then
+ message = {self.info}
+ else
+ message = {'You need a "'..self.key..'" key to open this door.'}
+ end
+ local callback = function(result)
+ self.prompt = nil
+ player.freeze = false
+ end
+ local options = {'Exit'}
+ self.prompt = Prompt.new(message, callback, options)
+ return
+ end
if self.hideable and self.hidden and not self.inventory then
if self.obstruct then
if not player.inventory:hasKey(self.key) and self.info then
diff --git a/src/nodes/movingplatform.lua b/src/nodes/movingplatform.lua
index 7bf8b464c..2e5c5415d 100644
--- a/src/nodes/movingplatform.lua
+++ b/src/nodes/movingplatform.lua
@@ -41,6 +41,7 @@ local gs = require 'vendor/gamestate'
local sound = require 'vendor/TEsound'
local options = require 'options'
local utils = require 'utils'
+local app = require 'app'
local MovingPlatform = {}
MovingPlatform.__index = MovingPlatform
@@ -78,7 +79,15 @@ function MovingPlatform.new(node, collider, level)
mp.sfx = node.properties.sfx and node.properties.sfx or nil
mp.allowed_offscreen = node.properties.offscreen == 'true'
mp.chain = tonumber(node.properties.chain) or 1
-
+ --used to trigger the changing of s platform sprite
+ mp.db = app.gamesaves:active()
+ mp.spriteTrigger = node.properties.spriteTrigger or nil
+ if node.properties.spriteTrigger then
+ if mp.db:get(mp.spriteTrigger, false) then
+ mp.sprite = love.graphics.newImage( node.properties.sprite2 )
+ --assert( mp.sprite2, 'If you have a \'spriteTrigger\' property you must also have a \'sprite2\' property' )
+ end
+ end
if node.properties.animation then
local p = node.properties
mp.anim_speed = p.anim_speed and tonumber(p.anim_speed) or 0.20
diff --git a/src/npcs/bursar.lua b/src/npcs/bursar.lua
new file mode 100644
index 000000000..7e5c983b0
--- /dev/null
+++ b/src/npcs/bursar.lua
@@ -0,0 +1,69 @@
+-- includes
+local Prompt = require 'prompt'
+local Timer = require 'vendor/timer'
+local sound = require 'vendor/TEsound'
+local Gamestate = require 'vendor/gamestate'
+local sound = require 'vendor/TEsound'
+local controls = require('inputcontroller').get()
+local NodeClass = require('nodes/npc')
+
+return {
+ width = 72,
+ height = 36,
+ animations = {
+ default = {
+ 'loop',{'1-5,1'},0.20,
+ },
+ talking = {
+ 'once',{'1-7,1','2,1','3,2','4,1'},0.20,
+ },
+ hide = {
+ 'once',{'8,1', '1-7,2', }, 0.20,
+ },
+ hidden = {
+ 'loop',{'8,2','1-4,3'}, 0.15,
+ },
+ },
+
+ donotfacewhentalking = true,
+ enter = function(npc, previous)
+
+ end,
+
+ talk_items = {
+ { ['text']='i am done with you' },
+ { ['text']='How can I help?' },
+ { ['text']='Any useful info for me?' },
+ { ['text']='Hello!' },
+ },
+ talk_responses = {
+ ["inventory"]={
+ "These are my wares.",
+ "Press {{yellow}}".. string.upper(controls:getKey('INTERACT')) .."{{white}} to view item information.",
+ },
+ ["Hello!"]={
+ "Hello, I'm Greendale's bursar.",
+ "I deal with the (small amount of) money around here.",
+ },
+ ["Anything happening here?"]={
+ "We used to have a cult leader that claimed to specialize in alchemy stay in the house next door.",
+ "What was odd was that he left with nothing and there was no alchemy equipment in the house at all.",
+ "We think that he was just lying in an attempt to obtain followers.",
+ },
+ ["How can I help?"]={
+
+ "Check out the list of current Greendale improvement projects.",
+ "You can view them under my {{red}}INVENTORY{{white}}.",
+ "Unless you've conveniently com into a couple million I don't see how you could help though.",
+ },
+ },
+ inventory = function(npc, player)
+ local screenshot = love.graphics.newImage( love.graphics.newScreenshot() )
+ Gamestate.stack("shopping", player, screenshot, npc.name)
+ end,
+
+ update = function(dt, npc, player)
+
+ end,
+
+}
\ No newline at end of file
diff --git a/src/npcs/hologram.lua b/src/npcs/hologram.lua
new file mode 100644
index 000000000..5e82fe8a1
--- /dev/null
+++ b/src/npcs/hologram.lua
@@ -0,0 +1,60 @@
+-- inculdes
+local Dialog = require 'dialog'
+local app = require 'app'
+local sound = require 'vendor/TEsound'
+
+return {
+ width = 48,
+ height = 61,
+ animations = {
+ default = {
+ 'once',{'1,1'},.25,
+ },
+ pierce = {
+ 'loop',{'2-6,1'},.15,
+ },
+ drugs = {
+ 'loop',{'7-8,1', '1-3,2'},.25,
+ },
+ laser = {
+ 'loop',{'4-8,1'},.25,
+ },
+ },
+ begin = function(npc, player)
+ npc.menu.state = 'closing'
+ local script ={
+ "Looks as if you've lost your way.",
+ "Continue on this path, and you might miss your last chance to see the Pierce Hawthorne Museum of Gender Sensitivity and Sexual Potency on the central quad.",
+ "The museum and this hologram were donated in compliance with a court order I'm not allowed to discuss.",
+ "What I am allowed to discuss is Greendale, and I'll say this... Don't turn your back on it.",
+ "Take it from a man with no legal right to be there. You're in a special place.",
+ "A crappy place, sure, but only because it gives crappy people a chance to sort themselves out.",
+ "Did I sound gay at the end? Do you want to do another take?",
+ }
+ if npc.db:get('hologram-pierce', false) or npc.db:get('hologram-drugs', false) or npc.db:get('hologram-laser', false) then
+ sound.playMusic("greendales-the-way-it-goes")
+ Dialog.new(script, function()
+ player.freeze = false
+ npc.menu:close(player)
+ sound.stopMusic()
+ sound.playSfx("greendale")
+ end)
+ else
+ Dialog.new("This almost looks like the platform to some kind of hologram...", function()
+ player.freeze = false
+ npc.menu:close(player)
+ end)
+ end
+ end,
+
+ update = function(dt, npc, player)
+ if npc.db:get('hologram-pierce', false) then
+ npc.state = 'pierce'
+ elseif npc.db:get('hologram-drugs', false) then
+ npc.state = 'drugs'
+ elseif npc.db:get('hologram-laser', false) then
+ npc.state = 'laser'
+ end
+
+ end,
+}
diff --git a/src/npcs/jerry.lua b/src/npcs/jerry.lua
index c421da128..9dc1e0de7 100644
--- a/src/npcs/jerry.lua
+++ b/src/npcs/jerry.lua
@@ -45,7 +45,7 @@ return {
Quest:activate(npc, player, quests.poolreturn)
npc.menu:close(player)
npc.db:set('borchertpool', true)
- end)
+ end
else
Dialog.new(quests.poolreturn.completeQuestFail, function()
player.freeze = false
diff --git a/src/npcs/raquel.lua b/src/npcs/raquel.lua
index 2c18f81ca..5362c7a98 100644
--- a/src/npcs/raquel.lua
+++ b/src/npcs/raquel.lua
@@ -19,6 +19,7 @@ return {
}
},
stare = false,
+ donotfacewhentalking = true,
talk_items = {
{ ['text']='i am done with you' },
diff --git a/src/npcs/todd-sandwich.lua b/src/npcs/todd-sandwich.lua
new file mode 100644
index 000000000..16ee03603
--- /dev/null
+++ b/src/npcs/todd-sandwich.lua
@@ -0,0 +1,35 @@
+-- inculdes
+local prompt = require 'prompt'
+local Dialog = require 'dialog'
+local app = require 'app'
+
+return {
+ width = 24,
+ height = 34,
+ animations = {
+ default = {
+ 'loop',{'1-4,1','1-4,2'},.25,
+ },
+ },
+ begin = function(npc, player)
+ npc.menu.state = 'closing'
+ if npc.db:get('sandwich-curtain', false) then
+ Dialog.new("Enjoy the special. *wink*", function()
+ player.freeze = false
+ npc.menu:close(player)
+ end)
+ else
+ npc.prompt = prompt.new("Welcome to {{yellow}}Shirley's Sandwiches{{white}}. Would you like to try {{olive}}The Special?{{white}}", function(result)
+ if result == 'Yes' then
+ Dialog.new("{{olive}}The Specials{{white}} are kept in the back.", function()
+ Dialog.currentDialog = nil
+ npc.menu:close(player)
+ npc.db:set('sandwich-curtain', true)
+ end)
+ else
+ npc.menu:close(player)
+ end
+ end)
+ end
+ end,
+}
diff --git a/src/shopping.lua b/src/shopping.lua
index be1869fc4..4d142c056 100644
--- a/src/shopping.lua
+++ b/src/shopping.lua
@@ -8,6 +8,8 @@ local HUD = require 'hud'
local utils = require 'utils'
local Item = require 'items/item'
local tooltip = require 'tooltip'
+local app = require 'app'
+
--instantiate this gamestate
@@ -55,6 +57,7 @@ function state:init()
self.shift["keys"] = 8
self.shift["armor"] = 6
self.shift["misc"] = 9
+ self.shift["improvements"] = 0
self.categoriespic = {}
for i = 1, #self.categories do
@@ -77,6 +80,8 @@ function state:init()
self.window = "categoriesWindow"
self.player = nil
+ self.improvements = false
+ self.db = app.gamesaves:active()
end
@@ -89,12 +94,26 @@ function state:enter(previous, player, screenshot, supplierName)
self.player = player
self.screenshot = screenshot
self.hud = HUD.new(previous)
+ if supplierName == 'bursar' then
+ self.improvements = true
+ self.categories[1] = "improvements"
+ self.categories[2] = nil
+ self.categories[3] = nil
+ self.categories[4] = nil
+ self.categories[5] = nil
+ self.categories[6] = nil
+ self.categoriespic[1] = love.graphics.newImage('images/shopping/improvements.png')
+ end
self.tooltip = tooltip:new()
self.message = nil
- self.categorySelection = utils.indexof(self.categories,"weapons")
+ if self.improvements then
+ self.categorySelection = utils.indexof(self.categories,"improvements")
+ else
+ self.categorySelection = utils.indexof(self.categories,"weapons")
+ end
self.itemsSelection = 1
self.purchaseSelection = 1
@@ -163,7 +182,8 @@ end
function state:categoriesWindowKeypressed( button )
local c = #self.categories
-
+ if self.improvements then
+ end
if button == "RIGHT" and self.categorySelection < c then
self.categorySelection = nonzeroMod(self.categorySelection + 1, c )
if self.categoriesWindowLeft + ROW < self.categorySelection then
@@ -237,7 +257,11 @@ function state:purchaseWindowKeypressed( button )
local amount = itemInfo[2]
local cost = itemInfo[3]
local item = itemInfo.item
- local iamount = self.player.inventory:count(item)
+ local iamount = 0
+ if not self.improvements then
+ local iamount = self.player.inventory:count(item)
+ end
+
local p = #self.purchaseOptions
@@ -320,7 +344,12 @@ function state:buySelectedItem()
elseif amount <= 0 then
self.message = "This item is out of stock."
self.window = "messageWindow"
-
+ elseif self.improvements then
+ local action = tostring(itemInfo[4])
+ self.db:set(action, true)
+ self.player.money = self.player.money - cost*self.buyAmount
+ itemInfo[2] = itemInfo[2] - self.buyAmount
+ return
else
for i = 1,self.buyAmount do
@@ -353,7 +382,11 @@ function state:buySelectedItem()
end
function state:sellSelectedItem()
-
+ if self.improvements then
+ self.message = "You can't sell something you don't own."
+ self.window = "messageWindow"
+ return
+ end
local itemInfo = self.items[self.itemSelection]
local name = itemInfo[1]
local cost = itemInfo[3]
@@ -463,7 +496,11 @@ function state:draw()
local visI = i - self.itemsWindowLeft
- love.graphics.print(cost .. " coins", xcorner + 15 + 32*visI, ycorner + 45, 0, 0.5, 0.5 )
+ if self.improvements then
+ love.graphics.print(cost , xcorner + 20 + 32*visI, ycorner + 45, 0, 0.5, 0.5 )
+ else
+ love.graphics.print(cost .. " coins", xcorner + 15 + 32*visI, ycorner + 45, 0, 0.5, 0.5 )
+ end
if itemInfo.draw then
itemInfo.draw(xcorner + 20 + 32*visI, ycorner + 23, self.player)
@@ -478,13 +515,15 @@ function state:draw()
end
elseif self.window == "purchaseWindow" then
-
local itemInfo = self.items[self.itemSelection]
local name = itemInfo[1]
local amount = itemInfo[2]
local cost = itemInfo[3]
local item = itemInfo.item
- local iamount = self.player.inventory:count(item)
+ local iamount = 0
+ if not self.improvements then
+ local iamount = self.player.inventory:count(item)
+ end
love.graphics.draw( self.backgroundp, xcorner, ycorner , 0 )
love.graphics.printf(item.description, xcorner + 8 , ycorner + 8 , 103, "center")
diff --git a/src/suppliers/bursar.lua b/src/suppliers/bursar.lua
new file mode 100644
index 000000000..008c93ced
--- /dev/null
+++ b/src/suppliers/bursar.lua
@@ -0,0 +1,11 @@
+--table of item,amount,cost
+
+return {
+ improvements = {
+ {"airplane",1,100000,'greendale-airplane'},
+ {"hologram",1,50000,'hologram-pierce'},
+ {"shirleySandwich",1,50000,'sandwich-shop'},
+ --{"mascot",1,10000},
+ --{"building",1,500000},
+ },
+}