0bca862419
* map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures * lazy fix for bleeding edgy (#252) * map tweaks/shuttle engines * helpers and defines * global/onclick * controllers and datums * mapping * game folder * some other stuff * some modules * modules that aren't mobs * some mob stuff * new player stuff * mob living * silicon stuff * simple animal things * carbon/ayylmao * update_icons * carbon/human * sounds and tools * icons and stuff * hippie grinder changes + tgui * kitchen.dmi * compile issues fixed * mapfix * Mapfixes 2.0 * mapedit2.0 * mapmerger pls * Revert "mapedit2.0" This reverts commit 74139a3cacea10df7aafca06c0a10bd3daf3a481. * clean up vore folder + 2 hotfixes * admin ticket refinement * Blob tweaks and LAZYADD * LAZYADD IS LAZY * Magic strings purged * DEFINES NEED HIGHER PRIORITIES * Only a sleepless idiot deals in absolute TRUE|FALSE * u h g * progress bar fix * reverts ticket logs * there's always that one guy * fixes and stuff * 2/27 fixes * game folder stuff * stats * some modules again * clothing stuff gets vg clothing out of the main files * everything not mobs again * mob stuff * maps, tgui, sql stuff * icons * additional fixes and compile errors * don't need this anymore * Oh right this isn't needed anymore * maint bar re-added * that doesn't need to be here * stupid events * wtfeven * probably makes Travis happy * don't care to fix the grinder atm * fixes vending sprites, changes turret * lethal, not lethals * overylays are finicky creatures
45 lines
1.6 KiB
Plaintext
45 lines
1.6 KiB
Plaintext
/client/proc/map_template_load()
|
|
set category = "Debug"
|
|
set name = "Map template - Place"
|
|
|
|
var/datum/map_template/template
|
|
|
|
var/map = input(usr, "Choose a Map Template to place at your CURRENT LOCATION","Place Map Template") as null|anything in SSmapping.map_templates
|
|
if(!map)
|
|
return
|
|
template = SSmapping.map_templates[map]
|
|
|
|
var/turf/T = get_turf(mob)
|
|
if(!T)
|
|
return
|
|
|
|
var/list/preview = list()
|
|
for(var/S in template.get_affected_turfs(T,centered = TRUE))
|
|
preview += image('icons/turf/overlays.dmi',S,"greenOverlay")
|
|
usr.client.images += preview
|
|
if(alert(usr,"Confirm location.","Template Confirm","Yes","No") == "Yes")
|
|
if(template.load(T, centered = TRUE))
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) at <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a></span>")
|
|
else
|
|
usr << "Failed to place map"
|
|
usr.client.images -= preview
|
|
|
|
/client/proc/map_template_upload()
|
|
set category = "Debug"
|
|
set name = "Map Template - Upload"
|
|
|
|
var/map = input(usr, "Choose a Map Template to upload to template storage","Upload Map Template") as null|file
|
|
if(!map)
|
|
return
|
|
if(copytext("[map]",-4) != ".dmm")
|
|
usr << "Bad map file: [map]"
|
|
return
|
|
|
|
var/datum/map_template/M = new(map=map, rename="[map]")
|
|
if(M.preload_size(map))
|
|
usr << "Map template '[map]' ready to place ([M.width]x[M.height])"
|
|
SSmapping.map_templates[M.name] = M
|
|
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has uploaded a map template ([map])</span>")
|
|
else
|
|
usr << "Map template '[map]' failed to load properly"
|