Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add electric van #1649

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions game/character.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,14 @@ def __init__(self, pk, name, en_face, top_down, width, height):
height="40",
width="40",
),
"Electric van": Character(
pk=7,
name="Electric van",
en_face="characters/front_view/Electric_van.svg",
top_down="characters/top_view/Electric_van.svg",
height="20",
width="40"
),
}


Expand Down
18 changes: 18 additions & 0 deletions game/migrations/0093_alter_level_character_name.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.25 on 2024-06-11 14:34

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('game', '0092_disable_algo_score_in_custom_levels'),
]

operations = [
migrations.AlterField(
model_name='level',
name='character_name',
field=models.CharField(blank=True, choices=[('Van', 'Van'), ('Dee', 'Dee'), ('Nigel', 'Nigel'), ('Kirsty', 'Kirsty'), ('Wes', 'Wes'), ('Phil', 'Phil'), ('Electric van', 'Electric van')], default=None, max_length=20, null=True),
),
]
448 changes: 448 additions & 0 deletions game/static/game/image/characters/front_view/Electric_van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
448 changes: 448 additions & 0 deletions game/static/game/image/characters/top_view/Electric_van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
448 changes: 448 additions & 0 deletions game/static/game/image/electric_van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion game/static/game/js/drawing.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ ocargo.Drawing = function (startingPosition) {

let path = ocargo.Drawing.raphaelImageDir + 'road_tiles/'

path += CHARACTER_NAME === 'Van' ? 'road/' : 'path/'
path += (CHARACTER_NAME === 'Van' || CHARACTER_NAME === "Electric van") ? 'road/' : 'path/'

roadImages = []
for (let i = 0; i < nodes.length; i++) {
Expand Down
448 changes: 448 additions & 0 deletions game/static/game/raphael_image/characters/top_view/Electric_van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
448 changes: 448 additions & 0 deletions holding_assets/origial_images/characters/front_view/Electric_Van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
448 changes: 448 additions & 0 deletions holding_assets/origial_images/characters/top_view/Electric_van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
448 changes: 448 additions & 0 deletions holding_assets/origial_images/electric_van.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading