[MIRROR] Fixes inability to declare war as nukies [MDB IGNORE] (#18360)

* Fixes inability to declare war as nukies

* Update admin_verbs.dm

Co-authored-by: Zephyr <12817816+ZephyrTFA@users.noreply.github.com>
Co-authored-by: Zonespace <41448081+Zonespace27@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-12-31 19:57:08 +01:00
committed by GitHub
parent 0a29fd423c
commit 562aa6fe3a
6 changed files with 22 additions and 9 deletions
+2
View File
@@ -148,6 +148,8 @@
return FALSE
if (is_station_level(destination_turf.z))
return TRUE
if(atom_to_check.onSyndieBase())
return TRUE
var/area/destination_area = destination_turf.loc
if (is_centcom_level(destination_turf.z))
+3 -3
View File
@@ -462,9 +462,9 @@
return TRUE
/**
* Is the atom in any of the centcom syndicate areas
* Is the atom in any of the syndicate areas
*
* Either in the syndie base on centcom, or any of their shuttles
* Either in the syndie base, or any of their shuttles
*
* Also used in gamemode code for win conditions
*/
@@ -473,7 +473,7 @@
if(!current_turf)
return FALSE
if(!is_centcom_level(current_turf.z))//if not, don't bother
if(!is_reserved_level(current_turf.z))//if not, don't bother
return FALSE
if(istype(current_turf.loc, /area/shuttle/syndicate) || istype(current_turf.loc, /area/centcom/syndicate_mothership) || istype(current_turf.loc, /area/shuttle/assault_pod))
+4
View File
@@ -1017,6 +1017,10 @@ GLOBAL_PROTECT(admin_verbs_poll)
if(!check_rights(R_ADMIN))
return
if(SSticker.current_state != GAME_STATE_PLAYING)
to_chat(usr, span_warning("The game hasnt started yet!"))
return
var/list/choices = LAZY_TEMPLATE_KEY_LIST_ALL()
var/choice = tgui_input_list(usr, "Key?", "Lazy Loader", choices)
if(!choice)
@@ -6,7 +6,7 @@
if(DETONATION_HIT_STATION)
// And it was detonated by nuke ops
if(length(get_antag_minds(/datum/antagonist/nukeop)))
if(is_infiltrator_docked_at_centcom())
if(is_infiltrator_docked_at_syndiebase())
// And the ops escaped, they won!
return /datum/cinematic/nuke/ops_victory
else
+11 -4
View File
@@ -361,7 +361,7 @@
/datum/team/nuclear/proc/get_result()
var/shuttle_evacuated = EMERGENCY_ESCAPED_OR_ENDGAMED
var/disk_rescued = is_disk_rescued()
var/syndies_didnt_escape = !is_infiltrator_docked_at_centcom()
var/syndies_didnt_escape = !is_infiltrator_docked_at_syndiebase()
var/team_is_dead = are_all_operatives_dead()
var/station_was_nuked = GLOB.station_was_nuked
var/station_nuke_source = GLOB.station_nuke_source
@@ -494,8 +494,15 @@
return common_part + disk_report + challenge_report
/// Returns whether or not syndicate operatives escaped.
/proc/is_infiltrator_docked_at_centcom()
/proc/is_infiltrator_docked_at_syndiebase()
var/obj/docking_port/mobile/infiltrator/infiltrator_port = SSshuttle.getShuttle("syndicate")
var/obj/docking_port/stationary/transit/infiltrator_dock = locate() in infiltrator_port.loc
return infiltrator_port && (is_centcom_level(infiltrator_port.z) || infiltrator_dock)
var/datum/lazy_template/nukie_base/nukie_template = GLOB.lazy_templates[LAZY_TEMPLATE_KEY_NUKIEBASE]
if(!nukie_template)
return FALSE // if its not even loaded, cant be docked
for(var/datum/turf_reservation/loaded_area as anything in nukie_template.reservations)
var/infiltrator_turf = get_turf(infiltrator_port)
if(infiltrator_turf in loaded_area.reserved_turfs)
return TRUE
return FALSE
+1 -1
View File
@@ -49,7 +49,7 @@
. = ..()
if(!.)
return FALSE
if(!is_centcom_level(z))
if(!is_reserved_level(z))
to_chat(user, span_warning("Pods are one way!"))
return FALSE
return TRUE