Added a 'controller' for shuttles (really just a data container), fixed up the admin shuttle verbs into one general verb, changed shuttles to use controller instead of populating lists at spawn.

This commit is contained in:
Zuhayr
2014-06-03 18:06:05 +09:30
parent 405055eda8
commit c01b124ac7
8 changed files with 86 additions and 148 deletions
+2 -68
View File
@@ -637,10 +637,7 @@ var/global/floorIsLava = 0
<A href='?src=\ref[src];secretsfun=fakeguns'>Make all items look like guns</A><BR>
<A href='?src=\ref[src];secretsfun=schoolgirl'>Japanese Animes Mode</A><BR>
<A href='?src=\ref[src];secretsfun=eagles'>Egalitarian Station Mode</A><BR>
<A href='?src=\ref[src];secretsfun=moveadminshuttle'>Move Administration Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveferry'>Move Ferry</A><BR>
<A href='?src=\ref[src];secretsfun=movealienship'>Move Alien Dinghy</A><BR>
<A href='?src=\ref[src];secretsfun=moveminingshuttle'>Move Mining Shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=moveshuttle'>Move a shuttle</A><BR>
<A href='?src=\ref[src];secretsfun=blackout'>Break all lights</A><BR>
<A href='?src=\ref[src];secretsfun=whiteout'>Fix all lights</A><BR>
<A href='?src=\ref[src];secretsfun=friendai'>Best Friend AI</A><BR>
@@ -1127,67 +1124,4 @@ proc/get_options_bar(whom, detail = 2, name = 0, link = 1)
//
//ALL DONE
//*********************************************************************************************************
//TO-DO:
//
//
/**********************Administration Shuttle**************************/
var/admin_shuttle_location = 0 // 0 = centcom 13, 1 = station
proc/move_admin_shuttle()
var/area/fromArea
var/area/toArea
if (admin_shuttle_location == 1)
fromArea = locate(/area/shuttle/administration/station)
toArea = locate(/area/shuttle/administration/centcom)
else
fromArea = locate(/area/shuttle/administration/centcom)
toArea = locate(/area/shuttle/administration/station)
fromArea.move_contents_to(toArea)
if (admin_shuttle_location)
admin_shuttle_location = 0
else
admin_shuttle_location = 1
return
/**********************Centcom Ferry**************************/
var/ferry_location = 0 // 0 = centcom , 1 = station
proc/move_ferry()
var/area/fromArea
var/area/toArea
if (ferry_location == 1)
fromArea = locate(/area/shuttle/transport1/station)
toArea = locate(/area/shuttle/transport1/centcom)
else
fromArea = locate(/area/shuttle/transport1/centcom)
toArea = locate(/area/shuttle/transport1/station)
fromArea.move_contents_to(toArea)
if (ferry_location)
ferry_location = 0
else
ferry_location = 1
return
/**********************Alien ship**************************/
var/alien_ship_location = 1 // 0 = base , 1 = mine
proc/move_alien_ship()
var/area/fromArea
var/area/toArea
if (alien_ship_location == 1)
fromArea = locate(/area/shuttle/alien/mine)
toArea = locate(/area/shuttle/alien/base)
else
fromArea = locate(/area/shuttle/alien/base)
toArea = locate(/area/shuttle/alien/mine)
fromArea.move_contents_to(toArea)
if (alien_ship_location)
alien_ship_location = 0
else
alien_ship_location = 1
return
//
+12 -25
View File
@@ -1921,33 +1921,20 @@
message_admins("\blue [key_name_admin(usr)] used everyone is a traitor secret. Objective is [objective]", 1)
log_admin("[key_name(usr)] used everyone is a traitor secret. Objective is [objective]")
//TODO: Generalize admin shuttles, make 'Move Shuttle' adminverb.
if("moveminingshuttle")
if(shuttle_moving["Mining"] || isnull(shuttle_moving["Mining"]))
return
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShM")
move_shuttle("Mining",locate(/area/shuttle/mining/outpost),locate(/area/shuttle/mining/station))
message_admins("\blue [key_name_admin(usr)] moved mining shuttle", 1)
log_admin("[key_name(usr)] moved the mining shuttle")
if("moveadminshuttle")
if("moveshuttle")
if(!shuttles) return // Something is very wrong, the shuttle controller has not been created.
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShA")
move_admin_shuttle()
message_admins("\blue [key_name_admin(usr)] moved the centcom administration shuttle", 1)
log_admin("[key_name(usr)] moved the centcom administration shuttle")
if("moveferry")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShF")
move_ferry()
message_admins("\blue [key_name_admin(usr)] moved the centcom ferry", 1)
log_admin("[key_name(usr)] moved the centcom ferry")
if("movealienship")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","ShX")
move_alien_ship()
message_admins("\blue [key_name_admin(usr)] moved the alien dinghy", 1)
log_admin("[key_name(usr)] moved the alien dinghy")
var/shuttle_tag = input("Which shuttle do you want to call?") as null|anything in shuttles.locations
if(shuttle_tag && !shuttles.moving[shuttle_tag])
move_shuttle(shuttle_tag)
message_admins("\blue [key_name_admin(usr)] moved the [shuttle_tag] shuttle", 1)
log_admin("[key_name(usr)] moved the [shuttle_tag] shuttle")
if("togglebombcap")
feedback_inc("admin_secrets_fun_used",1)
feedback_add_details("admin_secrets_fun_used","BC")