Skip to content

Commit

Permalink
feat: add electric van (#1649)
Browse files Browse the repository at this point in the history
* add electric van

* add migration to include electric van
  • Loading branch information
evemartin authored Jun 18, 2024
1 parent 39a7957 commit d0fe4c3
Show file tree
Hide file tree
Showing 10 changed files with 3,163 additions and 1 deletion.
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.

0 comments on commit d0fe4c3

Please sign in to comment.