Skip to content

Commit

Permalink
Officer Cackowski, computer wing quest and correctly animated door
Browse files Browse the repository at this point in the history
Key for the hidden door still doesn’t work

Open the borchert pool when the quest is complete
  • Loading branch information
8bitgentleman committed Oct 6, 2015
1 parent 6bb3bbc commit f8b6215
Show file tree
Hide file tree
Showing 18 changed files with 206 additions and 24 deletions.
Binary file added src/images/hiddendoor/closedsign.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/hiddendoor/jukebox.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/keys/flashlight.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/keys/rope.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/officercackowski.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/images/npc/officercackowski_menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/tilesets/bathroom.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified src/images/tilesets/greendale-lounge.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions src/items/keys/flashlight.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return{
name = "flashlight",
description = "Flashlight",
type = "key",
info = "a flashlight",
MAX_ITEMS = 1,
}
7 changes: 7 additions & 0 deletions src/items/keys/rope.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
return{
name = "rope",
description = "Rope",
type = "key",
info = "a coil of rope",
MAX_ITEMS = 1,
}
43 changes: 35 additions & 8 deletions src/maps/borchert-hallway.tmx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="39" height="14" tilewidth="24" tileheight="24">
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="39" height="14" tilewidth="24" tileheight="24">
<properties>
<property name="blue" value="159"/>
<property name="green" value="123"/>
Expand All @@ -25,15 +25,15 @@
</layer>
<layer name="Tile Layer 3" width="39" height="14">
<data encoding="base64" compression="zlib">
eJztkU1OAkEQhXsGNcgFZIm4Qg8guBOXLHSnA+pS41IQlop3EOEKmnAITDiEJO5BhSvI10mZtB3mJ2PQhPCSb7p7purV64xSS8XV4X8HEJGjOet9co4zM7/oLUn/ZYzeoJ6SrH7eOUepbdhxgmdkYuSKKu09ZP4I3uEDPmEfinDwB9k8KEMFTuEMzr+9XaUccCEBK25036jZPO5YhsqMu15DFWpwA3VoiPcm9VmrZx1Slscqmdck95j6CeStmixs+eS7gjvZP8FzyH20d4EZeyH/TutLP6y6I+jLvhvQqzM14V7OPXgJmae9L+A2PJraIFfayrYLb7JvGe9bP8vUg3V+hYHPnGM4MXwejW9t6BirKXvmUoujKWB8Jhc=
eJztkUtOAkEURasbJeAGdIg4QhbgZ6YOGehM/kMJQ/wNBfcA7kETFyEJi8DEuYCyBT2VPJKm0t3VaaImpl9yuj55795baaWSilunfx1Aihw9v/vMD3rmVpgtyXwrxmzYTEnWIO2Co9QuFJ1wj1yMXFFLa7/jP4EpzOADjuAYTn4hWwWqUIM6NKC50HaVcsCFFKy50XWjZqvwxirUfN7agUu4gmu4gVvR3qY/b8xkYcPQWCdzWnJ/0j+HfaMnDzsB+drQlf0jPFneo7UP8Di0/DtdX/pj9J3BSPbPIbM6Uw/u5fwCQ4uf1r6AO3s0tUmuLSPbHrzJfuC5Hyy3qb5xHsNrgM85lD06DxGy+Xkm9X/qG8VZI7k=
</data>
</layer>
<layer name="collision" width="39" height="14">
<data encoding="base64" compression="zlib">
eJyLZGJgiBykeBSMglEwCkYBYVDMhB3TC3TR0a48psGLRwF5AAAC+SI4
</data>
</layer>
<objectgroup name="nodes" width="39" height="14">
<objectgroup name="nodes">
<object name="main" type="door" x="144" y="216" width="48" height="60">
<properties>
<property name="level" value="greendale-exterior"/>
Expand All @@ -60,11 +60,6 @@
<property name="info" value="This door is locked."/>
</properties>
</object>
<object type="info" x="720" y="216" width="96" height="48">
<properties>
<property name="info" value="The pool is currently closed for refurbishment."/>
</properties>
</object>
<object type="info" x="384" y="192" width="48" height="72">
<properties>
<property name="info" value="That's good no-no juice."/>
Expand All @@ -75,5 +70,37 @@
<property name="info" value="Hello, rich people?"/>
</properties>
</object>
<object name="pool" type="door" x="720" y="240" width="48" height="36">
<properties>
<property name="hideable" value="true"/>
<property name="info" value="The pool is currently closed for refurbishment."/>
<property name="level" value="borchert-pool"/>
<property name="movetime" value="2.7"/>
<property name="offset_hidden_x" value="0"/>
<property name="offset_shown_x" value="-50"/>
<property name="sound" value="false"/>
<property name="sprite" value="closedsign"/>
<property name="sprite_height" value="24"/>
<property name="sprite_width" value="48"/>
<property name="to" value="main"/>
<property name="trigger" value="borchertpool"/>
</properties>
</object>
<object name="pool2" type="door" x="768" y="240" width="48" height="36">
<properties>
<property name="hideable" value="true"/>
<property name="info" value="The pool is currently closed for refurbishment."/>
<property name="level" value="borchert-pool"/>
<property name="movetime" value="2.7"/>
<property name="offset_hidden_x" value="0"/>
<property name="offset_shown_x" value="50"/>
<property name="sound" value="false"/>
<property name="sprite" value="closedsign"/>
<property name="sprite_height" value="24"/>
<property name="sprite_width" value="48"/>
<property name="to" value="main"/>
<property name="trigger" value="borchertpool"/>
</properties>
</object>
</objectgroup>
</map>
4 changes: 2 additions & 2 deletions src/maps/greendale-computer-wing-2.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<tileset firstgid="1" name="greendale-computer-wing" tilewidth="24" tileheight="24">
<image source="../images/tilesets/greendale-computer-wing.png" width="240" height="552"/>
</tileset>
<tileset firstgid="241" name="collisions" tilewidth="24" tileheight="24">
<tileset firstgid="231" name="collisions" tilewidth="24" tileheight="24">
<image source="../images/tilesets/collisions.png" width="632" height="512"/>
</tileset>
<layer name="background" width="24" height="14">
Expand All @@ -30,7 +30,7 @@
</layer>
<layer name="collision" width="24" height="14">
<data encoding="base64" compression="zlib">
eJz7yMDA8JGGeBSMguEIFBgZGBQZiVdPiloYUAHq4QZiZSx6uckwjxxAy7JhOJQPAFpkLfc=
eJx7zsDA8JyGeBSMguEIxBgZGMQZiVdPiloYkALqYQRiSSx6GckwjxxAy7JhOJQPADtSK9E=
</data>
</layer>
<objectgroup name="nodes">
Expand Down
21 changes: 12 additions & 9 deletions src/maps/greendale-computer-wing-3.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
eJy7xMDAcGkUj+JRPIpHMckYANr7E7A=
</data>
</layer>
<layer name="collision" width="24" height="14" visible="0">
<layer name="collision" width="24" height="14">
<data encoding="base64" compression="zlib">
eJx7zsDA8JyGeBSMglFAGIgxQjAIiDMixKWAbAlGiJgkI3a9jIyoeqgJaFk2DIfyAQCT9CwX
</data>
Expand All @@ -41,28 +41,31 @@
<property name="to" value="wing3"/>
</properties>
</object>
<object type="hiddendoortrigger" x="114" y="204" width="36" height="24">
<object type="hiddendoortrigger" x="144" y="204" width="36" height="24">
<properties>
<property name="height" value="24"/>
<property name="message" value="Do you want to select a song?"/>
<property name="sprite" value="jukeboxtrigger"/>
<property name="target" value="jukebox"/>
<property name="width" value="72"/>
<property name="width" value="36"/>
</properties>
</object>
<object name="jukebox" type="door" x="76" y="192" width="69" height="49">
<object name="jukebox" type="door" x="114" y="194" width="36" height="72">
<properties>
<property name="aniframes2" value="1-9,1"/>
<property name="anispeed2" value="0.05"/>
<property name="aniframes2" value="1-10,1"/>
<property name="anispeed2" value=".35"/>
<property name="hideable" value="true"/>
<property name="level" value="greendale-computer-wing"/>
<property name="movetime" value="2.7"/>
<property name="offset_hidden_x" value="0"/>
<property name="offset_shown_x" value="-50"/>
<property name="show_sfx" value="throne_door"/>
<property name="sound" value="false"/>
<property name="sprite" value="jukebox"/>
<property name="sprite_height" value="69"/>
<property name="sprite_width" value="46"/>
<property name="sprite_height" value="46"/>
<property name="sprite_width" value="38"/>
<property name="to" value="main"/>
<property name="trigger" value="bosstriggers.jukeboxtrigger"/>
<property name="trigger" value="doortriggers.jukeboxtrigger"/>
</properties>
</object>
</objectgroup>
Expand Down
3 changes: 2 additions & 1 deletion src/maps/greendale-exterior.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
eJztmrtOwzAUht0NxFJ4AobCBlJbbmWg6RDB0qFv0IUXgBfIi1TqBgs7CIbuVAJxmWHkIRg4LjExluO4Tsil/J/0q5Fv58Tx77RWGQMAAAAAAACkxWfMazI25qLrSdH5AADs4N7VlE3yzwSUkSXa0w116/llAlR8w7PBu3hx4Xu27bOFf8tLM7l+kkceVcX/VlB0HvMgf99SPUx+nGSkcc639S8x+ZfqhlVbm3mzXLH5yeu3EvybD/z9wX2qCr5dTHx9WZB1nKr5l/IdmnKe5pgLKAd10ipprehEFOQ9m3uX8gsoz6Cu+HiXtEfaJx3MGSPJv2qstJR1rkExXJNuwusz0rnDGA3SBmlzjj5PpGfSC+nVIaYLlF9AeQb8LKrN2LsQr5PvXa5LUpJ/Gxn712WuF40VQ91VzHUSLv10eVyQLi3b2tQJWuH5aSvDc1Q5bierQeeMGzfXcXPSydhPrt+f4/Iz7aGiD5/rwxQxXHAZK238j5jydspxTYxI94Z6cYbCz1famvJb0l1UNvuvCb825XzimKsNI8u4/YzGTGp/Sv6zeX5xc9IP/Svenz1Nmx6zfwe7+lfcw8Ci7SBcG6KPugfvJMSYWu5Z6nORx3VZY+3f1z9ztlVjbLsWlfH8pmGe4eeMz5hxjzVluufoypvlmCIPT5rfB9Kj1MYL63U5q+P8NU1prXZTxI3zjAmPRfNkE9fUhp/hWAxhhat/RX5dhz4Cj0Vr40jj0bTrQvafy1i2faYaAQAAAAAAAAAA/4EvZhePNA==
</data>
</layer>
<layer name="collision" width="240" height="18" visible="0">
<layer name="collision" width="240" height="18">
<data encoding="base64" compression="zlib">
eJzt2c0OwiAMwHF4/5PP4bz4eVZ5MPGwZIljLdtgK/5/SY86WiiwzDkAAABYcPbOXWJcY9xi3GM8/NajApAy7NmUkr189NPRojDI791ojv+u5NrV9GwK53KeIOxP9LA90nyWPIvCimuFdbcfmn0iJ/Y+t6X2xa5SHy6x1hxbNjb/pdZsy3VsDfdLYH1L7hdz92V6GV+cv/b1vYy6cvftvb/39cJgrFM5SqzXQSs0lBPvv/mWvC9Tx1+vmPfTaO7MHwC0L0yc9VufYdLzc8aXe7/VfOc5Cf9Xq37Sc6TcU78fq4GUs1bp2my9dufolHU+eIIgrAYAAAAAvQ9AM0Xc
</data>
Expand Down Expand Up @@ -221,6 +221,7 @@
<property name="to" value="main"/>
</properties>
</object>
<object name="officercackowski" type="npc" x="540" y="288" width="24" height="48"/>
</objectgroup>
<objectgroup name="movement">
<object name="airline" x="3763" y="85">
Expand Down
58 changes: 58 additions & 0 deletions src/maps/greendale-lounge-bathroom.tmx
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" renderorder="right-down" width="10" height="14" tilewidth="24" tileheight="24">
<properties>
<property name="soundtrack" value="greendale-alt"/>
</properties>
<tileset firstgid="1" name="bathroom" tilewidth="24" tileheight="24">
<image source="../images/tilesets/bathroom.png" width="240" height="240"/>
</tileset>
<tileset firstgid="101" name="collisions" tilewidth="24" tileheight="24">
<image source="../images/tilesets/collisions.png" width="632" height="512"/>
</tileset>
<layer name="Background" width="10" height="14">
<data encoding="base64" compression="zlib">
eJxjZGA4wEgEZmJgYCAGs43iQYWZicSMRGIApzIKHw==
</data>
</layer>
<layer name="Wall Features 1" width="10" height="14">
<data encoding="base64" compression="zlib">
eJxjYKAuUGRgcFAigEFqxIkwSxyKR9VhqgOGYQMwLBnwYZAaIowjCQAAXz8HlQ==
</data>
</layer>
<layer name="Wall Features 2" width="10" height="14">
<data encoding="base64" compression="zlib">
eJxjYKAv4GNgaMAnz8PAkMANpGGYnkCCTvYoI7H5scgLQ2kuIFaBstWBWBRNnSyU5kQSk6LYdfgBAHuCAiM=
</data>
</layer>
<layer name="fade" width="10" height="14">
<data encoding="base64" compression="zlib">
eJzTYGBg0BjFo5hIDAAcWBXh
</data>
</layer>
<layer name="collision" width="10" height="14">
<data encoding="base64" compression="zlib">
eJxLZWBgSCUCjwL6gXoS1U/BI1dFJCYWAAAQbgnK
</data>
</layer>
<objectgroup name="nodes">
<object name="main" type="door" x="144" y="240" width="24" height="60">
<properties>
<property name="level" value="greendale-lounge"/>
<property name="to" value="bathroom"/>
</properties>
</object>
<object name="rope" type="spawn" x="48" y="264" width="24" height="24">
<properties>
<property name="nodeType" value="key"/>
<property name="sound" value="false"/>
<property name="spawnType" value="keypress"/>
<property name="sprite" value="wastebin"/>
</properties>
</object>
<object type="info" x="168" y="240" width="24" height="24">
<properties>
<property name="info" value="The lightswitch is broken! Good thing you have that flashlight!"/>
</properties>
</object>
</objectgroup>
</map>
15 changes: 12 additions & 3 deletions src/maps/greendale-lounge.tmx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</layer>
<layer name="Foreground" width="24" height="14">
<data encoding="base64" compression="zlib">
eJztzk0LRFAUxnGpYWOBGTZjvJQZDF9omKy8ZO/757+wkJK5UlLz1K/u6dyejiSdPwrUySwfdYhAtKMP+CEmrrjBgr3w74N8Q/8DLjz4CGb7EhdUqGEI9sdI8EaKbLbvoKPAF45g/1p63NGgRbRTb4jn+H7t1PnPtgz2aAcb
eJztzssKglAUhWERsgYOtLKJ10BNqxfygiMvOPf98R84EEH0hCBCCz44m31YbEk6fs64jGZ5r0MEou59wIpcccMdBh4z/xKkUAT7bThw4eE52Rc4oUQFXbA/Qow3PvhO9i00ZMhhCfYvpYOJGg1eG/X6CIZ3uFHnP7+lBxEjByM=
</data>
</layer>
<layer name="Tile Layer 3" width="24" height="14">
Expand Down Expand Up @@ -98,7 +98,7 @@
<property name="width" value="69"/>
</properties>
</object>
<object name="main" type="door" x="6" y="215" width="16" height="50">
<object name="main" type="door" x="0" y="192" width="24" height="72">
<properties>
<property name="button" value="LEFT"/>
<property name="level" value="greendale-exterior"/>
Expand All @@ -109,7 +109,7 @@
<properties>
<property name="background" value="true"/>
<property name="hideable" value="true"/>
<property name="key" value="bronze"/>
<property name="key" value="rope"/>
<property name="level" value="greendale-computer-wing"/>
<property name="offset_hidden_x" value="0"/>
<property name="offset_shown_x" value="-44"/>
Expand Down Expand Up @@ -215,5 +215,14 @@
<property name="info" value="I've made a terrible mistake coming here. Maybe it's not too late to get out of my contract..."/>
</properties>
</object>
<object name="bathroom" type="door" x="72" y="168" width="24" height="72">
<properties>
<property name="button" value="LEFT"/>
<property name="info" value="It looks like the light is broken. You need a flashlight to see anything."/>
<property name="key" value="flashlight"/>
<property name="level" value="greendale-lounge-bathroom"/>
<property name="to" value="main"/>
</properties>
</object>
</objectgroup>
</map>
3 changes: 2 additions & 1 deletion src/npcs/jerry.lua
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ return {
Quest.removeQuestItem(player)
Quest:activate(npc, player, quests.poolreturn)
npc.menu:close(player)

npc.db:set('borchertpool', true)
end)
else
Dialog.new(quests.poolreturn.completeQuestFail, function()
player.freeze = false
Expand Down
69 changes: 69 additions & 0 deletions src/npcs/officercackowski.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
-- inculdes
local Dialog = require 'dialog'
local prompt = require 'prompt'


return {
width = 48,
height = 48,
animations = {
default = {
'loop',{'1,1'},.5,
},
walking = {
'loop',{'2,1','3,1','4,1','5,1'},.2,
},
},
greeting = "I'm {{red}}Officer Cackowski{{white}}. There were reports of a disturbance, something about a bandit, and I'm patrolling the area.",

walking = true,
max_walk = 240,
min_walk = 240,

stare = false,

talk_items = {
{ ['text']='i am done with you' },
{ ['text']='Nice flashlight!' },
{ ['text']='Tell me something.' },
{ ['text']='You look farmiliar...' },
},

talk_commands = {
['Nice flashlight!'] = function (npc, player)
Dialog.new("I had this sucker custom made. I actually have an extra if you'd like one." , function()

npc.prompt = prompt.new("Do you want Officer Cackowski's extra flashlight?", function(result)
if result == 'Yes' then
local Item = require 'items/item'
local itemNode = require ('items/keys/flashlight')
local item = Item.new(itemNode, 1)
player.inventory:addItem(item, true)
Dialog.currentDialog = nil
npc.menu:close(player)
npc.walking = true
npc.prompt = nil
end
if result == 'No' then
Dialog.new("Fair enough.", function()
Dialog.currentDialog = nil
npc.menu:close(player)
npc.walking = true
npc.prompt = nil
end)
end
npc.fixed = result == 'Yes'
end)
end)
end,
},

talk_responses ={
['You look farmiliar...']={
"You might be thinking of my sister {{red}}Liz Cackowski{{white}}, the Greendale guidance counselor.",
},
['Tell me something.']={
"Fact: in 100% of all fake gun shootings, the victim is always the one with the fake gun.",
},
},
}

0 comments on commit f8b6215

Please sign in to comment.