Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pods tweaks and features, changes to pods crash chance #3945

Merged
merged 9 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions code/modules/shuttle/computers/escape_pod_computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,18 @@
heat_proof = 1
unslashable = TRUE
unacidable = TRUE
var/obj/docking_port/mobile/escape_shuttle/linked_shuttle

/obj/structure/machinery/door/airlock/evacuation/Initialize()
. = ..()
INVOKE_ASYNC(src, PROC_REF(lock))

/obj/structure/machinery/door/airlock/evacuation/Destroy()
if(linked_shuttle)
linked_shuttle.mode = SHUTTLE_CRASHED
linked_shuttle.door_handler.doors -= list(src)
. = ..()

//Can't interact with them, mostly to prevent grief and meta.
/obj/structure/machinery/door/airlock/evacuation/Collided()
return FALSE
Expand All @@ -219,8 +226,24 @@
/obj/structure/machinery/door/airlock/evacuation/attack_hand()
return FALSE

/obj/structure/machinery/door/airlock/evacuation/attack_alien()
return FALSE //Probably a better idea that these cannot be forced open.
/obj/structure/machinery/door/airlock/evacuation/attack_alien(mob/living/carbon/xenomorph/xeno)
if(!density || unslashable) //doors become slashable after evac is called
return FALSE

if(xeno.claw_type < CLAW_TYPE_SHARP)
to_chat(xeno, SPAN_WARNING("[src] is bolted down tight."))
return XENO_NO_DELAY_ACTION

xeno.animation_attack_on(src)
playsound(src, 'sound/effects/metalhit.ogg', 25, 1)
take_damage(HEALTH_DOOR / XENO_HITS_TO_DESTROY_BOLTED_DOOR)
return XENO_ATTACK_ACTION


/obj/structure/machinery/door/airlock/evacuation/attack_remote()
return FALSE

/obj/structure/machinery/door/airlock/evacuation/get_applying_acid_time() //you can melt evacuation doors only when they are manually locked
if(!density)
return -1
return ..()
26 changes: 23 additions & 3 deletions code/modules/shuttle/shuttles/escape_shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
ignitionTime = 8 SECONDS
ignition_sound = 'sound/effects/escape_pod_warmup.ogg'
/// The % chance of the escape pod crashing into the groundmap
var/crash_land_chance = 33
var/early_crash_land_chance = 75
var/crash_land_chance = 25

var/datum/door_controller/single/door_handler = new()
var/launched = FALSE
Expand All @@ -19,11 +20,12 @@
/obj/docking_port/mobile/escape_shuttle/Initialize(mapload)
. = ..(mapload)
for(var/place in shuttle_areas)
for(var/obj/structure/machinery/door/air in place)
for(var/obj/structure/machinery/door/airlock/evacuation/air in place)
door_handler.doors += list(air)
air.breakable = FALSE
air.indestructible = TRUE
air.unacidable = TRUE
air.linked_shuttle = src

/obj/docking_port/mobile/escape_shuttle/proc/cancel_evac()
door_handler.control_doors("force-unlock")
Expand All @@ -43,6 +45,12 @@
for(var/area/interior_area in shuttle_areas)
for(var/obj/structure/machinery/cryopod/evacuation/cryotube in interior_area)
cryotube.dock_state = STATE_READY
for(var/obj/structure/machinery/door/air in door_handler.doors)
air.breakable = TRUE
air.indestructible = FALSE
air.unslashable = FALSE
air.unacidable = FALSE


/obj/docking_port/mobile/escape_shuttle/proc/evac_launch()
if(mode == SHUTTLE_CRASHED)
Expand Down Expand Up @@ -76,14 +84,24 @@
return

destination = null
if(prob(crash_land_chance))
if(prob((EvacuationAuthority.evac_status >= EVACUATION_STATUS_IN_PROGRESS ? crash_land_chance : early_crash_land_chance)))
create_crash_point()

set_mode(SHUTTLE_IGNITING)
on_ignition()
setTimer(ignitionTime)
launched = TRUE

if(!crash_land) // so doors won't break in space
harryob marked this conversation as resolved.
Show resolved Hide resolved
for(var/obj/structure/machinery/door/air in door_handler.doors)
for(var/obj/effect/xenomorph/acid/acid in air.loc)
if(acid.acid_t == air)
qdel(acid)
air.breakable = FALSE
air.indestructible = TRUE
air.unacidable = TRUE


/obj/docking_port/mobile/escape_shuttle/proc/create_crash_point()
for(var/i = 1 to 10)
var/list/all_ground_levels = SSmapping.levels_by_trait(ZTRAIT_GROUND)
Expand Down Expand Up @@ -191,6 +209,8 @@
id = ESCAPE_SHUTTLE_EAST_CL
width = 4
height = 5
early_crash_land_chance = 25
crash_land_chance = 5

/obj/docking_port/mobile/escape_shuttle/w
id = ESCAPE_SHUTTLE_WEST
Expand Down