Skip to content

Commit

Permalink
Fixes Orion Trail reloading static data (tgstation#64962)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlsnow301 committed Feb 18, 2022
1 parent c86ed7c commit ab653bf
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions code/game/machinery/computer/arcade/orion.dm
Original file line number Diff line number Diff line change
Expand Up @@ -177,14 +177,16 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())

data["reason"] = reason

data["settlers"] = settlers
data["settlermoods"] = settlermoods

return data

/obj/machinery/computer/arcade/orion_trail/ui_static_data(mob/user)
var/list/static_data = list()
static_data["gamename"] = name
static_data["emagged"] = obj_flags & EMAGGED
static_data["settlers"] = settlers
static_data["settlermoods"] = settlermoods

return static_data

/obj/machinery/computer/arcade/orion_trail/ui_act(action, list/params)
Expand Down Expand Up @@ -219,7 +221,6 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())
set_game_over(gamer)
return
new_settler_mood() //events shake people up a bit and can also change food
update_static_data(usr)
return TRUE
switch(action)
if("start_game")
Expand Down Expand Up @@ -348,7 +349,7 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())

/obj/machinery/computer/arcade/orion_trail/proc/set_game_over(user, given_reason)
usr.lost_game()

gameStatus = ORION_STATUS_GAMEOVER
event = null
reason = given_reason || death_reason(user)
Expand Down Expand Up @@ -396,7 +397,6 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())
alive++
if(update)
new_settler_mood()//new faces!
update_static_data(usr)
return newcrew


Expand All @@ -417,7 +417,6 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())
alive--
if(update)
new_settler_mood()//bro, i...
update_static_data(usr)
return removed

/**
Expand Down Expand Up @@ -476,7 +475,7 @@ GLOBAL_LIST_INIT(orion_events, generate_orion_events())

/obj/machinery/computer/arcade/orion_trail/proc/win(mob/user)
usr.won_game()

gameStatus = ORION_STATUS_START
say("Congratulations, you made it to Orion!")
if(obj_flags & EMAGGED)
Expand Down

0 comments on commit ab653bf

Please sign in to comment.