mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-15 00:53:23 +01:00
CI now bans the use of weird spacing in conditionals (#22777)
* no more spaces * Matthew 10:22 * fixes * dgamerl review * Update code/modules/hydroponics/plant_genes.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * Update code/modules/mob/living/simple_animal/bot/ed209bot.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/mob/mob.dm * Update code/modules/pda/PDA.dm Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * fuck * bah * Update tools/ci/check_grep2.py Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com> * oops * guh --------- Co-authored-by: Henri215 <77684085+Henri215@users.noreply.github.com>
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
#define NEW_SS_GLOBAL(varname) if(varname != src){if(istype(varname)){Recover();qdel(varname);}varname = src;}
|
||||
|
||||
#define START_PROCESSING(Processor, Datum) if (!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing += Datum}
|
||||
#define START_PROCESSING(Processor, Datum) if(!Datum.isprocessing) {Datum.isprocessing = TRUE;Processor.processing += Datum}
|
||||
#define STOP_PROCESSING(Processor, Datum) Datum.isprocessing = FALSE;Processor.processing -= Datum
|
||||
|
||||
//SubSystem flags (Please design any new flags so that the default is off, to make adding flags to subsystems easier)
|
||||
|
||||
@@ -120,7 +120,7 @@ GLOBAL_LIST_INIT(em_mask_matrix, EM_MASK_MATRIX)
|
||||
/// Parse the hexadecimal color into lumcounts of each perspective.
|
||||
#define PARSE_LIGHT_COLOR(source) \
|
||||
do { \
|
||||
if (source.light_color) { \
|
||||
if(source.light_color) { \
|
||||
var/__light_color = source.light_color; \
|
||||
source.lum_r = GETREDPART(__light_color) / 255; \
|
||||
source.lum_g = GETGREENPART(__light_color) / 255; \
|
||||
@@ -130,4 +130,4 @@ do { \
|
||||
source.lum_g = 1; \
|
||||
source.lum_b = 1; \
|
||||
}; \
|
||||
} while (FALSE)
|
||||
} while(FALSE)
|
||||
|
||||
@@ -19,14 +19,14 @@
|
||||
/* This comment bypasses grep checks */ /var/__rust_g
|
||||
|
||||
/proc/__detect_rust_g()
|
||||
if (world.system_type == UNIX)
|
||||
if (fexists("./librust_g.so"))
|
||||
if(world.system_type == UNIX)
|
||||
if(fexists("./librust_g.so"))
|
||||
// No need for LD_LIBRARY_PATH badness.
|
||||
return __rust_g = "./librust_g.so"
|
||||
else if (fexists("./rust_g"))
|
||||
else if(fexists("./rust_g"))
|
||||
// Old dumb filename.
|
||||
return __rust_g = "./rust_g"
|
||||
else if (fexists("[world.GetConfig("env", "HOME")]/.byond/bin/rust_g"))
|
||||
else if(fexists("[world.GetConfig("env", "HOME")]/.byond/bin/rust_g"))
|
||||
// Old dumb filename in `~/.byond/bin`.
|
||||
return __rust_g = "rust_g"
|
||||
else
|
||||
@@ -278,7 +278,7 @@
|
||||
|
||||
/proc/rustg_read_toml_file(path)
|
||||
var/list/output = rustg_raw_read_toml_file(path)
|
||||
if (output["success"])
|
||||
if(output["success"])
|
||||
return json_decode(output["content"])
|
||||
else
|
||||
CRASH(output["content"])
|
||||
@@ -287,7 +287,7 @@
|
||||
|
||||
/proc/rustg_toml_encode(value)
|
||||
var/list/output = rustg_raw_toml_encode(value)
|
||||
if (output["success"])
|
||||
if(output["success"])
|
||||
return output["content"]
|
||||
else
|
||||
CRASH(output["content"])
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
#define RUNLEVELS_DEFAULT (RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME)
|
||||
|
||||
// This do{} WHILE (FALSE) syntax may look stupid, but it speeds things up because BYOND memes
|
||||
// This do{} WHILE(FALSE) syntax may look stupid, but it speeds things up because BYOND memes
|
||||
#define COMPILE_OVERLAYS(A)\
|
||||
do { \
|
||||
var/list/ad = A.add_overlays;\
|
||||
@@ -145,7 +145,7 @@
|
||||
A.overlays |= po;\
|
||||
}\
|
||||
A.flags_2 &= ~OVERLAY_QUEUED_2;\
|
||||
} while (FALSE)
|
||||
} while(FALSE)
|
||||
|
||||
// SS CPU display category flags
|
||||
#define SS_CPUDISPLAY_LOW 1
|
||||
|
||||
@@ -22,4 +22,4 @@ GLOBAL_LIST_EMPTY(bitflag_lists)
|
||||
GLOB.bitflag_lists[txt_signature] = new_bitflag_list; \
|
||||
}; \
|
||||
target = GLOB.bitflag_lists[txt_signature]; \
|
||||
} while (FALSE)
|
||||
} while(FALSE)
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
|
||||
/world/proc/enable_auxtools_debugger()
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
if(debug_server)
|
||||
CALL_EXT(debug_server, "auxtools_init")()
|
||||
enable_debugging()
|
||||
|
||||
// Called in world/Del(). This is VERY important, otherwise you get phantom threads which try to lookup RAM they arent allowed to
|
||||
/world/proc/disable_auxtools_debugger()
|
||||
var/debug_server = world.GetConfig("env", "AUXTOOLS_DEBUG_DLL")
|
||||
if (debug_server)
|
||||
if(debug_server)
|
||||
CALL_EXT(debug_server, "auxtools_shutdown")()
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
|
||||
var/list/exploded = splittext(path, ".")
|
||||
var/extension = exploded[length(exploded)]
|
||||
if( !fexists(path) || !(extension in valid_extensions) )
|
||||
if(!fexists(path) || !(extension in valid_extensions))
|
||||
to_chat(src, "<font color='red'>Error: browse_files(): File not found/Invalid file([path]).</font>")
|
||||
return
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
var/datum/robolimb/R = new limb_type()
|
||||
GLOB.all_robolimbs[R.company] = R
|
||||
if(!R.unavailable_at_chargen)
|
||||
if(R != "head" && R != "chest" && R != "groin" ) //Part of the method that ensures only IPCs can access head, chest and groin prosthetics.
|
||||
if(R != "head" && R != "chest" && R != "groin") //Part of the method that ensures only IPCs can access head, chest and groin prosthetics.
|
||||
if(R.has_subtypes) //Ensures solos get added to the list as well be incorporating has_subtypes == 1 and has_subtypes == 2.
|
||||
GLOB.chargen_robolimbs[R.company] = R //List only main brands and solo parts.
|
||||
if(R.selectable)
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
SELF_ICON.Blend(A.color,ICON_MULTIPLY)} \
|
||||
} \
|
||||
##SETVAR=SELF_ICON;\
|
||||
} while (0)
|
||||
} while(0)
|
||||
#define INDEX_X_LOW 1
|
||||
#define INDEX_X_HIGH 2
|
||||
#define INDEX_Y_LOW 3
|
||||
|
||||
@@ -678,9 +678,9 @@
|
||||
//Picks from the list, with some safeties, and returns the "default" arg if it fails
|
||||
#define DEFAULTPICK(L, default) ((istype(L, /list) && L:len) ? pick(L) : default)
|
||||
|
||||
#define LAZYINITLIST(L) if (!L) L = list()
|
||||
#define LAZYINITLIST(L) if(!L) L = list()
|
||||
|
||||
#define UNSETEMPTY(L) if (L && !L.len) L = null
|
||||
#define UNSETEMPTY(L) if(L && !L.len) L = null
|
||||
#define LAZYREMOVE(L, I) if(L) { L -= I; if(!L.len) { L = null; } }
|
||||
#define LAZYADD(L, I) if(!L) { L = list(); } L += I;
|
||||
/// Adds I to L, initializing L if necessary, if I is not already in L
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
} \
|
||||
\
|
||||
SEND_SIGNAL(target, SIGNAL_ADDTRAIT(trait), trait); \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* Removes a status trait from a target datum.
|
||||
@@ -50,7 +50,7 @@
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* Removes all status traits from a target datum which were NOT added by `sources`.
|
||||
@@ -82,7 +82,7 @@
|
||||
target.status_traits = null; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
/**
|
||||
* Removes all status traits from a target datum which were added by `sources`.
|
||||
@@ -114,7 +114,7 @@
|
||||
target.status_traits = null; \
|
||||
} \
|
||||
} \
|
||||
} while (0)
|
||||
} while(0)
|
||||
|
||||
|
||||
#define HAS_TRAIT(target, trait) (target.status_traits ? (target.status_traits[trait] ? TRUE : FALSE) : FALSE)
|
||||
|
||||
@@ -9,11 +9,11 @@ GLOBAL_LIST_EMPTY(typelists)
|
||||
#else
|
||||
// mostly the same code as above, just more verbose, slower and has tallying for saved lists
|
||||
/datum/proc/typelist(key, list/values)
|
||||
if (!values)
|
||||
if(!values)
|
||||
values = list()
|
||||
GLOB.typelistkeys |= key
|
||||
if (GLOB.typelists[type])
|
||||
if (GLOB.typelists[type][key])
|
||||
if(GLOB.typelists[type])
|
||||
if(GLOB.typelists[type][key])
|
||||
GLOB.typelists[type]["[key]-saved"]++
|
||||
return GLOB.typelists[type][key]
|
||||
else
|
||||
@@ -28,16 +28,16 @@ GLOBAL_LIST_EMPTY(typelistkeys)
|
||||
/proc/tallytypelistsavings()
|
||||
var/savings = list()
|
||||
var/saveditems = list()
|
||||
for (var/key in GLOB.typelistkeys)
|
||||
for(var/key in GLOB.typelistkeys)
|
||||
savings[key] = 0
|
||||
saveditems[key] = 0
|
||||
|
||||
for (var/type in GLOB.typelists)
|
||||
for (var/saving in savings)
|
||||
if (GLOB.typelists[type]["[saving]-saved"])
|
||||
for(var/type in GLOB.typelists)
|
||||
for(var/saving in savings)
|
||||
if(GLOB.typelists[type]["[saving]-saved"])
|
||||
savings[saving] += GLOB.typelists[type]["[saving]-saved"]
|
||||
saveditems[saving] += (GLOB.typelists[type]["[saving]-saved"] * length(GLOB.typelists[type][saving]))
|
||||
|
||||
for (var/saving in savings)
|
||||
for(var/saving in savings)
|
||||
to_chat(world, "Savings for [saving]: [savings[saving]] lists, [saveditems[saving]] items")
|
||||
#endif
|
||||
|
||||
@@ -122,7 +122,7 @@ Turf and target are seperate 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) continue//Don't want them to teleport off the map.
|
||||
if(T.y>world.maxy || T.y<1) continue
|
||||
@@ -436,11 +436,11 @@ Turf and target are seperate in case you want to teleport some distance from a t
|
||||
|
||||
// Format an energy value in J, kJ, MJ, or GJ. 1W = 1J/s.
|
||||
/proc/DisplayJoules(units)
|
||||
if (units < 1000) // Less than a kJ
|
||||
if(units < 1000) // Less than a kJ
|
||||
return "[round(units, 0.1)] J"
|
||||
else if (units < 1000000) // Less than a MJ
|
||||
else if(units < 1000000) // Less than a MJ
|
||||
return "[round(units * 0.001, 0.01)] kJ"
|
||||
else if (units < 1000000000) // Less than a GJ
|
||||
else if(units < 1000000000) // Less than a GJ
|
||||
return "[round(units * 0.000001, 0.001)] MJ"
|
||||
return "[round(units * 0.000000001, 0.0001)] GJ"
|
||||
|
||||
@@ -1596,7 +1596,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new)
|
||||
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)
|
||||
|
||||
@@ -87,13 +87,13 @@
|
||||
*/
|
||||
/turf/proc/ClickCross(target_dir, border_only, target_atom = null)
|
||||
for(var/obj/O in src)
|
||||
if( !O.density || O == target_atom || (O.pass_flags & LETPASSTHROW))
|
||||
if(!O.density || O == target_atom || (O.pass_flags & LETPASSTHROW))
|
||||
continue // LETPASSTHROW is used for anything you can click through
|
||||
|
||||
if( O.flags&ON_BORDER) // 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&ON_BORDER) // 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
|
||||
|
||||
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
|
||||
|
||||
@@ -392,7 +392,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( stat || buckled || !A || !x || !y || !A.x || !A.y ) return
|
||||
if(stat || buckled || !A || !x || !y || !A.x || !A.y) return
|
||||
var/dx = A.x - x
|
||||
var/dy = A.y - y
|
||||
if(!dx && !dy) return
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
return
|
||||
|
||||
// buckled cannot prevent machine interlinking but stops arm movement
|
||||
if( buckled )
|
||||
if(buckled)
|
||||
return
|
||||
|
||||
if(W == A)
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
/mob/proc/overlay_fullscreen(category, type, severity)
|
||||
var/obj/screen/fullscreen/screen = screens[category]
|
||||
if (!screen || screen.type != type)
|
||||
if(!screen || screen.type != type)
|
||||
// needs to be recreated
|
||||
clear_fullscreen(category, FALSE)
|
||||
screens[category] = screen = new type()
|
||||
else if ((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view))
|
||||
else if((!severity || severity == screen.severity) && (!client || screen.screen_loc != "CENTER-7,CENTER-7" || screen.view == client.view))
|
||||
// doesn't need to be updated
|
||||
return screen
|
||||
|
||||
screen.icon_state = "[initial(screen.icon_state)][severity]"
|
||||
screen.severity = severity
|
||||
if (client && screen.should_show_to(src))
|
||||
if(client && screen.should_show_to(src))
|
||||
screen.update_for_view(client.view)
|
||||
client.screen += screen
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
var/show_when_dead = FALSE
|
||||
|
||||
/obj/screen/fullscreen/proc/update_for_view(client_view)
|
||||
if (screen_loc == "CENTER-7,CENTER-7" && view != client_view)
|
||||
if(screen_loc == "CENTER-7,CENTER-7" && view != client_view)
|
||||
var/list/actualview = getviewsize(client_view)
|
||||
view = client_view
|
||||
transform = matrix(actualview[1]/FULLSCREEN_OVERLAY_RESOLUTION_X, 0, 0, 0, actualview[2]/FULLSCREEN_OVERLAY_RESOLUTION_Y, 0)
|
||||
|
||||
@@ -62,22 +62,22 @@
|
||||
if(isnull(pref))
|
||||
pref = PARALLAX_HIGH
|
||||
switch(C.prefs.parallax)
|
||||
if (PARALLAX_INSANE)
|
||||
if(PARALLAX_INSANE)
|
||||
C.parallax_throttle = FALSE
|
||||
C.parallax_layers_max = 5
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_MED)
|
||||
if(PARALLAX_MED)
|
||||
C.parallax_throttle = PARALLAX_DELAY_MED
|
||||
C.parallax_layers_max = 3
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_LOW)
|
||||
if(PARALLAX_LOW)
|
||||
C.parallax_throttle = PARALLAX_DELAY_LOW
|
||||
C.parallax_layers_max = 1
|
||||
return TRUE
|
||||
|
||||
if (PARALLAX_DISABLE)
|
||||
if(PARALLAX_DISABLE)
|
||||
return FALSE
|
||||
|
||||
//This is high parallax.
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
var/y = 1
|
||||
|
||||
for(var/atom/movable/A in R.module.modules)
|
||||
if( (A != R.module_state_1) && (A != R.module_state_2) && (A != R.module_state_3) )
|
||||
if((A != R.module_state_1) && (A != R.module_state_2) && (A != R.module_state_3))
|
||||
//Module is not currently active
|
||||
R.client.screen += A
|
||||
if(x < 0)
|
||||
@@ -249,7 +249,7 @@
|
||||
R.client.screen -= module_store_icon
|
||||
|
||||
for(var/atom/A in R.module.modules)
|
||||
if( (A != R.module_state_1) && (A != R.module_state_2) && (A != R.module_state_3) )
|
||||
if((A != R.module_state_1) && (A != R.module_state_2) && (A != R.module_state_3))
|
||||
//Module is not currently active
|
||||
R.client.screen -= A
|
||||
R.shown_robot_modules = FALSE
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
return TRUE
|
||||
|
||||
/obj/screen/storage/proc/is_item_accessible(obj/item/I, mob/user)
|
||||
if (!user || !I)
|
||||
if(!user || !I)
|
||||
return FALSE
|
||||
|
||||
var/storage_depth = I.storage_depth(user)
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
//stops TK grabs being equipped anywhere but into hands
|
||||
/obj/item/tk_grab/equipped(mob/user, slot)
|
||||
if( (slot == SLOT_HUD_LEFT_HAND) || (slot== SLOT_HUD_RIGHT_HAND) )
|
||||
if((slot == SLOT_HUD_LEFT_HAND) || (slot== SLOT_HUD_RIGHT_HAND))
|
||||
return
|
||||
qdel(src)
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
var/list/gamemode_names = list()
|
||||
/// Assoc list of gamemode probabilities (key: config-tag | value: probability)
|
||||
var/list/probabilities = list()
|
||||
/// List of all gamemodes that can be voted for (value: config-tag)
|
||||
/// List of all gamemodes that can be voted for, (value: config-tag)
|
||||
var/list/votable_modes = list()
|
||||
/// Should antags be restricted based on account age?
|
||||
var/antag_account_age_restriction = FALSE
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/// Config holder for stuff relating to the ingame vote system
|
||||
/datum/configuration_section/vote_configuration
|
||||
/// How long will a vote last for (deciseconds)
|
||||
/// How long will a vote last for in deciseconds
|
||||
var/vote_time = 60 SECONDS // 60 seconds
|
||||
/// Time before the first shuttle vote (deciseconds)
|
||||
var/autotransfer_initial_time = 2 HOURS // 2 hours
|
||||
|
||||
@@ -160,7 +160,7 @@ GLOBAL_REAL(Master, /datum/controller/master) = new
|
||||
/datum/controller/master/Recover()
|
||||
var/msg = "## DEBUG: [time2text(world.timeofday)] MC restarted. Reports:\n"
|
||||
for(var/varname in Master.vars)
|
||||
switch (varname)
|
||||
switch(varname)
|
||||
if("name", "tag", "bestF", "type", "parent_type", "vars", "statclick") // Built-in junk.
|
||||
continue
|
||||
else
|
||||
|
||||
@@ -129,7 +129,7 @@ SUBSYSTEM_DEF(mob_hunt)
|
||||
if(loser == "Red")
|
||||
loser_terminal = red_terminal
|
||||
winner_terminal = blue_terminal
|
||||
else if (loser == "Blue")
|
||||
else if(loser == "Blue")
|
||||
loser_terminal = blue_terminal
|
||||
winner_terminal = red_terminal
|
||||
battle_turn = null
|
||||
|
||||
@@ -40,7 +40,7 @@ SUBSYSTEM_DEF(parallax)
|
||||
var/atom/movable/A = C.eye
|
||||
if(!istype(A))
|
||||
continue
|
||||
for (A; isatom(A.loc) && !isturf(A.loc); A = A.loc);
|
||||
for(A; isatom(A.loc) && !isturf(A.loc); A = A.loc);
|
||||
|
||||
if(A != C.movingmob)
|
||||
if(C.movingmob != null && C.movingmob.client_mobs_in_contents)
|
||||
|
||||
@@ -34,7 +34,7 @@ PROCESSING_SUBSYSTEM_DEF(radiation)
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/processing/radiation/proc/get_turf_radiation(turf/place)
|
||||
if (prev_rad_cache[place])
|
||||
if(prev_rad_cache[place])
|
||||
return prev_rad_cache[place]
|
||||
else
|
||||
return 0
|
||||
|
||||
@@ -14,12 +14,12 @@ SUBSYSTEM_DEF(security_level)
|
||||
var/list/available_levels = list()
|
||||
|
||||
/datum/controller/subsystem/security_level/Initialize()
|
||||
if (!length(available_levels))
|
||||
if(!length(available_levels))
|
||||
for(var/security_level_type in subtypesof(/datum/security_level))
|
||||
var/datum/security_level/new_security_level = new security_level_type
|
||||
available_levels[new_security_level.name] = new_security_level
|
||||
|
||||
if (!current_security_level)
|
||||
if(!current_security_level)
|
||||
current_security_level = available_levels[number_level_to_text(DEFAULT_SECURITY_LEVEL_NUMBER)]
|
||||
|
||||
/datum/controller/subsystem/security_level/Recover()
|
||||
|
||||
@@ -31,12 +31,12 @@ SUBSYSTEM_DEF(spacedrift)
|
||||
currentrun.len--
|
||||
if(!AM)
|
||||
processing -= AM
|
||||
if (MC_TICK_CHECK)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
continue
|
||||
|
||||
if(AM.inertia_next_move > world.time)
|
||||
if (MC_TICK_CHECK)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
continue
|
||||
|
||||
@@ -46,7 +46,7 @@ SUBSYSTEM_DEF(spacedrift)
|
||||
if(!AM.inertia_dir)
|
||||
AM.inertia_last_loc = null
|
||||
processing -= AM
|
||||
if (MC_TICK_CHECK)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
continue
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ SUBSYSTEM_DEF(tgui)
|
||||
|
||||
|
||||
/datum/controller/subsystem/tgui/fire(resumed = 0)
|
||||
if (!resumed)
|
||||
if(!resumed)
|
||||
src.currentrun = processing_uis.Copy()
|
||||
//cache for sanic speed (lists are references anyways)
|
||||
var/list/currentrun = src.currentrun
|
||||
@@ -47,7 +47,7 @@ SUBSYSTEM_DEF(tgui)
|
||||
ui.process()
|
||||
else
|
||||
processing_uis.Remove(ui)
|
||||
if (MC_TICK_CHECK)
|
||||
if(MC_TICK_CHECK)
|
||||
return
|
||||
|
||||
/**
|
||||
|
||||
@@ -103,7 +103,7 @@ SUBSYSTEM_DEF(throwing)
|
||||
step = get_step(AM, init_dir)
|
||||
|
||||
if(!pure_diagonal && !diagonals_first) // not a purely diagonal trajectory and we don't want all diagonal moves to be done first
|
||||
if (diagonal_error >= 0 && max(dist_x, dist_y) - dist_travelled != 1) //we do a step forward unless we're right before the target
|
||||
if(diagonal_error >= 0 && max(dist_x, dist_y) - dist_travelled != 1) //we do a step forward unless we're right before the target
|
||||
step = get_step(AM, dx)
|
||||
diagonal_error += (diagonal_error < 0) ? dist_x / 2 : -dist_y
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ SUBSYSTEM_DEF(ticker)
|
||||
current_state = GAME_STATE_PREGAME
|
||||
fire() // TG says this is a good idea
|
||||
for(var/mob/new_player/N in GLOB.player_list)
|
||||
if (N.client)
|
||||
if(N.client)
|
||||
N.new_player_panel_proc() // to enable the observe option
|
||||
if(GAME_STATE_PREGAME)
|
||||
if(!SSticker.ticker_going) // This has to be referenced like this, and I dont know why. If you dont put SSticker. it will break
|
||||
|
||||
@@ -21,7 +21,7 @@ SUBSYSTEM_DEF(time_track)
|
||||
var/current_byondtime = world.time
|
||||
var/current_tickcount = world.time / world.tick_lag
|
||||
|
||||
if (!first_run)
|
||||
if(!first_run)
|
||||
var/tick_drift = max(0, (((current_realtime - last_tick_realtime) - (current_byondtime - last_tick_byond_time)) / world.tick_lag))
|
||||
|
||||
time_dilation_current = tick_drift / (current_tickcount - last_tick_tickcount) * 100
|
||||
|
||||
@@ -64,10 +64,10 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
/datum/controller/subsystem/timer/proc/dump_timer_buckets(full = TRUE)
|
||||
var/list/to_log = list("Timer bucket reset. world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
if (full)
|
||||
for (var/i in 1 to length(bucket_list))
|
||||
if(full)
|
||||
for(var/i in 1 to length(bucket_list))
|
||||
var/datum/timedevent/bucket_head = bucket_list[i]
|
||||
if (!bucket_head)
|
||||
if(!bucket_head)
|
||||
continue
|
||||
|
||||
to_log += "Active timers at index [i]:"
|
||||
@@ -113,20 +113,20 @@ SUBSYSTEM_DEF(timer)
|
||||
bucket_resolution = 0
|
||||
|
||||
// Process client-time timers
|
||||
if (next_clienttime_timer_index)
|
||||
if(next_clienttime_timer_index)
|
||||
clienttime_timers.Cut(1, next_clienttime_timer_index+1)
|
||||
next_clienttime_timer_index = 0
|
||||
for (next_clienttime_timer_index in 1 to length(clienttime_timers))
|
||||
if (MC_TICK_CHECK)
|
||||
for(next_clienttime_timer_index in 1 to length(clienttime_timers))
|
||||
if(MC_TICK_CHECK)
|
||||
next_clienttime_timer_index--
|
||||
break
|
||||
var/datum/timedevent/ctime_timer = clienttime_timers[next_clienttime_timer_index]
|
||||
if (ctime_timer.timeToRun > REALTIMEOFDAY)
|
||||
if(ctime_timer.timeToRun > REALTIMEOFDAY)
|
||||
next_clienttime_timer_index--
|
||||
break
|
||||
|
||||
var/datum/callback/callBack = ctime_timer.callBack
|
||||
if (!callBack)
|
||||
if(!callBack)
|
||||
CRASH("Invalid timer: [get_timer_debug_string(ctime_timer)] world.time: [world.time], \
|
||||
head_offset: [head_offset], practical_offset: [practical_offset], REALTIMEOFDAY: [REALTIMEOFDAY]")
|
||||
|
||||
@@ -141,83 +141,83 @@ SUBSYSTEM_DEF(timer)
|
||||
qdel(ctime_timer)
|
||||
|
||||
// Remove invoked client-time timers
|
||||
if (next_clienttime_timer_index)
|
||||
if(next_clienttime_timer_index)
|
||||
clienttime_timers.Cut(1, next_clienttime_timer_index+1)
|
||||
next_clienttime_timer_index = 0
|
||||
|
||||
// Check for when we need to loop the buckets, this occurs when
|
||||
// the head_offset is approaching BUCKET_LEN ticks in the past
|
||||
if (practical_offset > BUCKET_LEN)
|
||||
if(practical_offset > BUCKET_LEN)
|
||||
head_offset += TICKS2DS(BUCKET_LEN)
|
||||
practical_offset = 1
|
||||
resumed = FALSE
|
||||
|
||||
// Check for when we have to reset buckets, typically from auto-reset
|
||||
if ((length(bucket_list) != BUCKET_LEN) || (world.tick_lag != bucket_resolution))
|
||||
if((length(bucket_list) != BUCKET_LEN) || (world.tick_lag != bucket_resolution))
|
||||
reset_buckets()
|
||||
bucket_list = src.bucket_list
|
||||
resumed = FALSE
|
||||
|
||||
|
||||
// Iterate through each bucket starting from the practical offset
|
||||
while (practical_offset <= BUCKET_LEN && head_offset + ((practical_offset - 1) * world.tick_lag) <= world.time)
|
||||
while(practical_offset <= BUCKET_LEN && head_offset + ((practical_offset - 1) * world.tick_lag) <= world.time)
|
||||
var/datum/timedevent/timer
|
||||
while ((timer = bucket_list[practical_offset]))
|
||||
while((timer = bucket_list[practical_offset]))
|
||||
var/datum/callback/callBack = timer.callBack
|
||||
if (!callBack)
|
||||
if(!callBack)
|
||||
stack_trace("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], \
|
||||
head_offset: [head_offset], practical_offset: [practical_offset], bucket_joined: [timer.bucket_joined]")
|
||||
if (!timer.spent)
|
||||
if(!timer.spent)
|
||||
bucket_resolution = null // force bucket recreation
|
||||
return
|
||||
|
||||
timer.bucketEject() //pop the timer off of the bucket list.
|
||||
|
||||
// Invoke callback if possible
|
||||
if (!timer.spent)
|
||||
if(!timer.spent)
|
||||
timer.spent = world.time
|
||||
callBack.InvokeAsync()
|
||||
last_invoke_tick = world.time
|
||||
|
||||
if (timer.flags & TIMER_LOOP) // Prepare looping timers to re-enter the queue
|
||||
if(timer.flags & TIMER_LOOP) // Prepare looping timers to re-enter the queue
|
||||
timer.spent = 0
|
||||
timer.timeToRun = world.time + timer.wait
|
||||
timer.bucketJoin()
|
||||
else
|
||||
qdel(timer)
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
if(MC_TICK_CHECK)
|
||||
break
|
||||
|
||||
if (!bucket_list[practical_offset])
|
||||
if(!bucket_list[practical_offset])
|
||||
// Empty the bucket, check if anything in the secondary queue should be shifted to this bucket
|
||||
bucket_list[practical_offset] = null // Just in case
|
||||
practical_offset++
|
||||
var/i = 0
|
||||
for (i in 1 to length(second_queue))
|
||||
for(i in 1 to length(second_queue))
|
||||
timer = second_queue[i]
|
||||
if (timer.timeToRun >= TIMER_MAX)
|
||||
if(timer.timeToRun >= TIMER_MAX)
|
||||
i--
|
||||
break
|
||||
|
||||
// Check for timers that are scheduled to run in the past
|
||||
if (timer.timeToRun < head_offset)
|
||||
if(timer.timeToRun < head_offset)
|
||||
bucket_resolution = null // force bucket recreation
|
||||
stack_trace("[i] Invalid timer state: Timer in long run queue with a time to run less then head_offset. \
|
||||
[get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
break
|
||||
|
||||
// Check for timers that are not capable of being scheduled to run without rebuilding buckets
|
||||
if (timer.timeToRun < head_offset + TICKS2DS(practical_offset - 1))
|
||||
if(timer.timeToRun < head_offset + TICKS2DS(practical_offset - 1))
|
||||
bucket_resolution = null // force bucket recreation
|
||||
stack_trace("[i] Invalid timer state: Timer in long run queue that would require a backtrack to transfer to \
|
||||
short run queue. [get_timer_debug_string(timer)] world.time: [world.time], head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
break
|
||||
|
||||
timer.bucketJoin()
|
||||
if (i)
|
||||
if(i)
|
||||
second_queue.Cut(1, i+1)
|
||||
if (MC_TICK_CHECK)
|
||||
if(MC_TICK_CHECK)
|
||||
break
|
||||
|
||||
/**
|
||||
@@ -244,8 +244,8 @@ SUBSYSTEM_DEF(timer)
|
||||
var/list/alltimers = list()
|
||||
|
||||
// Get all timers currently in the buckets
|
||||
for (var/bucket_head in bucket_list)
|
||||
if (!bucket_head) // if bucket is empty for this tick
|
||||
for(var/bucket_head in bucket_list)
|
||||
if(!bucket_head) // if bucket is empty for this tick
|
||||
continue
|
||||
var/datum/timedevent/bucket_node = bucket_head
|
||||
do
|
||||
@@ -266,7 +266,7 @@ SUBSYSTEM_DEF(timer)
|
||||
// Add all timed events from the secondary queue as well
|
||||
alltimers += second_queue
|
||||
|
||||
for (var/datum/timedevent/t in alltimers)
|
||||
for(var/datum/timedevent/t in alltimers)
|
||||
t.bucket_joined = FALSE
|
||||
t.bucket_pos = -1
|
||||
t.prev = null
|
||||
@@ -274,7 +274,7 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
// If there are no timers being tracked by the subsystem,
|
||||
// there is no need to do any further rebuilding
|
||||
if (!length(alltimers))
|
||||
if(!length(alltimers))
|
||||
return
|
||||
|
||||
// Sort all timers by time to run
|
||||
@@ -284,7 +284,7 @@ SUBSYSTEM_DEF(timer)
|
||||
// then set the head offset appropriately to be the earliest time tracked by the
|
||||
// current set of buckets
|
||||
var/datum/timedevent/head = alltimers[1]
|
||||
if (head.timeToRun < head_offset)
|
||||
if(head.timeToRun < head_offset)
|
||||
head_offset = head.timeToRun
|
||||
|
||||
// Iterate through each timed event and insert it into an appropriate bucket,
|
||||
@@ -293,21 +293,21 @@ SUBSYSTEM_DEF(timer)
|
||||
// secondary queue
|
||||
var/new_bucket_count
|
||||
var/i = 1
|
||||
for (i in 1 to length(alltimers))
|
||||
for(i in 1 to length(alltimers))
|
||||
var/datum/timedevent/timer = alltimers[i]
|
||||
if (!timer)
|
||||
if(!timer)
|
||||
continue
|
||||
|
||||
// Check that the TTR is within the range covered by buckets, when exceeded we've finished
|
||||
if (timer.timeToRun >= TIMER_MAX)
|
||||
if(timer.timeToRun >= TIMER_MAX)
|
||||
i--
|
||||
break
|
||||
|
||||
// Check that timer has a valid callback and hasn't been invoked
|
||||
if (!timer.callBack || timer.spent)
|
||||
if(!timer.callBack || timer.spent)
|
||||
WARNING("Invalid timer: [get_timer_debug_string(timer)] world.time: [world.time], \
|
||||
head_offset: [head_offset], practical_offset: [practical_offset]")
|
||||
if (timer.callBack)
|
||||
if(timer.callBack)
|
||||
qdel(timer)
|
||||
continue
|
||||
|
||||
@@ -318,7 +318,7 @@ SUBSYSTEM_DEF(timer)
|
||||
timer.bucket_joined = TRUE
|
||||
|
||||
var/datum/timedevent/bucket_head = bucket_list[bucket_pos]
|
||||
if (!bucket_head)
|
||||
if(!bucket_head)
|
||||
bucket_list[bucket_pos] = timer
|
||||
timer.next = null
|
||||
timer.prev = null
|
||||
@@ -330,7 +330,7 @@ SUBSYSTEM_DEF(timer)
|
||||
bucket_list[bucket_pos] = timer
|
||||
|
||||
// Cut the timers that are tracked by the buckets from the secondary queue
|
||||
if (i)
|
||||
if(i)
|
||||
alltimers.Cut(1, i + 1)
|
||||
second_queue = alltimers
|
||||
bucket_count = new_bucket_count
|
||||
@@ -403,53 +403,53 @@ SUBSYSTEM_DEF(timer)
|
||||
timeToRun = (flags & TIMER_CLIENT_TIME ? REALTIMEOFDAY : world.time) + wait
|
||||
|
||||
// Include the timer in the hash table if the timer is unique
|
||||
if (flags & TIMER_UNIQUE)
|
||||
if(flags & TIMER_UNIQUE)
|
||||
SStimer.hashes[hash] = src
|
||||
|
||||
// Generate ID for the timer if the timer is stoppable, include in the timer id dictionary
|
||||
if (flags & TIMER_STOPPABLE)
|
||||
if(flags & TIMER_STOPPABLE)
|
||||
id = num2text(nextid, 100)
|
||||
if (nextid >= SHORT_REAL_LIMIT)
|
||||
if(nextid >= SHORT_REAL_LIMIT)
|
||||
nextid += min(1, 2 ** round(nextid / SHORT_REAL_LIMIT))
|
||||
else
|
||||
nextid++
|
||||
SStimer.timer_id_dict[id] = src
|
||||
|
||||
if ((timeToRun < world.time || timeToRun < SStimer.head_offset) && !(flags & TIMER_CLIENT_TIME))
|
||||
if((timeToRun < world.time || timeToRun < SStimer.head_offset) && !(flags & TIMER_CLIENT_TIME))
|
||||
CRASH("Invalid timer state: Timer created that would require a backtrack to run (addtimer would never let this happen): [SStimer.get_timer_debug_string(src)]")
|
||||
|
||||
if (callBack.object != GLOBAL_PROC && !QDESTROYING(callBack.object))
|
||||
if(callBack.object != GLOBAL_PROC && !QDESTROYING(callBack.object))
|
||||
LAZYADD(callBack.object.active_timers, src)
|
||||
|
||||
bucketJoin()
|
||||
|
||||
/datum/timedevent/Destroy()
|
||||
..()
|
||||
if (flags & TIMER_UNIQUE && hash)
|
||||
if(flags & TIMER_UNIQUE && hash)
|
||||
SStimer.hashes -= hash
|
||||
|
||||
if (callBack && callBack.object && callBack.object != GLOBAL_PROC && callBack.object.active_timers)
|
||||
if(callBack && callBack.object && callBack.object != GLOBAL_PROC && callBack.object.active_timers)
|
||||
callBack.object.active_timers -= src
|
||||
UNSETEMPTY(callBack.object.active_timers)
|
||||
|
||||
callBack = null
|
||||
|
||||
if (flags & TIMER_STOPPABLE)
|
||||
if(flags & TIMER_STOPPABLE)
|
||||
SStimer.timer_id_dict -= id
|
||||
|
||||
if (flags & TIMER_CLIENT_TIME)
|
||||
if (!spent)
|
||||
if(flags & TIMER_CLIENT_TIME)
|
||||
if(!spent)
|
||||
spent = world.time
|
||||
SStimer.clienttime_timers -= src
|
||||
return QDEL_HINT_IWILLGC
|
||||
|
||||
if (!spent)
|
||||
if(!spent)
|
||||
spent = world.time
|
||||
bucketEject()
|
||||
else
|
||||
if (prev && prev.next == src)
|
||||
if(prev && prev.next == src)
|
||||
prev.next = next
|
||||
if (next && next.prev == src)
|
||||
if(next && next.prev == src)
|
||||
next.prev = prev
|
||||
next = null
|
||||
prev = null
|
||||
@@ -485,9 +485,9 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
// Remove the timed event from the bucket, ensuring to maintain
|
||||
// the integrity of the bucket's list if relevant
|
||||
if (prev && prev.next == src)
|
||||
if(prev && prev.next == src)
|
||||
prev.next = next
|
||||
if (next && next.prev == src)
|
||||
if(next && next.prev == src)
|
||||
next.prev = prev
|
||||
prev = next = null
|
||||
bucket_pos = -1
|
||||
@@ -508,14 +508,14 @@ SUBSYSTEM_DEF(timer)
|
||||
callBack: \ref[callBack], callBack.object: [callBack.object]\ref[callBack.object]([getcallingtype()]), \
|
||||
callBack.delegate:[callBack.delegate]([callBack.arguments ? callBack.arguments.Join(", ") : ""]), source: [source]"
|
||||
|
||||
if (bucket_joined)
|
||||
if(bucket_joined)
|
||||
stack_trace("Bucket already joined! [name]")
|
||||
|
||||
// Check if this timed event should be diverted to the client time bucket, or the secondary queue
|
||||
var/list/L
|
||||
if (flags & TIMER_CLIENT_TIME)
|
||||
if(flags & TIMER_CLIENT_TIME)
|
||||
L = SStimer.clienttime_timers
|
||||
else if (timeToRun >= TIMER_MAX)
|
||||
else if(timeToRun >= TIMER_MAX)
|
||||
L = SStimer.second_queue
|
||||
if(L)
|
||||
BINARY_INSERT_TG(src, L, /datum/timedevent, src, timeToRun, COMPARE_KEY)
|
||||
@@ -527,7 +527,7 @@ SUBSYSTEM_DEF(timer)
|
||||
// Find the correct bucket for this timed event
|
||||
bucket_pos = BUCKET_POS(src)
|
||||
|
||||
if (bucket_pos < SStimer.practical_offset && timeToRun < (SStimer.head_offset + TICKS2DS(BUCKET_LEN)))
|
||||
if(bucket_pos < SStimer.practical_offset && timeToRun < (SStimer.head_offset + TICKS2DS(BUCKET_LEN)))
|
||||
WARNING("Bucket pos in past: bucket_pos = [bucket_pos] < practical_offset = [SStimer.practical_offset] \
|
||||
&& timeToRun = [timeToRun] < [SStimer.head_offset + TICKS2DS(BUCKET_LEN)], Timer: [name]")
|
||||
bucket_pos = SStimer.practical_offset // Recover bucket_pos to avoid timer blocking queue
|
||||
@@ -537,7 +537,7 @@ SUBSYSTEM_DEF(timer)
|
||||
|
||||
// If there is no timed event at this position, then the bucket is 'empty'
|
||||
// and we can just set this event to that position
|
||||
if (!bucket_head)
|
||||
if(!bucket_head)
|
||||
bucket_joined = TRUE
|
||||
bucket_list[bucket_pos] = src
|
||||
return
|
||||
@@ -555,7 +555,7 @@ SUBSYSTEM_DEF(timer)
|
||||
*/
|
||||
/datum/timedevent/proc/getcallingtype()
|
||||
. = "ERROR"
|
||||
if (callBack.object == GLOBAL_PROC)
|
||||
if(callBack.object == GLOBAL_PROC)
|
||||
. = "GLOBAL_PROC"
|
||||
else
|
||||
if(isnull(callBack.object))
|
||||
@@ -646,13 +646,13 @@ GLOBAL_LIST_EMPTY(timers_by_type)
|
||||
* * flags flags for this timer, see: code\__DEFINES\subsystems.dm
|
||||
*/
|
||||
/proc/addtimer(datum/callback/callback, wait = 0, flags = 0)
|
||||
if (!callback)
|
||||
if(!callback)
|
||||
CRASH("addtimer called without a callback")
|
||||
|
||||
if (wait < 0)
|
||||
if(wait < 0)
|
||||
stack_trace("addtimer called with a negative wait. Converting to [world.tick_lag]")
|
||||
|
||||
if (callback.object != GLOBAL_PROC && QDELETED(callback.object) && !QDESTROYING(callback.object))
|
||||
if(callback.object != GLOBAL_PROC && QDELETED(callback.object) && !QDESTROYING(callback.object))
|
||||
stack_trace("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not \
|
||||
be supported and may refuse to run or run with a 0 wait")
|
||||
|
||||
@@ -663,7 +663,7 @@ GLOBAL_LIST_EMPTY(timers_by_type)
|
||||
|
||||
// Generate hash if relevant for timed events with the TIMER_UNIQUE flag
|
||||
var/hash
|
||||
if (flags & TIMER_UNIQUE)
|
||||
if(flags & TIMER_UNIQUE)
|
||||
var/list/hashlist = list(callback.object, "(\ref[callback.object])", callback.delegate, flags & TIMER_CLIENT_TIME)
|
||||
if(!(flags & TIMER_NO_HASH_WAIT))
|
||||
hashlist += wait
|
||||
@@ -672,14 +672,14 @@ GLOBAL_LIST_EMPTY(timers_by_type)
|
||||
|
||||
var/datum/timedevent/hash_timer = SStimer.hashes[hash]
|
||||
if(hash_timer)
|
||||
if (hash_timer.spent) // it's pending deletion, pretend it doesn't exist.
|
||||
if(hash_timer.spent) // it's pending deletion, pretend it doesn't exist.
|
||||
hash_timer.hash = null // but keep it from accidentally deleting us
|
||||
else
|
||||
if (flags & TIMER_OVERRIDE)
|
||||
if(flags & TIMER_OVERRIDE)
|
||||
hash_timer.hash = null // no need having it delete it's hash if we are going to replace it
|
||||
qdel(hash_timer)
|
||||
else
|
||||
if (hash_timer.flags & TIMER_STOPPABLE)
|
||||
if(hash_timer.flags & TIMER_STOPPABLE)
|
||||
. = hash_timer.id
|
||||
return
|
||||
else if(flags & TIMER_OVERRIDE)
|
||||
@@ -695,16 +695,16 @@ GLOBAL_LIST_EMPTY(timers_by_type)
|
||||
* * id a timerid or a /datum/timedevent
|
||||
*/
|
||||
/proc/deltimer(id)
|
||||
if (!id)
|
||||
if(!id)
|
||||
return FALSE
|
||||
if (id == TIMER_ID_NULL)
|
||||
if(id == TIMER_ID_NULL)
|
||||
CRASH("Tried to delete a null timerid. Use TIMER_STOPPABLE flag")
|
||||
if (istype(id, /datum/timedevent))
|
||||
if(istype(id, /datum/timedevent))
|
||||
qdel(id)
|
||||
return TRUE
|
||||
//id is string
|
||||
var/datum/timedevent/timer = SStimer.timer_id_dict[id]
|
||||
if (timer && (!timer.spent || timer.flags & TIMER_DELETE_ME))
|
||||
if(timer && (!timer.spent || timer.flags & TIMER_DELETE_ME))
|
||||
qdel(timer)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
/proc/getArmor(melee = 0, bullet = 0, laser = 0, energy = 0, bomb = 0, rad = 0, fire = 0, acid = 0, magic = 0)
|
||||
. = locate(ARMORID)
|
||||
if (!.)
|
||||
if(!.)
|
||||
. = new /datum/armor(melee, bullet, laser, energy, bomb, rad, fire, acid, magic)
|
||||
|
||||
/datum/armor
|
||||
@@ -58,7 +58,7 @@
|
||||
return getArmor(melee - AA.melee, bullet - AA.bullet, laser - AA.laser, energy - AA.energy, bomb - AA.bomb, rad - AA.rad, fire - AA.fire, acid - AA.acid, magic - AA.magic)
|
||||
|
||||
/datum/armor/vv_edit_var(var_name, var_value)
|
||||
if (var_name == NAMEOF(src, tag))
|
||||
if(var_name == NAMEOF(src, tag))
|
||||
return FALSE
|
||||
. = ..()
|
||||
tag = ARMORID // update tag in case armor values were edited
|
||||
|
||||
Vendored
+1
-1
@@ -12,7 +12,7 @@ GLOBAL_DATUM_INIT(powermonitor_repository, /datum/repository/powermonitor, new()
|
||||
return cache_entry.data
|
||||
|
||||
for(var/obj/machinery/computer/monitor/pMon in GLOB.power_monitors)
|
||||
if( !(pMon.stat & (NOPOWER|BROKEN)) && !pMon.is_secret_monitor )
|
||||
if(!(pMon.stat & (NOPOWER|BROKEN)) && !pMon.is_secret_monitor)
|
||||
pMonData[++pMonData.len] = list ("Area" = get_area_name(pMon), "uid" = "[pMon.UID()]")
|
||||
|
||||
cache_entry.timestamp = world.time //+ 30 SECONDS
|
||||
|
||||
@@ -299,7 +299,7 @@
|
||||
var/current_type = parent_type
|
||||
. = list(our_type, current_type)
|
||||
//and since most components are root level + 1, this won't even have to run
|
||||
while (current_type != /datum/component)
|
||||
while(current_type != /datum/component)
|
||||
current_type = type2parent(current_type)
|
||||
. += current_type
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
else if(HAS_TRAIT(target, TRAIT_HUSK))
|
||||
user.visible_message("<span class='boldnotice'>[defib_ref] buzzes: Resuscitation failed - Subject is husked.</span>")
|
||||
defib_success = FALSE
|
||||
else if (target.blood_volume < BLOOD_VOLUME_SURVIVE)
|
||||
else if(target.blood_volume < BLOOD_VOLUME_SURVIVE)
|
||||
user.visible_message("<span class='boldnotice'>[defib_ref] buzzes: Resuscitation failed - Patient blood volume critically low.</span>")
|
||||
defib_success = FALSE
|
||||
else if(!target.get_organ_slot("brain")) // So things like headless clings don't get outed
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
/// See atom/movable/proc/orbit for parameter definitions
|
||||
/datum/component/orbiter/Initialize(atom/movable/orbiter, radius = 10, clockwise = FALSE, rotation_speed = 20, rotation_segments = 36, pre_rotation = TRUE, lock_in_orbit = FALSE, force_move = FALSE, orbit_layer = FLY_LAYER)
|
||||
if (!istype(orbiter) || !isatom(parent) || isarea(parent))
|
||||
if(!istype(orbiter) || !isatom(parent) || isarea(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
orbiter_list = list()
|
||||
|
||||
+16
-16
@@ -269,11 +269,11 @@
|
||||
if(event.keyCode == 13){ //Enter / return
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for(var i = 0; i < lis.length; ++i)
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
if(li.style.backgroundColor == "#ffee88")
|
||||
{
|
||||
alist = lis\[i\].getElementsByTagName("a")
|
||||
if(alist.length > 0){
|
||||
@@ -287,13 +287,13 @@
|
||||
if(event.keyCode == 38){ //Up arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for(var i = 0; i < lis.length; ++i)
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
if(li.style.backgroundColor == "#ffee88")
|
||||
{
|
||||
if( (i-1) >= 0){
|
||||
if((i-1) >= 0){
|
||||
var li_new = lis\[i-1\];
|
||||
li.style.backgroundColor = "white";
|
||||
li_new.style.backgroundColor = "#ffee88";
|
||||
@@ -307,13 +307,13 @@
|
||||
if(event.keyCode == 40){ //Down arrow
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for(var i = 0; i < lis.length; ++i)
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.style.backgroundColor == "#ffee88" )
|
||||
if(li.style.backgroundColor == "#ffee88")
|
||||
{
|
||||
if( (i+1) < lis.length){
|
||||
if((i+1) < lis.length){
|
||||
var li_new = lis\[i+1\];
|
||||
li.style.backgroundColor = "white";
|
||||
li_new.style.backgroundColor = "#ffee88";
|
||||
@@ -336,11 +336,11 @@
|
||||
}else{
|
||||
var vars_ol = document.getElementById('vars');
|
||||
var lis = vars_ol.getElementsByTagName("li");
|
||||
for ( var i = 0; i < lis.length; ++i )
|
||||
for(var i = 0; i < lis.length; ++i)
|
||||
{
|
||||
try{
|
||||
var li = lis\[i\];
|
||||
if ( li.innerText.toLowerCase().indexOf(filter) == -1 )
|
||||
if(li.innerText.toLowerCase().indexOf(filter) == -1)
|
||||
{
|
||||
vars_ol.removeChild(li);
|
||||
i--;
|
||||
@@ -349,10 +349,10 @@
|
||||
}
|
||||
}
|
||||
var lis_new = vars_ol.getElementsByTagName("li");
|
||||
for ( var j = 0; j < lis_new.length; ++j )
|
||||
for(var j = 0; j < lis_new.length; ++j)
|
||||
{
|
||||
var li1 = lis\[j\];
|
||||
if (j == 0){
|
||||
if(j == 0){
|
||||
li1.style.backgroundColor = "#ffee88";
|
||||
}else{
|
||||
li1.style.backgroundColor = "white";
|
||||
@@ -364,7 +364,7 @@
|
||||
filter_text.focus();
|
||||
filter_text.select();
|
||||
var lastsearch = getCookie("[refid][cookieoffset]search");
|
||||
if (lastsearch) {
|
||||
if(lastsearch) {
|
||||
filter_text.value = lastsearch;
|
||||
updateSearch();
|
||||
}
|
||||
@@ -380,8 +380,8 @@
|
||||
var ca = document.cookie.split(';');
|
||||
for(var i=0; i<ca.length; i++) {
|
||||
var c = ca\[i\];
|
||||
while (c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if (c.indexOf(name)==0) return c.substring(name.length,c.length);
|
||||
while(c.charAt(0)==' ') c = c.substring(1,c.length);
|
||||
if(c.indexOf(name)==0) return c.substring(name.length,c.length);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
@@ -572,7 +572,7 @@
|
||||
return
|
||||
|
||||
var/new_name = reject_bad_name(sanitize(copytext(input(usr, "What would you like to name this mob?", "Input a name", M.real_name) as text|null, 1, MAX_NAME_LEN)), allow_numbers = TRUE)
|
||||
if( !new_name || !M ) return
|
||||
if(!new_name || !M) return
|
||||
|
||||
message_admins("Admin [key_name_admin(usr)] renamed [key_name_admin(M)] to [new_name].")
|
||||
M.rename_character(M.real_name, new_name)
|
||||
|
||||
+1
-1
@@ -56,7 +56,7 @@
|
||||
var/miming = 0 // Mime's vow of silence
|
||||
/// A list of all the antagonist datums that the player is (does not include undatumized antags)
|
||||
var/list/antag_datums
|
||||
/// A lazy list of all teams the player is part of but doesnt have an antag role for (i.e. a custom admin team)
|
||||
/// A lazy list of all teams the player is part of but doesnt have an antag role for, (i.e. a custom admin team)
|
||||
var/list/teams
|
||||
|
||||
var/antag_hud_icon_state = null //this mind's ANTAG_HUD should have this icon_state
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
for(var/datum/recipe/recipe in possible_recipes)
|
||||
var/N_i = (recipe.items)?(recipe.items.len):0
|
||||
var/N_r = (recipe.reagents)?(recipe.reagents.len):0
|
||||
if(N_i > i_count || (N_i== i_count && N_r > r_count ))
|
||||
if(N_i > i_count || (N_i== i_count && N_r > r_count))
|
||||
r_count = N_r
|
||||
i_count = N_i
|
||||
. = recipe
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
/obj/effect/proc_holder/spell/night_vision/cast(list/targets, mob/user = usr)
|
||||
for(var/mob/living/target in targets)
|
||||
switch(target.lighting_alpha)
|
||||
if (LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
if(LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
name = "Toggle Nightvision \[More]"
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
if(LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
name = "Toggle Nightvision \[Full]"
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
if(LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
target.lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
|
||||
name = "Toggle Nightvision \[OFF]"
|
||||
else
|
||||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
var/datum/light_source/L
|
||||
var/thing
|
||||
for (thing in light_sources) // Cycle through the light sources on this atom and tell them to update.
|
||||
for(thing in light_sources) // Cycle through the light sources on this atom and tell them to update.
|
||||
L = thing
|
||||
L.source_atom.update_light()
|
||||
return TRUE
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return TRUE
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/add_to_single_hud(mob/M, mob/living/carbon/H)
|
||||
if(check_sensors(H) || isobserver(M) )
|
||||
if(check_sensors(H) || isobserver(M))
|
||||
..()
|
||||
|
||||
/datum/atom_hud/data/human/medical/basic/proc/update_suit_sensors(mob/living/carbon/H)
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
return
|
||||
|
||||
for(var/datum/AI_Module/AM in possible_modules)
|
||||
if (href_list[AM.mod_pick_name])
|
||||
if(href_list[AM.mod_pick_name])
|
||||
|
||||
// Cost check
|
||||
if(AM.cost > processing_time)
|
||||
|
||||
@@ -61,13 +61,13 @@
|
||||
/mob/living/simple_animal/hostile/guardian/ranged/ToggleLight()
|
||||
var/msg
|
||||
switch(lighting_alpha)
|
||||
if (LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
if(LIGHTING_PLANE_ALPHA_VISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE
|
||||
msg = "You activate your night vision."
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
if(LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE
|
||||
msg = "You increase your night vision."
|
||||
if (LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
if(LIGHTING_PLANE_ALPHA_MOSTLY_INVISIBLE)
|
||||
lighting_alpha = LIGHTING_PLANE_ALPHA_INVISIBLE
|
||||
msg = "You maximize your night vision."
|
||||
else
|
||||
|
||||
@@ -417,7 +417,7 @@
|
||||
available_accesses = get_region_accesses(i)
|
||||
for(var/access in available_accesses)
|
||||
var/access_desc = (i == REGION_CENTCOMM) ? get_centcom_access_desc(access) : get_access_desc(access)
|
||||
if (access_desc)
|
||||
if(access_desc)
|
||||
accesses += list(list(
|
||||
"desc" = replacetext(access_desc, " ", " "),
|
||||
"ref" = access,
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
GLOB.cameranet.updateVisibility(src, 0)
|
||||
|
||||
/obj/machinery/camera/singularity_pull(S, current_size)
|
||||
if (status && current_size >= STAGE_FIVE) // If the singulo is strong enough to pull anchored objects and the camera is still active, turn off the camera as it gets ripped off the wall.
|
||||
if(status && current_size >= STAGE_FIVE) // If the singulo is strong enough to pull anchored objects and the camera is still active, turn off the camera as it gets ripped off the wall.
|
||||
toggle_cam(null, 0)
|
||||
..()
|
||||
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
// OTHER
|
||||
else if((istype(I, /obj/item/paper) || istype(I, /obj/item/pda)) && isliving(user))
|
||||
if (!can_use())
|
||||
if(!can_use())
|
||||
to_chat(user, "<span class='warning'>You can't show something to a disabled camera!</span>")
|
||||
return
|
||||
|
||||
|
||||
@@ -225,7 +225,7 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\
|
||||
if(clonemind.current && clonemind.current.stat != DEAD) //mind is associated with a non-dead body
|
||||
return 0
|
||||
if(clonemind.active) //somebody is using that mind
|
||||
if(ckey(clonemind.key) != R.ckey )
|
||||
if(ckey(clonemind.key) != R.ckey)
|
||||
return 0
|
||||
if(clonemind.suicided) // and stay out!
|
||||
malfunction(go_easy = 0)
|
||||
|
||||
@@ -216,7 +216,7 @@
|
||||
|
||||
if(nextTick < world.time)
|
||||
nextTick=world.time + OP_COMPUTER_COOLDOWN
|
||||
if(crit && table.patient.health <= -50 )
|
||||
if(crit && table.patient.health <= -50)
|
||||
playsound(src.loc, 'sound/machines/defib_success.ogg', 50, 0)
|
||||
if(oxy && table.patient.getOxyLoss()>oxyAlarm)
|
||||
playsound(src.loc, 'sound/machines/defib_saftyoff.ogg', 50, 0)
|
||||
|
||||
@@ -46,17 +46,17 @@
|
||||
return data
|
||||
|
||||
/obj/machinery/computer/brigcells/ui_act(action, params)
|
||||
if (..())
|
||||
if(..())
|
||||
return FALSE
|
||||
|
||||
if(!allowed(usr))
|
||||
to_chat(usr, "<span class='warning'>Access denied.</span>")
|
||||
return FALSE
|
||||
|
||||
if (action == "release")
|
||||
if(action == "release")
|
||||
var/ref = params["ref"]
|
||||
var/obj/machinery/door_timer/T = locate(ref)
|
||||
if (T)
|
||||
if(T)
|
||||
T.timer_end()
|
||||
T.Radio.autosay("Timer stopped manually from a cell management console.", T.name, "Security", list(z))
|
||||
return TRUE
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
// Returns the list of cameras accessible from this computer
|
||||
/obj/machinery/computer/security/proc/get_available_cameras()
|
||||
var/list/L = list()
|
||||
for (var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
for(var/obj/machinery/camera/C in GLOB.cameranet.cameras)
|
||||
if((is_away_level(z) || is_away_level(C.z)) && (C.z != z))//if on away mission, can only receive feed from same z_level cameras
|
||||
continue
|
||||
L.Add(C)
|
||||
|
||||
@@ -1557,7 +1557,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
|
||||
return FALSE
|
||||
|
||||
if(!wirecutters_used)
|
||||
if (ishuman(user) && (user.a_intent == INTENT_GRAB)) //grab that note
|
||||
if(ishuman(user) && (user.a_intent == INTENT_GRAB)) //grab that note
|
||||
user.visible_message("<span class='notice'>[user] removes [note] from [src].</span>", "<span class='notice'>You remove [note] from [src].</span>")
|
||||
playsound(src, 'sound/items/poster_ripped.ogg', 50, 1)
|
||||
else
|
||||
|
||||
@@ -220,7 +220,7 @@ FIRE ALARM
|
||||
alarm()
|
||||
|
||||
/obj/machinery/firealarm/singularity_pull(S, current_size)
|
||||
if (current_size >= STAGE_FIVE) // If the singulo is strong enough to pull anchored objects, the fire alarm experiences integrity failure
|
||||
if(current_size >= STAGE_FIVE) // If the singulo is strong enough to pull anchored objects, the fire alarm experiences integrity failure
|
||||
deconstruct()
|
||||
..()
|
||||
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
to_chat(user, "<span class='notice'>You attach [I] to [src].</span>")
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
START_PROCESSING(SSmachines, src)
|
||||
else if (bag && istype(I, /obj/item/reagent_containers))
|
||||
else if(bag && istype(I, /obj/item/reagent_containers))
|
||||
bag.attackby(I)
|
||||
I.afterattack(bag, usr, TRUE)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
@@ -505,7 +505,7 @@
|
||||
|
||||
/obj/machinery/proc/adjust_item_drop_location(atom/movable/AM) // Adjust item drop location to a 3x3 grid inside the tile, returns slot id from 0 to 8
|
||||
var/md5 = md5(AM.name) // Oh, and it's deterministic too. A specific item will always drop from the same slot.
|
||||
for (var/i in 1 to 32)
|
||||
for(var/i in 1 to 32)
|
||||
. += hex2num(md5[i])
|
||||
. = . % 9
|
||||
AM.pixel_x = -8 + ((.%3)*8)
|
||||
|
||||
@@ -181,7 +181,7 @@
|
||||
return "scalding"
|
||||
|
||||
/obj/machinery/poolcontroller/proc/set_temp(val)
|
||||
if (val != WARM && val != NORMAL && val != COOL && !(emagged && (val == SCALDING || val == FRIGID)))
|
||||
if(val != WARM && val != NORMAL && val != COOL && !(emagged && (val == SCALDING || val == FRIGID)))
|
||||
return
|
||||
|
||||
if(val == SCALDING)
|
||||
|
||||
@@ -249,7 +249,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
|
||||
return data
|
||||
|
||||
/obj/machinery/porta_turret/ui_act(action, params)
|
||||
if (..())
|
||||
if(..())
|
||||
return
|
||||
if(isLocked(usr))
|
||||
return
|
||||
|
||||
@@ -553,7 +553,7 @@
|
||||
"<span class='notice'>You start kicking against the doors... (this will take about [DisplayTimeText(breakout_time)].)</span>", \
|
||||
"<span class='italics'>You hear a thump from [src].</span>")
|
||||
if(do_after(user,(breakout_time), target = src))
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src )
|
||||
if(!user || user.stat != CONSCIOUS || user.loc != src)
|
||||
return
|
||||
user.visible_message("<span class='warning'>[user] successfully broke out of [src]!</span>", \
|
||||
"<span class='notice'>You successfully break out of [src]!</span>")
|
||||
|
||||
@@ -613,7 +613,7 @@
|
||||
to_chat(user, "<span class='notice'>You load [src] with [I].</span>")
|
||||
ttv = I
|
||||
I.forceMove(src)
|
||||
else if (ttv)
|
||||
else if(ttv)
|
||||
to_chat(user, "<span class='warning'>Another tank transfer valve is already loaded.</span>")
|
||||
else
|
||||
to_chat(user, "<span class='warning'>Remove the attached assembly component first.</span>")
|
||||
@@ -632,7 +632,7 @@
|
||||
|
||||
|
||||
/obj/item/bombcore/toxins/proc/check_attached(obj/item/transfer_valve/ttv)
|
||||
if (ttv.attached_device)
|
||||
if(ttv.attached_device)
|
||||
return TRUE
|
||||
else
|
||||
return FALSE
|
||||
|
||||
@@ -255,7 +255,7 @@
|
||||
var/job = tcm.sender_job
|
||||
var/rank = tcm.sender_rank
|
||||
//if the job title is not custom, just use that to decide the rules of formatting
|
||||
if (job in all_jobs)
|
||||
if(job in all_jobs)
|
||||
job_class = all_jobs[job]
|
||||
else
|
||||
job_class = all_jobs[rank]
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
return data
|
||||
|
||||
/obj/machinery/turretid/ui_act(action, params)
|
||||
if (..())
|
||||
if(..())
|
||||
return
|
||||
if(isLocked(usr))
|
||||
return
|
||||
|
||||
+2
-2
@@ -621,7 +621,7 @@
|
||||
data["user"]["job"] = C.rank ? C.rank : "No Job"
|
||||
|
||||
data["stock"] = list()
|
||||
for (var/datum/data/vending_product/R in product_records + hidden_records)
|
||||
for(var/datum/data/vending_product/R in product_records + hidden_records)
|
||||
data["stock"][R.name] = R.amount
|
||||
data["extended_inventory"] = extended_inventory
|
||||
data["vend_ready"] = vend_ready
|
||||
@@ -648,7 +648,7 @@
|
||||
)
|
||||
data["product_records"] += list(data_pr)
|
||||
data["hidden_records"] = list()
|
||||
for (var/datum/data/vending_product/R in hidden_records)
|
||||
for(var/datum/data/vending_product/R in hidden_records)
|
||||
var/list/data_hr = list(
|
||||
path = replacetext(replacetext("[R.product_path]", "/obj/item/", ""), "/", "-"),
|
||||
name = R.name,
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
to_chat(user, "<span class='notice'>The washing machine cannot run in this state.</span>")
|
||||
return
|
||||
|
||||
if( locate(/mob,contents) )
|
||||
if(locate(/mob,contents))
|
||||
state = 8
|
||||
else
|
||||
state = 5
|
||||
@@ -188,7 +188,7 @@
|
||||
QDEL_NULL(crayon)
|
||||
|
||||
|
||||
if( locate(/mob,contents) )
|
||||
if(locate(/mob,contents))
|
||||
state = 7
|
||||
gibs_ready = 1
|
||||
else
|
||||
@@ -202,7 +202,7 @@
|
||||
if(default_unfasten_wrench(user, W))
|
||||
return
|
||||
if(istype(W,/obj/item/toy/crayon) ||istype(W,/obj/item/stamp))
|
||||
if( state in list( 1, 3, 6 ) )
|
||||
if(state in list( 1, 3, 6))
|
||||
if(!crayon)
|
||||
user.drop_item()
|
||||
crayon = W
|
||||
@@ -213,7 +213,7 @@
|
||||
else
|
||||
return ..()
|
||||
else if(istype(W,/obj/item/grab))
|
||||
if( (state == 1) && hacked)
|
||||
if((state == 1) && hacked)
|
||||
var/obj/item/grab/G = W
|
||||
if(ishuman(G.assailant) && iscorgi(G.affecting))
|
||||
G.affecting.loc = src
|
||||
@@ -232,43 +232,43 @@
|
||||
istype(W,/obj/item/bedsheet))
|
||||
|
||||
//YES, it's hardcoded... saves a var/can_be_washed for every single clothing item.
|
||||
if( istype(W,/obj/item/clothing/under/plasmaman ) )
|
||||
if(istype(W,/obj/item/clothing/under/plasmaman))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/suit/space ) )
|
||||
if(istype(W,/obj/item/clothing/suit/space))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/suit/syndicatefake ) )
|
||||
if(istype(W,/obj/item/clothing/suit/syndicatefake))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
// if( istype(W,/obj/item/clothing/suit/powered ) )
|
||||
// if(istype(W,/obj/item/clothing/suit/powered))
|
||||
// to_chat(user, "This item does not fit.")
|
||||
// return
|
||||
if( istype(W,/obj/item/clothing/suit/cyborg_suit ) )
|
||||
if(istype(W,/obj/item/clothing/suit/cyborg_suit))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/suit/bomb_suit ) )
|
||||
if(istype(W,/obj/item/clothing/suit/bomb_suit))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/suit/armor ) )
|
||||
if(istype(W,/obj/item/clothing/suit/armor))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/mask/gas ) )
|
||||
if(istype(W,/obj/item/clothing/mask/gas))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/mask/cigarette ) )
|
||||
if(istype(W,/obj/item/clothing/mask/cigarette))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/head/syndicatefake ) )
|
||||
if(istype(W,/obj/item/clothing/head/syndicatefake))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
// if( istype(W,/obj/item/clothing/head/powered ) )
|
||||
// if(istype(W,/obj/item/clothing/head/powered))
|
||||
// to_chat(user, "This item does not fit.")
|
||||
// return
|
||||
if( istype(W,/obj/item/clothing/head/helmet ) )
|
||||
if(istype(W,/obj/item/clothing/head/helmet))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if( istype(W,/obj/item/clothing/gloves/furgloves ) )
|
||||
if(istype(W,/obj/item/clothing/gloves/furgloves))
|
||||
to_chat(user, "This item does not fit.")
|
||||
return
|
||||
if(istype(W, /obj/item/clothing/gloves/color/black/krav_maga/sec))
|
||||
@@ -279,7 +279,7 @@
|
||||
return
|
||||
|
||||
if(contents.len < 5)
|
||||
if( state in list(1, 3) )
|
||||
if(state in list(1, 3))
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
state = 3
|
||||
|
||||
@@ -186,7 +186,7 @@
|
||||
radio.talk_into(M, message_pieces)
|
||||
|
||||
/obj/mecha/proc/click_action(atom/target, mob/user, params)
|
||||
if(!occupant || occupant != user )
|
||||
if(!occupant || occupant != user)
|
||||
return
|
||||
if(user.incapacitated())
|
||||
return
|
||||
|
||||
@@ -135,8 +135,8 @@
|
||||
if(!in_range(user, src) || !isturf(user.loc) || user.incapacitated() || M.anchored)
|
||||
return FALSE
|
||||
|
||||
if (isguardian(user))
|
||||
if (M.loc == user.loc || user.alpha == 60) //Alpha is for detecting ranged guardians in scout mode
|
||||
if(isguardian(user))
|
||||
if(M.loc == user.loc || user.alpha == 60) //Alpha is for detecting ranged guardians in scout mode
|
||||
return //unmanifested guardians shouldn't be able to buckle mobs
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(teleport_x_offset && teleport_y_offset && teleport_z_offset)
|
||||
|
||||
var/turf/T = locate(rand(teleport_x, teleport_x_offset), rand(teleport_y, teleport_y_offset), rand(teleport_z, teleport_z_offset))
|
||||
if (T)
|
||||
if(T)
|
||||
A.forceMove(T)
|
||||
|
||||
/* Fancy teleporter, creates sparks and smokes when used */
|
||||
|
||||
@@ -293,7 +293,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
|
||||
if(!H.gloves || (!(H.gloves.resistance_flags & (UNACIDABLE|ACID_PROOF))))
|
||||
to_chat(user, "<span class='warning'>The acid on [src] burns your hand!</span>")
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm")
|
||||
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
|
||||
if(affecting && affecting.receive_damage(0, 5)) // 5 burn damage
|
||||
H.UpdateDamageIcon()
|
||||
|
||||
if(isstorage(src.loc))
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
/area/wizard_station
|
||||
)
|
||||
for(var/type in SPECIALS)
|
||||
if( istype(A,type) )
|
||||
if(istype(A,type))
|
||||
return AREA_SPECIAL
|
||||
return AREA_STATION
|
||||
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
break
|
||||
|
||||
if(power_drained > max_power * 0.98)
|
||||
if (!admins_warned)
|
||||
if(!admins_warned)
|
||||
admins_warned = TRUE
|
||||
message_admins("Power sink at ([x],[y],[z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>JMP</a>) is 95% full. Explosion imminent.")
|
||||
playsound(src, 'sound/effects/screech.ogg', 100, 1, 1)
|
||||
|
||||
@@ -145,7 +145,7 @@
|
||||
new/obj/effect/temp_visual/teleport_abductor/syndi_teleporter(mobloc)
|
||||
playsound(destination, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
|
||||
new/obj/effect/temp_visual/teleport_abductor/syndi_teleporter(destination)
|
||||
else if (EMP_D == FALSE && !(bagholding.len && !flawless)) // This is where the fun begins
|
||||
else if(EMP_D == FALSE && !(bagholding.len && !flawless)) // This is where the fun begins
|
||||
var/direction = get_dir(user, destination)
|
||||
panic_teleport(user, destination, direction)
|
||||
else // Emp activated? Bag of holding? No saving throw for you
|
||||
|
||||
@@ -40,10 +40,10 @@
|
||||
/obj/item/latexballon/ex_act(severity)
|
||||
burst()
|
||||
switch(severity)
|
||||
if (1)
|
||||
if(1)
|
||||
qdel(src)
|
||||
if (2)
|
||||
if (prob(50))
|
||||
if(2)
|
||||
if(prob(50))
|
||||
qdel(src)
|
||||
|
||||
/obj/item/latexballon/bullet_act(obj/item/projectile/P)
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
cyborg.cell.use(5)
|
||||
repair_tick = 0
|
||||
|
||||
if((world.time - 2000) > msg_cooldown )
|
||||
if((world.time - 2000) > msg_cooldown)
|
||||
var/msgmode = "standby"
|
||||
if(cyborg.health < 0)
|
||||
msgmode = "critical"
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
if(!(critter.healable))
|
||||
to_chat(user, "<span class='notice'>You cannot use [src] on [critter]!</span>")
|
||||
return
|
||||
else if (critter.health == critter.maxHealth)
|
||||
else if(critter.health == critter.maxHealth)
|
||||
to_chat(user, "<span class='notice'>[critter] is at full health.</span>")
|
||||
return
|
||||
else if(heal_brute < 1)
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
return 0
|
||||
if(isrobot(M)) //Repairing cyborgs
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.getBruteLoss() || R.getFireLoss() )
|
||||
if(R.getBruteLoss() || R.getFireLoss())
|
||||
R.heal_overall_damage(15, 15)
|
||||
use(1)
|
||||
user.visible_message("<span class='notice'>\The [user] applied some [src] at [R]'s damaged areas.</span>",\
|
||||
|
||||
@@ -71,7 +71,7 @@ GLOBAL_LIST_INIT(glass_recipes, list (
|
||||
to_chat(user, "<span class='notice'>You attach wire to [src].</span>")
|
||||
new /obj/item/stack/light_w(user.loc)
|
||||
use(1)
|
||||
else if( istype(W, /obj/item/stack/rods) )
|
||||
else if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/rglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
@@ -164,7 +164,7 @@ GLOBAL_LIST_INIT(pglass_recipes, list (
|
||||
|
||||
/obj/item/stack/sheet/plasmaglass/attackby(obj/item/W, mob/user, params)
|
||||
..()
|
||||
if( istype(W, /obj/item/stack/rods) )
|
||||
if(istype(W, /obj/item/stack/rods))
|
||||
var/obj/item/stack/rods/V = W
|
||||
var/obj/item/stack/sheet/plasmarglass/RG = new (user.loc)
|
||||
RG.add_fingerprint(user)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
if(!I.use_tool(src, user, volume = I.tool_volume))
|
||||
to_chat(user, "<span class='warning'>You can not reform this!</span>")
|
||||
return
|
||||
if (mineralType == "metal")
|
||||
if(mineralType == "metal")
|
||||
var/obj/item/stack/sheet/metal/new_item = new(user.loc)
|
||||
user.visible_message("[user.name] shaped [src] into metal with the welding tool.", \
|
||||
"<span class='notice'>You shaped [src] into metal with the welding tool.</span>", \
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
icon_state = "screwdriver_[param_color]"
|
||||
belt_icon = "screwdriver_[param_color]"
|
||||
|
||||
if (prob(75))
|
||||
if(prob(75))
|
||||
src.pixel_y = rand(0, 16)
|
||||
|
||||
/obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user)
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
else
|
||||
var/mob/living/carbon/human/H = user
|
||||
var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand")
|
||||
if(affecting.receive_damage( 0, 5 )) //INFERNO
|
||||
if(affecting.receive_damage(0, 5)) //INFERNO
|
||||
H.UpdateDamageIcon()
|
||||
to_chat(user,"<span class='notice'>You light [src], but you burn your hand in the process.</span>")
|
||||
if(world.time > next_on_message)
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
. += "<span class='notice'>[src] has been eaten down to a sliver!</span>"
|
||||
|
||||
/obj/item/soap/attack(mob/target as mob, mob/user as mob)
|
||||
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_selected == "mouth" )
|
||||
if(target && user && ishuman(target) && ishuman(user) && !target.stat && !user.stat && user.zone_selected == "mouth")
|
||||
user.visible_message("<span class='warning'>[user] starts washing [target]'s mouth out with [name]!</span>")
|
||||
if(do_after(user, cleanspeed, target = target))
|
||||
user.visible_message("<span class='warning'>[user] washes [target]'s mouth out with [name]!</span>")
|
||||
|
||||
@@ -459,7 +459,7 @@
|
||||
/obj/item/storage/bag/tray/cyborg
|
||||
|
||||
/obj/item/storage/bag/tray/cyborg/afterattack(atom/target, mob/user as mob)
|
||||
if( isturf(target) || istype(target,/obj/structure/table) )
|
||||
if(isturf(target) || istype(target,/obj/structure/table))
|
||||
var/found_table = istype(target,/obj/structure/table/)
|
||||
if(!found_table) //it must be a turf!
|
||||
for(var/obj/structure/table/T in target)
|
||||
@@ -469,7 +469,7 @@
|
||||
var/turf/dropspot
|
||||
if(!found_table) // don't unload things onto walls or other silly places.
|
||||
dropspot = user.loc
|
||||
else if( isturf(target) ) // they clicked on a turf with a table in it
|
||||
else if(isturf(target)) // they clicked on a turf with a table in it
|
||||
dropspot = target
|
||||
else // they clicked on a table
|
||||
dropspot = target.loc
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
open(user)
|
||||
return 0
|
||||
|
||||
if(!( istype(over_object, /obj/screen) ))
|
||||
if(!istype(over_object, /obj/screen))
|
||||
return 1
|
||||
|
||||
//makes sure master_item is equipped before putting it in hand, so that we can't drag it into our hand from miles away.
|
||||
@@ -47,7 +47,7 @@
|
||||
if(!(master_item.loc == user) || (master_item.loc && master_item.loc.loc == user))
|
||||
return 0
|
||||
|
||||
if(!( user.restrained() ) && !( user.stat ))
|
||||
if(!user.restrained() && !user.stat)
|
||||
switch(over_object.name)
|
||||
if("r_hand")
|
||||
user.unEquip(master_item, silent = TRUE)
|
||||
|
||||
@@ -239,7 +239,7 @@
|
||||
return
|
||||
if(user.restrained() || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED))
|
||||
return
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
if((!istype(O, /atom/movable) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src)))
|
||||
return
|
||||
if(!ishuman(user) && !isrobot(user)) //No ghosts, you cannot shove people into fucking lockers
|
||||
return
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
if(W != user.get_active_hand())
|
||||
to_chat(user, "You must be holding the pen to perform this action.")
|
||||
return
|
||||
if(! Adjacent(user))
|
||||
if(!Adjacent(user))
|
||||
to_chat(user, "You have moved too far away from the cardboard box.")
|
||||
return
|
||||
decalselection = replacetext(decalselection, " ", "_")
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
. = ..()
|
||||
if(start_showpieces.len && !start_showpiece_type)
|
||||
var/list/showpiece_entry = pick(start_showpieces)
|
||||
if (showpiece_entry && showpiece_entry["type"])
|
||||
if(showpiece_entry && showpiece_entry["type"])
|
||||
start_showpiece_type = showpiece_entry["type"]
|
||||
if (showpiece_entry["trophy_message"])
|
||||
if(showpiece_entry["trophy_message"])
|
||||
trophy_message = showpiece_entry["trophy_message"]
|
||||
if(start_showpiece_type)
|
||||
showpiece = new start_showpiece_type (src)
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
update_appearance(UPDATE_NAME | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/door_assembly/crowbar_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
@@ -140,7 +140,7 @@
|
||||
update_appearance(UPDATE_NAME | UPDATE_OVERLAYS)
|
||||
|
||||
/obj/structure/door_assembly/screwdriver_act(mob/user, obj/item/I)
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER )
|
||||
if(state != AIRLOCK_ASSEMBLY_NEEDS_SCREWDRIVER)
|
||||
return
|
||||
. = TRUE
|
||||
if(!I.tool_use_check(user, 0))
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
to_chat(user, "<span class='warning'>You need at least five rods to add plating!</span>")
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You start adding plating...</span>")
|
||||
if (do_after(user, 40, target = src))
|
||||
if(do_after(user, 40, target = src))
|
||||
if(!loc || !S || S.get_amount() < 5)
|
||||
return
|
||||
S.use(5)
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
return ..()
|
||||
|
||||
/obj/structure/kitchenspike/MouseDrop_T(mob/living/victim, mob/living/user)
|
||||
if (!user.Adjacent(src) || !user.Adjacent(victim) || isAI(user) || !ismob(victim))
|
||||
if(!user.Adjacent(src) || !user.Adjacent(victim) || isAI(user) || !ismob(victim))
|
||||
return
|
||||
if(isanimal(user) && victim != user)
|
||||
return // animals cannot put mobs other than themselves onto spikes
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
|
||||
/obj/structure/ladder/Initialize(mapload, obj/structure/ladder/up, obj/structure/ladder/down)
|
||||
. = ..()
|
||||
if (up)
|
||||
if(up)
|
||||
src.up = up
|
||||
up.down = src
|
||||
up.update_icon()
|
||||
if (down)
|
||||
if(down)
|
||||
src.down = down
|
||||
down.up = src
|
||||
down.update_icon()
|
||||
@@ -38,7 +38,7 @@
|
||||
L.update_icon()
|
||||
break
|
||||
if(!up)
|
||||
for (var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
|
||||
for(var/obj/structure/ladder/L in locate(T.x, T.y, T.z + 1))
|
||||
up = L
|
||||
L.down = src // Don't waste effort looping the other way
|
||||
L.update_icon()
|
||||
@@ -93,7 +93,7 @@
|
||||
|
||||
if(up && down)
|
||||
var/result = alert("Go up or down [src]?", "[name]", "Up", "Down", "Cancel")
|
||||
if (!is_ghost && !in_range(src, user))
|
||||
if(!is_ghost && !in_range(src, user))
|
||||
return // nice try
|
||||
switch(result)
|
||||
if("Up")
|
||||
@@ -164,13 +164,13 @@
|
||||
down = L
|
||||
L.up = src
|
||||
L.update_icon()
|
||||
if (up)
|
||||
if(up)
|
||||
break // break if both our connections are filled
|
||||
else if(!up && L.height == height + 1)
|
||||
up = L
|
||||
L.down = src
|
||||
L.update_icon()
|
||||
if (down)
|
||||
if(down)
|
||||
break // break if both our connections are filled
|
||||
|
||||
update_icon()
|
||||
|
||||
@@ -138,7 +138,7 @@
|
||||
/obj/structure/morgue/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A in connected.loc)
|
||||
if(!(A.anchored))
|
||||
if(!A.anchored)
|
||||
A.forceMove(src)
|
||||
get_revivable(TRUE)
|
||||
playsound(loc, open_sound, 50, 1)
|
||||
@@ -241,7 +241,7 @@
|
||||
/obj/structure/m_tray/attack_hand(mob/user as mob)
|
||||
if(connected)
|
||||
for(var/atom/movable/A as mob|obj in loc)
|
||||
if(!( A.anchored ))
|
||||
if(!A.anchored)
|
||||
A.forceMove(connected)
|
||||
connected.connected = null
|
||||
connected.update_icon(connected.update_state())
|
||||
@@ -544,7 +544,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
|
||||
|
||||
|
||||
/obj/structure/c_tray/MouseDrop_T(atom/movable/O, mob/living/user)
|
||||
if((!( istype(O, /atom/movable) ) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
if((!istype(O, /atom/movable) || O.anchored || get_dist(user, src) > 1 || get_dist(user, O) > 1 || user.contents.Find(src) || user.contents.Find(O)))
|
||||
return
|
||||
if(!ismob(O) && !istype(O, /obj/structure/closet/body_bag))
|
||||
return
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(flipped)
|
||||
var/type = 0
|
||||
var/subtype = null
|
||||
for(var/direction in list(turn(dir,90), turn(dir,-90)) )
|
||||
for(var/direction in list(turn(dir,90), turn(dir,-90)))
|
||||
var/obj/structure/table/T = locate(/obj/structure/table,get_step(src,direction))
|
||||
if(T && T.flipped)
|
||||
type++
|
||||
@@ -190,7 +190,7 @@
|
||||
/obj/structure/table/MouseDrop_T(obj/O, mob/user)
|
||||
if(..())
|
||||
return TRUE
|
||||
if((!( isitem(O) ) || user.get_active_hand() != O))
|
||||
if((!isitem(O) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
@@ -346,7 +346,7 @@
|
||||
if(flipped)
|
||||
return 0
|
||||
|
||||
if( !straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)) )
|
||||
if(!straight_table_check(turn(direction,90)) || !straight_table_check(turn(direction,-90)))
|
||||
return 0
|
||||
|
||||
dir = direction
|
||||
@@ -893,7 +893,7 @@
|
||||
. = . || mover.checkpass(PASSTABLE)
|
||||
|
||||
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
|
||||
if((!( isitem(O) ) || user.get_active_hand() != O))
|
||||
if((!isitem(O) || user.get_active_hand() != O))
|
||||
return
|
||||
if(isrobot(user))
|
||||
return
|
||||
|
||||
@@ -43,7 +43,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
|
||||
|
||||
//turf/simulated/floor/CanPass(atom/movable/mover, turf/target, height=0)
|
||||
// if((istype(mover, /obj/machinery/vehicle) && !(src.burnt)))
|
||||
// if(!( locate(/obj/machinery/mass_driver, src) ))
|
||||
// if(!( locate(/obj/machinery/mass_driver, src)))
|
||||
// return 0
|
||||
// return ..()
|
||||
|
||||
|
||||
@@ -197,11 +197,11 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
|
||||
has_data = TRUE
|
||||
|
||||
/turf/simulated/floor/plating/asteroid/airless/cave/Initialize(mapload)
|
||||
if (!mob_spawn_list)
|
||||
if(!mob_spawn_list)
|
||||
mob_spawn_list = list(/mob/living/simple_animal/hostile/asteroid/goldgrub = 1, /mob/living/simple_animal/hostile/asteroid/goliath = 5, /mob/living/simple_animal/hostile/asteroid/basilisk = 4, /mob/living/simple_animal/hostile/asteroid/hivelord = 3)
|
||||
if (!megafauna_spawn_list)
|
||||
if(!megafauna_spawn_list)
|
||||
megafauna_spawn_list = GLOB.megafauna_spawn_list
|
||||
if (!flora_spawn_list)
|
||||
if(!flora_spawn_list)
|
||||
flora_spawn_list = list(/obj/structure/flora/ash/leaf_shroom = 2, /obj/structure/flora/ash/cap_shroom = 2, /obj/structure/flora/ash/stem_shroom = 2, /obj/structure/flora/ash/cacti = 1, /obj/structure/flora/ash/tall_shroom = 2, /obj/structure/flora/ash/rock/style_random = 1)
|
||||
if(SSmapping.cave_theme == BLOCKED_BURROWS)
|
||||
flora_spawn_list += list(/obj/structure/flora/ash/rock/style_random = 3) //Let us see how this goes
|
||||
|
||||
@@ -124,10 +124,10 @@
|
||||
..()
|
||||
switch(severity)
|
||||
if(3)
|
||||
if (prob(75))
|
||||
if(prob(75))
|
||||
gets_drilled(null, 1)
|
||||
if(2)
|
||||
if (prob(90))
|
||||
if(prob(90))
|
||||
gets_drilled(null, 1)
|
||||
if(1)
|
||||
gets_drilled(null, 1)
|
||||
@@ -144,7 +144,7 @@
|
||||
mineralSpawnChanceList = typelist("mineralSpawnChanceList", mineralSpawnChanceList)
|
||||
|
||||
. = ..()
|
||||
if (prob(mineralChance))
|
||||
if(prob(mineralChance))
|
||||
var/path = pickweight(mineralSpawnChanceList)
|
||||
var/turf/T = ChangeTurf(path, FALSE, TRUE, TRUE)
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
//make some randomly pathing rivers
|
||||
for(var/A in river_nodes)
|
||||
var/obj/effect/landmark/river_waypoint/W = A
|
||||
if (W.z != target_z || W.connected)
|
||||
if(W.z != target_z || W.connected)
|
||||
continue
|
||||
W.connected = TRUE
|
||||
var/turf/cur_turf = get_turf(W)
|
||||
@@ -80,7 +80,7 @@
|
||||
for(var/F in RANGE_TURFS(1, src) - src)
|
||||
var/turf/T = F
|
||||
var/area/new_area = get_area(T)
|
||||
if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/simulated/floor/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area)) || (T.flags & NO_LAVA_GEN) )
|
||||
if(!T || (T.density && !ismineralturf(T)) || istype(T, /turf/simulated/floor/indestructible) || (whitelisted_area && !istype(new_area, whitelisted_area)) || (T.flags & NO_LAVA_GEN))
|
||||
continue
|
||||
|
||||
if(!logged_turf_type && ismineralturf(T))
|
||||
|
||||
@@ -42,10 +42,10 @@
|
||||
if(!IS_DYNAMIC_LIGHTING(src) && IS_DYNAMIC_LIGHTING(A))
|
||||
add_overlay(/obj/effect/fullbright)
|
||||
|
||||
if (light_power && light_range)
|
||||
if(light_power && light_range)
|
||||
update_light()
|
||||
|
||||
if (opacity)
|
||||
if(opacity)
|
||||
has_opaque_atom = TRUE
|
||||
|
||||
return INITIALIZE_HINT_NORMAL
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
var/ckey = ckey(key)
|
||||
|
||||
var/client/C = GLOB.directory[ckey]
|
||||
if (C && ckey == C.ckey && computer_id == C.computer_id && address == C.address)
|
||||
if(C && ckey == C.ckey && computer_id == C.computer_id && address == C.address)
|
||||
return //don't recheck connected clients.
|
||||
|
||||
if((ckey in GLOB.admin_datums) || (ckey in GLOB.de_admins))
|
||||
|
||||
@@ -53,9 +53,9 @@
|
||||
blockselfban = 1
|
||||
kickbannedckey = 1
|
||||
|
||||
if( !bantype_pass ) return
|
||||
if( !istext(reason) ) return
|
||||
if( !isnum(duration) ) return
|
||||
if(!bantype_pass) return
|
||||
if(!istext(reason)) return
|
||||
if(!isnum(duration)) return
|
||||
|
||||
var/ckey
|
||||
var/computerid
|
||||
@@ -229,7 +229,7 @@
|
||||
if(BANTYPE_ANY_FULLBAN)
|
||||
bantype_str = "ANY"
|
||||
bantype_pass = 1
|
||||
if( !bantype_pass ) return
|
||||
if(!bantype_pass) return
|
||||
|
||||
var/bantype_sql
|
||||
if(bantype_str == "ANY")
|
||||
|
||||
@@ -120,7 +120,7 @@ you will have to do something like if(client.holder.rights & R_ADMIN) yourself.
|
||||
if(!other || !other.holder)
|
||||
return 1
|
||||
if(usr.client.holder.rights != other.holder.rights)
|
||||
if( (usr.client.holder.rights & other.holder.rights) == other.holder.rights )
|
||||
if((usr.client.holder.rights & other.holder.rights) == other.holder.rights)
|
||||
return 1 //we have all the rights they have and more
|
||||
to_chat(usr, "<font color='red'>Error: Cannot proceed. They have more or equal rights to us.</font>")
|
||||
return 0
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user