mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Fixes war ops being able to launch shuttle before 20 minutes passed. (#91687)
Fixes the lockdown timer counting from server start instead of challenge start. ## Why It's Good For The Game I'm not sure it's actually good, but balance should be explicit not confluence of bugs.
This commit is contained in:
@@ -336,7 +336,8 @@
|
||||
name = "Syndicate Shuttle"
|
||||
greyscale_colors = CIRCUIT_COLOR_GENERIC
|
||||
build_path = /obj/machinery/computer/shuttle/syndicate
|
||||
var/challenge = FALSE
|
||||
/// If operatives declared war this will be the time challenge was started
|
||||
var/challenge_start_time
|
||||
var/moved = FALSE
|
||||
|
||||
/obj/item/circuitboard/computer/syndicate_shuttle/Initialize(mapload)
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
var/war_declared = FALSE
|
||||
for(var/obj/item/circuitboard/computer/syndicate_shuttle/board as anything in GLOB.syndicate_shuttle_boards)
|
||||
if(board.challenge)
|
||||
if(board.challenge_start_time)
|
||||
war_declared = TRUE
|
||||
|
||||
var/force_war_button = ""
|
||||
|
||||
@@ -70,7 +70,7 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
|
||||
return
|
||||
|
||||
for(var/obj/item/circuitboard/computer/syndicate_shuttle/board as anything in GLOB.syndicate_shuttle_boards)
|
||||
if(board.challenge)
|
||||
if(board.challenge_start_time)
|
||||
tgui_alert(usr, "War has already been declared!", "War Was Declared")
|
||||
return
|
||||
|
||||
@@ -94,7 +94,7 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
|
||||
SSblackbox.record_feedback("amount", "nuclear_challenge_mode", 1)
|
||||
|
||||
for(var/obj/item/circuitboard/computer/syndicate_shuttle/board as anything in GLOB.syndicate_shuttle_boards)
|
||||
board.challenge = TRUE
|
||||
board.challenge_start_time = world.time
|
||||
|
||||
for(var/obj/machinery/computer/camera_advanced/shuttle_docker/dock as anything in GLOB.jam_on_wardec)
|
||||
dock.jammed = TRUE
|
||||
@@ -159,7 +159,7 @@ GLOBAL_LIST_EMPTY(jam_on_wardec)
|
||||
if(board.moved)
|
||||
to_chat(user, span_boldwarning("The shuttle has already been moved! You have forfeit the right to declare war."))
|
||||
return FALSE
|
||||
if(board.challenge)
|
||||
if(board.challenge_start_time)
|
||||
to_chat(user, span_boldwarning("War has already been declared!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -20,8 +20,8 @@
|
||||
if(!.)
|
||||
return FALSE
|
||||
var/obj/item/circuitboard/computer/syndicate_shuttle/board = circuit
|
||||
if(board?.challenge && world.time < SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(user, span_warning("You've issued a combat challenge to the station! You've got to give them at least [DisplayTimeText(SYNDICATE_CHALLENGE_TIMER - world.time)] more to allow them to prepare."))
|
||||
if(board?.challenge_start_time && world.time < board.challenge_start_time + SYNDICATE_CHALLENGE_TIMER)
|
||||
to_chat(user, span_warning("You've issued a combat challenge to the station! You've got to give them at least [DisplayTimeText(board.challenge_start_time + SYNDICATE_CHALLENGE_TIMER - world.time)] more to allow them to prepare."))
|
||||
return FALSE
|
||||
board.moved = TRUE
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user