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

Guard against shopping crash #2604

Merged
merged 4 commits into from
Nov 26, 2024
Merged
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
1 change: 1 addition & 0 deletions CONTRIBUTORS
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ lasternom
lavenenosa
lc514
letharg
liberodark
lifedreamcreate
liwaldo
lmol99
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean contributors validate run maps lint love love.js
.PHONY: clean contributors validate run maps lint build/hawkthorne.love love love.js

UNAME := $(shell uname)
TILEMAPS := $(patsubst %.tmx,%.lua,$(wildcard src/maps/*.tmx))
Expand Down Expand Up @@ -41,6 +41,7 @@ love.js: build/hawkthorne.love

build/hawkthorne.love: $(TILEMAPS) src/*
mkdir -p build
rm -f build/hawkthorne.love
cd src && zip --symlinks -q -r ../build/hawkthorne.love . \
-x ".*" \
-x "*.DS_Store" \
Expand Down
2 changes: 1 addition & 1 deletion src/conf.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
function love.conf(t)
t.title = "Journey to the Center of Hawkthorne"
t.window.title = "Journey to the Center of Hawkthorne"
t.version = "11.5"
t.identity = "hawkthorne"
t.window.width = 1056
Expand Down
1 change: 1 addition & 0 deletions src/credits.lua
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,7 @@ state.credits = {
'lavenenosa',
'lc514',
'letharg',
'liberodark',
'lifedreamcreate',
'liwaldo',
'lmol99',
Expand Down
4 changes: 2 additions & 2 deletions src/shopping.lua
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function state:draw()

if itemInfo.draw then
itemInfo.draw(xcorner + 20 + 32*visI, ycorner + 23, self.player)
elseif itemInfo.item.draw then
elseif itemInfo.item and itemInfo.item.draw then
itemInfo.item:draw({x=xcorner + 20 + 32*visI, y = ycorner + 23 }, nil, true)
end

Expand All @@ -492,7 +492,7 @@ function state:draw()

if itemInfo.draw then
itemInfo.draw(xcorner + 20, ycorner + 23, self.player)
elseif itemInfo.item.draw then
elseif itemInfo.item and itemInfo.item.draw then
itemInfo.item:draw({x=xcorner + 20, y = ycorner + 23 }, nil, true)
end

Expand Down