diff --git a/SConstruct b/SConstruct index b48f3f5..e56a88c 100644 --- a/SConstruct +++ b/SConstruct @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright (c) 2019-2021 Péter Magyar +# Copyright (c) 2019-2020 Péter Magyar # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -40,6 +40,8 @@ module_folders = [ '../custom_modules', ] +databases=True + main_file = 'main.cpp' repository_index = 0 @@ -58,7 +60,7 @@ exports = { 'javascript': [], } -engine_repository = [ ['https://github.com/Relintai/rcpp_framework.git', 'git@github.com:Relintai/rcpp_framework.git'], 'engine', '' ] +engine_repository = [ ['https://github.com/Relintai/rcpp_cms.git', 'git@github.com:Relintai/rcpp_cms.git'], 'engine', '' ] module_repositories = [ ] @@ -336,6 +338,9 @@ if len(sys.argv) > 1: if 'v' in arg: build_string += 'vsproj=yes' + if databases: + build_string += " databases=yes " + build_string += 'folders="' for f in folders: @@ -344,14 +349,6 @@ if len(sys.argv) > 1: build_string += '" ' - build_string += 'module_folders="' - - for f in module_folders: - build_string += f - build_string += ';' - - build_string += '" ' - build_string += 'main_file="../' + main_file + '" ' for i in range(2, len(sys.argv)): diff --git a/app/mourne_application.cpp b/app/mourne_application.cpp new file mode 100644 index 0000000..a4d85a0 --- /dev/null +++ b/app/mourne_application.cpp @@ -0,0 +1,198 @@ +#include "mourne_application.h" + +#include "core/http/request.h" + +#include + +#include "core/file_cache.h" + +#include "core/http/handler_instance.h" + +#include "core/database/database_manager.h" + +#include "core/html/html_builder.h" +#include "core/http/http_session.h" +#include "core/http/session_manager.h" + +#include "modules/users/user.h" +#include "modules/users/user_controller.h" + +void MourneApplication::index(Object *instance, Request *request) { + add_menu(request, MENUENTRY_NEWS); + + //dynamic_cast(instance)->index(request); + request->body += "test"; + request->compile_and_send_body(); +} + +void MourneApplication::session_middleware_func(Object *instance, Request *request) { + std::cout << "test: session_middleware_func called" << std::endl; + + //if fail + //request->send(); in middleware + + request->next_stage(); +} + +void MourneApplication::add_menu(Request *request, const MenuEntries index) { + request->head += menu_head; + request->body += menu_strings[index]; + request->footer = footer; +} + +void MourneApplication::village_page_func(Object *instance, Request *request) { + add_menu(request, MENUENTRY_VILLAGE); + + //dynamic_cast(instance)->index(request); + request->body += "test"; + request->compile_and_send_body(); +} + +void MourneApplication::user_page_func(Object *instance, Request *request) { + add_menu(request, MENUENTRY_SETTINGS); + + UserController::get_singleton()->handle_request_default(request); +} + +void MourneApplication::setup_routes() { + DWebApplication::setup_routes(); + + index_func = HandlerInstance(index); + main_route_map["village"] = HandlerInstance(village_page_func); + main_route_map["user"] = HandlerInstance(user_page_func); +} + +void MourneApplication::setup_middleware() { + middlewares.push_back(HandlerInstance(::SessionManager::session_setup_middleware)); + middlewares.push_back(HandlerInstance(::UserController::user_session_setup_middleware)); + + DWebApplication::setup_middleware(); +} + +void MourneApplication::migrate() { +} + +void MourneApplication::compile_menu() { + + for (int i = 0; i < MENUENTRY_MAX; ++i) { + HTMLBuilder b; + + HTMLTag *t; + + b.div()->cls("content"); + { + + b.ul()->cls("menu"); + { + b.li(); + t = b.a()->href("/"); + + if (i == MENUENTRY_NEWS) { + t->cls("menu_active"); + } + + b.w("TSITE"); + b.ca(); + b.cli(); + + b.li(); + t = b.a()->href("/village/selected"); + + if (i == MENUENTRY_VILLAGE) { + t->cls("menu_active"); + } + + b.w("Projects"); + b.ca(); + b.cli(); + + b.li(); + { + t = b.a()->href("/village/select"); + + if (i == MENUENTRY_SELECT_VILLAGE) { + t->cls("menu_active"); + } + + b.w("Classes"); + b.ca(); + } + b.cli(); + + b.li(); + { + t = b.a()->href("/user/login"); + b.w("Login"); + b.ca(); + } + b.cli(); + + b.li(); + { + t = b.a()->href("/user/register"); + b.w("Register"); + b.ca(); + } + b.cli(); + + b.li(); + { + t = b.a()->href("/user/settings"); + b.w("Profile"); + b.ca(); + } + b.cli(); + + b.li(); + { + t = b.a()->href("/user/logout"); + b.w("Logout"); + b.ca(); + } + b.cli(); + } + b.cul(); + } + b.div()->cls("inner_content"); + b.write_tag(); + + menu_strings.push_back(b.result); + } + + HTMLBuilder bh; + + bh.meta()->charset_utf_8(); + + bh.link()->rel_stylesheet()->href("/css/main.css"); + bh.write_tag(); + + menu_head = bh.result; + + HTMLBuilder bf; + + bf.cdiv(); + bf.footer(); + bf.w("Powered by "); + bf.a()->href("https://github.com/Relintai/rcpp_cms"); + bf.w("rcpp cms"); + bf.ca(); + bf.w("."); + bf.cfooter(); + + bf.cdiv(); + + footer = bf.result; +} + +MourneApplication::MourneApplication() : + DWebApplication() { + + compile_menu(); +} + +MourneApplication::~MourneApplication() { +} + +std::vector MourneApplication::menu_strings; +std::string MourneApplication::menu_head = ""; +std::string MourneApplication::footer = ""; diff --git a/app/mourne_application.h b/app/mourne_application.h new file mode 100644 index 0000000..c473921 --- /dev/null +++ b/app/mourne_application.h @@ -0,0 +1,56 @@ +#ifndef RDN_APPLICATION_H +#define RDN_APPLICATION_H + +//#include "core/http/web_application.h" +#include "core/object.h" +#include "modules/drogon/web_application.h" + +#include "modules/list_page/list_page.h" +#include "modules/message_page/message_page.h" +#include "modules/paged_article/paged_article.h" +#include "modules/paged_list/paged_list.h" + +class MourneApplication : public DWebApplication { +public: + enum MenuEntries { + MENUENTRY_NEWS = 0, + MENUENTRY_MAIL, + MENUENTRY_HERO, + MENUENTRY_VILLAGE, + MENUENTRY_SELECT_VILLAGE, + MENUENTRY_ALLIANCE, + MENUENTRY_ALLIANCE_MENU, + MENUENTRY_FORUM, + MENUENTRY_CHANGELOG, + MENUENTRY_SETTINGS, + MENUENTRY_LOGOUT, + + MENUENTRY_MAX, + }; + +public: + static void index(Object *instance, Request *request); + + static void session_middleware_func(Object *instance, Request *request); + + static void add_menu(Request *request, const MenuEntries index); + + static void village_page_func(Object *instance, Request *request); + static void user_page_func(Object *instance, Request *request); + + virtual void setup_routes(); + virtual void setup_middleware(); + + virtual void migrate(); + + void compile_menu(); + + MourneApplication(); + ~MourneApplication(); + + static std::vector menu_strings; + static std::string menu_head; + static std::string footer; +}; + +#endif \ No newline at end of file diff --git a/main.cpp b/main.cpp index dcb2492..6539054 100644 --- a/main.cpp +++ b/main.cpp @@ -2,48 +2,47 @@ #include #include -#include "core/http/web_application.h" -#include "core/file_cache.h" #include "core/bry_http/http_server.h" +#include "core/file_cache.h" +#include "core/http/web_application.h" -#include "core/database/database_manager.h" +#include "app/mourne_application.h" #include "database/db_init.h" #include "core/settings.h" -#define MAIN_CLASS ICApplication +#include "core/http/session_manager.h" + +#define MAIN_CLASS MourneApplication + +#include "modules/drogon/web_application.h" + +//Backends +#include "backends/hash_hashlib/setup.h" + +#include "modules/users/user.h" +#include "modules/users/user_controller.h" +#include "modules/users/user_model.h" + +#include "core/database/database_manager.h" + +void initialize_backends() { + initialize_database_backends(); + backend_hash_hashlib_install_providers(); +} void create_databases() { - - //Settings *settings = Settings::get_singleton(); - - //if (!settings) { - // printf("create_databases: Settings singleton is null!"); - // return; - //} - - /* - rapidjson::Value dbs = settings->settings["databases"]; - - if (!dbs.IsArray()) { - printf("create_databases: dbs !dbs.IsArray()!"); - return; - } -*/ - DatabaseManager *dbm = DatabaseManager::get_singleton(); - //uint32_t index = dbm->create_database("mysql"); - //Database *db = dbm->databases[0]; - //db->connect(""); - uint32_t index = dbm->create_database("sqlite"); Database *db = dbm->databases[index]; db->connect("database.sqlite"); } int main(int argc, char **argv) { + initialize_backends(); + bool migrate = false; for (int i = 1; i < argc; ++i) { @@ -54,46 +53,54 @@ int main(int argc, char **argv) { } } - initialize_database_backends(); + ::SessionManager *session_manager = new ::SessionManager(); + + //todo init these in the module automatically + UserController *user_controller = new UserController(); + UserModel *user_model = new UserModel(); + //user_manager->set_path("./users/"); Settings *settings = new Settings(true); - settings->parse_file("settings.json"); FileCache *file_cache = new FileCache(true); - file_cache->wwwroot = "./content/www"; + file_cache->wwwroot = "./www"; file_cache->wwwroot_refresh_cache(); DatabaseManager *dbm = new DatabaseManager(); create_databases(); - WebApplication *app = new MAIN_CLASS(); + DWebApplication *app = new MAIN_CLASS(); + + session_manager->load_sessions(); app->load_settings(); app->setup_routes(); app->setup_middleware(); - HTTPServer *server = new HTTPServer(); - server->application = app; - - server->port = 8080; - server->initialize(); + app->add_listener("127.0.0.1", 8080); + LOG_INFO << "Server running on 127.0.0.1:8080"; if (!migrate) { printf("Initialized!\n"); - - server->main_loop(); + app->run(); } else { printf("Running migrations.\n"); + + session_manager->migrate(); + user_model->migrate(); + app->migrate(); } - delete server; delete app; delete dbm; delete file_cache; delete settings; + delete user_controller; + delete user_model; + delete session_manager; return 0; } \ No newline at end of file diff --git a/Mourne-CI/css/admin.css b/www/css/admin.css similarity index 100% rename from Mourne-CI/css/admin.css rename to www/css/admin.css diff --git a/Mourne-CI/css/base.css b/www/css/base.css similarity index 100% rename from Mourne-CI/css/base.css rename to www/css/base.css diff --git a/Mourne-CI/css/hero.css b/www/css/hero.css similarity index 100% rename from Mourne-CI/css/hero.css rename to www/css/hero.css diff --git a/Mourne-CI/css/index.html b/www/css/index.html similarity index 100% rename from Mourne-CI/css/index.html rename to www/css/index.html diff --git a/Mourne-CI/css/mail.css b/www/css/mail.css similarity index 100% rename from Mourne-CI/css/mail.css rename to www/css/mail.css diff --git a/Mourne-CI/css/menu.css b/www/css/menu.css similarity index 100% rename from Mourne-CI/css/menu.css rename to www/css/menu.css diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png b/www/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png rename to www/css/ui-darkness/images/ui-bg_flat_30_cccccc_40x100.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png b/www/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png rename to www/css/ui-darkness/images/ui-bg_flat_50_5c5c5c_40x100.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png b/www/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png rename to www/css/ui-darkness/images/ui-bg_glass_20_555555_1x400.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png b/www/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png rename to www/css/ui-darkness/images/ui-bg_glass_40_0078a3_1x400.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png b/www/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png rename to www/css/ui-darkness/images/ui-bg_glass_40_ffc73d_1x400.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png b/www/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png rename to www/css/ui-darkness/images/ui-bg_gloss-wave_25_333333_500x100.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png b/www/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png rename to www/css/ui-darkness/images/ui-bg_highlight-soft_80_eeeeee_1x100.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png b/www/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png rename to www/css/ui-darkness/images/ui-bg_inset-soft_25_000000_1x100.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png b/www/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png rename to www/css/ui-darkness/images/ui-bg_inset-soft_30_f58400_1x100.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-icons_222222_256x240.png b/www/css/ui-darkness/images/ui-icons_222222_256x240.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-icons_222222_256x240.png rename to www/css/ui-darkness/images/ui-icons_222222_256x240.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png b/www/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png rename to www/css/ui-darkness/images/ui-icons_4b8e0b_256x240.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-icons_a83300_256x240.png b/www/css/ui-darkness/images/ui-icons_a83300_256x240.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-icons_a83300_256x240.png rename to www/css/ui-darkness/images/ui-icons_a83300_256x240.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-icons_cccccc_256x240.png b/www/css/ui-darkness/images/ui-icons_cccccc_256x240.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-icons_cccccc_256x240.png rename to www/css/ui-darkness/images/ui-icons_cccccc_256x240.png diff --git a/Mourne-CI/css/ui-darkness/images/ui-icons_ffffff_256x240.png b/www/css/ui-darkness/images/ui-icons_ffffff_256x240.png similarity index 100% rename from Mourne-CI/css/ui-darkness/images/ui-icons_ffffff_256x240.png rename to www/css/ui-darkness/images/ui-icons_ffffff_256x240.png diff --git a/Mourne-CI/css/ui-darkness/jquery-ui-1.10.0.custom.css b/www/css/ui-darkness/jquery-ui-1.10.0.custom.css similarity index 100% rename from Mourne-CI/css/ui-darkness/jquery-ui-1.10.0.custom.css rename to www/css/ui-darkness/jquery-ui-1.10.0.custom.css diff --git a/Mourne-CI/css/ui-darkness/jquery-ui-1.10.0.custom.min.css b/www/css/ui-darkness/jquery-ui-1.10.0.custom.min.css similarity index 100% rename from Mourne-CI/css/ui-darkness/jquery-ui-1.10.0.custom.min.css rename to www/css/ui-darkness/jquery-ui-1.10.0.custom.min.css diff --git a/Mourne-CI/css/village.css b/www/css/village.css similarity index 100% rename from Mourne-CI/css/village.css rename to www/css/village.css diff --git a/Mourne-CI/img/buildings/art/cornfield1.png b/www/img/buildings/art/cornfield1.png similarity index 100% rename from Mourne-CI/img/buildings/art/cornfield1.png rename to www/img/buildings/art/cornfield1.png diff --git a/Mourne-CI/img/buildings/art/empty.png b/www/img/buildings/art/empty.png similarity index 100% rename from Mourne-CI/img/buildings/art/empty.png rename to www/img/buildings/art/empty.png diff --git a/Mourne-CI/img/buildings/art/index.html b/www/img/buildings/art/index.html similarity index 100% rename from Mourne-CI/img/buildings/art/index.html rename to www/img/buildings/art/index.html diff --git a/Mourne-CI/img/buildings/art/ironmine1.png b/www/img/buildings/art/ironmine1.png similarity index 100% rename from Mourne-CI/img/buildings/art/ironmine1.png rename to www/img/buildings/art/ironmine1.png diff --git a/Mourne-CI/img/buildings/bip/bip.png b/www/img/buildings/bip/bip.png similarity index 100% rename from Mourne-CI/img/buildings/bip/bip.png rename to www/img/buildings/bip/bip.png diff --git a/Mourne-CI/img/buildings/bip/index.html b/www/img/buildings/bip/index.html similarity index 100% rename from Mourne-CI/img/buildings/bip/index.html rename to www/img/buildings/bip/index.html diff --git a/Mourne-CI/img/buildings/corn_field/index.html b/www/img/buildings/corn_field/index.html similarity index 100% rename from Mourne-CI/img/buildings/corn_field/index.html rename to www/img/buildings/corn_field/index.html diff --git a/Mourne-CI/img/buildings/corn_field/r1.png b/www/img/buildings/corn_field/r1.png similarity index 100% rename from Mourne-CI/img/buildings/corn_field/r1.png rename to www/img/buildings/corn_field/r1.png diff --git a/Mourne-CI/img/buildings/corn_field/r2.png b/www/img/buildings/corn_field/r2.png similarity index 100% rename from Mourne-CI/img/buildings/corn_field/r2.png rename to www/img/buildings/corn_field/r2.png diff --git a/Mourne-CI/img/buildings/empty/empty.png b/www/img/buildings/empty/empty.png similarity index 100% rename from Mourne-CI/img/buildings/empty/empty.png rename to www/img/buildings/empty/empty.png diff --git a/Mourne-CI/img/buildings/empty/index.html b/www/img/buildings/empty/index.html similarity index 100% rename from Mourne-CI/img/buildings/empty/index.html rename to www/img/buildings/empty/index.html diff --git a/Mourne-CI/img/buildings/farm/index.html b/www/img/buildings/farm/index.html similarity index 100% rename from Mourne-CI/img/buildings/farm/index.html rename to www/img/buildings/farm/index.html diff --git a/Mourne-CI/img/buildings/farm/r1.png b/www/img/buildings/farm/r1.png similarity index 100% rename from Mourne-CI/img/buildings/farm/r1.png rename to www/img/buildings/farm/r1.png diff --git a/Mourne-CI/img/buildings/house/index.html b/www/img/buildings/house/index.html similarity index 100% rename from Mourne-CI/img/buildings/house/index.html rename to www/img/buildings/house/index.html diff --git a/Mourne-CI/img/buildings/house/r1.png b/www/img/buildings/house/r1.png similarity index 100% rename from Mourne-CI/img/buildings/house/r1.png rename to www/img/buildings/house/r1.png diff --git a/Mourne-CI/img/buildings/index.html b/www/img/buildings/index.html similarity index 100% rename from Mourne-CI/img/buildings/index.html rename to www/img/buildings/index.html diff --git a/Mourne-CI/img/buildings/iron_mine/index.html b/www/img/buildings/iron_mine/index.html similarity index 100% rename from Mourne-CI/img/buildings/iron_mine/index.html rename to www/img/buildings/iron_mine/index.html diff --git a/Mourne-CI/img/buildings/iron_mine/r1.png b/www/img/buildings/iron_mine/r1.png similarity index 100% rename from Mourne-CI/img/buildings/iron_mine/r1.png rename to www/img/buildings/iron_mine/r1.png diff --git a/Mourne-CI/img/buildings/lumber_mill/index.html b/www/img/buildings/lumber_mill/index.html similarity index 100% rename from Mourne-CI/img/buildings/lumber_mill/index.html rename to www/img/buildings/lumber_mill/index.html diff --git a/Mourne-CI/img/buildings/lumber_mill/r1.png b/www/img/buildings/lumber_mill/r1.png similarity index 100% rename from Mourne-CI/img/buildings/lumber_mill/r1.png rename to www/img/buildings/lumber_mill/r1.png diff --git a/Mourne-CI/img/buildings/school/index.html b/www/img/buildings/school/index.html similarity index 100% rename from Mourne-CI/img/buildings/school/index.html rename to www/img/buildings/school/index.html diff --git a/Mourne-CI/img/buildings/school/r1.png b/www/img/buildings/school/r1.png similarity index 100% rename from Mourne-CI/img/buildings/school/r1.png rename to www/img/buildings/school/r1.png diff --git a/Mourne-CI/img/buildings/stone_mine/index.html b/www/img/buildings/stone_mine/index.html similarity index 100% rename from Mourne-CI/img/buildings/stone_mine/index.html rename to www/img/buildings/stone_mine/index.html diff --git a/Mourne-CI/img/buildings/stone_mine/r1.png b/www/img/buildings/stone_mine/r1.png similarity index 100% rename from Mourne-CI/img/buildings/stone_mine/r1.png rename to www/img/buildings/stone_mine/r1.png diff --git a/Mourne-CI/img/characters/base/female.png b/www/img/characters/base/female.png similarity index 100% rename from Mourne-CI/img/characters/base/female.png rename to www/img/characters/base/female.png diff --git a/Mourne-CI/img/characters/base/male.png b/www/img/characters/base/male.png similarity index 100% rename from Mourne-CI/img/characters/base/male.png rename to www/img/characters/base/male.png diff --git a/Mourne-CI/img/generated/settings.txt b/www/img/generated/settings.txt similarity index 100% rename from Mourne-CI/img/generated/settings.txt rename to www/img/generated/settings.txt diff --git a/Mourne-CI/img/hero/inv_base/ammo.png b/www/img/hero/inv_base/ammo.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/ammo.png rename to www/img/hero/inv_base/ammo.png diff --git a/Mourne-CI/img/hero/inv_base/back.png b/www/img/hero/inv_base/back.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/back.png rename to www/img/hero/inv_base/back.png diff --git a/Mourne-CI/img/hero/inv_base/base.png b/www/img/hero/inv_base/base.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/base.png rename to www/img/hero/inv_base/base.png diff --git a/Mourne-CI/img/hero/inv_base/belt.png b/www/img/hero/inv_base/belt.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/belt.png rename to www/img/hero/inv_base/belt.png diff --git a/Mourne-CI/img/hero/inv_base/bracers.png b/www/img/hero/inv_base/bracers.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/bracers.png rename to www/img/hero/inv_base/bracers.png diff --git a/Mourne-CI/img/hero/inv_base/chest.png b/www/img/hero/inv_base/chest.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/chest.png rename to www/img/hero/inv_base/chest.png diff --git a/Mourne-CI/img/hero/inv_base/foots.png b/www/img/hero/inv_base/foots.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/foots.png rename to www/img/hero/inv_base/foots.png diff --git a/Mourne-CI/img/hero/inv_base/gloves.png b/www/img/hero/inv_base/gloves.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/gloves.png rename to www/img/hero/inv_base/gloves.png diff --git a/Mourne-CI/img/hero/inv_base/head.png b/www/img/hero/inv_base/head.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/head.png rename to www/img/hero/inv_base/head.png diff --git a/Mourne-CI/img/hero/inv_base/legs.png b/www/img/hero/inv_base/legs.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/legs.png rename to www/img/hero/inv_base/legs.png diff --git a/Mourne-CI/img/hero/inv_base/main_hand.png b/www/img/hero/inv_base/main_hand.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/main_hand.png rename to www/img/hero/inv_base/main_hand.png diff --git a/Mourne-CI/img/hero/inv_base/neck.png b/www/img/hero/inv_base/neck.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/neck.png rename to www/img/hero/inv_base/neck.png diff --git a/Mourne-CI/img/hero/inv_base/off_hand.png b/www/img/hero/inv_base/off_hand.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/off_hand.png rename to www/img/hero/inv_base/off_hand.png diff --git a/Mourne-CI/img/hero/inv_base/ranged.png b/www/img/hero/inv_base/ranged.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/ranged.png rename to www/img/hero/inv_base/ranged.png diff --git a/Mourne-CI/img/hero/inv_base/ring.png b/www/img/hero/inv_base/ring.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/ring.png rename to www/img/hero/inv_base/ring.png diff --git a/Mourne-CI/img/hero/inv_base/shirt.png b/www/img/hero/inv_base/shirt.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/shirt.png rename to www/img/hero/inv_base/shirt.png diff --git a/Mourne-CI/img/hero/inv_base/shoulders.png b/www/img/hero/inv_base/shoulders.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/shoulders.png rename to www/img/hero/inv_base/shoulders.png diff --git a/Mourne-CI/img/hero/inv_base/tabard.png b/www/img/hero/inv_base/tabard.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/tabard.png rename to www/img/hero/inv_base/tabard.png diff --git a/Mourne-CI/img/hero/inv_base/trinket.png b/www/img/hero/inv_base/trinket.png similarity index 100% rename from Mourne-CI/img/hero/inv_base/trinket.png rename to www/img/hero/inv_base/trinket.png diff --git a/Mourne-CI/img/hero/inventory/base.png b/www/img/hero/inventory/base.png similarity index 100% rename from Mourne-CI/img/hero/inventory/base.png rename to www/img/hero/inventory/base.png diff --git a/Mourne-CI/img/imggen/cornfield1.png b/www/img/imggen/cornfield1.png similarity index 100% rename from Mourne-CI/img/imggen/cornfield1.png rename to www/img/imggen/cornfield1.png diff --git a/Mourne-CI/img/imggen/index.html b/www/img/imggen/index.html similarity index 100% rename from Mourne-CI/img/imggen/index.html rename to www/img/imggen/index.html diff --git a/Mourne-CI/img/imggen/ironmine1.png b/www/img/imggen/ironmine1.png similarity index 100% rename from Mourne-CI/img/imggen/ironmine1.png rename to www/img/imggen/ironmine1.png diff --git a/Mourne-CI/img/imggen/menu.png b/www/img/imggen/menu.png similarity index 100% rename from Mourne-CI/img/imggen/menu.png rename to www/img/imggen/menu.png diff --git a/Mourne-CI/img/imggen/overlay/menu.png b/www/img/imggen/overlay/menu.png similarity index 100% rename from Mourne-CI/img/imggen/overlay/menu.png rename to www/img/imggen/overlay/menu.png diff --git a/Mourne-CI/img/imggen/slot.png b/www/img/imggen/slot.png similarity index 100% rename from Mourne-CI/img/imggen/slot.png rename to www/img/imggen/slot.png diff --git a/Mourne-CI/img/index.html b/www/img/index.html similarity index 100% rename from Mourne-CI/img/index.html rename to www/img/index.html diff --git a/Mourne-CI/img/map/ai_village.png b/www/img/map/ai_village.png similarity index 100% rename from Mourne-CI/img/map/ai_village.png rename to www/img/map/ai_village.png diff --git a/Mourne-CI/img/map/bottom.png b/www/img/map/bottom.png similarity index 100% rename from Mourne-CI/img/map/bottom.png rename to www/img/map/bottom.png diff --git a/Mourne-CI/img/map/empty.png b/www/img/map/empty.png similarity index 100% rename from Mourne-CI/img/map/empty.png rename to www/img/map/empty.png diff --git a/Mourne-CI/img/map/index.html b/www/img/map/index.html similarity index 100% rename from Mourne-CI/img/map/index.html rename to www/img/map/index.html diff --git a/Mourne-CI/img/map/left.png b/www/img/map/left.png similarity index 100% rename from Mourne-CI/img/map/left.png rename to www/img/map/left.png diff --git a/Mourne-CI/img/map/right.png b/www/img/map/right.png similarity index 100% rename from Mourne-CI/img/map/right.png rename to www/img/map/right.png diff --git a/Mourne-CI/img/map/rocks.png b/www/img/map/rocks.png similarity index 100% rename from Mourne-CI/img/map/rocks.png rename to www/img/map/rocks.png diff --git a/Mourne-CI/img/map/top.png b/www/img/map/top.png similarity index 100% rename from Mourne-CI/img/map/top.png rename to www/img/map/top.png diff --git a/Mourne-CI/img/map/village.png b/www/img/map/village.png similarity index 100% rename from Mourne-CI/img/map/village.png rename to www/img/map/village.png diff --git a/Mourne-CI/img/map/water.png b/www/img/map/water.png similarity index 100% rename from Mourne-CI/img/map/water.png rename to www/img/map/water.png diff --git a/Mourne-CI/img/menu/index.html b/www/img/menu/index.html similarity index 100% rename from Mourne-CI/img/menu/index.html rename to www/img/menu/index.html diff --git a/Mourne-CI/img/saves/bip/settings.txt b/www/img/saves/bip/settings.txt similarity index 100% rename from Mourne-CI/img/saves/bip/settings.txt rename to www/img/saves/bip/settings.txt diff --git a/Mourne-CI/img/saves/corn/gen.png b/www/img/saves/corn/gen.png similarity index 100% rename from Mourne-CI/img/saves/corn/gen.png rename to www/img/saves/corn/gen.png diff --git a/Mourne-CI/img/saves/corn/settings.txt b/www/img/saves/corn/settings.txt similarity index 100% rename from Mourne-CI/img/saves/corn/settings.txt rename to www/img/saves/corn/settings.txt diff --git a/Mourne-CI/img/saves/index.html b/www/img/saves/index.html similarity index 100% rename from Mourne-CI/img/saves/index.html rename to www/img/saves/index.html diff --git a/Mourne-CI/js/index.html b/www/js/index.html similarity index 100% rename from Mourne-CI/js/index.html rename to www/js/index.html diff --git a/Mourne-CI/js/jquery-ui-1.10.0.custom.js b/www/js/jquery-ui-1.10.0.custom.js similarity index 100% rename from Mourne-CI/js/jquery-ui-1.10.0.custom.js rename to www/js/jquery-ui-1.10.0.custom.js diff --git a/Mourne-CI/js/jquery-ui-1.10.0.custom.min.js b/www/js/jquery-ui-1.10.0.custom.min.js similarity index 100% rename from Mourne-CI/js/jquery-ui-1.10.0.custom.min.js rename to www/js/jquery-ui-1.10.0.custom.min.js diff --git a/Mourne-CI/js/jquery.js b/www/js/jquery.js similarity index 100% rename from Mourne-CI/js/jquery.js rename to www/js/jquery.js diff --git a/Mourne-CI/js/resource.js b/www/js/resource.js similarity index 100% rename from Mourne-CI/js/resource.js rename to www/js/resource.js