Mass replace

This commit is contained in:
Tigercat2000
2016-07-07 19:34:02 -07:00
parent dc408f090d
commit 71e5344a98
870 changed files with 7679 additions and 7679 deletions
+6 -6
View File
@@ -26,7 +26,7 @@
var/mob/living/silicon/ai/AI = locate(/mob/living/silicon/ai) in src //AI is inside.
if(AI)
name = "intelliCard - [AI.name]"
if (AI.stat == DEAD)
if(AI.stat == DEAD)
icon_state = "aicard-404"
else
icon_state = "aicard-full"
@@ -60,7 +60,7 @@
data["has_laws"] = laws.len
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
ui = new(user, src, ui_key, "aicard.tmpl", "[name]", 600, 400, state = state)
ui.set_initial_data(data)
ui.open()
@@ -77,25 +77,25 @@
var/user = usr
if (href_list["wipe"])
if(href_list["wipe"])
var/confirm = alert("Are you sure you want to wipe this card's memory? This cannot be undone once started.", "Confirm Wipe", "Yes", "No")
if(confirm == "Yes" && (CanUseTopic(user, state) == STATUS_INTERACTIVE))
msg_admin_attack("[key_name_admin(user)] wiped [key_name_admin(AI)] with \the [src].")
flush = 1
AI.suiciding = 1
to_chat(AI, "Your core files are being wiped!")
while (AI && AI.stat != DEAD)
while(AI && AI.stat != DEAD)
AI.adjustOxyLoss(2)
AI.updatehealth()
sleep(10)
flush = 0
if (href_list["radio"])
if(href_list["radio"])
AI.aiRadio.disabledAi = text2num(href_list["radio"])
to_chat(AI, "<span class='warning'>Your Subspace Transceiver has been [AI.aiRadio.disabledAi ? "disabled" : "enabled"]!</span>")
to_chat(user, "<span class='notice'>You [AI.aiRadio.disabledAi ? "disable" : "enable"] the AI's Subspace Transceiver.</span>")
if (href_list["wireless"])
if(href_list["wireless"])
AI.control_disabled = text2num(href_list["wireless"])
to_chat(AI, "<span class='warning'>Your wireless interface has been [AI.control_disabled ? "disabled" : "enabled"]!</span>")
to_chat(user, "<span class='notice'>You [AI.control_disabled ? "disable" : "enable"] the AI's wireless interface.</span>")
@@ -55,7 +55,7 @@
interact(user)
/obj/item/device/camera_bug/check_eye(var/mob/user as mob)
if (user.stat || loc != user || !user.canmove || user.eye_blind || !current)
if(user.stat || loc != user || !user.canmove || user.eye_blind || !current)
user.reset_view(null)
user.unset_machine()
return null
@@ -267,7 +267,7 @@ obj/item/device/flashlight/lamp/bananalamp
/obj/item/device/flashlight/emp/afterattack(atom/A as mob|obj, mob/user, proximity)
if(!proximity) return
if (emp_cur_charges > 0)
if(emp_cur_charges > 0)
emp_cur_charges -= 1
A.visible_message("<span class='danger'>[user] blinks \the [src] at \the [A].", \
"<span class='userdanger'>[user] blinks \the [src] at \the [A].")
@@ -71,10 +71,10 @@
/obj/item/device/laser_pointer/proc/laser_act(var/atom/target, var/mob/living/user, var/params)
if( !(user in (viewers(7,target))) )
return
if (!diode)
if(!diode)
to_chat(user, "<span class='notice'>You point [src] at [target], but nothing happens!</span>")
return
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(ishuman(user))
+2 -2
View File
@@ -12,7 +12,7 @@
var/list/insultmsg = list("FUCK EVERYONE!", "I'M A TATER!", "ALL SECURITY TO SHOOT ME ON SIGHT!", "I HAVE A BOMB!", "CAPTAIN IS A COMDOM!", "FOR THE SYNDICATE!")
/obj/item/device/megaphone/attack_self(mob/living/user as mob)
if (user.client)
if(user.client)
if(user.client.prefs.muted & MUTE_IC)
to_chat(src, "\red You cannot speak in IC (muted).")
return
@@ -39,7 +39,7 @@
if(!message)
return
message = capitalize(message)
if ((src.loc == user && usr.stat == 0))
if((src.loc == user && usr.stat == 0))
if(emagged)
if(insults)
saymsg(user, pick(insultmsg))
+6 -6
View File
@@ -18,7 +18,7 @@
if(!proximity)
return
if (!target_species)
if(!target_species)
return //it shouldn't be null, okay?
if(!parts)
@@ -28,18 +28,18 @@
return
var/allowed = 0
for (var/permitted_type in permitted_types)
for(var/permitted_type in permitted_types)
if(istype(O, permitted_type))
allowed = 1
var/obj/item/clothing/I = O
if (!istype(I) || !allowed)
if(!istype(I) || !allowed)
to_chat(user, "<span class='notice'>[src] is unable to modify that.</span>")
return
var/excluding = ("exclude" in I.species_restricted)
var/in_list = (target_species in I.species_restricted)
if (excluding ^ in_list)
if(excluding ^ in_list)
to_chat(user, "<span class='notice'>[I] is already modified.</span>")
return
@@ -53,9 +53,9 @@
I.refit_for_species(target_species)
if (istype(I, /obj/item/clothing/head/helmet))
if(istype(I, /obj/item/clothing/head/helmet))
parts &= ~MODKIT_HELMET
if (istype(I, /obj/item/clothing/suit))
if(istype(I, /obj/item/clothing/suit))
parts &= ~MODKIT_SUIT
if(!parts)
+2 -2
View File
@@ -30,7 +30,7 @@
return ..()
/obj/item/device/paicard/attack_self(mob/user)
if (!in_range(src, user))
if(!in_range(src, user))
return
user.set_machine(src)
var/dat = {"
@@ -320,7 +320,7 @@
/obj/item/device/paicard/proc/alertUpdate()
var/turf/T = get_turf_or_move(src.loc)
for (var/mob/M in viewers(T))
for(var/mob/M in viewers(T))
M.show_message("\blue [src] flashes a message across its screen, \"Additional personalities available for download.\"", 3, "\blue [src] bleeps electronically.", 2)
/obj/item/device/paicard/emp_act(severity)
@@ -19,7 +19,7 @@
var/obj/machinery/atmospherics/pipe/P = A
var/turf/T = P.loc
if (P.level < 2 && T.level==1 && isturf(T) && T.intact)
if(P.level < 2 && T.level==1 && isturf(T) && T.intact)
to_chat(user, "<span class='warning'>You must remove the plating first.</span>")
return
+1 -1
View File
@@ -49,7 +49,7 @@
to_chat(user, "Device must be placed over an exposed cable to attach to it.")
return
else
if (mode == 2)
if(mode == 2)
processing_objects.Remove(src) // Now the power sink actually stops draining the station's power if you unhook it. --NeoFite
processing_power_items.Remove(src)
anchored = 0
@@ -35,11 +35,11 @@
set category = "Object"
set src in usr
if (usr.stat || usr.restrained())
if(usr.stat || usr.restrained())
return
code = t
if (isnull(code))
if(isnull(code))
code = initial(code)
src.add_fingerprint(usr)
return
@@ -51,11 +51,11 @@
to_chat(user, radio_desc)
/obj/item/device/radio/headset/handle_message_mode(mob/living/M as mob, message, channel)
if (channel == "special")
if (translate_binary)
if(channel == "special")
if(translate_binary)
var/datum/language/binary = all_languages["Robot Talk"]
binary.broadcast(M, message)
if (translate_hive)
if(translate_hive)
var/datum/language/hivemind = all_languages["Hivemind"]
hivemind.broadcast(M, message)
return null
@@ -306,13 +306,13 @@
var/disabledAi = 0 // Atlantis: Used to manually disable AI's integrated radio via intellicard menu.
/obj/item/device/radio/headset/heads/ai_integrated/receive_range(freq, level)
if (disabledAi)
if(disabledAi)
return -1 //Transciever Disabled.
return ..(freq, level, 1)
/obj/item/device/radio/headset/attackby(obj/item/weapon/W as obj, mob/user as mob)
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
@@ -395,7 +395,7 @@
src.syndie = 1
for (var/ch_name in channels)
for(var/ch_name in channels)
if(!radio_controller)
src.name = "broken radio headset"
return
@@ -120,13 +120,13 @@
attack_self(user)
/obj/item/device/radio/intercom/receive_range(freq, level)
if (!on)
if(!on)
return -1
if(!(0 in level))
var/turf/position = get_turf(src)
if(isnull(position) || !(position.z in level))
return -1
if (!src.listening)
if(!src.listening)
return -1
if(freq in ANTAG_FREQS)
if(!(src.syndie))
+44 -44
View File
@@ -77,7 +77,7 @@ var/global/list/default_medbay_channels = list(
wires = null
if(radio_controller)
radio_controller.remove_object(src, frequency)
for (var/ch_name in channels)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
patch_link = null
return ..()
@@ -88,7 +88,7 @@ var/global/list/default_medbay_channels = list(
frequency = sanitize_frequency(frequency, RADIO_LOW_FREQ, RADIO_HIGH_FREQ)
set_frequency(frequency)
for (var/ch_name in channels)
for(var/ch_name in channels)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
/obj/item/device/radio/attack_ghost(mob/user)
@@ -177,7 +177,7 @@ var/global/list/default_medbay_channels = list(
return can_admin_interact()
/obj/item/device/radio/proc/text_wires()
if (b_stat)
if(b_stat)
return wires.GetInteractWindow()
return
@@ -194,31 +194,31 @@ var/global/list/default_medbay_channels = list(
if(is_special)
return 0
if (href_list["track"])
if(href_list["track"])
var/mob/target = locate(href_list["track"])
var/mob/living/silicon/ai/A = locate(href_list["track2"])
if(A && target)
A.ai_actual_track(target)
. = 1
else if (href_list["freq"])
else if(href_list["freq"])
var/new_frequency = (frequency + text2num(href_list["freq"]))
if ((new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ))
if((new_frequency < PUBLIC_LOW_FREQ || new_frequency > PUBLIC_HIGH_FREQ))
new_frequency = sanitize_frequency(new_frequency)
set_frequency(new_frequency)
if(hidden_uplink)
if(hidden_uplink.check_trigger(usr, frequency, traitor_frequency))
usr << browse(null, "window=radio")
. = 1
else if (href_list["talk"])
else if(href_list["talk"])
ToggleBroadcast()
. = 1
else if(href_list["listen"])
var/chan_name = href_list["ch_name"]
if (!chan_name)
if(!chan_name)
ToggleReception()
else
if (channels[chan_name] & FREQ_LISTENING)
if(channels[chan_name] & FREQ_LISTENING)
channels[chan_name] &= ~FREQ_LISTENING
else
channels[chan_name] |= FREQ_LISTENING
@@ -237,16 +237,16 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels, var/role = "Unknown") //BS12 EDIT
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if (channel == "department")
if(channel == "department")
// to_chat(world, "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"")
channel = channels[1]
connection = secure_radio_connections[channel]
else
connection = radio_connection
channel = null
if (!istype(connection))
if(!istype(connection))
return
if (!connection)
if(!connection)
return
var/mob/living/automatedannouncer/A = new /mob/living/automatedannouncer(src)
A.name = from
@@ -288,10 +288,10 @@ var/global/list/default_medbay_channels = list(
// Otherwise, if a channel is specified, look for it.
if(channels && channels.len > 0)
if (message_mode == "department") // Department radio shortcut
if(message_mode == "department") // Department radio shortcut
message_mode = channels[1]
if (channels[message_mode]) // only broadcast if the channel is set on
if(channels[message_mode]) // only broadcast if the channel is set on
return secure_radio_connections[message_mode]
// If we were to send to a channel we don't have, drop it.
@@ -323,9 +323,9 @@ var/global/list/default_medbay_channels = list(
//#### Grab the connection datum ####//
var/datum/radio_frequency/connection = handle_message_mode(M, message, channel)
if (!istype(connection))
if(!istype(connection))
return 0
if (!connection)
if(!connection)
return 0
var/turf/position = get_turf(src)
@@ -344,24 +344,24 @@ var/global/list/default_medbay_channels = list(
var/jobname // the mob's "job"
// --- Human: use their actual job ---
if (ishuman(M))
if(ishuman(M))
var/mob/living/carbon/human/H = M
jobname = H.get_assignment()
// --- Carbon Nonhuman ---
else if (iscarbon(M)) // Nonhuman carbon mob
else if(iscarbon(M)) // Nonhuman carbon mob
jobname = "No id"
// --- AI ---
else if (isAI(M))
else if(isAI(M))
jobname = "AI"
// --- Cyborg ---
else if (isrobot(M))
else if(isrobot(M))
jobname = "Cyborg"
// --- Personal AI (pAI) ---
else if (istype(M, /mob/living/silicon/pai))
else if(istype(M, /mob/living/silicon/pai))
jobname = "Personal AI"
// --- Unidentifiable mob ---
@@ -372,7 +372,7 @@ var/global/list/default_medbay_channels = list(
// --- Modifications to the mob's identity ---
// The mob is disguising their identity:
if (ishuman(M) && M.GetVoice() != real_name)
if(ishuman(M) && M.GetVoice() != real_name)
displayname = M.GetVoice()
jobname = "Unknown"
voicemask = 1
@@ -500,7 +500,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/hear_talk(mob/M as mob, msg, var/verb = "says", var/datum/language/speaking = null)
if (broadcasting)
if(broadcasting)
if(get_dist(src, M) <= canhear_range)
talk_into(M, msg,null,verb,speaking)
@@ -508,7 +508,7 @@ var/global/list/default_medbay_channels = list(
/*
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
if ((R.frequency == frequency && message))
if((R.frequency == frequency && message))
return 1
else if
@@ -523,7 +523,7 @@ var/global/list/default_medbay_channels = list(
// what the range is in which mobs will hear the radio
// returns: -1 if can't receive, range otherwise
if (!wires || wires.IsIndexCut(WIRE_RECEIVE))
if(!wires || wires.IsIndexCut(WIRE_RECEIVE))
return -1
if(!listening)
return -1
@@ -534,20 +534,20 @@ var/global/list/default_medbay_channels = list(
if(freq in ANTAG_FREQS)
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
return -1
if (!on)
if(!on)
return -1
if (!freq) //recieved on main frequency
if (!listening)
if(!freq) //recieved on main frequency
if(!listening)
return -1
else
var/accept = (freq==frequency && listening)
if (!accept)
for (var/ch_name in channels)
if(!accept)
for(var/ch_name in channels)
var/datum/radio_frequency/RF = secure_radio_connections[ch_name]
if (RF.frequency==freq && (channels[ch_name]&FREQ_LISTENING))
if(RF.frequency==freq && (channels[ch_name]&FREQ_LISTENING))
accept = 1
break
if (!accept)
if(!accept)
return -1
return canhear_range
@@ -560,8 +560,8 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/examine(mob/user, var/distance = -1)
. = ..(user, distance)
if ((in_range(src, user) || loc == user))
if (b_stat)
if((in_range(src, user) || loc == user))
if(b_stat)
user.show_message("\blue \the [src] can be attached and modified!")
else
user.show_message("\blue \the [src] can not be modified or attached!")
@@ -570,11 +570,11 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) ))
if(!( istype(W, /obj/item/weapon/screwdriver) ))
return
b_stat = !( b_stat )
if(!istype(src, /obj/item/device/radio/beacon))
if (b_stat)
if(b_stat)
user.show_message("\blue The radio can now be attached and modified!")
else
user.show_message("\blue The radio can no longer be modified or attached!")
@@ -587,7 +587,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/emp_act(severity)
broadcasting = 0
listening = 0
for (var/ch_name in channels)
for(var/ch_name in channels)
channels[ch_name] = 0
..()
@@ -633,7 +633,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/talk_into()
. = ..()
if (isrobot(src.loc))
if(isrobot(src.loc))
var/mob/living/silicon/robot/R = src.loc
var/datum/robot_component/C = R.components["radio"]
R.use_power(C.energy_consumption)
@@ -641,7 +641,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/attackby(obj/item/weapon/W as obj, mob/user as mob, params)
// ..()
user.set_machine(src)
if (!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
if(!( istype(W, /obj/item/weapon/screwdriver) || (istype(W, /obj/item/device/encryptionkey/ ))))
return
if(istype(W, /obj/item/weapon/screwdriver))
@@ -701,7 +701,7 @@ var/global/list/default_medbay_channels = list(
src.syndie = 1
for (var/ch_name in src.channels)
for(var/ch_name in src.channels)
if(!radio_controller)
sleep(30) // Waiting for the radio_controller to be created.
if(!radio_controller)
@@ -715,7 +715,7 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/borg/Topic(href, href_list)
if(..())
return 1
if (href_list["mode"])
if(href_list["mode"])
var/enable_subspace_transmission = text2num(href_list["mode"])
if(enable_subspace_transmission != subspace_transmission)
subspace_transmission = !subspace_transmission
@@ -729,7 +729,7 @@ var/global/list/default_medbay_channels = list(
else
recalculateChannels()
. = 1
if (href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
if(href_list["shutup"]) // Toggle loudspeaker mode, AKA everyone around you hearing your radio.
var/do_shut_up = text2num(href_list["shutup"])
if(do_shut_up != shut_up)
shut_up = !shut_up
@@ -778,12 +778,12 @@ var/global/list/default_medbay_channels = list(
/obj/item/device/radio/proc/config(op)
if(radio_controller)
for (var/ch_name in channels)
for(var/ch_name in channels)
radio_controller.remove_object(src, radiochannels[ch_name])
secure_radio_connections = new
channels = op
if(radio_controller)
for (var/ch_name in op)
for(var/ch_name in op)
secure_radio_connections[ch_name] = radio_controller.add_object(src, radiochannels[ch_name], RADIO_CHAT)
return
+25 -25
View File
@@ -127,7 +127,7 @@ REAGENT SCANNER
/obj/item/device/healthanalyzer/attack(mob/living/M as mob, mob/living/user as mob)
if (( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
if(( (CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
to_chat(user, text("\red You try to analyze the floor's vitals!"))
for(var/mob/O in viewers(M, null))
O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1)
@@ -138,7 +138,7 @@ REAGENT SCANNER
return
user.visible_message("<span class='notice'>[user] has analyzed [M]'s vitals.","<span class='notice'> You have analyzed [M]'s vitals.")
if (!istype(M,/mob/living/carbon/human) || M.isSynthetic())
if(!istype(M,/mob/living/carbon/human) || M.isSynthetic())
//these sensors are designed for organic life
user.show_message("\blue Analyzing Results for ERROR:\n\t Overall Status: ERROR")
user.show_message("\t Key: <font color='blue'>Suffocation</font>/<font color='green'>Toxin</font>/<font color='#FFA500'>Burns</font>/<font color='red'>Brute</font>", 1)
@@ -184,7 +184,7 @@ REAGENT SCANNER
if(M.status_flags & FAKEDEATH)
OX = fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal"
user.show_message("[OX] | [TX] | [BU] | [BR]")
if (istype(M, /mob/living/carbon))
if(istype(M, /mob/living/carbon))
if(upgraded)
chemscan(user, M)
for(var/datum/disease/D in M.viruses)
@@ -192,15 +192,15 @@ REAGENT SCANNER
to_chat(user, "<span class='alert'><b>Warning: [D.form] detected</b>\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]</span>")
if(M.getStaminaLoss())
user.show_message("<span class='info'>Subject appears to be suffering from fatigue.</span>")
if (M.getCloneLoss())
if(M.getCloneLoss())
user.show_message("<span class='warning'>Subject appears to have [M.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.</span>")
if (M.has_brain_worms())
if(M.has_brain_worms())
user.show_message("\red Subject suffering from aberrant brain activity. Recommend further scanning.")
else if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain))
else if(M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && !M.get_int_organ(/obj/item/organ/internal/brain))
user.show_message("\red Subject is brain dead.")
else if (M.getBrainLoss() >= 60)
else if(M.getBrainLoss() >= 60)
user.show_message("\red Severe brain damage detected. Subject likely to have mental retardation.")
else if (M.getBrainLoss() >= 10)
else if(M.getBrainLoss() >= 10)
user.show_message("\red Significant brain damage detected. Subject may have had a concussion.")
if(ishuman(M))
var/mob/living/carbon/human/H = M
@@ -262,7 +262,7 @@ REAGENT SCANNER
set category = "Object"
mode = !mode
switch (mode)
switch(mode)
if(1)
to_chat(usr, "The scanner now shows specific limb damage.")
if(0)
@@ -309,11 +309,11 @@ REAGENT SCANNER
/obj/item/device/analyzer/attack_self(mob/user as mob)
if (user.stat)
if(user.stat)
return
var/turf/location = user.loc
if (!( istype(location, /turf) ))
if(!( istype(location, /turf) ))
return
var/datum/gas_mixture/environment = location.return_air()
@@ -388,12 +388,12 @@ REAGENT SCANNER
icon_state = initial(icon_state)
/obj/item/device/mass_spectrometer/attack_self(mob/user as mob)
if (user.stat)
if(user.stat)
return
if (crit_fail)
if(crit_fail)
to_chat(user, "<span class='warning'>This device has critically failed and is no longer functional!</span>")
return
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(reagents.total_volume)
@@ -448,14 +448,14 @@ REAGENT SCANNER
var/recent_fail = 0
/obj/item/device/reagent_scanner/afterattack(obj/O, mob/user as mob)
if (user.stat)
if(user.stat)
return
if (!user.IsAdvancedToolUser())
if(!user.IsAdvancedToolUser())
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
return
if(!istype(O))
return
if (crit_fail)
if(crit_fail)
to_chat(user, "<span class='warning'>This device has critically failed and is no longer functional!</span>")
return
@@ -463,7 +463,7 @@ REAGENT SCANNER
var/dat = ""
if(O.reagents.reagent_list.len > 0)
var/one_percent = O.reagents.total_volume / 100
for (var/datum/reagent/R in O.reagents.reagent_list)
for(var/datum/reagent/R in O.reagents.reagent_list)
if(prob(reliability))
dat += "<br>[TAB]<span class='notice'>[R][details ? ": [R.volume / one_percent]%" : ""]</span>"
recent_fail = 0
@@ -501,24 +501,24 @@ REAGENT SCANNER
materials = list(MAT_METAL=30, MAT_GLASS=20)
/obj/item/device/slime_scanner/attack(mob/living/M as mob, mob/living/user as mob)
if (!isslime(M))
if(!isslime(M))
user.show_message("<span class='warning'>This device can only scan slimes!</span>", 1)
return
var/mob/living/carbon/slime/T = M
user.show_message("Slime scan results:", 1)
user.show_message(text("[T.colour] [] slime", T.is_adult ? "adult" : "baby"), 1)
user.show_message(text("Nutrition: [T.nutrition]/[]", T.get_max_nutrition()), 1)
if (T.nutrition < T.get_starve_nutrition())
if(T.nutrition < T.get_starve_nutrition())
user.show_message("<span class='warning'>Warning: slime is starving!</span>", 1)
else if (T.nutrition < T.get_hunger_nutrition())
else if(T.nutrition < T.get_hunger_nutrition())
user.show_message("<span class='warning'>Warning: slime is hungry</span>", 1)
user.show_message("Electric change strength: [T.powerlevel]", 1)
user.show_message("Health: [T.health]", 1)
if (T.slime_mutation[4] == T.colour)
if(T.slime_mutation[4] == T.colour)
user.show_message("This slime does not evolve any further.", 1)
else
if (T.slime_mutation[3] == T.slime_mutation[4])
if (T.slime_mutation[2] == T.slime_mutation[1])
if(T.slime_mutation[3] == T.slime_mutation[4])
if(T.slime_mutation[2] == T.slime_mutation[1])
user.show_message("Possible mutation: [T.slime_mutation[3]]", 1)
user.show_message("Genetic destability: [T.mutation_chance/2]% chance of mutation on splitting", 1)
else
@@ -527,6 +527,6 @@ REAGENT SCANNER
else
user.show_message("Possible mutations: [T.slime_mutation[1]], [T.slime_mutation[2]], [T.slime_mutation[3]], [T.slime_mutation[4]]", 1)
user.show_message("Genetic destability: [T.mutation_chance]% chance of mutation on splitting", 1)
if (T.cores > 1)
if(T.cores > 1)
user.show_message("Anomalious slime core amount detected", 1)
user.show_message("Growth progress: [T.amount_grown]/10", 1)
@@ -88,7 +88,7 @@
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "transfer_valve.tmpl", "Tank Transfer Valve", 460, 280)
@@ -101,9 +101,9 @@
/obj/item/device/transfer_valve/Topic(href, href_list)
..()
if ( usr.stat || usr.restrained() )
if( usr.stat || usr.restrained() )
return 0
if (src.loc != usr)
if(src.loc != usr)
return 0
if(tank_one && href_list["tankone"])
split_gases()
@@ -162,7 +162,7 @@
tank_two.air_contents.merge(temp)
/obj/item/device/transfer_valve/proc/split_gases()
if (!valve_open || !tank_one || !tank_two)
if(!valve_open || !tank_one || !tank_two)
return
var/ratio1 = tank_one.air_contents.volume/tank_two.air_contents.volume
var/datum/gas_mixture/temp
@@ -194,7 +194,7 @@
log_game("Bomb valve opened at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]) with [attached_device ? attached_device : "no device"], attached by [attacher_name]. Last touched by: [key_name(mob)]")
merge_gases()
spawn(20) // In case one tank bursts
for (var/i=0,i<5,i++)
for(var/i=0,i<5,i++)
src.update_icon()
sleep(10)
src.update_icon()
+4 -4
View File
@@ -202,7 +202,7 @@ var/list/world_uplinks = list()
// update the ui if it exists, returns null if no ui is passed/found
ui = nanomanager.try_update_ui(user, src, ui_key, ui, data, force_open)
if (!ui)
if(!ui)
// the ui does not exist, so we'll create a new() one
// for a list of parameters and their descriptions see the code docs in \code\modules\nano\nanoui.dm
ui = new(user, src, ui_key, "uplink.tmpl", title, 700, 600, state = inventory_state)
@@ -218,14 +218,14 @@ var/list/world_uplinks = list()
// The purchasing code.
/obj/item/device/uplink/hidden/Topic(href, href_list)
if (usr.stat || usr.restrained())
if(usr.stat || usr.restrained())
return 1
if (!( istype(usr, /mob/living/carbon/human)))
if(!( istype(usr, /mob/living/carbon/human)))
return 1
var/mob/user = usr
var/datum/nanoui/ui = nanomanager.get_open_ui(user, src, "main")
if ((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
if((usr.contents.Find(src.loc) || (in_range(src.loc, usr) && istype(src.loc.loc, /turf))))
usr.set_machine(src)
if(..(href, href_list))
return 1
+1 -1
View File
@@ -10,7 +10,7 @@
var/emagged = 0
/obj/item/device/hailer/attack_self(mob/living/carbon/user as mob)
if (spamcheck)
if(spamcheck)
return
if(emagged)