Merge pull request #13479 from LetterN/another-update-mayhaps

Fixes minimap, and dmdocs other things
This commit is contained in:
silicons
2020-10-03 18:02:29 -07:00
committed by GitHub
14 changed files with 143 additions and 70 deletions
@@ -180,10 +180,12 @@
button.screen_loc = DEFAULT_BLOODSPELLS
button.moved = DEFAULT_BLOODSPELLS
button.ordered = FALSE
/datum/action/bloodsucker/passive/Destroy()
if(owner)
Remove(owner)
target = null
return ..()
/////////////////////////////////// TARGETTED POWERS ///////////////////////////////////
@@ -456,6 +456,7 @@
/obj/structure/bloodsucker/candelabrum/Destroy()
STOP_PROCESSING(SSobj, src)
return ..() //return a hint
/obj/structure/bloodsucker/candelabrum/update_icon_state()
icon_state = "candelabrum[lit ? "_lit" : ""]"
+9 -5
View File
@@ -134,12 +134,13 @@
return num;
}
window.onload = function() {
var datas = \[[jointext(datas, ",")]]
if(!window.HTMLCanvasElement){
//something has gone horribly wrong!
if(!window.HTMLCanvasElement) {
var label = document.getElementById("label-1");
label.textContent = "<h1>WARNING! HTMLCanvasElement not found!</h1>"
return false
}
for(var i = 0; i < [length(minimaps)]; i++){
var datas = \[[jointext(datas, ",")]]
for(var i = 0; i < [length(minimaps)]; i++) {
//the fuck is this wrapped?
var data = datas\[i];
var img = document.getElementById("map-" + (i + 1));
@@ -160,13 +161,16 @@
ctx.drawImage(document.getElementById("map-" + (i+1) + "-meta"), 0, 0);
var imagedata = ctx.getImageData(0, 0, img.width, img.height);
var label = document.getElementById("label-" + (i+1));
canvas.onmousemove = function(e){
var rect = canvas.getBoundingClientRect();
var x = Math.floor(e.offsetX * img.width / rect.width);
var y = Math.floor(e.offsetY * img.height / rect.height);
var color_idx = x * 4 + (y * 4 * imagedata.width);
var color = "#" + hexify(imagedata.data\[color_idx]) + hexify(imagedata.data\[color_idx+1]) + hexify(imagedata.data\[color_idx+2]);
var label = document.getElementById("label-" + (i+1)); //label-String(n)
label.textContent = data\[color];
canvas.title = data\[color];
}
+1
View File
@@ -46,6 +46,7 @@
/datum/vore_look/Destroy()
loop = null
selected = null
..() //this is a must
return QDEL_HINT_HARDDEL
/datum/vore_look/Topic(href,href_list[])