mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 06:29:23 +01:00
Add No Escape Final Traitor Objective (aka Singularity Shuttle Event) (#86796)
## About The Pull Request This is a remake of: - #77188 - #86655 Both were DNM'd due to a lack of difficulty requirements for spawning a singularity as a shuttle event. --- **No Escape - Final Traitor Objective:** - Spawns a special singularity beacon, syndicate inducer, and wrench. - The beacon must be powered with an inducer and planted on the shuttle to work. - The beacon slowly increases the chance of a massive STAGE SIX (11x11) singularity to appear (1% every 8 seconds) - The beacon can be turned on at any time, but will only increase the chance while on the shuttle and if it is in transit - After 5 seconds the crew gets an announcement that a singularity is approaching and has an extra minute of transit time due to time dilation - If the beacon is turned off or destroyed it decreases the probability by the same rate. (-1% every 8 seconds) - If the beacon is spaced while active it decreases the probability by x2 rate. (-2% every 8 seconds) - If the singularity is spawned while the beacon is disabled or spaced, there is a chance for it to not directly hit the shuttle (but since it's so big it will likely brush against the side) To prevent the singularity from instantly appearing and to give the crew a chance to react, it starts with a negative probability that takes 15 seconds to reach 0%. Deactivating, destroying, or spacing the beacon will slowly reverse the chance but it's not an instant guarantee. So the longer you wait to act, the worse your chances are! I cleaned up quite a bit of the singularity code while I was working on this. CC @Time-Green @MrMelbert ## Why It's Good For The Game There have been several attempts to add a singularity shuttle event that could be triggered but it was deemed too chaotic or the requirements too easy so they were restricted to admin-only events. Making it a final traitor objective, sets a high requirement that must be achieved before activating it as a doomsday event. It also gives the crew a chance to intervene and stop the event before disaster strikes. It's similar to a syndicate bomb ticking down while on the shuttle that serves to be climatic. ## Changelog 🆑 add: Add no escape final traitor objective that spawns a stage six (11x11) singularity shuttle event. /🆑
This commit is contained in:
@@ -13,11 +13,12 @@
|
||||
icon_state = "dark_matter_s1"
|
||||
singularity_icon_variant = "dark_matter"
|
||||
maximum_stage = STAGE_FOUR
|
||||
energy = 250
|
||||
singularity_component_type = /datum/component/singularity/bloodthirsty
|
||||
///to avoid cases of the singuloth getting blammed out of existence by the very meteor it rode in on...
|
||||
COOLDOWN_DECLARE(initial_explosion_immunity)
|
||||
|
||||
/obj/singularity/dark_matter/Initialize(mapload, starting_energy = 250)
|
||||
/obj/singularity/dark_matter/Initialize(mapload, starting_energy)
|
||||
. = ..()
|
||||
COOLDOWN_START(src, initial_explosion_immunity, 5 SECONDS)
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
var/maximum_stage = STAGE_SIX
|
||||
|
||||
///How strong are we?
|
||||
var/energy = 100
|
||||
var/energy = 50
|
||||
///Do we lose energy over time?
|
||||
var/dissipate = TRUE
|
||||
/// How long should it take for us to dissipate in seconds?
|
||||
@@ -55,10 +55,10 @@
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF | SHUTTLE_CRUSH_PROOF
|
||||
obj_flags = CAN_BE_HIT | DANGEROUS_POSSESSION
|
||||
|
||||
/obj/singularity/Initialize(mapload, starting_energy = 50)
|
||||
/obj/singularity/Initialize(mapload, starting_energy)
|
||||
. = ..()
|
||||
|
||||
energy = starting_energy
|
||||
energy = starting_energy || energy
|
||||
|
||||
START_PROCESSING(SSsinguloprocess, src)
|
||||
SSpoints_of_interest.make_point_of_interest(src)
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
singularity_component = WEAKREF(new_component)
|
||||
|
||||
expand(current_size)
|
||||
check_energy()
|
||||
|
||||
for (var/obj/machinery/power/singularity_beacon/singu_beacon as anything in SSmachines.get_machines_by_type_and_subtypes(/obj/machinery/power/singularity_beacon))
|
||||
if (singu_beacon.active)
|
||||
@@ -293,19 +293,19 @@
|
||||
qdel(src)
|
||||
return FALSE
|
||||
switch(energy)//Some of these numbers might need to be changed up later -Mport
|
||||
if(1 to 199)
|
||||
if(STAGE_ONE_ENERGY_REQUIREMENT to STAGE_TWO_ENERGY_REQUIREMENT)
|
||||
allowed_size = STAGE_ONE
|
||||
if(200 to 499)
|
||||
if(STAGE_TWO_ENERGY_REQUIREMENT to STAGE_THREE_ENERGY_REQUIREMENT)
|
||||
allowed_size = STAGE_TWO
|
||||
if(500 to 999)
|
||||
if(STAGE_THREE_ENERGY_REQUIREMENT to STAGE_FOUR_ENERGY_REQUIREMENT)
|
||||
allowed_size = STAGE_THREE
|
||||
if(1000 to 1999)
|
||||
if(STAGE_FOUR_ENERGY_REQUIREMENT to STAGE_FIVE_ENERGY_REQUIREMENT)
|
||||
allowed_size = STAGE_FOUR
|
||||
if(2000 to INFINITY)
|
||||
if(energy >= 3000 && consumed_supermatter)
|
||||
allowed_size = STAGE_SIX
|
||||
else
|
||||
allowed_size = STAGE_FIVE
|
||||
if(STAGE_FIVE_ENERGY_REQUIREMENT to STAGE_SIX_ENERGY_REQUIREMENT)
|
||||
allowed_size = STAGE_FIVE
|
||||
if(STAGE_SIX_ENERGY_REQUIREMENT to INFINITY)
|
||||
allowed_size = consumed_supermatter ? STAGE_SIX : STAGE_FIVE
|
||||
|
||||
if(current_size != allowed_size)
|
||||
expand()
|
||||
return TRUE
|
||||
@@ -496,10 +496,6 @@
|
||||
. = ..()
|
||||
deadchat_plays(mode = DEMOCRACY_MODE)
|
||||
|
||||
/// Special singularity that spawns for shuttle events only
|
||||
/obj/singularity/shuttle_event
|
||||
anchored = FALSE
|
||||
|
||||
/// Special singularity spawned by being sucked into a black hole during emagged orion trail.
|
||||
/obj/singularity/orion
|
||||
move_self = FALSE
|
||||
@@ -512,3 +508,11 @@
|
||||
/obj/singularity/orion/process(seconds_per_tick)
|
||||
if(SPT_PROB(0.5, seconds_per_tick))
|
||||
mezzer()
|
||||
|
||||
/// Special singularity that spawns for shuttle events only
|
||||
/obj/singularity/shuttle_event
|
||||
anchored = FALSE // this is required to work with shuttle event otherwise singularity gets stuck and doesn't move
|
||||
|
||||
/obj/singularity/shuttle_event/no_escape
|
||||
energy = STAGE_SIX_ENERGY
|
||||
consumed_supermatter = TRUE // so we can get to the final stage
|
||||
|
||||
Reference in New Issue
Block a user