mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Moves get_area to a macro (#24712)
* Moves get_area to a macro * fixes * Update code/game/machinery/camera/camera.dm Co-authored-by: Charlie Nolan <funnyman3595@gmail.com> * runtime fix * moer fix --------- Co-authored-by: Charlie Nolan <funnyman3595@gmail.com>
This commit is contained in:
@@ -245,9 +245,9 @@
|
||||
underlays += emissive_appearance(icon, "intercom_lightmask")
|
||||
|
||||
/obj/item/radio/intercom/proc/update_operating_status(on = TRUE)
|
||||
var/area/current_area = get_area(src)
|
||||
if(!current_area)
|
||||
if(!loc) // We init a few radios in nullspace to prevent them from needing power.
|
||||
return
|
||||
var/area/current_area = get_area(src)
|
||||
if(on)
|
||||
RegisterSignal(current_area.powernet, COMSIG_POWERNET_POWER_CHANGE, PROC_REF(local_powernet_check))
|
||||
else
|
||||
|
||||
@@ -266,7 +266,7 @@ GLOBAL_LIST_EMPTY(deadsay_radio_systems)
|
||||
connection = radio_connection
|
||||
channel = null
|
||||
|
||||
if(is_type_in_list(get_area(src), blacklisted_areas))
|
||||
if(loc && is_type_in_list(get_area(src), blacklisted_areas))
|
||||
// add a debug log so people testing things won't be fighting against a "broken" radio for too long.
|
||||
log_debug("Radio message from [src] was used in restricted area [get_area(src)].")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user