module things, jfc

This commit is contained in:
Poojawa
2018-09-11 07:51:01 -05:00
parent 8b9ef1e400
commit 284e9d0325
695 changed files with 11343 additions and 5661 deletions
+29 -29
View File
@@ -245,7 +245,7 @@
/obj/docking_port/mobile/emergency/proc/is_hijacked()
var/has_people = FALSE
var/hijacker_present = FALSE
for(var/mob/living/player in GLOB.player_list)
if(player.mind)
if(player.stat != DEAD)
@@ -258,10 +258,23 @@
if(shuttle_areas[get_area(player)])
has_people = TRUE
var/location = get_turf(player.mind.current)
if(!(player.mind.has_antag_datum(/datum/antagonist)) && !istype(location, /turf/open/floor/plasteel/shuttle/red) && !istype(location, /turf/open/floor/mineral/plastitanium/brig))
//Non-antag present. Can't hijack.
if(!(player.mind.has_antag_datum(/datum/antagonist)) && !istype(location, /turf/open/floor/plasteel/shuttle/red) && !istype(location, /turf/open/floor/mineral/plastitanium/red/brig))
return FALSE
//Antag present, doesn't stop but let's see if we actually want to hijack
var/prevent = FALSE
for(var/datum/antagonist/A in player.mind.antag_datums)
if(A.can_hijack == HIJACK_HIJACKER)
hijacker_present = TRUE
prevent = FALSE
break //If we have both prevent and hijacker antags assume we want to hijack.
else if(A.can_hijack == HIJACK_PREVENT)
prevent = TRUE
if(prevent)
return FALSE
return has_people
return has_people && hijacker_present
/obj/docking_port/mobile/emergency/proc/ShuttleDBStuff()
set waitfor = FALSE
@@ -409,17 +422,16 @@
/obj/docking_port/mobile/pod
name = "escape pod"
id = "pod"
timid = FALSE
dwidth = 1
width = 3
height = 4
launch_status = UNLAUNCHED
/obj/docking_port/mobile/pod/request()
var/obj/machinery/computer/shuttle/S = getControlConsole()
if(!istype(S, /obj/machinery/computer/shuttle/pod))
/obj/docking_port/mobile/pod/request(obj/docking_port/stationary/S)
var/obj/machinery/computer/shuttle/C = getControlConsole()
if(!istype(C, /obj/machinery/computer/shuttle/pod))
return ..()
if(GLOB.security_level >= SEC_LEVEL_RED || (S && (S.obj_flags & EMAGGED)))
if(GLOB.security_level >= SEC_LEVEL_RED || (C && (C.obj_flags & EMAGGED)))
if(launch_status == UNLAUNCHED)
launch_status = EARLY_LAUNCHED
return ..()
@@ -427,33 +439,12 @@
to_chat(usr, "<span class='warning'>Escape pods will only launch during \"Code Red\" security alert.</span>")
return TRUE
/obj/docking_port/mobile/pod/Initialize()
. = ..()
var/static/i = 1
if(id == initial(id))
id = "[initial(id)][i]"
if(name == initial(name))
name = "[initial(name)] [i]"
for(var/k in shuttle_areas)
var/area/place = k
for(var/obj/machinery/computer/shuttle/pod/pod_comp in place)
if(pod_comp.shuttleId == initial(pod_comp.shuttleId))
pod_comp.shuttleId = id
if(pod_comp.possible_destinations == initial(pod_comp.possible_destinations))
pod_comp.possible_destinations = "pod_lavaland[i]"
i++
/obj/docking_port/mobile/pod/cancel()
return
/obj/machinery/computer/shuttle/pod
name = "pod control computer"
admin_controlled = 1
shuttleId = "pod"
possible_destinations = "pod_asteroid"
icon = 'icons/obj/terminals.dmi'
icon_state = "dorm_available"
@@ -470,6 +461,11 @@
obj_flags |= EMAGGED
to_chat(user, "<span class='warning'>You fry the pod's alert level checking system.</span>")
/obj/machinery/computer/shuttle/pod/connect_to_shuttle(obj/docking_port/mobile/port, obj/docking_port/stationary/dock, idnum, override=FALSE)
. = ..()
if(possible_destinations == initial(possible_destinations) || override)
possible_destinations = "pod_lavaland[idnum]"
/obj/docking_port/stationary/random
name = "escape pod"
id = "pod"
@@ -575,6 +571,10 @@
SSshuttle.emergency = current_emergency
SSshuttle.backup_shuttle = src
/obj/docking_port/mobile/emergency/shuttle_build/register()
. = ..()
initiate_docking(SSshuttle.getDock("emergency_home"))
#undef TIME_LEFT
#undef ENGINES_START_TIME
#undef ENGINES_STARTED