Skip to content

Commit

Permalink
Merge pull request #90 from frank9999/backports
Browse files Browse the repository at this point in the history
Add world generator and new map tiles
  • Loading branch information
frank9999 committed Aug 10, 2019
2 parents 2b66447 + 956b2ee commit 9fed889
Show file tree
Hide file tree
Showing 91 changed files with 1,440 additions and 16,819 deletions.
3 changes: 2 additions & 1 deletion composer.json
Expand Up @@ -20,7 +20,8 @@
"symfony/web-profiler-bundle": "^4.3",
"symfony/webpack-encore-bundle": "^1.4",
"symfony/yaml": "^4.3",
"twig/twig": "^2.10"
"twig/twig": "^2.10",
"ext-gd": "*"
},
"require-dev": {
"symfony/dotenv": "^4.3"
Expand Down
419 changes: 212 additions & 207 deletions composer.lock

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions config/doctrine/World.orm.yml
Expand Up @@ -23,9 +23,9 @@ FrankProjects\UltimateWarfare\Entity\World:
options:
fixed: false
image:
type: string
type: text
nullable: false
length: 100
length: 65535
options:
fixed: false
description:
Expand Down Expand Up @@ -79,6 +79,9 @@ FrankProjects\UltimateWarfare\Entity\World:
players:
targetEntity: Player
mappedBy: world
worldRegions:
targetEntity: WorldRegion
mappedBy: world
worldSectors:
targetEntity: WorldSector
mappedBy: world
Expand Down
21 changes: 6 additions & 15 deletions config/doctrine/WorldCountry.orm.yml
@@ -1,6 +1,9 @@
FrankProjects\UltimateWarfare\Entity\WorldCountry:
type: entity
table: world_country
uniqueConstraints:
unique_world_country:
columns: [ x, y, sector_id ]
id:
id:
type: integer
Expand All @@ -16,27 +19,15 @@ FrankProjects\UltimateWarfare\Entity\WorldCountry:
nullable: false
options:
unsigned: true
'y':
y:
type: integer
nullable: false
options:
unsigned: true
cX:
type: integer
nullable: false
options:
unsigned: true
column: c_x
cY:
type: integer
nullable: false
options:
unsigned: true
column: c_y
image:
type: string
type: text
nullable: false
length: 200
length: 65535
options:
fixed: false
oneToMany:
Expand Down
71 changes: 35 additions & 36 deletions config/doctrine/WorldRegion.orm.yml
Expand Up @@ -2,13 +2,18 @@ FrankProjects\UltimateWarfare\Entity\WorldRegion:
type: entity
table: world_region
indexes:
countryId:
worldxy:
columns:
- country_id
- world_id
- x
- y
regionInSector:
columns:
- sector_id
- player_id
uniqueConstraints:
unique_world_region:
columns: [ x, y, world_id ]
id:
id:
type: integer
Expand All @@ -19,34 +24,22 @@ FrankProjects\UltimateWarfare\Entity\WorldRegion:
generator:
strategy: IDENTITY
fields:
region:
type: integer
nullable: false
options:
unsigned: true
x:
type: integer
nullable: false
options:
unsigned: true
'y':
type: integer
nullable: false
options:
unsigned: true
rX:
y:
type: integer
nullable: false
options:
unsigned: true
column: r_x
rY:
z:
type: integer
nullable: false
options:
unsigned: true
column: r_y
image:
type:
type: string
nullable: false
length: 100
Expand All @@ -61,7 +54,7 @@ FrankProjects\UltimateWarfare\Entity\WorldRegion:
name:
type: string
nullable: true
length: 10
length: 32
options:
fixed: false
space:
Expand Down Expand Up @@ -90,22 +83,28 @@ FrankProjects\UltimateWarfare\Entity\WorldRegion:
targetEntity: Fleet
mappedBy: targetWorldRegion
manyToOne:
worldCountry:
targetEntity: WorldCountry
inversedBy: worldRegions
joinColumn:
name: country_id
referencedColumnName: id
worldSector:
targetEntity: WorldSector
inversedBy: worldRegions
joinColumn:
name: sector_id
referencedColumnName: id
player:
targetEntity: Player
inversedBy: worldRegions
joinColumn:
name: player_id
referencedColumnName: id
world:
targetEntity: World
inversedBy: worldRegions
joinColumn:
name: world_id
referencedColumnName: id
worldCountry:
targetEntity: WorldCountry
inversedBy: worldRegions
joinColumn:
name: country_id
referencedColumnName: id
worldSector:
targetEntity: WorldSector
inversedBy: worldRegions
joinColumn:
name: sector_id
referencedColumnName: id
player:
targetEntity: Player
inversedBy: worldRegions
joinColumn:
name: player_id
referencedColumnName: id
lifecycleCallbacks: { }
9 changes: 6 additions & 3 deletions config/doctrine/WorldSector.orm.yml
@@ -1,6 +1,9 @@
FrankProjects\UltimateWarfare\Entity\WorldSector:
type: entity
table: world_sector
uniqueConstraints:
unique_world_sector:
columns: [ x, y, world_id ]
id:
id:
type: integer
Expand All @@ -16,15 +19,15 @@ FrankProjects\UltimateWarfare\Entity\WorldSector:
nullable: false
options:
unsigned: true
'y':
y:
type: integer
nullable: false
options:
unsigned: true
image:
type: string
type: text
nullable: false
length: 200
length: 65535
options:
fixed: false
oneToMany:
Expand Down
12 changes: 12 additions & 0 deletions config/routes.yaml
Expand Up @@ -126,6 +126,18 @@ Admin/World/Create:
path: /admin/world/create
controller: FrankProjects\UltimateWarfare\Controller\Admin\WorldController::create

Admin/World/Generate:
path: /admin/world/generate/{worldId}
controller: FrankProjects\UltimateWarfare\Controller\Admin\WorldController::generate
requirements:
worldId: '\d+'

Admin/World/GenerateImages:
path: /admin/world/generate-images/{worldId}
controller: FrankProjects\UltimateWarfare\Controller\Admin\WorldController::generateImages
requirements:
worldId: '\d+'

Admin/World/List:
path: /admin/world/list
controller: FrankProjects\UltimateWarfare\Controller\Admin\WorldController::list
Expand Down
6 changes: 6 additions & 0 deletions public/css/main.css
Expand Up @@ -94,3 +94,9 @@ div.worldmaptext{
.bad {
color:#FF2200;
}

.table-world-generator td{
padding: 0;
border: 0;
line-height: 0.25;
}
Binary file added public/images/map/beach.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file removed public/images/map/map1.jpg
Binary file not shown.
Binary file removed public/images/map/map10.jpg
Binary file not shown.
Binary file removed public/images/map/map11.jpg
Binary file not shown.
Binary file removed public/images/map/map12.jpg
Binary file not shown.
Binary file removed public/images/map/map13.jpg
Binary file not shown.
Binary file removed public/images/map/map14.jpg
Binary file not shown.
Binary file removed public/images/map/map15.jpg
Binary file not shown.
Binary file removed public/images/map/map16.jpg
Binary file not shown.
Binary file removed public/images/map/map17.jpg
Binary file not shown.
Binary file removed public/images/map/map19.jpg
Binary file not shown.
Binary file removed public/images/map/map2.jpg
Binary file not shown.
Binary file removed public/images/map/map20.jpg
Binary file not shown.
Binary file removed public/images/map/map21.jpg
Binary file not shown.
Binary file removed public/images/map/map22.jpg
Binary file not shown.
Binary file removed public/images/map/map23.jpg
Binary file not shown.
Binary file removed public/images/map/map24.jpg
Binary file not shown.
Binary file removed public/images/map/map25.jpg
Binary file not shown.
Binary file removed public/images/map/map26.jpg
Binary file not shown.
Binary file removed public/images/map/map27.jpg
Binary file not shown.
Binary file removed public/images/map/map28.jpg
Binary file not shown.
Binary file removed public/images/map/map3.jpg
Binary file not shown.
Binary file removed public/images/map/map31.jpg
Binary file not shown.
Binary file removed public/images/map/map32.jpg
Binary file not shown.
Binary file removed public/images/map/map33.jpg
Diff not rendered.
Binary file removed public/images/map/map34.jpg
Diff not rendered.
Binary file removed public/images/map/map35.jpg
Diff not rendered.
Binary file removed public/images/map/map4.jpg
Diff not rendered.
Binary file removed public/images/map/map5.jpg
Diff not rendered.
Binary file removed public/images/map/map6.jpg
Diff not rendered.
Binary file removed public/images/map/map7.jpg
Diff not rendered.
Binary file removed public/images/map/map8.jpg
Diff not rendered.
Binary file removed public/images/map/map9.jpg
Diff not rendered.
File renamed without changes
Binary file removed public/images/world/game_type_1.jpg
Diff not rendered.
Binary file removed public/images/world/game_type_2.jpg
Diff not rendered.
2 changes: 0 additions & 2 deletions public/js/jquery-3.3.1.min.js

This file was deleted.

2 changes: 2 additions & 0 deletions public/js/jquery-3.4.1.min.js

Large diffs are not rendered by default.

0 comments on commit 9fed889

Please sign in to comment.