Skip to content

Commit

Permalink
Pods tweaks and features, changes to pods crash chance (#3945)
Browse files Browse the repository at this point in the history
# About the pull request

Xenos can break and acid manually locked pods' doors, but still cannot
slash/acid them before evac is called to prevent metagaming. Pod cannot
launch without doors. No more delaying in pods.

Early launch has a 75% chance of crash, launch after the evacuation
timer (whether manual or automatic) has only 25%.

CL's pod has a 25% chance of crash on early launch and only 5%
otherwise.


# Explain why it's good for the game

Encourages players to actually play during hijack sequence. You need to
live for long enough to have a better chance to evac on pods, but if
situation is dire you can still risk it. If you crash, your story
continues. Also, no more delayers in pods.


# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>



</details>


# Changelog
:cl: ihatethisengine
balance: early pod launch now has a 75% chance of crashing, launch after
the timer has a 25% chance.
add: CL's pod has a 25% chance of crashing on early launch and only 5%
otherwise.
add: xenos can slash and melt manually locked pod's doors.
/:cl:

---------

Co-authored-by: ihatethisengine <[email protected]>
Co-authored-by: harryob <[email protected]>
  • Loading branch information
3 people authored Jul 24, 2023
1 parent 27460e8 commit 6f3b74b
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 5 deletions.
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
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

0 comments on commit 6f3b74b

Please sign in to comment.