mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-24 20:47:43 +01:00
Usr Wire Fix (#19643)
* WIP markers * get the easy ones out of the way * oops you too * additional issues * sanity * Update rig_wiring.dm * Update rig_wiring.dm * Update power.dm --------- Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
@@ -835,7 +835,9 @@
|
||||
take_hit((100/severity), "electrical pulse", 1)
|
||||
|
||||
/obj/item/rig/proc/shock(mob/user)
|
||||
if (electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
|
||||
if(!ismob(user))
|
||||
return 0
|
||||
if(electrocute_mob(user, cell, src)) //electrocute_mob() handles removing charge from the cell, no need to do that here.
|
||||
spark_system.start()
|
||||
if(user.stunned)
|
||||
return 1
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
rig.req_one_access = initial(rig.req_one_access)
|
||||
if(WIRE_RIG_INTERFACE_SHOCK)
|
||||
rig.electrified = mend ? 0 : -1
|
||||
rig.shock(usr,100)
|
||||
rig.shock(usr,100) // TODO - REMOVE USR
|
||||
|
||||
/datum/wires/rig/on_pulse(wire)
|
||||
var/obj/item/rig/rig = holder
|
||||
@@ -37,14 +37,14 @@
|
||||
rig.malfunctioning += 10
|
||||
if(rig.malfunction_delay <= 0)
|
||||
rig.malfunction_delay = 20
|
||||
rig.shock(usr,100)
|
||||
rig.shock(usr,100) // TODO - REMOVE USR
|
||||
if(WIRE_RIG_INTERFACE_LOCK)
|
||||
rig.interface_locked = !rig.interface_locked
|
||||
rig.visible_message("\The [rig] clicks audibly as the software interface [rig.interface_locked?"darkens":"brightens"].")
|
||||
if(WIRE_RIG_INTERFACE_SHOCK)
|
||||
if(rig.electrified != -1)
|
||||
rig.electrified = 30
|
||||
rig.shock(usr,100)
|
||||
rig.shock(usr,100) // TODO - REMOVE USR
|
||||
|
||||
/datum/wires/rig/interactable(mob/user)
|
||||
var/obj/item/rig/rig = holder
|
||||
|
||||
@@ -272,7 +272,7 @@
|
||||
//power_source is a source of electricity, can be powercell, area, apc, cable, powernet or null
|
||||
//source is an object caused electrocuting (airlock, grille, etc)
|
||||
//No animations will be performed by this proc.
|
||||
/proc/electrocute_mob(mob/living/M as mob, power_source, obj/source, siemens_coeff = 1.0)
|
||||
/proc/electrocute_mob(mob/living/M, power_source, obj/source, siemens_coeff = 1.0)
|
||||
if(istype(M.loc,/obj/mecha)) return 0 //feckin mechs are dumb
|
||||
if(issilicon(M)) return 0 //No more robot shocks from machinery
|
||||
var/area/source_area
|
||||
@@ -320,6 +320,8 @@
|
||||
|
||||
if (!cell && !PN)
|
||||
return 0
|
||||
if(!isliving(M))
|
||||
return 0
|
||||
var/PN_damage = 0
|
||||
var/cell_damage = 0
|
||||
if (PN)
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/machinery/containment_field/shock(mob/living/user as mob)
|
||||
/obj/machinery/containment_field/shock(mob/living/user)
|
||||
if(hasShocked)
|
||||
return 0
|
||||
if(!FG1 || !FG2)
|
||||
|
||||
Reference in New Issue
Block a user