mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
mission compreted
This commit is contained in:
@@ -74,6 +74,7 @@ body
|
||||
|
||||
#textbased
|
||||
{
|
||||
display: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
@@ -131,12 +132,9 @@ a { display: inline; }
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
.tt > div
|
||||
{
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tt:hover > div
|
||||
|
||||
.tt > div
|
||||
{
|
||||
position: absolute;
|
||||
bottom: -30px;
|
||||
@@ -146,8 +144,6 @@ a { display: inline; }
|
||||
display: block;
|
||||
width: 128px;
|
||||
height: 24px;
|
||||
border: 1px solid #313131;
|
||||
background-color: #434343;
|
||||
padding: 4px;
|
||||
z-index: 999;
|
||||
text-align: center;
|
||||
|
||||
@@ -119,7 +119,7 @@ var/global/datum/crewmonitor/crewmonitor = new
|
||||
|
||||
hi = src.interfaces["[z]"]
|
||||
|
||||
hi.updateContent("content", "<div id='switches'><a href=\"javascript:switchTo(0);\">Switch to mini map</a> <a href=\"javascript:switchTo(1);\">Switch to text-based</a> <a href='javascript:changezlevels();'>Change Z-Level</a> Zoom:<a href='javascript:changeZoom(-1);'>-</a><a href='javascript:changeZoom(1);'>+</a></div><div id=\"uiMapContainer\"><div id=\"uiMap\" unselectable=\"on\"></div></div><div id=\"textbased\"></div>")
|
||||
hi.updateContent("content", "<div id='switches'><a href=\"javascript:switchTo(0);\">Switch to mini map</a> <a href=\"javascript:switchTo(1);\">Switch to text-based</a> <a href='javascript:changezlevels();'>Change Z-Level</a> </div><div id=\"uiMapContainer\"><div id=\"uiMap\" unselectable=\"on\"></div></div><div id=\"textbased\"></div>")
|
||||
|
||||
src.update(z, TRUE)
|
||||
else
|
||||
@@ -258,6 +258,14 @@ var/global/datum/crewmonitor/crewmonitor = new
|
||||
spawn(min(30, get_dist(get_turf(C), AI.eyeobj) / 4))
|
||||
if (AI && AI.eyeobj && current_loc == AI.eyeobj.loc)
|
||||
AI.switchCamera(C)
|
||||
else if(hclient && hclient.client && hclient.client.mob)
|
||||
var/mob/living/L = hclient.client.mob
|
||||
if(!istype(L)) return
|
||||
switch (href_list["action"])
|
||||
if("changez")
|
||||
var/newz = text2num(href_list["value"])
|
||||
if(newz)
|
||||
show(L,newz)
|
||||
|
||||
/datum/crewmonitor/proc/queueUpdate(z)
|
||||
var/datum/controller/process/html/html = processScheduler.getProcess("html")
|
||||
|
||||
@@ -261,7 +261,8 @@ $(window).on("onUpdateContent", function()
|
||||
$("#uiMap").append("<img src=\"minimap_" + z + ".png\" id=\"uiMapImage\" width=\"256\" height=\"256\" unselectable=\"on\"/><div id=\"uiMapContent\" unselectable=\"on\"></div>");
|
||||
$("#uiMapContainer").append("<div id=\"uiMapTooltip\"></div>");
|
||||
|
||||
$("body")[0].onselectstart = disableSelection;
|
||||
$("#switches").append("<div id='zoomcontainer' style='position: static; z-index: 9999; margin-bottom: -75px;'>Zoom: <div id='zoomslider' style='width: 75px; position: relative; top: -31px; right: -50px; z-index: 9999;'><input type=\"range\" onchange=\"setzoom(value);\" value=\"4\" step=\"0.5\" max=\"16\" min=\"0.5\" id=\"zoom\"></div><div id=\"zoomval\" style='position:relative; z-index: 9999; right: -135px; top: -80px; color: white;'>100%</div></div>");
|
||||
//$("body")[0].onselectstart = disableSelection;
|
||||
|
||||
var width = $("#uiMapImage").width();
|
||||
|
||||
@@ -328,6 +329,7 @@ function switchTo(i)
|
||||
if (i == 1)
|
||||
{
|
||||
$("#uiMapContainer").hide();
|
||||
$("#zoomcontainer").hide();
|
||||
$("body").css({"padding-left": "0px" , "cursor": "default"});
|
||||
$("#textbased").show();
|
||||
|
||||
@@ -336,6 +338,7 @@ function switchTo(i)
|
||||
{
|
||||
$("#textbased").hide();
|
||||
$("#uiMapContainer").show();
|
||||
$("#zoomcontainer").show();
|
||||
$("body").css({"padding-left": "0" , "cursor": "default"});
|
||||
//$("#uiMap").css({"width": "auto" , "height": "600" , "margin-top": "20px"});
|
||||
//$("#map").width("800px");
|
||||
@@ -346,26 +349,33 @@ function switchTo(i)
|
||||
}
|
||||
var defaultzoom = 4;
|
||||
function changeZoom(offset){
|
||||
defaultzoom = Math.max(defaultzoom + (offset*2), 1);
|
||||
defaultzoom = Math.max(defaultzoom + offset, 1);
|
||||
var uiMapObject = $('#uiMap');
|
||||
var uiMapWidth = uiMapObject.width() * defaultzoom;
|
||||
var uiMapHeight = uiMapObject.height() * defaultzoom;
|
||||
var ourpos = uiMapObject.position();
|
||||
|
||||
uiMapObject.css({
|
||||
zoom: defaultzoom,
|
||||
left: '50%',
|
||||
top: '50%',
|
||||
left: ourpos["left"],
|
||||
top: ourpos["top"],
|
||||
marginLeft: '-' + Math.floor(uiMapWidth / 2) + 'px',
|
||||
marginTop: '-' + Math.floor(uiMapHeight / 2) + 'px'
|
||||
});
|
||||
document.getElementById('zoomval').innerHTML = (defaultzoom/4)*100 + "%";
|
||||
}
|
||||
|
||||
function setzoom(val){
|
||||
val = parseInt(val);
|
||||
changeZoom(val - defaultzoom);
|
||||
}
|
||||
|
||||
function changezlevels()
|
||||
{
|
||||
var newZ = parseInt(Math.min(Math.max(prompt("View which Z-Level?", z), 1), 6));
|
||||
$("#uiMapImage").attr('src', 'minimap_' + newZ + '.png');
|
||||
z = newZ
|
||||
//$("#uiMapImage").attr('src', 'minimap_' + newZ + '.png');
|
||||
//z = newZ
|
||||
window.location.href = "byond://?src=" + hSrc + "&action=changez&value=" + newZ;
|
||||
}
|
||||
|
||||
function clearAll(ai)
|
||||
@@ -484,7 +494,7 @@ function add(name, assignment, ijob, life_status, dam1, dam2, dam3, dam4, area,
|
||||
var tx = (translate(x - 1, scale_x) - 1).toFixed(0);
|
||||
var ty = (translate(y - 1, scale_y) + 7).toFixed(0);
|
||||
|
||||
var dotElem = $("<div class=\"mapIcon mapIcon16 rank-" + ijobNames[ijob.toString()] + " " + (life_status ? 'alive' : 'dead') + "\" style =\"top:" + ty +"px; left: " + tx + "px;\" z-index: 2; unselectable=\"on\"><div class=\"tooltip hidden\">" + name + " " + (life_status ? "<span class='good'>Living</span>" : "<span class='bad'>Deceased</span>") + " (<span class=\"oxyloss_light\">" + dam1 + "</span>/<span class=\"toxin_light\">" + dam2 + "</span>/<span class=\"burn\">" + dam3 + "</span>/<span class=\"brute\">" + dam4 + "</span>) "+area+": "+pos_x+", "+pos_y+")</div></div>");
|
||||
var dotElem = $("<div class=\"mapIcon mapIcon16 rank-" + ijobNames[ijob.toString()] + " " + (avg_dam <= 25 ? 'good' : (avg_dam > 25 && avg_dam <= 90 ? 'average' : 'bad')) + "\" style =\"top:" + ty +"px; left: " + tx + "px;\" z-index: 2; unselectable=\"on\"><div class=\"tooltip hidden\">" + name + " " + (life_status ? "<span class='good'>Living</span>" : "<span class='bad'>Deceased</span>") + " (<span class=\"oxyloss_light\">" + dam1 + "</span>/<span class=\"toxin_light\">" + dam2 + "</span>/<span class=\"burn\">" + dam3 + "</span>/<span class=\"brute\">" + dam4 + "</span>) "+area+": "+pos_x+", "+pos_y+")</div></div>");
|
||||
//$("#uiMap").append("<div class=\"dot\" style=\"top: " + ty + "px; left: " + tx + "px; background-color: " + color + "; z-index: " + 999 + ";\"></div>");
|
||||
|
||||
$("#uiMap").append(dotElem);
|
||||
|
||||
Reference in New Issue
Block a user