Actually holopads, so they won't end up in maintenance...

This commit is contained in:
Ghommie
2019-11-02 16:46:02 +01:00
parent 3193e3ce20
commit 50fc1004ba
2 changed files with 17 additions and 28 deletions
+6 -5
View File
@@ -24,6 +24,8 @@ Possible to do for anyone motivated enough:
* Holopad
*/
GLOBAL_LIST_EMPTY(network_holopads)
#define HOLOPAD_PASSIVE_POWER_USAGE 1
#define HOLOGRAM_POWER_USAGE 2
@@ -55,7 +57,6 @@ Possible to do for anyone motivated enough:
var/record_user //user that inititiated the recording
var/obj/effect/overlay/holo_pad_hologram/replay_holo //replay hologram
var/static/force_answer_call = FALSE //Calls will be automatically answered after a couple rings, here for debugging
var/static/list/holopads = list()
var/obj/effect/overlay/holoray/ray
var/ringing = FALSE
var/offset = FALSE
@@ -96,7 +97,7 @@ Possible to do for anyone motivated enough:
/obj/machinery/holopad/Initialize()
. = ..()
if(on_network)
holopads += src
GLOB.network_holopads += src
/obj/machinery/holopad/Destroy()
if(outgoing_call)
@@ -116,7 +117,7 @@ Possible to do for anyone motivated enough:
QDEL_NULL(disk)
holopads -= src
GLOB.network_holopads -= src
return ..()
/obj/machinery/holopad/power_change()
@@ -260,7 +261,7 @@ Possible to do for anyone motivated enough:
temp += "<A href='?src=[REF(src)];mainmenu=1'>Main Menu</A>"
if(usr.loc == loc)
var/list/callnames = list()
for(var/I in holopads)
for(var/I in GLOB.network_holopads)
var/area/A = get_area(I)
if(A)
LAZYADD(callnames[A], I)
@@ -474,7 +475,7 @@ For the other part of the code, check silicon say.dm. Particularly robot talk.*/
var/obj/effect/overlay/holo_pad_hologram/h = masters[holo_owner]
if(!h || h.HC) //Holocalls can't change source.
return FALSE
for(var/pad in holopads)
for(var/pad in GLOB.network_holopads)
var/obj/machinery/holopad/another = pad
if(another == src)
continue
+11 -23
View File
@@ -102,39 +102,27 @@
canmove = TRUE
health = 25
var/list/areas = list()
for(var/A in GLOB.teleportlocs)
if(findtextEx(A, "AI"))
continue
areas += GLOB.teleportlocs[A]
//Try to go to populated areas
var/list/pop_areas = list()
for(var/M in GLOB.player_list)
var/area/A = get_area(M)
pop_areas += A
var/list/cool_places = uniquemergelist(areas, pop_areas)
var/list/targets = list()
for(var/H in GLOB.network_holopads)
var/area/A = get_area(H)
if(findtextEx(A, "AI") || !(A in pop_areas) || !is_station_level(H))
continue
targets += H
if(!cool_places.len)
cool_places = areas
if(!targets)
targets = GLOB.generic_event_spawns
for(var/i in 1 to 6) //Attempts a jump up to 6 times.
var/area/A = pick(cool_places)
var/list/area_turfs = list(get_area_turfs(A.type))
if(i != 6) // We need to teleport away, no matter what.
for(var/t in area_turfs)
var/turf/T = t
if(!is_blocked_turf(T))
L -= T
if(!L.len)
cool_places -= A
continue
if(!do_teleport(src, pick(L), channel = TELEPORT_CHANNEL_MAGIC))
var/atom/A = pick(targets)
if(!do_teleport(src, A, channel = TELEPORT_CHANNEL_MAGIC))
return TRUE
cool_places -= A
targets -= A
return FALSE
/mob/living/simple_animal/jacq/proc/gender_check(mob/living/carbon/C)