mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Improved Crew Monitoring Console map.
Added icons for use with map.
This commit is contained in:
@@ -1175,6 +1175,7 @@
|
||||
#include "code\modules\nano\JSON Writer.dm"
|
||||
#include "code\modules\nano\nanoexternal.dm"
|
||||
#include "code\modules\nano\nanomanager.dm"
|
||||
#include "code\modules\nano\nanomapgen.dm"
|
||||
#include "code\modules\nano\nanoui.dm"
|
||||
#include "code\modules\organs\blood.dm"
|
||||
#include "code\modules\organs\organ.dm"
|
||||
|
||||
@@ -84,7 +84,10 @@
|
||||
crewmemberData["tox"] = round(H.getToxLoss(), 1)
|
||||
crewmemberData["fire"] = round(H.getFireLoss(), 1)
|
||||
crewmemberData["brute"] = round(H.getBruteLoss(), 1)
|
||||
crewmemberData["name"] = (H.wear_id ? H.wear_id.name : "Unknown")
|
||||
crewmemberData["name"] = (H.wear_id ? H.wear_id.name : "Unknown")
|
||||
crewmemberData["rank"] = "Unknown"
|
||||
if(H.wear_id && istype(H.wear_id, /obj/item/weapon/card/id))
|
||||
crewmemberData["rank"] = H.wear_id:rank
|
||||
crewmemberData["area"] = get_area(H)
|
||||
crewmemberData["x"] = pos.x
|
||||
crewmemberData["y"] = pos.y
|
||||
|
||||
+34
-1
@@ -225,4 +225,37 @@
|
||||
.uiIcon16.icon-grip-solid-vertical { background-position: -32px -224px; }
|
||||
.uiIcon16.icon-grip-solid-horizontal { background-position: -48px -224px; }
|
||||
.uiIcon16.icon-gripsmall-diagonal-se { background-position: -64px -224px; }
|
||||
.uiIcon16.icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
.uiIcon16.icon-grip-diagonal-se { background-position: -80px -224px; }
|
||||
|
||||
.mapIcon16 {
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin: -8px 0 0 -8px;
|
||||
background-image: url(uiIcons16Green.png);
|
||||
background-position: -144px -96px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
.mapIcon16.dead {
|
||||
background-image: url(uiIcons16Red.png);
|
||||
}
|
||||
.mapIcon16.rank-captain {
|
||||
background-position: -224px -112px;
|
||||
}
|
||||
.mapIcon16.rank-headofpersonnel {
|
||||
background-position: -112px -96px;
|
||||
}
|
||||
.mapIcon16.rank-headofsecurity {
|
||||
background-position: -112px -128px;
|
||||
}
|
||||
.mapIcon16.rank-chiefengineer {
|
||||
background-position: -176px -112px;
|
||||
}
|
||||
.mapIcon16.rank-researchdirector {
|
||||
background-position: -128px -128px;
|
||||
}
|
||||
.mapIcon16.rank-chiefmedicalofficer {
|
||||
background-position: -32px -128px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@ body {
|
||||
#uiWrapper {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
#uiTitleWrapper {
|
||||
@@ -53,7 +55,6 @@ body {
|
||||
#uiMapHeader {
|
||||
position: relative;
|
||||
clear: both;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#uiMapContainer {
|
||||
@@ -93,7 +94,6 @@ body {
|
||||
#uiMapFooter {
|
||||
position: relative;
|
||||
clear: both;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#uiContent {
|
||||
@@ -101,6 +101,16 @@ body {
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
#uiMapTooltip {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 10px;
|
||||
border: 1px solid #40628a;
|
||||
background-color: #272727;
|
||||
padding: 8px;
|
||||
display: none;
|
||||
}
|
||||
|
||||
#uiLoadingNotice {
|
||||
position: relative;
|
||||
background: url(uiNoticeBackground.jpg) 50% 50%;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 28 KiB |
@@ -31,26 +31,43 @@ NanoBaseCallbacks = function ()
|
||||
$('.linkActive').stopTime('linkPending');
|
||||
$('.linkActive').removeClass('linkPending');
|
||||
|
||||
$('.linkActive').off('click');
|
||||
$('.linkActive').on('click', function (event) {
|
||||
event.preventDefault();
|
||||
var href = $(this).data('href');
|
||||
if (href != null && _canClick)
|
||||
{
|
||||
_canClick = false;
|
||||
$('body').oneTime(300, 'enableClick', function () {
|
||||
_canClick = true;
|
||||
});
|
||||
if (updateData['config']['status'] == 2)
|
||||
{
|
||||
$(this).oneTime(300, 'linkPending', function () {
|
||||
$(this).addClass('linkPending');
|
||||
});
|
||||
}
|
||||
window.location.href = href;
|
||||
}
|
||||
});
|
||||
}
|
||||
$('.linkActive')
|
||||
.off('click')
|
||||
.on('click', function (event) {
|
||||
event.preventDefault();
|
||||
var href = $(this).data('href');
|
||||
if (href != null && _canClick)
|
||||
{
|
||||
_canClick = false;
|
||||
$('body').oneTime(300, 'enableClick', function () {
|
||||
_canClick = true;
|
||||
});
|
||||
if (updateData['config']['status'] == 2)
|
||||
{
|
||||
$(this).oneTime(300, 'linkPending', function () {
|
||||
$(this).addClass('linkPending');
|
||||
});
|
||||
}
|
||||
window.location.href = href;
|
||||
}
|
||||
});
|
||||
},
|
||||
mapIcons: function (updateData) {
|
||||
$('.mapIcon')
|
||||
.off('mouseenter mouseleave')
|
||||
.on('mouseenter',
|
||||
function (event) {
|
||||
var self = this;
|
||||
$('#uiMapTooltip')
|
||||
.html($(this).children('.tooltip').html())
|
||||
.show()
|
||||
.stopTime()
|
||||
.oneTime(5000, 'hideTooltip', function () {
|
||||
$(this).fadeOut(500);
|
||||
});
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
@@ -65,6 +65,13 @@ NanoStateClass.prototype.onUpdate = function (data) {
|
||||
// Add drag functionality to the map ui
|
||||
$('#uiMap').drags({handle : '#uiMapImage'});
|
||||
|
||||
$('#uiMapTooltip')
|
||||
.off('click')
|
||||
.on('click', function (event) {
|
||||
event.preventDefault();
|
||||
$(this).fadeOut(400);
|
||||
});
|
||||
|
||||
this.mapInitialised = true;
|
||||
}
|
||||
|
||||
|
||||
@@ -147,6 +147,19 @@ Function.prototype.inheritsFrom = function (parentClassOrObject) {
|
||||
return this;
|
||||
};
|
||||
|
||||
if (!String.prototype.trim) {
|
||||
String.prototype.trim = function () {
|
||||
return this.replace(/^\s+|\s+$/g, '');
|
||||
};
|
||||
}
|
||||
|
||||
// Replicate the ckey proc from BYOND
|
||||
if (!String.prototype.ckey) {
|
||||
String.prototype.ckey = function () {
|
||||
return this.replace(/\W/g, '').toLowerCase();
|
||||
};
|
||||
}
|
||||
|
||||
(function($) {
|
||||
$.fn.drags = function(opt) {
|
||||
|
||||
|
||||
@@ -4,6 +4,10 @@ Used In File(s): \code\game\machinery\computer\crew.dm
|
||||
-->
|
||||
{{for data.crewmembers}}
|
||||
{{if value.sensor_type == 3}}
|
||||
<div style="position: absolute; left: {{:((value.x - 1) * 8)}}px; bottom: {{:((value.y - 1) * 8)}}px; width: 8px; height: 8px; background: green;"></div>
|
||||
<div class="mapIcon mapIcon16 rank-{{:value.rank.ckey()}} {{:value.dead ? 'dead' : 'alive'}}" style="left: {{:((value.x - 1) * 8)}}px; bottom: {{:((value.y - 1) * 8)}}px;" unselectable="on">
|
||||
<div class="tooltip hidden">
|
||||
{{:value.name}} ({{:value.dead ? "<span class='bad'>Deceased</span>" : "<span class='good'>Living</span>"}}) (<span class="oxyloss">{{:value.oxy}}</span>/<span class="toxin">{{:value.tox}}</span>/<span class="burn">{{:value.fire}}</span>/<span class="brute">{{:value.brute}}</span>) ({{:value.area}}: {{:value.x}}, {{:value.y}})
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{/for}}
|
||||
{{/for}}
|
||||
@@ -1,22 +1,23 @@
|
||||
<div id='uiTitleWrapper'><div id='uiStatusIcon' class='icon24 uiStatusGood'></div><div id='uiTitleText'>{{:config.title}}</div><div id='uiTitleFluff'></div></div>
|
||||
<div id='uiMapWrapper' class="hidden">
|
||||
<div id='uiMapHeader'>
|
||||
<div id='uiTitleWrapper' unselectable="on"><div id='uiStatusIcon' class='icon24 uiStatusGood' unselectable="on"></div><div id='uiTitleText' unselectable="on">{{:config.title}}</div><div id='uiTitleFluff' unselectable="on"></div></div>
|
||||
<div id='uiMapWrapper' class="hidden" unselectable="on">
|
||||
<div id='uiMapHeader' unselectable="on">
|
||||
{{:helper.link('Hide Map', 'close', {'showMap' : 0})}}
|
||||
<!-- Add a template with the key "mapHeader" to have it rendered here -->
|
||||
</div>
|
||||
<div id='uiMapContainer'>
|
||||
<div id='uiMap'>
|
||||
<img id="uiMapImage" src="nanomap.png" width="2048" height="2048" />
|
||||
<div id='uiMapContent'>
|
||||
<div id='uiMapContainer' unselectable="on">
|
||||
<div id='uiMap' unselectable="on">
|
||||
<img id="uiMapImage" src="nanomap.png" width="2048" height="2048" unselectable="on" />
|
||||
<div id='uiMapContent' unselectable="on">
|
||||
<!-- Add a template with the key "mapContent" to have it rendered here (on the map) -->
|
||||
<!-- Having a "mapContent" template enables the map functionality -->
|
||||
</div>
|
||||
</div>
|
||||
<div id="uiMapTooltip"></div>
|
||||
</div>
|
||||
<div id='uiMapFooter'>
|
||||
<div id='uiMapFooter' unselectable="on">
|
||||
<!-- Add a template with the key "mapFooter" to have it rendered here -->
|
||||
</div>
|
||||
</div>
|
||||
<div id='uiContent'>
|
||||
<div id='uiContent' unselectable="on">
|
||||
<div id='uiLoadingNotice'>Initiating...</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user