Merge branch 'master' into upstream-merge-33601
This commit is contained in:
@@ -161,7 +161,7 @@
|
||||
return
|
||||
log_activity("changed greater than charge filter to \"[new_filter]\"")
|
||||
if(new_filter)
|
||||
new_filter = Clamp(new_filter, 0, 100)
|
||||
new_filter = CLAMP(new_filter, 0, 100)
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
result_filters["Charge Above"] = new_filter
|
||||
if(href_list["below_filter"])
|
||||
@@ -171,7 +171,7 @@
|
||||
return
|
||||
log_activity("changed lesser than charge filter to \"[new_filter]\"")
|
||||
if(new_filter)
|
||||
new_filter = Clamp(new_filter, 0, 100)
|
||||
new_filter = CLAMP(new_filter, 0, 100)
|
||||
playsound(src, 'sound/machines/terminal_prompt_confirm.ogg', 50, 0)
|
||||
result_filters["Charge Below"] = new_filter
|
||||
if(href_list["access_filter"])
|
||||
|
||||
@@ -528,7 +528,7 @@
|
||||
playsound(loc, 'sound/effects/bang.ogg', 100, 1)
|
||||
var/turf/open/floor/F
|
||||
for(F in orange(1, src))
|
||||
F.ChangeTurf(F.baseturf)
|
||||
F.ScrapeAway()
|
||||
say("Something slams into the floor around [src], exposing it to space!")
|
||||
if(hull)
|
||||
sleep(10)
|
||||
|
||||
@@ -211,7 +211,7 @@
|
||||
if("pressure")
|
||||
var/target = input("New target pressure:", name, output_info ? output_info["internal"] : 0) as num|null
|
||||
if(!isnull(target) && !..())
|
||||
target = Clamp(target, 0, 50 * ONE_ATMOSPHERE)
|
||||
target = CLAMP(target, 0, 50 * ONE_ATMOSPHERE)
|
||||
signal.data += list("tag" = output_tag, "set_internal_pressure" = target)
|
||||
. = TRUE
|
||||
radio_connection.post_signal(src, signal, filter = GLOB.RADIO_ATMOSIA)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -83,12 +83,23 @@
|
||||
|
||||
if(!eyeobj.eye_initialized)
|
||||
var/camera_location
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.can_use() || z_lock.len && !(C.z in z_lock))
|
||||
continue
|
||||
if(C.network & networks)
|
||||
camera_location = get_turf(C)
|
||||
break
|
||||
var/turf/myturf = get_turf(src)
|
||||
if(eyeobj.use_static)
|
||||
if((!z_lock.len || (myturf.z in z_lock)) && GLOB.cameranet.checkTurfVis(myturf))
|
||||
camera_location = myturf
|
||||
else
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if(!C.can_use() || z_lock.len && !(C.z in z_lock))
|
||||
continue
|
||||
var/list/network_overlap = networks & C.network
|
||||
if(network_overlap.len)
|
||||
camera_location = get_turf(C)
|
||||
break
|
||||
else
|
||||
camera_location = myturf
|
||||
if(z_lock.len && !(myturf.z in z_lock))
|
||||
camera_location = locate(round(world.maxx/2), round(world.maxy/2), z_lock[1])
|
||||
|
||||
if(camera_location)
|
||||
eyeobj.eye_initialized = TRUE
|
||||
give_eye_control(L)
|
||||
@@ -292,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>")
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
scantemp = "<font class='bad'>Subject's brain is not responding to scanning stimuli.</font>"
|
||||
playsound(src, 'sound/machines/terminal_prompt_deny.ogg', 50, 0)
|
||||
return
|
||||
if((mob_occupant.disabilities & NOCLONE) && (src.scanner.scan_level < 2))
|
||||
if((mob_occupant.has_disability(DISABILITY_NOCLONE)) && (src.scanner.scan_level < 2))
|
||||
scantemp = "<font class='bad'>Subject no longer contains the fundamental materials required to create a living clone.</font>"
|
||||
playsound(src, 'sound/machines/terminal_alert.ogg', 50, 0)
|
||||
return
|
||||
|
||||
@@ -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,6 @@
|
||||
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 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
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
if(connected && connected.is_operational())
|
||||
if(connected.occupant) //set occupant_status message
|
||||
viable_occupant = connected.occupant
|
||||
if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.disabilities & NOCLONE) || (connected.scan_level == 3))) //occupant is viable for dna modification
|
||||
if(viable_occupant.has_dna() && (!(RADIMMUNE in viable_occupant.dna.species.species_traits)) && (!(viable_occupant.has_disability(DISABILITY_NOCLONE)) || (connected.scan_level == 3))) //occupant is viable for dna modification
|
||||
occupant_status += "[viable_occupant.name] => "
|
||||
switch(viable_occupant.stat)
|
||||
if(CONSCIOUS)
|
||||
@@ -337,12 +337,12 @@
|
||||
if(!num)
|
||||
num = round(input(usr, "Choose pulse duration:", "Input an Integer", null) as num|null)
|
||||
if(num)
|
||||
radduration = Wrap(num, 1, RADIATION_DURATION_MAX+1)
|
||||
radduration = WRAP(num, 1, RADIATION_DURATION_MAX+1)
|
||||
if("setstrength")
|
||||
if(!num)
|
||||
num = round(input(usr, "Choose pulse strength:", "Input an Integer", null) as num|null)
|
||||
if(num)
|
||||
radstrength = Wrap(num, 1, RADIATION_STRENGTH_MAX+1)
|
||||
radstrength = WRAP(num, 1, RADIATION_STRENGTH_MAX+1)
|
||||
if("screen")
|
||||
current_screen = href_list["text"]
|
||||
if("rejuv")
|
||||
@@ -353,13 +353,13 @@
|
||||
if("setbufferlabel")
|
||||
var/text = sanitize(input(usr, "Input a new label:", "Input an Text", null) as text|null)
|
||||
if(num && text)
|
||||
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
var/list/buffer_slot = buffer[num]
|
||||
if(istype(buffer_slot))
|
||||
buffer_slot["label"] = text
|
||||
if("setbuffer")
|
||||
if(num && viable_occupant)
|
||||
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
buffer[num] = list(
|
||||
"label"="Buffer[num]:[viable_occupant.real_name]",
|
||||
"UI"=viable_occupant.dna.uni_identity,
|
||||
@@ -370,7 +370,7 @@
|
||||
)
|
||||
if("clearbuffer")
|
||||
if(num)
|
||||
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
var/list/buffer_slot = buffer[num]
|
||||
if(istype(buffer_slot))
|
||||
buffer_slot.Cut()
|
||||
@@ -387,7 +387,7 @@
|
||||
apply_buffer(SCANNER_ACTION_MIXED,num)
|
||||
if("injector")
|
||||
if(num && injectorready < world.time)
|
||||
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
var/list/buffer_slot = buffer[num]
|
||||
if(istype(buffer_slot))
|
||||
var/obj/item/dnainjector/timed/I
|
||||
@@ -436,11 +436,11 @@
|
||||
injectorready = world.time + INJECTOR_TIMEOUT
|
||||
if("loaddisk")
|
||||
if(num && diskette && diskette.fields)
|
||||
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
buffer[num] = diskette.fields.Copy()
|
||||
if("savedisk")
|
||||
if(num && diskette && !diskette.read_only)
|
||||
num = Clamp(num, 1, NUMBER_OF_BUFFERS)
|
||||
num = CLAMP(num, 1, NUMBER_OF_BUFFERS)
|
||||
var/list/buffer_slot = buffer[num]
|
||||
if(istype(buffer_slot))
|
||||
diskette.name = "data disk \[[buffer_slot["label"]]\]"
|
||||
@@ -454,8 +454,8 @@
|
||||
delayed_action = list("action"=text2num(href_list["delayaction"]),"buffer"=num)
|
||||
if("pulseui","pulsese")
|
||||
if(num && viable_occupant && connected)
|
||||
radduration = Wrap(radduration, 1, RADIATION_DURATION_MAX+1)
|
||||
radstrength = Wrap(radstrength, 1, RADIATION_STRENGTH_MAX+1)
|
||||
radduration = WRAP(radduration, 1, RADIATION_DURATION_MAX+1)
|
||||
radstrength = WRAP(radstrength, 1, RADIATION_STRENGTH_MAX+1)
|
||||
|
||||
var/locked_state = connected.locked
|
||||
connected.locked = TRUE
|
||||
@@ -471,7 +471,7 @@
|
||||
switch(href_list["task"]) //Same thing as there but values are even lower, on best part they are about 0.0*, effectively no damage
|
||||
if("pulseui")
|
||||
var/len = length(viable_occupant.dna.uni_identity)
|
||||
num = Wrap(num, 1, len+1)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2
|
||||
//Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
|
||||
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
|
||||
@@ -487,7 +487,7 @@
|
||||
viable_occupant.updateappearance(mutations_overlay_update=1)
|
||||
if("pulsese")
|
||||
var/len = length(viable_occupant.dna.struc_enzymes)
|
||||
num = Wrap(num, 1, len+1)
|
||||
num = WRAP(num, 1, len+1)
|
||||
num = randomize_radiation_accuracy(num, radduration + (connected.precision_coeff ** 2), len)
|
||||
|
||||
var/block = round((num-1)/DNA_BLOCK_SIZE)+1
|
||||
@@ -518,21 +518,22 @@
|
||||
ran = round(ran) //negative, so floor it
|
||||
else
|
||||
ran = -round(-ran) //positive, so ceiling it
|
||||
return num2hex(Wrap(hex2num(input)+ran, 0, 16**length), length)
|
||||
return num2hex(WRAP(hex2num(input)+ran, 0, 16**length), length)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/randomize_radiation_accuracy(position_we_were_supposed_to_hit, radduration, number_of_blocks)
|
||||
return Wrap(round(position_we_were_supposed_to_hit + gaussian(0, RADIATION_ACCURACY_MULTIPLIER/radduration), 1), 1, number_of_blocks+1)
|
||||
/obj/machinery/computer/scan_consolenew/proc/randomize_radiation_accuracy(position, radduration, number_of_blocks)
|
||||
var/val = round(gaussian(0, RADIATION_ACCURACY_MULTIPLIER/radduration) + position, 1)
|
||||
return WRAP(val, 1, number_of_blocks+1)
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/get_viable_occupant()
|
||||
var/mob/living/carbon/viable_occupant = null
|
||||
if(connected)
|
||||
viable_occupant = connected.occupant
|
||||
if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.disabilities & NOCLONE))
|
||||
if(!istype(viable_occupant) || !viable_occupant.dna || (viable_occupant.has_disability(DISABILITY_NOCLONE)))
|
||||
viable_occupant = null
|
||||
return viable_occupant
|
||||
|
||||
/obj/machinery/computer/scan_consolenew/proc/apply_buffer(action,buffer_num)
|
||||
buffer_num = Clamp(buffer_num, 1, NUMBER_OF_BUFFERS)
|
||||
buffer_num = CLAMP(buffer_num, 1, NUMBER_OF_BUFFERS)
|
||||
var/list/buffer_slot = buffer[buffer_num]
|
||||
var/mob/living/carbon/viable_occupant = get_viable_occupant()
|
||||
if(istype(buffer_slot))
|
||||
|
||||
@@ -106,7 +106,7 @@
|
||||
return
|
||||
if(!new_goal)
|
||||
new_goal = default_goal
|
||||
id.goal = Clamp(new_goal, 0, 1000) //maximum 1000 points
|
||||
id.goal = CLAMP(new_goal, 0, 1000) //maximum 1000 points
|
||||
if("toggle_open")
|
||||
if(teleporter.locked)
|
||||
to_chat(usr, "The teleporter is locked")
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
|
||||
/obj/machinery/computer/telecrystals/uplinker/proc/ejectuplink()
|
||||
if(uplinkholder)
|
||||
uplinkholder.loc = get_turf(src.loc)
|
||||
uplinkholder.forceMove(drop_location())
|
||||
uplinkholder = null
|
||||
update_icon()
|
||||
|
||||
@@ -154,8 +154,11 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/getDangerous()//This scales the TC assigned with the round population.
|
||||
..()
|
||||
var/danger = GLOB.joined_player_list.len - SSticker.mode.syndicates.len
|
||||
danger = Ceiling(danger, 10)
|
||||
var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
|
||||
var/danger = GLOB.joined_player_list.len - nukeops.len
|
||||
// var/list/nukeops = get_antagonists(/datum/antagonist/nukeop)
|
||||
// var/danger = GLOB.joined_player_list.len - nukeops.len
|
||||
danger = CEILING(danger, 10)
|
||||
scaleTC(danger)
|
||||
|
||||
/obj/machinery/computer/telecrystals/boss/proc/scaleTC(amt)//Its own proc, since it'll probably need a lot of tweaks for balance, use a fancier algorhithm, etc.
|
||||
@@ -223,4 +226,4 @@ GLOBAL_LIST_INIT(possible_uplinker_IDs, list("Alfa","Bravo","Charlie","Delta","E
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
#undef NUKESCALINGMODIFIER
|
||||
#undef NUKESCALINGMODIFIER
|
||||
|
||||
@@ -209,4 +209,15 @@
|
||||
trg.teleporter_hub.update_icon()
|
||||
if(trg.teleporter_console)
|
||||
trg.teleporter_console.stat &= ~NOPOWER
|
||||
trg.teleporter_console.update_icon()
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user