Removed ingame capture link generation and fixed some bugs.

This commit is contained in:
Karolis2011
2015-08-15 14:04:25 +03:00
parent 9ea9490332
commit 84a9fd2927
2 changed files with 5 additions and 41 deletions

View File

@@ -1,18 +1,5 @@
/datum/admins/proc/toggle_capture_mode()
set category = "Server"
set name = "Toggle Map Capture Mode"
if(/datum/admins/proc/capture_map in usr.verbs)
//Remove verbs
usr.verbs -= /datum/admins/proc/capture_map
usr.verbs -= /datum/admins/proc/capture_map_all
else
//Add verbs
usr.verbs += /datum/admins/proc/capture_map
usr.verbs += /datum/admins/proc/capture_map_all
/datum/admins/proc/capture_map(tx as num, ty as num, tz as num, range as num)
set category = "Tools"
set category = "Server"
set name = "Capture Map Part"
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
@@ -32,7 +19,7 @@
turfstocapture.Add(T)
else
if(!hasasked)
var/answer = alert("Capture includes non existant turf, continue capture?", "Yes", "No")
var/answer = alert("Capture includes non existant turf, Continue capture?","Continue capture?", "No", "Yes")
hasasked = 1
if(answer == "No")
return
@@ -52,34 +39,11 @@
if(A)
var/icon/img = getFlatIcon(A)
if(istype(img, /icon))
if(istype(A, /mob/living) && A.lying)
if(istype(A, /mob/living) && A:lying)
img.BecomeLying()
var/xoff = (A.x - tx) * 32
var/yoff = (A.y - ty) * 32
cap.Blend(img, blendMode2iconMode(A.blend_mode), A.pixel_x + xoff, A.pixel_y + yoff)
for(var/turf/Tu in turfstocapture)
var/xoff = (Tu.x - tx) * 32
var/yoff = (Tu.y - ty) * 32
//What this even does?
//cap.Blend(getFlatIcon(Tu.loc), blendMode2iconMode(Tu.blend_mode), xoff, yoff)
usr << browse_rsc(cap, "map_capture_x[tx]_y[ty]_z[tz]_r[range].png")
/datum/admins/proc/capture_map_all(z as num)
set category = "Tools"
set name = "Generate map capturing links"
var/x_tile = 255 / 17
var/y_tile = 255 / 17
for(var/xt = 0 to x_tile)
for(var/yt = 0 to y_tile)
var/captileX = xt ? xt * 17 : 1
var/captileY = yt ? yt * 17 : 1
usr << "<a href='?src=\ref[/datum/admins/map_capture];action=capture;x=[captileX];y=[captileY];z=[z];r=17'>Capture tile [xt]:[yt]</a>"
/datum/admins/map_capture/Topic(href, href_list[])
if(href_list["action"] == "capture")
capture_map(text2num(href_list["x"]),text2num(href_list["y"]),text2num(href_list["z"]),text2num(href_list["r"]))
usr << browse_rsc(cap, "map_capture_x[tx]_y[ty]_z[tz]_r[range].png")