Skip to content

Commit

Permalink
Rounds no longer end instantly
Browse files Browse the repository at this point in the history
I think I learned a valuable lesson today about how changing numerical
modes should be tested.
  • Loading branch information
coiax committed May 26, 2016
1 parent 375b1bc commit 05d23fa
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 10 deletions.
14 changes: 7 additions & 7 deletions code/__DEFINES/shuttles.dm
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
//shuttle mode defines
#define SHUTTLE_IDLE "idle"
#define SHUTTLE_RECALL "recalled"
#define SHUTTLE_CALL "called"
#define SHUTTLE_DOCKED "docked"
#define SHUTTLE_STRANDED "stranded"
#define SHUTTLE_ESCAPE "escape"
#define SHUTTLE_ENDGAME "endgame"
#define SHUTTLE_IDLE 0
#define SHUTTLE_RECALL 1
#define SHUTTLE_CALL 2
#define SHUTTLE_DOCKED 3
#define SHUTTLE_STRANDED 4
#define SHUTTLE_ESCAPE 5
#define SHUTTLE_ENDGAME 6

// Shuttle return values
#define SHUTTLE_NOT_A_DOCKING_PORT "not_a_docking_port"
Expand Down
20 changes: 19 additions & 1 deletion code/modules/shuttle/manipulator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,24 @@
master_ui, state)
ui.open()

/proc/shuttlemode2str(mode)
switch(mode)
if(SHUTTLE_IDLE)
. = "idle"
if(SHUTTLE_RECALL)
. = "recalled"
if(SHUTTLE_CALL)
. = "called"
if(SHUTTLE_DOCKED)
. = "docked"
if(SHUTTLE_STRANDED)
. = "stranded"
if(SHUTTLE_ENDGAME)
. = "endgame"
if(!.)
throw EXCEPTION("shuttlemode2str(): invalid mode [mode]")


/obj/machinery/shuttle_manipulator/ui_data(mob/user)
var/list/data = list()
data["tabs"] = list("Status", "Templates", "Modification")
Expand Down Expand Up @@ -87,7 +105,7 @@
L["id"] = M.id
L["timer"] = M.timer
L["timeleft"] = M.getTimerStr()
L["mode"] = capitalize(M.mode)
L["mode"] = capitalize(shuttlemode2str(M.mode))
L["status"] = M.getStatusText()
if(M == existing_shuttle)
data["existing_shuttle"] = L
Expand Down
Loading

0 comments on commit 05d23fa

Please sign in to comment.