Skip to content
This repository has been archived by the owner on Oct 24, 2024. It is now read-only.

Commit

Permalink
Fixing plantshop issue and adding new loading screen atlas
Browse files Browse the repository at this point in the history
  • Loading branch information
porkbrain committed Jul 3, 2024
1 parent 1869323 commit 5f14f87
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 42 deletions.
3 changes: 3 additions & 0 deletions common/assets/src/paths.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ pub mod misc {
"misc/loading_screens/winnie_in_bathroom_atlas.png";
pub const LOADING_SCREEN_HEDGEHOG_ATLAS: &str =
"misc/loading_screens/hedgehog_atlas.png";
pub const LOADING_SCREEN_LOFI_GIRL: &str =
"misc/loading_screens/pc_atlas.png";

pub const EMOJI_ATLAS: &str = "misc/emoji_atlas.png";
}

Expand Down
11 changes: 10 additions & 1 deletion common/loading_screen/src/atlases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ pub enum LoadingScreenAtlas {
Bunny,
Space,
Hedgehog,
LoFiGirl,

/// Special loading screen for after sleep transition.
WinnieInBathroom,
Expand All @@ -23,7 +24,8 @@ pub enum LoadingScreenAtlas {
impl LoadingScreenAtlas {
/// Picks a random loading screen.
pub fn random() -> Self {
let variants = &[Self::Hedgehog, Self::Bunny, Self::Space];
let variants =
&[Self::Hedgehog, Self::Bunny, Self::Space, Self::LoFiGirl];

variants[rand::random::<usize>() % variants.len()]
}
Expand All @@ -38,6 +40,7 @@ impl LoadingScreenAtlas {
Self::Hedgehog => {
common_assets::misc::LOADING_SCREEN_HEDGEHOG_ATLAS
}
Self::LoFiGirl => common_assets::misc::LOADING_SCREEN_LOFI_GIRL,
}
}

Expand Down Expand Up @@ -66,6 +69,12 @@ impl LoadingScreenAtlas {
2.0,
AtlasAnimationEnd::LoopIndefinitely,
),
Self::LoFiGirl => (
7,
vec2(202.0, 116.0),
3.0,
AtlasAnimationEnd::LoopIndefinitely,
),
};

(
Expand Down
81 changes: 40 additions & 41 deletions main_game/assets/scenes/plant_shop.tscn
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
[gd_scene load_steps=41 format=3 uid="uid://dek7ps022pco7"]

[ext_resource type="Texture2D" uid="uid://cuwfijdxd5o6e" path="res://assets/downtown/plantshop_bg.png" id="1_bruju"]
[ext_resource type="Texture2D" uid="uid://wm712yivg1yb" path="res://assets/downtown/recycle_bin.png" id="2_gim71"]
[ext_resource type="Texture2D" uid="uid://bag78oh6iy4yh" path="res://assets/residential/indoors/kasa.png" id="3_7v53w"]
[ext_resource type="Texture2D" uid="uid://vi408ocivnm8" path="res://assets/downtown/potted_bush.png" id="6_uoc65"]
[ext_resource type="Texture2D" uid="uid://bgxjf52tb71jx" path="res://assets/downtown/fire_ex.png" id="7_2xqcs"]
[ext_resource type="Texture2D" uid="uid://bgv1impipgm0p" path="res://assets/residential/indoors/shelf.png" id="8_52cf7"]
[ext_resource type="Texture2D" uid="uid://bho6n0f1kb4ht" path="res://assets/residential/indoors/plant2.png" id="9_5sdla"]
[ext_resource type="Texture2D" uid="uid://cx1anpuh8m73i" path="res://assets/residential/indoors/plant3.png" id="10_ejop8"]
[ext_resource type="Texture2D" uid="uid://cxnemcxvsavu6" path="res://assets/environment/cactus.png" id="10_n7jia"]
[ext_resource type="Texture2D" uid="uid://dllv17eqka03" path="res://assets/residential/indoors/plant1.png" id="11_xm18b"]
[ext_resource type="Texture2D" uid="uid://cs5pj38x4vmfy" path="res://assets/residential/indoors/plant1_pink.png" id="12_8vj2d"]
[ext_resource type="Texture2D" uid="uid://bi7l7wb13e4l" path="res://assets/residential/indoors/counter_wide.png" id="13_f2gnt"]
[ext_resource type="Texture2D" uid="uid://dlrv2rk4xwdyl" path="res://assets/residential/indoors/plantshop_painting.png" id="13_fsohl"]
[ext_resource type="Texture2D" uid="uid://rxfvanvsd4y4" path="res://assets/residential/indoors/shelf_wide.png" id="14_afqnm"]
[ext_resource type="Texture2D" uid="uid://coxsyjnhe0ufo" path="res://assets/residential/indoors/counter_wide_purple.png" id="15_c65y4"]
[ext_resource type="Texture2D" uid="uid://b3pe71sg16njb" path="res://assets/environment/seedlings.png" id="17_5kiyl"]
[ext_resource type="Texture2D" uid="uid://c7dracayybs03" path="res://assets/residential/indoors/cupboard2.png" id="17_xg3n8"]
[ext_resource type="Texture2D" uid="uid://dhya6w35c6spd" path="res://assets/residential/indoors/sign_seedling.png" id="18_mulg4"]
[ext_resource type="Texture2D" uid="uid://dolvlk268uyvh" path="res://assets/environment/box_cardboard_sideways.png" id="20_ewfv5"]
[ext_resource type="Texture2D" uid="uid://rubffqe3yvyi" path="res://assets/downtown/sipek.png" id="21_7cf1p"]
[ext_resource type="Texture2D" uid="uid://d0ak2v7256r7w" path="res://assets/residential/indoors/plant4.png" id="23_6cdwa"]
[ext_resource type="Texture2D" uid="uid://be61pdsfo8tko" path="res://assets/downtown/hanging_plants.png" id="24_0wcvj"]
[ext_resource type="Texture2D" uid="uid://dq46d6wb2l4eg" path="res://assets/residential/indoors/bonsai1.png" id="25_5xd81"]
[ext_resource type="Texture2D" uid="uid://77d0n3ppbwcc" path="res://assets/residential/indoors/bonsai2.png" id="26_kqran"]
[ext_resource type="Texture2D" uid="uid://dbwp845fyhv7c" path="res://assets/residential/indoors/plant_price_white.png" id="27_rp2pe"]
[ext_resource type="Texture2D" uid="uid://csgnkc4cpkonu" path="res://assets/residential/indoors/scissors.png" id="28_inwkg"]
[ext_resource type="Texture2D" uid="uid://b6vfhqu2lc543" path="res://assets/residential/indoors/cactus1.png" id="29_4bhrk"]
[ext_resource type="Texture2D" uid="uid://cljme4611al1d" path="res://assets/residential/indoors/room_light_big.png" id="29_huixs"]
[ext_resource type="Texture2D" uid="uid://dysm1ioskcay3" path="res://assets/residential/indoors/room_light_wide.png" id="29_ngqf5"]
[ext_resource type="Texture2D" uid="uid://ldhrjdf1mu13" path="res://assets/residential/indoors/room_light_wide_down.png" id="30_5faay"]
[ext_resource type="Texture2D" uid="uid://cccfvt6xb1rki" path="res://assets/residential/indoors/certificat.png" id="31_kyslc"]
[ext_resource type="Texture2D" uid="uid://cd5s8so082dss" path="res://assets/residential/indoors/chair_wood.png" id="32_t16ue"]
[ext_resource type="Texture2D" uid="uid://nlp1ta0hrg1h" path="res://assets/residential/indoors/clinic_cart.png" id="33_h6ewb"]
[ext_resource type="Texture2D" uid="uid://6x6hfb02k1ib" path="res://assets/residential/indoors/shelf_back.png" id="34_mpg0u"]
[ext_resource type="Texture2D" uid="uid://bvi7uobsh7rtd" path="res://assets/environment/seedlings_small.png" id="35_apwcw"]
[ext_resource type="Texture2D" uid="uid://v05rbwih8g8g" path="res://assets/environment/seedlings_smallb.png" id="36_m5ifd"]
[ext_resource type="Texture2D" uid="uid://jw4hbt7rbkk8" path="res://assets/residential/indoors/plant_bigger.png" id="37_qj5jv"]
[ext_resource type="Texture2D" uid="uid://cylmq0eecvfb0" path="res://assets/residential/indoors/plant_sunflower.png" id="38_wlwqc"]
[ext_resource type="Texture2D" uid="uid://vruek7636g4p" path="res://assets/residential/indoors/plant_biggest.png" id="39_l3lyd"]
[ext_resource type="Texture2D" uid="uid://rjhnkkan4j1y" path="res://assets/downtown/bamboo_rooftop.png" id="40_2ygpf"]
[ext_resource type="Texture2D" uid="uid://y85joqp8cjui" path="res://assets/downtown/plantshop_bg.png" id="1_bruju"]
[ext_resource type="Texture2D" uid="uid://cve0p1fj5bjp3" path="res://assets/downtown/recycle_bin.png" id="2_gim71"]
[ext_resource type="Texture2D" uid="uid://dhaf0k2asaokq" path="res://assets/residential/indoors/kasa.png" id="3_7v53w"]
[ext_resource type="Texture2D" uid="uid://cmpcrhxx5t7as" path="res://assets/downtown/potted_bush.png" id="6_uoc65"]
[ext_resource type="Texture2D" uid="uid://d2vp7noe41pcw" path="res://assets/downtown/fire_ex.png" id="7_2xqcs"]
[ext_resource type="Texture2D" uid="uid://n7a6tiu6ldos" path="res://assets/residential/indoors/shelf.png" id="8_52cf7"]
[ext_resource type="Texture2D" uid="uid://b8hs5svb3tnxq" path="res://assets/residential/indoors/plant2.png" id="9_5sdla"]
[ext_resource type="Texture2D" uid="uid://bivyqy838wdmo" path="res://assets/residential/indoors/plant3.png" id="10_ejop8"]
[ext_resource type="Texture2D" uid="uid://bbfjt8xxpma87" path="res://assets/environment/cactus.png" id="10_n7jia"]
[ext_resource type="Texture2D" uid="uid://c07goj3d4hpxn" path="res://assets/residential/indoors/plant1.png" id="11_xm18b"]
[ext_resource type="Texture2D" uid="uid://f3fdi3udqdyk" path="res://assets/residential/indoors/plant1_pink.png" id="12_8vj2d"]
[ext_resource type="Texture2D" uid="uid://bkhrbsy2krgi3" path="res://assets/residential/indoors/counter_wide.png" id="13_f2gnt"]
[ext_resource type="Texture2D" uid="uid://c1dw7702bh2v4" path="res://assets/residential/indoors/plantshop_painting.png" id="13_fsohl"]
[ext_resource type="Texture2D" uid="uid://dwdxmv6sakwvv" path="res://assets/residential/indoors/shelf_wide.png" id="14_afqnm"]
[ext_resource type="Texture2D" uid="uid://em4ccqpcl5lf" path="res://assets/residential/indoors/counter_wide_purple.png" id="15_c65y4"]
[ext_resource type="Texture2D" uid="uid://6hbgcmhcpcc2" path="res://assets/environment/seedlings.png" id="17_5kiyl"]
[ext_resource type="Texture2D" uid="uid://bkv7f7wxjfce5" path="res://assets/residential/indoors/cupboard2.png" id="17_xg3n8"]
[ext_resource type="Texture2D" uid="uid://bm2mbjo28hf6p" path="res://assets/residential/indoors/sign_seedling.png" id="18_mulg4"]
[ext_resource type="Texture2D" uid="uid://d12k76fyavn8r" path="res://assets/environment/box_cardboard_sideways.png" id="20_ewfv5"]
[ext_resource type="Texture2D" uid="uid://binrcblg113cg" path="res://assets/downtown/sipek.png" id="21_7cf1p"]
[ext_resource type="Texture2D" uid="uid://ctld20njtutkn" path="res://assets/residential/indoors/plant4.png" id="23_6cdwa"]
[ext_resource type="Texture2D" uid="uid://djmvsrpel7581" path="res://assets/downtown/hanging_plants.png" id="24_0wcvj"]
[ext_resource type="Texture2D" uid="uid://b4a3whtmf6xdw" path="res://assets/residential/indoors/bonsai1.png" id="25_5xd81"]
[ext_resource type="Texture2D" uid="uid://cg8d5fjpqggrn" path="res://assets/residential/indoors/bonsai2.png" id="26_kqran"]
[ext_resource type="Texture2D" uid="uid://b14mlmbyhohro" path="res://assets/residential/indoors/plant_price_white.png" id="27_rp2pe"]
[ext_resource type="Texture2D" uid="uid://071uthjg3rjk" path="res://assets/residential/indoors/scissors.png" id="28_inwkg"]
[ext_resource type="Texture2D" uid="uid://bsonlbmrwtun4" path="res://assets/residential/indoors/cactus1.png" id="29_4bhrk"]
[ext_resource type="Texture2D" uid="uid://5egjodqauotm" path="res://assets/residential/indoors/room_light_big.png" id="29_huixs"]
[ext_resource type="Texture2D" uid="uid://ditvesqsh354d" path="res://assets/residential/indoors/room_light_wide.png" id="29_ngqf5"]
[ext_resource type="Texture2D" uid="uid://cgw4pux24k3id" path="res://assets/residential/indoors/room_light_wide_down.png" id="30_5faay"]
[ext_resource type="Texture2D" uid="uid://b3cy4yxplws8u" path="res://assets/residential/indoors/certificat.png" id="31_kyslc"]
[ext_resource type="Texture2D" uid="uid://ds4y5uncew47s" path="res://assets/residential/indoors/chair_wood.png" id="32_t16ue"]
[ext_resource type="Texture2D" uid="uid://biuvbns76bhli" path="res://assets/residential/indoors/clinic_cart.png" id="33_h6ewb"]
[ext_resource type="Texture2D" uid="uid://bx3yun47ioafw" path="res://assets/residential/indoors/shelf_back.png" id="34_mpg0u"]
[ext_resource type="Texture2D" uid="uid://yeropcrtoym5" path="res://assets/environment/seedlings_small.png" id="35_apwcw"]
[ext_resource type="Texture2D" uid="uid://gct2bhm8l4y4" path="res://assets/environment/seedlings_smallb.png" id="36_m5ifd"]
[ext_resource type="Texture2D" uid="uid://yae5xc8l5bk3" path="res://assets/residential/indoors/plant_bigger.png" id="37_qj5jv"]
[ext_resource type="Texture2D" uid="uid://dy22d0k768xwt" path="res://assets/residential/indoors/plant_sunflower.png" id="38_wlwqc"]
[ext_resource type="Texture2D" uid="uid://laiof2djlcoc" path="res://assets/residential/indoors/plant_biggest.png" id="39_l3lyd"]
[ext_resource type="Texture2D" uid="uid://ccpux3rqyc01t" path="res://assets/downtown/bamboo_rooftop.png" id="40_2ygpf"]

[node name="PlantShop" type="Node2D"]

Expand Down Expand Up @@ -347,7 +347,6 @@ texture = ExtResource("36_m5ifd")
position = Vector2(0, 11)

[node name="ShelfBack" type="Sprite2D" parent="."]
z_index = 2
position = Vector2(155, 76)
texture = ExtResource("34_mpg0u")

Expand Down

0 comments on commit 5f14f87

Please sign in to comment.