[MIRROR] Does some code standardization/consistency. (#3161)

* Does some code standardization/consistency.

* fixes merge conflict generation

* Missed a few, oops

* Update pierrot_throat.dm
This commit is contained in:
CitadelStationBot
2017-10-21 06:10:22 -05:00
committed by Poojawa
parent 953a353ce7
commit adc2e46114
151 changed files with 970 additions and 524 deletions
+2 -1
View File
@@ -89,7 +89,8 @@ GLOBAL_LIST_EMPTY(teleportlocs)
// want to find machines, mobs, etc, in the same logical area, you will need to check all the
// related areas. This returns a master contents list to assist in that.
/proc/area_contents(area/A)
if(!istype(A)) return null
if(!istype(A))
return null
var/list/contents = list()
for(var/area/LSA in A.related)
contents += LSA.contents
+2 -1
View File
@@ -451,7 +451,8 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons)
return 1
/atom/proc/get_global_map_pos()
if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map)) return
if(!islist(GLOB.global_map) || isemptylist(GLOB.global_map))
return
var/cur_x = null
var/cur_y = null
var/list/y_arr = null
+2 -1
View File
@@ -61,7 +61,8 @@
return ..()
/atom/movable/Move(atom/newloc, direct = 0)
if(!loc || !newloc) return 0
if(!loc || !newloc)
return 0
var/atom/oldloc = loc
if(loc != newloc)
+14 -7
View File
@@ -8,10 +8,12 @@
/* DATA HUD DATUMS */
/atom/proc/add_to_all_human_data_huds()
for(var/datum/atom_hud/data/human/hud in GLOB.huds) hud.add_to_hud(src)
for(var/datum/atom_hud/data/human/hud in GLOB.huds)
hud.add_to_hud(src)
/atom/proc/remove_from_all_data_huds()
for(var/datum/atom_hud/data/hud in GLOB.huds) hud.remove_from_hud(src)
for(var/datum/atom_hud/data/hud in GLOB.huds)
hud.remove_from_hud(src)
/datum/atom_hud/data
@@ -21,10 +23,13 @@
/datum/atom_hud/data/human/medical/basic
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
if(!istype(H)) return 0
if(!istype(H))
return 0
var/obj/item/clothing/under/U = H.w_uniform
if(!istype(U)) return 0
if(U.sensor_mode <= SENSOR_VITALS) return 0
if(!istype(U))
return 0
if(U.sensor_mode <= SENSOR_VITALS)
return 0
return 1
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
@@ -128,7 +133,8 @@
B.update_suit_sensors(src)
var/turf/T = get_turf(src)
if (T) GLOB.crewmonitor.queueUpdate(T.z)
if (T)
GLOB.crewmonitor.queueUpdate(T.z)
//called when a living mob changes health
/mob/living/proc/med_hud_set_health()
@@ -200,7 +206,8 @@
sec_hud_set_security_status()
var/turf/T = get_turf(src)
if (T) GLOB.crewmonitor.queueUpdate(T.z)
if (T)
GLOB.crewmonitor.queueUpdate(T.z)
/mob/living/carbon/human/proc/sec_hud_set_implants()
var/image/holder
+2 -1
View File
@@ -68,7 +68,8 @@ GLOBAL_LIST_INIT(slot2type, list("head" = /obj/item/clothing/head/changeling, "w
if(antag_candidates.len>0)
for(var/i = 0, i < num_changelings, i++)
if(!antag_candidates.len) break
if(!antag_candidates.len)
break
var/datum/mind/changeling = pick(antag_candidates)
antag_candidates -= changeling
changelings += changeling
@@ -43,7 +43,8 @@
if(possible_changelings.len>0)
for(var/j = 0, j < num_changelings, j++)
if(!possible_changelings.len) break
if(!possible_changelings.len)
break
var/datum/mind/changeling = pick(possible_changelings)
antag_candidates -= changeling
possible_changelings -= changeling
+4 -2
View File
@@ -25,7 +25,8 @@
if(!(AT.z in GLOB.station_z_levels)) //Only check one, it's enough.
skip = 1
break
if(skip) continue
if(skip)
continue
A.power_light = FALSE
A.power_equip = FALSE
A.power_environ = FALSE
@@ -40,7 +41,8 @@
if(istype(A,area_type))
skip = 1
break
if(skip) continue
if(skip)
continue
C.cell.charge = 0
@@ -241,10 +241,11 @@
/obj/item/organ/heart/gland/plasma/activate()
to_chat(owner, "<span class='warning'>You feel bloated.</span>")
addtimer(CALLBACK(GLOBAL_PROC, .proc/to_chat, owner, "<span class='userdanger'>A massive stomachache overcomes you.</span>"), 150)
addtimer(CALLBACK(src, .proc/vomit_plasma), 200)
/obj/item/organ/heart/gland/plasma/proc/vomit_plasma()
sleep(150)
if(!owner)
return
to_chat(owner, "<span class='userdanger'>A massive stomachache overcomes you.</span>")
sleep(50)
if(!owner)
return
owner.visible_message("<span class='danger'>[owner] vomits a cloud of plasma!</span>")
+6 -3
View File
@@ -407,14 +407,17 @@ GLOBAL_LIST_EMPTY(possible_items)
/datum/objective/steal/proc/select_target() //For admins setting objectives manually.
var/list/possible_items_all = GLOB.possible_items+"custom"
var/new_target = input("Select target:", "Objective target", steal_target) as null|anything in possible_items_all
if (!new_target) return
if (!new_target)
return
if (new_target == "custom") //Can set custom items.
var/obj/item/custom_target = input("Select type:","Type") as null|anything in typesof(/obj/item)
if (!custom_target) return
if (!custom_target)
return
var/custom_name = initial(custom_target.name)
custom_name = stripped_input("Enter target name:", "Objective target", custom_name)
if (!custom_name) return
if (!custom_name)
return
steal_target = custom_target
explanation_text = "Steal [custom_name]."
+3 -2
View File
@@ -26,7 +26,7 @@
/datum/airlock_maker/New(var/atom/target_loc)
linked = new(target_loc)
linked.maker = src
linked.anchored = FALSE
linked.anchored = FALSE
access_used = list()
interact()
@@ -69,7 +69,8 @@
usr << browse(dat,"window=airlockmaker")
/datum/airlock_maker/Topic(var/href,var/list/href_list)
if(!usr) return
if(!usr)
return
if(!src || !linked || !linked.loc)
usr << browse(null,"window=airlockmaker")
return
+6 -3
View File
@@ -477,14 +477,17 @@ Class Procs:
// Hook for html_interface module to prevent updates to clients who don't have this as their active machine.
/obj/machinery/proc/hiIsValidClient(datum/html_interface_client/hclient, datum/html_interface/hi)
if (hclient.client.mob && (hclient.client.mob.stat == 0 || IsAdminGhost(hclient.client.mob)))
if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob)) return TRUE
else return hclient.client.mob.machine == src && Adjacent(hclient.client.mob)
if (isAI(hclient.client.mob) || IsAdminGhost(hclient.client.mob))
return TRUE
else
return hclient.client.mob.machine == src && Adjacent(hclient.client.mob)
else
return FALSE
// Hook for html_interface module to unset the active machine when the window is closed by the player.
/obj/machinery/proc/hiOnHide(datum/html_interface_client/hclient)
if (hclient.client.mob && hclient.client.mob.machine == src) hclient.client.mob.unset_machine()
if (hclient.client.mob && hclient.client.mob.machine == src)
hclient.client.mob.unset_machine()
/obj/machinery/proc/can_be_overridden()
. = 1
+9 -5
View File
@@ -8,9 +8,11 @@
/obj/machinery/door/airlock/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
if(!signal || signal.encryption)
return
if(id_tag != signal.data["tag"] || !signal.data["command"]) return
if(id_tag != signal.data["tag"] || !signal.data["command"])
return
switch(signal.data["command"])
if("open")
@@ -63,12 +65,14 @@
/obj/machinery/door/airlock/open(surpress_send)
. = ..()
if(!surpress_send) send_status()
if(!surpress_send)
send_status()
/obj/machinery/door/airlock/close(surpress_send)
. = ..()
if(!surpress_send) send_status()
if(!surpress_send)
send_status()
/obj/machinery/door/airlock/proc/set_frequency(new_frequency)
@@ -148,4 +152,4 @@
/obj/machinery/airlock_sensor/Destroy()
SSradio.remove_object(src,frequency)
return ..()
return ..()
+2 -2
View File
@@ -57,7 +57,8 @@
return 1
/obj/machinery/camera/proc/triggerAlarm()
if (!detectTime) return 0
if (!detectTime)
return 0
for (var/mob/living/silicon/aiPlayer in GLOB.player_list)
if (status)
aiPlayer.triggerAlarm("Motion", get_area(src), list(src), src)
@@ -69,4 +70,3 @@
if (!area_motion)
if(isliving(AM))
newTarget(AM)
+2 -1
View File
@@ -53,7 +53,8 @@
var/area/A = get_area(src)
if(A)
for(var/obj/machinery/camera/autoname/C in GLOB.machines)
if(C == src) continue
if(C == src)
continue
var/area/CA = get_area(C)
if(CA.type == A.type)
if(C.number)
+4 -2
View File
@@ -60,12 +60,14 @@
radio_connection = SSradio.add_object(src, receive_frequency, GLOB.RADIO_ATMOSIA)
/obj/machinery/computer/atmos_alert/receive_signal(datum/signal/signal)
if(!signal || signal.encryption) return
if(!signal || signal.encryption)
return
var/zone = signal.data["zone"]
var/severity = signal.data["alert"]
if(!zone || !severity) return
if(!zone || !severity)
return
minor_alarms -= zone
priority_alarms -= zone
@@ -24,7 +24,8 @@
playsound(src.loc, P.usesound, 50, 1)
to_chat(user, "<span class='notice'>You start deconstructing the frame...</span>")
if(do_after(user, 20*P.toolspeed, target = src))
if(!src || !WT.isOn()) return
if(!src || !WT.isOn())
return
to_chat(user, "<span class='notice'>You deconstruct the frame.</span>")
var/obj/item/stack/sheet/metal/M = new (loc, 5)
M.add_fingerprint(user)
+18 -9
View File
@@ -103,9 +103,12 @@
if (I && istype(I))
if(ACCESS_CAPTAIN in I.access)
var/old_level = GLOB.security_level
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
if(!tmp_alertlevel)
tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel < SEC_LEVEL_GREEN)
tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel > SEC_LEVEL_BLUE)
tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
set_security_level(tmp_alertlevel)
if(GLOB.security_level != old_level)
to_chat(usr, "<span class='notice'>Authorization confirmed. Modifying security level.</span>")
@@ -230,7 +233,8 @@
if("securitylevel")
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
if(!tmp_alertlevel) tmp_alertlevel = 0
if(!tmp_alertlevel)
tmp_alertlevel = 0
state = STATE_CONFIRM_LEVEL
if("changeseclevel")
state = STATE_ALERT_LEVEL
@@ -356,11 +360,15 @@
make_announcement(usr, 1)
if("ai-securitylevel")
src.tmp_alertlevel = text2num( href_list["newalertlevel"] )
if(!tmp_alertlevel) tmp_alertlevel = 0
if(!tmp_alertlevel)
tmp_alertlevel = 0
var/old_level = GLOB.security_level
if(!tmp_alertlevel) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel < SEC_LEVEL_GREEN) tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel > SEC_LEVEL_BLUE) tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
if(!tmp_alertlevel)
tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel < SEC_LEVEL_GREEN)
tmp_alertlevel = SEC_LEVEL_GREEN
if(tmp_alertlevel > SEC_LEVEL_BLUE)
tmp_alertlevel = SEC_LEVEL_BLUE //Cannot engage delta with this
set_security_level(tmp_alertlevel)
if(GLOB.security_level != old_level)
//Only notify the admins if an actual change happened
@@ -670,7 +678,8 @@
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
if(!frequency)
return
var/datum/signal/status_signal = new
status_signal.source = src
+20 -10
View File
@@ -93,7 +93,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
/datum/crewmonitor/proc/show(mob/mob, z)
if (mob.client)
sendResources(mob.client)
if (!z) z = mob.z
if (!z)
z = mob.z
if (z > 0 && src.interfaces)
var/datum/html_interface/hi
@@ -160,7 +161,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
pos = H.z == 0 || U.sensor_mode == SENSOR_COORDS ? get_turf(H) : null
// Special case: If the mob is inside an object confirm the z-level on turf level.
if (H.z == 0 && (!pos || pos.z != z)) continue
if (H.z == 0 && (!pos || pos.z != z))
continue
I = H.wear_id ? H.wear_id.GetID() : null
@@ -173,8 +175,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
assignment = ""
ijob = 80
if (U.sensor_mode >= SENSOR_LIVING) life_status = (!H.stat ? "true" : "false")
else life_status = null
if (U.sensor_mode >= SENSOR_LIVING)
life_status = (!H.stat ? "true" : "false")
else
life_status = null
if (U.sensor_mode >= SENSOR_VITALS)
dam1 = round(H.getOxyLoss(),1)
@@ -188,7 +192,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
dam4 = null
if (U.sensor_mode >= SENSOR_COORDS)
if (!pos) pos = get_turf(H)
if (!pos)
pos = get_turf(H)
var/area/player_area = get_area(H)
area = format_text(player_area.name)
@@ -208,13 +213,15 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
var/z = ""
for (z in src.interfaces)
if (src.interfaces[z] == hi) break
if (src.interfaces[z] == hi)
break
if(hclient.client.mob && IsAdminGhost(hclient.client.mob))
return TRUE
if (hclient.client.mob && hclient.client.mob.stat == 0 && hclient.client.mob.z == text2num(z))
if (isAI(hclient.client.mob)) return TRUE
if (isAI(hclient.client.mob))
return TRUE
else if (iscyborg(hclient.client.mob))
return (locate(/obj/machinery/computer/crew, range(world.view, hclient.client.mob))) || (locate(/obj/item/device/sensor_device, hclient.client.mob.contents))
else
@@ -238,8 +245,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
var/obj/machinery/camera/C = locate(/obj/machinery/camera) in range(5, tile)
if (!C) C = locate(/obj/machinery/camera) in urange(10, tile)
if (!C) C = locate(/obj/machinery/camera) in urange(15, tile)
if (!C)
C = locate(/obj/machinery/camera) in urange(10, tile)
if (!C)
C = locate(/obj/machinery/camera) in urange(15, tile)
if (C)
addtimer(CALLBACK(src, .proc/update_ai, AI, C, AI.eyeobj.loc), min(30, get_dist(get_turf(C), AI.eyeobj) / 4))
@@ -254,7 +263,8 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new)
. = ..()
if (old_z != src.z) GLOB.crewmonitor.queueUpdate(old_z)
if (old_z != src.z)
GLOB.crewmonitor.queueUpdate(old_z)
GLOB.crewmonitor.queueUpdate(src.z)
else
return ..()
+2 -1
View File
@@ -66,7 +66,8 @@
ShowInterface(user)
/obj/machinery/computer/scan_consolenew/proc/ShowInterface(mob/user, last_change)
if(!user) return
if(!user)
return
var/datum/browser/popup = new(user, "scannernew", "DNA Modifier Console", 800, 630) // Set up the popup browser window
if(!(in_range(src, user) || issilicon(user)))
popup.close()
+5 -3
View File
@@ -82,7 +82,8 @@
if(hacking || emagged)
screen = 2
else if(!auth || !linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN))) message = noserver
if(!linkedServer || (linkedServer.stat & (NOPOWER|BROKEN)))
message = noserver
screen = 0
switch(screen)
@@ -267,7 +268,8 @@
//Turn the server on/off.
if (href_list["active"])
if(auth) linkedServer.active = !linkedServer.active
if(auth)
linkedServer.active = !linkedServer.active
//Find a server
if (href_list["find"])
if(GLOB.message_servers && GLOB.message_servers.len > 1)
@@ -468,4 +470,4 @@
info = "<center><h2>Daily Key Reset</h2></center><br>The new message monitor key is '[server.decryptkey]'.<br>Please keep this a secret and away from the clown.<br>If necessary, change the password to a more secure one."
info_links = info
add_overlay("paper_words")
break
break
+2 -1
View File
@@ -95,7 +95,8 @@
if(!usr.transferItemToLoc(I, src))
return
inserted_id = I
else to_chat(usr, "<span class='danger'>No valid ID.</span>")
else
to_chat(usr, "<span class='danger'>No valid ID.</span>")
else if(inserted_id)
switch(href_list["id"])
if("eject")
@@ -19,7 +19,8 @@
/datum/computer/file/embedded_program/airlock_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
var/receive_tag = signal.data["tag"]
if(!receive_tag) return
if(!receive_tag)
return
if(receive_tag==sensor_tag)
if(signal.data["pressure"])
@@ -206,7 +207,7 @@
icon_state = "airlock_control_standby"
name = "airlock console"
density = FALSE
density = FALSE
frequency = 1449
power_channel = ENVIRON
@@ -220,7 +221,7 @@
var/sanitize_external
/obj/machinery/embedded_controller/radio/airlock_controller/Initialize(mapload)
. = ..()
. = ..()
if(!mapload)
return
@@ -292,4 +293,4 @@
</div>
[state_options]"}
return output
return output
@@ -21,10 +21,10 @@
var/datum/computer/file/embedded_program/program
name = "embedded controller"
density = FALSE
anchored = TRUE
density = FALSE
anchored = TRUE
var/on = TRUE
var/on = TRUE
/obj/machinery/embedded_controller/interact(mob/user)
user.set_machine(src)
@@ -44,7 +44,8 @@
return 0
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal, receive_method, receive_param)
if(!signal || signal.encryption) return
if(!signal || signal.encryption)
return
if(program)
program.receive_signal(signal, receive_method, receive_param)
@@ -73,11 +74,11 @@
var/datum/radio_frequency/radio_connection
/obj/machinery/embedded_controller/radio/Destroy()
SSradio.remove_object(src,frequency)
SSradio.remove_object(src,frequency)
return ..()
/obj/machinery/embedded_controller/radio/Initialize()
. = ..()
. = ..()
set_frequency(frequency)
/obj/machinery/embedded_controller/radio/post_signal(datum/signal/signal)
+4 -2
View File
@@ -166,7 +166,8 @@
/obj/machinery/magnetic_module/proc/magnetic_process() // proc that actually does the pulling
if(pulling) return
if(pulling)
return
while(on)
pulling = 1
@@ -333,7 +334,8 @@
updateUsrDialog()
/obj/machinery/magnetic_controller/proc/MagnetMove()
if(looping) return
if(looping)
return
while(moving && rpath.len >= 1)
+2 -1
View File
@@ -343,7 +343,8 @@ GLOBAL_LIST_EMPTY(allConsoles)
if (sending)
var/pass = 0
for (var/obj/machinery/message_server/MS in GLOB.machines)
if(!MS.active) continue
if(!MS.active)
continue
MS.send_rc_message(href_list["department"],department,log_msg,msgStamped,msgVerified,priority)
pass = 1
+9 -8
View File
@@ -7,8 +7,8 @@
icon = 'icons/obj/singularity.dmi'
icon_state = "beacon"
anchored = FALSE
density = TRUE
anchored = FALSE
density = TRUE
layer = BELOW_MOB_LAYER //so people can't hide it and it's REALLY OBVIOUS
stat = 0
verb_say = "states"
@@ -20,7 +20,8 @@
/obj/machinery/power/singularity_beacon/proc/Activate(mob/user = null)
if(surplus() < 1500)
if(user) to_chat(user, "<span class='notice'>The connected wire doesn't have enough current.</span>")
if(user)
to_chat(user, "<span class='notice'>The connected wire doesn't have enough current.</span>")
return
for(var/obj/singularity/singulo in GLOB.singularities)
if(singulo.z == z)
@@ -54,13 +55,13 @@
/obj/machinery/power/singularity_beacon/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/screwdriver))
if(istype(W, /obj/item/screwdriver))
if(active)
to_chat(user, "<span class='warning'>You need to deactivate the beacon first!</span>")
return
if(anchored)
anchored = FALSE
anchored = FALSE
to_chat(user, "<span class='notice'>You unscrew the beacon from the floor.</span>")
disconnect_from_network()
return
@@ -68,7 +69,7 @@
if(!connect_to_network())
to_chat(user, "<span class='warning'>This device must be placed over an exposed, powered cable node!</span>")
return
anchored = TRUE
anchored = TRUE
to_chat(user, "<span class='notice'>You screw the beacon to the floor and attach the cable.</span>")
return
else
@@ -105,8 +106,8 @@
name = "suspicious beacon"
icon = 'icons/obj/radio.dmi'
icon_state = "beacon"
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
lefthand_file = 'icons/mob/inhands/misc/devices_lefthand.dmi'
righthand_file = 'icons/mob/inhands/misc/devices_righthand.dmi'
desc = "A label on it reads: <i>Warning: Activating this device will send a special beacon to your location</i>."
origin_tech = "bluespace=6;syndicate=5"
w_class = WEIGHT_CLASS_SMALL
@@ -60,7 +60,8 @@
dat += "<br>Identification String: <a href='?src=\ref[src];input=id'>NULL</a>"
dat += "<br>Network: <a href='?src=\ref[src];input=network'>[network]</a>"
dat += "<br>Prefabrication: [autolinkers.len ? "TRUE" : "FALSE"]"
if(hide) dat += "<br>Shadow Link: ACTIVE</a>"
if(hide)
dat += "<br>Shadow Link: ACTIVE</a>"
//Show additional options for certain machines.
dat += Options_Menu()
+2 -1
View File
@@ -46,7 +46,8 @@
log_message("Critical failure",1)
/obj/item/mecha_parts/mecha_equipment/proc/get_equip_info()
if(!chassis) return
if(!chassis)
return
var/txt = "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp;"
if(chassis.selected == src)
txt += "<b>[src.name]</b>"
@@ -14,7 +14,8 @@
range = RANGED
/obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target)
if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM) return
if(!action_checks(target) || src.loc.z == ZLEVEL_CENTCOM)
return
var/turf/T = get_turf(target)
if(T)
do_teleport(chassis, T, 4)
@@ -112,7 +113,8 @@
else
atoms = orange(3, target)
for(var/atom/movable/A in atoms)
if(A.anchored) continue
if(A.anchored)
continue
spawn(0)
var/iter = 5-get_dist(A,target)
for(var/i=0 to iter)
@@ -208,7 +210,8 @@
..()
/obj/item/mecha_parts/mecha_equipment/repair_droid/get_equip_info()
if(!chassis) return
if(!chassis)
return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp; [src.name] - <a href='?src=\ref[src];toggle_repairs=1'>[equip_ready?"A":"Dea"]ctivate</a>"
@@ -315,7 +318,8 @@
log_message("Deactivated.")
/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_equip_info()
if(!chassis) return
if(!chassis)
return
return "<span style=\"color:[equip_ready?"#0f0":"#f00"];\">*</span>&nbsp; [src.name] - <a href='?src=\ref[src];toggle_relay=1'>[equip_ready?"A":"Dea"]ctivate</a>"
@@ -52,7 +52,8 @@
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD) return
if(M.stat == DEAD)
return
if(chassis.occupant.a_intent == INTENT_HARM)
M.take_overall_damage(dam_force)
if(!M)
@@ -103,7 +104,8 @@
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD) return
if(M.stat == DEAD)
return
if(chassis.occupant.a_intent == INTENT_HARM)
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
+2 -1
View File
@@ -596,7 +596,8 @@
///////////////////////////////////
/obj/mecha/proc/check_for_internal_damage(list/possible_int_damage,ignore_threshold=null)
if(!islist(possible_int_damage) || isemptylist(possible_int_damage)) return
if(!islist(possible_int_damage) || isemptylist(possible_int_damage))
return
if(prob(20))
if(ignore_threshold || obj_integrity*100/max_integrity < internal_damage_threshold)
for(var/T in possible_int_damage)
+8 -4
View File
@@ -159,7 +159,8 @@
/obj/mecha/proc/output_access_dialog(obj/item/card/id/id_card, mob/user)
if(!id_card || !user) return
if(!id_card || !user)
return
. = {"<html>
<head><style>
h1 {font-size:15px;margin-bottom:4px;}
@@ -173,9 +174,11 @@
. += "[get_access_desc(a)] - <a href='?src=\ref[src];del_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Delete</a><br>"
. += "<hr><h1>Following keycodes were detected on portable device:</h1>"
for(var/a in id_card.access)
if(a in operation_req_access) continue
if(a in operation_req_access)
continue
var/a_name = get_access_desc(a)
if(!a_name) continue //there's some strange access without a name
if(!a_name)
continue //there's some strange access without a name
. += "[a_name] - <a href='?src=\ref[src];add_req_access=[a];user=\ref[user];id_card=\ref[id_card]'>Add</a><br>"
. += "<hr><a href='?src=\ref[src];finish_req_access=1;user=\ref[user]'>Finish</a> "
. += "<span class='danger'>(Warning! The ID upload panel will be locked. It can be unlocked only through Exosuit Interface.)</span>"
@@ -185,7 +188,8 @@
/obj/mecha/proc/output_maintenance_dialog(obj/item/card/id/id_card,mob/user)
if(!id_card || !user) return
if(!id_card || !user)
return
. = {"<html>
<head>
<style>
+4 -2
View File
@@ -221,8 +221,10 @@
var/y_distance = TO.y - FROM.y
var/x_distance = TO.x - FROM.x
for (var/atom/movable/A in urange(12, FROM )) // iterate thru list of mobs in the area
if(istype(A, /obj/item/device/radio/beacon)) continue // don't teleport beacons because that's just insanely stupid
if(A.anchored) continue
if(istype(A, /obj/item/device/radio/beacon))
continue // don't teleport beacons because that's just insanely stupid
if(A.anchored)
continue
var/turf/newloc = locate(A.x + x_distance, A.y + y_distance, TO.z) // calculate the new place
if(!A.Move(newloc) && newloc) // if the atom, for some reason, can't move, FORCE them to move! :) We try Move() first to invoke any movement-related checks the atom needs to perform after moving
+2 -1
View File
@@ -1,5 +1,6 @@
/proc/empulse(turf/epicenter, heavy_range, light_range, log=0)
if(!epicenter) return
if(!epicenter)
return
if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)
+2 -1
View File
@@ -558,7 +558,8 @@ GLOBAL_VAR_INIT(rpg_loot_items, FALSE)
..()
if(current_size >= STAGE_FOUR)
throw_at(S,14,3, spin=0)
else return
else
return
/obj/item/throw_impact(atom/A)
if(A && !QDELETED(A))
+2 -1
View File
@@ -16,7 +16,8 @@
to_chat(user, "<span class='notice'>You pet [src]. You swear it looks up at you.</span>")
owner = user
owned = 1
else return ..()
else
return ..()
/obj/item/toy/plush/carpplushie/dehy_carp/proc/Swell()
desc = "It's growing!"
+6 -3
View File
@@ -849,7 +849,8 @@ GLOBAL_LIST_EMPTY(PDAs)
user.show_message("<span class='notice'>No radiation detected.</span>")
/obj/item/device/pda/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
switch(scanmode)
if(3)
@@ -899,7 +900,8 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/device/pda/proc/explode() //This needs tuning.
if(!detonatable) return
if(!detonatable)
return
var/turf/T = get_turf(src)
if (ismob(loc))
@@ -1011,5 +1013,6 @@ GLOBAL_LIST_EMPTY(PDAs)
. = list()
// Returns a list of PDAs which can be viewed from another PDA/message monitor.
for(var/obj/item/device/pda/P in GLOB.PDAs)
if(!P.owner || P.toff || P.hidden) continue
if(!P.owner || P.toff || P.hidden)
continue
. += P
+2 -1
View File
@@ -202,7 +202,8 @@
var/datum/radio_frequency/frequency = SSradio.return_frequency(1435)
if(!frequency) return
if(!frequency)
return
var/datum/signal/status_signal = new
status_signal.source = src
@@ -15,7 +15,7 @@
throw_speed = 4
throw_range = 20
origin_tech = "syndicate=1;engineering=3"
flags_1 = NOBLUDGEON_1
flags_1 = NOBLUDGEON_1
var/obj/machinery/camera/current = null
@@ -124,7 +124,8 @@
// 15 second intervals ~ 1/4 minute
var/m = round(time_diff/4)
var/s = (time_diff - 4*m) * 15
if(!s) s = "00"
if(!s)
s = "00"
html += "Last seen near [outstring] ([m]:[s] minute\s ago)<br>"
if( C && (C.bug == src)) //Checks to see if the camera has a bug
html += "<a href='?src=\ref[src];emp=\ref[C]'>\[Disable\]</a>"
@@ -218,7 +219,7 @@
var/list/cameras = flatten_list(bugged_cameras)
var/obj/machinery/camera/C = locate(href_list["emp"]) in cameras
if(C && istype(C) && C.bug == src)
C.emp_act(EMP_HEAVY)
C.emp_act(EMP_HEAVY)
C.bug = null
bugged_cameras -= C.c_tag
interact()
@@ -32,7 +32,8 @@
toggle()
/obj/item/device/chameleon/afterattack(atom/target, mob/user , proximity)
if(!proximity) return
if(!proximity)
return
if(!check_sprite(target))
return
if(!active_dummy)
@@ -51,7 +52,8 @@
return FALSE
/obj/item/device/chameleon/proc/toggle()
if(!can_use || !saved_appearance) return
if(!can_use || !saved_appearance)
return
if(active_dummy)
eject_all()
playsound(get_turf(src), 'sound/effects/pop.ogg', 100, 1, -6)
@@ -192,7 +192,8 @@
if(target.status != LIGHT_OK)
if(CanUse(U))
if(!Use(U)) return
if(!Use(U))
return
to_chat(U, "<span class='notice'>You replace the [target.fitting] with \the [src].</span>")
if(target.status != LIGHT_EMPTY)
+20 -10
View File
@@ -128,16 +128,26 @@
if(pai)
src.cut_overlays()
switch(emotion)
if(1) src.add_overlay("pai-happy")
if(2) src.add_overlay("pai-cat")
if(3) src.add_overlay("pai-extremely-happy")
if(4) src.add_overlay("pai-face")
if(5) src.add_overlay("pai-laugh")
if(6) src.add_overlay("pai-off")
if(7) src.add_overlay("pai-sad")
if(8) src.add_overlay("pai-angry")
if(9) src.add_overlay("pai-what")
if(10) src.add_overlay("pai-null")
if(1)
src.add_overlay("pai-happy")
if(2)
src.add_overlay("pai-cat")
if(3)
src.add_overlay("pai-extremely-happy")
if(4)
src.add_overlay("pai-face")
if(5)
src.add_overlay("pai-laugh")
if(6)
src.add_overlay("pai-off")
if(7)
src.add_overlay("pai-sad")
if(8)
src.add_overlay("pai-angry")
if(9)
src.add_overlay("pai-what")
if(10)
src.add_overlay("pai-null")
/obj/item/device/paicard/proc/alertUpdate()
visible_message("<span class ='info'>[src] flashes a message across its screen, \"Additional personalities available for download.\"", "<span class='notice'>[src] bleeps electronically.</span>")
@@ -195,9 +195,11 @@
return ITALICS | REDUCE_RANGE
/obj/item/device/radio/proc/talk_into_impl(atom/movable/M, message, channel, list/spans, datum/language/language)
if(!on) return // the device has to be on
if(!on)
return // the device has to be on
// Fix for permacell radios, but kinda eh about actually fixing them.
if(!M || !message) return
if(!M || !message)
return
if(wires.is_cut(WIRE_TX))
return
+10 -5
View File
@@ -157,19 +157,24 @@
if(precision)
the_targets -= my_target
var/datum/reagents/R = new/datum/reagents(5)
if(!W) return
if(!W)
return
W.reagents = R
R.my_atom = W
if(!W || !src) return
if(!W || !src)
return
src.reagents.trans_to(W,1)
for(var/b=0, b<power, b++)
step_towards(W,my_target)
if(!W || !W.reagents) return
if(!W || !W.reagents)
return
W.reagents.reaction(get_turf(W))
for(var/A in get_turf(W))
if(!W) return
if(!W)
return
W.reagents.reaction(A)
if(W.loc == my_target) break
if(W.loc == my_target)
break
sleep(2)
else
+2 -1
View File
@@ -35,7 +35,8 @@
/obj/item/mop/afterattack(atom/A, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(reagents.total_volume < 1)
to_chat(user, "<span class='warning'>Your mop is dry!</span>")
+2 -1
View File
@@ -79,7 +79,8 @@
/obj/item/paint/afterattack(turf/target, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(paintleft <= 0)
icon_state = "paint_empty"
return
+2 -1
View File
@@ -58,7 +58,8 @@
return
/obj/item/twohanded/singularityhammer/afterattack(atom/A as mob|obj|turf|area, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(wielded)
if(charged == 5)
charged = 0
+2 -1
View File
@@ -136,7 +136,8 @@
if (usr.restrained() || usr.stat || usr.get_active_held_item() != src)
return
if (href_list["make"])
if (get_amount() < 1) qdel(src) //Never should happen
if (get_amount() < 1)
qdel(src) //Never should happen
var/datum/stack_recipe/R = recipes[text2num(href_list["make"])]
var/multiplier = text2num(href_list["multiplier"])
+4 -2
View File
@@ -173,7 +173,8 @@
// Modified handle_item_insertion. Would prefer not to, but...
/obj/item/storage/bag/sheetsnatcher/handle_item_insertion(obj/item/W, prevent_warning = 0)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
if(!istype(S))
return 0
var/amount
var/inserted = 0
@@ -254,7 +255,8 @@
// Instead of removing
/obj/item/storage/bag/sheetsnatcher/remove_from_storage(obj/item/W, atom/new_location)
var/obj/item/stack/sheet/S = W
if(!istype(S)) return 0
if(!istype(S))
return 0
//I would prefer to drop a new stack, but the item/attack_hand code
// that calls this can't recieve a different object than you clicked on.
+2 -1
View File
@@ -71,7 +71,8 @@
if (istype(src.loc, /obj/item/assembly))
icon = src.loc
if(!in_range(src, user))
if (icon == src) to_chat(user, "<span class='notice'>If you want any more information you'll need to get closer.</span>")
if (icon == src)
to_chat(user, "<span class='notice'>If you want any more information you'll need to get closer.</span>")
return
to_chat(user, "<span class='notice'>The pressure gauge reads [round(src.air_contents.return_pressure(),0.01)] kPa.</span>")
+2 -1
View File
@@ -480,7 +480,8 @@
/obj/item/weldingtool/afterattack(atom/O, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if(welding)
remove_fuel(1)
+2 -1
View File
@@ -49,7 +49,8 @@
return
/obj/item/toy/balloon/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity) return
if(!proximity)
return
if (istype(A, /obj/structure/reagent_dispensers))
var/obj/structure/reagent_dispensers/RD = A
if(RD.reagents.total_volume <= 0)
+2 -1
View File
@@ -1,5 +1,6 @@
/proc/radiation_pulse(turf/epicenter, heavy_range, light_range, severity, log=0)
if(!epicenter || !severity) return
if(!epicenter || !severity)
return
if(!isturf(epicenter))
epicenter = get_turf(epicenter.loc)
@@ -117,7 +117,8 @@
R.loaded = new/obj/structure/bed/roller(R)
qdel(src) //"Load"
return
else return ..()
else
return ..()
/obj/item/roller/attack_self(mob/user)
deploy_roller(user, user.loc)
@@ -576,7 +576,8 @@
user.visible_message("[user] wires the airlock assembly.", \
"<span class='notice'>You start to wire the airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(C.get_amount() < 1 || state != 0) return
if(C.get_amount() < 1 || state != 0)
return
C.use(1)
src.state = 1
to_chat(user, "<span class='notice'>You wire the airlock assembly.</span>")
@@ -638,7 +639,8 @@
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(G.get_amount() < 1 || mineral) return
if(G.get_amount() < 1 || mineral)
return
if(!istype(G, /obj/item/stack/sheet/glass))
to_chat(user, "<span class='notice'>You install [G.name] windows into the airlock assembly.</span>")
heat_proof_finished = 1 //plasma & reinforced glass makes the airlock heat-proof
@@ -666,7 +668,8 @@
user.visible_message("[user] adds [G.name] to the airlock assembly.", \
"<span class='notice'>You start to install [G.name] into the airlock assembly...</span>")
if(do_after(user, 40, target = src))
if(G.get_amount() < 2 || mineral) return
if(G.get_amount() < 2 || mineral)
return
to_chat(user, "<span class='notice'>You install [M] plating into the airlock assembly.</span>")
G.use(2)
mineral = "[M]"
+2 -1
View File
@@ -35,7 +35,8 @@
if(RCD_WINDOWGRILLE)
if(the_rcd.window_type == /obj/structure/window/reinforced/fulltile)
return list("mode" = RCD_WINDOWGRILLE, "delay" = 40, "cost" = 12)
else return list("mode" = RCD_WINDOWGRILLE, "delay" = 20, "cost" = 8)
else
return list("mode" = RCD_WINDOWGRILLE, "delay" = 20, "cost" = 8)
return FALSE
/obj/structure/grille/rcd_act(mob/user, var/obj/item/construction/rcd/the_rcd, passed_mode)
+2 -1
View File
@@ -15,7 +15,8 @@
return
for(var/obj/item/I in loc)
if(notices > 4) break
if(notices > 4)
break
if(istype(I, /obj/item/paper))
I.loc = src
notices++
+2 -1
View File
@@ -53,7 +53,8 @@ FLOOR SAFES
if(tumbler_2_pos == tumbler_2_open)
to_chat(user, "<span class='italics'>You hear a [pick("tink", "krink", "plink")] from [src].</span>")
if(tumbler_1_pos == tumbler_1_open && tumbler_2_pos == tumbler_2_open)
if(user) visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
if(user)
visible_message("<i><b>[pick("Spring", "Sprang", "Sproing", "Clunk", "Krunk")]!</b></i>")
return 1
return 0
+4 -2
View File
@@ -312,13 +312,15 @@
if(deconstruction_ready)
to_chat(user, "<span class='notice'>You start strengthening the reinforced table...</span>")
if (do_after(user, 50*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
if(!src || !WT.isOn())
return
to_chat(user, "<span class='notice'>You strengthen the table.</span>")
deconstruction_ready = 0
else
to_chat(user, "<span class='notice'>You start weakening the reinforced table...</span>")
if (do_after(user, 50*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
if(!src || !WT.isOn())
return
to_chat(user, "<span class='notice'>You weaken the table.</span>")
deconstruction_ready = 1
else
@@ -88,7 +88,8 @@
/obj/structure/transit_tube_pod/Process_Spacemove()
if(moving) //No drifting while moving in the tubes
return 1
else return ..()
else
return ..()
/obj/structure/transit_tube_pod/proc/follow_tube()
set waitfor = 0
@@ -182,4 +183,4 @@
return
/obj/structure/transit_tube_pod/return_temperature()
return air_contents.temperature
return air_contents.temperature
@@ -98,7 +98,8 @@
playsound(loc, 'sound/items/welder2.ogg', 50, 1)
if(do_after(user, 40*W.toolspeed, target = src))
if(!src || !WT.isOn()) return
if(!src || !WT.isOn())
return
to_chat(user, "<span class='notice'>You disassemble the windoor assembly.</span>")
var/obj/item/stack/sheet/rglass/RG = new (get_turf(src), 5)
RG.add_fingerprint(user)
+6 -3
View File
@@ -62,7 +62,8 @@
switch(pick(1,2;75,3))
if(1)
src.ReplaceWithLattice()
if(prob(33)) new /obj/item/stack/sheet/metal(src)
if(prob(33))
new /obj/item/stack/sheet/metal(src)
if(2)
src.ChangeTurf(src.baseturf)
if(3)
@@ -71,7 +72,8 @@
else
src.break_tile()
src.hotspot_expose(1000,CELL_VOLUME)
if(prob(33)) new /obj/item/stack/sheet/metal(src)
if(prob(33))
new /obj/item/stack/sheet/metal(src)
if(3)
if (prob(50))
src.break_tile()
@@ -209,7 +211,8 @@
if(RCD_AIRLOCK)
if(the_rcd.airlock_glass)
return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 20)
else return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 16)
else
return list("mode" = RCD_AIRLOCK, "delay" = 50, "cost" = 16)
if(RCD_DECONSTRUCT)
return list("mode" = RCD_DECONSTRUCT, "delay" = 50, "cost" = 33)
if(RCD_WINDOWGRILLE)
+2 -1
View File
@@ -179,7 +179,8 @@
var/obj/structure/lattice/L = locate(/obj/structure/lattice, src)
if(L)
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 1)
else return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
else
return list("mode" = RCD_FLOORWALL, "delay" = 0, "cost" = 3)
return FALSE
/turf/open/space/rcd_act(mob/user, obj/item/construction/rcd/the_rcd, passed_mode)
+4 -2
View File
@@ -115,7 +115,8 @@
return FALSE
/turf/CanPass(atom/movable/mover, turf/target)
if(!target) return FALSE
if(!target)
return FALSE
if(istype(mover)) // turf/Enter(...) will perform more advanced checks
return !density
@@ -347,7 +348,8 @@
// possible. It results in more efficient (CPU-wise) pathing
// for bots and anything else that only moves in cardinal dirs.
/turf/proc/Distance_cardinal(turf/T)
if(!src || !T) return FALSE
if(!src || !T)
return FALSE
return abs(x - T.x) + abs(y - T.y)
////////////////////////////////////////////////////