POLARIS: Tweak map-loading in some ways

Fixes loading of map templates, now loads it acutally in the center instead of to the upper-left of center.
Warns you if you try to load a submap which is larger than the current world size.
This commit is contained in:
Arokha Sieyes
2018-01-25 16:33:36 -05:00
committed by Leshana
parent 6f8d35a2b3
commit 9d0ffb96ee
3 changed files with 22 additions and 6 deletions

View File

@@ -41,7 +41,12 @@
if(!map)
return
template = map_templates[map]
if(template.width > world.maxx || template.height > world.maxy)
if(alert(usr,"This template is larger than the existing z-levels. It will EXPAND ALL Z-LEVELS to match the size of the template. This may cause chaos. Are you sure you want to do this?","DANGER!!!","Cancel","Yes") == "Cancel")
to_chat(usr,"Template placement aborted.")
return
if(alert(usr,"Confirm map load.", "Template Confirm","No","Yes") == "Yes")
if(template.load_new_z())
message_admins("<span class='adminnotice'>[key_name_admin(usr)] has placed a map template ([template.name]) on Z level [world.maxz].</span>")