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

Changes evac pod crash chance from a define to a var #3790

Merged
merged 6 commits into from
Jul 5, 2023
Merged
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
15 changes: 9 additions & 6 deletions code/modules/shuttle/shuttles/escape_shuttle.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#define CRASH_LAND_PROBABILITY 33

/obj/docking_port/mobile/escape_shuttle
name = "Escape Pod"
id = ESCAPE_SHUTTLE
Expand All @@ -10,6 +8,8 @@
rechargeTime = SHUTTLE_RECHARGE
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/datum/door_controller/single/door_handler = new()
var/launched = FALSE
Expand Down Expand Up @@ -76,7 +76,7 @@
return

destination = null
if(prob(CRASH_LAND_PROBABILITY))
if(prob(crash_land_chance))
create_crash_point()

set_mode(SHUTTLE_IGNITING)
Expand Down Expand Up @@ -176,6 +176,12 @@
. = ..()
playsound(src,'sound/effects/escape_pod_launch.ogg', 50, 1)

/obj/docking_port/mobile/escape_shuttle/proc/force_crash()
create_crash_point()
set_mode(SHUTTLE_IGNITING)
on_ignition()
setTimer(ignitionTime)

/obj/docking_port/mobile/escape_shuttle/e
id = ESCAPE_SHUTTLE_EAST
width = 4
Expand Down Expand Up @@ -270,6 +276,3 @@
/datum/map_template/shuttle/escape_pod_e_cl
name = "Escape Pod E CL"
shuttle_id = ESCAPE_SHUTTLE_EAST_CL


#undef CRASH_LAND_PROBABILITY
Loading