push for quick break
This commit is contained in:
@@ -156,6 +156,27 @@ def onAppStart(app):
|
||||
("close-shop", "shop", app.width-50, app.width, 0, 50)
|
||||
]
|
||||
|
||||
#add all of our shop purchase upgrades
|
||||
startX = 75
|
||||
startY = 100
|
||||
endX = 525
|
||||
endY = 250
|
||||
colInd = 0
|
||||
XDiff = (endX-startX) // 3
|
||||
|
||||
for columnType in ["power", "timing", "count"]:
|
||||
upgrades = [u for u in AVAILABLE_UPGRADES if u[1] == columnType]
|
||||
YDiff = (endY-startY) // len(upgrades)
|
||||
for i in range(len(upgrades)):
|
||||
app.INTERACTABLES.append(("upgrade-buy:" + upgrades[i][0],
|
||||
"shop",
|
||||
startX + XDiff * colInd,
|
||||
startX + XDiff * colInd + XDiff,
|
||||
startY + YDiff * i,
|
||||
startY + YDiff * i + YDiff))
|
||||
colInd += 1
|
||||
|
||||
print(app.INTERACTABLES)
|
||||
|
||||
|
||||
def resetFishingState(app):
|
||||
@@ -291,6 +312,10 @@ def onMousePress(app, mouseX, mouseY):
|
||||
app.scene = "shop"
|
||||
case "close-shop":
|
||||
app.scene = "idle"
|
||||
if name.startswith("upgrade-buy:"):
|
||||
print("buying upgrade", name)
|
||||
|
||||
|
||||
if not interacted and app.scene == "idle":
|
||||
beginFishing(app)
|
||||
case "result":
|
||||
@@ -333,7 +358,10 @@ def checkSkillHit(app):
|
||||
# advance or fail the skill check accordingly. On full success, mark the
|
||||
# creature as caught and move to the catch-display phase; on failure, end
|
||||
# the cast without a catch.
|
||||
try:
|
||||
targetPos, targetLen = app.skillCheckBars.pop(0)
|
||||
except IndexError:
|
||||
targetPos = targetLen = -1 #make it impossible to succeed, this means they clicked after already getting rid of all bars
|
||||
if not ( 0 < (app.skillCheckAngle - targetPos) < targetLen): #check if we hit a bar
|
||||
#if we succeed, nothing needs to happen, we popped the bar
|
||||
#if we fail, we either didnt hit or missed a past bar, either way we can jump straight to the fail screen
|
||||
@@ -500,6 +528,12 @@ def drawShopEntities(app):
|
||||
drawLine(app.width-5, 5, app.width-45, 45, fill='red', lineWidth=5)
|
||||
|
||||
|
||||
#draw upgrade purchases
|
||||
for name, sceneFilter, left, right, top, bottom in [interactable for interactable in app.INTERACTABLES if interactable[0].startswith("upgrade-buy:")]:
|
||||
print("drawing",name,left,right,top,bottom)
|
||||
drawRect(top, left, right - left, bottom - top, fill=None, border='black')
|
||||
drawLabel(name, top, left, align="top-left")
|
||||
|
||||
def drawSkillCheck(app):
|
||||
# Draw the active skill-check overlay: the circle, the target bars placed
|
||||
# around it (count/length from difficulty), and the rotating cursor at its
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
###############################################
|
||||
Total Time: 330 minutes
|
||||
Total Time: 360 minutes
|
||||
###############################################
|
||||
|
||||
###############################################
|
||||
@@ -57,3 +57,11 @@ End Time: 9:40pm
|
||||
Duration: 140 minutes
|
||||
Description: get a decent chunk of the visuals done and finish logic, much closer to being done
|
||||
###############################################
|
||||
|
||||
###############################################
|
||||
Date: 08-Oct
|
||||
Start Time: 10:45pm
|
||||
End Time: 11:15pm
|
||||
Duration: 30 minutes
|
||||
Description: need to take a brief break, just making sure time is accurate
|
||||
###############################################
|
||||
Reference in New Issue
Block a user