stop this nonsense

This commit is contained in:
SandPoot
2024-01-05 00:28:56 -03:00
parent 05e2cc0979
commit c7a2565255
487 changed files with 1662 additions and 1662 deletions
+1 -1
View File
@@ -16,7 +16,7 @@
/proc/Get_Angle(atom/movable/start,atom/movable/end)//For beams.
if(!start || !end)
return 0
return FALSE
var/dy
var/dx
dy=(32*end.y+end.pixel_y)-(32*start.y+start.pixel_y)
+2 -2
View File
@@ -45,12 +45,12 @@
var/time_to_wait = GLOB.fileaccess_timer - world.time
if(time_to_wait > 0)
to_chat(src, "<font color='red'>Error: file_spam_check(): Spam. Please wait [DisplayTimeText(time_to_wait)].</font>")
return 1
return TRUE
var/delay = FTPDELAY
if(holder)
delay *= ADMIN_FTPDELAY_MODIFIER
GLOB.fileaccess_timer = world.time + delay
return 0
return FALSE
#undef FTPDELAY
#undef ADMIN_FTPDELAY_MODIFIER
+9 -9
View File
@@ -97,8 +97,8 @@
if(C == must_be_alone)
continue
if(our_area == get_area(C))
return 0
return 1
return FALSE
return TRUE
//We used to use linear regression to approximate the answer, but Mloc realized this was actually faster.
//And lo and behold, it is, and it's more accurate to boot.
@@ -310,14 +310,14 @@
var/turf/T
if(X1==X2)
if(Y1==Y2)
return 1 //Light cannot be blocked on same tile
return TRUE //Light cannot be blocked on same tile
else
var/s = SIGN(Y2-Y1)
Y1+=s
while(Y1!=Y2)
T=locate(X1,Y1,Z)
if(T.opacity)
return 0
return FALSE
Y1+=s
else
var/m=(32*(Y2-Y1)+(PY2-PY1))/(32*(X2-X1)+(PX2-PX1))
@@ -333,8 +333,8 @@
X1+=signX //Line exits tile horizontally
T=locate(X1,Y1,Z)
if(T.opacity)
return 0
return 1
return FALSE
return TRUE
#undef SIGNV
@@ -343,13 +343,13 @@
var/turf/Bturf = get_turf(B)
if(!Aturf || !Bturf)
return 0
return FALSE
if(inLineOfSight(Aturf.x,Aturf.y, Bturf.x,Bturf.y,Aturf.z))
return 1
return TRUE
else
return 0
return FALSE
/proc/get_cardinal_step_away(atom/start, atom/finish) //returns the position of a step from start away from finish, in one of the cardinal directions
+2 -2
View File
@@ -29,7 +29,7 @@
//(i.e the max or the min dependant on the comparison function)
/datum/heap/proc/pop()
if(!length(L))
return 0
return FALSE
. = L[1]
L[1] = L[length(L)]
@@ -60,7 +60,7 @@
//or 0 if there's no child
/datum/heap/proc/get_greater_child(index)
if(index * 2 > length(L))
return 0
return FALSE
if(index * 2 + 1 > length(L))
return index * 2
+3 -3
View File
@@ -56,7 +56,7 @@
/proc/calculate_adjacencies(atom/A)
if(!A.loc)
return 0
return FALSE
var/adjacencies = 0
@@ -64,7 +64,7 @@
if(ismovable(A))
AM = A
if(AM.can_be_unanchored && !AM.anchored)
return 0
return FALSE
for(var/direction in GLOB.cardinals)
AM = find_type_in_direction(A, direction)
@@ -374,7 +374,7 @@
if(N_SOUTH|N_EAST|N_SOUTHEAST)
return SOUTHEAST
else
return 0
return FALSE
//SSicon_smooth
/proc/queue_smooth_neighbors(atom/A)
+4 -4
View File
@@ -1027,15 +1027,15 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
//Returns the same icon specifed in the argument, but with the pixel drawn
/proc/DrawPixel(icon/I,colour,drawX,drawY)
if(!I)
return 0
return FALSE
var/Iwidth = I.Width()
var/Iheight = I.Height()
if(drawX > Iwidth || drawX <= 0)
return 0
return FALSE
if(drawY > Iheight || drawY <= 0)
return 0
return FALSE
I.DrawBox(colour,drawX, drawY)
return I
@@ -1048,7 +1048,7 @@ GLOBAL_LIST_EMPTY(friendly_animal_types)
if(J) //Only set the icon if it succeeded, the icon without the pixel is 1000x better than a black square.
icon = J
return J
return 0
return FALSE
//For creating consistent icons for human looking simple animals
/proc/get_flat_human_icon(icon_id, datum/job/J, datum/preferences/prefs, dummy_key, showDirs = GLOB.cardinals, outfit_override = null, no_anim = FALSE)
+1 -1
View File
@@ -138,7 +138,7 @@ GLOBAL_DATUM_INIT(sortInstance, /datum/sortInstance, new())
var/runHi = lo + 1
if(runHi >= hi)
return 1
return TRUE
var/last = fetchElement(L,lo)
var/current = fetchElement(L,runHi++)
+7 -7
View File
@@ -228,15 +228,15 @@
/proc/text_in_list(haystack, list/needle_list, start=1, end=0)
for(var/needle in needle_list)
if(findtext(haystack, needle, start, end))
return 1
return 0
return TRUE
return FALSE
//Like above, but case sensitive
/proc/text_in_list_case(haystack, list/needle_list, start=1, end=0)
for(var/needle in needle_list)
if(findtextEx(haystack, needle, start, end))
return 1
return 0
return TRUE
return FALSE
//Adds 'char' ahead of 'text' until there are 'count' characters total
/proc/add_leading(text, count, char = " ")
@@ -301,7 +301,7 @@
else if(b == replace) //if B is the replacement char
newtext = copytext(newtext, 1, newtext_it) + a + copytext(newtext, newtext_it + length(newtext[newtext_it]))
else //The lists disagree, Uh-oh!
return 0
return FALSE
text_it += length(a)
comp_it += length(b)
newtext_it += length(newtext[newtext_it])
@@ -311,7 +311,7 @@
//This proc returns the number of chars of the string that is the character
//This is used for detective work to determine fingerprint completion.
if(!text || !character)
return 0
return FALSE
var/count = 0
var/lentext = length(text)
var/a = ""
@@ -403,7 +403,7 @@ GLOBAL_LIST_INIT(binary, list("0","1"))
. = findtextEx(haystack, char, start, end)
if(.)
return
return 0
return FALSE
/proc/parsemarkdown_basic_step1(t, limited=FALSE)
if(length(t) <= 0)
+2 -2
View File
@@ -14,7 +14,7 @@
var/MM = text2num(time2text(world.timeofday, "MM")) // get the current month
var/DD = text2num(time2text(world.timeofday, "DD")) // get the current day
if(month == MM && day == DD)
return 1
return TRUE
//returns timestamp in a sql and a not-quite-compliant ISO 8601 friendly format
/proc/SQLtime(timevar)
@@ -41,7 +41,7 @@ GLOBAL_VAR_INIT(rollovercheck_last_timeofday, 0)
if(28 to INFINITY)
return 5
else
return 1
return TRUE
//Takes a value of time in deciseconds.
//Returns a text value of that number in hours, minutes, or seconds.
+4 -4
View File
@@ -158,7 +158,7 @@
/proc/dir2angle(D)
switch(D)
if(NORTH)
return 0
return FALSE
if(SOUTH)
return 180
if(EAST)
@@ -301,7 +301,7 @@
/proc/unix2date(timestamp, seperator = "-")
if(timestamp < 0)
return 0 //Do not accept negative values
return FALSE //Do not accept negative values
var/year = 1970 //Unix Epoc begins 1970-01-01
var/dayInSeconds = 86400 //60secs*60mins*24hours
@@ -363,7 +363,7 @@
var/list/covered_parts = list()
if(!bpc)
return 0
return FALSE
if(bpc & FULL_BODY)
covered_parts |= list(BODY_ZONE_L_ARM,BODY_ZONE_R_ARM,BODY_ZONE_HEAD,BODY_ZONE_CHEST,BODY_ZONE_L_LEG,BODY_ZONE_R_LEG)
@@ -557,7 +557,7 @@
//assumes format #RRGGBB #rrggbb
/proc/color_hex2num(A)
if(!A || length(A) != length_char(A))
return 0
return FALSE
var/R = hex2num(copytext(A, 2, 4))
var/G = hex2num(copytext(A, 4, 6))
var/B = hex2num(copytext(A, 6, 0))
+31 -31
View File
@@ -394,7 +394,7 @@ Turf and target are separate in case you want to teleport some distance from a t
/proc/get_edge_target_turf(atom/A, direction)
var/turf/target = locate(A.x, A.y, A.z)
if(!A || !target)
return 0
return FALSE
//since NORTHEAST == NORTH|EAST, etc, doing it this way allows for diagonal mass drivers in the future
//and isn't really any more complicated
@@ -512,35 +512,35 @@ Turf and target are separate in case you want to teleport some distance from a t
current = get_step_towards(current, target_turf)
while(current != target_turf)
if(steps > length)
return 0
return FALSE
if(current.opacity)
return 0
return FALSE
for(var/thing in current)
var/atom/A = thing
if(A.opacity)
return 0
return FALSE
current = get_step_towards(current, target_turf)
steps++
return 1
return TRUE
/proc/is_blocked_turf(turf/T, exclude_mobs)
if(T.density)
return 1
return TRUE
for(var/i in T)
var/atom/A = i
if(A.density && (!exclude_mobs || !ismob(A)))
return 1
return 0
return TRUE
return FALSE
/proc/is_anchored_dense_turf(turf/T) //like the older version of the above, fails only if also anchored
if(T.density)
return 1
return TRUE
for(var/i in T)
var/atom/movable/A = i
if(A.density && A.anchored)
return 1
return 0
return TRUE
return FALSE
/proc/get_step_towards2(atom/ref , atom/trg)
var/base_dir = get_dir(ref, get_step_towards(ref,trg))
@@ -577,9 +577,9 @@ Turf and target are separate in case you want to teleport some distance from a t
//Returns: 1 if found, 0 if not.
/proc/hasvar(datum/A, varname)
if(A.vars.Find(lowertext(varname)))
return 1
return TRUE
else
return 0
return FALSE
/proc/get_cardinal_dir(atom/A, atom/B)
var/dx = abs(B.x - A.x)
@@ -700,7 +700,7 @@ Turf and target are separate in case you want to teleport some distance from a t
//of course mathematically this is just adding world.icon_size on again
/proc/getPixelDistance(atom/A, atom/B, centered = TRUE)
if(!istype(A)||!istype(B))
return 0
return FALSE
. = bounds_dist(A, B) + sqrt((((A.pixel_x+B.pixel_x)**2) + ((A.pixel_y+B.pixel_y)**2)))
if(centered)
. += world.icon_size
@@ -741,28 +741,28 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
//Direction works sometimes
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
if(O.dir == turn(dir, 180))
return 1
return TRUE
else if(O.dir == dir)
return 1
return TRUE
//Some stuff doesn't use dir properly, so we need to check pixel instead
//That's exactly what get_turf_pixel() does
if(get_turf_pixel(O) == locdir)
return 1
return TRUE
if(is_type_in_typecache(O, GLOB.WALLITEMS_EXTERNAL) && check_external)
if(is_type_in_typecache(O, GLOB.WALLITEMS_INVERSE))
if(O.dir == turn(dir, 180))
return 1
return TRUE
else if(O.dir == dir)
return 1
return TRUE
//Some stuff is placed directly on the wallturf (signs)
for(var/obj/O in locdir)
if(is_type_in_typecache(O, GLOB.WALLITEMS) && check_external != 2)
if(O.pixel_x == 0 && O.pixel_y == 0)
return 1
return 0
return TRUE
return FALSE
/proc/check_target_facings(mob/living/initator, mob/living/target)
/*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head.
@@ -835,25 +835,25 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
/proc/IsValidSrc(datum/D)
if(istype(D))
return !QDELETED(D)
return 0
return FALSE
//Compare A's dir, the clockwise dir of A and the anticlockwise dir of A
//To the opposite dir of the dir returned by get_dir(B,A)
//If one of them is a match, then A is facing B
/proc/is_A_facing_B(atom/A,atom/B)
if(!istype(A) || !istype(B))
return 0
return FALSE
if(isliving(A))
var/mob/living/LA = A
if(LA.lying)
return 0
return FALSE
var/goal_dir = get_dir(A,B)
var/clockwise_A_dir = turn(A.dir, -45)
var/anticlockwise_A_dir = turn(A.dir, 45)
if(A.dir == goal_dir || clockwise_A_dir == goal_dir || anticlockwise_A_dir == goal_dir)
return 1
return 0
return TRUE
return FALSE
/*
@@ -1046,10 +1046,10 @@ B --><-- A
/atom/proc/contains(var/atom/A)
if(!A)
return 0
return FALSE
for(var/atom/location = A.loc, location, location = location.loc)
if(location == src)
return 1
return TRUE
/proc/flick_overlay_static(O, atom/A, duration)
set waitfor = 0
@@ -1149,7 +1149,7 @@ GLOBAL_REAL_VAR(list/stack_trace_storage)
/proc/stoplag(initial_delay)
if (!Master || !(Master.current_runlevel & RUNLEVELS_DEFAULT))
sleep(world.tick_lag)
return 1
return TRUE
if (!initial_delay)
initial_delay = world.tick_lag
. = 0
@@ -1568,11 +1568,11 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
/proc/num2sign(numeric)
if(numeric > 0)
return 1
return TRUE
else if(numeric < 0)
return -1
else
return 0
return FALSE
// Converts browser keycodes to BYOND keycodes.
/proc/browser_keycode_to_byond(keycode)
+8 -8
View File
@@ -11,7 +11,7 @@
to check that the mob is not inside of something
*/
/atom/proc/Adjacent(atom/neighbor) // basic inheritance, unused
return 0
return FALSE
// Not a sane use of the function and (for now) indicative of an error elsewhere
/area/Adjacent(var/atom/neighbor)
@@ -57,9 +57,9 @@
if(!src.ClickCross(get_dir(src,T1), border_only = 1, target_atom = target, mover = mover))
continue // could not enter src
return 1 // we don't care about our own density
return TRUE // we don't care about our own density
return 0
return FALSE
/*
Adjacency (to anything else):
@@ -78,11 +78,11 @@
// This is necessary for storage items not on your person.
/obj/item/Adjacent(var/atom/neighbor, var/recurse = 1)
if(neighbor == loc)
return 1
return TRUE
if(isitem(loc))
if(recurse > 0)
return loc.Adjacent(neighbor,recurse - 1)
return 0
return FALSE
return ..()
/*
@@ -99,7 +99,7 @@
if( O.flags_1&ON_BORDER_1) // windows are on border, check them first
if( O.dir & target_dir || O.dir & (O.dir-1) ) // full tile windows are just diagonals mechanically
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
return FALSE //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
else if( !border_only ) // dense, not on border, cannot pass over
return 0
return 1
return FALSE
return TRUE
+4 -4
View File
@@ -75,9 +75,9 @@
/mob/proc/clear_alert(category, clear_override = FALSE)
var/atom/movable/screen/alert/alert = alerts[category]
if(!alert)
return 0
return FALSE
if(alert.override_alerts && !clear_override)
return 0
return FALSE
alerts -= category
if(client && hud_used)
@@ -784,7 +784,7 @@ so as to remain in compliance with the most up-to-date laws."
if(!hud_shown)
for(var/i = 1, i <= alerts.len, i++)
screenmob.client.screen -= alerts[alerts[i]]
return 1
return TRUE
for(var/i = 1, i <= alerts.len, i++)
var/atom/movable/screen/alert/alert = alerts[alerts[i]]
if(alert.icon_state == "template")
@@ -807,7 +807,7 @@ so as to remain in compliance with the most up-to-date laws."
if(!viewmob)
for(var/M in mymob.observers)
reorganize_alerts(M)
return 1
return TRUE
/atom/movable/screen/alert/Click(location, control, params)
if(!usr || !usr.client)
+1 -1
View File
@@ -29,7 +29,7 @@
/atom/movable/screen/human/equip/Click()
if(ismecha(usr.loc)) // stops inventory actions in a mech
return 1
return TRUE
var/mob/living/carbon/human/H = usr
H.quick_equip()
+2 -2
View File
@@ -7,7 +7,7 @@
/atom/movable/screen/robot/Click()
if(isobserver(usr))
return 1
return TRUE
/atom/movable/screen/robot/module/Click()
if(..())
@@ -15,7 +15,7 @@
var/mob/living/silicon/robot/R = usr
if(R.module.type != /obj/item/robot_module)
R.hud_used.toggle_show_robot_modules()
return 1
return TRUE
R.pick_module()
/atom/movable/screen/robot/module1
+3 -3
View File
@@ -62,12 +62,12 @@
// At this point in client Click() code we have passed the 1/10 sec check and little else
// We don't even know if it's a middle click
if(usr.incapacitated())
return 1
return TRUE
if(ismob(usr))
var/mob/M = usr
M.swap_hand()
return 1
return TRUE
// /atom/movable/screen/skills
// name = "skills"
@@ -455,7 +455,7 @@
var/icon_y = text2num(LAZYACCESS(modifiers, "icon-y"))
var/choice = get_zone_at(icon_x, icon_y)
if (!choice)
return 1
return TRUE
return set_selected_zone(choice, usr)
+1 -1
View File
@@ -236,7 +236,7 @@
attack_message_local = "You [message_verb] yourself[message_hit_area] with [I]"
visible_message("<span class='danger'>[attack_message]</span>",\
"<span class='userdanger'>[attack_message_local]</span>", null, COMBAT_MESSAGE_RANGE)
return 1
return TRUE
/// How much stamina this takes to swing this is not for realism purposes hecc off.
/obj/item/proc/getweight(mob/living/user, multiplier = 1, trait = SKILL_STAMINA_COST)
+2 -2
View File
@@ -18,7 +18,7 @@
. = attackchain_flags
// Special glove functions:
// If the gloves do anything, have them return 1 to stop
// If the gloves do anything, have them return TRUE to stop
// normal attack_hand() here.
var/obj/item/clothing/gloves/G = gloves // not typecast specifically enough in defines
if(proximity && istype(G))
@@ -99,7 +99,7 @@
*/
/mob/living/carbon/RestrainedClickOn(atom/A)
return 0
return FALSE
/mob/living/carbon/human/RangedAttack(atom/A, mouseparams)
. = ..()
+4 -4
View File
@@ -24,13 +24,13 @@
/datum/atom_hud/data/human/medical/basic/proc/check_sensors(mob/living/carbon/human/H)
if(!istype(H))
return 0
return FALSE
var/obj/item/clothing/under/U = H.w_uniform
if(!istype(U))
return 0
return FALSE
if(U.sensor_mode <= SENSOR_VITALS)
return 0
return 1
return FALSE
return TRUE
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
if(check_sensors(H))
+2 -2
View File
@@ -11,9 +11,9 @@
* @code
/hook/foo/proc/bar()
if(1)
return 1 //Sucessful
return TRUE //Sucessful
else
return 0 //Error, or runtime.
return FALSE //Error, or runtime.
* @endcode
* All hooks must return nonzero on success, as runtimes will force return null.
*/
+2 -2
View File
@@ -129,7 +129,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
/proc/Recreate_MC()
. = -1 //so if we runtime, things know we failed
if (world.time < Master.restart_timeout)
return 0
return FALSE
if (world.time < Master.restart_clear)
Master.restart_count *= 0.5
@@ -142,7 +142,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
new/datum/controller/master()
catch
return -1
return 1
return TRUE
/datum/controller/master/Recover()
+1 -1
View File
@@ -48,7 +48,7 @@ SUBSYSTEM_DEF(activity)
/datum/controller/subsystem/activity/proc/get_average_threat()
if(!length(threat_history))
return 0
return FALSE
var/total_weight = 0
var/total_amt = 0
for(var/i in 1 to threat_history.len-1)
+9 -9
View File
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(job)
var/list/all_jobs = subtypesof(/datum/job)
if(!all_jobs.len)
to_chat(world, "<span class='boldannounce'>Error setting up jobs, no job datums found</span>")
return 0
return FALSE
for(var/J in all_jobs)
var/datum/job/job = new J()
@@ -65,7 +65,7 @@ SUBSYSTEM_DEF(job)
name_occupations[job.title] = job
type_occupations[J] = job
return 1
return TRUE
/datum/controller/subsystem/job/proc/GetJob(rank)
@@ -199,8 +199,8 @@ SUBSYSTEM_DEF(job)
continue
var/mob/dead/new_player/candidate = pick(candidates)
if(AssignRole(candidate, command_position))
return 1
return 0
return TRUE
return FALSE
//This proc is called at the start of the level loop of DivideOccupations() and will cause head jobs to be checked before any other jobs of the same level
@@ -222,7 +222,7 @@ SUBSYSTEM_DEF(job)
var/ai_selected = 0
var/datum/job/job = GetJob("AI")
if(!job)
return 0
return FALSE
for(var/i = job.total_positions, i > 0, i--)
for(var/level in level_order)
var/list/candidates = list()
@@ -233,8 +233,8 @@ SUBSYSTEM_DEF(job)
ai_selected++
break
if(ai_selected)
return 1
return 0
return TRUE
return FALSE
/** Proc DivideOccupations
@@ -599,8 +599,8 @@ SUBSYSTEM_DEF(job)
if(hpc || epc)
var/relevent_cap = max(hpc, epc)
if((initial_players_to_assign - unassigned.len) >= relevent_cap)
return 1
return 0
return TRUE
return FALSE
/datum/controller/subsystem/job/proc/RejectPlayer(mob/dead/new_player/player)
if(player.mind && player.mind.special_role)
+1 -1
View File
@@ -36,7 +36,7 @@ SUBSYSTEM_DEF(pathfinder)
flow[t] = M
return free
else
return 0
return FALSE
/datum/flowcache/proc/toolong(l)
log_game("Pathfinder route took longer than 150 ticks, src bot [flow[flow[l]]]")
+1 -1
View File
@@ -25,7 +25,7 @@ SUBSYSTEM_DEF(radio)
if(frequency)
frequency.remove_listener(device)
// let's don't delete frequencies in case a non-listener keeps a reference
return 1
return TRUE
/datum/controller/subsystem/radio/proc/return_frequency(new_frequency as num)
var/f_text = num2text(new_frequency)
+1 -1
View File
@@ -358,7 +358,7 @@ SUBSYSTEM_DEF(research)
/datum/controller/subsystem/research/proc/calculate_server_coefficient() //Diminishing returns.
var/amt = servers.len
if(!amt)
return 0
return FALSE
var/coeff = 100
coeff = sqrt(coeff / amt)
return coeff
+5 -5
View File
@@ -294,7 +294,7 @@ SUBSYSTEM_DEF(shuttle)
log_shuttle("[key_name(user)] has recalled the shuttle.")
message_admins("[ADMIN_LOOKUPFLW(user)] has recalled the shuttle.")
deadchat_broadcast(" has recalled the shuttle from [span_name("[get_area_name(user, TRUE)]")].", span_name("[user.real_name]"), user, message_type=DEADCHAT_ANNOUNCEMENT)
return 1
return TRUE
/datum/controller/subsystem/shuttle/proc/canRecall()
if(!emergency || emergency.mode != SHUTTLE_CALL || emergencyNoRecall || SSticker.mode.name == "meteor")
@@ -400,7 +400,7 @@ SUBSYSTEM_DEF(shuttle)
/datum/controller/subsystem/shuttle/proc/toggleShuttle(shuttleId, dockHome, dockAway, timed)
var/obj/docking_port/mobile/M = getShuttle(shuttleId)
if(!M)
return 1
return TRUE
var/obj/docking_port/stationary/dockedAt = M.get_docked()
var/destination = dockHome
if(dockedAt && dockedAt.id == dockHome)
@@ -411,7 +411,7 @@ SUBSYSTEM_DEF(shuttle)
else
if(M.initiate_docking(getDock(destination)) != DOCKING_SUCCESS)
return 2
return 0 //dock successful
return FALSE //dock successful
/datum/controller/subsystem/shuttle/proc/moveShuttle(shuttleId, dockId, timed)
@@ -419,14 +419,14 @@ SUBSYSTEM_DEF(shuttle)
var/obj/docking_port/stationary/D = getDock(dockId)
if(!M)
return 1
return TRUE
if(timed)
if(M.request(D))
return 2
else
if(M.initiate_docking(D) != DOCKING_SUCCESS)
return 2
return 0 //dock successful
return FALSE //dock successful
/datum/controller/subsystem/shuttle/proc/request_transit_dock(obj/docking_port/mobile/M)
if(!istype(M))
+2 -2
View File
@@ -245,7 +245,7 @@ SUBSYSTEM_DEF(ticker)
mode = null
SSjob.ResetOccupations()
emergency_swap++
return 0
return FALSE
CHECK_TICK
//Configure mode and assign player to special mode stuff
@@ -264,7 +264,7 @@ SUBSYSTEM_DEF(ticker)
to_chat(world, "<B>Error setting up [GLOB.master_mode].</B> Reverting to pre-game lobby.")
SSjob.ResetOccupations()
emergency_swap++
return 0
return FALSE
else
message_admins("<span class='notice'>DEBUG: Bypassing prestart checks...</span>")
+9 -9
View File
@@ -373,7 +373,7 @@ SUBSYSTEM_DEF(vote)
/datum/controller/subsystem/vote/proc/submit_vote(vote, score = 0)
if(mode)
if(CONFIG_GET(flag/no_dead_vote) && usr.stat == DEAD && !usr.client.holder)
return 0
return FALSE
if(vote && ISINRANGE(vote, 1, choices.len))
switch(vote_system)
if(PLURALITY_VOTING)
@@ -415,7 +415,7 @@ SUBSYSTEM_DEF(vote)
voted[usr.ckey] = list()
voted[usr.ckey][choices[vote]] = score
saved -= usr.ckey
return 0
return FALSE
/datum/controller/subsystem/vote/proc/initiate_vote(vote_type, initiator_key, display = display_votes, votesystem = PLURALITY_VOTING, forced = FALSE,vote_time = -1)//CIT CHANGE - adds display argument to votes to allow for obfuscated votes
vote_system = votesystem
@@ -424,7 +424,7 @@ SUBSYSTEM_DEF(vote)
var/next_allowed_time = (started_time + CONFIG_GET(number/vote_delay))
if(mode)
to_chat(usr, "<span class='warning'>There is already a vote in progress! please wait for it to finish.</span>")
return 0
return FALSE
var/admin = FALSE
var/ckey = ckey(initiator_key)
@@ -433,7 +433,7 @@ SUBSYSTEM_DEF(vote)
if(next_allowed_time > world.time && !admin)
to_chat(usr, "<span class='warning'>A vote was initiated recently, you must wait [DisplayTimeText(next_allowed_time-world.time)] before a new vote can be started!</span>")
return 0
return FALSE
SEND_SOUND(world, sound('sound/misc/notice2.ogg'))
reset()
@@ -464,7 +464,7 @@ SUBSYSTEM_DEF(vote)
if("custom")
question = stripped_input(usr,"What is the vote for?")
if(!question)
return 0
return FALSE
var/system_string = input(usr,"Which voting type?",GLOB.vote_type_names[1]) in GLOB.vote_type_names
vote_system = GLOB.vote_type_names[system_string]
for(var/i=1,i<=10,i++)
@@ -488,7 +488,7 @@ SUBSYSTEM_DEF(vote)
toggles ^= choices[chosen]
display_votes = toggles
else
return 0
return FALSE
mode = vote_type
initiator = initiator_key ? initiator_key : "the Server" // austation -- Crew autotransfer vote
started_time = world.time
@@ -521,8 +521,8 @@ SUBSYSTEM_DEF(vote)
popup.set_window_options("can_close=0")
popup.set_content(SSvote.interface(C))
popup.open(0)
return 1
return 0
return TRUE
return FALSE
/datum/controller/subsystem/vote/proc/interface(client/C)
if(!C)
@@ -736,7 +736,7 @@ SUBSYSTEM_DEF(vote)
Remove(owner)
/datum/action/vote/IsAvailable(silent = FALSE)
return 1
return TRUE
/datum/action/vote/proc/remove_from_client()
if(!owner)
+1 -1
View File
@@ -50,7 +50,7 @@
)
if(!Q.Execute(async = TRUE))
qdel(Q)
return 0
return FALSE
var/result = 0
if(Q.NextRow())
result = text2num(Q.item[1])
+10 -10
View File
@@ -151,7 +151,7 @@
/datum/action/ghost/Trigger()
if(!..())
return 0
return FALSE
var/mob/M = target
M.ghostize(can_reenter_corpse = TRUE, voluntary = TRUE)
@@ -389,7 +389,7 @@
if(istype(target, /obj/item/hierophant_club))
var/obj/item/hierophant_club/H = target
if(H.teleporting)
return 0
return FALSE
return ..()
/datum/action/item_action/clock
@@ -399,7 +399,7 @@
/datum/action/item_action/clock/IsAvailable(silent = FALSE)
if(!is_servant_of_ratvar(owner))
return 0
return FALSE
return ..()
/datum/action/item_action/clock/toggle_visor
@@ -408,11 +408,11 @@
/datum/action/item_action/clock/toggle_visor/IsAvailable(silent = FALSE)
if(!is_servant_of_ratvar(owner))
return 0
return FALSE
if(istype(target, /obj/item/clothing/glasses/judicial_visor))
var/obj/item/clothing/glasses/judicial_visor/V = target
if(V.recharging)
return 0
return FALSE
return ..()
/datum/action/item_action/clock/hierophant
@@ -486,7 +486,7 @@
/datum/action/item_action/jetpack_stabilization/IsAvailable(silent = FALSE)
var/obj/item/tank/jetpack/J = target
if(!istype(J) || !J.on)
return 0
return FALSE
return ..()
/datum/action/item_action/hands_free
@@ -518,7 +518,7 @@
else
owner.research_scanner--
to_chat(owner, "<span class='notice'>[target] research scanner has been [active ? "activated" : "deactivated"].</span>")
return 1
return TRUE
/datum/action/item_action/toggle_research_scanner/Remove(mob/M)
if(owner && active)
@@ -543,7 +543,7 @@
/datum/action/item_action/organ_action/IsAvailable(silent = FALSE)
var/obj/item/organ/I = target
if(!I.owner)
return 0
return FALSE
return ..()
/datum/action/item_action/organ_action/toggle/New(Target)
@@ -743,12 +743,12 @@
/datum/action/innate/Trigger()
if(!..())
return 0
return FALSE
if(!active)
Activate()
else
Deactivate()
return 1
return TRUE
/datum/action/innate/proc/Activate()
return
+2 -2
View File
@@ -328,9 +328,9 @@
/// For spawning mineral sheets at a specific location. Used by machines to output sheets.
/datum/component/material_container/proc/retrieve_sheets(sheet_amt, var/datum/material/M, target = null)
if(!M.sheet_type)
return 0 //Add greyscale sheet handling here later
return FALSE //Add greyscale sheet handling here later
if(sheet_amt <= 0)
return 0
return FALSE
if(!target)
target = get_turf(parent)
+2 -2
View File
@@ -268,7 +268,7 @@
else
if(the_event.timeout)
addtimer(CALLBACK(src, .proc/clear_event, null, category), the_event.timeout, TIMER_UNIQUE|TIMER_OVERRIDE)
return 0 //Don't have to update the event.
return FALSE //Don't have to update the event.
the_event = new type(src, param)//This causes a runtime for some reason, was this me? No - there's an event floating around missing a definition.
mood_events[category] = the_event
@@ -280,7 +280,7 @@
/datum/component/mood/proc/clear_event(datum/source, category)
var/datum/mood_event/event = mood_events[category]
if(!event)
return 0
return FALSE
mood_events -= category
qdel(event)
+2 -2
View File
@@ -43,9 +43,9 @@
/datum/component/spawner/proc/try_spawn_mob()
var/atom/P = parent
if(spawned_mobs.len >= max_mobs)
return 0
return FALSE
if(spawn_delay > world.time)
return 0
return FALSE
spawn_delay = world.time + spawn_time
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(P.loc)
+1 -1
View File
@@ -486,7 +486,7 @@
var/atom/A = parent
A.do_squish()
//This proc return 1 if the item can be picked up and 0 if it can't.
//This proc return TRUE if the item can be picked up and 0 if it can't.
//Set the stop_messages to stop it from printing messages
/datum/component/storage/proc/can_be_inserted(obj/item/I, stop_messages = FALSE, mob/M)
if(!istype(I) || (I.item_flags & ABSTRACT))
+3 -3
View File
@@ -49,11 +49,11 @@
/datum/component/summoning/proc/do_spawn_mob(atom/spawn_location, summoner)
if(spawned_mobs.len >= max_mobs)
return 0
return FALSE
if(last_spawned_time > world.time)
return 0
return FALSE
if(!prob(spawn_chance))
return 0
return FALSE
last_spawned_time = world.time + spawn_delay
var/chosen_mob_type = pick(mob_types)
var/mob/living/simple_animal/L = new chosen_mob_type(spawn_location)
+5 -5
View File
@@ -135,11 +135,11 @@
/datum/disease/advance/IsSame(datum/disease/advance/D)
if(!(istype(D, /datum/disease/advance)))
return 0
return FALSE
if(GetDiseaseID() != D.GetDiseaseID())
return 0
return 1
return FALSE
return TRUE
// Returns the advance disease with a different reference memory.
/datum/disease/advance/Copy()
@@ -178,8 +178,8 @@
/datum/disease/advance/proc/HasSymptom(datum/symptom/S)
for(var/datum/symptom/symp in symptoms)
if(symp.type == S.type)
return 1
return 0
return TRUE
return FALSE
// Will generate new unique symptoms, use this if there are none. Returns a list of symptoms that were generated.
/datum/disease/advance/proc/GenerateSymptoms(level_min, level_max, amount_get = 0)
@@ -64,11 +64,11 @@ Bonus
/datum/symptom/choking/proc/Choke_stage_3_4(mob/living/M, datum/disease/advance/A)
M.adjustOxyLoss(rand(6,13))
return 1
return TRUE
/datum/symptom/choking/proc/Choke(mob/living/M, datum/disease/advance/A)
M.adjustOxyLoss(rand(10,18))
return 1
return TRUE
/*
//////////////////////////////////////
@@ -136,17 +136,17 @@ Bonus
/datum/symptom/asphyxiation/proc/Asphyxiate_stage_3_4(mob/living/M, datum/disease/advance/A)
var/get_damage = rand(10,15) * power
M.adjustOxyLoss(get_damage)
return 1
return TRUE
/datum/symptom/asphyxiation/proc/Asphyxiate(mob/living/M, datum/disease/advance/A)
var/get_damage = rand(15,21) * power
M.adjustOxyLoss(get_damage)
if(paralysis)
M.reagents.add_reagent_list(list(/datum/reagent/toxin/pancuronium = 3, /datum/reagent/toxin/sodium_thiopental = 3))
return 1
return TRUE
/datum/symptom/asphyxiation/proc/Asphyxiate_death(mob/living/M, datum/disease/advance/A)
var/get_damage = rand(25,35) * power
M.adjustOxyLoss(get_damage)
M.adjustOrganLoss(ORGAN_SLOT_BRAIN, get_damage/2)
return 1
return TRUE
@@ -58,4 +58,4 @@ Bonus
M.adjust_bodytemperature(get_heat * A.stage, 0, BODYTEMP_HEAT_DAMAGE_LIMIT - 1)
else
M.adjust_bodytemperature(get_heat * A.stage)
return 1
return TRUE
@@ -71,14 +71,14 @@ Bonus
M.adjustFireLoss(3 * power)
if(infective)
A.spread(2)
return 1
return TRUE
/datum/symptom/fire/proc/Firestacks_stage_5(mob/living/M, datum/disease/advance/A)
M.adjust_fire_stacks(3 * power)
M.adjustFireLoss(5 * power)
if(infective)
A.spread(4)
return 1
return TRUE
/*
//////////////////////////////////////
@@ -157,7 +157,7 @@ Bonus
M.adjustFireLoss(get_stacks/2)
if(chems)
M.reagents.add_reagent(/datum/reagent/clf3, 2 * power)
return 1
return TRUE
/datum/symptom/alkali/proc/Alkali_fire_stage_5(mob/living/M, datum/disease/advance/A)
var/get_stacks = 8 * power
@@ -165,4 +165,4 @@ Bonus
M.adjustFireLoss(get_stacks)
if(chems)
M.reagents.add_reagent_list(list(/datum/reagent/napalm = 4 * power, /datum/reagent/clf3 = 4 * power))
return 1
return TRUE
@@ -65,7 +65,7 @@ Bonus
var/mob/living/carbon/human/H = M
var/obj/item/bodypart/random_part = pick(H.bodyparts)
random_part.generic_bleedstacks += 5 * power
return 1
return TRUE
/*
//////////////////////////////////////
@@ -133,4 +133,4 @@ Bonus
M.reagents.add_reagent_list(list(/datum/reagent/toxin/heparin = 2, /datum/reagent/toxin/lipolicide = 2))
if(zombie)
M.reagents.add_reagent(/datum/reagent/romerol, 1)
return 1
return TRUE
@@ -92,7 +92,7 @@
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
M.update_damage_overlays()
return 1
return TRUE
/datum/symptom/heal/starlight/passive_message_condition(mob/living/M)
if(M.getBruteLoss() || M.getFireLoss() || M.getToxLoss())
@@ -129,7 +129,7 @@
M.adjust_nutrition(0.3)
if(prob(2))
to_chat(M, "<span class='notice'>You feel a mild warmth as your blood purifies itself.</span>")
return 1
return TRUE
@@ -167,7 +167,7 @@
C.adjust_nutrition(-lost_nutrition * HUNGER_FACTOR) //Hunger depletes at 10x the normal speed
if(prob(2))
to_chat(C, "<span class='notice'>You feel an odd gurgle in your stomach, as if it was working much faster than normal.</span>")
return 1
return TRUE
/datum/symptom/heal/darkness
name = "Nocturnal Regeneration"
@@ -210,7 +210,7 @@
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len * 0.5)) //more effective on brute
M.update_damage_overlays()
return 1
return TRUE
/datum/symptom/heal/darkness/passive_message_condition(mob/living/M)
if(M.getBruteLoss() || M.getFireLoss())
@@ -307,7 +307,7 @@
if(active_coma && M.getBruteLoss() + M.getFireLoss() == 0)
uncoma(M)
return 1
return TRUE
/datum/symptom/heal/coma/passive_message_condition(mob/living/M)
if((M.getBruteLoss() + M.getFireLoss()) > 30)
@@ -365,7 +365,7 @@
if(L.heal_damage(heal_amt/parts.len * 0.5, heal_amt/parts.len))
M.update_damage_overlays()
return 1
return TRUE
/datum/symptom/heal/water/passive_message_condition(mob/living/M)
if(M.getBruteLoss() || M.getFireLoss())
@@ -435,7 +435,7 @@
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
M.update_damage_overlays()
return 1
return TRUE
/datum/symptom/heal/radiation
@@ -475,7 +475,7 @@
if(RAD_BURN_THRESHOLD to RAD_MOB_MUTATE)
return 0.75
if(RAD_MOB_MUTATE to RAD_MOB_KNOCKDOWN)
return 1
return TRUE
else
return 1.5
@@ -498,4 +498,4 @@
for(var/obj/item/bodypart/L in parts)
if(L.heal_damage(heal_amt/parts.len, heal_amt/parts.len))
M.update_damage_overlays()
return 1
return TRUE
@@ -58,4 +58,4 @@ Bonus
if(unsafe)
limit = 0
M.adjust_bodytemperature(-get_cold * A.stage, limit)
return 1
return TRUE
+4 -4
View File
@@ -538,7 +538,7 @@
/datum/dna/proc/check_block_string(mutation)
if((LAZYLEN(mutation_index) > DNA_MUTATION_BLOCKS) || !(mutation in mutation_index))
return 0
return FALSE
return is_gene_active(mutation)
/datum/dna/proc/is_gene_active(mutation)
@@ -585,7 +585,7 @@
/proc/setblock(istring, blocknumber, replacement, blocksize=DNA_BLOCK_SIZE)
if(!istring || !blocknumber || !replacement || !blocksize)
return 0
return FALSE
return getleftblocks(istring, blocknumber, blocksize) + replacement + getrightblocks(istring, blocknumber, blocksize)
/datum/dna/proc/mutation_in_sequence(mutation)
@@ -649,7 +649,7 @@
/proc/scramble_dna(mob/living/carbon/M, ui=FALSE, se=FALSE, probability)
if(!M.has_dna())
return 0
return FALSE
if(se)
for(var/i=1, i<=DNA_MUTATION_BLOCKS, i++)
if(prob(probability))
@@ -660,7 +660,7 @@
if(prob(probability))
M.dna.uni_identity = setblock(M.dna.uni_identity, i, random_string(DNA_BLOCK_SIZE, GLOB.hex_characters))
M.updateappearance(mutations_overlay_update=1)
return 1
return TRUE
//value in range 1 to values. values must be greater than 0
//all arguments assumed to be positive integers
+1 -1
View File
@@ -397,7 +397,7 @@ GLOBAL_LIST_EMPTY(explosions)
var/choice = input("Bomb Size?") in choices
switch(choice)
if(null)
return 0
return FALSE
if("Small Bomb")
dev = 1
heavy = 2
+3 -3
View File
@@ -6,11 +6,11 @@
/datum/martial_art/boxing/disarm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
to_chat(A, "<span class='warning'>Can't disarm while boxing!</span>")
return 1
return TRUE
/datum/martial_art/boxing/grab_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
to_chat(A, "<span class='warning'>Can't grab while boxing!</span>")
return 1
return TRUE
/datum/martial_art/boxing/harm_act(mob/living/carbon/human/A, mob/living/carbon/human/D)
@@ -46,7 +46,7 @@
log_combat(A, D, "knocked out (boxing) ")
else if(D.lying)
D.forcesay(GLOB.hit_appends)
return 1
return TRUE
/datum/martial_art/boxing/teach(mob/living/carbon/human/H, make_temporary = TRUE)
. = ..()
+2 -2
View File
@@ -119,8 +119,8 @@
owner.RemoveSpell(power)
qdel(power)
SEND_SIGNAL(owner, COMSIG_HUMAN_MUTATION_LOSS, src)
return 0
return 1
return FALSE
return TRUE
/datum/mutation/human/proc/say_mod(message)
if(message)
+3 -3
View File
@@ -48,7 +48,7 @@
if (aval_r_amnt>reagents_list[r_r])
. = -1
else
return 0
return FALSE
if ((reagents_list?(reagents_list.len):(0)) < avail_reagents.reagent_list.len)
return -1
return .
@@ -58,7 +58,7 @@
if (locate(/obj/) in container)
return -1
else
return 1
return TRUE
. = 1
var/list/checklist = items.Copy()
for (var/obj/O in container)
@@ -71,7 +71,7 @@
if (!found)
. = -1
if (checklist.len)
return 0
return FALSE
return .
//general version
+1 -1
View File
@@ -95,7 +95,7 @@
* Multiplied to clickdelays
*/
/datum/status_effect/proc/action_cooldown_mod()
return 1
return TRUE
////////////////
// ALERT HOOK //
+1 -1
View File
@@ -178,7 +178,7 @@
*/
/datum/weather/proc/end()
if(stage == END_STAGE)
return 1
return TRUE
stage = END_STAGE
STOP_PROCESSING(SSweather, src)
update_areas()
+4 -4
View File
@@ -560,9 +560,9 @@ GLOBAL_LIST_EMPTY(teleportlocs)
/area/proc/powered(chan) // return true if the area has power to given channel
if(!requires_power)
return 1
return TRUE
if(always_unpowered)
return 0
return FALSE
switch(chan)
if(EQUIP)
return power_equip
@@ -571,10 +571,10 @@ GLOBAL_LIST_EMPTY(teleportlocs)
if(ENVIRON)
return power_environ
return 0
return FALSE
/area/space/powered(chan) //Nope.avi
return 0
return FALSE
// called when power status changes
+5 -5
View File
@@ -26,18 +26,18 @@
/area/holodeck/powered(var/chan)
if(!requires_power)
return 1
return TRUE
if(always_unpowered)
return 0
return FALSE
if(!linked)
return 0
return FALSE
var/area/A = get_area(linked)
ASSERT(!istype(A, /area/holodeck))
return A.powered(chan)
/area/holodeck/usage(var/chan)
if(!linked)
return 0
return FALSE
var/area/A = get_area(linked)
ASSERT(!istype(A, /area/holodeck))
return A.usage(chan)
@@ -51,7 +51,7 @@
/area/holodeck/use_power(var/amount, var/chan)
if(!linked)
return 0
return FALSE
var/area/A = get_area(linked)
ASSERT(!istype(A, /area/holodeck))
return A.use_power(amount,chan)
+3 -3
View File
@@ -667,7 +667,7 @@
if((explosion_flags & EXPLOSION_FLAG_DENSITY_DEPENDENT) && !density)
return power // no block
else if((explosion_flags & EXPLOSION_FLAG_HARD_OBSTACLE) && !QDELETED(src))
return 0 // fully blocked
return FALSE // fully blocked
/**
* Called when a wave explosion hits this atom.
@@ -1411,7 +1411,7 @@
T = get_turf(src)
if(!T)
return 0
return FALSE
var/list/forced_gravity = list()
SEND_SIGNAL(src, COMSIG_ATOM_HAS_GRAVITY, T, forced_gravity)
@@ -1424,7 +1424,7 @@
return max_grav
if(isspaceturf(T)) // Turf never has gravity
return 0
return FALSE
var/area/A = get_area(T)
if(A.has_gravity) // Areas which always has gravity
+2 -2
View File
@@ -291,9 +291,9 @@
* Called whenever an object moves and by mobs when they attempt to move themselves through space
* And when an object or action applies a force on src, see [newtonian_move][/atom/movable/proc/newtonian_move]
*
* Return 0 to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
* return FALSE to have src start/keep drifting in a no-grav area and 1 to stop/not start drifting
*
* Mobs should return 1 if they should be able to move of their own volition, see [/client/proc/Move]
* Mobs should return TRUE if they should be able to move of their own volition, see [/client/proc/Move]
*
* Arguments:
* * movement_dir - 0 when stopping or any dir when trying to move
+1 -1
View File
@@ -150,7 +150,7 @@ GLOBAL_LIST_INIT(reverseradiochannels, list(
if(range)
start_point = get_turf(source)
if(!start_point)
return 0
return FALSE
//Send the data
for(var/current_filter in filter_list)
@@ -199,7 +199,7 @@
// Check Overdose: Am I even addicted to blood? Do I even have any in me?
//if (!target.reagents.addiction_list || !target.reagents.reagent_list)
//message_admins("DEBUG2: can_make_vassal() Abort: No reagents")
// return 0
// return FALSE
// Check Overdose: Did my current volume go over the Overdose threshold?
//var/am_addicted = 0
//for (var/datum/reagent/blood/vampblood/blood in target.reagents.addiction_list) // overdosed is tracked in reagent_list, not addiction_list.
@@ -210,7 +210,7 @@
//if (!am_addicted)
//message_admins("DEBUG4: can_make_vassal() Abort: No Blood")
// return 0
// return FALSE
// No Mind!
if(!target.mind || !target.mind.key)
if(display_warning)
+2 -2
View File
@@ -51,10 +51,10 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th
changelings += changeling
changeling.special_role = ROLE_CHANGELING
changeling.restricted_roles = restricted_jobs
return 1
return TRUE
else
setup_error = "Not enough changeling candidates"
return 0
return FALSE
/datum/game_mode/changeling/post_setup()
for(var/datum/mind/changeling in changelings)
@@ -20,11 +20,11 @@
/datum/game_mode/traitor/changeling/can_start()
if(!..())
return 0
return FALSE
possible_changelings = get_players_for_role(ROLE_CHANGELING)
if(possible_changelings.len < required_enemies)
return 0
return 1
return FALSE
return TRUE
/datum/game_mode/traitor/changeling/pre_setup()
if(CONFIG_GET(flag/protect_roles_from_antagonist))
@@ -55,7 +55,7 @@
changeling.restricted_roles = restricted_jobs
return ..()
else
return 0
return FALSE
/datum/game_mode/traitor/changeling/post_setup()
for(var/datum/mind/changeling in changelings)
+3 -3
View File
@@ -188,16 +188,16 @@ Credit where due:
equip_servant(L)
add_servant_of_ratvar(L, TRUE)
..()
return 1
return TRUE
/datum/game_mode/proc/greet_servant(mob/M) //Description of their role
if(!M)
return 0
return FALSE
to_chat(M, "<span class='bold large_brass'>You are a servant of Ratvar, the Clockwork Justiciar!</span>")
to_chat(M, "<span class='brass'>Unlock <b>Script</b> scripture by converting a new servant or when 35kw of power is reached.</span>")
to_chat(M, "<span class='brass'><b>Application</b> scripture will be unlocked when 50kw of power is reached.</span>")
M.playsound_local(get_turf(M), 'sound/ambience/antag/clockcultalr.ogg', 100, FALSE, pressure_affected = FALSE)
return 1
return TRUE
/datum/game_mode/proc/equip_servant(mob/living/M) //Grants a clockwork slab to the mob
if(!M || !ishuman(M))
+2 -2
View File
@@ -154,9 +154,9 @@
if(cult_mind.current.onCentCom() || cult_mind.current.onSyndieBase())
acolytes_survived++
if(acolytes_survived>=acolytes_needed)
return 0
return FALSE
else
return 1
return TRUE
/datum/game_mode/cult/generate_report()
@@ -41,8 +41,8 @@
outsellobjective.target = target_mind
outsellobjective.update_explanation_text()
D.objectives += outsellobjective
return 1
return 0
return TRUE
return FALSE
/datum/game_mode/devil/devil_agents/generate_report()
return "Multiple soul merchants have been spotted in the quadrant, and appear to be competing over who can purchase the most souls. Be advised that they are likely to manufacture \
+3 -3
View File
@@ -47,15 +47,15 @@
if(devils.len < required_enemies)
setup_error = "Not enough devil candidates"
return 0
return 1
return FALSE
return TRUE
/datum/game_mode/devil/post_setup()
for(var/datum/mind/devil in devils)
post_setup_finalize(devil)
..()
return 1
return TRUE
/datum/game_mode/devil/generate_report()
return "Infernal creatures have been seen nearby offering great boons in exchange for souls. This is considered theft against Nanotrasen, as all employment contracts contain a lien on the \
+1 -1
View File
@@ -546,7 +546,7 @@ GLOBAL_VAR_INIT(dynamic_forced_threat_level, -1)
return ruleset.cost + added_threat
else
stack_trace("The starting rule \"[ruleset.name]\" failed to pre_execute.")
return 0
return FALSE
/// Mainly here to facilitate delayed rulesets. All roundstart rulesets are executed with a timered callback to this proc.
/datum/game_mode/dynamic/proc/execute_roundstart_rule(sent_rule)
@@ -115,7 +115,7 @@
/// Returns how much threat to actually spend in the end.
/datum/dynamic_ruleset/proc/scale_up(population, max_scale)
if (!scaling_cost)
return 0
return FALSE
var/antag_fraction = 0
for(var/_ruleset in (mode.executed_rules + list(src))) // we care about the antags we *will* assign, too
+1 -1
View File
@@ -9,7 +9,7 @@
announce_text = "Just have fun and enjoy the game!"
/datum/game_mode/extended/pre_setup()
return 1
return TRUE
/datum/game_mode/extended/generate_report()
return "The transmission mostly failed to mention your sector. It is possible that there is nothing in the Syndicate that could threaten your station during this shift."
+25 -25
View File
@@ -68,22 +68,22 @@
playerC++
if(!GLOB.Debug2)
if(playerC < required_players || (maximum_players >= 0 && playerC > maximum_players))
return 0
return FALSE
antag_candidates = get_players_for_role(antag_flag)
if(!GLOB.Debug2)
if(antag_candidates.len < required_enemies)
return 0
return 1
return FALSE
return TRUE
else
message_admins("<span class='notice'>DEBUG: GAME STARTING WITHOUT PLAYER NUMBER CHECKS, THIS WILL PROBABLY BREAK SHIT.</span>")
return 1
return TRUE
///Attempts to select players for special roles the mode might have.
/datum/game_mode/proc/pre_setup()
return 1
return TRUE
///Everyone should now be on the station and have their normal gear. This is the place to give the special roles extra things
/datum/game_mode/proc/post_setup(report) //Gamemodes can override the intercept report. Passing TRUE as the argument will force a report.
@@ -162,10 +162,10 @@
switch(SSshuttle.emergency.mode) //Rounds on the verge of ending don't get new antags, they just run out
if(SHUTTLE_STRANDED, SHUTTLE_ESCAPE)
return 1
return TRUE
if(SHUTTLE_CALL)
if(SSshuttle.emergency.timeLeft(1) < initial(SSshuttle.emergencyCallTime)*0.5)
return 1
return TRUE
var/matc = CONFIG_GET(number/midround_antag_time_check)
if(world.time >= (matc * 600))
@@ -202,7 +202,7 @@
//somewhere between 1 and 3 minutes from now
if(!CONFIG_GET(keyed_list/midround_antag)[SSticker.mode.config_tag])
round_converted = 0
return 1
return TRUE
for(var/mob/living/carbon/human/H in antag_candidates)
if(H.client)
replacementmode.make_antag_chance(H)
@@ -213,7 +213,7 @@
///Called by the gameSSticker
/datum/game_mode/process()
return 0
return FALSE
//For things that do not die easily
/datum/game_mode/proc/are_special_antags_dead()
@@ -237,44 +237,44 @@
if(Player.mind)
if(Player.mind.special_role || LAZYLEN(Player.mind.antag_datums))
continuous_sanity_checked = 1
return 0
return FALSE
if(!continuous_sanity_checked)
message_admins("The roundtype ([config_tag]) has no antagonists, continuous round has been defaulted to on and midround_antag has been defaulted to off.")
continuous[config_tag] = TRUE
midround_antag[config_tag] = FALSE
SSshuttle.clearHostileEnvironment(src)
return 0
return FALSE
if(living_antag_player && living_antag_player.mind && isliving(living_antag_player) && living_antag_player.stat != DEAD && !isnewplayer(living_antag_player) &&!isbrain(living_antag_player) && (living_antag_player.mind.special_role || LAZYLEN(living_antag_player.mind.antag_datums)))
return 0 //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
return FALSE //A resource saver: once we find someone who has to die for all antags to be dead, we can just keep checking them, cycling over everyone only when we lose our mark.
for(var/mob/Player in GLOB.alive_mob_list)
if(Player.mind && Player.stat != DEAD && !isnewplayer(Player) &&!isbrain(Player) && Player.client)
if(Player.mind.special_role || LAZYLEN(Player.mind.antag_datums)) //Someone's still antaging!
living_antag_player = Player
return 0
return FALSE
if(!are_special_antags_dead())
return FALSE
if(!continuous[config_tag] || force_ending)
return 1
return TRUE
else
round_converted = convert_roundtype()
if(!round_converted)
if(round_ends_with_antag_death)
return 1
return TRUE
else
midround_antag[config_tag] = 0
return 0
return FALSE
return 0
return FALSE
/datum/game_mode/proc/check_win() //universal trigger to be called at mob death, nuke explosion, etc. To be called from everywhere.
return 0
return FALSE
/datum/game_mode/proc/send_intercept()
if(flipseclevel && !(config_tag == "extended"))//CIT CHANGE - lets the security level be flipped roundstart
@@ -533,21 +533,21 @@
//If the configuration option is set to require players to be logged as old enough to play certain jobs, then this proc checks that they are, otherwise it just returns 1
/datum/game_mode/proc/age_check(client/C)
if(get_remaining_days(C) == 0)
return 1 //Available in 0 days = available right now = player is old enough to play.
return 0
return TRUE //Available in 0 days = available right now = player is old enough to play.
return FALSE
/datum/game_mode/proc/get_remaining_days(client/C)
if(!C)
return 0
return FALSE
if(C.prefs?.db_flags & DB_FLAG_EXEMPT)
return 0
return FALSE
if(!CONFIG_GET(flag/use_age_restriction_for_jobs))
return 0
return FALSE
if(!isnum(C.player_age))
return 0 //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
return FALSE //This is only a number if the db connection is established, otherwise it is text: "Requires database", meaning these restrictions cannot be enforced
if(!isnum(enemy_minimum_age))
return 0
return FALSE
return max(0, enemy_minimum_age - C.player_age)
+2 -2
View File
@@ -639,11 +639,11 @@ GLOBAL_LIST_EMPTY(possible_items)
if(istype(I, steal_target))
if(!targetinfo) //If there's no targetinfo, then that means it was a custom objective. At this point, we know you have the item, so return 1.
return TRUE
else if(targetinfo.check_special_completion(I))//Returns 1 by default. Items with special checks will return 1 if the conditions are fulfilled.
else if(targetinfo.check_special_completion(I))//Returns 1 by default. Items with special checks will return TRUE if the conditions are fulfilled.
return TRUE
if(targetinfo && (I.type in targetinfo.altitems)) //Ok, so you don't have the item. Do you have an alternative, at least?
if(targetinfo.check_special_completion(I))//Yeah, we do! Don't return 0 if we don't though - then you could fail if you had 1 item that didn't pass and got checked first!
if(targetinfo.check_special_completion(I))//Yeah, we do! Don't return FALSE if we don't though - then you could fail if you had 1 item that didn't pass and got checked first!
return TRUE
return FALSE
+5 -5
View File
@@ -9,7 +9,7 @@
var/list/special_equipment = list()
/datum/objective_item/proc/check_special_completion() //for objectives with special checks (is that slime extract unused? does that intellicard have an ai in it? etcetc)
return 1
return TRUE
/datum/objective_item/proc/TargetExists()
return TRUE
@@ -142,8 +142,8 @@
/datum/objective_item/steal/functionalai/check_special_completion(obj/item/aicard/C)
for(var/mob/living/silicon/ai/A in C)
if(isAI(A) && A.stat != DEAD) //See if any AI's are alive inside that card.
return 1
return 0
return TRUE
return FALSE
/datum/objective_item/steal/blueprints
name = "the station blueprints."
@@ -169,8 +169,8 @@
/datum/objective_item/steal/slime/check_special_completion(obj/item/slime_extract/E)
if(E.Uses > 0)
return 1
return 0
return TRUE
return FALSE
//Unique Objectives
/datum/objective_item/unique/docs_red
+1 -1
View File
@@ -23,7 +23,7 @@
START_PROCESSING(SSprocessing, src)
/datum/sabotage_objective/processing/proc/check_condition_processing()
return 1
return TRUE
/datum/sabotage_objective/processing/process()
check_condition_processing()
+1 -1
View File
@@ -34,7 +34,7 @@
return get_points() ? TRUE : FALSE
/datum/objective/overthrow/proc/get_points()
return 0 // int, not bool
return FALSE // int, not bool
/datum/objective/overthrow/proc/result_points(datum/mind/the_dude, base_points) // App
var/initial_points = base_points
+1 -1
View File
@@ -11,7 +11,7 @@
/datum/game_mode/sandbox/pre_setup()
for(var/mob/M in GLOB.player_list)
M.CanBuild()
return 1
return TRUE
/datum/game_mode/sandbox/post_setup()
..()
+2 -2
View File
@@ -509,8 +509,8 @@ Class Procs:
I.play_tool_sound(src, 50)
setDir(turn(dir,-90))
to_chat(user, "<span class='notice'>You rotate [src].</span>")
return 1
return 0
return TRUE
return FALSE
/obj/proc/can_be_unfasten_wrench(mob/user, silent) //if we can unwrench this object; returns SUCCESSFUL_UNFASTEN and FAILED_UNFASTEN, which are both TRUE, or CANT_UNFASTEN, which isn't.
if(!(isfloorturf(loc) || istype(loc, /turf/open/indestructible)) && !anchored)
+2 -2
View File
@@ -274,7 +274,7 @@
/obj/machinery/camera/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < 12 && !(stat & BROKEN))
return 0
return FALSE
. = ..()
/obj/machinery/camera/obj_break(damage_flag)
@@ -417,4 +417,4 @@
else
user.sight = 0
user.see_in_dark = 2
return 1
return TRUE
@@ -179,7 +179,7 @@
user.see_invisible = SEE_INVISIBLE_LIVING //can't see ghosts through cameras
user.sight = SEE_TURFS | SEE_BLACKNESS
user.see_in_dark = 2
return 1
return TRUE
/mob/camera/aiEye/remote/Destroy()
if(origin && eye_user)
+5 -5
View File
@@ -505,10 +505,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
updateUsrDialog()
return 0
return FALSE
if(can_open_job(j) != 1)
updateUsrDialog()
return 0
return FALSE
if(opened_positions[edit_job_target] >= 0)
GLOB.time_last_changed_position = world.time / 10
j.total_positions++
@@ -522,10 +522,10 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/j = SSjob.GetJob(edit_job_target)
if(!j)
updateUsrDialog()
return 0
return FALSE
if(can_close_job(j) != 1)
updateUsrDialog()
return 0
return FALSE
//Allow instant closing without cooldown if a position has been opened before
if(opened_positions[edit_job_target] <= 0)
GLOB.time_last_changed_position = world.time / 10
@@ -540,7 +540,7 @@ GLOBAL_VAR_INIT(time_last_changed_position, 0)
var/datum/job/j = SSjob.GetJob(priority_target)
if(!j)
updateUsrDialog()
return 0
return FALSE
var/priority = TRUE
if(j in SSjob.prioritized_jobs)
SSjob.prioritized_jobs -= j
+6 -6
View File
@@ -27,8 +27,8 @@
/obj/machinery/computer/upload/proc/can_upload_to(mob/living/silicon/S)
if(S.stat == DEAD)
return 0
return 1
return FALSE
return TRUE
/obj/machinery/computer/upload/ai
name = "\improper AI upload console"
@@ -45,9 +45,9 @@
/obj/machinery/computer/upload/ai/can_upload_to(mob/living/silicon/ai/A)
if(!A || !isAI(A))
return 0
return FALSE
if(A.control_disabled)
return 0
return FALSE
return ..()
@@ -66,7 +66,7 @@
/obj/machinery/computer/upload/borg/can_upload_to(mob/living/silicon/robot/B)
if(!B || !iscyborg(B))
return 0
return FALSE
if(B.scrambledcodes || B.emagged)
return 0
return FALSE
return ..()
+2 -2
View File
@@ -571,8 +571,8 @@
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
if(!record1 || record1 == active1)
if(!record2 || record2 == active2)
return 1
return 0
return TRUE
return FALSE
/obj/machinery/computer/med_data/laptop
name = "medical laptop"
+3 -3
View File
@@ -805,9 +805,9 @@ What a mess.*/
if(authenticated)
if(user.canUseTopic(src, !hasSiliconAccessInArea(user)))
if(!trim(message1))
return 0
return FALSE
if(!record1 || record1 == active1)
if(!record2 || record2 == active2)
return 1
return 0
return TRUE
return FALSE
+15 -15
View File
@@ -255,7 +255,7 @@
qdel(src)
/obj/machinery/door/airlock/plasma/BlockThermalConductivity() //we don't stop the heat~
return 0
return FALSE
/obj/machinery/door/airlock/plasma/attackby(obj/item/C, mob/user, params)
if(C.get_temperature() > 300)//If the temperature of the object is over 300, then ignite
@@ -507,11 +507,11 @@
/obj/machinery/door/airlock/cult/allowed(mob/living/L)
if(!density)
return 1
return TRUE
if(friendly || iscultist(L) || isshade(L) || isconstruct(L))
if(!stealthy)
new openingoverlaytype(loc)
return 1
return TRUE
else
if(!stealthy)
new /obj/effect/temp_visual/cult/sac(loc)
@@ -521,7 +521,7 @@
flash_color(L, flash_color="#960000", flash_time=20)
L.DefaultCombatKnockdown(40)
L.throw_at(throwtarget, 5, 1)
return 0
return FALSE
/obj/machinery/door/airlock/cult/proc/conceal()
icon = 'icons/obj/doors/airlocks/station/maintenance.dmi'
@@ -619,7 +619,7 @@
return (is_servant_of_ratvar(user) && !isAllPowerCut())
/obj/machinery/door/airlock/clockwork/ratvar_act()
return 0
return FALSE
/obj/machinery/door/airlock/clockwork/narsie_act()
..()
@@ -635,8 +635,8 @@
/obj/machinery/door/airlock/clockwork/allowed(mob/M)
if(is_servant_of_ratvar(M))
return 1
return 0
return TRUE
return FALSE
/obj/machinery/door/airlock/clockwork/hasPower()
return TRUE //yes we do have power
@@ -657,36 +657,36 @@
/obj/machinery/door/airlock/clockwork/proc/attempt_construction(obj/item/I, mob/living/user)
if(!I || !user || !user.canUseTopic(src))
return 0
return FALSE
else if(I.tool_behaviour == TOOL_WRENCH)
if(construction_state == GEAR_SECURE)
user.visible_message("<span class='notice'>[user] begins loosening [src]'s cogwheel...</span>", "<span class='notice'>You begin loosening [src]'s cogwheel...</span>")
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_SECURE)
return 1
return TRUE
user.visible_message("<span class='notice'>[user] loosens [src]'s cogwheel!</span>", "<span class='notice'>[src]'s cogwheel pops off and dangles loosely.</span>")
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
construction_state = GEAR_LOOSE
else if(construction_state == GEAR_LOOSE)
user.visible_message("<span class='notice'>[user] begins tightening [src]'s cogwheel...</span>", "<span class='notice'>You begin tightening [src]'s cogwheel into place...</span>")
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_LOOSE)
return 1
return TRUE
user.visible_message("<span class='notice'>[user] tightens [src]'s cogwheel!</span>", "<span class='notice'>You firmly tighten [src]'s cogwheel into place.</span>")
playsound(src, 'sound/items/deconstruct.ogg', 50, 1)
construction_state = GEAR_SECURE
return 1
return TRUE
else if(I.tool_behaviour == TOOL_CROWBAR)
if(construction_state == GEAR_SECURE)
to_chat(user, "<span class='warning'>[src]'s cogwheel is too tightly secured! Your [I.name] can't reach under it!</span>")
return 1
return TRUE
else if(construction_state == GEAR_LOOSE)
user.visible_message("<span class='notice'>[user] begins slowly lifting off [src]'s cogwheel...</span>", "<span class='notice'>You slowly begin lifting off [src]'s cogwheel...</span>")
if(!I.use_tool(src, user, 75, volume=50) || construction_state != GEAR_LOOSE)
return 1
return TRUE
user.visible_message("<span class='notice'>[user] lifts off [src]'s cogwheel, causing it to fall apart!</span>", \
"<span class='notice'>You lift off [src]'s cogwheel, causing it to fall apart!</span>")
deconstruct(TRUE)
return 1
return 0
return TRUE
return FALSE
/obj/machinery/door/airlock/clockwork/brass
glass = TRUE
+5 -5
View File
@@ -81,7 +81,7 @@
// linked door is open/closed (by density) then opens it/closes it.
/obj/machinery/door_timer/proc/timer_start()
if(stat & (NOPOWER|BROKEN))
return 0
return FALSE
activation_time = REALTIMEOFDAY
timing = TRUE
@@ -98,12 +98,12 @@
continue
C.locked = TRUE
C.update_icon()
return 1
return TRUE
/obj/machinery/door_timer/proc/timer_end(forced = FALSE)
if(stat & (NOPOWER|BROKEN))
return 0
return FALSE
if(!forced)
Radio.set_frequency(FREQ_SECURITY)
@@ -127,7 +127,7 @@
C.locked = FALSE
C.update_icon()
return 1
return TRUE
/obj/machinery/door_timer/proc/time_left(seconds = FALSE)
@@ -137,7 +137,7 @@
/obj/machinery/door_timer/proc/set_timer(value)
var/new_time = clamp(value,0,MAX_TIMER)
. = new_time == timer_duration //return 1 on no change
. = new_time == timer_duration //return TRUE on no change
timer_duration = new_time
/obj/machinery/door_timer/ui_interact(mob/user, datum/tgui/ui)
@@ -1,16 +1,16 @@
/obj/machinery/door/proc/checkForMultipleDoors()
if(!src.loc)
return 0
return FALSE
for(var/obj/machinery/door/D in src.loc)
if(!istype(D, /obj/machinery/door/window) && D.density && D != src)
return 0
return 1
return FALSE
return TRUE
/turf/closed/wall/proc/checkForMultipleDoors()
if(!src.loc)
return 0
return FALSE
for(var/obj/machinery/door/D in locate(src.x,src.y,src.z))
if(!istype(D, /obj/machinery/door/window) && D.density)
return 0
return FALSE
//There are no false wall checks because that would be fucking
return 1
return TRUE
+9 -9
View File
@@ -222,13 +222,13 @@
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
if(user.a_intent != INTENT_HARM && (I.tool_behaviour == TOOL_CROWBAR || istype(I, /obj/item/fireaxe)))
try_to_crowbar(I, user)
return 1
return TRUE
else if(I.tool_behaviour == TOOL_WELDER)
try_to_weld(I, user)
return 1
return TRUE
else if(!(I.item_flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
try_to_activate_door(user)
return 1
return TRUE
return ..()
/obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir)
@@ -284,7 +284,7 @@
/obj/machinery/door/proc/open()
if(!density)
return 1
return TRUE
if(operating)
return
operating = TRUE
@@ -302,7 +302,7 @@
if(autoclose)
spawn(autoclose)
close()
return 1
return TRUE
/obj/machinery/door/proc/close()
if(density)
@@ -335,7 +335,7 @@
CheckForMobs()
else if(!(flags_1 & ON_BORDER_1))
crush()
return 1
return TRUE
/obj/machinery/door/proc/CheckForMobs()
if(locate(/mob/living) in get_turf(src))
@@ -380,7 +380,7 @@
addtimer(CALLBACK(src, .proc/autoclose), wait, TIMER_UNIQUE | TIMER_NO_HASH_WAIT | TIMER_OVERRIDE)
/obj/machinery/door/proc/requiresID()
return 1
return TRUE
/obj/machinery/door/proc/hasPower()
return !(stat & NOPOWER)
@@ -391,8 +391,8 @@
/obj/machinery/door/BlockThermalConductivity() // All non-glass airlocks block heat, this is intended.
if(opacity || heat_proof)
return 1
return 0
return TRUE
return FALSE
/obj/machinery/door/morgue
icon = 'icons/obj/doors/doormorgue.dmi'
+1 -1
View File
@@ -393,7 +393,7 @@
for(var/T2 in T.atmos_adjacent_turfs)
turfs[T2] = 1
if(turfs.len <= 10)
return 0 // not big enough to matter
return FALSE // not big enough to matter
return start_point.air.return_pressure() < 20 ? -1 : 1
/obj/machinery/door/firedoor/border_only/CanAllowThrough(atom/movable/mover, turf/target)
+1 -1
View File
@@ -73,4 +73,4 @@
return
/obj/machinery/door/password/wave_ex_act(power, datum/wave_explosion/explosion, dir)
return 0 //no.
return FALSE //no.
+1 -1
View File
@@ -64,7 +64,7 @@
/obj/machinery/door/poddoor/Bumped(atom/movable/AM)
if(density)
return 0
return FALSE
else
return ..()
+9 -9
View File
@@ -129,7 +129,7 @@
if(get_dir(loc, T) == dir)
return !density
else
return 1
return TRUE
//used in the AStar algorithm to determinate if the turf the door is on is passable
/obj/machinery/door/window/CanAStarPass(obj/item/card/id/ID, to_dir)
@@ -144,13 +144,13 @@
/obj/machinery/door/window/open(forced=0)
if (src.operating == 1) //doors can still open when emag-disabled
return 0
return FALSE
if(!forced)
if(!hasPower())
return 0
return FALSE
if(forced < 2)
if(obj_flags & EMAGGED)
return 0
return FALSE
if(!src.operating) //in case of emag
operating = TRUE
do_animate("opening")
@@ -171,13 +171,13 @@
/obj/machinery/door/window/close(forced=0)
if (src.operating)
return 0
return FALSE
if(!forced)
if(!hasPower())
return 0
return FALSE
if(forced < 2)
if(obj_flags & EMAGGED)
return 0
return FALSE
operating = TRUE
do_animate("closing")
playsound(src.loc, 'sound/machines/windowdoor.ogg', 100, 1)
@@ -423,8 +423,8 @@
/obj/machinery/door/window/clockwork/allowed(mob/M)
if(is_servant_of_ratvar(M))
return 1
return 0
return TRUE
return FALSE
/obj/machinery/door/window/northleft
dir = NORTH
@@ -164,7 +164,7 @@
set waitfor = FALSE
if(A.density)
goIdle()
return 0
return FALSE
update_icon()
A.unbolt()
. = 1
@@ -190,7 +190,7 @@
memory["processing"] = state != target_state
//sensor_pressure = null //not sure if we can comment this out. Uncomment in case of problems -rastaf0
return 1
return TRUE
/obj/machinery/embedded_controller/radio/airlock_controller
@@ -19,7 +19,7 @@
return null
/datum/computer/file/embedded_program/process()
return 0
return FALSE
/obj/machinery/embedded_controller
var/datum/computer/file/embedded_program/program
@@ -44,7 +44,7 @@
/obj/machinery/embedded_controller/proc/return_text()
/obj/machinery/embedded_controller/proc/post_signal(datum/signal/signal, comm_line)
return 0
return FALSE
/obj/machinery/embedded_controller/receive_signal(datum/signal/signal)
if(istype(signal) && program)
@@ -52,7 +52,7 @@
/obj/machinery/embedded_controller/Topic(href, href_list)
if(..())
return 0
return FALSE
if(program)
program.receive_user_command(href_list["command"])
@@ -28,7 +28,7 @@
)))
/datum/computer/file/embedded_program/simple_vent_controller/process()
return 0
return FALSE
/obj/machinery/embedded_controller/radio/simple_vent_controller
+2 -2
View File
@@ -94,7 +94,7 @@
/obj/machinery/flasher/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir)
if(damage_flag == MELEE && damage_amount < 10) //any melee attack below 10 dmg does nothing
return 0
return FALSE
. = ..()
/obj/machinery/flasher/proc/flash()
@@ -126,7 +126,7 @@
if(flashed)
bulb.times_used++
return 1
return TRUE
/obj/machinery/flasher/emp_act(severity)
+2 -2
View File
@@ -38,7 +38,7 @@
var/turf/location = src.loc
if (isturf(location))
location.hotspot_expose(700,10,1)
return 1
return TRUE
/obj/machinery/igniter/Initialize(mapload)
. = ..()
@@ -127,7 +127,7 @@
var/turf/location = src.loc
if (isturf(location))
location.hotspot_expose(1000,100,1)
return 1
return TRUE
/obj/machinery/sparker/emp_act(severity)
. = ..()
+4 -4
View File
@@ -33,11 +33,11 @@
/obj/machinery/pipedispenser/Topic(href, href_list)
if(..())
return 1
return TRUE
var/mob/living/L = usr
if(!anchored || !istype(L) || !CHECK_MOBILITY(L, MOBILITY_USE))
usr << browse(null, "window=pipedispenser")
return 1
return TRUE
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["makepipe"])
@@ -130,7 +130,7 @@
/obj/machinery/pipedispenser/disposal/Topic(href, href_list)
if(..())
return 1
return TRUE
usr.set_machine(src)
add_fingerprint(usr)
if(href_list["dmake"])
@@ -181,7 +181,7 @@
/obj/machinery/pipedispenser/disposal/transit_tube/Topic(href, href_list)
if(..())
return 1
return TRUE
usr.set_machine(src)
add_fingerprint(usr)
if(wait < world.time)
@@ -513,7 +513,7 @@ DEFINE_BITFIELD(turret_flags, list(
var/atom/movable/M = pick(targets)
targets -= M
if(target(M))
return 1
return TRUE
/obj/machinery/porta_turret/proc/popUp() //pops the turret up
set waitfor = FALSE
@@ -566,8 +566,8 @@ DEFINE_BITFIELD(turret_flags, list(
if(turret_flags & TURRET_FLAG_AUTH_WEAPONS) //check for weapon authorization
if(isnull(perp.wear_id) || istype(perp.wear_id.GetID(), /obj/item/card/id/syndicate))
if(allowed(perp)) //if the perp has security access, return 0
return 0
if(allowed(perp)) //if the perp has security access, return FALSE
return FALSE
if(perp.is_holding_item_of_type(/obj/item/gun) || perp.is_holding_item_of_type(/obj/item/melee/baton))
threatcount += 4
@@ -585,7 +585,7 @@ DEFINE_BITFIELD(turret_flags, list(
// If we aren't shooting heads then return a threatcount of 0
if (!(turret_flags & TURRET_FLAG_SHOOT_HEADS) && (perp.get_assignment() in GLOB.command_positions))
return 0
return FALSE
return threatcount
@@ -600,7 +600,7 @@ DEFINE_BITFIELD(turret_flags, list(
popUp() //pop the turret up if it's not already up.
setDir(get_dir(base, target))//even if you can't shoot, follow the target
INVOKE_ASYNC(src, .proc/shootAt, target)
return 1
return TRUE
return
/obj/machinery/porta_turret/proc/shootAt(atom/movable/target, stagger_enabled = FALSE)
@@ -840,7 +840,7 @@ DEFINE_BITFIELD(turret_flags, list(
faction = list("neutral","silicon","turret") //Minebots, medibots, etc that should not be shot.
/obj/machinery/porta_turret/aux_base/assess_perp(mob/living/carbon/human/perp)
return 0 //Never shoot humanoids. You are on your own if Ashwalkers or the like attack!
return FALSE //Never shoot humanoids. You are on your own if Ashwalkers or the like attack!
/obj/machinery/porta_turret/aux_base/setup()
return
@@ -874,7 +874,7 @@ DEFINE_BITFIELD(turret_flags, list(
AddElement(/datum/element/empprotection, EMP_PROTECT_SELF | EMP_PROTECT_WIRES)
/obj/machinery/porta_turret/centcom_shuttle/assess_perp(mob/living/carbon/human/perp)
return 0
return FALSE
/obj/machinery/porta_turret/centcom_shuttle/setup()
return
+5 -5
View File
@@ -80,27 +80,27 @@
if(allowed)
if(anchored)
if(charging || panel_open)
return 1
return TRUE
//Checks to make sure he's not in space doing it, and that the area got proper power.
var/area/a = get_area(src)
if(!a || !a.powered(EQUIP))
to_chat(user, "<span class='notice'>[src] blinks red as you try to insert [G].</span>")
return 1
return TRUE
if (istype(G, /obj/item/gun/energy))
var/obj/item/gun/energy/E = G
if(!E.can_charge)
to_chat(user, "<span class='notice'>Your gun has no external power connector.</span>")
return 1
return TRUE
if(!user.transferItemToLoc(G, src))
return 1
return TRUE
setCharging(G)
else
to_chat(user, "<span class='notice'>[src] isn't connected to anything!</span>")
return 1
return TRUE
if(anchored && !charging)
if(default_deconstruction_screwdriver(user, "recharger", "recharger", G))
+1 -1
View File
@@ -63,7 +63,7 @@
if(occupant)
process_occupant()
return 1
return TRUE
/obj/machinery/recharge_station/relaymove(mob/user)
if(user.stat)
+1 -1
View File
@@ -372,7 +372,7 @@
s.set_up(5, 1, src)
s.start()
if(electrocute_mob(user, src, src, 1, TRUE))
return 1
return TRUE
/obj/machinery/suit_storage_unit/relaymove(mob/user)
if(locked)
+2 -2
View File
@@ -20,10 +20,10 @@
if(buckled_mobs.len > 1)
var/unbuckled = input(user, "Who do you wish to unbuckle?","Unbuckle Who?") as null|mob in buckled_mobs
if(user_unbuckle_mob(unbuckled,user))
return 1
return TRUE
else
if(user_unbuckle_mob(buckled_mobs[1],user))
return 1
return TRUE
/atom/movable/attackby(obj/item/attacking_item, mob/user, params)
if(!can_buckle || !istype(attacking_item, /obj/item/riding_offhand) || !user.Adjacent(src))
+2 -2
View File
@@ -36,7 +36,7 @@
. = 1
if(!target)
qdel(src)
return 0
return FALSE
if(prob(5))
playsound(loc, 'sound/items/welder.ogg', 100, 1)
@@ -51,7 +51,7 @@
acid_level = max(acid_level - (5 + 2*round(sqrt(acid_level))), 0)
if(acid_level <= 0)
qdel(src)
return 0
return FALSE
/obj/effect/acid/Crossed(AM as mob|obj)
. = ..()
@@ -169,14 +169,14 @@
/obj/effect/particle_effect/foam/proc/foam_mob(mob/living/L)
if(lifetime<1)
return 0
return FALSE
if(!istype(L))
return 0
return FALSE
var/fraction = 1/initial(reagent_divisor)
if(lifetime % reagent_divisor)
reagents.reaction(L, VAPOR, fraction)
lifetime--
return 1
return TRUE
/obj/effect/particle_effect/foam/proc/spread_foam()
var/turf/t_loc = get_turf(src)

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