Skip to content

Commit

Permalink
Merge branch 'feature/add-totk-support' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
Pysis868 committed May 12, 2023
2 parents 2fcf966 + e536470 commit c697231
Show file tree
Hide file tree
Showing 280 changed files with 76,886 additions and 16,410 deletions.
42 changes: 31 additions & 11 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,21 +1,41 @@
[WEB]
minify=true
enableTests=false
cacheFolderRootPath=/tmp

[DATABASE]
DBMS=mysql
DBHOST=localhost
DBPORT=
DBNAME=zeldamaps
DBUSER=
DBPASSWD=""
# Quotes at least around the password to allow for special characters.
DBNAME=tingle
DBUSER=tingle
PREFIX=

; For TCP/IP network-style connections
;DBHOST=127.0.0.1
;DBPORT=3306
; For Linux-style local filesystem socket connections
;DBHOST=localhost
;DBSOCKET=/var/lib/mysql/mysql.sock

; Quotes to allow special characters in values.
; Escape double-quote characters using a backslash.
DBPASSWD=""

[SECURITY]
LOST_PASSWORD_RANDOM_GENERATOR_STRENGTH=MEDIUM

[MAIL]
mailEnabled=false
server="smtp.server.com"
server=""
port=465
username="[email protected]"
username=""
password=""
replyToAddress="[email protected]"
replyToName="Zelda Maps"
lostPasswordSubject="Zelda Maps - Password Reset"
replyToAddress=""
replyToName="Tingle"
lostPasswordSubject="Tingle - Password Reset"
lostPasswordBodyTemplateFilePath="content/lostPasswordEmailBodyTemplate.txt"

[INTERNAL]
debugLoggingMode=errorLog
;debugLoggingMode=output
;debugLoggingMode=buffer
;debugLoggingMode=return
45 changes: 27 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,28 +1,37 @@
# User-specific runtime files
# Environment Files
.env
ZM_nginx.conf
dev/db/config.yml
## Environment Files
/.env
/dev/server/nginx/site.conf
/dev/db/config.yml
/dev/assets/tiles/**/*.png
/dev/assets/tiles/**/Trials

## Team Files
images/favicon.ico
images/apple-touch-icon-precomposed.png

# Cached Files / Runtime-updated Files
cache/*
!cache/index.html
/cache/*
!/cache/index.html

/css.ini
/javascript.ini

css.ini
javascript.ini
## OS Files
.DS_Store
Thumbs.db

# Downloaded dependencies
node_modules
tiles
vendor
/tiles
/vendor

# Debug Files
php_errors.log
phpinfo.php
/php_errors.log
/phpinfo.php

# Erroneous Files

# Part of the database migration framework we're using that could be useful, just not right now.
dev/db/schema.rb
*.sublime-workspace
.DS_Store
# Extra Files
## Part of the database migration framework we're using that could be useful, just not right now.
/dev/db/schema.rb
/dev/db/samples/tingle-*
*.sublime-workspace
15 changes: 14 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@

source "https://rubygems.org"

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# git_source(:github) {|repo_name| "https://github.com/#{repo_name}.git" }

# TODO: Unable to use updated fork+branch with default schema syntax error rm fix, so just install manually for now:
# Source: https://github.com/thuss/standalone-migrations/issues/169#issuecomment-1492516629
gem 'standalone_migrations'
# gem 'standalone-migrations', git: 'https://github.com/mlarraz/standalone-migrations', branch: 'rm_schema_default'
# gem 'standalone-migrations', github: 'mlarraz/standalone-migrations', branch: 'rm_schema_default'

# Still relevant as `mysql` is still out-dated/-moded by Ruby 2/4
# Source: https://stackoverflow.com/a/41521197/1091943
gem 'mysql2'

group :development do
gem 'pry-byebug'
# gem 'pry-byebug', require: true
end
111 changes: 61 additions & 50 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,76 +1,87 @@
GEM
remote: https://rubygems.org/
specs:
actionpack (5.2.2.1)
actionview (= 5.2.2.1)
activesupport (= 5.2.2.1)
rack (~> 2.0)
actionpack (7.0.4.3)
actionview (= 7.0.4.3)
activesupport (= 7.0.4.3)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.2.2.1)
activesupport (= 5.2.2.1)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (7.0.4.3)
activesupport (= 7.0.4.3)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activemodel (5.2.2.1)
activesupport (= 5.2.2.1)
activerecord (5.2.2.1)
activemodel (= 5.2.2.1)
activesupport (= 5.2.2.1)
arel (>= 9.0)
activesupport (5.2.2.1)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activemodel (7.0.4.3)
activesupport (= 7.0.4.3)
activerecord (7.0.4.3)
activemodel (= 7.0.4.3)
activesupport (= 7.0.4.3)
activesupport (7.0.4.3)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
arel (9.0.0)
builder (3.2.3)
concurrent-ruby (1.1.5)
crass (1.0.4)
erubi (1.8.0)
i18n (1.6.0)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
builder (3.2.4)
byebug (11.1.3)
coderay (1.1.3)
concurrent-ruby (1.2.2)
crass (1.0.6)
erubi (1.12.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
loofah (2.2.3)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (0.9.2)
mini_portile2 (2.4.0)
minitest (5.11.3)
mysql2 (0.5.2)
nokogiri (1.10.1)
mini_portile2 (~> 2.4.0)
rack (2.0.6)
rack-test (1.1.0)
rack (>= 1.0, < 3)
method_source (1.0.0)
mini_portile2 (2.8.1)
minitest (5.18.0)
mysql2 (0.5.5)
nokogiri (1.14.2)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
racc (1.6.2)
rack (2.2.6.4)
rack-test (2.1.0)
rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
railties (5.2.2.1)
actionpack (= 5.2.2.1)
activesupport (= 5.2.2.1)
rails-html-sanitizer (1.5.0)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4.3)
actionpack (= 7.0.4.3)
activesupport (= 7.0.4.3)
method_source
rake (>= 0.8.7)
thor (>= 0.19.0, < 2.0)
rake (12.3.2)
standalone_migrations (5.2.7)
activerecord (>= 4.2.7, < 5.3.0)
railties (>= 4.2.7, < 5.3.0)
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
standalone_migrations (7.1.0)
activerecord (>= 4.2.7, < 7.1.0, != 5.2.3.rc1, != 5.2.3)
railties (>= 4.2.7, < 7.1.0, != 5.2.3.rc1, != 5.2.3)
rake (>= 10.0)
thor (0.20.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
thor (1.2.1)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.6.7)

PLATFORMS
ruby

DEPENDENCIES
mysql2
pry
pry-byebug
standalone_migrations

BUNDLED WITH
2.0.1
2.2.25
21 changes: 21 additions & 0 deletions LICENSE-MIT
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 6 additions & 5 deletions README.md → Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@

Currently supports:
- The Legend of Zelda: Breath of the Wild for the Nintendo Switch and Wii U (March 3, 2017)
- The Legend of Zelda: Link's Awakening for the Nintendo Switch (September 20, 2019)

## Help Sections
- [Installation Instructions](https://github.com/Zelda-Universe/Zelda-Maps/blob/master/INSTALL.md)
- [Development Process](https://github.com/Zelda-Universe/Zelda-Maps/blob/master/DEVELOPMENT.md)
- [Team Contact Information](https://github.com/Zelda-Universe/Zelda-Maps/blob/master/CONTACT.md)
- [Installation Instructions](https://github.com/Zelda-Universe/Zelda-Maps/blob/master/Installation.md)
- [Development Process](https://github.com/Zelda-Universe/Zelda-Maps/blob/master/Development.md)
- [Team Contact Information](https://github.com/Zelda-Universe/Zelda-Maps/blob/master/Contact.md)

# Links
- [Main hosted site](http://zeldamaps.com)
- [Sponsor "Zelda Universe" site](https://zeldauniverse.net)
- [Original "Hyrule Legends" site](https://www.zelda.com.br/)
- [ZU Announcement Forum Thread](https://zeldauniverse.net/forums/Thread/183322-Zelda-Maps-A-site-with-a-map/)
- Games
+ BotW
+ Breath of the Wild
* [Mostly anecdotal game data breakdown](https://tcrf.net/The_Legend_of_Zelda:_Breath_of_the_Wild)
* [Relevant game mod - Fully Marked Map](https://gamebanana.com/gamefiles/8774)
* [Some mined game data](https://github.com/MrCheeze/botw-tools)
+ LA
+ Link's Awakening
* [Reverse engineered ROM file](https://github.com/zladx/LADX-Disassembly)

- Chat
Expand Down
15 changes: 11 additions & 4 deletions ajax.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
<?php
include_once(__DIR__.'/config.php');
include_once(__DIR__.'/lib/common/database.php');
include_once(__DIR__.'/lib/common/session.php');
open();

if(!isset($_GET["command"])) {
die(json_encode(array("success"=>false,"msg"=>"No command defined!")));
}
$cmd = $_GET["command"];
$cmd = preg_replace("#[^a-zA-Z_]#","",$cmd);
$path = DIRNAME(__FILE__);
$path = __DIR__;
$cmdpath = "$path/ajax/$cmd.php";
if(!file_exists($cmdpath)) {
die(json_encode(array("success"=>false,"code"=>-1,"msg"=>"Invalid command!")));
Expand All @@ -16,6 +21,8 @@
} catch(Exception $ex) {
print_r($ex);
$error=$ex;
// Source: https://stackoverflow.com/questions/3258634/php-how-to-send-http-response-code
// http_response_code(503); // Service Unavailable
}
$output = ob_get_clean();
$res = "$output";
Expand All @@ -30,7 +37,7 @@
$error=$ex;
}
}

if($error!==false) {
$data = array("success"=>false,"code"=>$error->getCode(),"msg"=>$error->getMessage(),"output"=>$res);
}
Expand All @@ -43,6 +50,6 @@

$out = json_encode($data,$flags);

header("Content-Type: application/json");
header("Content-Type: ".(isset($_GET['forcedMode'])?$_GET['forcedMode']:"application/json"));
header("Content-Length: ".strlen($out));
echo $out;
echo $out;
Loading

0 comments on commit c697231

Please sign in to comment.