Files
Polaris/code/modules/power/singularity/act.dm
Atlantiscze 3ee4747502 Supermatter delamination tweaks
- In short, delamination changed to more or less mirror effects it has on Bay.
- All of the new delamination effects can be easily tweaked in the future using set of defines.
- In general, aim is to make supermatter delamination a more or less "recoverable" event with enough materials and manpower. Before it was just a mangled irrepairable mess of scuttled steel.
- This brings a LOT of performance improvements and runtime error fixes (grav pull of anchored items which were never meant to move tends to cause runtimes)

Detailed changes:
- Supermatter (and also S5/S6 singularity in the event someone manages to build one, they share the proc) no longer pull anchored items. This brings a MASSIVE reduction in delamination lag (from few second freezes to quite smooth) and prevents things from breaking (i saw dozens of various runtimes when delamination occured as it forcibly dragged things around that weren't supposed to be dragged).
- Delamination crashes the station's power grid, shutting down all APCs for few minutes. Critical areas get shut down only for fraction of that time (we don't want to one-hit the AI). This includes healthcare facilities, which are likely to be very important given the other effects.
- Delamination irradiates and briefly weakens all mobs on the station (not only on the same Z level). I have verified that this is enough to kill an unprotected human if no kind of medical care (at least dylovene, ideally something against rads) is administered.
- Delamination will break a bunch of lights. Nuisance, but easily repairable. Adds to the atmosphere.
- Delamination breaks part of the solar arrays, reducing their output by roughly 60%. This is way less than required to run the station. Puts more emphasis on delamination being engineering-centric emergency, with power rationing being a necessity until solars can be fixed, or other power source secured. Rewards engineering if they managed to stockpile some energy in the SMESes around the station.
- Delamination's explosion is quite weaker than it used to be. It should still be enough to pretty much destroy the engine room (see attached screenshots below), and cause some minor damage in adjacent rooms. It should still, however, be repairable with enough resources and some time.
- Supermatter no longer has additional 99% flat modifier to miss a station Z level when ejected. Emergency core ejection is a last resort measure. It does have its risks. With other changes in this PR, delamination on outer hull is significantly less dangerous than it would be before. It still has various secondary risks, however, such as the radiation or temporary power outage, but with considerably mitigated damage (explosion in space, mostly on outer grilles is generally weaker)

Screenshots:
https://i.imgur.com/K7nBd8a.png    (Standing directly where the core was. Engine room has heavy structural damage and all pipes/machinery are pretty much devastated)
https://i.imgur.com/SGBdTRo.png     (Standing in engine control room. Damage nearby is quite minor (occassional snapped wire or wall panel), but quite widespread).
https://i.imgur.com/JqzF4pW.png     (Solar arrays are heavily damaged. They still provide /some/ power but only a fraction of the original)
2020-04-28 02:49:09 +02:00

126 lines
3.3 KiB
Plaintext

#define I_SINGULO "singulo"
/atom/proc/singularity_act()
return
/atom/proc/singularity_pull(S, current_size)
return
/mob/living/singularity_act()
investigate_log("has been consumed by a singularity", I_SINGULO)
gib()
return 20
/mob/living/singularity_pull(S, current_size)
step_towards(src, S)
apply_effect(current_size * 3, IRRADIATE, blocked = getarmor(null, "rad"))
/mob/living/carbon/human/singularity_act()
var/gain = 20
if(mind)
if((mind.assigned_role == "Station Engineer") || (mind.assigned_role == "Chief Engineer"))
gain = 100
if(mind.assigned_role == "Assistant")
gain = rand(0, 300)
investigate_log(I_SINGULO,"has been consumed by a singularity", I_SINGULO)
gib()
return gain
/mob/living/carbon/human/singularity_pull(S, current_size)
if(current_size >= STAGE_THREE)
var/list/handlist = list(l_hand, r_hand)
for(var/obj/item/hand in handlist)
if(prob(current_size*5) && hand.w_class >= ((11-current_size)/2) && unEquip(hand))
step_towards(hand, S)
to_chat(src, "<span class = 'warning'>The [S] pulls \the [hand] from your grip!</span>")
if(!lying && (!shoes || !(shoes.item_flags & NOSLIP)) && (!species || !(species.flags & NOSLIP)) && prob(current_size*5))
to_chat(src, "<span class='danger'>A strong gravitational force slams you to the ground!</span>")
Weaken(current_size)
..()
/obj/singularity_act()
if(simulated)
ex_act(1)
if(src)
qdel(src)
return 2
/obj/singularity_pull(S, current_size)
set waitfor = 0
if(anchored)
return
sleep(0) //this is needed or multiple items will be thrown sequentially and not simultaneously
if(current_size >= STAGE_FOUR)
step_towards(src,S)
sleep(1)
step_towards(src,S)
else if(current_size > STAGE_ONE)
step_towards(src,S)
else ..()
/obj/effect/beam/singularity_pull()
return
/obj/effect/overlay/singularity_pull()
return
/obj/machinery/power/supermatter/shard/singularity_act()
qdel(src)
return 5000
/obj/machinery/power/supermatter/singularity_act()
if(!src.loc)
return
var/prints = ""
if(src.fingerprintshidden)
prints = ", all touchers : " + src.fingerprintshidden
SetUniversalState(/datum/universal_state/supermatter_cascade)
log_admin("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].")
message_admins("New super singularity made by eating a SM crystal [prints]. Last touched by [src.fingerprintslast].")
qdel(src)
return 50000
/obj/item/projectile/beam/emitter/singularity_pull()
return
/obj/effect/projectile/emitter/singularity_pull()
return
/obj/item/weapon/storage/backpack/holding/singularity_act(S, current_size)
var/dist = max((current_size - 2), 1)
explosion(src.loc,(dist),(dist*2),(dist*4))
return 1000
/turf/singularity_act(S, current_size)
if(!is_plating())
for(var/obj/O in contents)
if(O.level != 1)
continue
if(O.invisibility == 101)
O.singularity_act(src, current_size)
ChangeTurf(get_base_turf_by_area(src))
return 2
/turf/space/singularity_act()
return
/turf/simulated/open/singularity_act()
return
/*******************
* Nar-Sie Act/Pull *
*******************/
/atom/proc/singuloCanEat()
return 1
/mob/observer/singuloCanEat()
return 0
/mob/new_player/singuloCanEat()
return 0