shuttle fixes

This commit is contained in:
unid15
2015-10-24 13:52:46 +02:00
parent 0a65da02d0
commit d478f549c9
3 changed files with 61 additions and 3 deletions

View File

@@ -876,7 +876,8 @@ var/global/floorIsLava = 0
//The following commands don't need a selected shuttle
dat += {"
<a href='?src=\ref[src];shuttle_shuttlify=1'>Turn current area into a shuttle</a><br>
<a href='?src=\ref[src];shuttle_mass_lockdown=1'>Lock down all shuttles</a>
<a href='?src=\ref[src];shuttle_add_docking_port=1'>Create a shuttle docking port</a><br>
<a href='?src=\ref[src];shuttle_mass_lockdown=1'>Lock down all shuttles</a><br>
"}
usr << browse(dat, "window=shuttlemagic")

View File

@@ -3397,6 +3397,26 @@
usr << "[S] ([S.type]) selected!"
shuttle_magic() //Update the window!
if(href_list["shuttle_add_docking_port"])
feedback_inc("admin_shuttle_magic_used",1)
feedback_add_details("admin_shuttle_magic_used","CD")
var/area/A = get_area(get_turf(usr))
var/datum/shuttle/shuttle_to_add_to = A.get_shuttle()
if(istype(shuttle_to_add_to))
if(alert(usr, "Would you like the new shuttle docking port to be assigned to [shuttle_to_add_to.name]? [shuttle_to_add_to.linked_port ? "NOTE: It already has a shuttle docking port." : ""]", "Admin abuse", "Yes", "No") != "Yes")
shuttle_to_add_to = null
var/obj/structure/docking_port/shuttle/D = new( get_turf(usr) )
D.dir = usr.dir
if(istype(shuttle_to_add_to))
D.link_to_shuttle(shuttle_to_add_to)
usr << "Assigned the [D] to [shuttle_to_add_to.name]"
message_admins("<span class='notice'>[key_name_admin(usr)] has created a new shuttle docking port in [get_area(D)] [formatJumpTo(get_turf(D))][shuttle_to_add_to ? " and assigned it to [shuttle_to_add_to.name]" : ""]</span>", 1)
log_admin("[key_name_admin(usr)] has created a new destination docking port ([D.areaname]) at [D.x];[D.y];[D.z][shuttle_to_add_to ? " and assigned it to [shuttle_to_add_to.name]" : ""]")
if(href_list["shuttle_create_destination"])
feedback_inc("admin_shuttle_magic_used",1)
@@ -3734,8 +3754,8 @@
if(!A)
usr << "You must be standing on an area!"
return
if(A.type == /area && A.name == "Space")
usr << "You can't shuttlify space. (If this isn't space, rename this area to something else!)"
if(isspace(A))
usr << "You can't turn space into a shuttle."
return
var/datum/shuttle/conflict = A.get_shuttle()

View File

@@ -0,0 +1,37 @@
################################
# Example Changelog File
#
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
#
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
# When it is, any changes listed below will disappear.
#
# Valid Prefixes:
# bugfix
# wip (For works in progress)
# tweak
# soundadd
# sounddel
# rscdel (general adding of nice things)
# rscadd (general deleting of nice things)
# imageadd
# imagedel
# spellcheck (typo fixes)
# experiment
# tgs (TG-ported fixes?)
#################################
# Your name.
author: Unid
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
delete-after: True
# Any changes you've made. See valid prefix list above.
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
# SCREW THIS UP AND IT WON'T WORK.
# Also, this gets changed to [] after reading. Just remove the brackets when you add new shit.
changes:
- rscdel: Shuttles no longer throw stuff when moving
- rscadd: Added a Create Shuttle Docking Port button for admins
- bugfix: Fixed some shuttle-related bugs (one which happened when a shuttle failed to move, another one which happened when docking ports were deleted)