rapid-router 5.4.1__py2.py3-none-any.whl → 7.6.8__py2.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.
- example_project/rapid_router_test_settings.py +164 -0
- example_project/settings.py +152 -0
- example_project/urls.py +15 -0
- example_project/{example_project/wsgi.py → wsgi.py} +2 -1
- game/__init__.py +1 -1
- game/admin.py +43 -4
- game/app_settings.py +3 -7
- game/character.py +26 -18
- game/decor.py +172 -97
- game/end_to_end_tests/base_game_test.py +44 -33
- game/end_to_end_tests/editor_page.py +17 -2
- game/end_to_end_tests/game_page.py +127 -45
- game/end_to_end_tests/selenium_test_case.py +1 -20
- game/end_to_end_tests/test_cow_crashes.py +3 -5
- game/end_to_end_tests/test_language_dropdown.py +14 -0
- game/end_to_end_tests/test_level_editor.py +290 -0
- game/end_to_end_tests/test_level_failures.py +1 -1
- game/end_to_end_tests/test_level_selection.py +79 -0
- game/end_to_end_tests/test_play_through.py +240 -102
- game/end_to_end_tests/test_python_levels.py +44 -13
- game/end_to_end_tests/test_saving_workspace.py +22 -0
- game/forms.py +9 -2
- game/level_management.py +38 -29
- game/messages.py +1218 -203
- game/migrations/0001_squashed_0025_levels_ordering_pt1.py +19 -1
- game/migrations/0026_levels_pt2.py +13 -2
- game/migrations/0032_cannot_turn_left_level.py +13 -2
- game/migrations/0033_recursion_level.py +13 -2
- game/migrations/0034_joes_level.py +13 -2
- game/migrations/0035_disable_route_score_level_70.py +0 -2
- game/migrations/0036_level_score_73.py +0 -2
- game/migrations/0037_level_score_79.py +0 -2
- game/migrations/0038_level_score_40.py +0 -1
- game/migrations/0042_level_score_73.py +0 -2
- game/migrations/0048_add_cow_field_and_blocks.py +0 -2
- game/migrations/0049_level_score_34.py +0 -2
- game/migrations/0050_level_score_40.py +0 -2
- game/migrations/0051_level_score_49.py +0 -1
- game/migrations/0076_level_locked_for_class.py +19 -0
- game/migrations/0077_alter_level_next_level.py +52 -0
- game/migrations/0078_add_block_types.py +23 -0
- game/migrations/0079_populate_block_type_add_cow_blocks.py +60 -0
- game/migrations/0080_level_disable_algorithm_score.py +18 -0
- game/migrations/0081_first_12_levels_no_algo_score.py +29 -0
- game/migrations/0082_level_43_solution.py +16 -0
- game/migrations/0083_add_cows_to_existing_levels.py +195 -0
- game/migrations/0084_alter_block_block_type.py +18 -0
- game/migrations/0085_add_new_blocks.py +53 -0
- game/migrations/0086_loop_levels.py +482 -0
- game/migrations/0087_workspace_python_view_enabled.py +18 -0
- game/migrations/0088_rename_episodes.py +35 -0
- game/migrations/0089_episodes_in_development.py +30 -0
- game/migrations/0090_add_missing_model_solutions.py +144 -0
- game/migrations/0091_disable_algo_score_if_no_model_solution.py +46 -0
- game/migrations/0092_disable_algo_score_in_custom_levels.py +28 -0
- game/migrations/0093_alter_level_character_name.py +18 -0
- game/migrations/0094_add_hint_lesson_subtitle_to_levels.py +28 -0
- game/migrations/0095_level_commands.py +18 -0
- game/migrations/0096_alter_level_commands.py +18 -0
- game/migrations/0097_add_python_den_levels.py +1515 -0
- game/migrations/0098_add_episode_link_fields.py +44 -0
- game/migrations/0099_python_episodes_links.py +103 -0
- game/migrations/0100_reorder_python_levels.py +179 -0
- game/migrations/0101_rename_episodes.py +45 -0
- game/migrations/0102_reoder_episodes_13_14.py +136 -0
- game/migrations/0103_level_1015_solution.py +26 -0
- game/migrations/0104_remove_level_direct_drive.py +17 -0
- game/migrations/0105_delete_invalid_attempts.py +18 -0
- game/migrations/0106_fields_to_snake_case.py +48 -0
- game/migrations/0107_rename_worksheet_link_episode_student_worksheet_link.py +18 -0
- game/migrations/0108_episode_indy_worksheet_link.py +18 -0
- game/migrations/0109_create_episodes_23_and_24.py +99 -0
- game/migrations/0110_remove_episode_indy_worksheet_link_and_more.py +100 -0
- game/migrations/0111_create_worksheets.py +149 -0
- game/migrations/0112_worksheet_locked_classes.py +21 -0
- game/migrations/0113_level_needs_approval.py +18 -0
- game/migrations/0114_default_and_non_student_levels_no_approval.py +31 -0
- game/migrations/0115_level_level__default_does_not_need_approval.py +22 -0
- game/migrations/0116_update_worksheet_video_links.py +68 -0
- game/migrations/0117_update_solutions_to_if_else.py +61 -0
- game/models.py +157 -16
- game/permissions.py +34 -19
- game/python_den_urls.py +26 -0
- game/random_road.py +43 -127
- game/serializers.py +12 -17
- game/static/django_reverse_js/js/reverse.js +171 -0
- game/static/game/css/LilitaOne-Regular.ttf +0 -0
- game/static/game/css/backgrounds.css +14 -10
- game/static/game/css/dataTables.custom.css +4 -2
- game/static/game/css/dataTables.jqueryui.css +561 -320
- game/static/game/css/editor.css +47 -0
- game/static/game/css/game.css +43 -49
- game/static/game/css/game_screen.css +116 -53
- game/static/game/css/jquery.dataTables.css +455 -251
- game/static/game/css/level_editor.css +10 -1
- game/static/game/css/level_selection.css +32 -3
- game/static/game/css/level_share.css +6 -5
- game/static/game/css/skulpt/codemirror.css +1 -0
- game/static/game/image/Python_Den_hero_student.png +0 -0
- game/static/game/image/Python_levels_page.svg +1954 -0
- game/static/game/image/characters/front_view/Electric_van.svg +448 -0
- game/static/game/image/characters/top_view/Electric_van.svg +448 -0
- game/static/game/image/characters/top_view/Sleigh.svg +436 -0
- game/static/game/image/decor/city/solar_panel.svg +1200 -0
- game/static/game/image/decor/farm/solar_panel.svg +86 -0
- game/static/game/image/decor/grass/solar_panel.svg +86 -0
- game/static/game/image/decor/snow/barn.svg +1788 -0
- game/static/game/image/decor/snow/cfc.svg +1050 -147
- game/static/game/image/decor/snow/crops.svg +7370 -0
- game/static/game/image/decor/snow/hospital.svg +1220 -0
- game/static/game/image/decor/snow/house1.svg +971 -0
- game/static/game/image/decor/snow/house2.svg +1574 -0
- game/static/game/image/decor/snow/school.svg +1071 -0
- game/static/game/image/decor/snow/shop.svg +3211 -0
- game/static/game/image/decor/snow/solar_panel.svg +173 -0
- game/static/game/image/electric_van.svg +448 -0
- game/static/game/image/icons/add_house.svg +26 -0
- game/static/game/image/icons/delete_house.svg +26 -0
- game/static/game/image/icons/description.svg +1 -0
- game/static/game/image/icons/hint.svg +1 -0
- game/static/game/image/icons/if_else.svg +3 -0
- game/static/game/image/icons/python.svg +1 -1
- game/static/game/image/if_else_example.png +0 -0
- game/static/game/image/pigeon.svg +684 -0
- game/static/game/image/python_den_header.svg +19 -0
- game/static/game/js/animation.js +84 -28
- game/static/game/js/blockly/msg/js/bg.js +52 -1
- game/static/game/js/blockly/msg/js/ca.js +52 -1
- game/static/game/js/blockly/msg/js/en-gb.js +52 -1
- game/static/game/js/blockly/msg/js/en.js +52 -1
- game/static/game/js/blockly/msg/js/es.js +52 -1
- game/static/game/js/blockly/msg/js/fr.js +52 -1
- game/static/game/js/blockly/msg/js/hi.js +52 -1
- game/static/game/js/blockly/msg/js/it.js +52 -1
- game/static/game/js/blockly/msg/js/pl.js +52 -1
- game/static/game/js/blockly/msg/js/pt-br.js +52 -1
- game/static/game/js/blockly/msg/js/ru.js +52 -1
- game/static/game/js/blockly/msg/js/ur.js +52 -1
- game/static/game/js/blocklyCompiler.js +550 -392
- game/static/game/js/blocklyControl.js +335 -302
- game/static/game/js/blocklyCustomBlocks.js +691 -458
- game/static/game/js/blocklyCustomisations.js +3 -1
- game/static/game/js/button.js +12 -0
- game/static/game/js/cow.js +15 -130
- game/static/game/js/drawing.js +313 -201
- game/static/game/js/editor.js +23 -0
- game/static/game/js/game.js +148 -139
- game/static/game/js/jquery.dataTables.min.js +3 -159
- game/static/game/js/level_editor.js +823 -448
- game/static/game/js/level_moderation.js +33 -2
- game/static/game/js/level_selection.js +62 -25
- game/static/game/js/loadLanguages.js +21 -0
- game/static/game/js/map.js +106 -36
- game/static/game/js/model.js +55 -107
- game/static/game/js/pathFinder.js +73 -72
- game/static/game/js/program.js +184 -193
- game/static/game/js/pythonControl.js +14 -1
- game/static/game/js/scoreboard.js +0 -37
- game/static/game/js/scoreboardSharedLevels.js +48 -0
- game/static/game/js/sharing.js +22 -10
- game/static/game/js/skulpt/codemirror.js +5 -4
- game/static/game/js/skulpt/skulpt-stdlib.js +1 -1
- game/static/game/js/sound.js +52 -5
- game/static/game/js/van.js +0 -7
- game/static/game/raphael_image/characters/top_view/Electric_van.svg +448 -0
- game/static/game/raphael_image/characters/top_view/Sleigh.svg +436 -0
- game/static/game/raphael_image/decor/city/solar_panel.svg +1200 -0
- game/static/game/raphael_image/decor/farm/solar_panel.svg +86 -0
- game/static/game/raphael_image/decor/grass/solar_panel.svg +86 -0
- game/static/game/raphael_image/decor/snow/barn.svg +1788 -0
- game/static/game/raphael_image/decor/snow/cfc.svg +1050 -147
- game/static/game/raphael_image/decor/snow/crops.svg +7370 -0
- game/static/game/raphael_image/decor/snow/hospital.svg +1220 -0
- game/static/game/raphael_image/decor/snow/house1.svg +971 -0
- game/static/game/raphael_image/decor/snow/house2.svg +1574 -0
- game/static/game/raphael_image/decor/snow/school.svg +1071 -0
- game/static/game/raphael_image/decor/snow/shop.svg +3211 -0
- game/static/game/raphael_image/decor/snow/solar_panel.svg +173 -0
- game/static/game/raphael_image/pigeon.svg +685 -0
- game/static/game/raphael_image/sleigh_wreckage.svg +430 -0
- game/static/game/sass/game.scss +22 -6
- game/static/game/sound/clown_horn.mp3 +0 -0
- game/static/game/sound/clown_horn.ogg +0 -0
- game/static/game/sound/electric_van_starting.mp3 +0 -0
- game/static/game/sound/electric_van_starting.ogg +0 -0
- game/static/game/sound/pigeon.mp3 +0 -0
- game/static/game/sound/pigeon.ogg +0 -0
- game/static/game/sound/sleigh_bells.mp3 +0 -0
- game/static/game/sound/sleigh_bells.ogg +0 -0
- game/static/game/sound/sleigh_crash.mp3 +0 -0
- game/static/game/sound/sleigh_crash.ogg +0 -0
- game/templates/game/base.html +35 -15
- game/templates/game/basenonav.html +23 -17
- game/templates/game/game.html +236 -111
- game/templates/game/level_editor.html +353 -275
- game/templates/game/level_moderation.html +19 -6
- game/templates/game/level_selection.html +75 -62
- game/templates/game/python_den_level_selection.html +291 -0
- game/templates/game/python_den_worksheet.html +101 -0
- game/templates/game/scoreboard.html +88 -65
- game/tests/test_level_editor.py +210 -35
- game/tests/test_level_moderation.py +6 -20
- game/tests/test_level_selection.py +332 -11
- game/tests/test_python_den_worksheet.py +85 -0
- game/tests/test_scoreboard.py +258 -66
- game/tests/utils/level.py +43 -3
- game/tests/utils/teacher.py +2 -2
- game/theme.py +21 -21
- game/urls.py +125 -78
- game/views/language_code_conversions.py +90 -0
- game/views/level.py +201 -63
- game/views/level_editor.py +109 -48
- game/views/level_moderation.py +29 -6
- game/views/level_selection.py +179 -56
- game/views/level_solutions.py +600 -106
- game/views/scoreboard.py +181 -66
- game/views/worksheet.py +25 -0
- rapid_router-7.6.8.dist-info/METADATA +174 -0
- {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/RECORD +222 -242
- {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/WHEEL +1 -1
- rapid_router-7.6.8.dist-info/licenses/LICENSE.md +3 -0
- example_project/example_project/__init__.py +0 -1
- example_project/example_project/settings.py +0 -54
- example_project/example_project/urls.py +0 -16
- example_project/manage.py +0 -10
- game/autoconfig.py +0 -59
- game/csp_config.py +0 -23
- game/locale/ar_SA/LC_MESSAGES/django.mo +0 -0
- game/locale/ar_SA/LC_MESSAGES/django.po +0 -405
- game/locale/ar_SA/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ar_SA/LC_MESSAGES/djangojs.po +0 -743
- game/locale/bg_BG/LC_MESSAGES/django.mo +0 -0
- game/locale/bg_BG/LC_MESSAGES/django.po +0 -405
- game/locale/bg_BG/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/bg_BG/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ca_ES/LC_MESSAGES/django.mo +0 -0
- game/locale/ca_ES/LC_MESSAGES/django.po +0 -405
- game/locale/ca_ES/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ca_ES/LC_MESSAGES/djangojs.po +0 -740
- game/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- game/locale/cs_CZ/LC_MESSAGES/django.po +0 -405
- game/locale/cs_CZ/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/cs_CZ/LC_MESSAGES/djangojs.po +0 -741
- game/locale/cy_GB/LC_MESSAGES/django.mo +0 -0
- game/locale/cy_GB/LC_MESSAGES/django.po +0 -405
- game/locale/cy_GB/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/cy_GB/LC_MESSAGES/djangojs.po +0 -743
- game/locale/de_DE/LC_MESSAGES/django.mo +0 -0
- game/locale/de_DE/LC_MESSAGES/django.po +0 -405
- game/locale/de_DE/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/de_DE/LC_MESSAGES/djangojs.po +0 -739
- game/locale/el_GR/LC_MESSAGES/django.mo +0 -0
- game/locale/el_GR/LC_MESSAGES/django.po +0 -405
- game/locale/el_GR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/el_GR/LC_MESSAGES/djangojs.po +0 -739
- game/locale/en_GB/LC_MESSAGES/django.mo +0 -0
- game/locale/en_GB/LC_MESSAGES/django.po +0 -405
- game/locale/en_GB/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/en_GB/LC_MESSAGES/djangojs.po +0 -739
- game/locale/es_ES/LC_MESSAGES/django.mo +0 -0
- game/locale/es_ES/LC_MESSAGES/django.po +0 -405
- game/locale/es_ES/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/es_ES/LC_MESSAGES/djangojs.po +0 -739
- game/locale/fi_FI/LC_MESSAGES/django.mo +0 -0
- game/locale/fi_FI/LC_MESSAGES/django.po +0 -405
- game/locale/fi_FI/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/fi_FI/LC_MESSAGES/djangojs.po +0 -739
- game/locale/fr_FR/LC_MESSAGES/django.mo +0 -0
- game/locale/fr_FR/LC_MESSAGES/django.po +0 -405
- game/locale/fr_FR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/fr_FR/LC_MESSAGES/djangojs.po +0 -739
- game/locale/gu_IN/LC_MESSAGES/django.mo +0 -0
- game/locale/gu_IN/LC_MESSAGES/django.po +0 -405
- game/locale/gu_IN/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/gu_IN/LC_MESSAGES/djangojs.po +0 -739
- game/locale/hi_IN/LC_MESSAGES/django.mo +0 -0
- game/locale/hi_IN/LC_MESSAGES/django.po +0 -405
- game/locale/hi_IN/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/hi_IN/LC_MESSAGES/djangojs.po +0 -739
- game/locale/id_ID/LC_MESSAGES/django.mo +0 -0
- game/locale/id_ID/LC_MESSAGES/django.po +0 -405
- game/locale/id_ID/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/id_ID/LC_MESSAGES/djangojs.po +0 -738
- game/locale/it_IT/LC_MESSAGES/django.mo +0 -0
- game/locale/it_IT/LC_MESSAGES/django.po +0 -405
- game/locale/it_IT/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/it_IT/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ja_JP/LC_MESSAGES/django.mo +0 -0
- game/locale/ja_JP/LC_MESSAGES/django.po +0 -405
- game/locale/ja_JP/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ja_JP/LC_MESSAGES/djangojs.po +0 -738
- game/locale/lol_US/LC_MESSAGES/django.mo +0 -0
- game/locale/lol_US/LC_MESSAGES/django.po +0 -405
- game/locale/lol_US/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/lol_US/LC_MESSAGES/djangojs.po +0 -739
- game/locale/nb_NO/LC_MESSAGES/django.mo +0 -0
- game/locale/nb_NO/LC_MESSAGES/django.po +0 -405
- game/locale/nb_NO/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/nb_NO/LC_MESSAGES/djangojs.po +0 -739
- game/locale/nl_NL/LC_MESSAGES/django.mo +0 -0
- game/locale/nl_NL/LC_MESSAGES/django.po +0 -405
- game/locale/nl_NL/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/nl_NL/LC_MESSAGES/djangojs.po +0 -739
- game/locale/pl_PL/LC_MESSAGES/django.mo +0 -0
- game/locale/pl_PL/LC_MESSAGES/django.po +0 -405
- game/locale/pl_PL/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/pl_PL/LC_MESSAGES/djangojs.po +0 -741
- game/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
- game/locale/pt_BR/LC_MESSAGES/django.po +0 -405
- game/locale/pt_BR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/pt_BR/LC_MESSAGES/djangojs.po +0 -739
- game/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
- game/locale/pt_PT/LC_MESSAGES/django.po +0 -405
- game/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/pt_PT/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ro_RO/LC_MESSAGES/django.mo +0 -0
- game/locale/ro_RO/LC_MESSAGES/django.po +0 -405
- game/locale/ro_RO/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ro_RO/LC_MESSAGES/djangojs.po +0 -740
- game/locale/ru_RU/LC_MESSAGES/django.mo +0 -0
- game/locale/ru_RU/LC_MESSAGES/django.po +0 -405
- game/locale/ru_RU/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ru_RU/LC_MESSAGES/djangojs.po +0 -741
- game/locale/sv_SE/LC_MESSAGES/django.mo +0 -0
- game/locale/sv_SE/LC_MESSAGES/django.po +0 -405
- game/locale/sv_SE/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/sv_SE/LC_MESSAGES/djangojs.po +0 -739
- game/locale/tl_PH/LC_MESSAGES/django.mo +0 -0
- game/locale/tl_PH/LC_MESSAGES/django.po +0 -405
- game/locale/tl_PH/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/tl_PH/LC_MESSAGES/djangojs.po +0 -739
- game/locale/tlh_AA/LC_MESSAGES/django.mo +0 -0
- game/locale/tlh_AA/LC_MESSAGES/django.po +0 -405
- game/locale/tlh_AA/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/tlh_AA/LC_MESSAGES/djangojs.po +0 -739
- game/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
- game/locale/tr_TR/LC_MESSAGES/django.po +0 -405
- game/locale/tr_TR/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/tr_TR/LC_MESSAGES/djangojs.po +0 -740
- game/locale/ur_IN/LC_MESSAGES/django.mo +0 -0
- game/locale/ur_IN/LC_MESSAGES/django.po +0 -405
- game/locale/ur_IN/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ur_IN/LC_MESSAGES/djangojs.po +0 -739
- game/locale/ur_PK/LC_MESSAGES/django.mo +0 -0
- game/locale/ur_PK/LC_MESSAGES/django.po +0 -405
- game/locale/ur_PK/LC_MESSAGES/djangojs.mo +0 -0
- game/locale/ur_PK/LC_MESSAGES/djangojs.po +0 -739
- game/static/game/image/actions/go.svg +0 -18
- game/static/game/image/icons/destination.svg +0 -9
- game/static/game/js/pqselect.min.js +0 -9
- game/static/game/js/widget-scroller.js +0 -906
- rapid_router-5.4.1.dist-info/LICENSE.md +0 -577
- rapid_router-5.4.1.dist-info/METADATA +0 -24
- {rapid_router-5.4.1.dist-info → rapid_router-7.6.8.dist-info}/top_level.txt +0 -0
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
{% extends 'game/basenonav.html' %}
|
|
2
|
-
{% load i18n %}
|
|
3
2
|
{% load static %}
|
|
4
3
|
{% load app_tags %}
|
|
5
4
|
{% load game.utils %}
|
|
@@ -7,113 +6,138 @@
|
|
|
7
6
|
{% block title %}Code for Life - Rapid Router - Create{% endblock %}
|
|
8
7
|
|
|
9
8
|
{% block head %}
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
<meta name="viewport" content="user-scalable=no" />
|
|
10
|
+
{% include 'game/crowdin.html' %}
|
|
12
11
|
{% endblock %}
|
|
13
12
|
|
|
14
13
|
{% block scripts %}
|
|
15
14
|
{{block.super}}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
15
|
+
<script>
|
|
16
|
+
var COW_LEVELS_ENABLED = {{ cow_level_enabled| booltojs}};
|
|
17
|
+
var NIGHT_MODE_FEATURE_ENABLED = {{ night_mode_feature_enabled }};
|
|
18
|
+
{% if level %}
|
|
19
|
+
var LEVEL = {{ level }};
|
|
20
|
+
{% else %}
|
|
21
|
+
var LEVEL = null
|
|
22
|
+
{% endif %}
|
|
23
|
+
</script>
|
|
24
|
+
<script src="{% static 'game/js/utils.js' %}"></script>
|
|
25
|
+
<script src="{% static 'game/js/mobile-detect.min.js' %}"></script>
|
|
26
|
+
<script src="{% static 'game/js/raphael.js' %}"></script>
|
|
27
|
+
<script src="{% static 'game/js/drawingConstants.js' %}"></script>
|
|
28
|
+
<script src="{% static 'game/js/character.js' %}"></script>
|
|
29
|
+
<script src="{% static 'game/js/drawing.js' %}"></script>
|
|
30
|
+
|
|
31
|
+
<script type="text/javascript" src="{% static 'game/js/blockly/blockly_compressed.js' %}"></script>
|
|
32
|
+
<script type="text/javascript" src="{% static 'game/js/blockly/blocks_compressed.js' %}"></script>
|
|
33
|
+
<script type="text/javascript" src="{% static 'game/js/blockly/msg/js/en.js' %}"></script>
|
|
34
|
+
<script type="text/javascript" src="{% static 'game/js/mobile-detect.min.js' %}"></script>
|
|
35
|
+
|
|
36
|
+
<script type="text/javascript" src="{% static 'game/js/blocklyCustomBlocks.js' %}"></script>
|
|
37
|
+
<script type="text/javascript" src="{% static 'game/js/blocklyControl.js' %}"></script>
|
|
38
|
+
<script type="text/javascript" src="{% static 'game/js/blocklyMessages.js' %}"></script>
|
|
39
|
+
|
|
40
|
+
<script src="/static/game/js/tab.js"></script>
|
|
41
|
+
<script src="/static/game/js/messages.js"></script>
|
|
42
|
+
<script src="/static/game/js/saving.js"></script>
|
|
43
|
+
<script src="/static/game/js/sharing.js"></script>
|
|
44
|
+
<script src="/static/game/js/level_editor/level_save_state.js"></script>
|
|
45
|
+
<script src="/static/game/js/level_editor/owned_levels.js"></script>
|
|
46
|
+
<script src="/static/game/js/level_editor.js"></script>
|
|
47
|
+
<script src="/static/game/js/coordinate.js"></script>
|
|
48
|
+
<script src="/static/game/js/node.js"></script>
|
|
49
|
+
<script src="/static/game/js/map.js"></script>
|
|
50
|
+
<script src="/static/game/js/pathFinder.js"></script>
|
|
51
|
+
<script src="/static/game/js/trafficLight.js"></script>
|
|
52
|
+
{% if cow_level_enabled %}
|
|
53
|
+
<script src="/static/game/js/cow.js"></script>{% endif %}
|
|
54
|
+
<script src="/static/game/js/destination.js"></script>
|
|
55
|
+
|
|
56
|
+
<script>
|
|
57
|
+
var BLOCKS = {{ blocks | safe}};
|
|
58
|
+
var THEMES = []
|
|
59
|
+
var CHARACTER_NAME = 'Van'
|
|
60
|
+
|
|
61
|
+
function initGlobals() {
|
|
62
|
+
var themes = []
|
|
63
|
+
{% for theme in themes %}
|
|
64
|
+
var name = "{{theme.name}}"
|
|
65
|
+
themes.push({
|
|
66
|
+
"name": name,
|
|
67
|
+
"id": {{ theme.id }},
|
|
68
|
+
"border": "{{theme.border}}",
|
|
69
|
+
"background": "{{theme.background}}",
|
|
70
|
+
"selected": "{{theme.selected}}"
|
|
71
71
|
});
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
72
|
+
{% endfor %}
|
|
73
|
+
|
|
74
|
+
var decor = []
|
|
75
|
+
{% for dec in decor %}
|
|
76
|
+
decor.push({
|
|
77
|
+
"id": "{{dec.id}}",
|
|
78
|
+
"name": "{{dec.name}}",
|
|
79
|
+
"url": ocargo.Drawing.raphaelImageDir + "{{dec.url}}",
|
|
80
|
+
"width": "{{dec.width}}",
|
|
81
|
+
"height": "{{dec.height}}",
|
|
82
|
+
"theme_name": "{{dec.theme.name}}",
|
|
83
|
+
"z_index": "{{ dec.z_index }}"
|
|
84
|
+
})
|
|
85
|
+
{% endfor %}
|
|
86
|
+
|
|
87
|
+
for (var i = 0; i < themes.length; i++) {
|
|
88
|
+
var theme = themes[i]
|
|
89
|
+
THEMES[theme.name] = theme
|
|
90
|
+
THEMES[theme.name].decor = {}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
for (var i = 0; i < decor.length; i++) {
|
|
94
|
+
var themeDecor = THEMES[decor[i].theme_name].decor
|
|
95
|
+
themeDecor[decor[i].name] = decor[i]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
CHARACTERS = []
|
|
99
|
+
{% for char in characters %}
|
|
100
|
+
CHARACTERS['{{char.id}}'] = {
|
|
101
|
+
id: '{{char.id}}',
|
|
102
|
+
name: '{{char.name}}',
|
|
103
|
+
image: '{% static "game/image/"|add:char.en_face %}'
|
|
104
|
+
}
|
|
105
|
+
{% endfor %}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
initGlobals();
|
|
109
|
+
</script>
|
|
110
|
+
<script>
|
|
111
|
+
document.addEventListener('DOMContentLoaded', function () {
|
|
112
|
+
const selectElement = document.getElementById('character_select')
|
|
113
|
+
const labelElement = document.getElementById('max_resource_label')
|
|
114
|
+
|
|
115
|
+
const labelMap = {
|
|
116
|
+
'Van': 'Max fuel:',
|
|
117
|
+
'Electric van': 'Max battery:',
|
|
106
118
|
}
|
|
107
119
|
|
|
108
|
-
|
|
109
|
-
|
|
120
|
+
function updateResourceLabel() {
|
|
121
|
+
const selectedOption = selectElement.options[selectElement.selectedIndex]
|
|
122
|
+
const charName = selectedOption.textContent.trim()
|
|
123
|
+
|
|
124
|
+
labelElement.textContent = labelMap[charName] || "Max moves:"
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (selectElement) {
|
|
128
|
+
selectElement.addEventListener('change', updateResourceLabel)
|
|
129
|
+
updateResourceLabel()
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
</script>
|
|
133
|
+
|
|
110
134
|
{% endblock %}
|
|
111
135
|
|
|
112
136
|
{% block css %}
|
|
113
137
|
{{ block.super }}
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
138
|
+
<link href="{% static 'game/css/game_screen.css' %}" rel="stylesheet" type="text/css">
|
|
139
|
+
<link href="{% static 'game/css/level_share.css' %}" rel="stylesheet" type="text/css">
|
|
140
|
+
<link href="{% static 'game/css/level_editor.css' %}" rel="stylesheet" type="text/css">
|
|
117
141
|
{% endblock %}
|
|
118
142
|
|
|
119
143
|
{% block content %}
|
|
@@ -130,18 +154,18 @@
|
|
|
130
154
|
<div id="tabs">
|
|
131
155
|
|
|
132
156
|
<div id="currentTool" class="mode_panel">
|
|
133
|
-
<img id="currentToolIcon" src="{% static
|
|
157
|
+
<img id="currentToolIcon" src="{% static 'game/image/icons/delete_road.svg' %}">
|
|
134
158
|
<br>
|
|
135
|
-
<span id="currentToolText"
|
|
159
|
+
<span id="currentToolText" style="font-size: 14px;">Delete Road</span>
|
|
136
160
|
</div>
|
|
137
161
|
|
|
138
162
|
<br style="clear:both">
|
|
139
163
|
|
|
140
|
-
<div id="play_tab"
|
|
164
|
+
<div id="play_tab" class="tab">
|
|
141
165
|
<input type="radio" name="tabs" id="play_radio">
|
|
142
166
|
<label for="play_radio">
|
|
143
167
|
<img src='{% static "game/image/icons/play.svg" %}'>
|
|
144
|
-
<span>
|
|
168
|
+
<span>Play</span>
|
|
145
169
|
</label>
|
|
146
170
|
</div>
|
|
147
171
|
|
|
@@ -149,49 +173,65 @@
|
|
|
149
173
|
<input type="radio" name="tabs" id="play_night_radio">
|
|
150
174
|
<label for="play_night_radio">
|
|
151
175
|
<img src='{% static "game/image/icons/play.svg" %}'>
|
|
152
|
-
<span>
|
|
176
|
+
<span>Play Night</span>
|
|
153
177
|
</label>
|
|
154
178
|
</div>
|
|
155
179
|
|
|
156
180
|
<div class="tab_break"></div>
|
|
157
181
|
|
|
158
|
-
<div id="map_tab"
|
|
182
|
+
<div id="map_tab" class="tab selectable">
|
|
159
183
|
<input type="radio" name="tabs" id="map_radio">
|
|
160
184
|
<label for="map_radio">
|
|
161
185
|
<img src='{% static "game/image/icons/map.svg" %}'>
|
|
162
|
-
<span>
|
|
186
|
+
<span>Map</span>
|
|
163
187
|
</label>
|
|
164
188
|
</div>
|
|
165
189
|
|
|
166
|
-
<div id="scenery_tab"
|
|
190
|
+
<div id="scenery_tab" class="tab selectable">
|
|
167
191
|
<input type="radio" name="tabs" id="scenery_radio">
|
|
168
192
|
<label for="scenery_radio">
|
|
169
193
|
<img src='{% static "game/image/icons/decor.svg" %}'>
|
|
170
|
-
<span>
|
|
194
|
+
<span>Scenery</span>
|
|
171
195
|
</label>
|
|
172
196
|
</div>
|
|
173
197
|
|
|
174
|
-
<div id="character_tab"
|
|
198
|
+
<div id="character_tab" class="tab selectable">
|
|
175
199
|
<input type="radio" name="tabs" id="character_radio">
|
|
176
200
|
<label for="character_radio">
|
|
177
201
|
<img src='{% static "game/image/icons/character.svg" %}'>
|
|
178
|
-
<span>
|
|
202
|
+
<span>Character</span>
|
|
179
203
|
</label>
|
|
180
204
|
</div>
|
|
181
205
|
|
|
182
|
-
<div id="blocks_tab"
|
|
206
|
+
<div id="blocks_tab" class="tab selectable">
|
|
183
207
|
<input type="radio" name="tabs" id="blocks_radio">
|
|
184
208
|
<label for="blocks_radio">
|
|
185
209
|
<img src='{% static "game/image/icons/blockly.svg" %}'>
|
|
186
|
-
<span>
|
|
210
|
+
<span>Code</span>
|
|
187
211
|
</label>
|
|
188
212
|
</div>
|
|
189
213
|
|
|
190
|
-
<div id="random_tab"
|
|
214
|
+
<div id="random_tab" class="tab selectable">
|
|
191
215
|
<input type="radio" name="tabs" id="random_radio">
|
|
192
216
|
<label for="random_radio">
|
|
193
217
|
<img src='{% static "game/image/icons/random.svg" %}'>
|
|
194
|
-
<span>
|
|
218
|
+
<span>Random</span>
|
|
219
|
+
</label>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<div id="description_tab" class="tab selectable">
|
|
223
|
+
<input type="radio" name="tabs" id="description_radio">
|
|
224
|
+
<label for="description_radio">
|
|
225
|
+
<img src='{% static "game/image/icons/description.svg" %}'>
|
|
226
|
+
<span>Description</span>
|
|
227
|
+
</label>
|
|
228
|
+
</div>
|
|
229
|
+
|
|
230
|
+
<div id="hint_tab" class="tab selectable">
|
|
231
|
+
<input type="radio" name="tabs" id="hint_radio">
|
|
232
|
+
<label for="hint_radio">
|
|
233
|
+
<img src='{% static "game/image/icons/hint.svg" %}'>
|
|
234
|
+
<span>Hint</span>
|
|
195
235
|
</label>
|
|
196
236
|
</div>
|
|
197
237
|
|
|
@@ -201,7 +241,7 @@
|
|
|
201
241
|
<input type="radio" name="tabs" id="load_radio">
|
|
202
242
|
<label for="load_radio">
|
|
203
243
|
<img src='{% static "game/image/icons/load.svg" %}'>
|
|
204
|
-
<span>
|
|
244
|
+
<span>Load</span>
|
|
205
245
|
</label>
|
|
206
246
|
</div>
|
|
207
247
|
|
|
@@ -209,33 +249,33 @@
|
|
|
209
249
|
<input type="radio" name="tabs" id="save_radio">
|
|
210
250
|
<label for="save_radio">
|
|
211
251
|
<img src='{% static "game/image/icons/save.svg" %}'>
|
|
212
|
-
<span>
|
|
252
|
+
<span>Save</span>
|
|
213
253
|
</label>
|
|
214
254
|
</div>
|
|
215
255
|
|
|
216
|
-
<div id="share_tab"
|
|
256
|
+
<div id="share_tab" class="tab selectable">
|
|
217
257
|
<input type="radio" name="tabs" id="share_radio">
|
|
218
258
|
<label for="share_radio">
|
|
219
259
|
<img src='{% static "game/image/icons/share.svg" %}'>
|
|
220
|
-
<span>
|
|
260
|
+
<span>Share</span>
|
|
221
261
|
</label>
|
|
222
262
|
</div>
|
|
223
263
|
|
|
224
264
|
<div class="tab_break"></div>
|
|
225
265
|
|
|
226
|
-
<div id="help_tab"
|
|
266
|
+
<div id="help_tab" class="tab selectable">
|
|
227
267
|
<input type="radio" name="tabs" id="help_radio">
|
|
228
268
|
<label for="help_radio">
|
|
229
269
|
<img src='{% static "game/image/icons/help.svg" %}'>
|
|
230
|
-
<span>
|
|
270
|
+
<span>Help</span>
|
|
231
271
|
</label>
|
|
232
272
|
</div>
|
|
233
273
|
|
|
234
|
-
<div id="quit_tab"
|
|
274
|
+
<div id="quit_tab" class="tab">
|
|
235
275
|
<input type="radio" name="tabs" id="quit_radio">
|
|
236
276
|
<label for="quit_radio">
|
|
237
277
|
<img src='{% static "game/image/icons/quit.svg" %}'>
|
|
238
|
-
<span>
|
|
278
|
+
<span>Quit</span>
|
|
239
279
|
</label>
|
|
240
280
|
</div>
|
|
241
281
|
|
|
@@ -244,51 +284,57 @@
|
|
|
244
284
|
<div id='tab_panes_wrapper'>
|
|
245
285
|
<div id="tab_panes">
|
|
246
286
|
<div id="map_pane" class="tab_pane">
|
|
247
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/map.svg" %}'>
|
|
248
|
-
|
|
287
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/map.svg" %}'>Map
|
|
288
|
+
</h2>
|
|
289
|
+
<p>Here you can design your level! What sort of road will you make?</p>
|
|
249
290
|
|
|
250
291
|
<div class="tab_pane_content_holder">
|
|
251
292
|
<div class="tab_pane_content">
|
|
252
|
-
|
|
253
|
-
<span>{% trans "Max fuel:" %}</span>
|
|
254
|
-
<input type="number" id="max_fuel">
|
|
255
|
-
</div>
|
|
293
|
+
|
|
256
294
|
<br style="clear:both">
|
|
257
295
|
|
|
258
296
|
<div class="table">
|
|
259
297
|
<div class="table_row">
|
|
260
298
|
<div class="table_cell">
|
|
261
299
|
<button class="mode_panel navigation_button" id="add_road">
|
|
262
|
-
<img src="{% static "game/image/icons/add_road.svg" %}"/>
|
|
263
|
-
<span
|
|
300
|
+
<img src="{% static "game/image/icons/add_road.svg" %}" />
|
|
301
|
+
<span style="font-size: 14px;">Add road</span>
|
|
264
302
|
</button>
|
|
265
303
|
</div>
|
|
266
304
|
<div class="table_cell">
|
|
267
305
|
<button class="mode_panel navigation_button" id="delete_road">
|
|
268
|
-
<img src="{% static "game/image/icons/delete_road.svg" %}"/>
|
|
269
|
-
<span
|
|
306
|
+
<img src="{% static "game/image/icons/delete_road.svg" %}" />
|
|
307
|
+
<span style="font-size: 14px;">Delete road</span>
|
|
270
308
|
</button>
|
|
271
309
|
</div>
|
|
272
310
|
</div>
|
|
273
311
|
<div class="table_row">
|
|
274
312
|
<div class="table_cell">
|
|
275
|
-
<button class="mode_panel navigation_button" id="
|
|
276
|
-
<img src="{% static "game/image/icons/
|
|
277
|
-
<span
|
|
313
|
+
<button class="mode_panel navigation_button" id="add_house">
|
|
314
|
+
<img src="{% static "game/image/icons/add_house.svg" %}" />
|
|
315
|
+
<span style="font-size: 14px;">Add house</span>
|
|
316
|
+
</button>
|
|
317
|
+
</div>
|
|
318
|
+
<div class="table_cell">
|
|
319
|
+
<button class="mode_panel navigation_button" id="delete_house">
|
|
320
|
+
<img src="{% static "game/image/icons/delete_house.svg" %}" />
|
|
321
|
+
<span style="font-size: 14px;">Delete house</span>
|
|
278
322
|
</button>
|
|
279
323
|
</div>
|
|
324
|
+
</div>
|
|
325
|
+
<div class="table_row">
|
|
280
326
|
<div class="table_cell">
|
|
281
|
-
<button class="mode_panel navigation_button" id="
|
|
282
|
-
<img src="{% static "game/image/icons/
|
|
283
|
-
<span
|
|
327
|
+
<button class="mode_panel navigation_button" id="start">
|
|
328
|
+
<img src="{% static "game/image/icons/origin.svg" %}" />
|
|
329
|
+
<span style="font-size: 14px;">Mark start</span>
|
|
284
330
|
</button>
|
|
285
331
|
</div>
|
|
286
332
|
</div>
|
|
287
333
|
</div>
|
|
288
334
|
|
|
289
335
|
<button class="navigation_button long_button" id="clear">
|
|
290
|
-
<img src="{% static "game/image/icons/clear.svg" %}"/>
|
|
291
|
-
<span>
|
|
336
|
+
<img src="{% static "game/image/icons/clear.svg" %}" />
|
|
337
|
+
<span>Clear all</span>
|
|
292
338
|
</button>
|
|
293
339
|
|
|
294
340
|
{% if user|is_developer %}
|
|
@@ -301,15 +347,15 @@
|
|
|
301
347
|
</div>
|
|
302
348
|
|
|
303
349
|
<div id="scenery_pane" class="tab_pane">
|
|
304
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/decor.svg" %}'>
|
|
305
|
-
<p>
|
|
350
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/decor.svg" %}'>Scenery</h2>
|
|
351
|
+
<p>Here you can liven up your level by choosing the theme and adding scenery! Will you create beautiful countryside or a bustling city?</p>
|
|
306
352
|
<div class="tab_pane_content_holder">
|
|
307
353
|
<div class="tab_pane_content">
|
|
308
354
|
|
|
309
355
|
<table>
|
|
310
356
|
<tbody>
|
|
311
357
|
<tr>
|
|
312
|
-
<td>
|
|
358
|
+
<td>Theme:</td>
|
|
313
359
|
<td colspan=2>
|
|
314
360
|
<select id="theme_select">
|
|
315
361
|
{% for theme in themes %}
|
|
@@ -319,60 +365,44 @@
|
|
|
319
365
|
</td>
|
|
320
366
|
</tr>
|
|
321
367
|
<tr>
|
|
322
|
-
<td>
|
|
323
|
-
<td
|
|
324
|
-
|
|
368
|
+
<td>Scenery:</td>
|
|
369
|
+
<td>
|
|
370
|
+
<div class="decor_div"><img id="tree1" class="decor_button" src="{{tree1.url}}" width="70">
|
|
371
|
+
</td>
|
|
372
|
+
<td>
|
|
373
|
+
<div class="decor_div"><img id="tree2" class="decor_button" src="{{tree2.url}}" width="70">
|
|
374
|
+
</div>
|
|
375
|
+
</td>
|
|
325
376
|
</tr>
|
|
326
377
|
<tr>
|
|
327
378
|
<td></td>
|
|
328
|
-
<td
|
|
329
|
-
|
|
379
|
+
<td>
|
|
380
|
+
<div class="decor_div"><img id="bush" class="decor_button" src="{{bush.url}}" width="50"></div>
|
|
381
|
+
</td>
|
|
382
|
+
<td>
|
|
383
|
+
<div class="decor_div"><img id="pond" class="decor_button" src="{{pond.url}}" width="100"></div>
|
|
384
|
+
</td>
|
|
330
385
|
</tr>
|
|
331
386
|
<tr>
|
|
332
|
-
<td
|
|
333
|
-
<td
|
|
334
|
-
<
|
|
387
|
+
<td></td>
|
|
388
|
+
<td>
|
|
389
|
+
<div class="decor_div"><img id="solar_panel" class="decor_button" src="{{solar_panel.url}}"
|
|
390
|
+
width="70" alt="solar panel"></div>
|
|
391
|
+
</td>
|
|
392
|
+
<td></td>
|
|
335
393
|
</tr>
|
|
336
|
-
{% if cow_level_enabled %}
|
|
337
394
|
<tr>
|
|
338
|
-
<td>
|
|
339
|
-
<td><img id="
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
<img id="advanced_cow_options_button_icon" src="/static/game/image/icons/show.svg"/>
|
|
343
|
-
{% trans "Advanced" %}
|
|
344
|
-
</button>
|
|
395
|
+
<td>Traffic lights:</td>
|
|
396
|
+
<td><img id="trafficLightRed" src="{% static 'game/image/trafficLight_red.svg' %}" width="80">
|
|
397
|
+
</td>
|
|
398
|
+
<td><img id="trafficLightGreen" src="{% static 'game/image/trafficLight_green.svg' %}" width="80">
|
|
345
399
|
</td>
|
|
346
400
|
</tr>
|
|
401
|
+
{% if cow_level_enabled %}
|
|
347
402
|
<tr>
|
|
348
|
-
<td
|
|
349
|
-
<td
|
|
350
|
-
|
|
351
|
-
<h3 id="cow_advanced_options_title">{% trans "Advanced options" %}</h3>
|
|
352
|
-
<div id="cow_group_div">
|
|
353
|
-
<!--<h4>Group:</h4>-->
|
|
354
|
-
<div id="cow_group_buttons">
|
|
355
|
-
<button class="mode_panel navigation_button" id="remove_cow_group_button">
|
|
356
|
-
<img src="/static/game/image/icons/clear.svg"/>
|
|
357
|
-
</button>
|
|
358
|
-
<button class="mode_panel navigation_button" id="add_cow_group_button">
|
|
359
|
-
<img src="/static/game/image/icons/add.svg"/>
|
|
360
|
-
</button>
|
|
361
|
-
</div>
|
|
362
|
-
<div id="cow_group_select_div">
|
|
363
|
-
<select id="cow_group_select"></select>
|
|
364
|
-
</div>
|
|
365
|
-
<div id="cow_type_select_div">
|
|
366
|
-
<select id="cow_type_select"></select>
|
|
367
|
-
</div>
|
|
368
|
-
<div style="clear: both;"></div>
|
|
369
|
-
<h4>{% trans "How many cows should appear for this group?" %}</h4>
|
|
370
|
-
<div id="min_max_cow_div">
|
|
371
|
-
<label for="min_cows_spinner">{% trans "Min:" %}</label><input name="Min" class="spinner" id="min_cows_spinner" readonly>
|
|
372
|
-
<label for="max_cows_spinner">{% trans "Max:" %}</label><input name="Max" class="spinner" id="max_cows_spinner" readonly>
|
|
373
|
-
</div>
|
|
374
|
-
</div>
|
|
375
|
-
</div>
|
|
403
|
+
<td id="animals_label">Cows:</td>
|
|
404
|
+
<td><img id="cow" src="/static/game/image/Clarice.svg" width="80"></td>
|
|
405
|
+
<td>
|
|
376
406
|
</td>
|
|
377
407
|
</tr>
|
|
378
408
|
{% endif %}
|
|
@@ -386,15 +416,19 @@
|
|
|
386
416
|
</div>
|
|
387
417
|
|
|
388
418
|
<div id="character_pane" class="tab_pane">
|
|
389
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/character.svg" %}'>
|
|
390
|
-
<p>
|
|
419
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/character.svg" %}'>Character</h2>
|
|
420
|
+
<p>Here you can choose your character. Who will you play as?</p>
|
|
391
421
|
<div class="tab_pane_content_holder">
|
|
392
422
|
<div class="tab_pane_content">
|
|
393
|
-
<
|
|
423
|
+
<div class="input_div">
|
|
424
|
+
<span id="max_resource_label"></span>
|
|
425
|
+
<input type="number" id="max_fuel">
|
|
426
|
+
</div>
|
|
427
|
+
<p>Character:
|
|
394
428
|
<select id="character_select">
|
|
395
|
-
|
|
429
|
+
{% for char in characters %}
|
|
396
430
|
<option value='{{char.id}}'> {{char.name}} </option>
|
|
397
|
-
|
|
431
|
+
{% endfor %}
|
|
398
432
|
</select>
|
|
399
433
|
</p>
|
|
400
434
|
<img id="character_image" src="">
|
|
@@ -403,19 +437,19 @@
|
|
|
403
437
|
</div>
|
|
404
438
|
|
|
405
439
|
<div id="blocks_pane" class="tab_pane">
|
|
406
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/blockly.svg" %}'>
|
|
407
|
-
<p>
|
|
440
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/blockly.svg" %}'>Code</h2>
|
|
441
|
+
<p>Here you can select the code you can use while playing your new level! </p>
|
|
408
442
|
<div class="tab_pane_content_holder">
|
|
409
443
|
<div class="tab_pane_content">
|
|
410
444
|
<div id="block_table">
|
|
411
445
|
|
|
412
446
|
<div id="language_div" class="input_div">
|
|
413
|
-
<span>
|
|
447
|
+
<span>Language:</span>
|
|
414
448
|
<select id="language_select">
|
|
415
|
-
<option value="blockly">
|
|
416
|
-
<option value="blocklyWithPythonView">
|
|
417
|
-
<option value="python">
|
|
418
|
-
<option value="both">
|
|
449
|
+
<option value="blockly">Blockly</option>
|
|
450
|
+
<option value="blocklyWithPythonView">Blockly With Python View</option>
|
|
451
|
+
<option value="python">Python</option>
|
|
452
|
+
<option value="both">Both</option>
|
|
419
453
|
</select>
|
|
420
454
|
</div>
|
|
421
455
|
|
|
@@ -425,29 +459,29 @@
|
|
|
425
459
|
<input type="checkbox" id="select_all_checkbox" class="block_checkbox">
|
|
426
460
|
</div>
|
|
427
461
|
<div>
|
|
428
|
-
<label id="select_all_label" for="select_all_checkbox">
|
|
462
|
+
<label id="select_all_label" for="select_all_checkbox">Select all</label>
|
|
429
463
|
</div>
|
|
430
464
|
</div>
|
|
431
465
|
|
|
432
466
|
{% for block in blocks %}
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
</div>
|
|
437
|
-
<div id="{{block}}_image" class="table_cell unselectable"></div>
|
|
438
|
-
<select id="{{block}}_number" class="block_number" class="table_cell unselectable">
|
|
439
|
-
<option value="infinity">∞</option>
|
|
440
|
-
<option value="1">1</option>
|
|
441
|
-
<option value="2">2</option>
|
|
442
|
-
<option value="3">3</option>
|
|
443
|
-
<option value="4">4</option>
|
|
444
|
-
<option value="5">5</option>
|
|
445
|
-
<option value="6">6</option>
|
|
446
|
-
<option value="7">7</option>
|
|
447
|
-
<option value="8">8</option>
|
|
448
|
-
<option value="9">9</option>
|
|
449
|
-
</select>
|
|
467
|
+
<div class="table_row">
|
|
468
|
+
<div class="table_cell">
|
|
469
|
+
<input type="checkbox" id="{{block}}_checkbox" class="block_checkbox" unchecked>
|
|
450
470
|
</div>
|
|
471
|
+
<div id="{{block}}_image" class="table_cell unselectable"></div>
|
|
472
|
+
<select id="{{block}}_number" class="block_number" class="table_cell unselectable">
|
|
473
|
+
<option value="infinity">∞</option>
|
|
474
|
+
<option value="1">1</option>
|
|
475
|
+
<option value="2">2</option>
|
|
476
|
+
<option value="3">3</option>
|
|
477
|
+
<option value="4">4</option>
|
|
478
|
+
<option value="5">5</option>
|
|
479
|
+
<option value="6">6</option>
|
|
480
|
+
<option value="7">7</option>
|
|
481
|
+
<option value="8">8</option>
|
|
482
|
+
<option value="9">9</option>
|
|
483
|
+
</select>
|
|
484
|
+
</div>
|
|
451
485
|
{% endfor %}
|
|
452
486
|
</div>
|
|
453
487
|
</div>
|
|
@@ -456,70 +490,113 @@
|
|
|
456
490
|
</div>
|
|
457
491
|
|
|
458
492
|
<div id="random_pane" class="tab_pane">
|
|
459
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/random.svg" %}'>
|
|
460
|
-
<p>
|
|
493
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/random.svg" %}'>Random</h2>
|
|
494
|
+
<p>Here you can generate a random map. Try changing some of the parameters below and see what you get!</p>
|
|
461
495
|
<div class="tab_pane_content_holder">
|
|
462
496
|
<div class="tab_pane_content">
|
|
463
497
|
<div class="table">
|
|
464
498
|
<div class="table_row">
|
|
465
|
-
<div class="table_cell field_label"
|
|
466
|
-
|
|
499
|
+
<div class="table_cell field_label">
|
|
500
|
+
<p>Size:</p>
|
|
501
|
+
</div>
|
|
502
|
+
<div class="table_cell field_value"><input type="number" id="size" value="20" size="4" min="2"
|
|
503
|
+
max="40"></div>
|
|
467
504
|
</div>
|
|
468
505
|
<div class="table_row">
|
|
469
|
-
<div class="table_cell field_label"
|
|
470
|
-
|
|
506
|
+
<div class="table_cell field_label">
|
|
507
|
+
<p>Branchiness:</p>
|
|
508
|
+
</div>
|
|
509
|
+
<div class="table_cell field_value"><input type="number" id="branchiness" value="1" size="4" min="0"
|
|
510
|
+
max="10"></div>
|
|
471
511
|
</div>
|
|
472
512
|
<div class="table_row">
|
|
473
|
-
<div class="table_cell field_label"
|
|
474
|
-
|
|
513
|
+
<div class="table_cell field_label">
|
|
514
|
+
<p>Loopiness:</p>
|
|
515
|
+
</div>
|
|
516
|
+
<div class="table_cell field_value"><input type="number" id="loopiness" value="1" size="4" min="0"
|
|
517
|
+
max="10"></div>
|
|
475
518
|
</div>
|
|
476
519
|
<div class="table_row">
|
|
477
|
-
<div class="table_cell field_label"
|
|
478
|
-
|
|
520
|
+
<div class="table_cell field_label">
|
|
521
|
+
<p>Curviness:</p>
|
|
522
|
+
</div>
|
|
523
|
+
<div class="table_cell field_value"><input type="number" id="curviness" value="5" size="4" min="0"
|
|
524
|
+
max="10"></div>
|
|
479
525
|
</div>
|
|
480
526
|
<div class="table_row">
|
|
481
|
-
<div class="table_cell field_label"
|
|
527
|
+
<div class="table_cell field_label">
|
|
528
|
+
<p>Traffic Lights:</p>
|
|
529
|
+
</div>
|
|
482
530
|
<div class="table_cell field_value">
|
|
483
531
|
<select id="trafficLightsEnabled">
|
|
484
|
-
<option value="yes">
|
|
485
|
-
<option value="no" selected>
|
|
532
|
+
<option value="yes">Yes</option>
|
|
533
|
+
<option value="no" selected>No</option>
|
|
486
534
|
</select>
|
|
487
535
|
</div>
|
|
488
536
|
</div>
|
|
489
537
|
<div class="table_row">
|
|
490
|
-
<div class="table_cell field_label"
|
|
538
|
+
<div class="table_cell field_label">
|
|
539
|
+
<p>Scenery:</p>
|
|
540
|
+
</div>
|
|
491
541
|
<div class="table_cell field_value">
|
|
492
542
|
<select id="sceneryEnabled">
|
|
493
|
-
<option value="yes">
|
|
494
|
-
<option value="no" selected>
|
|
543
|
+
<option value="yes">Yes</option>
|
|
544
|
+
<option value="no" selected>No</option>
|
|
495
545
|
</select>
|
|
496
546
|
</div>
|
|
497
547
|
</div>
|
|
498
548
|
</div>
|
|
499
549
|
<button class="navigation_button long_button" id="generate">
|
|
500
|
-
<img src="{% static
|
|
501
|
-
<span>
|
|
550
|
+
<img src="{% static 'game/image/icons/random.svg' %}">
|
|
551
|
+
<span>Generate</span>
|
|
502
552
|
</button>
|
|
503
553
|
</div>
|
|
504
554
|
</div>
|
|
505
555
|
</div>
|
|
506
556
|
|
|
557
|
+
<div id="description_pane" class="tab_pane">
|
|
558
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/description.svg" %}'>Description</h2>
|
|
559
|
+
<p>Give this level a subtitle and a description of what to do within this level for your students.</p>
|
|
560
|
+
<p>Students will see this subtitle and description when <b>starting this level</b> so make sure they are <b>useful to the student</b>.</p>
|
|
561
|
+
<div class="tab_pane_content_holder">
|
|
562
|
+
<div class="tab_pane_content">
|
|
563
|
+
<p><b>Subtitle</b><br>What is the subtitle of this level?</p>
|
|
564
|
+
<textarea id="subtitle" rows="4" cols="50"></textarea>
|
|
565
|
+
|
|
566
|
+
<p><b>Description</b><br>What do players have to do to complete this level?</p>
|
|
567
|
+
<textarea id="description" rows="4" cols="50"></textarea>
|
|
568
|
+
</div>
|
|
569
|
+
</div>
|
|
570
|
+
</div>
|
|
571
|
+
|
|
572
|
+
<div id="hint_pane" class="tab_pane">
|
|
573
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/hint.svg" %}'>Hint</h2>
|
|
574
|
+
<p>Help out your players by adding hints! Players will have the option to view a hint when they have made an unsuccessful attempt.</p>
|
|
575
|
+
<p>Players can also access hints by clicking the hint button whilst playing.</p>
|
|
576
|
+
<div class="tab_pane_content_holder">
|
|
577
|
+
<div class="tab_pane_content">
|
|
578
|
+
<p><b>Hint</b></p>
|
|
579
|
+
<textarea id="hint" rows="4" cols="50"></textarea>
|
|
580
|
+
</div>
|
|
581
|
+
</div>
|
|
582
|
+
</div>
|
|
583
|
+
|
|
507
584
|
<div id="load_pane" class="tab_pane">
|
|
508
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/load.svg" %}'>
|
|
509
|
-
<p>
|
|
585
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/load.svg" %}'>Load</h2>
|
|
586
|
+
<p>Here you can load in levels created by you and your friends! Select a level in the table and press load.</p>
|
|
510
587
|
|
|
511
588
|
<div class="table_control_div">
|
|
512
589
|
|
|
513
590
|
<div id="does_not_exist">
|
|
514
|
-
<p>
|
|
591
|
+
<p>You don't have any levels to load yet. Try saving one!</p>
|
|
515
592
|
</div>
|
|
516
593
|
|
|
517
594
|
<div id="does_exist">
|
|
518
595
|
<p>
|
|
519
|
-
|
|
596
|
+
Load:
|
|
520
597
|
<select id="load_type_select">
|
|
521
|
-
<option value="ownLevels" selected>
|
|
522
|
-
<option value="sharedLevels">
|
|
598
|
+
<option value="ownLevels" selected>your own levels</option>
|
|
599
|
+
<option value="sharedLevels">shared levels</option>
|
|
523
600
|
</select>
|
|
524
601
|
</p>
|
|
525
602
|
|
|
@@ -527,8 +604,8 @@
|
|
|
527
604
|
<table width='100%' id="loadLevelTableHeader">
|
|
528
605
|
<thead>
|
|
529
606
|
<tr>
|
|
530
|
-
<th>
|
|
531
|
-
<th>
|
|
607
|
+
<th>Name</th>
|
|
608
|
+
<th>Owner</th>
|
|
532
609
|
</tr>
|
|
533
610
|
</thead>
|
|
534
611
|
</table>
|
|
@@ -545,29 +622,29 @@
|
|
|
545
622
|
|
|
546
623
|
<div>
|
|
547
624
|
<button class="navigation_button long_button" id="deleteLevel">
|
|
548
|
-
<img src="{% static "game/image/icons/clear.svg" %}">
|
|
549
|
-
<span>
|
|
625
|
+
<img src="{% static " game/image/icons/clear.svg" %}">
|
|
626
|
+
<span>Delete</span>
|
|
550
627
|
</button>
|
|
551
628
|
|
|
552
629
|
<button class="navigation_button long_button" id="loadLevel">
|
|
553
|
-
<img src="{% static "game/image/icons/load.svg" %}">
|
|
554
|
-
<span>
|
|
630
|
+
<img src="{% static " game/image/icons/load.svg" %}">
|
|
631
|
+
<span>Load</span>
|
|
555
632
|
</button>
|
|
556
633
|
</div>
|
|
557
634
|
</div>
|
|
558
635
|
|
|
559
636
|
<div id="save_pane" class="tab_pane">
|
|
560
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/save.svg" %}'>
|
|
561
|
-
<p>
|
|
562
|
-
<p>
|
|
637
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/save.svg" %}'>Save</h2>
|
|
638
|
+
<p>Here you can save your new level. Enter a name below and hit save. Alternatively click on an existing level to update it.</p>
|
|
639
|
+
<p>To play your level and be tracked, first <b>Quit</b> the Level Editor and select your level from the 'Levels created by you' section.</p>
|
|
563
640
|
|
|
564
641
|
<div class="table_control_div">
|
|
565
642
|
<div class="scrolling-table-wrapper">
|
|
566
643
|
<table width='100%' id="saveLevelTableHeader">
|
|
567
644
|
<thead>
|
|
568
645
|
<tr>
|
|
569
|
-
<th>
|
|
570
|
-
<th>
|
|
646
|
+
<th>Name</th>
|
|
647
|
+
<th>Owner</th>
|
|
571
648
|
</tr>
|
|
572
649
|
</thead>
|
|
573
650
|
</table>
|
|
@@ -579,48 +656,49 @@
|
|
|
579
656
|
</div>
|
|
580
657
|
<br style="clear:both">
|
|
581
658
|
<div>
|
|
582
|
-
<label>
|
|
659
|
+
<label>Name:</label>
|
|
583
660
|
<input type="text" id="levelNameInput">
|
|
584
661
|
</div>
|
|
585
662
|
</div>
|
|
586
663
|
<br>
|
|
587
664
|
<br>
|
|
588
665
|
<button class="navigation_button long_button" id="saveLevel">
|
|
589
|
-
<img src="{% static "game/image/icons/save.svg" %}">
|
|
590
|
-
<span>
|
|
666
|
+
<img src="{% static " game/image/icons/save.svg" %}">
|
|
667
|
+
<span>Save</span>
|
|
591
668
|
</button>
|
|
592
669
|
</div>
|
|
593
670
|
|
|
594
671
|
<div id="share_pane" class="tab_pane">
|
|
595
|
-
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/share.svg" %}'>
|
|
672
|
+
<h2 class="title"><img class="modal_image" src='{% static "game/image/icons/share.svg" %}'>Share</h2>
|
|
596
673
|
|
|
597
674
|
{% if user|get_user_status == 'TEACHER' %}
|
|
598
|
-
|
|
675
|
+
<p>Here you can share your level with your classes or your fellow teachers.</p>
|
|
676
|
+
<p><strong>Admin teachers can already see levels created by you.</strong></p>
|
|
599
677
|
{% elif user|get_user_status == 'SCHOOL_STUDENT' %}
|
|
600
|
-
|
|
678
|
+
<p>Here you can share your level with your classmates. Try clicking in the Shared column!</p>
|
|
601
679
|
{% endif %}
|
|
602
680
|
|
|
603
681
|
<div class="table_control_div">
|
|
604
682
|
{% if user|get_user_status == 'TEACHER' %}
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
683
|
+
<p>
|
|
684
|
+
Share with:
|
|
685
|
+
<select id="share_type_select">
|
|
686
|
+
<option value="classes" selected>Classes</option>
|
|
687
|
+
<option value="teachers">Teachers</option>
|
|
688
|
+
</select>
|
|
689
|
+
</p>
|
|
690
|
+
|
|
691
|
+
<p id="class_selection">
|
|
692
|
+
Class: <select id="class_select"></select>
|
|
693
|
+
</p>
|
|
616
694
|
{% endif %}
|
|
617
695
|
|
|
618
696
|
<div id="shared_levels" class="scrolling-table-wrapper">
|
|
619
697
|
<table width='100%' id="shareLevelTableHeader">
|
|
620
698
|
<thead>
|
|
621
699
|
<tr>
|
|
622
|
-
<th>
|
|
623
|
-
<th>
|
|
700
|
+
<th>Name</th>
|
|
701
|
+
<th>Shared</th>
|
|
624
702
|
</tr>
|
|
625
703
|
</thead>
|
|
626
704
|
</table>
|
|
@@ -633,8 +711,8 @@
|
|
|
633
711
|
</div>
|
|
634
712
|
|
|
635
713
|
<button class="navigation_button long_button" id="shareWithAll">
|
|
636
|
-
<img src="{% static
|
|
637
|
-
<span>
|
|
714
|
+
<img src="{% static 'game/image/icons/share.svg' %}">
|
|
715
|
+
<span>Share with all</span>
|
|
638
716
|
</button>
|
|
639
717
|
</div>
|
|
640
718
|
|
|
@@ -646,13 +724,13 @@
|
|
|
646
724
|
<div id="paper"></div>
|
|
647
725
|
|
|
648
726
|
<div id="trashcanHolder">
|
|
649
|
-
<img id="trashcanLidClosed" src="{% static
|
|
650
|
-
<img id="trashcanLidOpen" src="{% static
|
|
651
|
-
<img id="trashcan" src="{% static
|
|
727
|
+
<img id="trashcanLidClosed" src="{% static 'game/image/trashcan_lid_closed.svg' %}">
|
|
728
|
+
<img id="trashcanLidOpen" src="{% static 'game/image/trashcan_lid_open.svg' %}">
|
|
729
|
+
<img id="trashcan" src="{% static 'game/image/trashcan.svg' %}">
|
|
652
730
|
</div>
|
|
653
731
|
</div>
|
|
654
732
|
|
|
655
733
|
<div id="blockly"></div>
|
|
656
734
|
<xml id="blockly_toolbox"></xml>
|
|
657
735
|
|
|
658
|
-
{% endblock %}
|
|
736
|
+
{% endblock %}
|