Merge branch 'master' into premium-kas-for-borgs
This commit is contained in:
@@ -86,6 +86,9 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/ready(forced = FALSE)
|
||||
return ..() && (length(dead_players) + length(list_observers) >= required_applicants)
|
||||
|
||||
/datum/dynamic_ruleset/midround/from_ghosts/execute()
|
||||
var/list/possible_candidates = list()
|
||||
possible_candidates.Add(dead_players)
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
/obj/machinery/door/firedoor/Initialize(mapload)
|
||||
. = ..()
|
||||
CalculateAffectingAreas()
|
||||
UpdateAdjacencyFlags()
|
||||
|
||||
|
||||
/obj/machinery/door/firedoor/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -53,6 +55,20 @@
|
||||
var/area/A = I
|
||||
LAZYADD(A.firedoors, src)
|
||||
|
||||
/obj/machinery/door/firedoor/proc/UpdateAdjacencyFlags()
|
||||
var/turf/T = get_turf(src)
|
||||
if(flags_1 & ON_BORDER_1)
|
||||
for(var/t in T.atmos_adjacent_turfs)
|
||||
if(get_dir(loc, t) == dir)
|
||||
var/turf/open/T2 = t
|
||||
T.atmos_adjacent_turfs[T2] |= ATMOS_ADJACENT_FIRELOCK
|
||||
T2.atmos_adjacent_turfs[T] |= ATMOS_ADJACENT_FIRELOCK
|
||||
else
|
||||
for(var/t in T.atmos_adjacent_turfs)
|
||||
var/turf/open/T2 = t
|
||||
T.atmos_adjacent_turfs[T2] |= ATMOS_ADJACENT_FIRELOCK
|
||||
T2.atmos_adjacent_turfs[T] |= ATMOS_ADJACENT_FIRELOCK
|
||||
|
||||
/obj/machinery/door/firedoor/closed
|
||||
icon_state = "door_closed"
|
||||
opacity = TRUE
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
/obj/machinery/posialert
|
||||
name = "automated positronic alert console"
|
||||
desc = "A console that will ping when a positronic personality is available for download."
|
||||
icon = 'icons/obj/machines/terminals.dmi'
|
||||
icon_state = "posialert"
|
||||
var/inuse = FALSE
|
||||
var/online = TRUE
|
||||
|
||||
var/obj/item/radio/radio
|
||||
var/radio_key = /obj/item/encryptionkey/headset_sci
|
||||
var/science_channel = "Science"
|
||||
|
||||
/obj/machinery/posialert/Initialize(mapload, ndir, building)
|
||||
. = ..()
|
||||
radio = new(src)
|
||||
radio.keyslot = new radio_key
|
||||
radio.listening = 0
|
||||
radio.recalculateChannels()
|
||||
if(building)
|
||||
setDir(ndir)
|
||||
pixel_x = (dir & 3)? 0 : (dir == 4 ? -32 : 32)
|
||||
pixel_y = (dir & 3)? (dir ==1 ? -32 : 32) : 0
|
||||
|
||||
|
||||
/obj/machinery/posialert/Destroy()
|
||||
QDEL_NULL(radio)
|
||||
return ..()
|
||||
|
||||
/obj/item/wallframe/posialert
|
||||
name = "automated positronic alert console frame"
|
||||
desc = "Used to build positronic alert consoles, just secure to the wall."
|
||||
icon_state = "newscaster"
|
||||
custom_materials = list(/datum/material/iron=14000, /datum/material/glass=8000)
|
||||
result_path = /obj/machinery/posialert
|
||||
|
||||
/obj/machinery/posialert/attack_hand(mob/living/user)
|
||||
online = !online
|
||||
to_chat(user, "<span class='warning'>You turn the posi-alert system [online ? "on" : "off"]!</span>")
|
||||
return
|
||||
|
||||
/obj/machinery/posialert/attack_ghost(mob/user)
|
||||
. = ..()
|
||||
if(!online)
|
||||
return
|
||||
if(inuse)
|
||||
return
|
||||
inuse = TRUE
|
||||
flick("posialertflash",src)
|
||||
visible_message("There are positronic personalities available!")
|
||||
radio.talk_into(src, "There are positronic personalities available!", science_channel)
|
||||
playsound(loc, 'sound/machines/ping.ogg', 50)
|
||||
addtimer(CALLBACK(src, .proc/liftcooldown), 300)
|
||||
|
||||
/obj/machinery/posialert/proc/liftcooldown()
|
||||
inuse = FALSE
|
||||
@@ -1232,6 +1232,51 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
continue
|
||||
. += P
|
||||
|
||||
//borg pda stuff
|
||||
/mob/living/silicon/robot/proc/cmd_send_pdamesg(mob/user)
|
||||
var/list/plist = list()
|
||||
var/list/namecounts = list()
|
||||
|
||||
if(aiPDA.toff)
|
||||
to_chat(user, "Turn on your receiver in order to send messages.")
|
||||
return
|
||||
|
||||
for (var/obj/item/pda/P in get_viewable_pdas())
|
||||
if (P == src)
|
||||
continue
|
||||
else if (P == aiPDA)
|
||||
continue
|
||||
|
||||
plist[avoid_assoc_duplicate_keys(P.owner, namecounts)] = P
|
||||
|
||||
var/c = input(user, "Please select a PDA") as null|anything in sortList(plist)
|
||||
|
||||
if (!c)
|
||||
return
|
||||
|
||||
var/selected = plist[c]
|
||||
|
||||
if(aicamera.stored.len)
|
||||
var/add_photo = input(user,"Do you want to attach a photo?","Photo","No") as null|anything in list("Yes","No")
|
||||
if(add_photo=="Yes")
|
||||
var/datum/picture/Pic = aicamera.selectpicture(user)
|
||||
aiPDA.picture = Pic
|
||||
|
||||
if(incapacitated())
|
||||
return
|
||||
|
||||
aiPDA.create_message(src, selected)
|
||||
|
||||
|
||||
/mob/living/silicon/robot/proc/cmd_show_message_log(mob/user)
|
||||
if(incapacitated())
|
||||
return
|
||||
if(!isnull(aiPDA))
|
||||
var/HTML = "<html><head><meta http-equiv='Content-Type' content='text/html; charset=UTF-8'><title>AI PDA Message Log</title></head><body>[aiPDA.tnote]</body></html>"
|
||||
user << browse(HTML, "window=log;size=400x444;border=1;can_resize=1;can_close=1;can_minimize=0")
|
||||
else
|
||||
to_chat(user, "You do not have a PDA. You should make an issue report about this.")
|
||||
|
||||
#undef PDA_SCANNER_NONE
|
||||
#undef PDA_SCANNER_MEDICAL
|
||||
#undef PDA_SCANNER_FORENSICS
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
item_state = "walkietalkie"
|
||||
desc = "A basic handheld radio that communicates with local telecommunication networks."
|
||||
dog_fashion = /datum/dog_fashion/back
|
||||
var/list/extra_channels = list() //Allows indivudal channels, used for borgs
|
||||
|
||||
flags_1 = CONDUCT_1 | HEAR_1
|
||||
slot_flags = ITEM_SLOT_BELT
|
||||
@@ -69,6 +70,11 @@
|
||||
if(keyslot.independent)
|
||||
independent = TRUE
|
||||
|
||||
if(extra_channels)
|
||||
for(var/ch_name in extra_channels)
|
||||
if(!(ch_name in channels))
|
||||
channels[ch_name] = extra_channels[ch_name]
|
||||
|
||||
for(var/ch_name in channels)
|
||||
secure_radio_connections[ch_name] = add_radio(src, GLOB.radiochannels[ch_name])
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
|
||||
if(turf_type)
|
||||
var/turf/newT = ChangeTurf(turf_type, baseturf_type, flags)
|
||||
CALCULATE_ADJACENT_TURFS(newT)
|
||||
newT.ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
/turf/proc/copyTurf(turf/T)
|
||||
if(T.type != type)
|
||||
@@ -285,10 +285,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
//If you modify this function, ensure it works correctly with lateloaded map templates.
|
||||
/turf/proc/AfterChange(flags) //called after a turf has been replaced in ChangeTurf()
|
||||
levelupdate()
|
||||
if(flags & CHANGETURF_RECALC_ADJACENT)
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
else
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
//update firedoor adjacency
|
||||
var/list/turfs_to_check = get_adjacent_open_turfs(src) | src
|
||||
|
||||
@@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if(requires_activation)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
if (light_power && light_range)
|
||||
update_light()
|
||||
@@ -111,7 +111,7 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
/turf/proc/set_temperature()
|
||||
|
||||
/turf/proc/Initalize_Atmos(times_fired)
|
||||
CALCULATE_ADJACENT_TURFS(src)
|
||||
ImmediateCalculateAdjacentTurfs()
|
||||
|
||||
/turf/Destroy(force)
|
||||
. = QDEL_HINT_IWILLGC
|
||||
|
||||
Reference in New Issue
Block a user