Skip to content

Commit

Permalink
Start checking for padding inside parentheses (shiptest-ss13#1211)
Browse files Browse the repository at this point in the history
* Start checking for padding inside parentheses

* Fix some issues

* Set post-refactor limit

* Refactor padding in `()`s

* Update

* Fix some new paddings
  • Loading branch information
martinlyra authored Aug 11, 2022
1 parent 3556c4d commit a9501d3
Show file tree
Hide file tree
Showing 206 changed files with 496 additions and 494 deletions.
1 change: 1 addition & 0 deletions check_regex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ standards:
- exactly: [0, "incorrect indentations", '^(?: +)(?!\*)']
- exactly: [0, "superflous whitespace", '[ \t]+$']
- exactly: [12, "mixed indentation", '^( +\t+|\t+ +)']
- exactly: [21, 'padding inside parentheses', '\(([\t ]+([^)"\n\\]*)|([^("\n]+)[\t ]+)\)']

- no_more:
[
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/MC.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MC_TICK_CHECK ( ( TICK_USAGE > Master.current_ticklimit || src.state != SS_RUNNING ) ? pause() : 0 )
#define MC_TICK_CHECK ((TICK_USAGE > Master.current_ticklimit || src.state != SS_RUNNING) ? pause() : 0)

#define MC_TICK_REMAINING_MS ((Master.current_ticklimit - TICK_USAGE) * world.tick_lag)

Expand Down
8 changes: 4 additions & 4 deletions code/__DEFINES/_tick.dm
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#define TICK_USAGE_REAL world.tick_usage

/// Returns true if tick_usage is above the limit
#define TICK_CHECK ( TICK_USAGE > Master.current_ticklimit )
#define TICK_CHECK (TICK_USAGE > Master.current_ticklimit)
/// runs stoplag if tick_usage is above the limit
#define CHECK_TICK ( TICK_CHECK ? stoplag() : 0 )
#define CHECK_TICK (TICK_CHECK ? stoplag() : 0)

/// Returns true if tick usage is above 95, for high priority usage
#define TICK_CHECK_HIGH_PRIORITY ( TICK_USAGE > 95 )
#define TICK_CHECK_HIGH_PRIORITY (TICK_USAGE > 95)
/// runs stoplag if tick_usage is above 95, for high priority usage
#define CHECK_TICK_HIGH_PRIORITY ( TICK_CHECK_HIGH_PRIORITY? stoplag() : 0 )
#define CHECK_TICK_HIGH_PRIORITY (TICK_CHECK_HIGH_PRIORITY? stoplag() : 0)
4 changes: 2 additions & 2 deletions code/__DEFINES/atmospherics.dm
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,8 @@
/// just check density
#define ATMOS_PASS_DENSITY -2

#define CANATMOSPASS(A, O) ( A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : ( A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass ) )
#define CANVERTICALATMOSPASS(A, O) ( A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : ( A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical ) )
#define CANATMOSPASS(A, O) (A.CanAtmosPass == ATMOS_PASS_PROC ? A.CanAtmosPass(O) : (A.CanAtmosPass == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPass))
#define CANVERTICALATMOSPASS(A, O) (A.CanAtmosPassVertical == ATMOS_PASS_PROC ? A.CanAtmosPass(O, TRUE) : (A.CanAtmosPassVertical == ATMOS_PASS_DENSITY ? !A.density : A.CanAtmosPassVertical))

//OPEN TURF ATMOS
/// the default air mix that open turfs spawn
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/dcs/helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
/// The datum hosting the signal is automaticaly added as the first argument
/// Returns a bitfield gathered from all registered procs
/// Arguments given here are packaged in a list and given to _SendSignal
#define SEND_SIGNAL(target, sigtype, arguments...) ( !target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)) )
#define SEND_SIGNAL(target, sigtype, arguments...) (!target.comp_lookup || !target.comp_lookup[sigtype] ? NONE : target._SendSignal(sigtype, list(target, ##arguments)))

#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) ( SEND_SIGNAL(SSdcs, sigtype, ##arguments) )
#define SEND_GLOBAL_SIGNAL(sigtype, arguments...) (SEND_SIGNAL(SSdcs, sigtype, ##arguments))

/// Signifies that this proc is used to handle signals.
/// Every proc you pass to RegisterSignal must have this.
Expand Down
30 changes: 15 additions & 15 deletions code/__DEFINES/maths.dm
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,20 @@
//time of day but automatically adjusts to the server going into the next day within the same round.
//for when you need a reliable time number that doesn't depend on byond time.
#define REALTIMEOFDAY (world.timeofday + (MIDNIGHT_ROLLOVER * MIDNIGHT_ROLLOVER_CHECK))
#define MIDNIGHT_ROLLOVER_CHECK ( GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers )
#define MIDNIGHT_ROLLOVER_CHECK (GLOB.rollovercheck_last_timeofday != world.timeofday ? update_midnight_rollover() : GLOB.midnight_rollovers)

#define SIGN(x) ( (x)!=0 ? (x) / abs(x) : 0 )
#define SIGN(x) ((x)!=0 ? (x) / abs(x) : 0)

#define CEILING(x, y) ( -round(-(x) / (y)) * (y) )
#define CEILING(x, y) (-round(-(x) / (y)) * (y))

// round() acts like floor(x, 1) by default but can't handle other values
#define FLOOR(x, y) ( round((x) / (y)) * (y) )
#define FLOOR(x, y) (round((x) / (y)) * (y))

// Similar to clamp but the bottom rolls around to the top and vice versa. min is inclusive, max is exclusive
#define WRAP(val, min, max) clamp(( min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min))) ),min,max)
#define WRAP(val, min, max) clamp((min == max ? min : (val) - (round(((val) - (min))/((max) - (min))) * ((max) - (min)))),min,max)

// Real modulus that handles decimals
#define MODULUS(x, y) ( (x) - (y) * round((x) / (y)) )
#define MODULUS(x, y) ((x) - (y) * round((x) / (y)))

// Cotangent
#define COT(x) (1 / tan(x))
Expand All @@ -47,7 +47,7 @@
// Cosecant
#define CSC(x) (1 / sin(x))

#define ATAN2(x, y) ( !(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))) )
#define ATAN2(x, y) (!(x) && !(y) ? 0 : (y) >= 0 ? arccos((x) / sqrt((x)*(x) + (y)*(y))) : -arccos((x) / sqrt((x)*(x) + (y)*(y))))

// Greatest Common Divisor - Euclid's algorithm
/proc/Gcd(a, b)
Expand All @@ -56,10 +56,10 @@
// Least Common Multiple
#define Lcm(a, b) (abs(a) / Gcd(a, b) * abs(b))

#define INVERSE(x) ( 1/(x) )
#define INVERSE(x) (1/(x))

// Used for calculating the radioactive strength falloff
#define INVERSE_SQUARE(initial_strength,cur_distance,initial_distance) ( (initial_strength)*((initial_distance)**2/(cur_distance)**2) )
#define INVERSE_SQUARE(initial_strength,cur_distance,initial_distance) ((initial_strength)*((initial_distance)**2/(cur_distance)**2))

#define ISABOUTEQUAL(a, b, deviation) (deviation ? abs((a) - (b)) <= deviation : abs((a) - (b)) <= 0.1)

Expand All @@ -80,7 +80,7 @@
// Performs a linear interpolation between a and b.
// Note that amount=0 returns a, amount=1 returns b, and
// amount=0.5 returns the mean of a and b.
#define LERP(a, b, amount) ( amount ? ((a) + ((b) - (a)) * (amount)) : a )
#define LERP(a, b, amount) (amount ? ((a) + ((b) - (a)) * (amount)) : a)

// Returns the nth root of x.
#define ROOT(n, x) ((x) ** (1 / (n)))
Expand All @@ -106,7 +106,7 @@

/// Gets shift x that would be required the bitflag (1<<x)
/// We need the round because log has floating-point inaccuracy, and if we undershoot at all on list indexing we'll get the wrong index.
#define TOBITSHIFT(bit) ( round(log(2, bit), 1) )
#define TOBITSHIFT(bit) (round(log(2, bit), 1))

// Will filter out extra rotations and negative rotations
// E.g: 540 becomes 180. -180 becomes 180.
Expand All @@ -130,7 +130,7 @@

//A logarithm that converts an integer to a number scaled between 0 and 1.
//Currently, this is used for hydroponics-produce sprite transforming, but could be useful for other transform functions.
#define TRANSFORM_USING_VARIABLE(input, max) ( sin((90*(input))/(max))**2 )
#define TRANSFORM_USING_VARIABLE(input, max) (sin((90*(input))/(max))**2)

//converts a uniform distributed random number into a normal distributed one
//since this method produces two random numbers, one is saved for subsequent calls
Expand Down Expand Up @@ -202,10 +202,10 @@

return list(region_x1 & region_x2, region_y1 & region_y2)

#define EXP_DISTRIBUTION(desired_mean) ( -(1/(1/desired_mean)) * log(rand(1, 1000) * 0.001) )
#define EXP_DISTRIBUTION(desired_mean) (-(1/(1/desired_mean)) * log(rand(1, 1000) * 0.001))

#define LORENTZ_DISTRIBUTION(x, s) ( s*tan(TODEGREES(PI*(rand()-0.5))) + x )
#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ( (1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2 )
#define LORENTZ_DISTRIBUTION(x, s) (s*tan(TODEGREES(PI*(rand()-0.5))) + x)
#define LORENTZ_CUMULATIVE_DISTRIBUTION(x, y, s) ((1/PI)*TORADIANS(arctan((x-y)/s)) + 1/2)

#define RULE_OF_THREE(a, b, x) ((a*x)/b)
// )
Expand Down
4 changes: 2 additions & 2 deletions code/__DEFINES/misc.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#define TEXT_WEST "[WEST]"

/// Inverse direction, taking into account UP|DOWN if necessary.
#define REVERSE_DIR(dir) ( ((dir & 85) << 1) | ((dir & 170) >> 1) )
#define REVERSE_DIR(dir) (((dir & 85) << 1) | ((dir & 170) >> 1))

//Human Overlays Indexes/////////
#define MUTATIONS_LAYER 30 //mutations. Tk headglows, cold resistance glow, etc
Expand Down Expand Up @@ -179,7 +179,7 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache)


//subtypesof(), typesof() without the parent path
#define subtypesof(typepath) ( typesof(typepath) - typepath )
#define subtypesof(typepath) (typesof(typepath) - typepath)

//Gets the turf this atom inhabits
#define get_turf(A) (get_step(A, 0))
Expand Down
8 changes: 4 additions & 4 deletions code/__DEFINES/mobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@
//Charge levels for Ethereals
//WS Begin -- Ethereal Charge Scaling
#define ETHEREAL_CHARGE_SCALING_MULTIPLIER 20
#define ETHEREAL_CHARGE_NONE ( 0 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_LOWPOWER ( 20 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_NORMAL ( 50 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_ALMOSTFULL ( 75 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_NONE (0 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_LOWPOWER (20 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_NORMAL (50 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_ALMOSTFULL (75 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_FULL (100 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_OVERLOAD (125 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
#define ETHEREAL_CHARGE_DANGEROUS (150 * ETHEREAL_CHARGE_SCALING_MULTIPLIER)
Expand Down
2 changes: 1 addition & 1 deletion code/__DEFINES/typeids.dm
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define TYPEID_NULL "0"
#define TYPEID_NORMAL_LIST "f"
//helper macros
#define GET_TYPEID(ref) ( ( (length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, -7) ) )
#define GET_TYPEID(ref) (((length(ref) <= 10) ? "TYPEID_NULL" : copytext(ref, 4, -7)))
#define IS_NORMAL_LIST(L) (GET_TYPEID("\ref[L]") == TYPEID_NORMAL_LIST)


4 changes: 2 additions & 2 deletions code/__HELPERS/AStar.dm
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ Actual Adjacent procs :
if(!start || !end)
stack_trace("Invalid A* start or destination")
return FALSE
if( start.virtual_z() != end.virtual_z() || start == end ) //no pathfinding between z levels
if(start.virtual_z() != end.virtual_z() || start == end) //no pathfinding between z levels
return FALSE
if(maxnodes)
//if start turf is farther than maxnodes from end turf, no need to do anything
Expand Down Expand Up @@ -149,7 +149,7 @@ Actual Adjacent procs :
if(CN)
//is already in open list, check if it's a better way from the current turf
CN.bf &= 15^r //we have no closed, so just cut off exceed dir.00001111 ^ reverse_dir.We don't need to expand to checked turf.
if((newg < CN.g) )
if((newg < CN.g))
if(call(cur.source,adjacent)(caller, T, id, simulated_only))
CN.setp(cur,newg,CN.h,cur.nt+1)
open.ReSort(CN)//reorder the changed element in the list
Expand Down
4 changes: 2 additions & 2 deletions code/__HELPERS/_lists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define LAZYINITLIST(L) if (!L) L = list()
#define UNSETEMPTY(L) if (L && !length(L)) L = null
#define ASSOC_UNSETEMPTY(L, K) if (!length(L[K])) L -= K;
#define LAZYCOPY(L) (L ? L.Copy() : list() )
#define LAZYCOPY(L) (L ? L.Copy() : list())
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!length(L)) { L = null; } }
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
#define LAZYOR(L, I) if(!L) { L = list(); } L |= I;
Expand All @@ -22,7 +22,7 @@
#define LAZYISIN(L, V) (L ? (V in L) : FALSE)
#define LAZYLEN(L) length(L)
#define LAZYCLEARLIST(L) if(L) L.Cut()
#define SANITIZE_LIST(L) ( islist(L) ? L : list() )
#define SANITIZE_LIST(L) (islist(L) ? L : list())
#define reverseList(L) reverseRange(L.Copy())
#define LAZYADDASSOC(L, K, V) if(!L) { L = list(); } L[K] += list(V);
#define LAZYADDASSOCLIST(L, K, V) if(!L) { L = list(); } L[K] += list(V);
Expand Down
2 changes: 1 addition & 1 deletion code/__HELPERS/files.dm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
extensions += "|"
extensions += "[i]"
var/regex/valid_ext = new("\\.([extensions])$", "i")
if( !fexists(path) || !(valid_ext.Find(path)) )
if(!fexists(path) || !(valid_ext.Find(path)))
to_chat(src, "<font color='red'>Error: browse_files(): File not found/Invalid file([path]).</font>")
return

Expand Down
6 changes: 3 additions & 3 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Turf and target are separate in case you want to teleport some distance from a t
var/turf/center = locate((destination.x+xoffset),(destination.y+yoffset),location.z)//So now, find the new center.

//Now to find a box from center location and make that our destination.
for(var/turf/T in block(locate(center.x+b1xerror,center.y+b1yerror,location.z), locate(center.x+b2xerror,center.y+b2yerror,location.z) ))
for(var/turf/T in block(locate(center.x+b1xerror,center.y+b1yerror,location.z), locate(center.x+b2xerror,center.y+b2yerror,location.z)))
if(density&&T.density)
continue//If density was specified.
if(T.x>world.maxx || T.x<1)
Expand Down Expand Up @@ -910,7 +910,7 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
var/c_dist = 1


while( c_dist <= dist )
while(c_dist <= dist)
y = t_center.y + c_dist
x = t_center.x - c_dist + 1
for(x in x to t_center.x+c_dist)
Expand Down Expand Up @@ -966,7 +966,7 @@ GLOBAL_LIST_INIT(WALLITEMS_INVERSE, typecacheof(list(
if(!orange)
L += t_center

while( c_dist <= dist )
while(c_dist <= dist)
y = t_center.y + c_dist
x = t_center.x - c_dist + 1
for(x in x to t_center.x+c_dist)
Expand Down
6 changes: 3 additions & 3 deletions code/_onclick/adjacent.dm
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,9 @@
if(O == target_atom || O == mover || (O.pass_flags_self & LETPASSTHROW)) //check if there's a dense object present on the turf
continue // LETPASSTHROW is used for anything you can click through (or the firedoor special case, see above)

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.flags_1&ON_BORDER_1) // windows are on border, check them first
if(O.dir & target_dir || O.dir & (O.dir-1)) // full tile windows are just diagonals mechanically
return 0 //O.dir&(O.dir-1) is false for any cardinal direction, but true for diagonal ones
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 1
4 changes: 2 additions & 2 deletions code/_onclick/click.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
* * [obj/item/proc/afterattack] (atom,user,adjacent,params) - used both ranged and adjacent
* * [mob/proc/RangedAttack] (atom,params) - used only ranged, only used for tk and laser eyes but could be changed
*/
/mob/proc/ClickOn( atom/A, params )
/mob/proc/ClickOn(atom/A, params)
if(world.time <= next_click)
return
next_click = world.time + 1
Expand Down Expand Up @@ -378,7 +378,7 @@

/// Simple helper to face what you clicked on, in case it should be needed in more than one place
/mob/proc/face_atom(atom/A)
if( buckled || stat != CONSCIOUS || !A || !x || !y || !A.x || !A.y )
if(buckled || stat != CONSCIOUS || !A || !x || !y || !A.x || !A.y)
return
var/dx = A.x - x
var/dy = A.y - y
Expand Down
2 changes: 1 addition & 1 deletion code/_onclick/cyborg.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

if(W)
// buckled cannot prevent machine interlinking but stops arm movement
if( buckled || incapacitated())
if(buckled || incapacitated())
return

if(W == A)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/explosions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ SUBSYSTEM_DEF(explosions)
var/c_dist = 1
L += t_center

while( c_dist <= dist )
while(c_dist <= dist)
y = t_center.y + c_dist
x = t_center.x - c_dist + 1
for(x in x to t_center.x+c_dist)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/overlays.dm
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ SUBSYSTEM_DEF(overlays)
var/fr_len = remove_overlays.len

//If not already queued and there is work to be done
if(NOT_QUEUED_ALREADY && (fa_len != a_len || fr_len != r_len ))
if(NOT_QUEUED_ALREADY && (fa_len != a_len || fr_len != r_len))
QUEUE_FOR_COMPILE

/atom/proc/add_overlay(list/overlays)
Expand Down
5 changes: 3 additions & 2 deletions code/controllers/subsystem/research.dm
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ SUBSYSTEM_DEF(research)
var/list/techweb_boost_items = list() //associative double-layer path = list(id = list(point_type = point_discount))
var/list/techweb_nodes_hidden = list() //Node ids that should be hidden by default.
var/list/techweb_nodes_experimental = list() //Node ids that are exclusive to the BEPIS.
var/list/techweb_point_items = list( //path = list(point type = value)
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
var/list/techweb_point_items = list(
//path = list(point type = value)
/obj/item/assembly/signaler/anomaly = list(TECHWEB_POINT_TYPE_GENERIC = 10000)
)
var/list/errored_datums = list()
var/list/point_types = list() //typecache style type = TRUE list
Expand Down
6 changes: 3 additions & 3 deletions code/controllers/subsystem/shuttle.dm
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ SUBSYSTEM_DEF(shuttle)
return port

// Returns the ship the atom belongs to by also getting the shuttle port's current_ship
/datum/controller/subsystem/shuttle/proc/get_ship( atom/object )
var/obj/docking_port/mobile/port = get_containing_shuttle( object )
if ( port?.current_ship )
/datum/controller/subsystem/shuttle/proc/get_ship(atom/object)
var/obj/docking_port/mobile/port = get_containing_shuttle(object)
if (port?.current_ship)
return port.current_ship

/datum/controller/subsystem/shuttle/proc/get_containing_docks(atom/A)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/vote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ SUBSYSTEM_DEF(vote)
greatest_votes = choices[GLOB.master_mode]
else if(mode == "transfer")
var/factor = 1
switch(world.time / (1 MINUTES ))
switch(world.time / (1 MINUTES))
if(0 to 60)
factor = 0.5
if(61 to 120)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/chasm.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

/datum/component/chasm/proc/is_safe()
//if anything matching this typecache is found in the chasm, we don't drop things
var/static/list/chasm_safeties_typecache = typecacheof(list(/obj/structure/lattice, /obj/structure/stone_tile, /obj/structure/catwalk ))
var/static/list/chasm_safeties_typecache = typecacheof(list(/obj/structure/lattice, /obj/structure/stone_tile, /obj/structure/catwalk))

var/atom/parent = src.parent
var/list/found_safeties = typecache_filter_list(parent.contents, chasm_safeties_typecache)
Expand Down
2 changes: 1 addition & 1 deletion code/datums/components/mood.dm
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@
add_event(null, "nutrition", /datum/mood_event/wellfed) // round and full
if(NUTRITION_LEVEL_WELL_FED to NUTRITION_LEVEL_FULL)
add_event(null, "nutrition", /datum/mood_event/wellfed)
if( NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
if(NUTRITION_LEVEL_FED to NUTRITION_LEVEL_WELL_FED)
add_event(null, "nutrition", /datum/mood_event/fed)
if(NUTRITION_LEVEL_HUNGRY to NUTRITION_LEVEL_FED)
clear_event(null, "nutrition")
Expand Down
4 changes: 2 additions & 2 deletions code/datums/components/riding.dm
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@
if(H.buckle_lying)
return list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(0, 6), TEXT_WEST = list(0, 6))
else
return list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(-6, 4), TEXT_WEST = list( 6, 4))
return list(TEXT_NORTH = list(0, 6), TEXT_SOUTH = list(0, 6), TEXT_EAST = list(-6, 4), TEXT_WEST = list(6, 4))


/datum/component/riding/human/force_dismount(mob/living/user)
Expand Down Expand Up @@ -321,7 +321,7 @@
AM.layer = MOB_LAYER

/datum/component/riding/cyborg/get_offsets(pass_index) // list(dir = x, y, layer)
return list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(-6, 3), TEXT_WEST = list( 6, 3))
return list(TEXT_NORTH = list(0, 4), TEXT_SOUTH = list(0, 4), TEXT_EAST = list(-6, 3), TEXT_WEST = list(6, 3))

/datum/component/riding/cyborg/handle_vehicle_offsets(dir)
var/atom/movable/AM = parent
Expand Down
2 changes: 1 addition & 1 deletion code/datums/diseases/_MobProcs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
D.try_infect(src)

/mob/living/proc/AirborneContractDisease(datum/disease/D, force_spread)
if( ((D.spread_flags & DISEASE_SPREAD_AIRBORNE) || force_spread) && prob((50*D.permeability_mod) - 1))
if(((D.spread_flags & DISEASE_SPREAD_AIRBORNE) || force_spread) && prob((50*D.permeability_mod) - 1))
ForceContractDisease(D)

/mob/living/carbon/AirborneContractDisease(datum/disease/D, force_spread)
Expand Down
Loading

0 comments on commit a9501d3

Please sign in to comment.