Fixes to getFlatIcon and more. (#3353)

(Rebased and reopened #3347)

Attempted to fix pipe and door rendering
Fixed Table, carpet rendering
Ported full map-capture tool from bay, with python script to merge captured images.
This commit is contained in:
Karolis
2017-09-19 15:43:01 +03:00
committed by Erki
parent 82be2f30ad
commit 031b958039
15 changed files with 197 additions and 12 deletions
+3 -2
View File
@@ -145,7 +145,7 @@ var/list/admin_verbs_spawn = list(
/client/proc/spawn_chemdisp_cartridge
)
var/list/admin_verbs_server = list(
/datum/admins/proc/capture_map,
/datum/admins/proc/capture_map_part,
/client/proc/Set_Holiday,
/datum/admins/proc/startnow,
/datum/admins/proc/restart,
@@ -213,7 +213,8 @@ var/list/admin_verbs_debug = list(
/client/proc/cmd_display_del_log,
/client/proc/cmd_display_init_log,
/client/proc/cmd_ss_panic,
/client/proc/reset_openturf
/client/proc/reset_openturf,
/datum/admins/proc/capture_map
)
var/list/admin_verbs_paranoid_debug = list(
+57 -2
View File
@@ -1,4 +1,4 @@
/datum/admins/proc/capture_map(tx as null|num, ty as null|num, tz as null|num, range as null|num)
/datum/admins/proc/capture_map_part(tx as null|num, ty as null|num, tz as null|num, range as null|num)
set category = "Server"
set name = "Capture Map Part"
set desc = "Usage: Capture-Map-Part target_x_cord target_y_cord target_z_cord range (captures part of a map originating from bottom left corner)"
@@ -18,9 +18,64 @@
return
if(locate(tx,ty,tz))
var/cap = generate_image(tx ,ty ,tz ,range, CAPTURE_MODE_PARTIAL, null, 1, 1)
var/ligths = 0
if(alert("Do you want lighting to be included in capture?", "Map Capture", "No", "Yes") == "Yes")
ligths = 1
var/cap = generate_image(tx ,ty ,tz ,range, CAPTURE_MODE_PARTIAL, null, ligths, 1)
var/file_name = "map_capture_x[tx]_y[ty]_z[tz]_r[range].png"
usr << "Saved capture in cache as [file_name]."
usr << browse_rsc(cap, file_name)
else
usr << "Target coordinates are incorrect."
/datum/admins/proc/capture_map_capture_next(currentz, currentx, currenty, ligths)
if(locate(currentx, currenty, currentz))
var/cap = generate_image(currentx ,currenty ,currentz ,16, CAPTURE_MODE_PARTIAL, null, ligths, 1)
var/file_name = "map_capture_x[currentx]_y[currenty]_z[currentz]_r16.png"
usr << "Saved capture in cache as [file_name]."
usr << browse_rsc(cap, file_name)
currentx = currentx + 16
spawn (6)
del(cap)
.(currentz, currentx, currenty, ligths)
else
currenty = currenty + 16
currentx = 1
if(locate(currentx, currenty, currentz))
var/cap = generate_image(currentx ,currenty ,currentz ,16, CAPTURE_MODE_PARTIAL, null, ligths, 1)
var/file_name = "map_capture_x[currentx]_y[currenty]_z[currentz]_r16.png"
usr << "Saved capture in cache as [file_name]."
usr << browse_rsc(cap, file_name)
currentx = currentx + 16
spawn (6)
del(cap)
.(currentz, currentx, currenty, ligths)
else
usr << "End of map, capture is done."
/datum/admins/proc/capture_map(tz as null|num)
set category = "Server"
set name = "Capture Map"
set desc = "Usage: Capture-Map target_z_cord (captures map)"
if(!check_rights(R_ADMIN|R_DEBUG|R_SERVER))
usr << "You are not allowed to use this command"
return
if(isnull(tz))
usr << "Map Part, map using camara like rendering."
usr << "Usage: Capture-Map target_z_cord"
usr << "Target Z coordinates define z level to capture."
return
if(!locate(1, 1, tz))
usr << "Target z-level is incorrect."
return
var/ligths = 0
if(alert("Do you want lighting to be included in capture?", "Map Capture", "No", "Yes") == "Yes")
ligths = 1
switch(alert("Are you sure? (This will cause masive lag!!!)", "Map Capture", "No", "Yes"))
if("Yes")
usr.client.holder.capture_map_capture_next(tz, 1, 1, ligths)