From 82d1b7088efcfbca280c7f609fda3db30a19f8a5 Mon Sep 17 00:00:00 2001 From: Woj Date: Sat, 27 May 2023 23:20:08 +0200 Subject: [PATCH 1/4] wozek no longer "pops" when picking up a package --- images/pelny_wozek_1_crate.png | Bin 4283 -> 3776 bytes images/pelny_wozek_2_crates.png | Bin 4367 -> 3859 bytes images/pelny_wozek_full_3_crates.png | Bin 4437 -> 3927 bytes wozek.py | 27 +++++++++++++++++++++++---- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/images/pelny_wozek_1_crate.png b/images/pelny_wozek_1_crate.png index a55c1b14eb202e5bb9ea2884cb6652ebd39acd81..e27b77d463e89352527f721f9095fa402ba701cf 100644 GIT binary patch delta 3762 zcmV;j4o&g9A;29WiBL{Q4GJ0x0000DNk~Le0000$0000$2nGNE0IF$m-jN|Re-2ei zL_t(|Ue#L(coan%{bzEMgpd#*AP7i^1O?>q0|Yr-MHFRSVNqO#UG-Dh6;W0N*Huu_1+sgMsgx@EwnGHz&|sfiHQ zY!Z1VS7aH=V@0}(g6Iw|*GFdwVF}>wp_j|Qhc7iXkp#ND=WFp@^*3>E`Jb+#CUgYX z>7%oNumsTLyi`ewJuLeVn@Sr=2_hFZvkuMxF5I>IB_g-=6KPUkWXEdpfAx7n+}ro- z(_XL^Nc&LZ*a!yB)rc}SM%2PrMR`|>+VPU8)I|Te`QTYWMHgzBOiD{jlO8>~ zNz}2~^5FuJ=x7m-M=E0+c;EJ5RGnmzC2xwfNfOV~QzUxS`}#bEkO&&3Qcc)tC>jMRDcby-=|e*-syP_JW`LzHdu70?!vLd8%)2dY~ah?25 z?KTEWQfgI600+QpxwCn<$Xl~S;xoki#BW)n(Hn%7sa}LD04Tdi>(;GB3Rk&y{iN$8 zE?yg~s^Bwl2Y1H3E^?xlL=EjJl9|C8Jxw5%>P5H$m^@;{2pKqVf1vnItZ?t-gaGh_ zg=VixxSE?Ep%0V(1EWw&Jhw6$Fz8{GH4CLw2T;SiHbvdk$IR2F8M4N-s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Ltflta7NHMXmY|M@8#g+60gyCe3iUFzU-6hYOuwDkhH%R00QD-=RT%on99o>+TV zc&Bd+ZnvUbDjz^PvGj1t9Wi(Gv{G6qAy0M7r%|bWA00b&T2{$ZRFuZzJ*v+ z!wzkF-_Mu+CHSOEn8?~s+zXN6>nu%K$oMSVkAGu!>ziORztb3=Nl0Uo!)#jZymGqH zSX1*JGz1iU)j@M7@cB^ABsi)OHPLPRt*QAYE`+_Zo0y#uRqFW)sx%gf(nS@%(?q$1 z63wvBu;%8G<8Rq6i)d>L-9FHMl==?$`RXxK@wPYWvM-^YHMU?#@Ar3?_5zonJDkU> z{q%(x$VPe|<@641c6Z;O!L0J+Iulv_daGTXIXv6h9&)+98RNe<{wRI0c243j*q!R` zy6%C50i{0R+)ih<3eQOYZKr3Fl*fPdCoKtBN;c{fA55%rU6tto{9Ii&fR>i9!{{~t zr3Z5g9juLo(KTL?#bf;_q(>&Qa&2yFd!pFhd5>(=~x!qskPB5;6MN4jehT3QL zTwk2W9fJEpwF`3SYW=DTo;C?&WKja19RquChtIN(d}_3KB`MFHl}mi zHixquC3KJ&c^uj<(ZTJxjMt~XED~b8)z@4jEOcEbgpo)l^PYWqwJC||6SXp5Dr4}g zPYXqvQ2Ca}C6R(DwSwfc={k$}snWH5pD@C25gYb3zHQTj)qw$>&<2%*Q{;Z_fIwWP zIsBf}LPP7#zwDj`e_0THLvO-2m*kzO^t;p2ahP>yVsO~0Y=aD G_5T45?omeo diff --git a/images/pelny_wozek_2_crates.png b/images/pelny_wozek_2_crates.png index 6cb71039863fb889cf1536fe614c970d2b3b6a6c..ab5fc6a98a4ca751fc0fae3d6b57eb3f9ac11ef9 100644 GIT binary patch delta 3845 zcmV+g5Bl(rB9k5=iBL{Q4GJ0x0000DNk~Le0000$0000$2nGNE0IF$m-jN|Re-5Zg zL_t(|Ue#L(d=%9k{_o}{2_caqARr(_f&y|_Q7DJ?Mky7FVij8Tr_zcj^|pwL(t2wZ z@m5qWsZco-R6rnd2+Ac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rvHq+@}q|rRNuBrcN16vby!=cjNIruClfSz29PnV7SX2v&1N^@Sye zB1nPEy{aC$#|u608=&vbTm(ThBM9k6P)-P|u=+7g0Dt{i2;*1~NmkCklGFNZSBi=> zdU#XD!f9ASeQr>qAS$c<)Ez+}%W@6*@Tbk6!eYEQB~5w9n7{hzHWbC$}F_V z@-Glj`a$#$$DJm%4^mO|6S?D>!w5fI#zQd}tr?kmKvl-u#hDMfj~RwaY~F<;eB5Af z%FK10rk4yqn*kP-HM&|M{h*V-!V_drHmtz^KNR>cX-JqQJrCKZ7gx{I#!}owAw-(0 Ly3ebWZNmNs8uE^B diff --git a/wozek.py b/wozek.py index e131ad8..a38cfac 100644 --- a/wozek.py +++ b/wozek.py @@ -3,8 +3,9 @@ import pygame,math from packageList import listOfPackages -class Wozek(): +class Wozek(pygame.sprite.Sprite): def __init__(self): + super().__init__() self.obecnyStan = None # self.x = 55 # self.y = 55 @@ -13,12 +14,14 @@ class Wozek(): self.height = 64 self.width = 64 self.image = pygame.image.load("images/pusty_wozek.png") + self.rect = self.image.get_rect() # Credit: Forklift icons created by Smashicons - Flaticon # https://www.flaticon.com/free-icons/forklift self.__zainicjuj_stan_poczatkowy() def draw(self): ekran.screen.blit(self.image, (self.obecnyStan.x, self.obecnyStan.y)) + # self.update_position(self.obecnyStan.x, self.obecnyStan.y) #storage = ["none"] * 10 storage = [] @@ -38,7 +41,12 @@ class Wozek(): return element else: print("I'm empty!") - + + def update_position(self, x, y): + self.obecnyStan.x = x + self.obecnyStan.y = y + self.rect.topleft = (x, y) + def dynamic_wozek_picture(self): if self.ln == 0: self.image = pygame.image.load("images/pusty_wozek.png") @@ -48,6 +56,8 @@ class Wozek(): self.image = pygame.image.load("images/pelny_wozek_2_crates.png") elif (self.ln == 10): self.image = pygame.image.load("images/pelny_wozek_full_3_crates.png") + + self.rect = self.image.get_rect() def load_package(self): @@ -56,12 +66,21 @@ class Wozek(): if dist <= 50: self.add_element(package) listOfPackages.list.pop() + + def load_packages_collision(self): + pass + # packages_collision = pygame.sprite.spritecollide(self, listOfPackages.package_group, False) + # if packages_collision: + # for package in packages_collision: + # self.add_element(package) + # listOfPackages.list.remove(package) # collision doesn't work, collision always happens + def drop_package(self): package = self.remove_element() if package is not None: - listOfPackages.list.append(package) - package.x = self.obecnyStan.x+50 + package.x = self.obecnyStan.x package.y = self.obecnyStan.y + listOfPackages.list.append(package) def __zainicjuj_stan_poczatkowy(self): from wyszukiwanie import Stan From 4db472de98c17350a251fbbe73ab806812c819b5 Mon Sep 17 00:00:00 2001 From: Woj Date: Sat, 27 May 2023 23:23:02 +0200 Subject: [PATCH 2/4] paczka can be picked up and placed anywhere by wozek --- ekran.py | 4 ++-- main.py | 4 ++-- packageList.py | 13 ++++++++++--- paczka.py | 9 ++++++++- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/ekran.py b/ekran.py index e0d357b..1d48add 100644 --- a/ekran.py +++ b/ekran.py @@ -16,7 +16,7 @@ pygame.display.set_caption("Inteligentny wozek") icon = pygame.image.load('images/icon.png') pygame.display.set_icon(icon) -lista_paczek = packageList.zainicjuj_liste_paczek() +lista_paczek = packageList.zainicjuj_liste_paczek(a_pix, b_pix) def narysuj_regaly(): regal.Regal(1, 1, x1, y1) @@ -78,4 +78,4 @@ def sprawdz_ktora_kolumna(y): def narysuj_paczki(wozek): if wozek.ln == 0: for paczka in lista_paczek.list: - paczka.narysuj(a_pix, b_pix, screen) + paczka.narysuj(paczka.x, paczka.y, screen) diff --git a/main.py b/main.py index e451477..6bf9e7e 100644 --- a/main.py +++ b/main.py @@ -64,8 +64,8 @@ def main(): wozek.obecnyStan.x = 916 if wozek.obecnyStan.y <= 0: wozek.obecnyStan.y = 0 - elif wozek.obecnyStan.x >= 916: - wozek.obecnyStan.x = 916 + elif wozek.obecnyStan.y >= 916: + wozek.obecnyStan.y = 916 ekran.odswiez_ekran(wozek) diff --git a/packageList.py b/packageList.py index 7195b0f..22cbc53 100644 --- a/packageList.py +++ b/packageList.py @@ -1,16 +1,23 @@ +import pygame + +from paczka import Paczka + class listOfPackages: list = [] + package_group = pygame.sprite.Group() def add(self, item): self.list.append(item) + self.package_group.add(item) def remove(self): - self.list.pop() + last_package = self.list.pop() + self.package_group.remove(last_package) -def zainicjuj_liste_paczek(): - from paczka import Paczka +def zainicjuj_liste_paczek(init_x, init_y): packageList = listOfPackages() demo_paczka = Paczka('duzy', 10, any, False, True, False, any, any, any, any, any) + demo_paczka.update_position(init_x, init_y) packageList.add(demo_paczka) return packageList diff --git a/paczka.py b/paczka.py index 5d63453..3d2fd32 100644 --- a/paczka.py +++ b/paczka.py @@ -2,11 +2,13 @@ from etykieta import Etykieta import pygame -class Paczka: +class Paczka(pygame.sprite.Sprite): def __init__(self, rozmiar, waga, kategoria, priorytet, ksztalt, kruchosc, nadawca, adres, imie, nazwisko, telefon): + super().__init__() self.rozmiar = rozmiar self.image = pygame.image.load("images/paczka.png") + self.rect = self.image.get_rect() if rozmiar == 'duzy': self.image = pygame.transform.scale(self.image, (50, 50)) self.szerokosc = 50 @@ -62,3 +64,8 @@ class Paczka: print("Zmien rozmiar paczki") print("Paczka moze miec rozmiar duzy, sredni lub maly") exit(0) + + def update_position(self, x, y): + self.x = x + self.y = y + self.rect.topleft = (x, y) \ No newline at end of file From c3f3eea40ee1b26108d79cc177999f28835387c9 Mon Sep 17 00:00:00 2001 From: Woj Date: Sat, 27 May 2023 23:50:48 +0200 Subject: [PATCH 3/4] screen size fix --- ekran.py | 4 ++-- main.py | 8 ++++---- plansza.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/ekran.py b/ekran.py index 1d48add..85668d3 100644 --- a/ekran.py +++ b/ekran.py @@ -7,8 +7,8 @@ import wozek from packageList import * from paczka import Paczka -EKRAN_SZEROKOSC = 980 -EKRAN_WYSOKOSC = 980 +EKRAN_SZEROKOSC = 770 +EKRAN_WYSOKOSC = 770 screen = pygame.display.set_mode((EKRAN_SZEROKOSC, EKRAN_WYSOKOSC)) miejsce = pygame.image.load('images/miejsce_paczek.png') miejsce = pygame.transform.scale(miejsce, (140, 140)) diff --git a/main.py b/main.py index 6bf9e7e..89587e7 100644 --- a/main.py +++ b/main.py @@ -60,12 +60,12 @@ def main(): if wozek.obecnyStan.x <= 0: wozek.obecnyStan.x = 0 - elif wozek.obecnyStan.x >= 916: - wozek.obecnyStan.x = 916 + elif wozek.obecnyStan.x >= ekran.EKRAN_SZEROKOSC-70: + wozek.obecnyStan.x = ekran.EKRAN_SZEROKOSC-70 if wozek.obecnyStan.y <= 0: wozek.obecnyStan.y = 0 - elif wozek.obecnyStan.y >= 916: - wozek.obecnyStan.y = 916 + elif wozek.obecnyStan.y >= ekran.EKRAN_WYSOKOSC-70: + wozek.obecnyStan.y = ekran.EKRAN_WYSOKOSC-70 ekran.odswiez_ekran(wozek) diff --git a/plansza.py b/plansza.py index 3af3047..08e9a0c 100644 --- a/plansza.py +++ b/plansza.py @@ -8,8 +8,8 @@ def obliczPixeleNaPodstawieKratek(wymiar): #Przeliczanie współrzędnych podany i = i + 1 return pixele -EKRAN_SZEROKOSC = 980 -EKRAN_WYSOKOSC = 980 +EKRAN_SZEROKOSC = 770 +EKRAN_WYSOKOSC = 770 blockSize = 70 x1, y1, x2, y2, x3, y3, x4, y4 = [None] * 8 From 4a83094fb8aac60b1efa1d9a85045bca857299ec Mon Sep 17 00:00:00 2001 From: Woj Date: Sun, 28 May 2023 00:02:24 +0200 Subject: [PATCH 4/4] regal can store packages --- regal.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/regal.py b/regal.py index 2074c10..71234f8 100644 --- a/regal.py +++ b/regal.py @@ -18,8 +18,9 @@ def obliczPixeleDlugosciRegalu(self): #Przeliczanie dlugości regału podanego i = i + 1 return dlugoscRegalu -class Regal: +class Regal(pygame.sprite.Sprite): def __init__(self, numerRegalu, dlugoscRegaluWKratkach, numerWiersza, numerKolumny): + super().__init__() from ekran import screen self.numerRegalu = numerRegalu self.wysokoscRegalu = 64 @@ -30,26 +31,33 @@ class Regal: self.kolumna = obliczPixeleNaPodstawieKratek(numerKolumny) self.dlugosc = obliczPixeleDlugosciRegalu(self) - # from main import screen - # from ekran import screen + package_storage = [] + shelfs = { # here packages are stored + "dolna": package_storage, + "gorna": package_storage + } if(self.numerRegalu >= 0 and self.numerRegalu <= 4): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal.png") + self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) if(self.numerRegalu >= 5 and self.numerRegalu <= 8): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal1.png") + self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) if(self.numerRegalu >= 9 and self.numerRegalu <= 12): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal2.png") + self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna)) if(self.numerRegalu >= 13 and self.numerRegalu <= 16): reg = pygame.Surface([self.dlugosc, self.wysokoscRegalu]) reg = pygame.image.load("images/regal3.png") + self.rect = reg.get_rect() screen.blit(reg, (self.wiersz, self.kolumna))