operon360 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- operon360/__init__.py +1 -0
- operon360/__main__.py +23 -0
- operon360/mira-ilk-vardiya.html +284 -0
- operon360-0.2.0.dist-info/METADATA +19 -0
- operon360-0.2.0.dist-info/RECORD +8 -0
- operon360-0.2.0.dist-info/WHEEL +5 -0
- operon360-0.2.0.dist-info/entry_points.txt +2 -0
- operon360-0.2.0.dist-info/top_level.txt +1 -0
operon360/__init__.py
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Mira A.Ş. · Vardiya Operasyonu."""
|
operon360/__main__.py
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Open the bundled, offline game in the default browser."""
|
|
2
|
+
import argparse
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import webbrowser
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def main():
|
|
8
|
+
parser = argparse.ArgumentParser(description="Mira A.Ş. · Vardiya Operasyonu")
|
|
9
|
+
parser.add_argument("--print-url", action="store_true", help="Tarayıcıyı açmadan adresi yazdır.")
|
|
10
|
+
args = parser.parse_args()
|
|
11
|
+
page = Path(__file__).resolve().with_name("mira-ilk-vardiya.html").as_uri()
|
|
12
|
+
if args.print_url:
|
|
13
|
+
print(page)
|
|
14
|
+
return 0
|
|
15
|
+
print("Mira A.Ş. | Vardiya Operasyonu")
|
|
16
|
+
if not webbrowser.open(page):
|
|
17
|
+
print("Tarayıcı otomatik açılmadı. Bu adresi tarayıcıya yapıştır:")
|
|
18
|
+
print(page)
|
|
19
|
+
return 0
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if __name__ == "__main__":
|
|
23
|
+
raise SystemExit(main())
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="tr">
|
|
3
|
+
<head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1">
|
|
4
|
+
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src 'unsafe-inline'; script-src 'unsafe-inline'; connect-src 'none'; base-uri 'none'; form-action 'none'">
|
|
5
|
+
<title>Mira A.Ş. · Vardiya Operasyonu</title>
|
|
6
|
+
<style>
|
|
7
|
+
:root{color-scheme:dark;--ink:#f4f5eb;--muted:#b2c4ca;--mint:#9affbb;--gold:#ffd477;--red:#ffab91;--line:#36545b;--panel:#101c24;font:16px system-ui,sans-serif}
|
|
8
|
+
*{box-sizing:border-box}body{margin:0;background:#080e14;color:var(--ink)}[hidden]{display:none!important}button{font:inherit;cursor:pointer}button:focus-visible{outline:3px solid var(--gold);outline-offset:3px}
|
|
9
|
+
main{margin:0 auto;width:min(1520px,100%);padding:clamp(14px,2.5vw,36px)}
|
|
10
|
+
header,.metrics,.foot,.toolbar,.zonebar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}header,.foot{justify-content:space-between}.brand{font-weight:900;letter-spacing:.14em}.mark{display:inline-grid;place-items:center;width:31px;height:31px;background:var(--mint);color:#0a2119;border-radius:8px;margin-right:10px;letter-spacing:0}
|
|
11
|
+
.eyebrow,.unit,.foot,.order-meta,.camera-label{font:700 13px ui-monospace,monospace;letter-spacing:.075em;color:var(--muted)}.eyebrow{color:var(--mint);margin:0 0 8px}.edition{color:var(--gold)}
|
|
12
|
+
.metrics{margin:16px 0}.metric{min-width:115px;padding:9px 13px;background:#101c24;border:1px solid var(--line);border-radius:8px}.metric strong{display:block;font-size:21px;line-height:1.2}.metric span{font-size:12px;letter-spacing:.05em;color:var(--muted)}
|
|
13
|
+
.content{display:grid;grid-template-columns:minmax(0,1.36fr) minmax(360px,1fr);gap:14px;align-items:start}
|
|
14
|
+
.stage,.console,.log,.event{border:1px solid var(--line);border-radius:13px;background:var(--panel);overflow:hidden}
|
|
15
|
+
.stage{position:relative;height:clamp(310px,48vh,535px);background:#0e1b22;isolation:isolate}
|
|
16
|
+
canvas{width:100%;height:100%;display:block}.stage:after{content:"";position:absolute;inset:0;pointer-events:none;background:radial-gradient(ellipse at 55% 40%,transparent 35%,#05080b99 100%)}
|
|
17
|
+
.camera-label{position:absolute;top:15px;left:15px;z-index:1;background:#0a141bd9;border-radius:5px;padding:7px 8px;color:#deeee9}.zonebar{position:absolute;bottom:12px;left:12px;right:12px;z-index:1;gap:5px}
|
|
18
|
+
.btn{min-height:42px;padding:8px 12px;border-radius:7px;border:1px solid var(--line);background:#172932;color:var(--ink);font-weight:700}.btn:hover:not(:disabled){background:#24434b}.btn.primary{background:var(--mint);border-color:var(--mint);color:#09211a}.btn.primary:hover:not(:disabled){background:#c7ffd6}.btn:disabled{opacity:.5;cursor:default}.zonebar .btn{background:#0b1722e8;min-height:36px;font-size:13px;padding:6px 9px}.zonebar .btn[aria-pressed=true]{background:var(--mint);color:#09211a}.btn .cost{display:block;font-size:12px;font-weight:500;margin-top:3px}.btn.primary .cost{color:#214539}
|
|
19
|
+
.console,.log,.event{padding:clamp(13px,2vw,24px)}.log{margin-top:12px}.event{margin-top:12px;border-color:#866b3c;background:#241e13}.event strong{color:var(--gold)}
|
|
20
|
+
h1{font-size:clamp(28px,4vw,50px);line-height:1.02;margin:0 0 10px;letter-spacing:-.055em}h2{font-size:22px;margin:0 0 7px}h3{font-size:16px;margin:0 0 7px}p{margin:0 0 11px;line-height:1.45;color:var(--muted)}.small{font-size:14px}
|
|
21
|
+
.orders{display:grid;gap:6px;margin:12px 0}.order{display:grid;grid-template-columns:1fr auto;align-items:center;gap:4px 8px;text-align:left;padding:9px 11px}.order[aria-pressed=true]{border-color:var(--mint);background:#183730}.order-meta{grid-column:1/-1;font-size:12px}.pill{font-size:11px;border:1px solid var(--line);color:#d2e3e7;padding:3px 6px;border-radius:20px;white-space:nowrap}.pill.pass{color:var(--mint)}.pill.late{color:var(--gold)}.actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.actions .btn{text-align:left}.selected{border-top:1px solid var(--line);padding-top:11px}.log ul{list-style:none;margin:0;padding:0}.log li{padding:5px 0;color:var(--muted);font-size:14px;border-bottom:1px solid #28434b}.log li:last-child{border-bottom:0}.log b{color:var(--mint)}.foot{margin-top:11px}.result{margin:10px 0;color:var(--mint);font-weight:700}.warn{color:var(--gold)}.bad{color:var(--red)}
|
|
22
|
+
.progress{height:5px;margin:8px 0 0;background:#233942;border-radius:8px;overflow:hidden}.progress span{display:block;background:var(--mint);height:100%;width:0}
|
|
23
|
+
@media(max-width:850px){.content{grid-template-columns:1fr}.stage{height:clamp(250px,40vh,400px)}.log{display:none}}@media(max-width:430px){.metric{min-width:0;flex:1 0 42%}.actions{grid-template-columns:1fr}.foot{font-size:11px}}
|
|
24
|
+
</style></head>
|
|
25
|
+
<body><main>
|
|
26
|
+
<header><div class="brand"><span class="mark" aria-hidden="true">M</span>MİRA A.Ş.</div><span class="eyebrow edition">VARDİYA OPERASYONU / V0.2</span></header>
|
|
27
|
+
<div class="metrics" aria-label="Vardiya göstergeleri">
|
|
28
|
+
<div class="metric"><span>VARDİYA</span><strong id="shift">01 / 03</strong></div><div class="metric"><span>KALAN DİLİM</span><strong id="time">12</strong><div class="progress" aria-hidden="true"><span id="meter"></span></div></div>
|
|
29
|
+
<div class="metric"><span>BÜTÇE</span><strong id="cash">18</strong></div><div class="metric"><span>ZAMANINDA</span><strong id="score">0 / 2</strong></div></div>
|
|
30
|
+
<div class="content">
|
|
31
|
+
<div class="visual">
|
|
32
|
+
<section class="stage" aria-label="Üç boyutlu fabrika"><canvas id="scene" aria-hidden="true"></canvas><span class="camera-label" id="cam">KAM / GENEL</span><nav class="zonebar" aria-label="Kamera açıları"><button class="btn" data-zone="overview" aria-pressed="true">Genel</button><button class="btn" data-zone="depot" aria-pressed="false">Depo</button><button class="btn" data-zone="production" aria-pressed="false">Hat</button><button class="btn" data-zone="quality" aria-pressed="false">Kalite</button><button class="btn" data-zone="dispatch" aria-pressed="false">Sevkiyat</button></nav></section>
|
|
33
|
+
<section class="event" id="incident" hidden aria-live="polite"></section>
|
|
34
|
+
<section class="log" aria-label="Vardiya kayıtları"><h3>Vardiya defteri</h3><ul id="log"><li>Devir teslim bekleniyor.</li></ul></section>
|
|
35
|
+
</div>
|
|
36
|
+
<section class="console" aria-label="Vardiya kumandası">
|
|
37
|
+
<div id="intro"><p class="eyebrow">01 / DEVİR TESLİM</p><h1>Fabrika sizin!</h1><p>Üç vardiya, sekiz sipariş. Depodaki kutuyu kamyona kadar takip edin. Önce neyi yetiştireceğinize siz karar verin.</p><p class="small">Her işlem bir dilim. Kamera gezisi ve parti seçmek ücretsiz. Termin, işlemin <strong>bittiği</strong> dilime göre hesaplanır.</p><button class="btn primary" id="start">Vardiyayı devral</button></div>
|
|
38
|
+
<div id="play" hidden><p class="eyebrow" id="briefTag"></p><h1 id="briefTitle"></h1><p class="small" id="brief"></p><div class="orders" id="orders" aria-label="Siparişler"></div><div class="selected"><h3 id="lotTitle"></h3><p class="small" id="lotNote"></p><div class="actions" id="actions"></div></div><p class="result small" id="feedback" role="status"></p><div class="toolbar"><button class="btn" id="finish">Vardiyayı kapat</button></div></div>
|
|
39
|
+
<div id="summary" hidden><p class="eyebrow">VARDİYA RAPORU</p><h1 id="resultTitle"></h1><p id="resultText"></p><div id="ledger"></div><div class="toolbar"><button class="btn primary" id="next">Sonraki vardiya</button><button class="btn" id="retry">Bu vardiyayı tekrar et</button><button class="btn" id="restart">Baştan başla</button></div></div>
|
|
40
|
+
</section>
|
|
41
|
+
</div>
|
|
42
|
+
<footer class="foot"><span>OPERON360 / KURGUSAL FABRİKA</span><span>ÇEVRİMDIŞI · GERÇEK MODEL YOK</span></footer>
|
|
43
|
+
</main><script>
|
|
44
|
+
"use strict";
|
|
45
|
+
const $=id=>document.getElementById(id);
|
|
46
|
+
const LEVELS=[
|
|
47
|
+
{title:"Hat neden durdu?", limit:12, cash:18, text:"Fişin nerede olduğunu biliyoruz. Ama iki kutuyu da doğru kamyona bindirebilecek miyiz?", incident:"Hat enerjisiz. Konveyörü çalıştırmadan üretim başlamaz.", orders:[
|
|
48
|
+
["M-101","Ada yeşili / 8 parça",5,0,"Acil müşteri. Temiz parti, kısa termin."],["M-102","Gece mavisi / 12 parça",11,1,"Yüzeyde iz şüphesi var. Kontrolü atlama."]]},
|
|
49
|
+
{title:"Kırmızı alarm", limit:17,cash:22,text:"Acil kırmızı sipariş ile hasarlı palet aynı anda geldi. Hepsini birden önce yapamazsın.",incident:"Acil iş: Kırmızı kamyon 6. dilimde kalkıyor.",orders:[
|
|
50
|
+
["M-201","İşaret kırmızısı / 6 parça",6,0,"Öncelikli kamyon. Hızlı kalıp kullanılabilir, kaliteyi kontrol et."],["M-202","Kum sarısı / 12 parça",13,1,"Paletin etiketinde hasar bildirimi var."],["M-203","Ada yeşili / 8 parça",16,0,"Önceki siparişle aynı renk, ama farklı parti."]]},
|
|
51
|
+
{title:"Son kamyon",limit:19,cash:23,text:"Nem yükseldi. İlk iki müşteri arka arkaya geliyor; büyük sipariş son rampada.",incident:"3. dilimde kabin nemi artacak. Önlem almazsan o andan sonraki üretim kusur kazanır.",orders:[
|
|
52
|
+
["M-301","Gece mavisi / 10 parça",6,0,"İlk kamyon, vakit az."],["M-302","Sis grisi / 8 parça",12,0,"Nem artışından etkilenebilir."],["M-303","İşaret kırmızısı / 16 parça",18,1,"Yüzeyde iz ihtimali var. Tamir için dilim ayır."]]}
|
|
53
|
+
];
|
|
54
|
+
const stageName={waiting:"Depoda",staged:"Hatta hazır",made:"Kalitede",repair:"Tamir bekliyor",hold:"İade / beklemede",approved:"Sevke hazır",sent:"Sevk edildi"};
|
|
55
|
+
function newShift(index) {
|
|
56
|
+
const l=LEVELS[index];
|
|
57
|
+
return {index,t:0,cash:l.cash,line:index!==0,dry:false,earlyAI:false,active:0,didClose:false,
|
|
58
|
+
order:l.orders.map(([id,label,due,risk,hint])=>({id,label,due,risk,hint,stage:"waiting",ship:null,returned:false})),
|
|
59
|
+
log:["Devir teslim alındı."]};
|
|
60
|
+
}
|
|
61
|
+
const current=g=>g.order[g.active];
|
|
62
|
+
function stats(g){ return {on:g.order.filter(o=>o.stage==="sent"&&o.ship<=o.due).length,
|
|
63
|
+
sent:g.order.filter(o=>o.stage==="sent").length, returns:g.order.filter(o=>o.returned).length}; }
|
|
64
|
+
const actionInfo={
|
|
65
|
+
power:["Fişi kontrol et",0,"Hat"],ai:["120B model çağır",1,"Danışman"],dry:["Kabin kurutucusunu aç",2,"Hat"],
|
|
66
|
+
stage:["Depodan hatta al",1,"Depo"],make:["Normal üretim yap",2,"Hat"],rush:["Hızlı ayar / üret",1,"Hat"],
|
|
67
|
+
inspect:["Kalite kontrolü yap",1,"Kalite"],repair:["Yüzeyi düzelt",2,"Kalite"],ship:["Sevk et",1,"Sevkiyat"],
|
|
68
|
+
blind:["Kontrolsüz sevk et",1,"Sevkiyat"],wait:["Bir dilim bekle",0,"Planlama"]};
|
|
69
|
+
const zonesOf={power:"production",ai:"production",dry:"production",stage:"depot",make:"production",rush:"production",inspect:"quality",repair:"quality",ship:"dispatch",blind:"dispatch"};
|
|
70
|
+
function available(g){
|
|
71
|
+
const o=current(g),list=[];
|
|
72
|
+
if(!g.line)list.push("power");
|
|
73
|
+
if(!g.earlyAI&&g.index===0)list.push("ai");
|
|
74
|
+
if(g.index===2&&!g.dry)list.push("dry");
|
|
75
|
+
if(o.stage==="waiting")list.push("stage");
|
|
76
|
+
if(o.stage==="staged"&&g.line)list.push("make","rush");
|
|
77
|
+
if(o.stage==="made")list.push("inspect","blind");
|
|
78
|
+
if(o.stage==="repair"||o.stage==="hold")list.push("repair");
|
|
79
|
+
if(o.stage==="approved")list.push("ship");
|
|
80
|
+
list.push("wait");
|
|
81
|
+
return list;
|
|
82
|
+
}
|
|
83
|
+
function advance(g,a) {
|
|
84
|
+
if(g.didClose||g.t>=LEVELS[g.index].limit||!available(g).includes(a)||g.cash<actionInfo[a][1])return null;
|
|
85
|
+
const o=current(g), notes=[], now=++g.t;
|
|
86
|
+
g.cash-=actionInfo[a][1];
|
|
87
|
+
const log=m=>notes.push(m);
|
|
88
|
+
switch(a){
|
|
89
|
+
case "power":g.line=true;log("Fiş takılı değilmiş. Harcanan token: 0.");break;
|
|
90
|
+
case "ai":g.earlyAI=true;log("120B: “Konveyör çalışmıyor olabilir.” "+(g.line?"Model eski veriye bakmış: Hat çalışıyor.":"Hat hâlâ duruyor."));break;
|
|
91
|
+
case "dry":g.dry=true;log("Kabin kurudu. Daha önce üretilen partileri de ayrıca kontrol et.");break;
|
|
92
|
+
case "stage":o.stage="staged";log(o.id+" depodan hatta geldi.");break;
|
|
93
|
+
case "make":case "rush":
|
|
94
|
+
o.stage="made";
|
|
95
|
+
if(a==="rush"&&g.index===1&&o.id==="M-201") log("Hazır kalıp kullanıldı. Bir kredi cebimizde kaldı.");
|
|
96
|
+
else if(a==="rush")o.risk++;
|
|
97
|
+
if(g.index===2&&now>=3&&!g.dry)o.risk++;
|
|
98
|
+
log(o.id+" üretildi ve kaliteye alındı.");break;
|
|
99
|
+
case "inspect":
|
|
100
|
+
o.stage=o.risk?"repair":"approved";
|
|
101
|
+
log(o.risk?o.id+" kontrolde kaldı. Tamir ve yeniden kontrol gerekiyor.":o.id+" kalite onayı aldı.");break;
|
|
102
|
+
case "repair":o.risk=0;o.stage="made";log(o.id+" düzeltildi. Kalite kontrolünü yeniden yap.");break;
|
|
103
|
+
case "ship":case "blind":
|
|
104
|
+
if(a==="blind"&&o.risk){
|
|
105
|
+
o.stage="hold";o.returned=true;g.cash=Math.max(0,g.cash-2);log(o.id+" kusurlu çıktı ve geri döndü. İade cezası: 2 kredi.");break;
|
|
106
|
+
}
|
|
107
|
+
o.stage="sent";o.ship=now;g.cash+=2;
|
|
108
|
+
log(o.id+(now<=o.due?" zamanında sevk edildi.":" geç sevk edildi.")+" Sevkiyat geliri: +2 kredi.");break;
|
|
109
|
+
case "wait":log("Bir dilim geçti.");break;
|
|
110
|
+
}
|
|
111
|
+
if(g.index===2&&now===3&&!g.dry)log("Nem alarmı: Bundan sonraki üretime kusur riski eklenecek.");
|
|
112
|
+
for(const order of g.order)if(order.due===now&&order.stage!=="sent")log(order.id+" için zamanında teslim penceresi kapandı.");
|
|
113
|
+
g.log.unshift(...notes.reverse().map(m=>({t:now,m})));
|
|
114
|
+
if(g.t>=LEVELS[g.index].limit||stats(g).sent===g.order.length)g.didClose=true;
|
|
115
|
+
return notes.slice().reverse().join(" ");
|
|
116
|
+
}
|
|
117
|
+
const canvas=$("scene"), c=canvas.getContext("2d");
|
|
118
|
+
const reduced=matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
119
|
+
let width=1,height=1,dpr=1, shipped=0, motionStart=0, zone="overview";
|
|
120
|
+
const boxes=[];
|
|
121
|
+
function box(x,y,z,dx,dy,dz,t,l,r,to=boxes){to.push({x,y,z,dx,dy,dz,colors:[t,l,r],layer:y<0?0:dy<=.04&&y<.1?1:2});}
|
|
122
|
+
box(-11,-.32,-15,22,.31,30,"#29434b","#193039","#10262e");
|
|
123
|
+
for(let x=-10;x<=10;x+=2)box(x,.002,-15,.023,.004,30,"#46616a","#46616a","#46616a");
|
|
124
|
+
for(let z=-14;z<=14;z+=2)box(-11,.008,z,22,.003,.022,"#46616a","#46616a","#46616a");
|
|
125
|
+
for(const x of [-3.45,3.45])box(x,.015,-14,.05,.006,26,"#ceaa52","#ceaa52","#ceaa52");
|
|
126
|
+
for(const x of [-9.6,-6.8,5.15,7.9]) for(const z of [-12,-7.9,-3.8,1]) {
|
|
127
|
+
for(const h of [0,1.12,2.24])box(x,h,z,1.65,.115,3.0,"#b1c6ca","#516e77","#334e54");
|
|
128
|
+
for(const u of [0,1.54])for(const v of [0,2.88])box(x+u,0,z+v,.11,2.76,.11,"#80a3aa","#53727b","#40616c");
|
|
129
|
+
for(let i=0;i<3;i++)for(let j=0;j<2;j++){
|
|
130
|
+
if((i+j+Math.round(z))%5===0)continue;
|
|
131
|
+
const blue=(i+j+Math.round(x))%3===0;
|
|
132
|
+
box(x+.22,j*1.12+.12,z+.15+i*.92,1.2,.54,.78,blue?"#6bdcb8":"#e1a764",blue?"#388775":"#a86c44",blue?"#286b63":"#835333");
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
for(const x of [-10.65,10.3])for(const z of [-13,-7,-1,5,11])box(x,0,z,.35,5.1,.35,"#b2ced2","#63828b","#44606a");
|
|
136
|
+
box(-2.7,.01,-12,5.4,.014,12,"#304b56","#304b56","#304b56");
|
|
137
|
+
for(const z of [-10,-8,-6,-4,-2,-.2])for(const x of [-1.12,.96])box(x,0,z,.16,.72,.18,"#8b999d","#526970","#3a5157");
|
|
138
|
+
for(let i=0;i<25;i++)box(-1.22,.72,-10+i*.412,2.44,.22,.413,"#47595e","#283c45","#1c2c35");
|
|
139
|
+
for(let i=0;i<25;i++)box(-1.15,.943,-9.94+i*.4,2.3,.035,.15,"#8aabb0","#557079","#3f5259");
|
|
140
|
+
for(const x of [-1.24,1.12])box(x,.985,-10,.12,.1,10.4,"#f5be65","#a87730","#795b32");
|
|
141
|
+
box(-2.7,0,-3.9,.65,1,.63,"#86aaa6","#44676e","#365258");
|
|
142
|
+
box(-2.62,1,-3.82,.49,.18,.48,"#1c3538","#1b3135","#13262b");
|
|
143
|
+
box(-9,.01,-14.5,18,.026,.13,"#9affbb","#6ab486","#397259");
|
|
144
|
+
box(4,.01,5,5,.03,6,"#365c59","#365c59","#365c59");
|
|
145
|
+
for(let i=0;i<4;i++)box(4+i*1.25,.045,10.8,.55,.012,.16,"#ffd477","#ffd477","#ffd477");
|
|
146
|
+
box(5,.05,6,3.4,.22,2.05,"#90acac","#577074","#405963");
|
|
147
|
+
box(6.83,.28,6.1,1.4,1.05,1.8,"#7ddfbd","#49977e","#2f6e60");
|
|
148
|
+
box(5.02,.28,6.1,1.81,1.38,1.8,"#d1e3e4","#6d9ba1","#506c74");
|
|
149
|
+
box(5.24,1,7.9,1.32,.47,.022,"#76c1da","#365c70","#244353");
|
|
150
|
+
box(-3.7,0,-4.55,1.23,1,.92,"#beae74","#816d4b","#61533d");
|
|
151
|
+
box(-3.53,1,-4.4,.67,.19,.65,"#9fffc3","#4c966f","#315d50");
|
|
152
|
+
box(-4,.02,-5.1,1.37,.02,2.14,"#8a7444","#8a7444","#8a7444");
|
|
153
|
+
const confetti=Array.from({length:110},(_,i)=>({x:(i*89%997)/997,y:(i*61%211)/211,v:110+i%17*12,p:i*.73,col:["#9affbb","#ffd477","#64ddf4","#e4abff"][i%4]}));
|
|
154
|
+
const mix=(a,b,t)=>a+(b-a)*t;
|
|
155
|
+
const lerp=(a,b,t)=>a.map((v,i)=>mix(v,b[i],t));
|
|
156
|
+
const ease=t=>t*t*(3-2*t);
|
|
157
|
+
const dot=(a,b)=>a.reduce((s,v,i)=>s+v*b[i],0);
|
|
158
|
+
const sub=(a,b)=>a.map((v,i)=>v-b[i]);
|
|
159
|
+
const norm=a=>a.map(v=>v/Math.hypot(...a));
|
|
160
|
+
const cross=([a,b,d],[e,f,g])=>[b*g-d*f,d*e-a*g,a*f-b*e];
|
|
161
|
+
const views={overview:[[16,14,22],[0,0,-2]],depot:[[-4,4.4,4.8],[-6.7,.6,-6]],production:[[6.6,6.0,6.9],[0,.5,-3.7]],quality:[[3.5,4.2,7.2],[-2,1,-3.2]],dispatch:[[12,8.2,17],[4.6,.4,6.5]]};
|
|
162
|
+
const camTitles={overview:"GENEL",depot:"DEPO",production:"ÜRETİM HATTI",quality:"KALİTE",dispatch:"SEVKİYAT"};
|
|
163
|
+
const interpolate=(now)=>{const t=reduced?1:ease(Math.min(1,Math.max(0,(now-motionStart)/1180)));return views[zone].map((v,i)=>lerp(fromView[i],v,t));};
|
|
164
|
+
let fromView=views.overview;
|
|
165
|
+
function gotoZone(key) {
|
|
166
|
+
if(!views[key]||zone===key)return;
|
|
167
|
+
const now=performance.now();fromView=interpolate(now);zone=key;motionStart=now;
|
|
168
|
+
$("cam").textContent="KAM / "+camTitles[key];
|
|
169
|
+
for(const b of document.querySelectorAll("[data-zone]"))b.setAttribute("aria-pressed",String(b.dataset.zone===key));
|
|
170
|
+
}
|
|
171
|
+
function size(){
|
|
172
|
+
const r=canvas.getBoundingClientRect();
|
|
173
|
+
if(!r.width||!r.height)return;
|
|
174
|
+
width=r.width;height=r.height;dpr=Math.min(2,devicePixelRatio||1);
|
|
175
|
+
canvas.width=Math.round(width*dpr);canvas.height=Math.round(height*dpr);
|
|
176
|
+
}
|
|
177
|
+
function render(now){
|
|
178
|
+
if(c){
|
|
179
|
+
const [camera,target]=interpolate(now);
|
|
180
|
+
const fw=norm(sub(target,camera)), right=norm(cross(fw,[0,1,0])), up=cross(right,fw);
|
|
181
|
+
const focal=Math.min(width*.89,height*1.23);
|
|
182
|
+
const cx=width>720?width*.585:width*.52, cy=height*(width>720?.475:.355);
|
|
183
|
+
const toView=p=>{const q=sub(p,camera);return [dot(q,right),dot(q,up),dot(q,fw)];};
|
|
184
|
+
const clip=pts=>{const out=[];const n=.24;for(let i=0;i<pts.length;i++){
|
|
185
|
+
const a=pts[i],b=pts[(i+1)%pts.length],av=a[2]>=n,bv=b[2]>=n;
|
|
186
|
+
if(av)out.push(a);
|
|
187
|
+
if(av!==bv)out.push(lerp(a,b,(n-a[2])/(b[2]-a[2])));
|
|
188
|
+
}return out;};
|
|
189
|
+
const faces=[];
|
|
190
|
+
const live=boxes.slice();
|
|
191
|
+
const running=!!game?.line&&!game?.didClose, sec=Math.max(0,(now-shipped)/1000), units=game?.order.filter(o=>["made","approved","sent","repair","hold"].includes(o.stage)).length??0;
|
|
192
|
+
box(-2.44,1.18,-3.72,.19,.12,.21,running?"#9affbb":"#ff9773",running?"#55b78b":"#be5e45","#43634e",live);
|
|
193
|
+
for(let i=0;i<(game?Math.min(4,units+1):4);i++){
|
|
194
|
+
let q=i*2.15+(running&&!reduced?sec*1.9:0);
|
|
195
|
+
let z=-9.1+q%9.5;
|
|
196
|
+
box(-.58,1,z,1.16,.58,.77,"#f3bd75","#b97d48","#9d623d",live);
|
|
197
|
+
box(-.1,1.585,z,.19,.01,.77,"#ffeeab","#ead08f","#d8b778",live);
|
|
198
|
+
}
|
|
199
|
+
for(const b of live){
|
|
200
|
+
const {x,y,z,dx,dy,dz,colors}=b;
|
|
201
|
+
const p=[[x,y,z],[x+dx,y,z],[x+dx,y,z+dz],[x,y,z+dz],[x,y+dy,z],[x+dx,y+dy,z],[x+dx,y+dy,z+dz],[x,y+dy,z+dz]];
|
|
202
|
+
const sideX=camera[0]>x+dx/2?[1,2,6,5]:[0,3,7,4];
|
|
203
|
+
const sideZ=camera[2]>z+dz/2?[2,3,7,6]:[0,1,5,4];
|
|
204
|
+
[[4,5,6,7],sideX,sideZ].forEach((f,i)=>{const pts=clip(f.map(j=>toView(p[j])));if(pts.length<3)return;faces.push([pts.map(([u,v,d])=>[cx+focal*u/d,cy-focal*v/d]),pts.reduce((s,k)=>s+k[2],0)/pts.length,colors[i],b.layer]);});
|
|
205
|
+
}
|
|
206
|
+
c.setTransform(dpr,0,0,dpr,0,0);
|
|
207
|
+
const sky=c.createLinearGradient(0,0,0,height);sky.addColorStop(0,"#1f3944");sky.addColorStop(1,"#0c171e");c.fillStyle=sky;c.fillRect(0,0,width,height);
|
|
208
|
+
faces.sort((a,b)=>a[3]-b[3]||b[1]-a[1]);for(const [p,,color] of faces){c.fillStyle=color;c.beginPath();p.forEach(([x,y],i)=>i?c.lineTo(x,y):c.moveTo(x,y));c.closePath();c.fill();}
|
|
209
|
+
if(shipped>0&&!reduced&&sec<3.1)for(const p of confetti){const y=(p.y-.9)*height+sec*p.v;c.save();c.translate(p.x*width+Math.sin(sec*4+p.p)*26,y);c.rotate(sec*3+p.p);c.fillStyle=p.col;c.fillRect(-4,-2,8,4);c.restore();}
|
|
210
|
+
}
|
|
211
|
+
requestAnimationFrame(render);
|
|
212
|
+
}
|
|
213
|
+
let game=null, campaign=[], latest="";
|
|
214
|
+
function element(tag,txt,cls){const n=document.createElement(tag);if(txt!=null)n.textContent=txt;if(cls)n.className=cls;return n;}
|
|
215
|
+
function start(index){
|
|
216
|
+
game=newShift(index);latest="Bir parti seç ve ilk hamleni yap.";$("intro").hidden=true;$("summary").hidden=true;$("play").hidden=false;shipped=0;
|
|
217
|
+
$("finish").dataset.armed="0";$("finish").textContent="Vardiyayı kapat";
|
|
218
|
+
$("briefTag").textContent="VARDİYA "+String(index+1).padStart(2,"0")+" / 03";
|
|
219
|
+
$("briefTitle").textContent=LEVELS[index].title;$("brief").textContent=LEVELS[index].text;
|
|
220
|
+
gotoZone("overview");paint();$("briefTitle").tabIndex=-1;$("briefTitle").focus();
|
|
221
|
+
}
|
|
222
|
+
function paint(focus){
|
|
223
|
+
if(!game)return;
|
|
224
|
+
const l=LEVELS[game.index], overall=stats(game), o=current(game);
|
|
225
|
+
$("shift").textContent="0"+(game.index+1)+" / 03";$("time").textContent=l.limit-game.t;
|
|
226
|
+
$("cash").textContent=game.cash+" kr";$("score").textContent=overall.on+" / "+game.order.length;
|
|
227
|
+
$("meter").style.width=((l.limit-game.t)/l.limit*100)+"%";
|
|
228
|
+
const inc=$("incident");inc.hidden=false;
|
|
229
|
+
const alert=game.index===0&&game.line?"Hat çalışıyor. Kamyon saatlerini kaçırma.":game.index===2&&game.dry?"Kabin kuru. Önceden üretilen partiler aynı kalır.":l.incident;
|
|
230
|
+
inc.replaceChildren(element("strong","SAHA NOTU · "),document.createTextNode(alert));
|
|
231
|
+
const list=$("orders");list.replaceChildren();
|
|
232
|
+
for(const [i,p] of game.order.entries()){
|
|
233
|
+
const late=p.stage==="sent"?p.ship>p.due:game.t>=p.due;
|
|
234
|
+
const b=element("button",null,"btn order");b.type="button";b.dataset.lot=i;b.setAttribute("aria-pressed",String(game.active===i));
|
|
235
|
+
const pill=element("span",p.stage==="sent"?(late?"Geç":"Zamanında"):stageName[p.stage],"pill"+(late?" late":p.stage==="sent"?" pass":""));
|
|
236
|
+
b.append(element("strong",p.id+" · "+p.label),pill,element("span","Termin: "+p.due+". dilim"+(p.ship!==null?" · Çıkış: "+p.ship+". dilim":late?" · Termin geçti":""),"order-meta"));
|
|
237
|
+
b.onclick=()=>{game.active=i;latest="";const z={waiting:"depot",staged:"production",made:"quality",approved:"dispatch",sent:"dispatch",hold:"dispatch",repair:"quality"};gotoZone(z[p.stage]);paint({lot:i});};
|
|
238
|
+
list.append(b);
|
|
239
|
+
}
|
|
240
|
+
$("lotTitle").textContent=o.id+" / "+stageName[o.stage];$("lotNote").textContent=o.hint;
|
|
241
|
+
const actions=$("actions");actions.replaceChildren();
|
|
242
|
+
for(const action of available(game)){
|
|
243
|
+
const [label,cost,zone]=actionInfo[action];const tile=element("button",null,"btn"+(["power","stage","make","inspect","repair","ship","dry"].includes(action)?" primary":""));
|
|
244
|
+
tile.type="button";tile.dataset.action=action;tile.disabled=game.cash<cost;
|
|
245
|
+
tile.append(document.createTextNode(label),element("span",zone+" · 1 dilim"+(cost?" · "+cost+" kr":""),"cost"));
|
|
246
|
+
tile.onclick=()=>act(action);actions.append(tile);
|
|
247
|
+
}
|
|
248
|
+
$("feedback").textContent=latest;
|
|
249
|
+
const log=$("log");log.replaceChildren(...game.log.slice(0,6).map(entry=>{
|
|
250
|
+
const li=element("li");if(typeof entry==="string")li.textContent=entry;else li.append(element("b",String(entry.t).padStart(2,"0")+" / "),document.createTextNode(entry.m));return li;
|
|
251
|
+
}));
|
|
252
|
+
if(focus?.lot!==undefined)list.querySelector('[data-lot="'+focus.lot+'"]').focus();
|
|
253
|
+
if(focus?.action){const first=actions.querySelector(".primary:not(:disabled)")||actions.querySelector("button:not(:disabled)");first?.focus();}
|
|
254
|
+
}
|
|
255
|
+
function act(action){
|
|
256
|
+
const note=advance(game,action);if(note===null)return;latest=note;
|
|
257
|
+
if(zonesOf[action])gotoZone(zonesOf[action]);
|
|
258
|
+
if((action==="ship"||action==="blind")&¤t(game).stage==="sent")shipped=performance.now();
|
|
259
|
+
paint({action});
|
|
260
|
+
if(game.didClose)end();
|
|
261
|
+
}
|
|
262
|
+
function end(){
|
|
263
|
+
const r=stats(game), success=r.sent===game.order.length, last=game.index===LEVELS.length-1;
|
|
264
|
+
game.didClose=true;
|
|
265
|
+
if(success)campaign[game.index]={...r,balance:game.cash};
|
|
266
|
+
$("play").hidden=true;$("summary").hidden=false;
|
|
267
|
+
$("resultTitle").textContent=!success?"Vardiya yetişmedi.":last?"Mira A.Ş. teslimatta.":"Vardiya tamam.";
|
|
268
|
+
$("resultText").textContent=!success?"Masada hâlâ iş var. Aynı vardiyayı yeniden deneyebilirsin.":last?
|
|
269
|
+
"Üç vardiyayı da kapattınız. "+campaign.reduce((a,s)=>a+s.on,0)+"/8 sipariş zamanında. "+campaign.reduce((a,s)=>a+s.returns,0)+" iade yaşandı.":r.on+"/"+r.sent+" sipariş zamanında. Kalan bütçe: "+game.cash+" kredi.";
|
|
270
|
+
$("ledger").replaceChildren(...game.order.map(o=>{
|
|
271
|
+
const msg=o.ship===null?"Açık iş":o.ship<=o.due?"Zamanında":"Geç teslim";
|
|
272
|
+
return element("p",o.id+" · "+msg+(o.ship!==null?" · "+o.ship+". dilim":""),o.ship===null?"bad":"small");
|
|
273
|
+
}));
|
|
274
|
+
$("next").hidden=!success||last;$("retry").hidden=false;
|
|
275
|
+
$("resultTitle").tabIndex=-1;$("resultTitle").focus();
|
|
276
|
+
}
|
|
277
|
+
$("start").onclick=()=>start(0);
|
|
278
|
+
$("finish").onclick=()=>{const b=$("finish");if(b.dataset.armed!=="1"){b.dataset.armed="1";b.textContent="Kapatmayı onayla";return;}b.dataset.armed="0";b.textContent="Vardiyayı kapat";end();};
|
|
279
|
+
$("retry").onclick=()=>start(game.index);
|
|
280
|
+
$("next").onclick=()=>start(game.index+1);
|
|
281
|
+
$("restart").onclick=()=>{campaign=[];start(0);};
|
|
282
|
+
for(const b of document.querySelectorAll("[data-zone]"))b.onclick=()=>gotoZone(b.dataset.zone);
|
|
283
|
+
addEventListener("resize",size);size();requestAnimationFrame(render);
|
|
284
|
+
</script></body></html>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: operon360
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Mira A.Ş. · Vardiya Operasyonu: Türkçe, çevrimdışı bir mini fabrika oyunu
|
|
5
|
+
Requires-Python: >=3.9
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
|
|
8
|
+
# Operon360 · Mira A.Ş. Vardiya Operasyonu
|
|
9
|
+
|
|
10
|
+
Üç vardiya, sekiz sipariş ve bir fabrika. Depoyu, kaliteyi ve sevkiyatı
|
|
11
|
+
yönet. Türkçe, çevrimdışı, Python bağımlılığı olmayan bir mini oyun.
|
|
12
|
+
|
|
13
|
+
```console
|
|
14
|
+
pip install operon360
|
|
15
|
+
operon360
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Windows'ta komut bulunmuyorsa `py -m operon360` ile açabilirsin.
|
|
19
|
+
Python 3.9 veya üzeri ve JavaScript çalıştırabilen bir tarayıcı gerekir.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
operon360/__init__.py,sha256=6khReJnHqhcfl5aFIu9oWr6i6PRiNU5D4Gkf7zfESpo,40
|
|
2
|
+
operon360/__main__.py,sha256=BSZ0e6AACTOAH0C0vMcdoz3IV3k8HyZBx3DqTzH70Rg,753
|
|
3
|
+
operon360/mira-ilk-vardiya.html,sha256=4qGriTO5wkExNB2FJps3oqyCq9J73p90aTImW-TCw6M,24548
|
|
4
|
+
operon360-0.2.0.dist-info/METADATA,sha256=3XKZ4ODN2GjDApULTFkP7JZre_fhl5dJJOAQVhtYcR8,607
|
|
5
|
+
operon360-0.2.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
6
|
+
operon360-0.2.0.dist-info/entry_points.txt,sha256=9g9dQhSiV5W1DtiW-zEuoBr91n7uAfg7RBMcwbMBzc0,54
|
|
7
|
+
operon360-0.2.0.dist-info/top_level.txt,sha256=W2XtUY-GsV6lbFsF4UxeAfTTl1pnozrGiy-FN0y7pL8,10
|
|
8
|
+
operon360-0.2.0.dist-info/RECORD,,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
operon360
|