Merge branch 'master' into upstream-merge-33917
This commit is contained in:
@@ -149,8 +149,6 @@
|
||||
|
||||
if(href_list["make"])
|
||||
|
||||
var/turf/T = loc
|
||||
|
||||
/////////////////
|
||||
//href protection
|
||||
being_built = stored_research.isDesignResearchedID(href_list["make"])
|
||||
@@ -174,34 +172,8 @@
|
||||
use_power(power)
|
||||
icon_state = "autolathe"
|
||||
flick("autolathe_n",src)
|
||||
if(is_stack)
|
||||
spawn(32*coeff)
|
||||
use_power(power)
|
||||
var/list/materials_used = list(MAT_METAL=metal_cost*multiplier, MAT_GLASS=glass_cost*multiplier)
|
||||
materials.use_amount(materials_used)
|
||||
|
||||
var/obj/item/stack/N = new being_built.build_path(T, multiplier)
|
||||
N.update_icon()
|
||||
N.autolathe_crafted(src)
|
||||
|
||||
for(var/obj/item/stack/S in T.contents - N)
|
||||
if(istype(S, N.merge_type))
|
||||
N.merge(S)
|
||||
busy = FALSE
|
||||
updateUsrDialog()
|
||||
|
||||
else
|
||||
spawn(32*coeff*multiplier)
|
||||
use_power(power)
|
||||
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
|
||||
materials.use_amount(materials_used)
|
||||
for(var/i=1, i<=multiplier, i++)
|
||||
var/obj/item/new_item = new being_built.build_path(T)
|
||||
for(var/mat in materials_used)
|
||||
new_item.materials[mat] = materials_used[mat] / multiplier
|
||||
new_item.autolathe_crafted(src)
|
||||
busy = FALSE
|
||||
updateUsrDialog()
|
||||
var/time = is_stack ? 32 : 32*coeff*multiplier
|
||||
addtimer(CALLBACK(src, .proc/make_item, power, metal_cost, glass_cost, multiplier, coeff, is_stack), time)
|
||||
|
||||
if(href_list["search"])
|
||||
matching_designs.Cut()
|
||||
@@ -218,6 +190,30 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/machinery/autolathe/proc/make_item(power, metal_cost, glass_cost, multiplier, coeff, is_stack)
|
||||
GET_COMPONENT(materials, /datum/component/material_container)
|
||||
var/atom/A = drop_location()
|
||||
use_power(power)
|
||||
var/list/materials_used = list(MAT_METAL=metal_cost*coeff*multiplier, MAT_GLASS=glass_cost*coeff*multiplier)
|
||||
materials.use_amount(materials_used)
|
||||
|
||||
if(is_stack)
|
||||
var/obj/item/stack/N = new being_built.build_path(A, multiplier)
|
||||
N.update_icon()
|
||||
N.autolathe_crafted(src)
|
||||
for(var/obj/item/stack/S in (A.contents - N))
|
||||
if(istype(S, N.merge_type))
|
||||
N.merge(S)
|
||||
else
|
||||
for(var/i=1, i<=multiplier, i++)
|
||||
var/obj/item/new_item = new being_built.build_path(A)
|
||||
for(var/mat in materials_used)
|
||||
new_item.materials[mat] = materials_used[mat] / multiplier
|
||||
new_item.autolathe_crafted(src)
|
||||
|
||||
busy = FALSE
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/autolathe/RefreshParts()
|
||||
var/T = 0
|
||||
for(var/obj/item/stock_parts/matter_bin/MB in component_parts)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
if(..())
|
||||
return
|
||||
src.add_fingerprint(usr)
|
||||
var/dat = "[world.name] secure vault. Authorized personnel only.<br>"
|
||||
var/dat = "[station_name()] secure vault. Authorized personnel only.<br>"
|
||||
dat += "Current Balance: [SSshuttle.points] credits.<br>"
|
||||
if(!siphoning)
|
||||
dat += "<A href='?src=[REF(src)];siphon=1'>Siphon Credits</A><br>"
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
LAZYADD(myarea.cameras, src)
|
||||
proximity_monitor = new(src, 1)
|
||||
|
||||
if(mapload && (z in GLOB.station_z_levels) && prob(3) && !start_active)
|
||||
if(mapload && is_station_level(z) && prob(3) && !start_active)
|
||||
toggle_cam()
|
||||
|
||||
/obj/machinery/camera/Destroy()
|
||||
|
||||
@@ -121,7 +121,7 @@
|
||||
to_chat(user, "<span class='notice'>You remove the glass panel.</span>")
|
||||
state = 3
|
||||
icon_state = "3"
|
||||
var/obj/item/stack/sheet/glass/G = new (drop_location(), 2)
|
||||
var/obj/item/stack/sheet/glass/G = new(drop_location(), 2)
|
||||
G.add_fingerprint(user)
|
||||
return
|
||||
if(istype(P, /obj/item/screwdriver))
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
/obj/machinery/computer/security/proc/get_available_cameras()
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if((z > ZLEVEL_SPACEMAX || C.z > ZLEVEL_SPACEMAX) && (C.z != z))//if on away mission, can only recieve feed from same z_level cameras
|
||||
if((is_away_level(z) || is_away_level(C.z)) && (C.z != z))//if on away mission, can only recieve feed from same z_level cameras
|
||||
continue
|
||||
L.Add(C)
|
||||
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
var/mob/camera/aiEye/remote/remote_eye = user.remote_control
|
||||
var/obj/machinery/computer/camera_advanced/ratvar/R = target
|
||||
var/turf/T = get_turf(remote_eye)
|
||||
if(user.z != ZLEVEL_CITYOFCOGS || !(T.z in GLOB.station_z_levels))
|
||||
if(!is_reebe(user.z) || !is_station_level(T.z))
|
||||
return
|
||||
if(isclosedturf(T))
|
||||
to_chat(user, "<span class='sevtug_small'>You can't teleport into a wall.</span>")
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
var/authenticated = 0
|
||||
var/auth_id = "Unknown" //Who is currently logged in?
|
||||
var/list/datum/comm_message/messages = list()
|
||||
var/datum/comm_message/currmsg
|
||||
var/datum/comm_message/currmsg
|
||||
var/datum/comm_message/aicurrmsg
|
||||
var/state = STATE_DEFAULT
|
||||
var/aistate = STATE_DEFAULT
|
||||
@@ -53,7 +53,7 @@
|
||||
/obj/machinery/computer/communications/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
if(!(z in GLOB.station_z_levels) && z != ZLEVEL_CENTCOM) //Can only use on centcom and SS13
|
||||
if(!is_station_level(z) && !is_centcom_level(z)) //Can only use on centcom and SS13
|
||||
to_chat(usr, "<span class='boldannounce'>Unable to establish a connection</span>: \black You're too far away from the station!")
|
||||
return
|
||||
usr.set_machine(src)
|
||||
@@ -136,7 +136,9 @@
|
||||
to_chat(usr, "<span class='warning'>Arrays recycling. Please stand by.</span>")
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
return
|
||||
var/input = stripped_multiline_input(usr, "Please choose a message to transmit to an allied station. Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "")
|
||||
|
||||
|
||||
var/input = stripped_multiline_input(usr, "Please choose a message to transmit to allied stations. Please be aware that this process is very expensive, and abuse will lead to... termination.", "Send a message to an allied station.", "")
|
||||
if(!input || !(usr in view(1,src)))
|
||||
return
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
@@ -739,4 +741,4 @@
|
||||
if(content)
|
||||
content = new_content
|
||||
if(new_possible_answers)
|
||||
possible_answers = new_possible_answers
|
||||
possible_answers = new_possible_answers
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
var/loc_display = "Unknown"
|
||||
var/mob/living/M = T.imp_in
|
||||
if((Tr.z in GLOB.station_z_levels) && !isspaceturf(M.loc))
|
||||
if(is_station_level(Tr.z) && !isspaceturf(M.loc))
|
||||
var/turf/mob_loc = get_turf(M)
|
||||
loc_display = mob_loc.loc
|
||||
|
||||
|
||||
@@ -204,3 +204,14 @@
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
|
||||
/obj/machinery/computer/teleporter/proc/is_eligible(atom/movable/AM)
|
||||
var/turf/T = get_turf(AM)
|
||||
if(!T)
|
||||
return FALSE
|
||||
if(is_centcom_level(T.z) || is_away_level(T.z))
|
||||
return FALSE
|
||||
var/area/A = get_area(T)
|
||||
if(!A || A.noteleport)
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
if(stat & NOPOWER)
|
||||
return
|
||||
|
||||
if(src.z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
add_overlay("overlay_[GLOB.security_level]")
|
||||
else
|
||||
add_overlay("overlay_[SEC_LEVEL_GREEN]")
|
||||
@@ -124,7 +124,7 @@
|
||||
var/list/data = list()
|
||||
data["emagged"] = emagged
|
||||
|
||||
if(src.z in GLOB.station_z_levels)
|
||||
if(is_station_level(z))
|
||||
data["seclevel"] = get_security_level()
|
||||
else
|
||||
data["seclevel"] = "green"
|
||||
|
||||
@@ -22,6 +22,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
var/creationTime
|
||||
var/authorCensor
|
||||
var/bodyCensor
|
||||
var/photo_file
|
||||
|
||||
/datum/newscaster/feed_message/proc/returnAuthor(censor)
|
||||
if(censor == -1)
|
||||
@@ -97,6 +98,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
var/scannedUser
|
||||
var/isAdminMsg
|
||||
var/icon/img
|
||||
var/photo_file
|
||||
|
||||
/datum/newscaster/feed_network
|
||||
var/list/datum/newscaster/feed_channel/network_channels = list()
|
||||
@@ -126,6 +128,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
if(photo)
|
||||
newMsg.img = photo.img
|
||||
newMsg.caption = photo.scribble
|
||||
newMsg.photo_file = save_photo(photo.img)
|
||||
for(var/datum/newscaster/feed_channel/FC in network_channels)
|
||||
if(FC.channel_name == channel_name)
|
||||
FC.messages += newMsg
|
||||
@@ -143,6 +146,7 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
wanted_issue.isAdminMsg = adminMsg
|
||||
if(photo)
|
||||
wanted_issue.img = photo.img
|
||||
wanted_issue.photo_file = save_photo(photo.img)
|
||||
if(newMessage)
|
||||
for(var/obj/machinery/newscaster/N in GLOB.allCasters)
|
||||
N.newsAlert()
|
||||
@@ -157,7 +161,12 @@ GLOBAL_LIST_EMPTY(allCasters)
|
||||
for(var/obj/machinery/newscaster/NEWSCASTER in GLOB.allCasters)
|
||||
NEWSCASTER.update_icon()
|
||||
|
||||
|
||||
/datum/newscaster/feed_network/proc/save_photo(icon/photo)
|
||||
var/photo_file = copytext(md5("\icon[photo]"), 1, 6)
|
||||
if(!fexists("[GLOB.log_directory]/photos/[photo_file].png"))
|
||||
var/icon/p = icon(photo, frame = 1)
|
||||
fcopy(p, "[GLOB.log_directory]/photos/[photo_file].png")
|
||||
return photo_file
|
||||
|
||||
/obj/item/wallframe/newscaster
|
||||
name = "newscaster frame"
|
||||
|
||||
@@ -154,11 +154,8 @@
|
||||
to_chat(usr, "<span class='warning'>There's not enough room to build that here!</span>")
|
||||
qdel(C)
|
||||
return
|
||||
|
||||
|
||||
if(href_list["dir"])
|
||||
C.setDir(text2num(href_list["dir"]))
|
||||
|
||||
C.add_fingerprint(usr)
|
||||
C.update_icon()
|
||||
wait = world.time + 15
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
var/line1
|
||||
var/line2
|
||||
if(SSshuttle.supply.mode == SHUTTLE_IDLE)
|
||||
if(SSshuttle.supply.z in GLOB.station_z_levels)
|
||||
if(is_station_level(SSshuttle.supply.z))
|
||||
line1 = "CARGO"
|
||||
line2 = "Docked"
|
||||
else
|
||||
@@ -140,7 +140,7 @@
|
||||
var/obj/docking_port/mobile/shuttle = SSshuttle.supply
|
||||
var/shuttleMsg = null
|
||||
if (shuttle.mode == SHUTTLE_IDLE)
|
||||
if (shuttle.z in GLOB.station_z_levels)
|
||||
if (is_station_level(shuttle.z))
|
||||
shuttleMsg = "Docked"
|
||||
else
|
||||
shuttleMsg = "[shuttle.getModeStr()]: [shuttle.getTimerStr()]"
|
||||
|
||||
@@ -236,8 +236,7 @@
|
||||
visible_message("<span class='warning'>[src]'s door slides open, barraging you with the nauseating smell of charred flesh.</span>")
|
||||
playsound(src, 'sound/machines/airlockclose.ogg', 25, 1)
|
||||
for(var/obj/item/I in src) //Scorches away blood and forensic evidence, although the SSU itself is unaffected
|
||||
I.clean_blood()
|
||||
I.fingerprints = list()
|
||||
I.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRONG)
|
||||
var/datum/component/radioactive/contamination = I.GetComponent(/datum/component/radioactive)
|
||||
if(contamination)
|
||||
qdel(contamination)
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
return power_station
|
||||
|
||||
/obj/machinery/teleport/hub/CollidedWith(atom/movable/AM)
|
||||
if(z == ZLEVEL_CENTCOM)
|
||||
if(is_centcom_level(z))
|
||||
to_chat(AM, "You can't use this here.")
|
||||
return
|
||||
if(is_ready())
|
||||
|
||||
@@ -12,6 +12,10 @@
|
||||
var/obj/item/color_source
|
||||
var/max_wash_capacity = 5
|
||||
|
||||
/obj/machinery/washing_machine/ComponentInitialize()
|
||||
. = ..()
|
||||
AddComponent(/datum/component/redirect, list(COMSIG_COMPONENT_CLEAN_ACT), CALLBACK(src, .proc/clean_blood))
|
||||
|
||||
/obj/machinery/washing_machine/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>Alt-click it to start a wash cycle.</span>")
|
||||
@@ -36,20 +40,17 @@
|
||||
|
||||
busy = TRUE
|
||||
update_icon()
|
||||
sleep(200)
|
||||
wash_cycle()
|
||||
addtimer(CALLBACK(src, .proc/wash_cycle), 200)
|
||||
|
||||
/obj/machinery/washing_machine/clean_blood()
|
||||
..()
|
||||
/obj/machinery/washing_machine/proc/clean_blood()
|
||||
if(!busy)
|
||||
bloody_mess = 0
|
||||
bloody_mess = FALSE
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/machinery/washing_machine/proc/wash_cycle()
|
||||
for(var/X in contents)
|
||||
var/atom/movable/AM = X
|
||||
AM.clean_blood()
|
||||
AM.SendSignal(COMSIG_COMPONENT_CLEAN_ACT, CLEAN_STRENGTH_BLOOD)
|
||||
AM.machine_wash(src)
|
||||
|
||||
busy = FALSE
|
||||
|
||||
Reference in New Issue
Block a user