Hard upstream sync (#6951)

* maps - none of our changes included yet i'll get them in after i finish up the rest of the sync

* sync part 1 - underscore folders in code

* controllers folder

* datums folder

* game folder

* cmon, work

* modules - admin to awaymissions

* cargo to events

* fields to lighting

* mapping > ruins

* rest of the code folder

* rest of the folders in the root directory

* DME

* fixes compiling errors. it compiles so it works

* readds map changes

* fixes dogborg module select

* fixes typo in moduleselect_alternate_icon filepath
This commit is contained in:
deathride58
2018-05-31 23:03:18 +00:00
committed by kevinz000
parent b6e608cb4c
commit 2f9e3e403d
395 changed files with 134016 additions and 26287 deletions
@@ -9,7 +9,7 @@
/obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases)
. = ..()
if (random_icon_states && length(random_icon_states) > 0)
if (random_icon_states && (icon_state == initial(icon_state)) && length(random_icon_states) > 0)
icon_state = pick(random_icon_states)
create_reagents(300)
if(loc && isturf(loc))
+21 -5
View File
@@ -1,21 +1,37 @@
/datum/proximity_monitor
var/atom/host //the atom we are tracking
var/atom/hasprox_reciever //the atom that will recieve HasProximity calls.
var/atom/last_host_loc
var/list/checkers //list of /obj/effect/abstract/proximity_checkers
var/current_range
var/ignore_if_not_on_turf //don't check turfs in range if the host's loc isn't a turf
var/datum/component/movement_tracker
/datum/proximity_monitor/New(atom/_host, range, _ignore_if_not_on_turf = TRUE)
host = _host
checkers = list()
last_host_loc = _host.loc
ignore_if_not_on_turf = _ignore_if_not_on_turf
checkers = list()
SetRange(range)
current_range = range
SetHost(_host)
/datum/proximity_monitor/proc/SetHost(atom/H,atom/R)
if(R)
hasprox_reciever = R
else if(hasprox_reciever == host) //Default case
hasprox_reciever = H
host = H
last_host_loc = host.loc
if(movement_tracker)
QDEL_NULL(movement_tracker)
movement_tracker = host.AddComponent(/datum/component/redirect, COMSIG_MOVABLE_MOVED, CALLBACK(src, .proc/HandleMove))
SetRange(current_range,TRUE)
/datum/proximity_monitor/Destroy()
host = null
last_host_loc = null
hasprox_reciever = null
QDEL_LIST(checkers)
QDEL_NULL(movement_tracker)
return ..()
/datum/proximity_monitor/proc/HandleMove()
@@ -27,7 +43,7 @@
SetRange(curr_range, TRUE)
if(curr_range)
testing("HasProx: [host] -> [host]")
_host.HasProximity(host) //if we are processing, we're guaranteed to be a movable
hasprox_reciever.HasProximity(host) //if we are processing, we're guaranteed to be a movable
/datum/proximity_monitor/proc/SetRange(range, force_rebuild = FALSE)
if(!force_rebuild && range == current_range)
@@ -93,4 +109,4 @@
/obj/effect/abstract/proximity_checker/Crossed(atom/movable/AM)
set waitfor = FALSE
monitor.host.HasProximity(AM)
monitor.hasprox_reciever.HasProximity(AM)