Rad collectors gone, tesla coils to generate power (#61917)

Co-authored-by: Mothblocks <35135081+Mothblocks@users.noreply.github.com>
This commit is contained in:
Ghilker
2021-10-09 02:03:52 +02:00
committed by GitHub
parent 7b9c807b8b
commit cc3bf70da9
20 changed files with 257 additions and 161 deletions
+8 -3
View File
@@ -2853,7 +2853,7 @@
/area/ruin/space/has_grav/ancientstation/betacorridor)
"hK" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/power/rad_collector,
/obj/machinery/power/tesla_coil,
/turf/open/floor/plating,
/area/ruin/space/has_grav/ancientstation/deltacorridor)
"hL" = (
@@ -6300,6 +6300,11 @@
/obj/effect/spawner/random/maintenance/three,
/turf/open/floor/plating,
/area/ruin/space/has_grav/ancientstation/deltacorridor)
"rZ" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/power/grounding_rod,
/turf/open/floor/plating,
/area/ruin/space/has_grav/ancientstation/deltacorridor)
"sy" = (
/obj/effect/decal/cleanable/dirt,
/obj/effect/decal/cleanable/dirt,
@@ -11432,8 +11437,8 @@ bE
hK
hK
dh
dh
dh
rZ
rZ
dh
Zk
DC
+20 -4
View File
@@ -46795,8 +46795,8 @@
/obj/structure/window/reinforced/plasma/spawner/west{
dir = 4
},
/obj/machinery/power/rad_collector/anchored,
/obj/structure/cable,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"hVZ" = (
@@ -73462,6 +73462,14 @@
},
/turf/open/floor/iron,
/area/security/brig)
"pKk" = (
/obj/structure/window/reinforced/plasma/spawner/west{
dir = 1
},
/obj/structure/cable,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"pKR" = (
/obj/structure/cable,
/obj/effect/turf_decal/tile/purple{
@@ -82388,6 +82396,14 @@
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/turf/open/floor/iron,
/area/hallway/primary/central/aft)
"spy" = (
/obj/structure/window/reinforced/plasma/spawner/west{
dir = 4
},
/obj/structure/cable,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"spz" = (
/obj/structure/cable,
/obj/effect/turf_decal/tile/neutral{
@@ -87254,8 +87270,8 @@
/obj/structure/window/reinforced/plasma/spawner/west{
dir = 1
},
/obj/machinery/power/rad_collector/anchored,
/obj/structure/cable,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"tLT" = (
@@ -123183,7 +123199,7 @@ cnP
kuB
qzf
hVW
hVW
spy
hVW
qzf
qzf
@@ -123699,7 +123715,7 @@ hWu
rgQ
uqa
wrL
tLP
pKk
vyP
eZx
hfD
@@ -27392,12 +27392,12 @@
/turf/open/floor/iron,
/area/hallway/primary/aft)
"kpY" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 8
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"kqc" = (
@@ -27506,12 +27506,12 @@
/turf/open/floor/iron,
/area/science/xenobiology)
"ksu" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 4
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"ksz" = (
@@ -37796,6 +37796,15 @@
/obj/machinery/status_display/evac/directional/south,
/turf/open/floor/iron,
/area/hallway/primary/central)
"pRi" = (
/obj/structure/window/reinforced/plasma{
dir = 4
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"pRo" = (
/obj/effect/decal/cleanable/dirt,
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{
@@ -39646,6 +39655,15 @@
/obj/machinery/atmospherics/pipe/smart/manifold4w/scrubbers/hidden/layer2,
/turf/open/floor/iron,
/area/commons/storage/primary)
"qTt" = (
/obj/structure/window/reinforced/plasma{
dir = 8
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"qTA" = (
/obj/effect/turf_decal/tile/red,
/obj/effect/turf_decal/tile/red{
@@ -81684,7 +81702,7 @@ wOE
hua
tLr
ksu
ksu
pRi
ksu
hua
mLE
@@ -82712,7 +82730,7 @@ hua
mWg
tLr
kpY
kpY
qTt
kpY
hua
mLE
+26 -4
View File
@@ -39143,6 +39143,17 @@
icon_state = "platingdmg1"
},
/area/maintenance/disposal)
"hHY" = (
/obj/structure/window/reinforced/plasma{
dir = 8
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/cyan/visible,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/circuit/green{
luminosity = 2
},
/area/engineering/supermatter)
"hIk" = (
/obj/effect/turf_decal/tile/red,
/obj/effect/turf_decal/tile/red{
@@ -48254,12 +48265,12 @@
/turf/open/floor/iron,
/area/hallway/primary/fore)
"kVo" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 4
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/green/visible,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/circuit/green{
luminosity = 2
},
@@ -65924,12 +65935,12 @@
/turf/open/floor/iron/showroomfloor,
/area/science/mixing)
"rzN" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 8
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/cyan/visible,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/circuit/green{
luminosity = 2
},
@@ -79766,6 +79777,17 @@
},
/turf/open/floor/plating,
/area/cargo/warehouse)
"wRq" = (
/obj/structure/window/reinforced/plasma{
dir = 4
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/green/visible,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/circuit/green{
luminosity = 2
},
/area/engineering/supermatter)
"wRx" = (
/obj/effect/decal/cleanable/dirt,
/obj/structure/closet/masks,
@@ -118881,7 +118903,7 @@ eAV
gOw
eux
kVo
kVo
wRq
kVo
qkL
jts
@@ -119909,7 +119931,7 @@ qkL
qoR
opS
rzN
rzN
hHY
rzN
qkL
dlF
+45 -29
View File
@@ -23035,6 +23035,13 @@
},
/turf/open/floor/iron/white,
/area/science/cytology)
"fUP" = (
/obj/machinery/atmospherics/components/binary/pump{
dir = 4;
name = "Gas to Chamber"
},
/turf/open/floor/engine,
/area/engineering/supermatter)
"fUR" = (
/obj/machinery/light/small/directional/south,
/obj/effect/turf_decal/tile/purple,
@@ -31319,6 +31326,13 @@
},
/turf/open/floor/iron,
/area/security/brig)
"iZv" = (
/obj/structure/window/reinforced/plasma,
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/cyan/visible,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"iZM" = (
/obj/effect/turf_decal/stripes/line,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
@@ -32887,6 +32901,15 @@
/obj/machinery/seed_extractor,
/turf/open/floor/plating,
/area/maintenance/starboard/aft)
"jFd" = (
/obj/structure/window/reinforced/plasma{
dir = 1
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/green/visible,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"jFe" = (
/obj/machinery/door/airlock/maintenance{
name = "Pharmacy Maintenance";
@@ -35014,14 +35037,6 @@
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
/turf/open/floor/plating,
/area/maintenance/central)
"kuT" = (
/obj/effect/turf_decal/stripes/line,
/obj/machinery/atmospherics/components/binary/pump{
dir = 8;
name = "Mix Bypass"
},
/turf/open/floor/engine,
/area/engineering/supermatter/room)
"kuY" = (
/obj/structure/cable,
/obj/machinery/atmospherics/components/unary/vent_scrubber/on/layer2{
@@ -35567,6 +35582,13 @@
},
/turf/open/floor/iron/white/side,
/area/medical/medbay/central)
"kDK" = (
/obj/effect/turf_decal/stripes/line{
dir = 4
},
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical,
/turf/open/floor/engine,
/area/engineering/supermatter/room)
"kDL" = (
/obj/structure/disposalpipe/segment{
dir = 9
@@ -39770,10 +39792,10 @@
/turf/open/floor/engine/n2o,
/area/engineering/atmos)
"mfL" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma,
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/cyan/visible,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"mfM" = (
@@ -43787,13 +43809,6 @@
},
/turf/open/floor/iron,
/area/hallway/primary/central)
"nzH" = (
/obj/machinery/atmospherics/components/binary/pump{
dir = 4;
name = "Gas to Chamber"
},
/turf/open/floor/engine,
/area/engineering/supermatter)
"nzL" = (
/obj/structure/sink/kitchen{
desc = "A sink used for washing one's hands and face. It looks rusty and home-made";
@@ -48229,12 +48244,12 @@
/turf/open/floor/iron/dark,
/area/security/brig)
"pdy" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 1
},
/obj/structure/cable,
/obj/machinery/atmospherics/pipe/smart/manifold4w/green/visible,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"pdS" = (
@@ -62709,6 +62724,14 @@
},
/turf/open/floor/iron,
/area/cargo/miningoffice)
"umM" = (
/obj/effect/turf_decal/stripes/line,
/obj/machinery/atmospherics/components/binary/pump{
dir = 8;
name = "Mix Bypass"
},
/turf/open/floor/engine,
/area/engineering/supermatter/room)
"unk" = (
/obj/machinery/door/window/northleft{
dir = 8;
@@ -71247,13 +71270,6 @@
/obj/effect/decal/cleanable/dirt,
/turf/open/floor/iron,
/area/commons/dorms)
"xqo" = (
/obj/effect/turf_decal/stripes/line{
dir = 4
},
/obj/machinery/atmospherics/components/trinary/filter/flipped/critical,
/turf/open/floor/engine,
/area/engineering/supermatter/room)
"xqs" = (
/obj/effect/landmark/xeno_spawn,
/obj/machinery/atmospherics/pipe/smart/manifold4w/supply/hidden/layer4,
@@ -116176,7 +116192,7 @@ gsg
jOd
jOd
fPi
nzH
fUP
toS
wCN
fPi
@@ -116946,11 +116962,11 @@ aGS
gsg
iYv
wST
mfL
iZv
jrn
ctk
mNF
pdy
jFd
wST
ifR
jqt
@@ -117200,7 +117216,7 @@ rVz
qHT
vQt
aGS
kuT
umM
ugD
toS
mfL
@@ -117972,7 +117988,7 @@ kKv
nQq
wLu
xGy
xqo
kDK
tpa
xle
gda
+22 -4
View File
@@ -9786,12 +9786,12 @@
/turf/open/floor/iron,
/area/hallway/secondary/construction/engineering)
"bdI" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 8
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/structure/cable,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"bdJ" = (
@@ -44935,6 +44935,15 @@
},
/turf/open/floor/iron,
/area/security/prison)
"oSK" = (
/obj/structure/window/reinforced/plasma{
dir = 4
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/structure/cable,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"oTr" = (
/obj/effect/turf_decal/trimline/green/filled/corner,
/obj/effect/turf_decal/trimline/green/line{
@@ -55807,12 +55816,12 @@
/turf/open/floor/iron/white,
/area/science/robotics/lab)
"tip" = (
/obj/machinery/power/rad_collector/anchored,
/obj/structure/window/reinforced/plasma{
dir = 4
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/structure/cable,
/obj/machinery/power/tesla_coil/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"tiq" = (
@@ -64399,6 +64408,15 @@
/obj/structure/disposalpipe/segment,
/turf/open/floor/iron,
/area/hallway/secondary/command)
"wGS" = (
/obj/structure/window/reinforced/plasma{
dir = 8
},
/obj/machinery/atmospherics/pipe/smart/manifold4w/general/visible,
/obj/structure/cable,
/obj/machinery/power/grounding_rod/anchored,
/turf/open/floor/engine,
/area/engineering/supermatter)
"wGY" = (
/turf/closed/wall/r_wall,
/area/science/explab)
@@ -98852,7 +98870,7 @@ oms
wKG
roS
tip
tip
oSK
tip
wKG
qMI
@@ -99880,7 +99898,7 @@ wKG
oAv
roS
bdI
bdI
wGS
bdI
wKG
jqb
+2
View File
@@ -173,6 +173,8 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
#define ZAP_MOB_DAMAGE (1<<3)
#define ZAP_MOB_STUN (1<<4)
#define ZAP_GENERATES_POWER (1<<5)
/// Zaps with this flag will generate less power through tesla coils
#define ZAP_LOW_POWER_GEN (1<<6)
#define ZAP_DEFAULT_FLAGS ZAP_MOB_STUN | ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
#define ZAP_FUSION_FLAGS ZAP_OBJ_DAMAGE | ZAP_MOB_DAMAGE | ZAP_MOB_STUN
@@ -219,19 +219,6 @@
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
build_path = /obj/machinery/rnd/production/protolathe/department/engineering
/obj/item/circuitboard/machine/rad_collector
name = "Radiation Collector (Machine Board)"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
desc = "Comes with a small amount solder of arranged in the corner: \"If you can read this, you're too close.\""
build_path = /obj/machinery/power/rad_collector
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/stock_parts/matter_bin = 1,
/obj/item/stack/sheet/plasmarglass = 2,
/obj/item/stock_parts/capacitor = 1,
/obj/item/stock_parts/manipulator = 1)
needs_anchored = FALSE
/obj/item/circuitboard/machine/rtg
name = "RTG (Machine Board)"
greyscale_colors = CIRCUIT_COLOR_ENGINEERING
+1 -1
View File
@@ -324,7 +324,7 @@
var/obj/structure/cable/C = T.get_cable_node()
if(C)
playsound(src, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
tesla_zap(src, 3, C.newavail() * 0.01, ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_LOW_POWER_GEN | ZAP_ALLOW_DUPLICATES) //Zap for 1/100 of the amount of power. At a million watts in the grid, it will be as powerful as a tesla revolver shot.
C.add_delayedload(C.newavail() * 0.0375) // you can gain up to 3.5 via the 4x upgrades power is halved by the pole so thats 2x then 1X then .5X for 3.5x the 3 bounces shock.
return ..()
@@ -71,11 +71,6 @@
unit_name = "field generator"
export_types = list(/obj/machinery/field/generator)
/datum/export/large/collector
cost = CARGO_CRATE_VALUE * 2
unit_name = "radiation collector"
export_types = list(/obj/machinery/power/rad_collector)
/datum/export/large/tesla_coil
cost = CARGO_CRATE_VALUE * 2.25
unit_name = "tesla coil"
-9
View File
@@ -925,15 +925,6 @@
crate_name = "grounding rod crate"
crate_type = /obj/structure/closet/crate/engineering/electrical
/datum/supply_pack/engine/collector
name = "Radiation Collector Crate"
desc = "Contains three radiation collectors. Useful for collecting energy off nearby Supermatter Crystals, Singularities or Teslas!"
cost = CARGO_CRATE_VALUE * 8
contains = list(/obj/machinery/power/rad_collector,
/obj/machinery/power/rad_collector,
/obj/machinery/power/rad_collector)
crate_name = "collector crate"
/datum/supply_pack/engine/solar
name = "Solar Panel Crate"
desc = "Go green with this DIY advanced solar array. Contains twenty one solar assemblies, a solar-control circuit board, and tracker. If you have any questions, please check out the enclosed instruction book."
@@ -16,7 +16,6 @@
req_access = list(ACCESS_ENGINE_EQUIP, ACCESS_ATMOSPHERICS)
max_integrity = 350
integrity_failure = 0.2
circuit = /obj/item/circuitboard/machine/rad_collector
rad_insulation = RAD_EXTREME_INSULATION
///Stores the loaded tank instance
var/obj/item/tank/internals/plasma/loaded_tank = null
+72 -51
View File
@@ -221,7 +221,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
var/power_changes = TRUE
///Disables the sm's proccessing totally.
var/processes = TRUE
///Stores the time of when the last zap occurred
var/last_power_zap = 0
/obj/machinery/power/supermatter_crystal/Initialize(mapload)
@@ -486,7 +487,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//Ok, get the air from the turf
var/datum/gas_mixture/env = local_turf.return_air()
var/env_pressure = env.return_pressure()
var/datum/gas_mixture/removed
if(produces_gas)
//Remove gas from surrounding area
@@ -643,6 +644,23 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
//(1 + (tritRad + pluoxDampen * bzDampen * o2Rad * plasmaRad / (10 - bzrads))) * freonbonus
radiation_pulse(src, power * max(0, (1 + (power_transmission_bonus/(10-(gas_comp[/datum/gas/bz] * BZ_RADIOACTIVITY_MODIFIER)))) * freonbonus))// RadModBZ(500%)
//Zaps around 2.5 seconds at 1500 MeV, limited to 0.5 from 4000 MeV and up
if(power && (last_power_zap + 4 SECONDS - (power * 0.001)) < world.time)
//(1 + (tritRad + pluoxDampen * bzDampen * o2Rad * plasmaRad / (10 - bzrads))) * freonbonus
playsound(src, 'sound/weapons/emitter2.ogg', 70, TRUE)
var/power_multiplier = max(0, (1 + (power_transmission_bonus / (10 - (gas_comp[/datum/gas/bz] * BZ_RADIOACTIVITY_MODIFIER)))) * freonbonus)// RadModBZ(500%)
var/pressure_multiplier = max((1 / ((env_pressure ** 1.5) + 5.5) * 0.01) + 0.8, 1)
var/co2_power_increase = max(gas_comp[/datum/gas/carbon_dioxide] * 2, 1)
supermatter_zap(
zapstart = src,
range = 3,
zap_str = 2.5 * power * power_multiplier * pressure_multiplier * co2_power_increase,
zap_flags = ZAP_SUPERMATTER_FLAGS,
zap_cutoff = 300,
power_level = power
)
last_power_zap = world.time
if(prob(gas_comp[/datum/gas/zauker]))
playsound(src.loc, 'sound/weapons/emitter2.ogg', 100, TRUE, extrarange = 10)
supermatter_zap(src, 6, clamp(power*2, 4000, 20000), ZAP_MOB_STUN, zap_cutoff = src.zap_cutoff, power_level = power, zap_icon = src.zap_icon)
@@ -1212,58 +1230,61 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(arc_targets.len)//Pick from our pool
target = pick(arc_targets)
if(!QDELETED(target))//If we found something
//Do the animation to zap to it from here
if(!(zap_flags & ZAP_ALLOW_DUPLICATES))
LAZYSET(targets_hit, target, TRUE)
zapstart.Beam(target, icon_state=zap_icon, time = 5)
var/zapdir = get_dir(zapstart, target)
if(zapdir)
. = zapdir
if(QDELETED(target))//If we didn't found something
return
//Going boom should be rareish
if(prob(80))
zap_flags &= ~ZAP_MACHINE_EXPLOSIVE
if(target_type == COIL)
//In the best situation we can expect this to grow up to 2120kw before a delam/IT'S GONE TOO FAR FRED SHUT IT DOWN
//The formula for power gen is zap_str * zap_mod / 2 * capacitor rating, between 1 and 4
var/multi = 10
switch(power_level)//Between 7k and 9k it's 20, above that it's 40
if(SEVERE_POWER_PENALTY_THRESHOLD to CRITICAL_POWER_PENALTY_THRESHOLD)
multi = 20
if(CRITICAL_POWER_PENALTY_THRESHOLD to INFINITY)
multi = 40
target.zap_act(zap_str * multi, zap_flags)
zap_str /= 3 //Coils should take a lot out of the power of the zap
else if(isliving(target))//If we got a fleshbag on our hands
var/mob/living/creature = target
creature.set_shocked()
addtimer(CALLBACK(creature, /mob/living/proc/reset_shocked), 10)
//3 shots a human with no resistance. 2 to crit, one to death. This is at at least 10000 power.
//There's no increase after that because the input power is effectivly capped at 10k
//Does 1.5 damage at the least
var/shock_damage = ((zap_flags & ZAP_MOB_DAMAGE) ? (power_level / 200) - 10 : rand(5,10))
creature.electrocute_act(shock_damage, "Supermatter Discharge Bolt", 1, ((zap_flags & ZAP_MOB_STUN) ? SHOCK_TESLA : SHOCK_NOSTUN))
zap_str /= 1.5 //Meatsacks are conductive, makes working in pairs more destructive
//Do the animation to zap to it from here
if(!(zap_flags & ZAP_ALLOW_DUPLICATES))
LAZYSET(targets_hit, target, TRUE)
zapstart.Beam(target, icon_state=zap_icon, time = 0.5 SECONDS)
var/zapdir = get_dir(zapstart, target)
if(zapdir)
. = zapdir
//Going boom should be rareish
if(prob(80))
zap_flags &= ~ZAP_MACHINE_EXPLOSIVE
if(target_type == COIL)
var/multi = 2
switch(power_level)//Between 7k and 9k it's 4, above that it's 8
if(SEVERE_POWER_PENALTY_THRESHOLD to CRITICAL_POWER_PENALTY_THRESHOLD)
multi = 4
if(CRITICAL_POWER_PENALTY_THRESHOLD to INFINITY)
multi = 8
if(zap_flags & ZAP_SUPERMATTER_FLAGS)
var/remaining_power = target.zap_act(zap_str * multi, zap_flags)
zap_str = remaining_power * 0.5 //Coils should take a lot out of the power of the zap
else
zap_str = target.zap_act(zap_str, zap_flags)
//This gotdamn variable is a boomer and keeps giving me problems
var/turf/target_turf = get_turf(target)
var/pressure = 1
if(target_turf?.return_air())
pressure = max(1,target_turf.return_air().return_pressure())
//We get our range with the strength of the zap and the pressure, the higher the former and the lower the latter the better
var/new_range = clamp(zap_str / pressure * 10, 2, 7)
var/zap_count = 1
if(prob(5))
zap_str -= (zap_str/10)
zap_count += 1
for(var/j in 1 to zap_count)
if(zap_count > 1)
targets_hit = targets_hit.Copy() //Pass by ref begone
supermatter_zap(target, new_range, zap_str, zap_flags, targets_hit, zap_cutoff, power_level, zap_icon)
zap_str /= 3
else if(isliving(target))//If we got a fleshbag on our hands
var/mob/living/creature = target
creature.set_shocked()
addtimer(CALLBACK(creature, /mob/living/proc/reset_shocked), 1 SECONDS)
//3 shots a human with no resistance. 2 to crit, one to death. This is at at least 10000 power.
//There's no increase after that because the input power is effectivly capped at 10k
//Does 1.5 damage at the least
var/shock_damage = ((zap_flags & ZAP_MOB_DAMAGE) ? (power_level / 200) - 10 : rand(5,10))
creature.electrocute_act(shock_damage, "Supermatter Discharge Bolt", 1, ((zap_flags & ZAP_MOB_STUN) ? SHOCK_TESLA : SHOCK_NOSTUN))
zap_str /= 1.5 //Meatsacks are conductive, makes working in pairs more destructive
else
zap_str = target.zap_act(zap_str, zap_flags)
//This gotdamn variable is a boomer and keeps giving me problems
var/turf/target_turf = get_turf(target)
var/pressure = 1
if(target_turf?.return_air())
pressure = max(1,target_turf.return_air().return_pressure())
//We get our range with the strength of the zap and the pressure, the higher the former and the lower the latter the better
var/new_range = clamp(zap_str / pressure * 10, 2, 7)
var/zap_count = 1
if(prob(5))
zap_str -= (zap_str/10)
zap_count += 1
for(var/j in 1 to zap_count)
if(zap_count > 1)
targets_hit = targets_hit.Copy() //Pass by ref begone
supermatter_zap(target, new_range, zap_str, zap_flags, targets_hit, zap_cutoff, power_level, zap_icon)
/obj/overlay/psy
icon = 'icons/obj/supermatter.dmi'
+34 -19
View File
@@ -13,14 +13,25 @@
circuit = /obj/item/circuitboard/machine/tesla_coil
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
///Flags of the zap that the coil releases when the wire is pulsed
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_LOW_POWER_GEN
///Multiplier for power conversion
var/input_power_multiplier = 1
///Cooldown between pulsed zaps
var/zap_cooldown = 100
///Reference to the last zap done
var/last_zap = 0
///Amount of power stored inside the coil to be released in the powernet
var/stored_energy = 0
/obj/machinery/power/tesla_coil/anchored
anchored = TRUE
/obj/machinery/power/tesla_coil/Initialize(mapload)
. = ..()
wires = new /datum/wires/tesla_coil(src)
if(anchored)
connect_to_network()
/obj/machinery/power/tesla_coil/should_have_node()
return anchored
@@ -71,25 +82,26 @@
return ..()
/obj/machinery/power/tesla_coil/process(delta_time)
var/power_produced = min(stored_energy, (stored_energy * 0.04) + 1000) * delta_time
add_avail(power_produced)
stored_energy -= power_produced
/obj/machinery/power/tesla_coil/zap_act(power, zap_flags)
if(anchored && !panel_open)
//don't lose arc power when it's not connected to anything
//please place tesla coils all around the station to maximize effectiveness
obj_flags |= BEING_SHOCKED
addtimer(CALLBACK(src, .proc/reset_shocked), 1 SECONDS)
zap_buckle_check(power)
if(zap_flags & ZAP_GENERATES_POWER) //I don't want no tesla revolver making 8GW you hear
return power / 2
var/power_produced = powernet ? power * input_power_multiplier : power
add_avail(power_produced)
var/datum/bank_account/D = SSeconomy.get_dep_account(ACCOUNT_ENG)
if(D)
D.adjust_money(min(power_produced, 1))
flick("coilhit", src)
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
return power - power_produced //You get back the amount we didn't use
else
. = ..()
if(!anchored || panel_open)
return ..()
obj_flags |= BEING_SHOCKED
addtimer(CALLBACK(src, .proc/reset_shocked), 1 SECONDS)
flick("coilhit", src)
playsound(src.loc, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
if(!(zap_flags & ZAP_GENERATES_POWER)) //Prevent infinite recursive power
return 0
if(zap_flags & ZAP_LOW_POWER_GEN)
power /= 10
zap_buckle_check(power)
var/power_removed = powernet ? power * input_power_multiplier : power
stored_energy += max((power_removed - 80) * 200, 0)
return max(power - power_removed, 0) //You get back the amount we didn't use
/obj/machinery/power/tesla_coil/proc/zap()
if((last_zap + zap_cooldown) > world.time || !powernet)
@@ -114,6 +126,9 @@
buckle_lying = 0
buckle_requires_restraints = TRUE
/obj/machinery/power/grounding_rod/anchored
anchored = TRUE
/obj/machinery/power/grounding_rod/default_unfasten_wrench(mob/user, obj/item/I, time = 20)
. = ..()
if(. == SUCCESSFUL_UNFASTEN)
@@ -3,7 +3,7 @@
icon_state = "tesla_projectile"
impact_effect_type = /obj/effect/temp_visual/impact_effect/blue_laser
damage = 10 //A worse lasergun
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_LOW_POWER_GEN
var/zap_range = 3
var/power = 10000
+2 -2
View File
@@ -479,7 +479,7 @@
var/zap_power = 20000
var/zap_range = 15
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_MOB_STUN | ZAP_OBJ_DAMAGE
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_MOB_STUN | ZAP_OBJ_DAMAGE | ZAP_LOW_POWER_GEN
var/chain
var/mob/living/caster
@@ -502,7 +502,7 @@
/obj/projectile/magic/aoe/lightning/no_zap
zap_power = 10000
zap_range = 4
zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE
zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_LOW_POWER_GEN
/obj/projectile/magic/aoe/lightning/Destroy()
qdel(chain)
@@ -539,7 +539,7 @@
modifier = -100
mix_message = "<span class='boldannounce'>The teslium starts to spark as electricity arcs away from it!</span>"
mix_sound = 'sound/machines/defib_zap.ogg'
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN
var/zap_flags = ZAP_MOB_DAMAGE | ZAP_OBJ_DAMAGE | ZAP_MOB_STUN | ZAP_LOW_POWER_GEN
reaction_tags = REACTION_TAG_EASY | REACTION_TAG_EXPLOSIVE | REACTION_TAG_DANGEROUS
/datum/chemical_reaction/reagent_explosion/teslium_lightning/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume)
@@ -467,14 +467,6 @@
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/board/rad_collector
name = "Machine Design (Radiation Collector Board)"
desc = "The circuit board for a radiation collector array."
id = "rad_collector"
build_path = /obj/item/circuitboard/machine/rad_collector
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_ENGINEERING | DEPARTMENTAL_FLAG_SCIENCE
/datum/design/board/grounding_rod
name = "Machine Design (Grounding Rod Board)"
desc = "The circuit board for a grounding rod."
@@ -453,7 +453,6 @@
"pneumatic_seal",
"power control",
"powermonitor",
"rad_collector",
"recharger",
"recycler",
"rped",
@@ -95,7 +95,7 @@
playsound(carbon, 'sound/magic/lightningshock.ogg', 100, TRUE, extrarange = 5)
carbon.cut_overlay(overcharge)
tesla_zap(carbon, 2, crystal_charge*2.5, ZAP_OBJ_DAMAGE | ZAP_ALLOW_DUPLICATES)
tesla_zap(carbon, 2, crystal_charge*2.5, ZAP_OBJ_DAMAGE | ZAP_LOW_POWER_GEN | ZAP_ALLOW_DUPLICATES)
adjust_charge(ETHEREAL_CHARGE_FULL - crystal_charge)
to_chat(carbon, span_warning("You violently discharge energy!"))
carbon.visible_message(span_danger("[carbon] violently discharges energy!"))