tmnam20 commited on
Commit
39fce52
1 Parent(s): 5fb61de

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -9
app.py CHANGED
@@ -9,9 +9,9 @@ st.set_page_config(
9
  page_icon="https://cdn.idle-mmo.com/uploaded/icons/01J305JYQ75MXXV2C3Z4D19SAV.png",
10
  layout="wide",
11
  )
12
- st.logo(
13
- "https://cdn.idle-mmo.com/cdn-cgi/image/height=250,width=250/global/helmet-solo.png"
14
- )
15
 
16
  tier_point = [
17
  55,
@@ -36,6 +36,7 @@ tier_point = [
36
 
37
  TARGET_POINT = 26_070
38
  st.title("IdleMMO - Moonlit Festival Campaign Calculator")
 
39
 
40
 
41
  with st.form("Player Statistics", border=False):
@@ -71,8 +72,6 @@ with st.form("Player Statistics", border=False):
71
  for i in range(0, current_tier - 1):
72
  consumed_point += tier_point[i]
73
 
74
- print(consumed_point)
75
-
76
  with st.container(border=True):
77
  st.subheader("Collected Resources")
78
 
@@ -136,6 +135,9 @@ with st.form("Player Statistics", border=False):
136
 
137
  button = st.form_submit_button("Submit")
138
  if button:
 
 
 
139
  time_to_complete = (
140
  TARGET_POINT
141
  - current_point
@@ -155,19 +157,16 @@ with st.form("Player Statistics", border=False):
155
  if playtime_per_day > 16:
156
  playtime_per_day = 16 + (playtime_per_day - 16) * 0.5
157
 
158
- # st.write(f"Time to complete: {time_to_complete // 60 // 60} minutes")
159
- # print time to complete in day, hour, minute
160
  day = time_to_complete // 60 // 60 // playtime_per_day
161
  hour = (time_to_complete - day * playtime_per_day * 60 * 60) // 60 // 60
162
  minute = (
163
  time_to_complete - day * playtime_per_day * 60 * 60 - hour * 60 * 60
164
  ) // 60
165
  st.info(
166
- f"Time to complete: {day:.0f} days {hour:.0f} hours {minute:.0f} minute"
167
  + "\n"
168
  )
169
 
170
- # add the time to complete to the current time and display the end time
171
  current_time = datetime.datetime.now()
172
  end_time = current_time + datetime.timedelta(seconds=time_to_complete)
173
 
 
9
  page_icon="https://cdn.idle-mmo.com/uploaded/icons/01J305JYQ75MXXV2C3Z4D19SAV.png",
10
  layout="wide",
11
  )
12
+ # st.logo(
13
+ # "https://cdn.idle-mmo.com/cdn-cgi/image/height=250,width=250/global/helmet-solo.png"
14
+ # )
15
 
16
  tier_point = [
17
  55,
 
36
 
37
  TARGET_POINT = 26_070
38
  st.title("IdleMMO - Moonlit Festival Campaign Calculator")
39
+ st.write("Author: cloux")
40
 
41
 
42
  with st.form("Player Statistics", border=False):
 
72
  for i in range(0, current_tier - 1):
73
  consumed_point += tier_point[i]
74
 
 
 
75
  with st.container(border=True):
76
  st.subheader("Collected Resources")
77
 
 
135
 
136
  button = st.form_submit_button("Submit")
137
  if button:
138
+ starlight_gem = min(starlight_gem, TARGET_POINT)
139
+ moonlit_chalice = min(moonlit_chalice, TARGET_POINT)
140
+ moonlight_essence = min(moonlight_essence, TARGET_POINT)
141
  time_to_complete = (
142
  TARGET_POINT
143
  - current_point
 
157
  if playtime_per_day > 16:
158
  playtime_per_day = 16 + (playtime_per_day - 16) * 0.5
159
 
 
 
160
  day = time_to_complete // 60 // 60 // playtime_per_day
161
  hour = (time_to_complete - day * playtime_per_day * 60 * 60) // 60 // 60
162
  minute = (
163
  time_to_complete - day * playtime_per_day * 60 * 60 - hour * 60 * 60
164
  ) // 60
165
  st.info(
166
+ f"Time to complete: {day:.0f} days {hour:.0f} hours {minute:.0f} minutes"
167
  + "\n"
168
  )
169
 
 
170
  current_time = datetime.datetime.now()
171
  end_time = current_time + datetime.timedelta(seconds=time_to_complete)
172