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