Merge pull request #27790 from DamianX/PowerDatumClean

power connection datum cleanup
This commit is contained in:
jknpj
2020-09-13 12:02:45 -03:00
committed by GitHub
2 changed files with 0 additions and 18 deletions

View File

@@ -58,7 +58,6 @@
hook_media_sources() hook_media_sources()
if(on) if(on)
update_on() update_on()
power_connection.power_changed.Add(src,"cable_power_change")
power_connection.connect() power_connection.connect()
update_icon() update_icon()

View File

@@ -144,13 +144,6 @@
parent_area.use_power(amount, chan) parent_area.use_power(amount, chan)
// called whenever the power settings of the containing area change
// by default, check equipment channel & set flag
// can override if needed
/datum/power_connection/proc/power_change()
//parent.power_change()
return
// connect the machine to a powernet if a node cable is present on the turf // connect the machine to a powernet if a node cable is present on the turf
/datum/power_connection/proc/connect() /datum/power_connection/proc/connect()
var/turf/T = get_turf(parent) var/turf/T = get_turf(parent)
@@ -244,14 +237,8 @@
var/idle_usage=1 // watts var/idle_usage=1 // watts
var/active_usage=2 var/active_usage=2
var/event/power_changed = null
/datum/power_connection/consumer/New(var/loc,var/obj/parent) /datum/power_connection/consumer/New(var/loc,var/obj/parent)
..(loc,parent) ..(loc,parent)
power_changed = new ("owner"=src)
/datum/power_connection/consumer/power_change()
INVOKE_EVENT(power_changed,list("consumer"=src))
/datum/power_connection/consumer/process() /datum/power_connection/consumer/process()
if(use) if(use)
@@ -269,10 +256,6 @@
return 1 return 1
/datum/power_connection/consumer/proc/set_enabled(var/value)
enabled=value
power_change()
////////////////////// //////////////////////
/// TERMINAL RECEIVER /// TERMINAL RECEIVER