Files
Paradise/code/game/objects/structures/depot.dm
Vi3trice f4b37b4177 Port TG updating appearances (#17943)
* Get pants that match or else you gonna look silly yo

* Posters

* Fix other hud elements

* Rereviewed

* Update shotglass.dm

* Fix for new merged PRs

* Typo

* Coming across other stuff

* Update theblob.dm

* No takebacksies

* smh i forget to leave a comment

* Updated for the detgun and cards

* Should have rerun langserver again

* No longer plastic, more in scope

* Damn you bluespace

* Reverting turret logic, out of scope at this point

* Tweak that part

* Went over energy guns again, and fixed UI White's sprite sheet

* Welding masks, glasses, and JUSTICE

* Update portable_atmospherics.dm

* Cleaning up, clearing things up

* Review and suggestions

* Update valve.dm

* More tweaks

* Missing character

* Not distinct lightmasks, so they can be overlays

* Update generator.dm

* Add parameter so holodeck doesn't try to make a perfect copy

* Update unsorted.dm

* Spiders

* Better fix for spiders, fix vamps too

* Ghosts

* Update telekinesis.dm

* Cleaning up old procs

* It's set up to not copy datums... Unless they're in a list

* Donuts, duct tape, and detgun. D3VR coming to Early Access

* Update procs that interact with doors so they call update_state instead

* Forgot one spot, and actually might as well just force lock

* Cleaning up other things... Sigh, and kitty ears

* oops

* Getting used to how it works

* blinds

* Going back to the suit obscuring thing, so it doesn't update all the time

* Missed that from merging master

* I made this PR and forgot about it

* Fix runtimes in cards

* Make things a bit more unified

* Update update_icons.dm

* yarn, really?

* Update library_equipment.dm

* Update shieldgen.dm

* Every time Charlie merges something, I go back and see if I can improve things further

* what's this? more?

* Update misc_special.dm

* wow, paper

* Review

* More reviews

* To be sure, seems like being broken messed something sometimes

* Brought airlocks closer to how TG works to iron out some stuff

* Pizza and morgue

* Doesn't seem to hurt, tried with holodeck

* Revert "Doesn't seem to hurt, tried with holodeck"

This reverts commit 158529302b.

* Icon conflict

* Fix organ damage

* Don't ask how. Why. It's like that on prod too.

* Cutting down on things and updating from TG.

* More flexible. Just in case the thing you stuck it on didn't destroy.

* Hydro was one the things I touched earlier on, better rework it

* Reviews

* Cleaning up further, also bri'ish

* Undo a change I did, and switch over to a more recent implementation

* Update biogenerator.dm

* Rolling back to old airlocks, but with new duct taped note

* Functionally the same. I'd just rather not have the smoothing happen there

* Went over APCs again

* Fix welding helmet names in species files

* Update airlock.dm

* Update persistent_overlay.dm

* Oh, topic
2022-07-21 08:11:59 +02:00

122 lines
3.5 KiB
Plaintext

/obj/structure/fusionreactor
name = "syndicate fusion reactor"
desc = ""
icon = 'icons/obj/device.dmi'
icon_state = "powersink1"
anchored = TRUE
max_integrity = 50
var/area/syndicate_depot/core/depotarea
var/has_overloaded = FALSE
/obj/structure/fusionreactor/Initialize(mapload)
. = ..()
depotarea = get_area(src)
if(istype(depotarea))
depotarea.reactor = src
for(var/obj/machinery/porta_turret/syndicate/T in range(50, loc))
if(!istype(T.depotarea))
T.depotarea = depotarea
else
log_debug("[src] at [x],[y],[z] failed depotarea istype check during Initialize()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
/obj/structure/fusionreactor/Destroy()
if(istype(depotarea))
if(!has_overloaded)
overload(TRUE, TRUE)
depotarea.reactor = null
return ..()
/obj/structure/fusionreactor/ex_act(severity)
if(severity < 3)
obj_integrity = 0
healthcheck()
/obj/structure/fusionreactor/proc/healthcheck()
if(obj_integrity <= 0 && istype(depotarea))
overload(TRUE)
/obj/structure/fusionreactor/screwdriver_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
to_chat(user, "<span class='danger'>You try to screwdriver open [src], but accidentally release some radiation!</span>")
if(prob(50))
empulse(src, 4, 10)
else
radiation_pulse(get_turf(src), 500, 2)
/obj/structure/fusionreactor/wrench_act(mob/user, obj/item/I)
. = TRUE
if(!I.use_tool(src, user, 0, volume = I.tool_volume))
return
to_chat(user, "<span class='notice'>[src] is too well secured to the floor.</span>")
/obj/structure/fusionreactor/proc/overload(containment_failure = FALSE, skip_qdel = FALSE)
if(has_overloaded)
return
has_overloaded = TRUE
if(istype(depotarea) && !depotarea.used_self_destruct)
depotarea.activate_self_destruct("Fusion reactor cracked open. Core loose!", TRUE)
var/obj/effect/overload/O = new /obj/effect/overload(get_turf(src))
if(containment_failure)
playsound(loc, 'sound/machines/alarm.ogg', 100, 0, 0)
O.deliberate = TRUE
O.max_cycles = 6
if(!skip_qdel)
qdel(src)
/obj/effect/overload
icon = 'icons/obj/tesla_engine/energy_ball.dmi'
icon_state = "energy_ball"
pixel_x = -32
pixel_y = -32
anchored = TRUE
var/cycles = 0
var/beepsound = 'sound/items/timer.ogg'
var/deliberate = FALSE
var/max_cycles = 10
var/area/syndicate_depot/core/depotarea
/obj/effect/overload/Initialize(mapload)
. = ..()
START_PROCESSING(SSobj, src)
depotarea = get_area(src)
if(istype(depotarea))
if(!depotarea.used_self_destruct)
depotarea.used_self_destruct = TRUE // Silences all further alerts from this point onwards.
depotarea.update_state()
depotarea.shields_down()
else
log_debug("[src] at [x],[y],[z] failed depotarea istype check during Initialize()! Either it was spawned outside the depot area (bad idea), or a bug is happening.")
/obj/effect/overload/process()
var/turf/T = get_turf(src)
if(cycles < max_cycles)
if(!deliberate)
playsound(loc, beepsound, 50, 0)
cycles++
return
if(!istype(depotarea))
depotarea = get_area(src)
if(istype(depotarea))
depotarea.destroyed = TRUE
depotarea.update_state()
for(var/obj/structure/closet/L in range(30, T))
for(var/obj/O in L)
qdel(O)
L.open()
for(var/mob/living/M in range(30, T))
M.gib()
for(var/obj/mecha/E in range(30, T))
E.take_damage(E.max_integrity)
explosion(get_turf(src), 25, 35, 45, 55, 1, 1, 60, 0, 0)
STOP_PROCESSING(SSobj, src)
qdel(src)
/obj/effect/overload/ex_act(severity)
return