fix: Allow people to input the buy price even as a first time buyer

This will give us a basis for colouring. Also remove the Sunday prices from the table, to avoid confusion and questions when people ask why the Sunday price is different to the one they put in. This has the added bonus of making the table smaller, and doesn't really remove any relevant information for the future.

Fixes #288
master
Mike Bryant 5 years ago
parent a7e44f14ba
commit 8e8c80b491

@ -213,7 +213,6 @@
<tr> <tr>
<th valign="bottom" data-i18n="patterns.pattern"></th> <th valign="bottom" data-i18n="patterns.pattern"></th>
<th colspan="2" valign="bottom" data-i18n="output.chance"></th> <th colspan="2" valign="bottom" data-i18n="output.chance"></th>
<th valign="bottom" data-i18n="weekdays.sunday"></th>
<th colspan="2"> <th colspan="2">
<div data-i18n="weekdays.monday"></div> <div data-i18n="weekdays.monday"></div>
<div> <div>

@ -294,7 +294,7 @@ const calculateOutput = function (data, first_buy, previous_pattern) {
out_line += `<td rowspan=${pattern_count}>${displayPercentage(poss.category_total_probability)}</td>`; out_line += `<td rowspan=${pattern_count}>${displayPercentage(poss.category_total_probability)}</td>`;
} }
out_line += `<td>${displayPercentage(poss.probability)}</td>`; out_line += `<td>${displayPercentage(poss.probability)}</td>`;
for (let day of poss.prices.slice(1)) { for (let day of poss.prices.slice(2)) {
let price_class = getPriceClass(buy_price, day.max); let price_class = getPriceClass(buy_price, day.max);
if (day.min !== day.max) { if (day.min !== day.max) {
out_line += `<td class='${price_class}'>${day.min} ${i18next.t("output.to")} ${day.max}</td>`; out_line += `<td class='${price_class}'>${day.min} ${i18next.t("output.to")} ${day.max}</td>`;
@ -367,9 +367,6 @@ const update = function () {
const first_buy = getCheckedRadio(first_buy_radios) == 'true'; const first_buy = getCheckedRadio(first_buy_radios) == 'true';
const previous_pattern = parseInt(getCheckedRadio(previous_pattern_radios)); const previous_pattern = parseInt(getCheckedRadio(previous_pattern_radios));
buy_input[0].disabled = first_buy;
buy_input[0].placeholder = first_buy ? '—' : '...'
const permalink = generatePermalink(buy_price, sell_prices, first_buy, previous_pattern); const permalink = generatePermalink(buy_price, sell_prices, first_buy, previous_pattern);
if (permalink) { if (permalink) {
permalink_button.show(); permalink_button.show();

@ -25,7 +25,7 @@
"small-spike": "Pic petit" "small-spike": "Pic petit"
}, },
"prices": { "prices": {
"description": "Quin ha sigut el preu de compra de naps a la teva illa aquesta setmana?<i>(Si no has comprat naps abans, aquest camp estarà desactivat)</i>", "description": "Quin ha sigut el preu de compra de naps a la teva illa aquesta setmana?",
"open": { "open": {
"am": "AM - De les 8:00 am a les 11:59 am", "am": "AM - De les 8:00 am a les 11:59 am",
"pm": "PM - De les 12:00 pm a les 10:00 pm" "pm": "PM - De les 12:00 pm a les 10:00 pm"

@ -25,7 +25,7 @@
"small-spike": "Leicht Ansteigend" "small-spike": "Leicht Ansteigend"
}, },
"prices": { "prices": {
"description": "Wie hoch war der Preis für Rüben diese Woche auf deiner Insel? <i>(Wenn du zum ersten Mal Rüben kaufst, wird dieses Feld deaktiviert)</i>", "description": "Wie hoch war der Preis für Rüben diese Woche auf deiner Insel?",
"open": { "open": {
"am": "Vorm. (Vormittag) - 8:00 Uhr bis 11:59 Uhr", "am": "Vorm. (Vormittag) - 8:00 Uhr bis 11:59 Uhr",
"pm": "Nachm. (Nachmittag) - 12:00 Uhr bis 22:00 Uhr" "pm": "Nachm. (Nachmittag) - 12:00 Uhr bis 22:00 Uhr"

@ -25,7 +25,7 @@
"small-spike": "Small Spike" "small-spike": "Small Spike"
}, },
"prices": { "prices": {
"description": "What was the price of turnips this week on your island? <i>(If this is your first time buying turnips, this field will be disabled)</i>", "description": "What was the price of turnips this week on your island?",
"open": { "open": {
"am": "AM - 8:00 am to 11:59 am", "am": "AM - 8:00 am to 11:59 am",
"pm": "PM - 12:00 pm to 10:00 pm" "pm": "PM - 12:00 pm to 10:00 pm"

@ -25,7 +25,7 @@
"small-spike": "Pico moderado" "small-spike": "Pico moderado"
}, },
"prices": { "prices": {
"description": "¿Cuál fue el precio de los nabos en su isla esta semana? <i>(Si esta ha sido tu primera vez comprando nabos, este campo se desactivará)</i>", "description": "¿Cuál fue el precio de los nabos en su isla esta semana?",
"open": { "open": {
"am": "AM - De 8:00 a 11:59", "am": "AM - De 8:00 a 11:59",
"pm": "PM - De 12:00 a 22:00" "pm": "PM - De 12:00 a 22:00"

@ -25,7 +25,7 @@
"small-spike": "Petit Pic" "small-spike": "Petit Pic"
}, },
"prices": { "prices": {
"description": "À quel prix Porcelette vendait ses navets sur ton île cette semaine ?<i>(Si c'est la première fois que t'en achètes, ce champ sera desactivé)</i>", "description": "À quel prix Porcelette vendait ses navets sur ton île cette semaine ?",
"open": { "open": {
"am": "Matin (AM) - de 8:00 à 11:59", "am": "Matin (AM) - de 8:00 à 11:59",
"pm": "Après-midi (PM) - de 12:00 à 22:00" "pm": "Après-midi (PM) - de 12:00 à 22:00"

@ -25,7 +25,7 @@
"small-spike": "Kis kiugrás" "small-spike": "Kis kiugrás"
}, },
"prices": { "prices": {
"description": "Mennyiért vettél ezen a héten retket? <i>(Ha most vásárolsz először, ez a mező le lesz tiltva)</i>", "description": "Mennyiért vettél ezen a héten retket?",
"open": { "open": {
"am": "Délelőtt - 08:00-tól 11:59-ig", "am": "Délelőtt - 08:00-tól 11:59-ig",
"pm": "Délután - 12:00-től 22:00-ig" "pm": "Délután - 12:00-től 22:00-ig"

@ -26,7 +26,7 @@
"small-spike": "Piccolo picco" "small-spike": "Piccolo picco"
}, },
"prices": { "prices": {
"description": "Qual era il prezzo di acquisto delle rape sulla tua isola questa settimana? <i>(Se è la prima volta che le compri questo campo è disabilitato)</i>", "description": "Qual era il prezzo di acquisto delle rape sulla tua isola questa settimana?",
"open": { "open": {
"am": "Mattina - dalle 8:00 alle 11:59", "am": "Mattina - dalle 8:00 alle 11:59",
"pm": "Pomeriggio - dalle 12:00 alle 22:00" "pm": "Pomeriggio - dalle 12:00 alle 22:00"

@ -25,7 +25,7 @@
"small-spike": "跳ね小型(4期型)" "small-spike": "跳ね小型(4期型)"
}, },
"prices": { "prices": {
"description": "今週のカブ価は? <i>(初めてカブを購入した場合は、この入力欄は無効にされています)</i>", "description": "今週のカブ価は?",
"open": { "open": {
"am": "午前 - AM 8:00 AM 11:59", "am": "午前 - AM 8:00 AM 11:59",
"pm": "午後 - PM 12:00 PM 10:00" "pm": "午後 - PM 12:00 PM 10:00"

@ -25,7 +25,7 @@
"small-spike": "작은 급등" "small-spike": "작은 급등"
}, },
"prices": { "prices": {
"description": "이번 주에 당신의 섬에서 무를 샀을 때의 가격이 어떻게 됩니까? <i>(첫 구매인 경우에는 입력란이 비활성화됩니다)</i>", "description": "이번 주에 당신의 섬에서 무를 샀을 때의 가격이 어떻게 됩니까?",
"open": { "open": {
"am": "오전 - 오전 8:00 ~ 오전 11:59", "am": "오전 - 오전 8:00 ~ 오전 11:59",
"pm": "오후 - 오후 12:00 ~ 오후 10:00" "pm": "오후 - 오후 12:00 ~ 오후 10:00"

@ -25,7 +25,7 @@
"small-spike": "Kleine Piek" "small-spike": "Kleine Piek"
}, },
"prices": { "prices": {
"description": "Wat was de prijs van knollen op je eiland deze week? <i>(Als dit de eerste keer is dat je knollen koopt is dit veld uitgeschakeld)</i>", "description": "Wat was de prijs van knollen op je eiland deze week?",
"open": { "open": {
"am": "Voormiddag - 8:00 tot 11:59", "am": "Voormiddag - 8:00 tot 11:59",
"pm": "Namiddag - 12:00 tot 22:00" "pm": "Namiddag - 12:00 tot 22:00"

@ -25,7 +25,7 @@
"small-spike": "Pequeno Pico" "small-spike": "Pequeno Pico"
}, },
"prices": { "prices": {
"description": "Qual foi o preço dos nabos esta semana em sua ilha? <i>(Se esta é a primeira vez que compra nabos, este campo ficará desativado)</i>", "description": "Qual foi o preço dos nabos esta semana em sua ilha?",
"open": { "open": {
"am": "AM - 8:00 am até 11:59 am", "am": "AM - 8:00 am até 11:59 am",
"pm": "PM - 12:00 pm até 10:00 pm" "pm": "PM - 12:00 pm até 10:00 pm"

@ -25,7 +25,7 @@
"small-spike": "Малый скачок" "small-spike": "Малый скачок"
}, },
"prices": { "prices": {
"description": "Какова была стоимость репы у Дейзи Мэй на Вашем острове на этой неделе? <i>(Если Вы новичок рынка репы, данное поле будет недоступно)</i>", "description": "Какова была стоимость репы у Дейзи Мэй на Вашем острове на этой неделе?",
"open": { "open": {
"am": "Утро - 8:00 - 11:59", "am": "Утро - 8:00 - 11:59",
"pm": "День - 12:00 - 22:00" "pm": "День - 12:00 - 22:00"

@ -25,7 +25,7 @@
"small-spike": "小幅上涨(四期型)" "small-spike": "小幅上涨(四期型)"
}, },
"prices": { "prices": {
"description": "本周你的岛上大头菜的购买价格是多少?<i>(如果你是第一次购买大头菜,这个字段不可用)</i>", "description": "本周你的岛上大头菜的购买价格是多少?",
"open": { "open": {
"am": "上午 - 8:00 ~ 11:59", "am": "上午 - 8:00 ~ 11:59",
"pm": "下午 - 12:00 ~ 22:00" "pm": "下午 - 12:00 ~ 22:00"

@ -25,7 +25,7 @@
"small-spike": "四期型" "small-spike": "四期型"
}, },
"prices": { "prices": {
"description": "本週自己島上的大頭菜買價?<i>(若這是你第一次購買大頭菜,則此欄位會被停用)</i>", "description": "本週自己島上的大頭菜買價?",
"open": { "open": {
"am": "上午 - 08:00 到 11:59", "am": "上午 - 08:00 到 11:59",
"pm": "下午 - 12:00 到 22:00" "pm": "下午 - 12:00 到 22:00"

Loading…
Cancel
Save