mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 00:29:02 +01:00
[MIRROR] Fixes tesla coil hell contraptions (#333)
* Fixes tesla coil hell contraptions (#52889) Removes the ability for tesla coils to generate power with more then 85% efficiency. Cleans up the remainder of my zap_act refactor, making the proc better fit its usecase and removing some unneeded code. Adds a check in the tesla coil zap() proc that makes sure we're not trying to use power that's not there. Removes some seemingly complex math from said proc, replaces it with a static 20% draw * the efficiency. * Fixes tesla coil hell contraptions Co-authored-by: LemonInTheDark <58055496+LemonInTheDark@users.noreply.github.com>
This commit is contained in:
co-authored by
LemonInTheDark
parent
4325c025ef
commit
8932e4cdbe
@@ -229,11 +229,11 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
SSfire_burning.processing -= src
|
||||
|
||||
///Called when the obj is hit by a tesla bolt.
|
||||
/obj/zap_act(power, zap_flags, shocked_targets)
|
||||
/obj/zap_act(power, zap_flags)
|
||||
if(QDELETED(src))
|
||||
return 0
|
||||
obj_flags |= BEING_SHOCKED
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 10)
|
||||
addtimer(CALLBACK(src, .proc/reset_shocked), 1 SECONDS)
|
||||
return power / 2
|
||||
|
||||
//The surgeon general warns that being buckled to certain objects receiving powerful shocks is greatly hazardous to your health
|
||||
|
||||
Reference in New Issue
Block a user