From ab730f79ba451af8143fe7b7a6c7a33a4c31c9da Mon Sep 17 00:00:00 2001 From: adrianna Date: Sat, 10 Sep 2016 22:50:19 +0200 Subject: [PATCH] added more stuff to help --- data/images/48/circle.png | Bin 0 -> 829 bytes data/images/48/square.png | Bin 0 -> 253 bytes data/images/Makefile | 3 +- sources/vector/circle.svg | 72 ++++++++++++++++++++++++++++++ sources/vector/square.svg | 73 ++++++++++++++++++++++++++++++ tabakrolletjie/scenes/help.py | 81 +++++++++++++++++++++++++--------- 6 files changed, 208 insertions(+), 21 deletions(-) create mode 100644 data/images/48/circle.png create mode 100644 data/images/48/square.png create mode 100644 sources/vector/circle.svg create mode 100644 sources/vector/square.svg diff --git a/data/images/48/circle.png b/data/images/48/circle.png new file mode 100644 index 0000000000000000000000000000000000000000..7ed598c666e283239c7e58eef48e3215972b28c0 GIT binary patch literal 829 zcmV-D1H$}?P)F*93jcR>X_Xq$}eGqW$y+5?A6lF7nYRPY0+^2HlxG%EN3>?}bfD@|8FfPsVq ztICe3&}lLEU*HF@R+>e6enka8fS)CZWTolq2e4FvNLCi3f*-(K2_jjUj|$BI8ryyK zGHg<^?B~ewS!gz}Ocq))#drV@1Bzs&#W5+NS-`thSBx5PsBJ>iXt){LDg`%uc}Py` zdvG&S)p}t8m(>6DE7vV08d?8zD614q$K|2TTFA^E1NRG8>Ylr1_B5%X)7D}i@Eo@@ zRwl22iPT$*jW3+1+?(4faG{+%Y_Oa*vv0UWzn-sGSJZ*iopz?XM$(|%Lx)hjl(c8l z;;|t5B;5-je@E{6D+Wm?CA}*^d`VK6eJM#jlCH`Dihk|gYLXvHQ0;WbQ%G6)B38xcU;ytpUcd$MMd}rc6XG6KQe0>00000NkvXX Hu0mjfhd#u772{E$Qy`ZU64DPEX}f T*Z*t>azBHotDnm{r-UW|SW8pH literal 0 HcmV?d00001 diff --git a/data/images/Makefile b/data/images/Makefile index 3b92dcb..08ea9db 100644 --- a/data/images/Makefile +++ b/data/images/Makefile @@ -7,10 +7,11 @@ MOULD=eyeballA eyeballB eyeballC eyelid LIGHT=spotlight lamp laser LIGHT_MASK=light_mask_2_1 light_mask_2_2 light_mask_3_1 light_mask_3_2 light_mask_3_3 CONTROLS=night default_cursor exit pause play day +BLANKS=circle square IMG16=$(MOULD_BODY) IMG32=$(MOULD_BODY) $(MOULD) $(LIGHT) $(SEED) $(LIGHT_MASK) $(CONTROLS) -IMG48=$(LIGHT) $(TURNIP) $(LIGHT_MASK) +IMG48=$(LIGHT) $(TURNIP) $(LIGHT_MASK) $(BLANKS) IMG64=$(MOULD_BODY) CURSORS=$(SEED) $(LIGHT) diff --git a/sources/vector/circle.svg b/sources/vector/circle.svg new file mode 100644 index 0000000..19cabeb --- /dev/null +++ b/sources/vector/circle.svg @@ -0,0 +1,72 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/sources/vector/square.svg b/sources/vector/square.svg new file mode 100644 index 0000000..88176f4 --- /dev/null +++ b/sources/vector/square.svg @@ -0,0 +1,73 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/tabakrolletjie/scenes/help.py b/tabakrolletjie/scenes/help.py index c58fea5..46c176d 100644 --- a/tabakrolletjie/scenes/help.py +++ b/tabakrolletjie/scenes/help.py @@ -61,17 +61,35 @@ class HelpScene(BaseScene): "This is a space turnip, the most valuable vegetable in the" " universe. A crucial ingredient of longevity serum, space" " navigator tonic and a pink sweet that everyone loves.")), - HelpItem(("64", "mouldA.png"), ( - "This is Boyd the space mould. He loves turnips. You've" - " disinfected your ship a thousand times, but somehow he shows" - " up on every planet at night to devour your crop. He is" - " vulnerable to light, but beware -- he builds up a resistance" - " if you overuse the same colour.")), + ] + + mould = HelpItem(("64", "mouldA.png"), ( + "This is Boyd the space mould. He loves turnips. You've" + " disinfected your ship a thousand times, but somehow he shows" + " up on every planet at night to devour your crop. He is" + " vulnerable to light, but beware -- he builds up a resistance" + " if you overuse the same colour.")) + + mould._img.blit( + loader.load_image("32", "mouldB.png").convert_alpha(), + (30, 30), None) + mould._img.blit( + loader.load_image("32", "eyeballA.png").convert_alpha(), + (10, 10), None) + mould._img.blit( + loader.load_image("32", "eyelid.png").convert_alpha(), + (10, 10), None) + + items.append(mould) + + items.extend([ HelpItem(("32", "seed.png"), ( "This is a turnip seed. You get a limited number of these at" " the start of a level. You can plant them, and you can use" " them to buy lights to protect your crop. Turnips which" - " survive to harvest yield more seeds.")), + " survive to harvest yield more seeds. Click on the icon that" + " looks like this to start planting seeds. It takes three nights" + " for a turnip to mature.")), HelpItem(("48", "lamp.png"), ( "This is a lamp. It comes in many colours, and has some other" " varying properties. It is powered by your farm's battery" @@ -95,18 +113,41 @@ class HelpScene(BaseScene): " skip to the next day. Or you can keep playing with your lights." " If you have no power left either, or you are completely" " bankrupt, the night will end automatically.")), - ] - - # Special mould assembly - items[1]._img.blit( - loader.load_image("32", "mouldB.png").convert_alpha(), - (30, 30), None) - items[1]._img.blit( - loader.load_image("32", "eyeballA.png").convert_alpha(), - (10, 10), None) - items[1]._img.blit( - loader.load_image("32", "eyelid.png").convert_alpha(), - (10, 10), None) + HelpItem(("32", "spotlight.png"), ( + "Click on a light icon like this to get a menu of colour options" + " available on your level.")), + HelpItem(("32", "spotlight.png"), ( + "Once you have selected a colour option, you will be able to" + " place the light."), + transform=Multiply(colour=COLOURS["magenta"])), + HelpItem(("32", "exit.png"), ( + "Click this icon to quit the level in disgust and return to the" + " menu.")), + ]) + + soil = HelpItem(("48", "square.png"), ( + "This is soil. You can plant seeds in it and position lights on" + " it. Lights and plants can't overlap with each other.")) + soil._img.blit( + loader.load_image("textures", "soil.png").convert_alpha(), + (0, 0), None, pgl.BLEND_RGBA_MULT) + items.append(soil) + + stone = HelpItem(("48", "square.png"), ( + "This is a stone wall. It gets in your way. On the other hand, it" + " also gets in Boyd's way.")) + stone._img.blit( + loader.load_image("textures", "stone.png").convert_alpha(), + (0, 0), None, pgl.BLEND_RGBA_MULT) + items.append(stone) + + shrub = HelpItem(("48", "circle.png"), ( + "This is a shrub. It works exactly like a wall, except that it's" + " round.")) + shrub._img.blit( + loader.load_image("textures", "shrub.png").convert_alpha(), + (0, 0), None, pgl.BLEND_RGBA_MULT) + items.append(shrub) return items @@ -124,7 +165,7 @@ class HelpScene(BaseScene): height += max( item._img_size, item.FONT.get_height() * len(item._text)) height += 5 - if height > SCREEN_SIZE[1]: + if height > SCREEN_SIZE[1] - 50: height = 50 x_offset = SCREEN_SIZE[0] / 2 -- 2.34.1