mirror of
https://github.com/gooba42/adventureland.git
synced 2026-10-14 18:39:27 -05:00
Open source
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"{%if domain.electron%} onload="if(typeof require!=='undefined') window.$=window.jQuery=module.exports;"{%endif%}></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/html.js?v={{domain.v}}"></script>
|
||||
<script src="/data.js?v={{domain.v}}"></script>
|
||||
<link href="/css/index.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
html,body{
|
||||
background:black;
|
||||
font-size: 32px;
|
||||
}
|
||||
body{
|
||||
overflow-y: scroll;
|
||||
}
|
||||
*{
|
||||
-webkit-touch-callout: text;
|
||||
-webkit-user-select: text;
|
||||
-khtml-user-select: text;
|
||||
-moz-user-select: text;
|
||||
-ms-user-select: text;
|
||||
user-select: text;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
{% for backup in backups%}
|
||||
<div style='margin: 20px'>{{backup}}</div>
|
||||
{% endfor %}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div data-id="{{event.key.id()}}">
|
||||
<span style='color: gray'>[{{event.created|to_date}}][{{event.created|to_hour}}]</span>
|
||||
<span style="{%if event.info.color %}color: {{event.info.color}}{%endif%}">{{event.info.message}}</span>
|
||||
{% if "error" in event.tag %}
|
||||
<pre style='font-size: 16px; font-family: Pixel'>IP: {{event.info.ip}} Country: {{event.info.country}} Name: {{event.info.e_name}}
|
||||
{{event.info.info}}</pre>
|
||||
{% endif %}
|
||||
</div>
|
||||
@@ -0,0 +1,31 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"{%if domain.electron%} onload="if(typeof require!=='undefined') window.$=window.jQuery=module.exports;"{%endif%}></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<link href="/css/index.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
html{
|
||||
background:black;
|
||||
font-size:24px;
|
||||
}
|
||||
body{
|
||||
overflow-y:scroll;
|
||||
}
|
||||
*{
|
||||
user-select: text;
|
||||
}
|
||||
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 20px">
|
||||
{% for event in events %}
|
||||
{% include "utility/htmls/event.html" %}
|
||||
{% endfor %}
|
||||
{% if ncursor %}<div><a href="?cursor={{ncursor}}">Next Page</a></div>{% endif %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,82 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"{%if domain.electron%} onload="if(typeof require!=='undefined') window.$=window.jQuery=module.exports;"{%endif%}></script>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/codemirror.js"></script>
|
||||
<link href="/js/codemirror/{{domain.cm_version}}/codemirror.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/js/codemirror/{{domain.cm_version}}/material.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/python.js"></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
b{
|
||||
font-size: 12px;
|
||||
color: #4D4B4E;
|
||||
}
|
||||
html,body{
|
||||
margin:0;
|
||||
padding:0;
|
||||
background: #ECECEC;
|
||||
}
|
||||
a{
|
||||
text-decoration: none;
|
||||
color: #1D8885;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 10px">
|
||||
<div id="code" style="width: 100%; height: 600px" class="borderbox">
|
||||
</div>
|
||||
<div class="borderbox" style="width: 100%; font-size: 0px; margin-top: 5px">
|
||||
<button class="button borderbox" style="width: 89%; margin-right: 0.2%" onclick="execute()">Execute</button>
|
||||
<button class="button borderbox" style="width: 10.8%" onclick="execute(1)">Defer</button>
|
||||
</div>
|
||||
<div id="output">
|
||||
<div id="outputjson"></div>
|
||||
<script>
|
||||
value=syntax_highlight(JSON.stringify({
|
||||
"inspect":"inspect=element",
|
||||
"output":"escaped output",
|
||||
"json_output":"prettified json output",
|
||||
"html_output":"non-escaped output",
|
||||
"strhtml":"output_html=strhtml(\x27{{'{{'}}macro.torep(element|to_dict){{'}}'}}\x27,element=user)",
|
||||
"get_by_iid":"get_by_iid('model_name|key')",
|
||||
"monster_analysis":"monster_analysis(logging)",
|
||||
"drop_analysis":"drop_analysis(logging)",
|
||||
"character_analysis":"inspect=character_analysis(\x27NAME\x27,logging)",
|
||||
"game_analysis":"game_analysis(logging)",
|
||||
"servers_eval":"servers_eval(\x27reload_server(1,data.reason);\x27,data={'reason':''})",
|
||||
"block_account":"block_account(\x27NAME\x27,days,\x27Reason\x27) | days<0: unblock",
|
||||
"disable_email":"disable_email(\x27reporter@mail.ru\x27,logging)",
|
||||
"mref":"add_referrer_manually(\x27invited@gmail.com\x27,\x27player@gmail.com\x27,logging=None)",
|
||||
"!behaviour":"get operations should be before output declarations to not reset them",
|
||||
},undefined,4));
|
||||
value="<pre>"+value+"</pre>";
|
||||
$("#outputjson").html(value);
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
var codemirror = CodeMirror(function(current){$("#code").replaceWith(current);},{
|
||||
value: "domain=gdi(self); user=get_user(self,domain); user_data=get_user_data(user)\n",
|
||||
mode: "python",
|
||||
indentUnit:4,
|
||||
indentWithTabs:true,
|
||||
/*,lineNumbers:true*/
|
||||
});
|
||||
function execute(is_task)
|
||||
{
|
||||
code=codemirror.getValue();
|
||||
// loading code
|
||||
$.post("/admin/executor",{code:code,is_task:is_task},function(c){
|
||||
$("#output").html(c);
|
||||
// stop loading code
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
{% import 'htmls/macros.html' as macro with context %}
|
||||
<b>Executed {{created}}" || In {{ess_ms}}ms</b><br />
|
||||
{% if output!="the_none_output_48" %}
|
||||
<b>Output:</b>
|
||||
<pre>{{output}}</pre>
|
||||
{% endif %}
|
||||
{% if logs %}
|
||||
<b>Logs:</b>
|
||||
<pre>{{logs}}</pre>
|
||||
{% endif %}
|
||||
{% if json!=None %}
|
||||
<div id="outputjson"></div>
|
||||
<div><b>Size:</b> {{json_size}}</div>
|
||||
<script>
|
||||
value=syntax_highlight(JSON.stringify(eval('({{json|escapejs}})'),undefined,4));
|
||||
value="<pre>"+value+"</pre>";
|
||||
$("#outputjson").html(value);
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if html_output!="the_none_output_48" %}
|
||||
<b>HTML Output:</b>
|
||||
<div>{{html_output|safe}}</div>
|
||||
{% endif %}
|
||||
{% if inspector_output %}
|
||||
{{inspector_output|safe}}
|
||||
{% endif %}
|
||||
@@ -0,0 +1,10 @@
|
||||
{%extends "htmls/base.html"%}
|
||||
{%block body%}
|
||||
{% for tag,collection in gallery %}
|
||||
<div style="text-align: center; font-size: 160px; margin-bottom: 20px; margin-top: 20px">{{tag}}</dib>
|
||||
{% for img in collection %}
|
||||
<img src="{{img}}" style="float: left" />
|
||||
{% endfor %}
|
||||
<div style="clear: both;"></div>
|
||||
{% endfor %}
|
||||
{%endblock%}
|
||||
@@ -0,0 +1,90 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"{%if domain.electron%} onload="if(typeof require!=='undefined') window.$=window.jQuery=module.exports;"{%endif%}></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/html.js?v={{domain.v}}"></script>
|
||||
<script src="/data.js?v={{domain.v}}"></script>
|
||||
<link href="/css/index.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
html,body{
|
||||
background:black;
|
||||
}
|
||||
body{
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var filter=null,mode="{{mode}}",items="{{items}}",only_list=false;
|
||||
if(mode=="list") only_list=true;
|
||||
if(mode=="to_convert") only_list=true;
|
||||
if(items)
|
||||
{
|
||||
filter=[];
|
||||
items.split(",").forEach(function(i){
|
||||
filter.push(i);
|
||||
});
|
||||
console.log(filter);
|
||||
}
|
||||
function is_bold(){}
|
||||
document.addEventListener("DOMContentLoaded",function(event){
|
||||
var styles="vertical-align: top; margin-right: 10px"
|
||||
for(var name in G.items)
|
||||
{
|
||||
if(filter && !in_arr(name,filter)) continue;
|
||||
var def=G.items[name];
|
||||
if(mode=="to_convert" && (def.ignore || G.positions[def.skin][0]=="pack_20")) continue;
|
||||
var html="";
|
||||
if(!only_list) html+="<div style='margin-bottom: 15px'>";
|
||||
console.log(def);
|
||||
if(def.compound && !only_list)
|
||||
{
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:0},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:1},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:2},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:3},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:4},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:5},sell:1});
|
||||
}
|
||||
else if(def.upgrade && !only_list)
|
||||
{
|
||||
html+="<div style='margin-bottom: 15px'>";
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:0},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:1},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:2},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:3},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:4},sell:1});
|
||||
html+="</div>";
|
||||
html+="<div style='margin-bottom: 15px'>";
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:5},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:6},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:7},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:8},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:9},sell:1});
|
||||
html+=render_item("html",{item:def,name:name,styles:styles,actual:{name:name,level:10},sell:1});
|
||||
html+="</div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
html+=render_item("html",{item:def,name:name,thumbnail:only_list});
|
||||
}
|
||||
if(!only_list) html+="</div>";
|
||||
$("#items").append(html);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.buyitem{
|
||||
display: inline-block;
|
||||
margin: 6px;
|
||||
vertical-align: top;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="items">
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,183 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"{%if domain.electron%} onload="if(typeof require!=='undefined') window.$=window.jQuery=module.exports;"{%endif%}></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/game.js?v={{domain.v}}"></script>
|
||||
<script src="/js/keyboard.js?v={{domain.v}}"></script>
|
||||
<link href="/css/index.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<script src="/data.js?v={{domain.v}}"></script>
|
||||
<script src="/js/pixi/{{domain.pixi_version}}/pixi.min.js"></script>
|
||||
<style>
|
||||
html{
|
||||
background:black;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var map_data={{(map.info.data and map.info.data|to_json or '{tiles:[],placements:[]}')|safe}},tilesets={{tilesets|safe}};
|
||||
{% include "utility/htmls/map_editor.js" %}
|
||||
$(function(){
|
||||
width=$(window).width();
|
||||
height=$(window).height();
|
||||
scale=2;
|
||||
map=null;
|
||||
rtexture=null,rmap=null; //RenderTexture and the Sprite
|
||||
// PIXI.settings.SCALE_MODE = PIXI.SCALE_MODES.NEAREST;
|
||||
if(location.search.indexOf("force_canvas")!=-1) renderer = new PIXI.CanvasRenderer(width,height,{antialias: false, transparent: false, resolution:window.devicePixelRatio, autoResize:true});
|
||||
else if(location.search.indexOf("force_webgl")!=-1) renderer = new PIXI.WebGLRenderer(width,height,{antialias: false, transparent: false, resolution:window.devicePixelRatio, autoResize:true});
|
||||
else renderer = new PIXI.autoDetectRenderer(width,height,{antialias: false, transparent: false, resolution:window.devicePixelRatio, autoResize:true});
|
||||
document.body.appendChild(renderer.view);
|
||||
stage = new PIXI.Container();
|
||||
stage2=null;
|
||||
// G={}; // game info
|
||||
D={}; FC={}; T={}; map_name=null;
|
||||
C=PIXI.utils.BaseTextureCache;
|
||||
loader=PIXI.loader;
|
||||
if(location.search.indexOf("map")!=-1)
|
||||
{
|
||||
map_name=location.search.split("map=")[1];
|
||||
console.log("Map: "+map_name);
|
||||
for(name in G.sprites)
|
||||
{
|
||||
var s_def=G.sprites[name];
|
||||
if(s_def.skip) continue;
|
||||
loader.add(s_def.file);
|
||||
}
|
||||
}
|
||||
{% for set,inf in tilesets.items() %}
|
||||
loader.add('{{inf.file}}');
|
||||
{% endfor %}
|
||||
loader.load(function (loader, resources) {
|
||||
|
||||
for(file in PIXI.utils.BaseTextureCache)
|
||||
PIXI.utils.BaseTextureCache[file].scaleMode=PIXI.SCALE_MODES.NEAREST;
|
||||
|
||||
if(map_name)
|
||||
{
|
||||
for(name in G.sprites)
|
||||
{
|
||||
var s_def=G.sprites[name];
|
||||
if(s_def.skip) continue;
|
||||
var row_num=4,s_type="full";
|
||||
if(s_def.type=="animation") row_num=1,s_type="animation";
|
||||
var matrix=s_def.matrix;
|
||||
var width=C[s_def.file].width/(s_def.columns*3);
|
||||
var height=C[s_def.file].height/(s_def.rows*row_num);
|
||||
for(var i=0;i<matrix.length;i++)
|
||||
for(var j=0;j<matrix[i].length;j++)
|
||||
{
|
||||
if(!matrix[i][j]) continue;
|
||||
FC[matrix[i][j]]=s_def.file;
|
||||
D[matrix[i][j]]=[j*3*width,i*row_num*height,width,height];
|
||||
T[matrix[i][j]]=s_type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
redraw_map();
|
||||
|
||||
draw();
|
||||
});
|
||||
function draw() {
|
||||
frames+=1;
|
||||
put_fps_counter();
|
||||
|
||||
var mmap=$(".tilesetmove.active").length&&window.tileset||rmap||map,step=12; //$(".tilesetmove.active").length&&window.tileset -- or last_move=="map2" <- doesn't work yet
|
||||
if(mmap==window.tileset) step=ceil(12/tileset_scale);
|
||||
|
||||
if(left_pressed<right_pressed) mmap.x-=step;
|
||||
if(left_pressed>right_pressed) mmap.x+=step;
|
||||
if(up_pressed<down_pressed) mmap.y-=step;
|
||||
if(up_pressed>down_pressed) mmap.y+=step;
|
||||
|
||||
if($(".tilesetmove.active").length) cache_set();
|
||||
|
||||
renderer.render(stage);
|
||||
if(stage2) renderer2.render(stage2);
|
||||
requestAnimationFrame(draw);
|
||||
}
|
||||
keyboard_logic();
|
||||
});
|
||||
|
||||
var fps_counter=null,frames=0,last_count=null,last_frame,fps=0;
|
||||
function put_fps_counter()
|
||||
{
|
||||
if(!last_count) last_count=new Date(),last_frame=frames,frequency=500;
|
||||
if(mssince(last_count)>=frequency) last_count=new Date(),fps=(frames-last_frame)*(1000.0/frequency),last_frame=frames;
|
||||
if(fps_counter) { fps_counter.text=""+round(fps); return; stage.removeChild(fps_counter); fps_counter.destroy(); }
|
||||
fps_counter = new PIXI.Text(""+round(fps),{fontFamily:"sans-serif",fontSize:32,fill:"green"});
|
||||
fps_counter.position.set($(window).width()-45,$(window).height()-40);
|
||||
stage.addChild(fps_counter);
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
.gamebutton{
|
||||
pointer-events: auto;
|
||||
}
|
||||
input{
|
||||
font-family: 'Pixel';
|
||||
text-align: center;
|
||||
font-size: 24px;
|
||||
line-height: 24px;
|
||||
height: 16px;
|
||||
min-width: 27px;
|
||||
}
|
||||
</style>
|
||||
<div id="entitymodal" style="display:none">
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_group()">Dynamic Regular <span class='gray'>[No Animations]</span> <span class='ggreen'>[Multi Tiles]</span> <span class='gyellow'>{Roofs, Signs, Furniture}</span></div>
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_animation()">Dynamic Animation <span class='ggreen'>[Blends with Characters]</span> <span class='gray'>[Single Tile]</span> <span class='gyellow'>{Smokes, Floating, Animating Objects}</span></div>
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_animation('simple')">Simple Animation <span class='gray'>[Over Map] [Under Characters] [Single Tile]</span> <span class='gyellow'>{Waterfalls, Alien Flowers}</span></div>
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_animation('night')">Add Night Animation <span class='gray'>[Blends with Characters]</span></div>
|
||||
</div>
|
||||
<div id="zonemodal" style="display:none">
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_rectangle();">Rectangle [Spawn, Door, Area]</div>
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_polygon();">Polygon [Special Spawn, Area]</div>
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_point('spawn');">Spawn [Point with Distance Check]</div>
|
||||
<div class="gamebutton gamebutton-large block mb5" onclick="startstop_point();">Normal Point</div>
|
||||
</div>
|
||||
<div id="bottomleftcorner">
|
||||
<div class="gamebutton clickable mt5" onclick="save()">Save</div>
|
||||
<div class="gamebutton clickable underbutton mt5" onclick="toggle_under_mode();">Under</div>
|
||||
<div class="gamebutton clickable areabutton mbutton mt5" onclick="toggle_area_mode();">Area</div>
|
||||
<div class="gamebutton clickable linebutton mbutton mt5" onclick="toggle_line_mode();">Line</div>
|
||||
<div class="gamebutton clickable entitybutton mt5" onclick="startstop_entity();">Add Entity</div>
|
||||
<div class="gamebutton clickable animinfo hidden mt5">FRAMES <input class="frames" type="text" value="7" style="width: 20px"/><div class='px4'></div> INTERVAL <input class="interval" type="text" value="40" style="width: 20px"/><div class='px4'></div> DELAY <input class='delay' type="text" value="0" style="width: 20px"/></div>
|
||||
<div class="gamebutton clickable zoffset hidden mt5">Z.OFFSET <input class='zoffsetval' type="text" value="0" onchange="redraw_map()" style="width: 20px"/></div>
|
||||
<div class="gamebutton clickable zonebutton mt5" onclick="startstop_zone();">Add Zone</div>
|
||||
<div class="gamebutton clickable idbutton hidden mt5">ID <input type="text" class='idbuttonid' value="gg" style="width: 64px"/></div>
|
||||
{#<div class="gamebutton clickable mt5">SCALE <input type="text" onchange="rescale_map(parseFloat($(this).val()))" value="2" style="width: 24px"/></div>#}
|
||||
<div class="gamebutton largerfont mt5" onclick="map_zoom(-1)"><div class='px1'></div>-</div>
|
||||
<div class="gamebutton largerfont mt5" onclick="map_zoom(1)"><div class='px1'></div>+</div>
|
||||
<div class="gamebutton clickable mt5">STEP <input type="text" onchange="step_x=step_y=parseInt($(this).val())" value="8" style="width: 20px"/></div>
|
||||
<div class="gamebutton clickable mt5">SIZE_X <input type="text" onchange="size_x=parseInt($(this).val()); redraw_map()" value="16" style="width: 20px"/></div>
|
||||
<div class="gamebutton clickable mt5">SIZE_Y <input type="text" onchange="size_y=parseInt($(this).val()); redraw_map()" value="16" style="width: 20px"/></div>
|
||||
<div class="gamebutton clickable linesbutton mt5" onclick="toggle_lines();">Info: ON</div>
|
||||
<div class="gamebutton clickable alertbutton mbutton largerfont mt5" onclick="toggle_alert_mode();"><div class='px2'></div>±</div>
|
||||
<div class="gamebutton clickable mt5" onclick="show_json(map_data);">JSON</div>
|
||||
{% if resort %}
|
||||
<div class="gamebutton clickable mt5" onclick="show_upload_modal();">UPLOAD</div>
|
||||
{% endif %}
|
||||
<div class="gamebutton clickable mt5" style="border-color: #E13758"onclick="show_modal($('#infomodal').html(),{wrap:false});">GUIDE</div>
|
||||
<div class="gamebutton clickable xbutton hidden mt5" style='border-color: #4A95D4' onclick="tile_set=null; $(this).hide()"><div class='px2'></div>X</div>
|
||||
</div>
|
||||
<div id="topleftcorner">
|
||||
{% for set,inf in tilesets.items()|sort %}
|
||||
{% if set not in ["pack_1a","licht","stands"] %}
|
||||
<div class="gamebutton clickable mb5" onclick="load_tileset('{{set}}','{{inf.file}}')">{{set}}</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div id="toprightcorner" style="background: black; border: 5px solid #32A3B0; z-index: 900" class="hidden">
|
||||
</div>
|
||||
<script>
|
||||
$("input").each(function(){
|
||||
$(this).attr("onkeyup",$(this).attr("onchange"));
|
||||
});
|
||||
</script>
|
||||
{% include "utility/htmls/map_editor_info.html" %}
|
||||
</body>
|
||||
</html>
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,49 @@
|
||||
<style>
|
||||
.infoheader{
|
||||
margin-top: 15px;
|
||||
margin-bottom: 5px;
|
||||
background: black;
|
||||
color: white;
|
||||
padding: 10px;
|
||||
font-size: 36px;
|
||||
border: 4px solid gray;
|
||||
}
|
||||
.header{
|
||||
margin-top: 10px;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
</style>
|
||||
<div id="infomodal" style="display: none">
|
||||
<div style="width: 640px; background: #E5E5E5; color: #424343; font-size: 24px; border: 5px solid gray; padding: 16px">
|
||||
<div>Welcome Adventurer. This is our in-house, custom map editor, we use it to build the maps of Adventure Land. For this reason, it's a bit crude, hard to use, and it's quite heavy in terms of resource usage. Now that you have been warned, onto the fun stuff!</div>
|
||||
<div class="header" style="color: #3B96AA">Tilesets</div>
|
||||
<div>The buttons above, the "castle", "doors", "dungeon" etc. are the tilesets. When you click a tileset, it's opened on the top right corner. You can zoom-in/out with the +/- buttons. When you activate the "M" button, you can move the tileset using arrows.</div>
|
||||
<div class="header" style="color: #8E77DE">Picking and Placing</div>
|
||||
You can pick and place a tile of "SIZE_X"/"SIZE_Y" size, the default size is 16x16. You can also modify the "STEP", try setting it to 1 for example to see what it does. You need to keep the tileset open to place tiles. Just click anywhere on the map to place one tile! If you press "Y" - You can set a tile to be the default tile.
|
||||
<div class="header" style="color: #64AB3D">Moving and Zooming</div>
|
||||
Move around your map using arrows, you can also use the +/- buttons to zoom-in/out.
|
||||
<div class="header" style="color: #CDC647">Area Mode</div>
|
||||
Placing tiles one by one can be tiresome, that's what the "Area Mode" is for, you can place areas instead of single tiles, saves time, performance and space!
|
||||
<div class="header" style="color: #E43491">Under Mode</div>
|
||||
In this mode, everything you place goes under the tiles you've placed.
|
||||
<div class="header" style="color: #C67733">Keypress Features</div>
|
||||
Press Y + Click: Select a default tile to span everywhere<br />
|
||||
Press L + Click: Line continuity test<br />
|
||||
<div class="header" style="color: #DC5567">Deleting Tiles</div>
|
||||
Press X + Click: To delete regular tiles<br />
|
||||
Press Z + Click: To delete area tiles<br />
|
||||
Press C + Click: To delete lines<br />
|
||||
Press V + Click: To delete entities<br />
|
||||
Press B + Click: To delete zones (Aim for top-left corner)<br />
|
||||
<div class="header" style="color: #53C7E7">Entities</div>
|
||||
Entities are things that can appear above characters and monsters, things you can get under, for example, a tree, a chair, a house. It's challenging to create entities, you can't edit an entity, you can only create them in one run, and delete them later on. For this reason, plan the entity you are going to create beforehand and create it perfectly without any mistakes, otherwise you would need to start over. One more important thing, don't put any empty space below entities. (I know these are all very complicated, but you might understand these yourself with trial and error). To start an entity, press "Start Entity", and when you are done, press "Stop Entity", and voila, you created an entity on your map!
|
||||
<div class="header" style="color: #53C7E7">Zones</div>
|
||||
Zones are there to make it easier to reference areas when developing the game. They can be spawns, traps, safe zones, anything! For basic spawns, only draw a rectangle - it makes things very lightweight!
|
||||
<div class="header" style="color: #E55756">Lines</div>
|
||||
Characters can't pass lines, so make sure you place lines around your map. As a best practice, place lines ~8pixels away from actual boundaries. Your character will spawn at 0,0 - on the Red Dot, so, for the time being, build your map according to that.
|
||||
<div class="header" style="color: #33CCB5">Plans</div>
|
||||
Aspiring to combine CODE + Resort at one point, provide a basic Networking architecture to map builders, so they can create simple yet fun interactive experiences, maybe basic multiplayer games. As everything on Adventure Land, the Map Editor, Resort will improve and change over time too, keep this in mind. If you have any questions, requests, feel free to email me at hello@adventure.land. Have fun!
|
||||
<div class="header" style="color: #7E7E7E">Heads Up</div>
|
||||
WebGL is a very moody technology, for example, the Map Editor could slow down the game even after you close the Map Editor, if you feel something is amiss, just restart your browser, and hope WebGL improves in time and we leave issues like these behind :]
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"></script>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/codemirror.js"></script>
|
||||
<link href="/js/codemirror/{{domain.cm_version}}/codemirror.css" rel="stylesheet" type="text/css"/>
|
||||
<link href="/js/codemirror/{{domain.cm_version}}/material.css" rel="stylesheet" type="text/css"/>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/css.js"></script>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/javascript.js"></script>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/xml.js"></script>
|
||||
<script src="/js/codemirror/{{domain.cm_version}}/htmlmixed.js"></script>
|
||||
<script src="/js/tests/msgpack.min.js?v={{domain.v}}"></script><script src="/js/tests/pako.min.js"></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
#render{
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<textarea id="render"></textarea>
|
||||
<button onclick="a_render()">Render!</button><button onclick="r_render()">RunnerRender!</button><button onclick="$('#runner').html('<iframe src=\'/runner\' height=\'50\' width=\'100\' id=\'r1\'></iframe>')">Insert Runner</button>
|
||||
<div id="renderoutput" style="margin-top: 5px"></div>
|
||||
<div id="runner"></div>
|
||||
<script>
|
||||
var codemirror_render = CodeMirror(function(current){$("#render").replaceWith(current);},{
|
||||
value:"<div></div>\n<style></style>\n<script>\n\ttry{\n\t\t\n\t}catch(e){alert(e)}\n\<\/script>",
|
||||
mode:"htmlmixed",
|
||||
indentUnit:4,
|
||||
indentWithTabs:true,
|
||||
theme:"material",
|
||||
/*,lineNumbers:true*/
|
||||
});
|
||||
function a_render()
|
||||
{
|
||||
var html=codemirror_render.getValue();
|
||||
$("#renderoutput").html(html);
|
||||
}
|
||||
function r_render()
|
||||
{
|
||||
var html=codemirror_render.getValue();
|
||||
document.getElementById("r1").contentWindow.render(html);
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,58 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<script src="/js/jquery/jquery-{{domain.jquery_version}}.min.js"></script>
|
||||
<script src="/js/common_functions.js?v={{domain.v}}"></script>
|
||||
<script src="/js/functions.js?v={{domain.v}}"></script>
|
||||
<link href="/css/index.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<link href="/css/common.css?v={{domain.v}}" rel="stylesheet" type="text/css"/>
|
||||
<style>
|
||||
html,body{
|
||||
background:black;
|
||||
}
|
||||
body{
|
||||
overflow-y: scroll;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
var mode="alert";
|
||||
function clicked(x,y)
|
||||
{
|
||||
if(mode=="alert") alert(x+","+y);
|
||||
else
|
||||
{
|
||||
$(".element"+x+y).attr("class","clickable element"+x+y+" rotate"+mode);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="toprightcorner">
|
||||
<div style="margin-right: 24px">
|
||||
<div class="gamebutton clickable" onclick="mode=2">2</div>
|
||||
<div class="gamebutton clickable" onclick="mode=4">4</div>
|
||||
<div class="gamebutton clickable" onclick="mode=6">6</div>
|
||||
<div class="gamebutton clickable" onclick="mode='alert'">Alert</div>
|
||||
<div style="margin-bottom: 5px"></div>
|
||||
<div class="gamebutton clickable" onclick="mode=8">8</div>
|
||||
<div class="gamebutton clickable" onclick="mode=10">10</div>
|
||||
<div class="gamebutton clickable" onclick="mode=12">12</div>
|
||||
<div class="gamebutton clickable" onclick="mode=14">14</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style='color: white; background-color: black; padding: 2px; font-size: 0px'>
|
||||
{% for y in ys %}
|
||||
<div>
|
||||
{% for x in xs%}
|
||||
<div style='display:inline-block; border: 2px solid gray; margin: 2px; height: {{size*scale+6}}px; width: {{size*scale+6}}px; overflow: hidden'
|
||||
class="clickable element{{x}}{{y}}" onclick="clicked({{x}},{{y}})">
|
||||
<div style="margin-left: 3px; margin-top: 3px; width: {{size*scale}}px; height: {{size*scale}}px; overflow: hidden">
|
||||
<img style='width: {{width*scale}}px; height: {{height*scale}}px; margin-left: -{{x*size*scale}}px; margin-top: -{{y*size*scale}}px;' src='{{file}}' />
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<div style='font-size: 32px'>
|
||||
<div style='margin-bottom: 20px'>Upload a photo</div>
|
||||
<form action="{{upload_url}}" method="post" enctype="multipart/form-data">
|
||||
<input type="file" name="image"/>
|
||||
<input name="key" value="test" />
|
||||
<input type="submit" name="submit" value="Upload"/>
|
||||
</form>
|
||||
</div>
|
||||
Reference in New Issue
Block a user