[MIRROR] Adds spaces around logical operators [MDB IGNORE] (#18776)

* Adds spaces around logical operators

* Update code/modules/admin/verbs/admingame.dm

Co-authored-by: Jeremiah <42397676+jlsnow301@users.noreply.github.com>
Co-authored-by: Tom <8881105+tf-4@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-01-21 22:16:43 -08:00
committed by GitHub
co-authored by Jeremiah Tom
parent b2e7e489cb
commit c5ca08fd01
117 changed files with 192 additions and 192 deletions
+1 -1
View File
@@ -26,7 +26,7 @@
type = MESSAGE_TYPE_DEBUG, \
text = "DEBUG: [msg]")
/// Used for debug messages to the player
#define debug_usr(msg) if (GLOB.Debug2&&usr) to_chat(usr, \
#define debug_usr(msg) if (GLOB.Debug2 && usr) to_chat(usr, \
type = MESSAGE_TYPE_DEBUG, \
text = "DEBUG: [msg]")
/// Used for debug messages to the admins
+4 -4
View File
@@ -1,11 +1,11 @@
// Remove these once we have Byond implementation.
// ------------------------------------
#define IS_NAN(a) (a!=a)
#define IS_NAN(a) (a != a)
#define IS_INF__UNSAFE(a) (a==a && a-a!=a-a)
#define IS_INF__UNSAFE(a) (a == a && a-a != a-a)
#define IS_INF(a) (isnum(a) && IS_INF__UNSAFE(a))
#define IS_FINITE__UNSAFE(a) (a-a==a-a)
#define IS_FINITE__UNSAFE(a) (a-a == a-a)
#define IS_FINITE(a) (isnum(a) && IS_FINITE__UNSAFE(a))
// ------------------------------------
// Aight dont remove the rest
@@ -169,7 +169,7 @@
R1 = rand(-ACCURACY,ACCURACY)/ACCURACY
R2 = rand(-ACCURACY,ACCURACY)/ACCURACY
working = R1*R1 + R2*R2
while(working >= 1 || working==0)
while(working >= 1 || working == 0)
working = sqrt(-2 * log(working) / working)
R1 *= working
gaussian_next = R2 * working
+2 -2
View File
@@ -273,11 +273,11 @@ rough example of the "cone" made by the 3 dirs checked
if(!isnull(value) && value != "")
matches = filter_fancy_list(matches, value)
if(matches.len==0)
if(matches.len == 0)
return
var/chosen
if(matches.len==1)
if(matches.len == 1)
chosen = matches[1]
else if(random)
chosen = pick(matches) || null
+1 -1
View File
@@ -32,7 +32,7 @@
if(!hearted_mob?.client)
continue
hearted_mob.client.adjust_heart()
message += "[hearted_ckey][i==hearts.len ? "" : ", "]"
message += "[hearted_ckey][i == hearts.len ? "" : ", "]"
message_admins(message.Join())
/// Ask someone if they'd like to award a commendation for the round, 3 tries to get the name they want before we give up
+3 -3
View File
@@ -277,7 +277,7 @@ world
if(text2ascii(rgb) == 35) ++start // skip opening #
var/ch,which=0,r=0,g=0,b=0,alpha=0,usealpha
var/digits=0
for(i=start, i<=length(rgb), ++i)
for(i=start, i <= length(rgb), ++i)
ch = text2ascii(rgb, i)
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102)
break
@@ -342,7 +342,7 @@ world
++start // skip opening #
var/ch,which=0,hue=0,sat=0,val=0,alpha=0,usealpha
var/digits=0
for(i=start, i<=length(hsv), ++i)
for(i=start, i <= length(hsv), ++i)
ch = text2ascii(hsv, i)
if(ch < 48 || (ch > 57 && ch < 65) || (ch > 70 && ch < 97) || ch > 102)
break
@@ -658,7 +658,7 @@ world
var/lo3 = text2ascii(hex, 7) // B
var/hi4 = text2ascii(hex, 8) // A
var/lo4 = text2ascii(hex, 9) // A
return list(((hi1>= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
return list(((hi1 >= 65 ? hi1-55 : hi1-48)<<4) | (lo1 >= 65 ? lo1-55 : lo1-48),
((hi2 >= 65 ? hi2-55 : hi2-48)<<4) | (lo2 >= 65 ? lo2-55 : lo2-48),
((hi3 >= 65 ? hi3-55 : hi3-48)<<4) | (lo3 >= 65 ? lo3-55 : lo3-48),
((hi4 >= 65 ? hi4-55 : hi4-48)<<4) | (lo4 >= 65 ? lo4-55 : lo4-48))
+1 -1
View File
@@ -116,7 +116,7 @@
///chances are 1:value. anyprob(1) will always return true
/proc/anyprob(value)
return (rand(1,value)==value)
return (rand(1,value) == value)
///counts the number of bits in Byond's 16-bit width field, in constant time and memory!
/proc/bit_count(bit_field)
+1 -1
View File
@@ -207,7 +207,7 @@ round(cos_inv_third+sqrt3_sin, 0.001), round(cos_inv_third-sqrt3_sin, 0.001), ro
for(y in 1 to 5)
offset = (y-1)*4
for(x in 1 to 4)
output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y==5?B[x+16]:0), 0.001)
output[offset+x] = round(A[offset+1]*B[x] + A[offset+2]*B[x+4] + A[offset+3]*B[x+8] + A[offset+4]*B[x+12]+(y == 5?B[x+16]:0), 0.001)
return output
///Converts RGB shorthands into RGBA matrices complete of constants rows (ergo a 20 keys list in byond).
+1 -1
View File
@@ -137,7 +137,7 @@
/proc/random_unique_name(gender, attempts_to_find_unique_name=10)
for(var/i in 1 to attempts_to_find_unique_name)
if(gender==FEMALE)
if(gender == FEMALE)
. = capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
else
. = capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
+4 -4
View File
@@ -183,16 +183,16 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex)
for(words,words>0,words--)//Randomly picks from one of the choices below.
if(words==1&&(1 in safety)&&(2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
if(words == 1 && (1 in safety) && (2 in safety))//If there is only one word remaining and choice 1 or 2 have not been selected.
safety = list(pick(1,2))//Select choice 1 or 2.
else if(words==1&&maxwords==2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
else if(words == 1 && maxwords == 2)//Else if there is only one word remaining (and there were two originally), and 1 or 2 were chosen,
safety = list(3)//Default to list 3
switch(pick(safety))//Chance based on the safety list.
if(1)//1 and 2 can only be selected once each to prevent more than two specific names/places/etc.
switch(rand(1,2))//Mainly to add more options later.
if(1)
if(names.len&&prob(70))
if(names.len && prob(70))
. += pick(names)
else
if(prob(10))
@@ -230,7 +230,7 @@ GLOBAL_DATUM(syndicate_code_response_regex, /regex)
if(4)
. += lowertext(pick(threats))
if(!return_list)
if(words==1)
if(words == 1)
. += "."
else
. += ", "
+4 -4
View File
@@ -188,13 +188,13 @@
///Calculate if two atoms are in sight, returns TRUE or FALSE
/proc/inLineOfSight(X1,Y1,X2,Y2,Z=1,PX1=16.5,PY1=16.5,PX2=16.5,PY2=16.5)
var/turf/T
if(X1==X2)
if(Y1==Y2)
if(X1 == X2)
if(Y1 == Y2)
return TRUE //Light cannot be blocked on same tile
else
var/s = SIGN(Y2-Y1)
Y1+=s
while(Y1!=Y2)
while(Y1 != Y2)
T=locate(X1,Y1,Z)
if(IS_OPAQUE_TURF(T))
return FALSE
@@ -206,7 +206,7 @@
var/signY = SIGN(Y2-Y1)
if(X1<X2)
b+=m
while(X1!=X2 || Y1!=Y2)
while(X1 != X2 || Y1 != Y2)
if(round(m*X1+b-Y1))
Y1+=signY //Line exits tile vertically
else
+1 -1
View File
@@ -13,7 +13,7 @@ function replaceContent() {
}
}
var parent = document.getElementById(id);
if(typeof(parent)!=='undefined' && parent!=null){
if(typeof(parent) !== 'undefined' && parent != null){
parent.innerHTML = content?content:'';
}
if(callback && window\[callback\]){
+4 -4
View File
@@ -4,21 +4,21 @@ function dropdowns() {
var headers = new Array();
var links = new Array();
for(var i=0;i<divs.length;i++){
if(divs\[i\].className=='header') {
if(divs\[i\].className == 'header') {
divs\[i\].className='header closed';
divs\[i\].innerHTML = divs\[i\].innerHTML+' +';
headers.push(divs\[i\]);
}
if(divs\[i\].className=='links') {
if(divs\[i\].className == 'links') {
divs\[i\].className='links hidden';
links.push(divs\[i\]);
}
}
for(var i=0;i<headers.length;i++){
if(typeof(links\[i\])!== 'undefined' && links\[i\]!=null) {
if(typeof(links\[i\]) !== 'undefined' && links\[i\] != null) {
headers\[i\].onclick = (function(elem) {
return function() {
if(elem.className.search('visible')>=0) {
if(elem.className.search('visible') >= 0) {
elem.className = elem.className.replace('visible','hidden');
this.className = this.className.replace('open','closed');
this.innerHTML = this.innerHTML.replace('-','+');
+1 -1
View File
@@ -22,7 +22,7 @@ SUBSYSTEM_DEF(ambience)
//Check to see if the client exists and isn't held by a new player
var/mob/client_mob = client_iterator?.mob
if(isnull(client_iterator) || !client_mob ||isnewplayer(client_mob))
if(isnull(client_iterator) || !client_mob || isnewplayer(client_mob))
ambience_listening_clients -= client_iterator
client_old_areas -= client_iterator
continue
+1 -1
View File
@@ -616,7 +616,7 @@ GLOBAL_LIST_EMPTY(the_station_areas)
set name = "Load Away Mission"
set category = "Admin.Events"
if(!holder ||!check_rights(R_FUN))
if(!holder || !check_rights(R_FUN))
return
@@ -310,7 +310,7 @@ SUBSYSTEM_DEF(networks)
#ifdef DEBUG_NETWORKS
ASSERT(tree && tree.len > 0) // this should be obvious but JUST in case.
for(var/part in tree)
if(!verify_network_name(part) || findtext(name,".")!=0) // and no stray dots
if(!verify_network_name(part) || findtext(name,".") != 0) // and no stray dots
stack_trace("network_list_to_string: Cannot create network with ([part]) of ([tree.Join(".")])")
break
#endif
@@ -379,7 +379,7 @@ SUBSYSTEM_DEF(networks)
/datum/controller/subsystem/networks/proc/create_network_simple(network_id)
var/datum/ntnet/network = networks[network_id]
if(network!=null)
if(network != null)
return network // don't worry about it
/// Checks to make sure the network is valid. We log BOTH to mapping and telecoms
+1 -1
View File
@@ -1,7 +1,7 @@
/// Controls how many buckets should be kept, each representing a tick. (1 minutes worth)
#define BUCKET_LEN (world.fps*1*60)
/// Helper for getting the correct bucket for a given timer
#define BUCKET_POS(timer) (((round((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN)||BUCKET_LEN)
#define BUCKET_POS(timer) (((round((timer.timeToRun - timer.timer_subsystem.head_offset) / world.tick_lag)+1) % BUCKET_LEN) || BUCKET_LEN)
/// Gets the maximum time at which timers will be invoked from buckets, used for deferring to secondary queue
#define TIMER_MAX(timer_ss) (timer_ss.head_offset + TICKS2DS(BUCKET_LEN + timer_ss.practical_offset - 1))
/// Max float with integer precision
+1 -1
View File
@@ -26,7 +26,7 @@ SUBSYSTEM_DEF(title)
for(var/S in provisional_title_screens)
var/list/L = splittext(S,"+")
if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png"))|| (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name)))))
if((L.len == 1 && (L[1] != "exclude" && L[1] != "blank.png")) || (L.len > 1 && ((use_rare_screens && lowertext(L[1]) == "rare") || (lowertext(L[1]) == lowertext(SSmapping.config.map_name)))))
title_screens += S
if(length(title_screens))
+1 -1
View File
@@ -467,7 +467,7 @@
set hidden = TRUE // hide this verb from the user's panel
set name = ".windowclose" // no autocomplete on cmd line
if(atomref!="null") // if passed a real atomref
if(atomref != "null") // if passed a real atomref
var/hsrc = locate(atomref) // find the reffed atom
var/href = "close=1"
if(hsrc)
+1 -1
View File
@@ -280,7 +280,7 @@ Behavior that's still missing from this component that original food items had t
///Makes sure the thing hasn't been destroyed or fully eaten to prevent eating phantom edibles
/datum/component/edible/proc/IsFoodGone(atom/owner, mob/living/feeder)
if(QDELETED(owner)|| !(IS_EDIBLE(owner)))
if(QDELETED(owner) || !(IS_EDIBLE(owner)))
return TRUE
if(owner.reagents.total_volume)
return FALSE
+1 -1
View File
@@ -265,7 +265,7 @@
/datum/component/material_container/proc/transer_amt_to(datum/component/material_container/T, amt, datum/material/mat)
if(!istype(mat))
mat = GET_MATERIAL_REF(mat)
if((amt==0)||(!T)||(!mat))
if((amt == 0) || (!T) || (!mat))
return FALSE
if(amt<0)
return T.transer_amt_to(src, -amt, mat)
+3 -3
View File
@@ -231,11 +231,11 @@
else
visibility_flags &= ~HIDDEN_SCANNER
if(properties["transmittable"]>=11)
if(properties["transmittable"] >= 11)
SetSpread(DISEASE_SPREAD_AIRBORNE)
else if(properties["transmittable"]>=7)
else if(properties["transmittable"] >= 7)
SetSpread(DISEASE_SPREAD_CONTACT_SKIN)
else if(properties["transmittable"]>=3)
else if(properties["transmittable"] >= 3)
SetSpread(DISEASE_SPREAD_CONTACT_FLUIDS)
else
SetSpread(DISEASE_SPREAD_BLOOD)
@@ -43,7 +43,7 @@
return
var/mob/living/M = A.affected_mob
if(power < 2)
if(prob(base_message_chance) || A.stage >=4)
if(prob(base_message_chance) || A.stage >= 4)
to_chat(M, span_warning("[pick("Your head hurts.", "Your head pounds.")]"))
if(power >= 2 && A.stage >= 4)
to_chat(M, span_warning("[pick("Your head hurts a lot.", "Your head pounds incessantly.")]"))
+1 -1
View File
@@ -84,7 +84,7 @@ STI KALY - blind
for(var/area/space/S in theareas)
theareas -= S
if(!theareas||!theareas.len)
if(!theareas || !theareas.len)
return
var/area/thearea = pick(theareas)
+1 -1
View File
@@ -812,7 +812,7 @@ GLOBAL_LIST_INIT(total_uf_len_by_block, populate_total_uf_len_by_block())
if(!M.has_dna())
CRASH("[M] does not have DNA")
if(se)
for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++)
for(var/i=1, i <= DNA_MUTATION_BLOCKS, i++)
if(prob(probability))
M.dna.generate_dna_blocks()
M.domutcheck()
+1 -1
View File
@@ -146,7 +146,7 @@
return TRUE
/datum/martial_art/cqc/grab_act(mob/living/A, mob/living/D)
if(A!=D && can_use(A)) // A!=D prevents grabbing yourself
if(A != D && can_use(A)) // A != D prevents grabbing yourself
add_to_streak("G",D)
if(check_streak(A,D)) //if a combo is made no grab upgrade is done
return TRUE
+4 -4
View File
@@ -100,11 +100,11 @@
exact = -1
var/list/datum/recipe/possible_recipes = new
for (var/datum/recipe/recipe in avaiable_recipes)
if (recipe.check_reagents(obj.reagents)==exact && recipe.check_items(obj)==exact)
if (recipe.check_reagents(obj.reagents) == exact && recipe.check_items(obj) == exact)
possible_recipes+=recipe
if (possible_recipes.len==0)
if (possible_recipes.len == 0)
return null
else if (possible_recipes.len==1)
else if (possible_recipes.len == 1)
return possible_recipes[1]
else //okay, let's select the most complicated recipe
var/r_count = 0
@@ -113,7 +113,7 @@
for (var/datum/recipe/recipe in possible_recipes)
var/N_i = (recipe.items)?(recipe.items.len):0
var/N_r = (recipe.reagents_list)?(recipe.reagents_list.len):0
if (N_i > i_count || (N_i== i_count && N_r > r_count ))
if (N_i > i_count || (N_i == i_count && N_r > r_count ))
r_count = N_r
i_count = N_i
. = recipe
@@ -262,7 +262,7 @@
for(var/role in exclusive_roles)
var/datum/job/job = SSjob.GetJob(role)
if((role in candidate_client.prefs.job_preferences) && SSjob.check_job_eligibility(candidate_player, job, "Dynamic Roundstart TC", add_job_to_log = TRUE)==JOB_AVAILABLE)
if((role in candidate_client.prefs.job_preferences) && SSjob.check_job_eligibility(candidate_player, job, "Dynamic Roundstart TC", add_job_to_log = TRUE) == JOB_AVAILABLE)
exclusive_candidate = TRUE
break
+2 -2
View File
@@ -275,7 +275,7 @@
var/found_amount = 0
var/datum/gas_mixture/mix = T.return_air()
found_amount += mix.gases[/datum/gas/plasma] ? mix.gases[/datum/gas/plasma][MOLES] : 0
return found_amount>=target_amount
return found_amount >= target_amount
/datum/objective_item/steal/functionalai
@@ -406,7 +406,7 @@
if(istype(S, targetitem))
found_amount = S.amount
return found_amount>=target_amount
return found_amount >= target_amount
/datum/objective_item/stack/diamond
name = "10 diamonds"
+1 -1
View File
@@ -692,7 +692,7 @@
new_pair = (pair_str ? char + (pair_str[1] == char ? pair_str[2] : pair_str[1]) : null)
// every second letter in the sequence represents a valid pair of the new sequence, otherwise it belongs to old
if(new_pair)
if(i%2==0)
if(i%2 == 0)
new_sequence+=new_pair
else
old_sequence+=new_pair
+1 -1
View File
@@ -275,7 +275,7 @@
temp = {"<b>Name:</b> [disease.name]
<BR><b>Number of stages:</b> [disease.max_stages]
<BR><b>Spread:</b> [disease.spread_text] Transmission
<BR><b>Possible Cure:</b> [(disease.cure_text||"none")]
<BR><b>Possible Cure:</b> [(disease.cure_text || "none")]
<BR><b>Affected Lifeforms:</b>[applicable_mob_names]
<BR>
<BR><b>Notes:</b> [disease.desc]
@@ -89,7 +89,7 @@
usr.set_machine(src)
if(href_list["id"])
if(href_list["id"] =="insert" && !contained_id)
if(href_list["id"] == "insert" && !contained_id)
id_insert(usr)
else if(contained_id)
switch(href_list["id"])
+1 -1
View File
@@ -90,7 +90,7 @@
if(can_control(usr, R) && !..())
if(isAI(usr) && (R.ai_lockdown && R.lockcharge || !R.lockcharge) || !isAI(usr))
R.ai_lockdown = FALSE
if(isAI(usr)&&!R.lockcharge)
if(isAI(usr) && !R.lockcharge)
R.ai_lockdown = TRUE
message_admins(span_notice("[ADMIN_LOOKUPFLW(usr)] [!R.lockcharge ? "locked down" : "released"] [ADMIN_LOOKUPFLW(R)]!"))
log_silicon("[key_name(usr)] [!R.lockcharge ? "locked down" : "released"] [key_name(R)]!")
+1 -1
View File
@@ -212,7 +212,7 @@
if(is_centcom_level(T.z) || is_away_level(T.z))
return FALSE
var/area/A = get_area(T)
if(!A ||(A.area_flags & NOTELEPORT))
if(!A || (A.area_flags & NOTELEPORT))
return FALSE
return TRUE
+4 -4
View File
@@ -200,16 +200,16 @@
if(t.x < cen.x && t.y == cen.y)
spotlights += new /obj/item/flashlight/spotlight(t, 1 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_GREEN)
continue
if((t.x+1 == cen.x && t.y+1 == cen.y) || (t.x+2==cen.x && t.y+2 == cen.y))
if((t.x+1 == cen.x && t.y+1 == cen.y) || (t.x+2 == cen.x && t.y+2 == cen.y))
spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_ORANGE)
continue
if((t.x-1 == cen.x && t.y-1 == cen.y) || (t.x-2==cen.x && t.y-2 == cen.y))
if((t.x-1 == cen.x && t.y-1 == cen.y) || (t.x-2 == cen.x && t.y-2 == cen.y))
spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_CYAN)
continue
if((t.x-1 == cen.x && t.y+1 == cen.y) || (t.x-2==cen.x && t.y+2 == cen.y))
if((t.x-1 == cen.x && t.y+1 == cen.y) || (t.x-2 == cen.x && t.y+2 == cen.y))
spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_BLUEGREEN)
continue
if((t.x+1 == cen.x && t.y-1 == cen.y) || (t.x+2==cen.x && t.y-2 == cen.y))
if((t.x+1 == cen.x && t.y-1 == cen.y) || (t.x+2 == cen.x && t.y-2 == cen.y))
spotlights += new /obj/item/flashlight/spotlight(t, 1.4 + get_dist(src, t), 30 - (get_dist(src, t) * 8), LIGHT_COLOR_BLUE)
continue
continue
+1 -1
View File
@@ -389,7 +389,7 @@
return ((aiControlDisabled != AI_WIRE_DISABLED) && !isAllPowerCut())
/obj/machinery/door/airlock/proc/canAIHack()
return ((aiControlDisabled==AI_WIRE_DISABLED) && (!hackProof) && (!isAllPowerCut()));
return ((aiControlDisabled == AI_WIRE_DISABLED) && (!hackProof) && (!isAllPowerCut()));
/obj/machinery/door/airlock/hasPower()
return ((!secondsMainPowerLost || !secondsBackupPowerLost) && !(machine_stat & NOPOWER))
+4 -4
View File
@@ -57,7 +57,7 @@
temp_page++
dat+="<B>[NP.channel_name]</B> <FONT SIZE=2>\[page [temp_page+1]\]</FONT><BR>"
dat+="</ul>"
if(scribble_page==curr_page)
if(scribble_page == curr_page)
dat+="<BR><I>There is a small scribble near the end of this page... It reads: \"[scribble]\"</I>"
dat+= "<HR><DIV STYLE='float:right;'><A href='?src=[REF(src)];next_page=1'>Next Page</A></DIV> <div style='float:left;'><A href='?src=[REF(user)];mach_close=newspaper_main'>Done reading</A></DIV>"
if(1) // X channel pages inbetween.
@@ -86,13 +86,13 @@
dat+="<img src='tmp_photo[i].png' width = '180'><BR>"
dat+="<FONT SIZE=1>\[Story by <FONT COLOR='maroon'>[MESSAGE.return_author(notContent(MESSAGE.author_censor_time))]</FONT>\]</FONT><BR><BR>"
dat+="</ul>"
if(scribble_page==curr_page)
if(scribble_page == curr_page)
dat+="<BR><I>There is a small scribble near the end of this page... It reads: \"[scribble]\"</I>"
dat+= "<BR><HR><DIV STYLE='float:left;'><A href='?src=[REF(src)];prev_page=1'>Previous Page</A></DIV> <DIV STYLE='float:right;'><A href='?src=[REF(src)];next_page=1'>Next Page</A></DIV>"
if(2) //Last page
for(var/datum/feed_channel/NP in news_content)
pages++
if(wantedAuthor!=null)
if(wantedAuthor != null)
dat+="<DIV STYLE='float:center;'><FONT SIZE=4><B>Wanted Issue:</B></FONT SIZE></DIV><BR><BR>"
dat+="<B>Criminal name</B>: <FONT COLOR='maroon'>[wantedCriminal]</FONT><BR>"
dat+="<B>Description</B>: [wantedBody]<BR>"
@@ -104,7 +104,7 @@
dat+="None"
else
dat+="<I>Apart from some uninteresting classified ads, there's nothing on this page...</I>"
if(scribble_page==curr_page)
if(scribble_page == curr_page)
dat+="<BR><I>There is a small scribble near the end of this page... It reads: \"[scribble]\"</I>"
dat+= "<HR><DIV STYLE='float:left;'><A href='?src=[REF(src)];prev_page=1'>Previous Page</A></DIV>"
dat+="<BR><HR><div align='center'>[curr_page+1]</div>"
+1 -1
View File
@@ -4,7 +4,7 @@
icon = 'icons/effects/blood.dmi'
/obj/effect/decal/remains/acid_act()
visible_message(span_warning("[src] dissolve[gender==PLURAL?"":"s"] into a puddle of sizzling goop!"))
visible_message(span_warning("[src] dissolve[gender == PLURAL?"":"s"] into a puddle of sizzling goop!"))
playsound(src, 'sound/items/welder.ogg', 150, TRUE)
new /obj/effect/decal/cleanable/greenglow(drop_location())
qdel(src)
+1 -1
View File
@@ -209,7 +209,7 @@ GLOBAL_VAR_INIT(glowshrooms, 0)
var/list/dir_list = list()
for(var/i=1,i<=16,i <<= 1)
for(var/i=1,i <= 16,i <<= 1)
if(direction & i)
dir_list += i
+1 -1
View File
@@ -4,7 +4,7 @@
var/turf/actual_destination = get_teleport_turf(destination, accuracy)
var/obj/effect/portal/P1 = new newtype(source, _lifespan, null, FALSE, null)
var/obj/effect/portal/P2 = new newtype(actual_destination, _lifespan, P1, TRUE, null)
if(!istype(P1)||!istype(P2))
if(!istype(P1) || !istype(P2))
return
P1.link_portal(P2)
P1.hardlinked = TRUE
+1 -1
View File
@@ -753,7 +753,7 @@ GLOBAL_VAR_INIT(icon_holographic_window, init_holographic_window())
ui_interact(user)
/obj/item/construction/rcd/proc/target_check(atom/A, mob/user) // only returns true for stuff the device can actually work with
if((isturf(A) && A.density && mode==RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode==RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
if((isturf(A) && A.density && mode == RCD_DECONSTRUCT) || (isturf(A) && !A.density) || (istype(A, /obj/machinery/door/airlock) && mode == RCD_DECONSTRUCT) || istype(A, /obj/structure/grille) || (istype(A, /obj/structure/window) && mode == RCD_DECONSTRUCT) || istype(A, /obj/structure/girder))
return TRUE
else
return FALSE
+2 -2
View File
@@ -93,7 +93,7 @@
if(..())
return
if(href_list["edit_area"])
if(get_area_type()!=AREA_STATION)
if(get_area_type() != AREA_STATION)
return
if(in_use)
return
@@ -192,7 +192,7 @@
var/area/A = get_area(usr)
var/prevname = "[A.name]"
var/str = tgui_input_text(usr, "New area name", "Area Creation", max_length = MAX_NAME_LEN)
if(!str || !length(str) || str==prevname) //cancel
if(!str || !length(str) || str == prevname) //cancel
return
if(length(str) > 50)
to_chat(usr, span_warning("The given name is too long. The area's name is unchanged."))
@@ -66,7 +66,7 @@
\n[span_info("Body temperature: ???")]")
return
if(ispodperson(M)&& !advanced)
if(ispodperson(M) && !advanced)
to_chat(user, "<span class='info'>[M]'s biological structure is too complex for the health analyzer.")
return
+1 -1
View File
@@ -184,7 +184,7 @@
for(var/datum/disease/advance/disease in target.diseases)
for(var/datum/symptom/symp in disease.symptoms)
if((symp.type == /datum/symptom/genetic_mutation)||(symp.type == /datum/symptom/viralevolution))
if((symp.type == /datum/symptom/genetic_mutation) || (symp.type == /datum/symptom/viralevolution))
crispr_charge = TRUE
log_combat(user, target, "[!doitanyway ? "failed to inject" : "injected"]", "[src] ([mutation])[crispr_charge ? " with CRISPR charge" : ""]")
return TRUE
+1 -1
View File
@@ -141,7 +141,7 @@
qdel(sign)
shock = 0
return
if(R.emagged&&!shock)
if(R.emagged && !shock)
to_chat(user, span_warning("You clear all active holograms, and overload your energy projector!"))
holosign_type = /obj/structure/holosign/barrier/cyborg/hacked
creation_time = 30
+2 -2
View File
@@ -87,12 +87,12 @@
var/i
var/obj/item/toy/plush/P
for(i=1, i<=scorned.len, i++)
for(i=1, i <= scorned.len, i++)
P = scorned[i]
P.bad_news(src)
scorned = null
for(i=1, i<=scorned_by.len, i++)
for(i=1, i <= scorned_by.len, i++)
P = scorned_by[i]
P.bad_news(src)
scorned_by = null
+1 -1
View File
@@ -155,7 +155,7 @@
var/obj/item/bot_assembly/ed209/B = new
B.forceMove(drop_location())
to_chat(user, span_notice("You arm the robot frame."))
var/holding_this = user.get_inactive_held_item()==src
var/holding_this = user.get_inactive_held_item() == src
qdel(src)
if (holding_this)
user.put_in_inactive_hand(B)
+3 -3
View File
@@ -147,7 +147,7 @@
to_chat(user, span_notice("There's nothing there to bandage!"))
return
if(!LAZYLEN(limb.wounds))
to_chat(user, span_notice("There's no wounds that require bandaging on [user==M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo
to_chat(user, span_notice("There's no wounds that require bandaging on [user == M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo
return
var/gauzeable_wound = FALSE
@@ -157,13 +157,13 @@
gauzeable_wound = TRUE
break
if(!gauzeable_wound)
to_chat(user, span_notice("There's no wounds that require bandaging on [user==M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo
to_chat(user, span_notice("There's no wounds that require bandaging on [user == M ? "your" : "[M]'s"] [limb.plaintext_zone]!")) // good problem to have imo
return
//SKYRAT EDIT CHANGE BEGIN - MEDICAL
/*
if(limb.current_gauze && (limb.current_gauze.absorption_capacity * 0.8 > absorption_capacity)) // ignore if our new wrap is < 20% better than the current one, so someone doesn't bandage it 5 times in a row
to_chat(user, span_warning("The bandage currently on [user==M ? "your" : "[M]'s"] [limb.plaintext_zone] is still in good condition!"))
to_chat(user, span_warning("The bandage currently on [user == M ? "your" : "[M]'s"] [limb.plaintext_zone] is still in good condition!"))
return
*/
if(limb.current_gauze)
@@ -68,7 +68,7 @@ GLOBAL_LIST_INIT(glass_recipes, list ( \
var/obj/item/stack/sheet/rglass/RG = new (get_turf(user))
if(!QDELETED(RG))
RG.add_fingerprint(user)
var/replace = user.get_inactive_held_item()==src
var/replace = user.get_inactive_held_item() == src
V.use(1)
use(1)
if(QDELETED(src) && replace && !QDELETED(RG))
@@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list ( \
var/obj/item/stack/sheet/plasmarglass/RG = new (get_turf(user))
if (!QDELETED(RG))
RG.add_fingerprint(user)
var/replace = user.get_inactive_held_item()==src
var/replace = user.get_inactive_held_item() == src
V.use(1)
use(1)
if(QDELETED(src) && replace)
+1 -1
View File
@@ -92,7 +92,7 @@
/obj/item/tank/internals/plasma/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/flamethrower))
var/obj/item/flamethrower/F = W
if ((!F.status)||(F.ptank))
if ((!F.status) || (F.ptank))
return
if(!user.transferItemToLoc(src, F))
return
+1 -1
View File
@@ -327,7 +327,7 @@
return
if(nozzle_mode == RESIN_FOAM)
if(!Adj|| !isturf(target))
if(!Adj || !isturf(target))
balloon_alert(user, "too far!")
return
for(var/S in target)
+2 -2
View File
@@ -146,7 +146,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag)
ui_interact(M)
if(issilicon(usr) || isAdminGhostAI(usr))
if (!(usr in nearby))
if (usr.client && usr.machine==src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
if (usr.client && usr.machine == src) // && M.machine == src is omitted because if we triggered this by using the dialog, it doesn't matter if our machine changed in between triggering it and this - the dialog is probably still supposed to refresh.
is_in_use = TRUE
ui_interact(usr)
@@ -155,7 +155,7 @@ GLOBAL_LIST_EMPTY(objects_by_id_tag)
if(ishuman(usr))
var/mob/living/carbon/human/H = usr
if(!(usr in nearby))
if(usr.client && usr.machine==src)
if(usr.client && usr.machine == src)
if(H.dna.check_mutation(/datum/mutation/human/telekinesis))
is_in_use = TRUE
ui_interact(usr)
+2 -2
View File
@@ -3,7 +3,7 @@
set name = "PDA Message"
set category = "Admin.Events"
if(!holder ||!check_rights(R_ADMIN))
if(!holder || !check_rights(R_ADMIN))
return
holder.message_pda()
@@ -64,7 +64,7 @@
if(!spam && target["name"] != params["user"])
continue
targets += target["tablet"]
if(!length(targets))
to_chat(usr, span_warning("ERROR: Target is unavaiable(or not choosed)."))
return
+1 -1
View File
@@ -95,7 +95,7 @@ GLOBAL_VAR(antag_prototypes)
tgui_alert(usr, "This mind doesn't have a mob, or is deleted! For some reason!", "Edit Memory")
return
var/out = "<B>[name]</B>[(current && (current.real_name!=name))?" (as [current.real_name])":""]<br>"
var/out = "<B>[name]</B>[(current && (current.real_name != name))?" (as [current.real_name])":""]<br>"
out += "Mind currently owned by key: [key] [active?"(synced)":"(not synced)"]<br>"
out += "Assigned role: [assigned_role.title]. <a href='?src=[REF(src)];role_edit=1'>Edit</a><br>"
out += "Faction and special role: <b><font color='red'>[special_role]</font></b><br>"
+1 -1
View File
@@ -3,7 +3,7 @@
set name = "Trigger Event"
set category = "Admin.Events"
if(!holder ||!check_rights(R_FUN))
if(!holder || !check_rights(R_FUN))
return
holder.forceEvent()
+4 -4
View File
@@ -107,13 +107,13 @@
var id = span.getAttribute("id");
if(!id || !(id.indexOf("item")==0))
if(!id || !(id.indexOf("item") == 0))
continue;
var pass = 1;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
if(locked_tabs\[j\] == id){
pass = 0;
break;
}
@@ -142,7 +142,7 @@
var pass = 1;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
if(locked_tabs\[j\] == id){
pass = 0;
break;
}
@@ -163,7 +163,7 @@
var index = 0;
var pass = 0;
for(var j = 0; j < locked_tabs.length; j++){
if(locked_tabs\[j\]==id){
if(locked_tabs\[j\] == id){
pass = 1;
index = j;
break;
+1 -1
View File
@@ -527,7 +527,7 @@
if(!linkless)
if(type == "note")
if(severity)
data += "<a href='?_src_=holder;[HrefToken()];editmessageseverity=[id]'>[severity=="none" ? "No" : "[capitalize(severity)]"] Severity</a>"
data += "<a href='?_src_=holder;[HrefToken()];editmessageseverity=[id]'>[severity == "none" ? "No" : "[capitalize(severity)]"] Severity</a>"
else
data += "<a href='?_src_=holder;[HrefToken()];editmessageseverity=[id]'>N/A Severity</a>"
data += " <a href='?_src_=holder;[HrefToken()];editmessageexpiry=[id]'>Change Expiry Time</a>"
+3 -3
View File
@@ -193,7 +193,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(G_found.mind && !G_found.mind.active) //mind isn't currently in use by someone/something
//check if they were a monkey
if(findtext(G_found.real_name,"monkey"))
if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No"))=="Yes")
if(tgui_alert(usr,"This character appears to have been a monkey. Would you like to respawn them as such?",,list("Yes","No")) == "Yes")
var/mob/living/carbon/human/species/monkey/new_monkey = new
SSjob.SendToLateJoin(new_monkey)
G_found.mind.transfer_to(new_monkey) //be careful when doing stuff like this! I've already checked the mind isn't in use
@@ -284,10 +284,10 @@ Traitors and the like can also be revived with the previous role mostly intact.
//Announces the character on all the systems, based on the record.
if(!record_found && (new_character.mind.assigned_role.job_flags & JOB_CREW_MEMBER))
//Power to the user!
if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes"))=="Yes")
if(tgui_alert(new_character,"Warning: No data core entry detected. Would you like to announce the arrival of this character by adding them to various databases, such as medical records?",,list("No","Yes")) == "Yes")
GLOB.data_core.manifest_inject(new_character, src) // SKYRAT EDIT CHANGE - ALTERNATIVE_JOB_TITLES - Original: GLOB.data_core.manifest_inject(new_character)
if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes"))=="Yes")
if(tgui_alert(new_character,"Would you like an active AI to announce this character?",,list("No","Yes")) == "Yes")
announce_arrival(new_character, new_character.mind.assigned_role.title)
var/msg = span_adminnotice("[admin] has respawned [player_key] as [new_character.real_name].")
+1 -1
View File
@@ -1020,7 +1020,7 @@ GLOBAL_DATUM_INIT(admin_help_ui_handler, /datum/admin_help_ui_handler, new)
var/list/L = splittext(string, " ")
var/surname_found = 0
//surnames
for(var/i=L.len, i>=1, i--)
for(var/i=L.len, i >= 1, i--)
var/word = ckey(L[i])
if(word)
surnames[word] = M
+1 -1
View File
@@ -75,7 +75,7 @@
return
var/confirm = tgui_alert(usr, "Are you sure you want to reload all admins?", "Confirm", list("Yes", "No"))
if(confirm !="Yes")
if(confirm != "Yes")
return
load_admins()
+1 -1
View File
@@ -485,7 +485,7 @@ GLOBAL_DATUM(everyone_a_traitor, /datum/everyone_is_a_traitor_controller)
var/animetype = tgui_alert(usr,"Would you like to have the clothes be changed?",,list("Yes","No","Cancel"))
var/droptype
if(animetype =="Yes")
if(animetype == "Yes")
droptype = tgui_alert(usr,"Make the uniforms Nodrop?",,list("Yes","No","Cancel"))
if(animetype == "Cancel" || droptype == "Cancel")
@@ -123,8 +123,8 @@
var ca = document.cookie.split(';');
for(var i=0; i<ca.length; i++) {
var c = ca\[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(name)==0) return c.substring(name.length,c.length);
while (c.charAt(0) == ' ') c = c.substring(1,c.length);
if (c.indexOf(name) == 0) return c.substring(name.length,c.length);
}
return "";
}
@@ -148,7 +148,7 @@
var/mob/living/carbon/human/H = owner.current
var/gear = tgui_alert(admin,"Agent or Scientist Gear", "Gear", list("Agent", "Scientist"))
if(gear)
if(gear=="Agent")
if(gear == "Agent")
H.equipOutfit(/datum/outfit/abductor/agent)
else
H.equipOutfit(/datum/outfit/abductor/scientist)
@@ -196,7 +196,7 @@
else
mode = GIZMO_SCAN
icon_state = "gizmo_scan"
to_chat(user, span_notice("You switch the device to [mode==GIZMO_SCAN? "SCAN": "MARK"] MODE"))
to_chat(user, span_notice("You switch the device to [mode == GIZMO_SCAN? "SCAN": "MARK"] MODE"))
/obj/item/abductor/gizmo/attack(mob/living/M, mob/user)
if(!ScientistCheck(user))
@@ -322,7 +322,7 @@
else
mode = MIND_DEVICE_MESSAGE
icon_state = "mind_device_message"
to_chat(user, span_notice("You switch the device to [mode==MIND_DEVICE_MESSAGE? "TRANSMISSION": "COMMAND"] MODE"))
to_chat(user, span_notice("You switch the device to [mode == MIND_DEVICE_MESSAGE? "TRANSMISSION": "COMMAND"] MODE"))
/obj/item/abductor/mind_device/afterattack(atom/target, mob/living/user, flag, params)
. = ..()
@@ -65,13 +65,13 @@
/datum/action/changeling/biodegrade/proc/dissolve_handcuffs(mob/living/carbon/human/user, obj/O)
if(O && user.handcuffed == O)
user.visible_message(span_warning("[O] dissolve[O.gender==PLURAL?"":"s"] into a puddle of sizzling goop."))
user.visible_message(span_warning("[O] dissolve[O.gender == PLURAL?"":"s"] into a puddle of sizzling goop."))
new /obj/effect/decal/cleanable/greenglow(O.drop_location())
qdel(O)
/datum/action/changeling/biodegrade/proc/dissolve_legcuffs(mob/living/carbon/human/user, obj/O)
if(O && user.legcuffed == O)
user.visible_message(span_warning("[O] dissolve[O.gender==PLURAL?"":"s"] into a puddle of sizzling goop."))
user.visible_message(span_warning("[O] dissolve[O.gender == PLURAL?"":"s"] into a puddle of sizzling goop."))
new /obj/effect/decal/cleanable/greenglow(O.drop_location())
qdel(O)
+4 -4
View File
@@ -167,7 +167,7 @@
span_cultitalic("You speak the cursed words, emitting an EMP blast from your hand."))
empulse(owner, 2, 5)
charges--
if(charges<=0)
if(charges <= 0)
qdel(src)
/datum/action/innate/cult/blood_spell/shackles
@@ -305,7 +305,7 @@
revealing = FALSE
name = "Conceal Runes"
button_icon_state = "gone"
if(charges<= 0)
if(charges <= 0)
qdel(src)
desc = base_desc
desc += "<br><b><u>Has [charges] use\s remaining</u></b>."
@@ -707,9 +707,9 @@
if(ratio>1)
ratio = 1
uses -= round(overall_damage)
H.visible_message(span_warning("[H] is fully healed by [H==user ? "[H.p_their()]":"[H]'s"] blood magic!"))
H.visible_message(span_warning("[H] is fully healed by [H == user ? "[H.p_their()]":"[H]'s"] blood magic!"))
else
H.visible_message(span_warning("[H] is partially healed by [H==user ? "[H.p_their()]":"[H]'s"] blood magic."))
H.visible_message(span_warning("[H] is partially healed by [H == user ? "[H.p_their()]":"[H]'s"] blood magic."))
uses = 0
ratio *= -1
H.adjustOxyLoss((overall_damage*ratio) * (H.getOxyLoss() / overall_damage), 0)
+1 -1
View File
@@ -1011,7 +1011,7 @@ structure_check() searches for nearby cultist structures required for the invoca
to_chat(M, span_cultlarge("An Apocalypse Rune was invoked in the [place.name], it is no longer available as a summoning site!"))
SEND_SOUND(M, 'sound/effects/pope_entry.ogg')
image_handler(images, duration)
if(intensity>=285) // Based on the prior formula, this means the cult makes up <15% of current players
if(intensity >= 285) // Based on the prior formula, this means the cult makes up <15% of current players
var/outcome = rand(1,100)
switch(outcome)
if(1 to 10)
@@ -221,7 +221,7 @@
/// Extra checks ran while we're healing something (organ, mob).
/datum/action/cooldown/spell/touch/flesh_surgery/proc/heal_checks(obj/item/melee/touch_attack/hand, atom/healing, mob/living/carbon/caster)
if(QDELETED(src) || QDELETED(hand) ||QDELETED(healing) || !IsAvailable())
if(QDELETED(src) || QDELETED(hand) || QDELETED(healing) || !IsAvailable())
return FALSE
return TRUE
+1 -1
View File
@@ -51,7 +51,7 @@
/mob/living/simple_animal/hostile/morph/examine(mob/user)
if(morphed)
. = form.examine(user)
if(get_dist(user,src)<=3)
if(get_dist(user,src) <= 3)
. += span_warning("It doesn't look quite right...")
else
. = ..()
+7 -7
View File
@@ -163,13 +163,13 @@
if(bomb_mixture.temperature > (T0C + 400))
strength = (fuel_moles/15)
if(strength >=2)
if(strength >= 2)
explosion(ground_zero, devastation_range = round(strength,1), heavy_impact_range = round(strength*2,1), light_impact_range = round(strength*3,1), flash_range = round(strength*4,1), explosion_cause = src)
else if(strength >=1)
else if(strength >= 1)
explosion(ground_zero, devastation_range = round(strength,1), heavy_impact_range = round(strength*2,1), light_impact_range = round(strength*2,1), flash_range = round(strength*3,1), explosion_cause = src)
else if(strength >=0.5)
else if(strength >= 0.5)
explosion(ground_zero, heavy_impact_range = 1, light_impact_range = 2, flash_range = 4, explosion_cause = src)
else if(strength >=0.2)
else if(strength >= 0.2)
explosion(ground_zero, devastation_range = -1, light_impact_range = 1, flash_range = 2, explosion_cause = src)
else
ground_zero.assume_air(bomb_mixture)
@@ -178,9 +178,9 @@
else if(bomb_mixture.temperature > (T0C + 250))
strength = (fuel_moles/20)
if(strength >=1)
if(strength >= 1)
explosion(ground_zero, heavy_impact_range = round(strength,1), light_impact_range = round(strength*2,1), flash_range = round(strength*3,1), explosion_cause = src)
else if(strength >=0.5)
else if(strength >= 0.5)
explosion(ground_zero, devastation_range = -1, light_impact_range = 1, flash_range = 2, explosion_cause = src)
else
ground_zero.assume_air(bomb_mixture)
@@ -189,7 +189,7 @@
else if(bomb_mixture.temperature > (T0C + 100))
strength = (fuel_moles/25)
if(strength >=1)
if(strength >= 1)
explosion(ground_zero, devastation_range = -1, light_impact_range = round(strength,1), flash_range = round(strength*3,1), explosion_cause = src)
else
ground_zero.assume_air(bomb_mixture)
@@ -40,10 +40,10 @@
/*||||||||||||||/----------\||||||||||||||*\
||||||||||||||||[GAS DATUMS]||||||||||||||||
||||||||||||||||\__________/||||||||||||||||
||||These should never be instantiated. ||||
||||They exist only to make it easier ||||
||||to add a new gas. They are accessed ||||
||||only by meta_gas_list(). ||||
|||| These should never be instantiated. ||||
|||| They exist only to make it easier ||||
|||| to add a new gas. They are accessed ||||
|||| only by meta_gas_list(). ||||
\*||||||||||||||||||||||||||||||||||||||||*/
//This is a plot created using the values for gas exports. Each gas has a value that works as it's kind of soft-cap, which limits you from making billions of credits per sale, based on the base_value variable on the gasses themselves. Most of these gasses as a result have a rather low value when sold, like nitrogen and oxygen at 1500 and 600 respectively at their maximum value. The
@@ -60,7 +60,7 @@
var/input_starting_pressure = air1.return_pressure()
var/output_starting_pressure = air2.return_pressure()
if((input_starting_pressure < 0.01) || ((output_starting_pressure > 9000))&&!overclocked)
if((input_starting_pressure < 0.01) || ((output_starting_pressure > 9000)) && !overclocked)
return
if(overclocked && (output_starting_pressure-input_starting_pressure > 1000))//Overclocked pumps can only force gas a certain amount.
@@ -48,7 +48,7 @@ GLOBAL_DATUM(ctf_spawner, /obj/effect/landmark/ctf)
else
current_map = map_choices[chosen_map]
if(!user || chosen_map=="Random")
if(!user || chosen_map == "Random")
current_map = pick(map_options)
current_map = new current_map()
+1 -1
View File
@@ -715,7 +715,7 @@
launchList |= typecache_filter_list_reverse(acceptable_turf.contents, ignored_atoms) //filter a random turf from the acceptableTurfs list and add it to the launchList
if (iswallturf(acceptable_turf))
launchList += acceptable_turf
updateSelector() //Call updateSelector(), which, if we are launching one at a time (launchChoice==2), will move to the next turf that will be launched
updateSelector() //Call updateSelector(), which, if we are launching one at a time (launchChoice == 2), will move to the next turf that will be launched
//UpdateSelector() is here (instead if the if(1) switch block) because it also moves the selector to nullspace (to hide it) if needed
/datum/centcom_podlauncher/proc/launch(turf/target_turf) //Game time started
+1 -1
View File
@@ -104,7 +104,7 @@ Then the player gets the profit from selling his own wasted time.
/datum/export/proc/get_cost(obj/O, apply_elastic = TRUE)
var/amount = get_amount(O)
if(apply_elastic)
if(k_elasticity!=0)
if(k_elasticity != 0)
return round((cost/k_elasticity) * (1 - NUM_E**(-1 * k_elasticity * amount))) //anti-derivative of the marginal cost function
else
return round(cost * amount) //alternative form derived from L'Hopital to avoid division by 0
+3 -3
View File
@@ -469,13 +469,13 @@ GLOBAL_LIST_INIT(blacklisted_builds, list(
if (CONFIG_GET(flag/irc_first_connection_alert))
send2tgs_adminless_only("New-user", "[key_name(src)] is connecting for the first time!")
else if (isnum(cached_player_age) && cached_player_age < nnpa)
message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age==1?"":"s")]")
message_admins("New user: [key_name_admin(src)] just connected with an age of [cached_player_age] day[(player_age == 1?"":"s")]")
if(CONFIG_GET(flag/use_account_age_for_jobs) && account_age >= 0)
player_age = account_age
if(account_age >= 0 && account_age < nnpa)
message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
message_admins("[key_name_admin(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].")
if (CONFIG_GET(flag/irc_first_connection_alert))
send2tgs_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age==1?"":"s")] old, created on [account_join_date].")
send2tgs_adminless_only("new_byond_user", "[key_name(src)] (IP: [address], ID: [computer_id]) is a new BYOND account [account_age] day[(account_age == 1?"":"s")] old, created on [account_join_date].")
get_message_output("watchlist entry", ckey)
check_ip_intel()
validate_key_in_db()
+1 -1
View File
@@ -11,7 +11,7 @@
SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Carn
This proc checks if the current directory of the savefile S needs updating
It is to be used by the load_character and load_preferences procs.
(S.cd=="/" is preferences, S.cd=="/character[integer]" is a character slot, etc)
(S.cd == "/" is preferences, S.cd == "/character[integer]" is a character slot, etc)
if the current directory's version is below SAVEFILE_VERSION_MIN it will simply wipe everything in that directory
(if we're at root "/" then it'll just wipe the entire savefile, for instance.)
@@ -85,7 +85,7 @@
to_chat(user, span_warning("This item is not suitable for [src]!"))
return
var/mob/living/carbon/C = L
if(C.buckled ||C.has_buckled_mobs())
if(C.buckled || C.has_buckled_mobs())
to_chat(user, span_warning("[C] is attached to something!"))
return
+3 -3
View File
@@ -375,7 +375,7 @@
if(pestlevel >= 8)
if(!myseed.get_gene(/datum/plant_gene/trait/carnivory))
if(myseed.potency >=30)
if(myseed.potency >= 30)
myseed.adjust_potency(-rand(2,6)) //Pests eat leaves and nibble on fruit, lowering potency.
myseed.set_potency(min((myseed.potency), CARNIVORY_POTENCY_MIN, MAX_PLANT_POTENCY))
else
@@ -384,7 +384,7 @@
else if(pestlevel >= 4)
if(!myseed.get_gene(/datum/plant_gene/trait/carnivory))
if(myseed.potency >=30)
if(myseed.potency >= 30)
myseed.adjust_potency(-rand(1,4))
myseed.set_potency(min((myseed.potency), CARNIVORY_POTENCY_MIN, MAX_PLANT_POTENCY))
@@ -399,7 +399,7 @@
// If it's a weed, it doesn't stunt the growth
if(weedlevel >= 5 && !myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy))
if(myseed.yield >=3)
if(myseed.yield >= 3)
myseed.adjust_yield(-rand(1,2)) //Weeds choke out the plant's ability to bear more fruit.
myseed.set_yield(min((myseed.yield), WEED_HARDY_YIELD_MIN, MAX_PLANT_YIELD))
+1 -1
View File
@@ -39,7 +39,7 @@
/datum/language/proc/get_random_name(gender, name_count=2, syllable_count=4, syllable_divisor=2)
if(!syllables || !syllables.len)
if(gender==FEMALE)
if(gender == FEMALE)
return capitalize(pick(GLOB.first_names_female)) + " " + capitalize(pick(GLOB.last_names))
else
return capitalize(pick(GLOB.first_names_male)) + " " + capitalize(pick(GLOB.last_names))
+1 -1
View File
@@ -50,7 +50,7 @@ GLOBAL_LIST_INIT(meteors_sandstorm, list(/obj/effect/meteor/sand=45, /obj/effect
picked_start = spaceDebrisStartLoc(start_side, start_Z)
picked_goal = spaceDebrisFinishLoc(start_side, start_Z)
max_i--
if(max_i<=0)
if(max_i <= 0)
return
var/new_meteor = pick_weight(meteor_types)
new new_meteor(picked_start, picked_goal)
@@ -14,7 +14,7 @@
if(status_flags & GODMODE)
return
if(stat != DEAD)
if(health<= -maxHealth || !getorgan(/obj/item/organ/internal/brain))
if(health <= -maxHealth || !getorgan(/obj/item/organ/internal/brain))
death()
return
if((HAS_TRAIT(src, TRAIT_KNOCKEDOUT)))
@@ -109,7 +109,7 @@
//When the alien queen dies, all aliens suffer a penalty as punishment for failing to protect her.
/obj/item/organ/internal/alien/hivenode/proc/queen_death()
if(!owner|| owner.stat == DEAD)
if(!owner || owner.stat == DEAD)
return
if(isalien(owner)) //Different effects for aliens than humans
to_chat(owner, span_userdanger("Your Queen has been struck down!"))
+1 -1
View File
@@ -59,7 +59,7 @@
msg += "<B>[capitalize(t_his)] [BP.name] is [damage_text]!</B>\n"
for(var/t in missing)
if(t==BODY_ZONE_HEAD)
if(t == BODY_ZONE_HEAD)
msg += "[span_deadsay("<B>[t_His] [parse_zone(t)] is missing!</B>")]\n"
continue
msg += "[span_warning("<B>[t_His] [parse_zone(t)] is missing!</B>")]\n"
@@ -201,7 +201,7 @@
var/l_limbs_missing = 0
var/r_limbs_missing = 0
for(var/t in missing)
if(t==BODY_ZONE_HEAD)
if(t == BODY_ZONE_HEAD)
msg += "<span class='deadsay'><B>[t_His] [parse_zone(t)] is missing!</B><span class='warning'>\n"
continue
if(t == BODY_ZONE_L_ARM || t == BODY_ZONE_L_LEG)
@@ -456,7 +456,7 @@
//Check for ID
var/obj/item/card/id/idcard = get_idcard(FALSE)
if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name=="Unknown")
if( (judgement_criteria & JUDGE_IDCHECK) && !idcard && name == "Unknown")
threatcount += 4
//Check for weapons
+1 -1
View File
@@ -159,7 +159,7 @@
if(M.pulledby == src && !too_strong)
mob_swap = TRUE
else if(
!(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP))&&\
!(HAS_TRAIT(M, TRAIT_NOMOBSWAP) || HAS_TRAIT(src, TRAIT_NOMOBSWAP)) &&\
((HAS_TRAIT(M, TRAIT_RESTRAINED) && !too_strong) || !their_combat_mode) &&\
(HAS_TRAIT(src, TRAIT_RESTRAINED) || !combat_mode)
)
+4 -4
View File
@@ -3,7 +3,7 @@
//Not sure why this is necessary...
/proc/AutoUpdateAI(obj/subject)
var/is_in_use = 0
if (subject!=null)
if (subject != null)
for(var/A in GLOB.ai_list)
var/mob/living/silicon/ai/M = A
if ((M.client && M.machine == subject))
@@ -1007,7 +1007,7 @@
for(var/borgie in GLOB.available_ai_shells)
var/mob/living/silicon/robot/R = borgie
if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai ||(R.connected_ai == src)))
if(R.shell && !R.deployed && (R.stat != DEAD) && (!R.connected_ai || (R.connected_ai == src)))
possible += R
if(!LAZYLEN(possible))
@@ -1018,7 +1018,7 @@
if(isnull(target))
return
if (target.stat == DEAD || target.deployed || !(!target.connected_ai ||(target.connected_ai == src)))
if (target.stat == DEAD || target.deployed || !(!target.connected_ai || (target.connected_ai == src)))
return
else if(mind)
@@ -1123,6 +1123,6 @@
/mob/living/silicon/ai/GetVoice()
. = ..()
if(ai_voicechanger&&ai_voicechanger.changing_voice)
if(ai_voicechanger && ai_voicechanger.changing_voice)
return ai_voicechanger.say_name
return
+1 -1
View File
@@ -110,7 +110,7 @@
var/obj/machinery/power/apc/theAPC = null
var/PRP //like ERP with the code, at least this stuff is no more 4x sametext
for (PRP=1, PRP<=4, PRP++)
for (PRP=1, PRP <= 4, PRP++)
T = get_turf(src)
AIarea = get_area(src)
if(AIarea)
@@ -564,7 +564,7 @@
new /obj/item/bodypart/arm/right/robot(T)
new /obj/item/bodypart/head/robot(T)
var/b
for(b=0, b!=2, b++)
for(b=0, b != 2, b++)
var/obj/item/assembly/flash/handheld/F = new /obj/item/assembly/flash/handheld(T)
F.burn_out()
if (cell) //Sanity check.
@@ -425,7 +425,7 @@
/mob/living/simple_animal/bot/cleanbot/ui_data(mob/user)
var/list/data = ..()
if(!(bot_cover_flags & BOT_COVER_LOCKED) || issilicon(user)|| isAdminGhostAI(user))
if(!(bot_cover_flags & BOT_COVER_LOCKED) || issilicon(user) || isAdminGhostAI(user))
data["custom_controls"]["clean_blood"] = janitor_mode_flags & CLEANBOT_CLEAN_BLOOD
data["custom_controls"]["clean_trash"] = janitor_mode_flags & CLEANBOT_CLEAN_TRASH
data["custom_controls"]["clean_graffiti"] = janitor_mode_flags & CLEANBOT_CLEAN_DRAWINGS
@@ -528,7 +528,7 @@
return
var/oldloc = loc
var/moved = step_towards(src, next) // attempt to move
if(moved && oldloc!=loc) // successful move
if(moved && oldloc != loc) // successful move
SEND_SIGNAL(src, COMSIG_MOB_BOT_STEP)
blockcount = 0
path -= loc
@@ -51,7 +51,7 @@
return
plant_cooldown--
if(AIStatus == AI_IDLE)
if(!plants_off && prob(10) && plant_cooldown<=0)
if(!plants_off && prob(10) && plant_cooldown <= 0)
plant_cooldown = initial(plant_cooldown)
SpreadPlants()
@@ -101,10 +101,10 @@
egg_cooldown--
plant_cooldown--
if(AIStatus == AI_IDLE)
if(!plants_off && prob(10) && plant_cooldown<=0)
if(!plants_off && prob(10) && plant_cooldown <= 0)
plant_cooldown = initial(plant_cooldown)
SpreadPlants()
if(!sterile && prob(10) && egg_cooldown<=0)
if(!sterile && prob(10) && egg_cooldown <= 0)
egg_cooldown = initial(egg_cooldown)
LayEggs()
@@ -278,7 +278,7 @@
var/obj/machinery/porta_turret/P = the_target
if(P.in_faction(src)) //Don't attack if the turret is in the same faction
return FALSE
if(P.has_cover &&!P.raised) //Don't attack invincible turrets
if(P.has_cover && !P.raised) //Don't attack invincible turrets
return FALSE
if(P.machine_stat & BROKEN) //Or turrets that are already broken
return FALSE
@@ -194,7 +194,7 @@
/mob/living/simple_animal/hostile/mushroom/harvest()
var/counter
for(counter=0, counter<=powerlevel, counter++)
for(counter=0, counter <= powerlevel, counter++)
var/obj/item/food/hugemushroomslice/S = new /obj/item/food/hugemushroomslice(src.loc)
S.reagents.add_reagent(/datum/reagent/drug/mushroomhallucinogen, powerlevel)
S.reagents.add_reagent(/datum/reagent/medicine/omnizine, powerlevel)
@@ -118,7 +118,7 @@
if(stat == DEAD || !environment || !environment.gases[/datum/gas/miasma])
return
var/miasma_percentage = environment.gases[/datum/gas/miasma][MOLES] / environment.total_moles()
if(miasma_percentage>=0.25)
if(miasma_percentage >= 0.25)
heal_bodypart_damage(1)
#define REGALRAT_INTERACTION "regalrat"
+1 -1
View File
@@ -694,7 +694,7 @@
/mob/proc/spin(spintime, speed)
set waitfor = 0
var/D = dir
if((spintime < 1)||(speed < 1)||!spintime||!speed)
if((spintime < 1) || (speed < 1) || !spintime || !speed)
return
flags_1 |= IS_SPINNING_1
+1 -1
View File
@@ -374,7 +374,7 @@
/mob/proc/click_random_mob()
var/list/nearby_mobs = list()
for(var/mob/living/L in range(1, src))
if(L!=src)
if(L != src)
nearby_mobs |= L
if(nearby_mobs.len)
var/mob/living/T = pick(nearby_mobs)
+1 -1
View File
@@ -244,7 +244,7 @@
for(var/turf/T in get_line(mobloc, L.loc))
new /obj/effect/temp_visual/dir_setting/ninja/shadow(T, L.dir)
limit--
if(limit<=0)
if(limit <= 0)
break
else
new /obj/effect/temp_visual/dir_setting/ninja/shadow(mobloc, L.dir)
+1 -1
View File
@@ -66,7 +66,7 @@
if(!desired_x || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user)
return FALSE
var/desired_y = tgui_input_number(user, "How high do you want the camera to shoot", "Zoom", picture_size_y, picture_size_y_max, picture_size_y_min)
if(!desired_y|| QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user)
if(!desired_y || QDELETED(user) || QDELETED(src) || !user.canUseTopic(src, be_close = TRUE, no_dexterity = FALSE, no_tk = TRUE) || loc != user)
return FALSE
picture_size_x = min(clamp(desired_x, picture_size_x_min, picture_size_x_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
picture_size_y = min(clamp(desired_y, picture_size_y_min, picture_size_y_max), CAMERA_PICTURE_SIZE_HARD_LIMIT)
+4 -4
View File
@@ -136,10 +136,10 @@
return
if(istype(attacking_object, /obj/item/wallframe/apc) && opened)
if(!(machine_stat & BROKEN || opened==APC_COVER_REMOVED || atom_integrity < max_integrity)) // There is nothing to repair
if(!(machine_stat & BROKEN || opened == APC_COVER_REMOVED || atom_integrity < max_integrity)) // There is nothing to repair
balloon_alert(user, "no reason for repairs!")
return
if(!(machine_stat & BROKEN) && opened==APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
if(!(machine_stat & BROKEN) && opened == APC_COVER_REMOVED) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover
user.visible_message(span_notice("[user.name] replaces missing APC's cover."))
balloon_alert(user, "replacing APC's cover...")
if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame
@@ -158,7 +158,7 @@
qdel(attacking_object)
set_machine_stat(machine_stat & ~BROKEN)
atom_integrity = max_integrity
if(opened==APC_COVER_REMOVED)
if(opened == APC_COVER_REMOVED)
opened = APC_COVER_OPENED
update_appearance()
return
@@ -286,7 +286,7 @@
return TRUE
var/mob/living/silicon/ai/AI = user
var/mob/living/silicon/robot/robot = user
if(aidisabled || malfhack && istype(malfai) && ((istype(AI) && (malfai!=AI && malfai != AI.parent)) || (istype(robot) && (robot in malfai.connected_robots))))
if(aidisabled || malfhack && istype(malfai) && ((istype(AI) && (malfai != AI && malfai != AI.parent)) || (istype(robot) && (robot in malfai.connected_robots))))
if(!loud)
balloon_alert(user, "it's disabled!")
return FALSE

Some files were not shown because too many files have changed in this diff Show More